:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #13141b;
  color: #f3eee9;
  --ink: #f3eee9;
  --muted: #bbb8c5;
  --gold: #e9bd88;
  --lavender: #c5b8eb;
  --border: #525063;
  --surface: #22232e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 14% 9%, #302b3d 0, transparent 52%),
    radial-gradient(ellipse at 91% 30%, #282737 0, transparent 44%), #15161f;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
button:focus-visible, input:focus-visible { outline: 2px solid #eac38f; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: Georgia, serif; font-weight: 600; letter-spacing: -.025em; }
h1 { font-size: clamp(2.45rem, 6vw, 4.15rem); line-height: 1.03; }
h2 { font-size: clamp(1.5rem, 3vw, 2.04rem); line-height: 1.12; }
.site-header { border-bottom: 1px solid #444354; background: #15161ee0; }
.head-inner {
  max-width: 1192px;
  min-height: 72px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  color: #f1e9e1;
  background: transparent;
  font: 600 1.18rem Georgia, serif;
  white-space: nowrap;
}
.logo { width: 37px; height: 37px; }
.release, .room-status, .tag {
  padding: 4px 8px;
  border: 1px solid #655e75;
  border-radius: 4px;
  color: #e0d4f1;
  background: #2a2737;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.profile { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.profile-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .86rem; }
.shell { width: 100%; max-width: 1192px; margin: 0 auto; padding: 52px 24px 54px; flex: 1; }
.entry { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(310px,1fr); gap: 25px; align-items: stretch; }
.intro {
  position: relative;
  min-height: 485px;
  padding: clamp(20px, 4.2vw, 44px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #595266;
  background: radial-gradient(ellipse at 71% 75%, #383145 1%, transparent 65%),
    linear-gradient(143deg,#292535,#1c1c29);
}
.eyebrow { font-size: .68rem; text-transform: uppercase; font-weight: 750; letter-spacing: .13em; color: var(--gold); }
.eyebrow span { margin-right: 5px; font-size: .74em; }
.intro h1, .section-heading h1 { margin: 13px 0 13px; }
.lead { max-width: 44ch; color: #d6d0dc; line-height: 1.52; font-size: .99rem; }
.network-art { flex: 1; display: flex; align-items: center; margin: 13px -18px; }
.network-art svg { width: 100%; min-height: 120px; max-height: 240px; }
.intro-facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.intro-facts div { display: grid; gap: 5px; padding: 9px 4px 0; border-top: 1px solid #74627d; }
.intro-facts strong { color: var(--gold); font: 600 .91rem ui-monospace, monospace; }
.intro-facts span { color: var(--muted); font-size: .77rem; }
.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: linear-gradient(140deg,#292936,#22232e 54%);
  box-shadow: 0 8px 25px #1010184a, inset 0 1px #d4c4f118;
}
.auth-panel { padding: 28px; }
.auth-panel h2 { margin: 18px 0 15px; }
.segments { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 13px 0 0; padding: 4px; border: 1px solid #525063; border-radius: 6px; background: #1a1b25; }
.segments button { border: 1px solid transparent; border-radius: 4px; padding: 8px 7px; color: #ccc6d7; background: transparent; font-size: .84rem; }
.segments button[aria-pressed="true"] { color: #f5e9d7; background: #383041; border-color: #746583; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: #e5deeb; font-size: .84rem; }
input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 8px 10px;
  border: 1px solid #666176;
  border-radius: 5px;
  background: #191a24;
  color: var(--ink);
}
input::placeholder { color: #aca6b9; }
input[readonly] { font-size: .8rem; color: #e2d7f4; }
.field-hint, .muted, .empty, .invite-note { color: var(--muted); line-height: 1.45; font-size: .84rem; }
.field-hint { font-size: .75rem; margin-top: -5px; }
.invite-note { margin: 0 0 14px; color: var(--gold); }
.form-error { color: #ffad9f; font-size: .81rem; line-height: 1.3; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 9px 12px;
  min-height: 41px;
  color: var(--ink);
  border: 1px solid #6c617a;
  border-radius: 5px;
  font-weight: 650;
  font-size: .85rem;
  background: #363144;
}
.button:hover:not(:disabled) { border-color: var(--lavender); background: #423b52; }
.button.primary { color: #211b19; background: #e2b27d; border-color: #f4cea0; }
.button.primary:hover:not(:disabled) { background: #f1c693; border-color: #ffdbb0; }
.button.quiet { color: #ded8e5; background: #22232d; }
.button.wide { width: 100%; }
.section-heading { margin-bottom: 27px; }
.dashboard { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.55fr); gap: 20px; align-items: start; }
.catalog, .side { display: grid; gap: 15px; }
.game-card { overflow: hidden; }
.game-art {
  position: relative;
  min-height: 177px;
  padding: 17px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  background: radial-gradient(ellipse at 50% 111%, #62496255, transparent 78%),
    repeating-linear-gradient(130deg, #43405a30 0 1px, transparent 1px 37px), #2b293d;
  border-bottom: 1px solid #5c5268;
}
.symbols { position: absolute; inset: 20px 10px 12px; display: flex; align-items: center; justify-content: center; gap: 12px; pointer-events: none; }
.symbols i {
  display: grid;
  place-items: center;
  width: clamp(55px, 7vw, 83px);
  height: clamp(59px, 7vw, 83px);
  border: 1px solid #b598bb;
  color: #e8be8c;
  border-radius: 8px;
  background: #302b43;
  box-shadow: 0 6px 18px #19182577;
  font: 1.9rem Georgia, serif;
}
.symbols i:first-child { transform: rotate(-10deg) translateY(7px); }
.symbols i:last-child { transform: rotate(10deg) translateY(7px); }
.game-body { padding: 21px; }
.game-body h2 { margin: 7px 0; }
.game-body p:not(.eyebrow) { margin-bottom: 15px; }
.side-panel { padding: 17px; }
.side-panel h2 { margin: 6px 0 13px; font-size: 1.43rem; }
.room-list { display: grid; gap: 7px; }
.room-item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  background: #262432;
  border: 1px solid #554d63;
  border-radius: 4px;
  color: var(--ink);
  text-align: left;
  font-size: .78rem;
}
.room-item:hover { border-color: #b69ec3; }
.room-item small { color: var(--muted); font-size: .67rem; }
.notice {
  margin: -15px 0 17px;
  padding: 9px 12px;
  border: 1px solid #756987;
  border-radius: 5px;
  color: #eadcf4;
  background: #2a2636;
  font-size: .86rem;
}
.notice.error { color: #ffb7ad; border-color: #9d615c; }
.room-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.match-heading { margin-top: 18px; }
.match-heading h1 { font-size: clamp(2.1rem, 4.9vw, 3.45rem); }
.match-panel { overflow: hidden; }
.arena { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 12px; align-items: center; padding: clamp(12px,3vw,27px); background: #1b1a27; border-bottom: 1px solid #51485e; }
.seat { display: grid; gap: 6px; min-width: 0; padding: 12px; border: 1px solid #574d64; border-radius: 5px; background: #282535; text-align: center; }
.seat strong { font: 600 clamp(.9rem,2.2vw,1.23rem) Georgia, serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-ready { font-size: .73rem; color: var(--muted); }
.score { display: flex; gap: 7px; align-items: center; color: var(--gold); font: 600 clamp(1.4rem,4vw,2.4rem) Georgia, serif; white-space: nowrap; }
.score i { color: #a99bb4; font-style: normal; }
.room-content { display: grid; gap: 14px; justify-items: start; padding: clamp(13px,3vw,28px); }
.room-content label { width: min(100%,560px); }
.room-content h2 { margin: 6px 0 7px; }
.room-content .muted { max-width: 66ch; }
.room-code { font-family: ui-monospace, monospace; letter-spacing: .08em; color: #f5ca95; }
.copy-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.moves { width: min(100%,560px); display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.move { display: grid; justify-items: center; gap: 5px; padding: 12px 4px; border-radius: 6px; border: 1px solid #736481; color: var(--ink); background: #322c41; font-size: .82rem; }
.move span { color: var(--gold); font-size: 1.4rem; }
.move:hover:not(:disabled), .move.selected { border-color: var(--gold); background: #524056; }
.move.selected:disabled { opacity: 1; }
.last-round { margin: 0 clamp(13px,3vw,28px) clamp(13px,3vw,28px); padding: 10px 12px; border-left: 2px solid #bc9572; color: #d7cde3; background: #211e2b; font-size: .85rem; line-height: 1.45; }
.footer { width: 100%; max-width: 1192px; margin: auto; display: flex; justify-content: space-between; gap: 10px; padding: 15px 24px 20px; color: #b5aabd; font-size: .73rem; border-top: 1px solid #423b50; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 790px) {
  .shell { padding: 28px 14px 35px; }
  .head-inner, .footer { padding-left: 14px; padding-right: 14px; }
  .entry, .dashboard { grid-template-columns: 1fr; gap: 13px; }
  .intro { min-height: 0; padding: 21px; }
  .network-art { margin: 4px 0; }
  .network-art svg { max-height: 130px; }
  .auth-panel { padding: 18px; }
}
@media (max-width: 390px) {
  .profile-name { max-width: 57px; }
  .head-inner { gap: 8px; }
  .brand { gap: 5px; font-size: .96rem; }
  .logo { width: 29px; height: 29px; }
  .release { font-size: .56rem; padding: 3px; }
  .seat { padding: 6px; }
  .arena { gap: 5px; }
}
