:root {
  color-scheme: dark;
  --bg: #0d1210;
  --bg-soft: #121a16;
  --panel: rgba(25, 35, 29, 0.88);
  --panel-solid: #18221c;
  --ink: #f2eee4;
  --muted: #9ca99f;
  --line: rgba(218, 197, 148, 0.16);
  --line-bright: rgba(218, 197, 148, 0.34);
  --gold: #d6b568;
  --gold-light: #f1d58f;
  --forest: #2d6048;
  --danger: #c96f62;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px),
    radial-gradient(circle at 52% 15%, #1a2c21 0, var(--bg) 45%);
  background-size: 52px 52px, 52px 52px, auto;
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(13,18,16,.2), transparent 24%, transparent 76%, rgba(13,18,16,.2));
  content: "";
  pointer-events: none;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.page-glow { position: fixed; z-index: -1; width: 26rem; height: 26rem; border-radius: 50%; filter: blur(110px); opacity: .12; }
.page-glow--one { top: -10rem; left: -8rem; background: #8a6b28; }
.page-glow--two { right: -12rem; bottom: -6rem; background: #2f7653; }

.site-header {
  width: min(1240px, calc(100% - 72px));
  height: 100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  color: var(--gold-light);
  font-family: "Palatino Linotype", Georgia, serif;
  font-size: 21px;
  font-weight: 700;
}
.brand-mark::before { position: absolute; inset: 5px; border: 1px solid var(--gold); content: ""; transform: rotate(45deg); }
.brand > span:last-child { display: grid; gap: 3px; }
.brand strong { font-family: "Palatino Linotype", Georgia, serif; font-size: 20px; letter-spacing: .18em; }
.brand small { color: var(--muted); font-size: 8px; letter-spacing: .2em; }
.site-header nav { display: flex; align-items: center; gap: 34px; color: #c0c8c1; font-size: 13px; }
.site-header nav a { transition: color .2s ease; }
.site-header nav a:hover { color: var(--gold-light); }
.nav-home { padding-left: 32px; border-left: 1px solid var(--line); }
.menu-toggle {
  position: relative;
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-bright);
  border-radius: 3px;
  background: rgba(255,255,255,.03);
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 12px;
  width: 19px;
  height: 2px;
  background: var(--ink);
  transform-origin: center;
  transition: top .2s ease, transform .2s ease, opacity .2s ease;
}
.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 28px; }
.mobile-only { display: none; }

main { width: min(1240px, calc(100% - 72px)); margin: 0 auto; }
.subpage { padding: 72px 0 110px; }
.subpage-hero { max-width: 820px; margin-bottom: 48px; }
.subpage-hero h1 { margin: 18px 0; font-family: "Palatino Linotype", Georgia, serif; font-size: clamp(38px, 5vw, 68px); line-height: 1.08; }
.subpage-hero p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.article-grid article { padding: 34px; background: var(--bg-soft); }
.article-grid span { color: var(--gold); font-family: "Palatino Linotype", Georgia, serif; font-size: 12px; }
.article-grid h2 { margin: 16px 0 10px; font-family: "Palatino Linotype", Georgia, serif; font-size: 22px; }
.article-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.guest-layout {
  min-height: calc(100vh - 100px);
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(380px, 1.3fr) minmax(320px, 0.75fr);
  gap: clamp(28px, 3vw, 60px);
  align-items: start;
  padding: 70px 0 90px;
}

.eyebrow { margin: 0; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .24em; }
.eyebrow > span { display: inline-block; width: 28px; height: 1px; margin: 0 10px 3px 0; background: var(--gold); }
.hero-copy h1, .dashboard-head h1, .story-section h2, .panel-card h2 {
  font-family: "Palatino Linotype", Georgia, serif;
}
.hero-copy h1 { margin: 24px 0; font-size: clamp(42px, 4.2vw, 72px); line-height: 1.08; letter-spacing: -.035em; }
.hero-copy h1 strong { display: block; font-weight: 800; }
.hero-copy h1 em { color: var(--gold-light); font-style: normal; font-weight: 500; }
.hero-lead { max-width: 570px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 30px; margin-top: 34px; }
.hero-actions .button { min-width: 170px; }

.button {
  min-height: 48px;
  padding: 0 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 1px solid var(--line-bright);
  border-radius: 3px;
  background: rgba(255,255,255,.03);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); border-color: var(--gold); }
.button:disabled { cursor: wait; opacity: .6; transform: none; }
.button--gold { border-color: var(--gold); background: linear-gradient(135deg, #e0c176, #b98f3f); color: #151711; box-shadow: 0 10px 30px rgba(185,143,63,.16); }
.button--gold:hover { background: linear-gradient(135deg, #edd392, #c9a257); }
.button--wide { width: 100%; }
.button--ghost { min-height: 40px; }
.button--small { min-height: 36px; padding: 0 14px; font-size: 10px; }
.text-link { padding-bottom: 6px; border-bottom: 1px solid var(--line-bright); color: #d5dad5; font-size: 12px; }
.hero-stage { position: relative; min-height: 640px; display: grid; place-items: start center; perspective: 900px; }
.stage-ring { position: absolute; width: 110%; aspect-ratio: 1; border: 1px solid rgba(214,181,104,.12); border-radius: 50%; box-shadow: inset 0 0 70px rgba(214,181,104,.04); }
.stage-ring::before, .stage-ring::after { position: absolute; inset: 8%; border: 1px dashed rgba(214,181,104,.08); border-radius: inherit; content: ""; }
.stage-ring::after { inset: 25%; }
.board-wrap { position: relative; transform: rotateX(53deg) rotateZ(-7deg); filter: drop-shadow(0 48px 32px rgba(0,0,0,.48)); }
.board-preview {
  width: clamp(290px, 29vw, 410px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  padding: 14px;
  border: 10px solid #5f4728;
  outline: 2px solid #a88048;
  outline-offset: -7px;
  background: #9d7947;
  box-shadow: inset 0 0 50px rgba(41,27,13,.62), 0 0 0 1px #2c2115;
}
.board-cell { position: relative; display: grid; place-items: center; border: 1px solid rgba(45,30,15,.56); background: rgba(205,165,99,.12); }
.board-cell:nth-child(even) { background: rgba(73,48,24,.07); }
.board-cell.is-citadel, .board-cell.is-corner { background: rgba(64,38,22,.55); }
.piece { position: relative; z-index: 2; width: 66%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset -4px -6px 8px rgba(0,0,0,.35), 0 6px 6px rgba(0,0,0,.3); }
.piece--dark { border: 2px solid #5b4b39; background: radial-gradient(circle at 35% 28%, #425047, #121713 65%); }
.piece--light { border: 2px solid #e1c88e; background: radial-gradient(circle at 35% 28%, #f5e5b9, #a78445 68%); }
.piece--king { width: 76%; border-radius: 30%; transform: rotate(45deg); border-color: #ffe8a8; }
.piece--king::after { position: absolute; inset: 27%; border: 1px solid rgba(70,45,15,.7); content: ""; }
.board-label { position: absolute; left: 50%; color: rgba(232,211,162,.55); font-size: 9px; letter-spacing: .3em; transform: translateX(-50%); }
.board-label--top { top: -32px; }
.board-label--bottom { bottom: -34px; }

.computer-card {
  width: min(100%, 360px);
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(29,41,34,.9), rgba(17,24,20,.94));
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.computer-card h2 { margin: 8px 0 8px; font-family: "Palatino Linotype", Georgia, serif; font-size: 22px; }
.computer-card p:not(.eyebrow) { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.auth-card, .panel-card {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(29,41,34,.94), rgba(17,24,20,.96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.auth-card { padding: 39px; border-top: 2px solid var(--gold); }
.auth-card::before, .auth-card::after { position: absolute; width: 8px; height: 8px; border: solid var(--gold); content: ""; }
.auth-card::before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.auth-card::after { right: 8px; bottom: 8px; border-width: 0 1px 1px 0; }
.auth-kicker { margin: 0 0 10px; color: var(--gold); font-size: 9px; letter-spacing: .24em; }
.auth-card h2 { margin: 0; font-family: "Palatino Linotype", Georgia, serif; font-size: 28px; }
.auth-intro { margin: 10px 0 25px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.auth-tab { padding: 13px 6px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 600; }
.auth-tab.is-active { border-color: var(--gold); color: var(--ink); }
.auth-form { display: grid; gap: 16px; }
.auth-form label, .settings-form label { display: grid; gap: 8px; }
.auth-form label > span, .settings-form label > span, .field-label, .mode-picker legend { color: #b9c2ba; font-size: 10px; font-weight: 600; letter-spacing: .06em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input, select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: 0;
  background: rgba(4,9,6,.33);
  color: var(--ink);
  font-size: 12px;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder { color: #657169; }
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,181,104,.08); }
select option { background: #172019; }
.auth-note { margin: 20px 0 0; color: #768279; font-size: 9px; text-align: center; }
.auth-note span { margin-right: 6px; color: var(--gold); }
.auth-note--closed {
  margin: 0 0 20px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: rgba(214,181,104,.06);
  color: #c8d0c9;
  line-height: 1.5;
  text-align: left;
}

.dashboard { min-height: calc(100vh - 100px); padding: 58px 0 90px; }
.dashboard-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px; }
.player-summary { display: flex; align-items: center; gap: 20px; }
.player-avatar { display: grid; width: 66px; height: 66px; place-items: center; border: 1px solid var(--gold); border-radius: 50%; background: #213228; color: var(--gold-light); font-family: "Palatino Linotype", Georgia, serif; font-size: 25px; }
.dashboard-head h1 { margin: 6px 0 2px; font-size: 29px; }
.player-meta { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-actions { display: flex; align-items: center; gap: 15px; }
.online-pill { color: #a9b4ac; font-size: 10px; }
.online-pill i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #62b985; box-shadow: 0 0 10px #62b985; }
.dashboard-grid { display: grid; grid-template-columns: minmax(310px,.85fr) minmax(420px,1.15fr); gap: 22px; align-items: start; }
.panel-card { padding: 28px; box-shadow: 0 18px 50px rgba(0,0,0,.2); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.panel-card h2 { margin: 7px 0 0; font-size: 21px; }
.card-icon { color: var(--gold); font-size: 30px; }
.field-label { display: block; margin-bottom: 8px; }
.mode-picker { margin: 19px 0; padding: 0; border: 0; }
.mode-picker legend { margin-bottom: 9px; }
.mode-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mode-picker legend { grid-column: 1 / -1; }
.mode-picker label { cursor: pointer; }
.mode-picker input { position: absolute; opacity: 0; pointer-events: none; }
.mode-picker label > span { min-height: 66px; padding: 13px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 3px; background: rgba(0,0,0,.14); }
.mode-picker input:checked + span { border-color: var(--gold); background: rgba(214,181,104,.08); }
.mode-picker b { font-size: 11px; }
.mode-picker small { color: var(--muted); font-size: 9px; }
.room-result { margin-top: 14px; padding: 12px; display: flex; justify-content: space-between; align-items: center; border: 1px solid rgba(98,185,133,.3); background: rgba(98,185,133,.08); }
.room-result div { display: grid; gap: 2px; }
.room-result span { color: var(--muted); font-size: 9px; }
.room-result strong { color: var(--gold-light); letter-spacing: .16em; }
.select-compact { width: auto; min-height: 35px; padding-right: 30px; font-size: 10px; }
.ranking-list, .challenge-list, .admin-users { display: grid; gap: 8px; }
.rank-row, .challenge-row { min-height: 58px; padding: 10px 12px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.rank-place { width: 26px; color: var(--gold); font-family: "Palatino Linotype", Georgia, serif; font-size: 13px; text-align: center; }
.rank-person, .challenge-person { min-width: 0; display: grid; gap: 3px; }
.rank-person strong, .challenge-person strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rank-person small, .challenge-person small { color: var(--muted); font-size: 9px; }
.rank-score { color: var(--gold-light); font-family: "Palatino Linotype", Georgia, serif; font-size: 13px; }
.challenge-button { min-height: 30px; padding: 0 10px; border: 1px solid var(--line-bright); border-radius: 2px; background: transparent; color: #c9d0ca; cursor: pointer; font-size: 9px; }
.challenge-actions { display: flex; gap: 6px; }
.challenge-button--accept { border-color: rgba(98,185,133,.45); color: #8fd3a9; }
.empty-state { padding: 30px 10px; color: var(--muted); font-size: 11px; text-align: center; }
.icon-button { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.settings-card { padding: 0; }
.settings-card summary { padding: 21px 25px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; font-family: "Palatino Linotype", Georgia, serif; font-size: 14px; }
.settings-card summary::-webkit-details-marker { display: none; }
.settings-card summary span:first-child { display: grid; gap: 4px; }
.settings-card summary small { color: var(--gold); font-family: "Segoe UI", Arial, sans-serif; font-size: 8px; letter-spacing: .2em; }
.settings-form { padding: 0 25px 25px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.rating-rules { display: grid; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.rating-rules p { margin: 0; }
.admin-user-row {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.admin-user-row strong { display: block; font-size: 12px; }
.admin-user-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.story-section { padding: 110px 0; border-top: 1px solid var(--line); text-align: center; }
.story-section h2 { max-width: 700px; margin: 14px auto 45px; font-size: clamp(30px, 3.2vw, 48px); }
.rules-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); text-align: left; }
.rules-grid article { padding: 35px; background: var(--bg-soft); }
.rules-grid span { color: var(--gold); font-family: "Palatino Linotype", Georgia, serif; font-size: 12px; }
.rules-grid h3 { margin: 18px 0 10px; font-family: "Palatino Linotype", Georgia, serif; font-size: 17px; }
.rules-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.games-grid { display: grid; grid-template-columns: minmax(280px, 460px); justify-content: center; text-align: left; }
.games-grid article { padding: 35px; border: 1px solid var(--line); background: var(--bg-soft); }
.games-grid span { color: var(--gold); font-family: "Palatino Linotype", Georgia, serif; font-size: 12px; }
.games-grid h3 { margin: 14px 0 10px; font-family: "Palatino Linotype", Georgia, serif; font-size: 24px; }
.games-grid p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(390px, calc(100% - 48px)); padding: 14px 18px; border: 1px solid var(--line-bright); border-left: 3px solid var(--gold); background: #1a241e; box-shadow: var(--shadow); color: #e8ebe8; font-size: 11px; }
.toast.is-error { border-left-color: var(--danger); }

@media (max-width: 1180px) {
  .guest-layout { grid-template-columns: 1fr 1fr; }
  .hero-stage { order: 3; grid-column: 1 / -1; min-height: 490px; }
  .board-preview { width: min(380px, calc(100vw - 80px)); }
}

@media (max-width: 800px) {
  .site-header, main { width: calc(100% - 28px); }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 76px;
    background: rgba(13, 18, 16, .94);
    backdrop-filter: blur(14px);
  }
  .brand { gap: 10px; min-width: 0; }
  .brand-mark { width: 38px; height: 38px; font-size: 19px; }
  .brand strong { font-size: 17px; letter-spacing: .14em; }
  .brand small { font-size: 7px; letter-spacing: .16em; }
  .menu-toggle { display: grid; }
  .site-header.is-menu-open .menu-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
  .site-header.is-menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.is-menu-open .menu-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
  .site-header nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 28px));
    padding: 10px;
    display: grid;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(18, 26, 22, .98);
    box-shadow: 0 22px 40px rgba(0,0,0,.24);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease;
  }
  .site-header.is-menu-open nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .site-header nav a {
    min-height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    background: rgba(255,255,255,.02);
    color: #dce1dc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
  }
  .site-header nav a:hover,
  .site-header nav a:focus-visible {
    border-color: rgba(214,181,104,.18);
    background: rgba(214,181,104,.08);
    color: var(--gold-light);
    outline: 0;
  }
  .mobile-only { display: flex; }
  .nav-home { padding-left: 14px; border-left: 0; }

  .guest-layout { min-height: auto; grid-template-columns: 1fr; gap: 22px; padding: 26px 0 58px; }
  .hero-copy { order: 1; text-align: center; }
  .hero-copy .eyebrow,
  .hero-lead,
  .hero-actions { display: none; }
  .hero-copy h1 { margin: 0; font-size: 34px; letter-spacing: 0; }
  .hero-copy h1 strong { display: block; }
  .hero-copy h1 em {
    display: block;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    color: var(--gold-light);
    margin-top: 4px;
  }

  .hero-stage { order: 2; grid-column: auto; min-height: auto; perspective: none; padding: 0; }
  .stage-ring { display: none; }
  .board-wrap {
    width: 100%;
    max-width: 100%;
    transform: none;
    justify-self: center;
    filter: drop-shadow(0 22px 28px rgba(0,0,0,.38));
  }
  .board-preview {
    width: min(calc(100vw - 28px), 100%);
    max-width: 100%;
    padding: 10px;
    border-width: 8px;
  }
  .board-label { display: none; }
  .computer-card { display: none; }

  .auth-card { order: 3; width: 100%; margin: 0; padding: 22px 18px; }
  .auth-card h2 { font-size: 24px; }
  .auth-intro { display: none; }
  .auth-note--closed { margin-bottom: 16px; font-size: 10px; }
  .auth-form { gap: 14px; }
  .auth-form label,
  .settings-form label { gap: 8px; }
  .auth-form input,
  .auth-form select,
  .settings-form input,
  .settings-form select { min-height: 50px; }

  .auth-card, .panel-card { padding: 22px 18px; }
  .form-row, .mode-picker { grid-template-columns: 1fr; }
  .mode-picker legend { grid-column: auto; }
  .mode-picker label > span { padding: 14px 12px; }

  .admin-user-row { grid-template-columns: 1fr; }
  .admin-actions { justify-content: stretch; }
  .admin-actions .challenge-button { flex: 1 1 120px; }
  .dashboard-head { gap: 18px; }
  .dashboard-actions { align-items: flex-end; flex-direction: column; }
  .online-pill { display: none; }
  .player-avatar { width: 52px; height: 52px; }
  .dashboard-head h1 { font-size: 22px; }
  .settings-card { padding: 0; }
  .settings-form { grid-template-columns: 1fr; }
  .story-section { padding: 75px 0; }
}

@media (max-width: 800px) {
  .site-header, main { width: calc(100% - 28px); }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 76px;
    background: rgba(13, 18, 16, .94);
    backdrop-filter: blur(14px);
  }
  .brand { gap: 10px; min-width: 0; }
  .brand-mark { width: 38px; height: 38px; font-size: 19px; }
  .brand strong { font-size: 17px; letter-spacing: .14em; }
  .brand small { font-size: 7px; letter-spacing: .16em; }
  .menu-toggle { display: grid; }
  .site-header.is-menu-open .menu-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
  .site-header.is-menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.is-menu-open .menu-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
  .site-header nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 28px));
    padding: 10px;
    display: grid;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(18, 26, 22, .98);
    box-shadow: 0 22px 40px rgba(0,0,0,.24);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease;
  }
  .site-header.is-menu-open nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .site-header nav a {
    min-height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    background: rgba(255,255,255,.02);
    color: #dce1dc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
  }
  .site-header nav a:hover,
  .site-header nav a:focus-visible {
    border-color: rgba(214,181,104,.18);
    background: rgba(214,181,104,.08);
    color: var(--gold-light);
    outline: 0;
  }
  .mobile-only { display: flex; }
  .nav-home { padding-left: 14px; border-left: 0; }

  .guest-layout { min-height: auto; grid-template-columns: 1fr; gap: 22px; padding: 26px 0 58px; }
  .hero-copy { order: 1; text-align: center; }
  .hero-copy .eyebrow,
  .hero-lead,
  .hero-actions { display: none; }
  .hero-copy h1 { margin: 0; font-size: 34px; letter-spacing: 0; }
  .hero-copy h1 strong { display: block; }
  .hero-copy h1 em {
    display: block;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    color: var(--gold-light);
    margin-top: 4px;
  }

  .hero-stage { order: 2; grid-column: auto; min-height: auto; perspective: none; padding: 0; }
  .stage-ring { display: none; }
  .board-wrap {
    width: 100%;
    max-width: 100%;
    transform: none;
    justify-self: center;
    filter: drop-shadow(0 22px 28px rgba(0,0,0,.38));
  }
  .board-preview {
    width: min(calc(100vw - 28px), 100%);
    max-width: 100%;
    padding: 10px;
    border-width: 8px;
  }
  .board-label { display: none; }
  .computer-card { display: none; }

  .auth-card { order: 3; width: 100%; margin: 0; padding: 22px 18px; }
  .auth-card h2 { font-size: 24px; }
  .auth-intro { display: none; }
  .auth-note--closed { margin-bottom: 16px; font-size: 10px; }
  .auth-form { gap: 14px; }
  .auth-form label,
  .settings-form label { gap: 8px; }
  .auth-form input,
  .auth-form select,
  .settings-form input,
  .settings-form select { min-height: 50px; }

  .auth-card, .panel-card { padding: 22px 18px; }
  .form-row, .mode-picker { grid-template-columns: 1fr; }
  .mode-picker legend { grid-column: auto; }
  .mode-picker label > span { padding: 14px 12px; }

  .admin-user-row { grid-template-columns: 1fr; }
  .admin-actions { justify-content: stretch; }
  .admin-actions .challenge-button { flex: 1 1 120px; }
  .dashboard-head { gap: 18px; }
  .dashboard-actions { align-items: flex-end; flex-direction: column; }
  .online-pill { display: none; }
  .player-avatar { width: 52px; height: 52px; }
  .dashboard-head h1 { font-size: 22px; }
  .settings-card { padding: 0; }
  .settings-form { grid-template-columns: 1fr; }
  .story-section { padding: 75px 0; }
}

@media (max-width: 900px) {
  .guest-layout { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
