:root {
  color-scheme: dark;
  --ink: #111720;
  --panel: #19212c;
  --panel-raised: #202a36;
  --paper: #f7f1e5;
  --body: #d7d9d7;
  --muted: #a7adb3;
  --line: #39414a;
  --coral: #ff886d;
  --orange: #ff876b;
  --amber: #e9b977;
  --sans: "Inter", "Segoe UI", Arial, sans-serif;
  --display: "Barlow Condensed", "Bahnschrift Condensed", Impact, "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; min-height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--body);
  font: 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .53; }
button, input, select { color: inherit; }
a { color: var(--coral); text-underline-offset: .22em; }
a:hover { color: var(--paper); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
main:focus { outline: none; }
::selection { color: #14191f; background: var(--amber); }
.shell { width: min(81rem, calc(100% - clamp(2.5rem, 11vw, 11rem))); margin-inline: auto; }
.topbar { background: #10161e; border-bottom: 1px solid var(--line); }
.topbar-inner { height: 4.65rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; gap: .55rem; align-items: center; color: var(--paper); text-decoration: none; }
.brand-mark { width: 1.98rem; height: 1.98rem; position: relative; overflow: hidden; color: transparent; font-size: 0; background: var(--coral); }
.brand-mark::before {
  content: ""; position: absolute; inset: 14%;
  background: var(--ink);
  clip-path: polygon(0 13%,24% 13%,24% 47%,67% 13%,100% 13%,53% 52%,100% 91%,64% 91%,24% 59%,24% 91%,0 91%);
}
.brand-name { font-family: var(--display); font-size: 2rem; font-weight: 900; line-height: 1; letter-spacing: -.025em; }
.topnav { display: flex; align-items: center; gap: 1rem; }
.nav-link { border: 0; background: transparent; color: var(--body); font-size: .91rem; font-weight: 600; padding: .6rem 0 .6rem .5rem; }
.nav-link:hover { color: var(--orange); }
.skip-link { position: absolute; z-index: 20; left: 1rem; top: -8rem; padding: .7rem 1rem; background: var(--paper); color: var(--ink); }
.skip-link:focus { top: .7rem; color: var(--ink); }

.hero { display: grid; grid-template-columns: minmax(0, .89fr) minmax(0, 1.11fr); align-items: center; gap: clamp(2rem,4.7vw,5.6rem); padding-block: clamp(2.5rem,5vw,5.4rem); }
.hero-copy { min-width: 0; }
.eyebrow {
  display: flex; align-items: center; gap: .65rem; margin: 0 0 1.4rem;
  color: var(--amber); font: 600 .8rem/1.4 var(--mono); letter-spacing: .11em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 1.75rem; height: 2px; background: var(--amber); flex-shrink: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--paper); }
.hero-title {
  margin: 0; font: 900 clamp(3.55rem,6.7vw,6.9rem)/.95 var(--display); letter-spacing: -.045em;
  text-transform: uppercase;
}
.hero-title span { display: block; }
.hero-lead { max-width: 32rem; margin: 1.35rem 0 1.8rem; color: #c4c7c9; font-size: clamp(1rem,1.35vw,1.18rem); line-height: 1.58; }
label { display: block; color: var(--paper); font-size: .91rem; font-weight: 600; line-height: 1.4; }
.hero-actions, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.hero-actions { margin-top: .55rem; }
.button, .workspace button:not(.nav-link), .workspace a.button {
  min-height: 2.8rem; padding: .62rem 1.1rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #54606b; border-radius: .24rem; background: var(--panel-raised); color: var(--paper);
  font: 650 .92rem/1.25 var(--sans); text-align: center; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.button:hover, .workspace button:not(:disabled):hover, .workspace a.button:hover {
  color: var(--paper); background: #2c3947; border-color: #92999c;
}
.button.primary, .workspace .button.primary {
  border-color: var(--orange); background: var(--orange); color: #201918; font-weight: 750;
}
.button.primary:hover:not(:disabled), .workspace .button.primary:hover:not(:disabled) {
  border-color: #ffab90; background: #ffab90; color: #17191c;
}
.hero-actions .button { min-height: 3.2rem; padding-inline: 1.65rem; }
.seat-control {
  height: 3.2rem; display: inline-grid; grid-template-columns: 2.55rem 2.4rem 2.55rem; align-items: stretch;
  border: 1px solid #58616a; background: #1b2430; border-radius: .24rem;
}
.seat-control button { border: none; background: transparent; color: var(--paper); padding: 0; font: 1.2rem/1 var(--mono); }
.seat-control button:hover:not(:disabled) { background: #2b3741; }
.seat-control button:disabled { opacity: .46; }
.seat-control input, .seat-control output {
  width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--paper); text-align: center;
  font: 600 1.03rem var(--mono); appearance: textfield; -moz-appearance: textfield;
}
.seat-control input::-webkit-inner-spin-button, .seat-control input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.form-help { margin: .75rem 0 0; font-size: .85rem; line-height: 1.5; }
.muted { color: var(--muted); }
.hero-art {
  position: relative; overflow: hidden; aspect-ratio: 1.39; background: #a86550;
  outline: 1px solid rgb(255 247 218 / 18%); outline-offset: -1px;
}
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-art::after {
  content: ""; position: absolute; inset: .72rem; pointer-events: none;
  background:
    linear-gradient(#f6ce9a,#f6ce9a) top left / 14px 1px,
    linear-gradient(#f6ce9a,#f6ce9a) top left / 1px 14px,
    linear-gradient(#f6ce9a,#f6ce9a) bottom right / 14px 1px,
    linear-gradient(#f6ce9a,#f6ce9a) bottom right / 1px 14px;
  background-repeat: no-repeat; opacity: .75;
}
.rules-overview { padding: clamp(1.7rem,2.4vw,2.5rem) 0 clamp(2.7rem,5vw,5rem); border-top: 1px solid var(--line); }
.section-head, .dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-head { margin-bottom: 1.4rem; }
.section-head h2, .dialog-head h2 { margin: 0; font: 750 clamp(1.5rem,2vw,2.1rem)/1.14 var(--sans); letter-spacing: -.045em; }
.section-head > .muted { font: 500 .81rem/1.2 var(--mono); color: var(--amber); border: 1px solid #5a4f40; border-radius: .15rem; padding: .32rem .55rem; }
.rule-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.rule-card, .panel {
  min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: .28rem;
}
.rule-card { padding: 1.2rem 1.35rem 1.3rem; }
.rule-card::before {
  content: ""; display: block; height: 1.4rem; width: 1.4rem; margin-bottom: .85rem; background-color: var(--amber);
  mask: var(--icon) center / contain no-repeat;
}
.rule-card:nth-child(1) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M3 7h15m-4-4 4 4-4 4M21 17H6m4-4-4 4 4 4'/%3E%3C/svg%3E"); }
.rule-card:nth-child(2) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='m10 3 8 3-3 8-8-3 3-8Zm1 12h8l2 5H3l2-5h2m5-7 1 2 3-2'/%3E%3C/svg%3E"); }
.rule-card:nth-child(3) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 21V4m1 1c3-4 6 3 11 0v9c-5 3-8-4-11 0'/%3E%3C/svg%3E"); }
.rule-card h3, .panel h2, .panel h3 { margin: 0 0 .55rem; font-size: 1.12rem; line-height: 1.3; letter-spacing: -.02em; }
.rule-card p, .panel p { color: #bdc3c6; }
.rule-card p { margin-bottom: 0; font-size: .95rem; line-height: 1.55; }

.workspace { padding-block: clamp(2rem,4vw,4rem); }
.room-head { display: flex; justify-content: space-between; align-items: flex-end; gap: .9rem; flex-wrap: wrap; padding-bottom: 1.35rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.room-head .eyebrow { margin-bottom: .75rem; }
.room-head h1 { margin: 0; font: 850 clamp(2.4rem,5vw,4.4rem)/1 var(--display); text-transform: uppercase; letter-spacing: -.025em; }
.room-head p:last-child { margin-bottom: 0; }
.room-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.1rem; align-items: start; }
.span-all { grid-column: 1 / -1; }
.panel { padding: clamp(1.1rem,2.2vw,1.75rem); }
.panel h2 { font-size: 1.28rem; }
.panel p:last-child, .panel > :last-child { margin-bottom: 0; }
.panel > :first-child { margin-top: 0; }
.panel label { margin-bottom: .4rem; }
.workspace input, .workspace select {
  border: 1px solid #57616c; border-radius: .2rem; min-height: 2.8rem; padding: .5rem .76rem; background-color: #111922;
  font-size: 1rem; max-width: 100%;
}
.workspace select {
  appearance: none; padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23e4c49c' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .72rem center;
}
.seat-list, .events { list-style: none; margin: 0; padding: 0; }
.seat-row { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.seat-row:first-child, .events li:first-child { border-top: 0; }
.chip { display: inline-flex; border: 1px solid #655740; border-radius: .18rem; padding: .25rem .52rem;
  color: var(--amber); font: 500 .83rem/1.3 var(--mono); vertical-align: middle; }
.chip.phase { color: #ffb79d; border-color: #785349; background: #392b2c; }
.room-status, .role-badges, .scoreline { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.scoreline { margin-block: .9rem 1.1rem; }
.scoreline span { display: inline-flex; gap: .85rem; align-items: center; padding: .29rem .65rem; background: #101923; border: 1px solid var(--line); font-size: .89rem; }
.scoreline strong { color: var(--amber); font: 650 1.03rem var(--mono); }
.role-badges { margin: .85rem 0 1.4rem; }
.role-panel { border-top: 2px solid #e8ad77; }
.role-panel > h2 { font: 850 clamp(2.2rem,4vw,3rem)/1.1 var(--display); text-transform: uppercase; }
.room-grid .eyebrow, .result .eyebrow { font-size: .76rem; margin-bottom: .65rem; }
.room-grid .eyebrow::before, .result .eyebrow::before { width: 1rem; }
.inline-form, .action-form { margin-top: 1.35rem; }
.inline-form, .action-form + .action-form { padding-top: 1.2rem; border-top: 1px solid var(--line); }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.action-form label { margin-bottom: .75rem; }
.action-form label :is(input,select) { width: 100%; margin-top: .35rem; display: block; font-weight: 400; }
.seat-panel .section-head { margin: 0 0 .6rem; }
.seat-panel .section-head h2, .room-grid .section-head h2 { margin: 0; }
.seat-row .button { min-height: 2.45rem; padding: .45rem .66rem; font-size: .88rem; }
.workspace .button.subtle { background: transparent; border-color: transparent; color: var(--amber); }
.panel.result { margin-bottom: 1.1rem; background: #2f2927; border-color: #8f6e54; }
.result h2 { line-height: 1.45; }
.empty { font-size: .94rem; }
.connection-banner { padding: .7rem .9rem; margin-block: 1rem 0; color: #ffd2be; background: #382728; border: 1px solid #9a6756; }
.notice.is-error { border-color: var(--coral); background: #392b2c; }
.events li { padding: .66rem 0; border-top: 1px solid var(--line); font-size: .94rem; }
.notice {
  position: fixed; z-index: 12; bottom: 1.2rem; left: 50%; transform: translateX(-50%); width: max-content;
  max-width: calc(100% - 2rem); padding: .9rem 1.2rem; background: #29323b; color: var(--paper);
  border: 1px solid #8a7b67; border-left: 3px solid var(--amber); border-radius: .25rem; box-shadow: 0 .5rem 1.5rem #0005;
}
.dialog { padding: clamp(1.35rem,3vw,2.25rem); width: min(40rem,calc(100% - 2rem)); max-height: 85dvh;
  background: var(--panel); border: 1px solid #56616b; border-radius: .36rem; color: var(--body); }
.dialog::backdrop { background: rgb(7 11 16 / 78%); }
.dialog-head { padding-bottom: 1rem; margin-bottom: 1.35rem; border-bottom: 1px solid var(--line); }
.rule-lines h3 { margin: 1.15rem 0 .25rem; color: var(--amber); font-size: 1.02rem; }
.rule-lines p { margin-bottom: .55rem; }

@media (min-width: 1500px) { .hero { padding-block: 4.6rem; } }
@media (max-width: 950px) and (min-width: 701px) {
  .shell { width: calc(100% - 3.2rem); }
  .hero { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.8rem; }
  .hero-art { aspect-ratio: .99; } .hero-art img { object-position: 45% center; }
  .hero-title { font-size: clamp(3.45rem,6.6vw,4.25rem); }
  .hero-lead { margin: 1.05rem 0 1.35rem; }
  .rule-card { padding: .95rem; }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 2.5rem); }
  .topbar-inner { height: 3.8rem; }
  .brand-name { font-size: 1.72rem; }
  .brand-mark { width: 1.7rem; height: 1.7rem; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 1.65rem; padding-block: 1.9rem; }
  .hero-title { font-size: clamp(3.55rem,12.7vw,5.1rem); }
  .hero-title span { display: inline; }
  .eyebrow { margin-bottom: .9rem; }
  .hero-lead { margin: .95rem 0 1.15rem; }
  .hero-art { aspect-ratio: 1.88; }
  .hero-art img { object-position: 50% 43%; }
  .rule-grid, .room-grid { grid-template-columns: minmax(0,1fr); gap: .75rem; }
  .rule-card { padding: 1rem 1.08rem; display: grid; grid-template-columns: 1.5rem 1fr; column-gap: .8rem; }
  .rule-card::before { grid-row: span 2; margin-top: .03rem; }
  .rule-card h3 { margin-bottom: .24rem; }
  .rule-card p { grid-column: 2; } .rules-overview { padding-block: 1.55rem 2.3rem; }
  .section-head { margin-bottom: 1rem; } .workspace { padding-block: 1.6rem; }
  .span-all { grid-column: auto; }
  .seat-row { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .shell { width: calc(100% - 1.75rem); }
  .hero-actions .button { padding-inline: 1rem; }
  .seat-control { grid-template-columns: 2.2rem 1.9rem 2.2rem; }
  .topnav { gap: .4rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; } }
