:root {
  --bg: #09121a;
  --bg-soft: #0f1923;
  --card: rgba(255,255,255,0.05);
  --card-strong: rgba(255,255,255,0.08);
  --line: rgba(255,255,255,0.12);
  --text: #f4f7fb;
  --muted: #9db0c0;
  --accent: #ffd257;
  --accent-2: #00d0a2;
  --danger: #ff6b7a;
  --solid: #f1c232;
  --stripe: #5ea0ff;
  --eight: #101010;
  --shadow: 0 18px 48px rgba(0,0,0,0.33);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at top, #12202d, #060b10 58%); color: var(--text); font-family: 'Inter', sans-serif; }
body { min-height: 100vh; }
a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; }
.app-shell { min-height: 100vh; padding: 20px; }
#app { max-width: 1240px; margin: 0 auto; }
.screen { display: flex; flex-direction: column; gap: 18px; }
.home-screen { min-height: calc(100vh - 40px); align-items: center; justify-content: center; text-align: center; gap: 26px; }
.brand-lockup h1 { margin: 0; font-size: clamp(44px, 8vw, 92px); line-height: 0.95; letter-spacing: -0.04em; }
.lead { margin: 0; font-size: clamp(20px, 3vw, 28px); color: var(--accent); font-weight: 700; }
.sublead { margin: 0 auto; max-width: 720px; color: var(--muted); font-size: 18px; }
.brand-pill, .eyebrow, .tiny-label, .offer-topline { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); }
.home-hero-card, .card-shell, .offer-card, .comment-panel, .status-panel, .microchat-card, .face-card, .opponent-card, .home-footer-links, .unlock-banner { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.home-hero-card { width: min(560px, 100%); padding: 24px; border-radius: 28px; }
.home-stat { margin-bottom: 18px; color: var(--muted); }
.cta-primary, .cta-secondary, .level-tab, .reply-chip, .linkish { border: 0; border-radius: 999px; cursor: pointer; transition: transform 140ms ease, opacity 140ms ease, background 140ms ease; }
.cta-primary:hover, .cta-secondary:hover, .level-tab:hover, .reply-chip:hover, .linkish:hover, .opponent-card:hover { transform: translateY(-1px); }
.cta-primary { background: linear-gradient(135deg, #ffd257, #ffb347); color: #111; font-weight: 800; padding: 14px 24px; }
.cta-primary.giant { font-size: clamp(28px, 5vw, 48px); width: 100%; padding: 22px 24px; }
.cta-secondary { background: rgba(255,255,255,0.08); color: var(--text); font-weight: 700; padding: 14px 22px; border: 1px solid var(--line); }
.linkish { background: transparent; color: var(--muted); padding: 6px 0; }
.tiny-note, .mini-meta, .section-note, .muted, .face-meta { color: var(--muted); font-size: 14px; }
.left { text-align: left; }
.home-footer-links { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 999px; }
.divider-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.22); }
.topbar, .game-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.section-intro h2 { margin: 4px 0 8px; font-size: clamp(28px, 5vw, 42px); }
.section-intro p { margin: 0; color: var(--muted); max-width: 780px; }
.level-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.level-tab { width: 44px; height: 44px; background: rgba(255,255,255,0.06); color: var(--text); font-weight: 800; border: 1px solid var(--line); }
.level-tab.active { background: linear-gradient(135deg, rgba(255,210,87,0.18), rgba(0,208,162,0.18)); border-color: rgba(255,210,87,0.4); }
.opponent-grid.three-up { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.opponent-card { text-align: left; padding: 0; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.opponent-art-wrap { aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(180deg, rgba(0,208,162,0.2), rgba(255,255,255,0)); }
.opponent-art-wrap img { width: 100%; height: 100%; object-fit: cover; }
.opponent-copy { padding: 16px; }
.opponent-header-row, .face-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.opponent-name { font-size: 22px; font-weight: 800; }
.opponent-title { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-top: 2px; }
.opponent-tagline { color: var(--muted); margin-top: 10px; line-height: 1.4; }
.badge { padding: 8px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--accent); border: 1px solid rgba(255,210,87,0.3); background: rgba(255,210,87,0.08); white-space: nowrap; }
.badge.small { font-size: 11px; }
.badge-on { color: var(--accent-2); border-color: rgba(0,208,162,0.3); background: rgba(0,208,162,0.08); }
.prematch-layout, .postmatch-layout { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 26px; align-items: stretch; }
.card-shell { border-radius: 28px; overflow: hidden; min-height: 560px; }
.card-shell img { width: 100%; height: 100%; object-fit: cover; }
.card-shell.tall { min-height: 620px; }
.prematch-copy, .postmatch-copy { display: flex; flex-direction: column; gap: 16px; }
.subtitle-line { color: var(--accent); font-weight: 700; }
.profile-summary { margin: 0; color: var(--muted); line-height: 1.5; }
.speech-bubble { background: rgba(255,255,255,0.08); border: 1px solid var(--line); padding: 18px; border-radius: 22px; font-size: 18px; line-height: 1.45; }
.speech-bubble.side { font-size: 17px; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.tertiary-row { margin-top: 4px; }
.game-opponent-chip { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); }
.game-opponent-chip img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.hud-block { padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); min-width: 120px; }
.hud-block.wide { min-width: 230px; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; }
.table-shell, .sidebar-shell { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 26px; padding: 14px; box-shadow: var(--shadow); }
.table-shell canvas { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; }
.sidebar-shell { display: flex; flex-direction: column; gap: 14px; }
.comment-panel, .status-panel, .microchat-card, .offer-card { padding: 16px; border-radius: 22px; }
.legend-list { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 14px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; }
.swatch.solids { background: var(--solid); }
.swatch.stripes { background: var(--stripe); }
.swatch.eight { background: var(--eight); }
.microchat-prompt { margin: 8px 0 14px; font-size: 16px; line-height: 1.35; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.reply-chip { background: rgba(255,255,255,0.08); color: var(--text); padding: 10px 14px; border: 1px solid var(--line); }
.offer-card { display: flex; flex-direction: column; gap: 8px; }
.offer-title { font-size: 24px; font-weight: 800; }
.offer-desc { color: var(--muted); }
.unlock-banner { padding: 12px 16px; border-radius: 18px; color: var(--accent-2); font-weight: 700; }
.faces-list { display: flex; flex-direction: column; gap: 14px; }
.face-card { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border-radius: 22px; }
.face-avatar { width: 74px; height: 74px; border-radius: 18px; object-fit: cover; }
.face-main { min-width: 0; }
.small-btn { padding: 12px 16px; }
.empty-state { padding: 28px; border-radius: 22px; background: rgba(255,255,255,0.04); border: 1px dashed var(--line); color: var(--muted); }
.gap-tight { gap: 10px; }
@media (max-width: 980px) {
  .opponent-grid.three-up, .prematch-layout, .postmatch-layout, .game-layout { grid-template-columns: 1fr; }
  .card-shell, .card-shell.tall { min-height: 420px; }
  .hud-block.wide { min-width: 0; }
}
@media (max-width: 720px) {
  .app-shell { padding: 14px; }
  .game-topbar { flex-wrap: wrap; }
  .stacked-mobile { flex-direction: column; }
  .stacked-mobile > * { width: 100%; }
  .face-card { grid-template-columns: 58px minmax(0, 1fr); }
  .face-card .small-btn { grid-column: 1 / -1; width: 100%; }
}
