@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05030a; color: #fff3e0; font-family: "Fredoka", system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
#app { position: fixed; inset: 0; }
#game { position: absolute; inset: 0; display: block; touch-action: none; cursor: grab; }
#game:active { cursor: grabbing; }
.hidden { display: none !important; }
#hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud .sp { flex: 1; pointer-events: none; }
.round { width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255, 220, 170, 0.35); background: rgba(24, 14, 32, 0.78); color: #ffe6b0; display: grid; place-items: center; padding: 9px; cursor: pointer; position: relative; transition: transform .12s, background .2s; }
.round:hover { background: rgba(60, 36, 70, 0.9); } .round:active { transform: scale(0.92); }
.round svg { width: 100%; height: 100%; }
.round.hint { color: #ffd76a; box-shadow: 0 0 14px rgba(255, 210, 110, 0.35); }
.round .ad { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: #ff7a3d; color: #fff; padding: 3px; display: grid; }
#lv { display: flex; align-items: center; gap: 8px; background: rgba(24, 14, 32, 0.7); border: 1px solid rgba(255, 220, 170, 0.2); border-radius: 22px; padding: 4px 14px 4px 5px; pointer-events: none; }
#lv-num { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(#ffd98a, #e09a3a); color: #2a1408; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
#lv b { display: block; font-size: 16px; font-weight: 600; line-height: 1.1; } #lv small { display: block; font-size: 11px; opacity: 0.65; letter-spacing: .04em; text-transform: uppercase; }
#tip { position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: min(92vw, 640px); text-align: center; background: rgba(20, 10, 28, 0.82); border: 1px solid rgba(255, 220, 170, 0.25); border-radius: 16px; padding: 7px 16px; font-size: 15px; pointer-events: none; transition: opacity .8s; }
#tip.fade { opacity: 0.25; }
#tut { position: absolute; left: 0; top: 0; pointer-events: none; transition: opacity .2s; }
#tut-hand { width: 52px; height: 52px; margin: -6px 0 0 -14px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
#modal { position: absolute; inset: 0; background: rgba(4, 2, 10, 0.62); display: grid; place-items: center; padding: 14px; backdrop-filter: blur(2px); }
#modal-card { position: relative; width: min(94vw, 460px); max-height: 92vh; overflow: auto; background: linear-gradient(#2a1a36, #1a1024); border: 2px solid rgba(255, 210, 150, 0.35); border-radius: 22px; padding: 20px 20px 18px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(255, 190, 110, 0.12); animation: pop .25s ease-out; }
#modal-card.levels { width: min(96vw, 620px); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
#modal h2 { margin: 2px 0 8px; font-size: 26px; font-weight: 600; color: #ffe2a8; } #modal h2.lit { font-size: 34px; text-shadow: 0 0 18px rgba(255, 200, 110, 0.7); }
#modal h3 { margin: 10px 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: #d8b8ff; font-weight: 500; text-align: left; }
#modal p { margin: 6px 0; font-size: 16px; } .small { font-size: 13px !important; opacity: .75; }
.x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: #ffe6b0; padding: 8px; cursor: pointer; }
.x svg { width: 100%; height: 100%; }
.btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.btn { font: inherit; font-weight: 600; font-size: 16px; border: 0; border-radius: 14px; padding: 10px 18px; background: linear-gradient(#ffd47a, #e8962e); color: #2a1408; cursor: pointer; box-shadow: 0 4px 0 #8a4e14; display: inline-flex; align-items: center; gap: 6px; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a4e14; }
.btn.big { font-size: 19px; padding: 12px 24px; } .btn.plain { background: rgba(255,255,255,.1); color: #ffe6b0; box-shadow: 0 4px 0 rgba(0,0,0,.4); }
.btn.off { background: #4a3a52; color: #cbb; box-shadow: 0 4px 0 #22182a; } .btn.warn { background: linear-gradient(#ff8a6a, #d84a3a); color: #fff; box-shadow: 0 4px 0 #7a2018; }
.btn .ic { width: 20px; height: 20px; display: inline-grid; } .btn svg { width: 100%; height: 100%; }
.stars { display: flex; justify-content: center; gap: 10px; margin: 6px 0 4px; }
.st { width: 46px; height: 46px; color: #4a3a52; display: inline-block; } .st svg { width: 100%; height: 100%; }
.st.on { color: #ffd45a; filter: drop-shadow(0 0 8px rgba(255, 200, 80, .7)); }
.st.pop.on { animation: starpop .45s both; } @keyframes starpop { 0% { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.3); } 100% { transform: none; } }
.mini .st { width: 13px; height: 13px; }
.chapters { text-align: left; }
.lvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.lv { font: inherit; border: 2px solid rgba(255, 210, 150, 0.3); background: rgba(255, 230, 190, 0.08); color: #ffe6b0; border-radius: 14px; padding: 8px 2px 5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lv b { font-size: 20px; font-weight: 600; height: 24px; display: grid; place-items: center; } .lv b svg { width: 18px; height: 18px; }
.lv.cur { border-color: #ffd47a; box-shadow: 0 0 12px rgba(255, 200, 100, .4); } .lv.locked { opacity: .4; cursor: default; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 4px; font-size: 17px; }
.howto, .legal { text-align: left; font-size: 14px; background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px 12px; margin-top: 10px; line-height: 1.4; }
.legal { font-size: 12.5px; opacity: .85; }
.credits { font-size: 13px; opacity: .85; margin-top: 10px; line-height: 1.45; } .credits img { width: 140px; height: auto; display: block; margin: 0 auto 6px; border-radius: 10px; }
#adblock { position: absolute; inset: 0; background: rgba(0,0,0,.85); display: grid; place-content: center; justify-items: center; gap: 10px; }
.spinner { width: 44px; height: 44px; border: 4px solid rgba(255,220,170,.2); border-top-color: #ffd47a; border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
#toasts { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { background: rgba(30, 16, 40, .92); border: 1px solid rgba(255, 210, 150, .35); border-radius: 12px; padding: 8px 14px; font-size: 15px; transition: opacity .4s; } .toast.out { opacity: 0; }
#splash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, #1d0f10, #000 70%); display: grid; place-content: center; justify-items: center; gap: 4px; transition: opacity .45s; }
#splash img { width: min(70vw, 460px); height: auto; border-radius: 18px; animation: glow 1.8s ease-out both; }
#splash p { margin: 0; font-size: 16px; letter-spacing: .3em; text-transform: uppercase; opacity: .6; }
#splash.out { opacity: 0; pointer-events: none; }
@keyframes glow { from { opacity: 0; transform: scale(.94); filter: brightness(.4); } 40% { opacity: 1; filter: brightness(1.15); } to { transform: none; filter: none; } }
#loading { position: absolute; inset: 0; background: #000; display: grid; place-content: center; justify-items: center; gap: 10px; }
.flame { width: 18px; height: 28px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff6c0, #ffb040 50%, #ff6020); animation: flick .3s infinite alternate; } @keyframes flick { to { transform: scaleY(1.15) translateY(-2px); } }
body.portrait #hud { flex-wrap: wrap; } body.portrait #lv b { font-size: 14px; } body.portrait #tip { font-size: 14px; bottom: max(18px, env(safe-area-inset-bottom)); }
@media (max-height: 420px) { .round { width: 36px; height: 36px; padding: 7px; } #lv-num { width: 26px; height: 26px; font-size: 14px; } #tip { font-size: 13px; padding: 5px 12px; } }
