@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
:root { --ink: #1d3557; --red: #e63946; --yel: #ffd60a; --blue: #457b9d; --card: rgba(255,255,255,.94); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; background: #a8dadc; color: var(--ink); }
body { font-family: "Space Grotesk", "Segoe UI", Roboto, Arial, sans-serif; }
#app { position: fixed; inset: 0; }
#screen { position: absolute; inset: 0; display: block; }
.hidden { display: none !important; }
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
#hudTop { position: absolute; top: calc(env(safe-area-inset-top) + 8px); left: 8px; right: 8px; display: flex; gap: 10px; align-items: center; pointer-events: auto; }
#bBack { width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--ink); color: #fff; font: 700 22px "Space Grotesk", sans-serif; cursor: pointer; flex: none; box-shadow: 0 3px 0 #0b1a30; }
.ht { flex: 1; background: var(--card); border-radius: 14px; padding: 6px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.12); min-width: 0; }
.ht b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht span { font-size: 14px; color: #457b9d; }
#hudBottom { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 10px); left: 50%; transform: translateX(-50%); display: flex; gap: 10px; pointer-events: auto; }
#hudBottom button { min-width: 88px; height: 60px; border-radius: 16px; border: 0; background: var(--card); color: var(--ink); font: 700 14px "Space Grotesk", sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 4px 0 rgba(29,53,87,.35); cursor: pointer; }
#hudBottom button span { font-size: 22px; line-height: 1; }
#hudBottom button:disabled { opacity: .45; }
#hudBottom button:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(29,53,87,.35); }
#ui { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.scr { pointer-events: auto; position: absolute; inset: 0; overflow-y: auto; padding: calc(env(safe-area-inset-top) + 60px) 16px calc(env(safe-area-inset-bottom) + 70px); display: flex; flex-direction: column; align-items: center; gap: 12px; touch-action: pan-y; }
.scr > * { width: 100%; max-width: 520px; }
.scr.title { justify-content: center; background: linear-gradient(180deg, rgba(168,218,220,.55), rgba(29,53,87,.55)); }
.scr.menu { background: rgba(241,250,238,.93); }
.scr.win { justify-content: center; background: rgba(29,53,87,.45); }
.logo { display: flex; flex-direction: column; align-items: center; line-height: .9; font-size: clamp(44px, 13vw, 76px); letter-spacing: -.01em; transform: rotate(-3deg); filter: drop-shadow(0 5px 0 rgba(0,0,0,.25)); }
.logo span { color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.logo span + span { color: var(--yel); font-size: 1.2em; background: repeating-linear-gradient(45deg, var(--yel) 0 14px, #1d1d1d 14px 28px); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 3px var(--ink); }
.claim { text-align: center; margin: 0 0 6px; color: #fff; font-size: 17px; text-shadow: 0 2px 4px rgba(0,0,0,.4); }
h2 { margin: 4px 0; text-align: center; font-size: 28px; }
.sub { margin: 0; text-align: center; color: #457b9d; }
.btn { appearance: none; border: 0; border-radius: 16px; padding: 13px 16px; font: 700 17px/1.15 "Space Grotesk", sans-serif; color: var(--ink); background: #fff; box-shadow: 0 4px 0 rgba(29,53,87,.35); cursor: pointer; touch-action: manipulation; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(29,53,87,.35); }
.btn.big { background: var(--red); color: #fff; font-size: 24px; padding: 16px; box-shadow: 0 5px 0 #9d0208; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.btn.big small { font-size: 14px; opacity: .9; }
.btn.big.two { background: var(--blue); box-shadow: 0 5px 0 #1d3557; }
.btn.day { background: var(--yel); }
.btn.day i { font-style: normal; color: #2d6a4f; }
.btn.small { font-size: 14px; padding: 9px 12px; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }
.cards { display: flex; flex-direction: column; gap: 10px; }
.card { appearance: none; border: 0; text-align: left; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 4px 0 rgba(29,53,87,.25); font: 700 20px "Space Grotesk", sans-serif; color: var(--ink); display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.card small { font-size: 14px; color: #457b9d; }
.card.locked { opacity: .55; cursor: default; }
.bar { height: 8px; border-radius: 4px; background: #e9ecef; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd60a, #e63946); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.lv { appearance: none; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 3px 0 rgba(29,53,87,.25); padding: 8px 2px; font: 700 18px "Space Grotesk", sans-serif; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; min-height: 60px; }
.lv span { font-size: 12px; color: #6c757d; }
.lv.done { background: #d8f3dc; }
.lv.locked { opacity: .45; cursor: default; }
.st { color: #ced4da; font-size: 13px; }
.st.on { color: #f4a100; }
.panel { background: var(--card); border-radius: 18px; padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.panel.center { text-align: center; }
.help p { line-height: 1.45; margin: 0 0 10px; }
.sl { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.sl input { accent-color: var(--red); }
.ck { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ck input { width: 20px; height: 20px; accent-color: var(--red); }
.stars { display: flex; justify-content: center; gap: 8px; margin: 6px 0; }
.bigst { font-size: 56px; color: #dee2e6; transform: scale(.4); animation: pop .4s forwards; }
.bigst.on { color: #f4a100; text-shadow: 0 3px 0 #b07000; }
@keyframes pop { to { transform: scale(1); } }
.panel .btn { margin-top: 8px; width: 100%; }
.noscript { padding: 20px; }
@media (orientation: landscape) and (max-height: 520px) {
  .scr { padding-top: 12px; gap: 8px; }
  .logo { font-size: 34px; }
  .claim { display: none; }
  .btn.big { font-size: 19px; padding: 9px; }
  .scr.title { justify-content: flex-start; }
  #hudBottom { left: auto; right: 8px; transform: none; flex-direction: column; bottom: 50%; transform: translateY(50%); }
  #hudBottom button { min-width: 74px; height: 56px; }
  #hudTop { right: auto; max-width: 46%; }
}
@media (prefers-reduced-motion: reduce) { .bigst { animation: none; transform: none; } }
