:root {
  color-scheme: dark;
  --bg: #0b101a;
  --panel: #121a28;
  --panel-2: #182235;
  --line: rgba(255, 255, 255, .1);
  --text: #f7f4ec;
  --muted: #aab3c5;
  --accent: #ffd166;
  --accent-2: #ff9f72;
  --good: #69db9c;
  font-family: 'Noto Sans KR', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #17253c 0, var(--bg) 38rem); color: var(--text); }
a { color: inherit; }
button, input { font: inherit; }

.game-header {
  min-height: 66px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 26, .88);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.game-brand { min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.game-brand-logo { width: 42px; height: 42px; flex: 0 0 42px; display: block; border-radius: 14px; box-shadow: 0 7px 20px rgba(0, 0, 0, .28); }
.game-brand span:last-child { display: flex; flex-direction: column; gap: 1px; }
.game-brand strong { font-size: 17px; font-weight: 900; }
.game-brand small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.home-actions, .account-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.account-button { display: none !important; }
.account-login-icon, .account-profile, .account-logout { border: 1px solid var(--line); background: rgba(255,255,255,.045); color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.account-login-icon { min-height: 40px; padding: 7px 11px 7px 8px; display: inline-flex; align-items: center; gap: 7px; border-radius: 14px; text-decoration: none; font-size: 11px; font-weight: 900; }
.account-login-icon svg { width: 22px; height: 22px; padding: 3px; border-radius: 9px; background: rgba(255,209,102,.14); fill: var(--accent); }
.account-login-icon:hover, .account-profile:hover, .account-logout:hover { border-color: rgba(255,209,102,.38); background: rgba(255,209,102,.08); }
.account-member { display: flex; align-items: center; gap: 6px; }
.account-profile { min-height: 40px; max-width: 160px; padding: 5px 10px 5px 5px; display: flex; align-items: center; gap: 7px; border-radius: 14px; text-decoration: none; }
.account-profile > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 900; }
.account-avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; object-fit: cover; background: var(--panel-2); box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.account-logout { width: 40px; height: 40px; padding: 9px; display: grid; place-items: center; border-radius: 14px; cursor: pointer; }
.account-logout svg { width: 19px; height: 19px; fill: currentColor; }
.account-logout:disabled { opacity: .45; cursor: wait; }
.install-button { margin-left: 0; min-height: 38px; padding: 8px 12px; border: 1px solid rgba(255, 209, 102, .34); border-radius: 12px; background: rgba(255, 209, 102, .1); color: var(--accent); font-size: 11px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.install-button:hover { background: rgba(255, 209, 102, .18); }
.install-button:active { transform: scale(.97); }
.install-button[hidden] { display: none; }
.install-status { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 80; width: min(calc(100% - 32px), 520px); margin: 0; padding: 12px 16px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 14px; background: #172235; color: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); text-align: center; font-size: 12px; font-weight: 700; }
.install-status:empty { display: none; }

.game-shell { width: min(100% - 28px, 760px); margin: 0 auto; padding: 34px 0 70px; }
.hero { padding: 18px 2px 30px; }
.eyebrow, .section-heading > span { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.hero h1 { margin: 9px 0 12px; font-size: clamp(30px, 8vw, 48px); line-height: 1.15; letter-spacing: -.04em; }
.hero p { max-width: 580px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; word-break: keep-all; }

.featured-game {
  padding: 24px;
  border: 1px solid rgba(255, 209, 102, .28);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 209, 102, .12), rgba(255, 159, 114, .05)), var(--panel);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .22);
}
.status-badge { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: rgba(105, 219, 156, .12); color: var(--good); font-size: 10px; font-weight: 900; }
.featured-game h2 { margin: 13px 0 7px; font-size: 27px; }
.featured-game p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; word-break: keep-all; }
.game-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.game-meta span { padding: 6px 8px; border-radius: 9px; background: rgba(255,255,255,.055); color: #dce2ee; font-size: 10px; font-weight: 700; }
.primary-button { margin-top: 20px; min-height: 50px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #25160e; text-decoration: none; font-size: 15px; font-weight: 900; }

.game-list { margin-top: 36px; }
.section-heading h2 { margin: 7px 0 15px; font-size: 20px; }
.game-card { min-height: 90px; padding: 15px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); }
.game-card + .game-card { margin-top: 9px; }
.game-card-link { text-decoration: none; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.game-card-link:active { transform: scale(.985); }
.game-card-link:hover { border-color: rgba(255,209,102,.3); background: #151f30; }
.game-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--panel-2); font-size: 22px; }
.game-card strong { display: block; margin-bottom: 4px; font-size: 14px; }
.game-card p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.coming-label { color: #8f9aae; font-size: 10px; font-weight: 900; white-space: nowrap; }
.live-label { color: var(--good); }

.game-night-info { margin-top: 36px; padding: 23px; border: 1px solid rgba(105, 219, 156, .24); border-radius: 22px; background: linear-gradient(135deg, rgba(105, 219, 156, .09), rgba(255, 209, 102, .055)), var(--panel); }
.game-night-info h2 { margin: 8px 0 8px; font-size: 20px; }
.game-night-info p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; word-break: keep-all; }
.game-night-info > div { margin-top: 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.game-night-info > div span { min-height: 38px; padding: 8px; display: grid; place-items: center; border-radius: 11px; background: rgba(255, 255, 255, .045); color: #dce8e1; text-align: center; font-size: 9px; font-weight: 800; }

.how-to { margin-top: 36px; padding: 22px; border: 1px solid var(--line); border-radius: 21px; background: rgba(255,255,255,.025); }
.how-to h2 { margin: 8px 0 16px; font-size: 19px; }
.how-to ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.how-to li { min-height: 46px; padding: 8px 10px; display: flex; align-items: center; gap: 10px; border-radius: 12px; background: var(--panel); font-size: 12px; font-weight: 700; }
.how-to li strong { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 209, 102, .12); color: var(--accent); }
.game-footer { padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: #7f899a; text-align: center; font-size: 10px; }

@media (max-width: 430px) {
  .game-shell { width: min(100% - 22px, 760px); padding-top: 22px; }
  .game-header { gap: 7px; padding-inline: 11px; }
  .game-brand strong { font-size: 15px; }
  .game-brand small { max-width: 105px; }
  .account-login-icon { width: 40px; padding: 8px; justify-content: center; }
  .account-login-icon span { display: none; }
  .account-profile { max-width: 104px; padding-right: 7px; }
  .account-profile > span { max-width: 58px; }
  .account-logout { width: 38px; height: 38px; }
  .install-button { padding-inline: 9px; }
  .featured-game { padding: 20px; border-radius: 20px; }
  .game-card { grid-template-columns: auto 1fr; }
  .coming-label { grid-column: 2; }
  .game-night-info > div { grid-template-columns: 1fr; }
}
