/* Site home: dark forest, warm campfire accents (same mood as the games). */
:root {
  --bg: #0f180c;
  --bg2: #16241a;
  --card: rgba(24, 38, 20, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef3e8;
  --muted: #a9b8a0;
  --accent: #ffb347;
  --accent2: #ffd23d;
  --good: #8dff7a;
  --bad: #ff8a7a;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 50% -10%, #2a4420 0%, transparent 60%), radial-gradient(500px 300px at 50% 100%, rgba(255, 140, 50, 0.12), transparent 70%), var(--bg);
  background-attachment: fixed;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }

.top { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + var(--safe-t)) 16px 12px; max-width: 960px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 900; font-size: 18px; letter-spacing: 0.3px; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: url(icon.svg) center/cover; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 4px; border-radius: 19px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.ava { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent), #ff7a2a); color: #2a1400; font-weight: 900; }

.wrap { max-width: 960px; margin: 0 auto; padding: 8px 16px calc(32px + var(--safe-b)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.auth { max-width: 400px; margin: 6vh auto 0; }
h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; }
h2 { margin: 0; font-size: 20px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 16px 0; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.tab { height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.tab.on { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--text); font: inherit; font-size: 16px; }
.field input:focus { outline: none; border-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); color: var(--text); font: inherit; font-weight: 900; font-size: 16px; cursor: pointer; }
.btn.primary { border: 0; background: linear-gradient(180deg, var(--accent2), var(--accent)); color: #2a1e00; }
.btn.ghost { margin-top: 12px; background: transparent; }
.btn:disabled { opacity: 0.6; }
.err { margin: 0 0 12px; color: var(--bad); font-weight: 700; }
.err.good { color: var(--good); }
.hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.hello { margin: 18px 0 8px; }
.sec { margin: 22px 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.game { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; transition: transform 0.15s, border-color 0.15s; }
.game:hover { transform: translateY(-2px); border-color: rgba(255, 179, 71, 0.6); }
.art { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.art svg { width: 100%; height: 100%; }
.forest { background: radial-gradient(circle at 50% 65%, #3d6a2a, #1c3216 75%); }
.info { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.info b { font-size: 18px; }
.info span { color: var(--muted); font-size: 14px; }
.info .play { align-self: flex-start; margin-top: 6px; padding: 8px 18px; border-radius: 10px; background: linear-gradient(180deg, var(--accent2), var(--accent)); color: #2a1e00; font-weight: 900; font-size: 15px; }
.soon { opacity: 0.55; }
.soon-art { background: rgba(255, 255, 255, 0.04); color: var(--muted); }
.soon-art svg { width: 40px; height: 40px; }

.sheet { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.55); }
.sheet .card { width: 100%; max-width: 420px; margin-bottom: var(--safe-b); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 16px; cursor: pointer; }
.pw { margin: 14px 0 0; }
.pw summary { cursor: pointer; font-weight: 800; color: var(--accent); margin-bottom: 10px; }
@media (min-width: 640px) { .sheet { align-items: center; } }
.game.soon { flex-direction: row; align-items: center; }
.game.soon .art { aspect-ratio: auto; width: 72px; height: 72px; flex: none; }
.game.soon .info { padding: 12px 16px; }
