* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #2b2723; color: #2a2118; touch-action: none; user-select: none; -webkit-user-select: none; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Serif SC", "Helvetica Neue", sans-serif; }
.screen { position: fixed; inset: 0; overflow: hidden; }
.hidden { display: none !important; }

#home { background: #e9e1d3; }
#art { position: absolute; left: 50%; top: 50%; width: 1024px; height: 1536px; transform: translate(-50%, -50%); }
#homeImg { display: block; width: 100%; height: 100%; pointer-events: none; }
.hot { position: absolute; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; border-radius: 28px; }
.hot:active { background: rgba(255, 138, 61, 0.22); }
#btnStart { left: 52%; top: 68.5%; width: 47%; height: 14.5%; }
#btnAd { left: 85%; top: 10.5%; width: 12%; height: 9%; }

#game { background: #cfc7b8; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: absolute; left: 0; right: 0; top: 0; padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 0; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
#score { font-size: 34px; font-weight: 800; letter-spacing: 2px; color: #2a2118; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
#coins { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; background: rgba(42, 33, 24, 0.72); color: #ffd27a; font-size: 18px; font-weight: 700; }
#coins .mp-icon { width: 20px; height: 20px; }
#hint { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); text-align: center; color: #3a2d20; font-size: 15px; letter-spacing: 1px; opacity: 0.85; pointer-events: none; }

#over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(30, 24, 18, 0.55); }
.panel { width: min(82vw, 340px); padding: 26px 22px 22px; border-radius: 22px; background: #f6efe2; border: 2px solid #3a2d20; text-align: center; }
.panel h2 { margin: 0 0 6px; font-size: 30px; letter-spacing: 6px; color: #2a2118; }
.panel p { margin: 0 0 18px; font-size: 17px; color: #6b5a45; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; margin-top: 10px; border: 1.5px solid #3a2d20; border-radius: 26px; background: #ece3d2; color: #2a2118; font-size: 17px; font-weight: 700; }
.btn:active { transform: scale(0.97); }
.btn.main { background: #FF8A3D; color: #fff; border-color: #c4601f; }
.btn.ad { background: #2a2118; color: #ffd27a; }
.btn .mp-icon { width: 22px; height: 22px; }
.btn[disabled] { opacity: 0.5; }

#toast { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); padding: 10px 20px; border-radius: 22px; background: rgba(42, 33, 24, 0.9); color: #ffd27a; font-size: 16px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 9; white-space: nowrap; }
#toast.on { opacity: 1; }
