:root {
  color-scheme: dark;
  --bg: #101b2a;
  --bg2: #142335;
  --panel: #1b2b3c;
  --line: #34475a;
  --ink: #f5f0e7;
  --muted: #b4c3cf;
  --gold: #f3c781;
  --green: #8bd6b2;
  --danger: #ffa99d;
  --radius: 19px;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 75% 0, #233d51 0, transparent 45%), var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
a {
  color: var(--gold);
  text-underline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.025em;
}
h1 {
  font-size: clamp(2rem, 5vw, 4.8rem);
  font-weight: 790;
}
h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.5rem);
  font-weight: 730;
}
h3 {
  font-size: 1.16rem;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-weight: 780;
  color: var(--gold);
}
.wrap {
  width: min(1200px, 100% - 36px);
  margin: auto;
  padding: 30px 0 50px;
}
.narrow {
  width: min(760px, 100% - 28px);
  margin: auto;
  padding: 18px 0 48px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px max(18px, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid #ffffff16;
  background: #101b2add;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.brand {
  font-weight: 850;
  letter-spacing: 0.13em;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}
.mark {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: var(--gold);
  color: #142335;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  padding-top: 8px;
  font-weight: 950;
  font-size: 0.8rem;
}
.top .tag {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.topnav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}
.pill.live {
  color: var(--green);
  border-color: #8bd6b253;
}
.clock {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: clamp(1.65rem, 4vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--gold);
}
.clock.expired {
  color: var(--danger);
}
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #22354990, #172637db);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 10px 35px #070d151a;
}
.panel.soft {
  background: #162435;
  border-color: #2e4154;
}
.panel.gold {
  border-color: #e9bf7260;
  background: linear-gradient(135deg, #493b2a90, #19283b);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
  gap: 18px;
}
.gap {
  height: 18px;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 1px solid #536779;
  background: #253b50;
  color: var(--ink);
  text-decoration: none;
  padding: 12px 17px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.91rem;
  min-height: 43px;
  transition:
    background 0.15s,
    transform 0.15s;
}
.btn:hover:not(:disabled) {
  background: #355169;
  transform: translateY(-1px);
}
.btn.primary {
  color: #172434;
  background: var(--gold);
  border-color: var(--gold);
}
.btn.primary:hover:not(:disabled) {
  background: #ffdc9e;
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
}
.btn.danger {
  color: var(--danger);
  border-color: #ffa99d44;
  background: transparent;
}
.btn.big {
  padding: 16px 22px;
  font-size: 1.06rem;
}
.btn.full {
  width: 100%;
}
.btn.tiny {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.76rem;
}
.field {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--muted);
}
input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  border: 1px solid #4b6075;
  background: #101c2b;
  border-radius: 10px;
  padding: 12px;
  min-height: 44px;
}
textarea {
  resize: vertical;
  min-height: 86px;
}
select option {
  background: #132234;
}
label.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 13px 14px;
  background: #18283a;
  border: 1px solid #43576b;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  transition: border-color 0.15s;
}
label.choice:hover {
  border-color: var(--gold);
}
label.choice:has(input:checked) {
  border-color: var(--gold);
  background: #413a2b;
}
label.choice input {
  width: 17px;
  height: 17px;
  min-height: 0;
  flex: none;
  accent-color: var(--gold);
  margin-top: 3px;
}
.choice-list {
  display: grid;
  gap: 9px;
}
.option {
  display: flex;
  text-align: left;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #476073;
  background: #1a2b3d;
  color: var(--ink);
  border-radius: 13px;
  padding: 16px;
  font-weight: 600;
  line-height: 1.45;
  width: 100%;
  transition:
    border 0.15s,
    transform 0.15s;
}
.option:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.letter {
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid #52667a;
  color: var(--gold);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
  font-weight: 800;
}
.progress {
  height: 7px;
  border-radius: 999px;
  background: #ffffff14;
  overflow: hidden;
}
.progress > div {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.25s;
}
.steps {
  display: flex;
  gap: 4px;
  overflow: hidden;
}
.step {
  height: 6px;
  flex: 1;
  background: #ffffff17;
  border-radius: 3px;
}
.step.past {
  background: var(--green);
}
.step.current {
  background: var(--gold);
}
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid #ffffff25;
  background: #172e43;
  min-height: 350px;
  display: grid;
  align-content: end;
  padding: 34px;
  isolation: isolate;
}
.hero h1,
.hero h2 {
  position: relative;
  text-wrap: balance;
}
.hero .art {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.88;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0a1524 3%, #0a1524a0 38%, #0a15241a 85%);
  z-index: -1;
}
.hero.home {
  min-height: 415px;
}
.hero.home h1 {
  font-size: clamp(3.4rem, 10vw, 7.8rem);
  letter-spacing: -0.075em;
  font-weight: 900;
  line-height: 0.88;
}
.hero.home p {
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  max-width: 720px;
}
.hero.story {
  min-height: 265px;
  padding: 23px;
}
.hero.story h1 {
  font-size: clamp(2rem, 6vw, 3.8rem);
}
.hero .eyebrow {
  color: var(--accent, var(--gold));
  margin-bottom: 7px;
}
.artbox {
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  height: 90px;
  background: #183044;
}
.artbox svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team {
  border: 1px solid color-mix(in srgb, var(--team) 50%, transparent);
  border-top: 4px solid var(--team);
  padding: 16px;
  background: #1a2c3f;
  border-radius: 13px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.team h3 {
  color: var(--team);
}
.person {
  padding: 6px 9px;
  border-radius: 9px;
  background: #ffffff0c;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.person .ok {
  color: var(--green);
}
.person .pending {
  color: var(--muted);
}
.code {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.15em;
  font-size: clamp(2.4rem, 8vw, 6.5rem);
  line-height: 1.1;
  color: var(--gold);
}
.join-url {
  font-weight: 700;
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 2.5vw, 1.8rem);
}
.projection {
  width: min(1450px, 100% - 44px);
  margin: 0 auto;
  padding: 26px 0 46px;
}
.projection .team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 15px;
}
.projection .team h3 {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
}
.projection .person {
  font-size: clamp(0.9rem, 1.5vw, 1.25rem);
}
.projection .panel {
  padding: 24px;
}
.projection h2 {
  font-size: clamp(1.7rem, 4vw, 3.1rem);
}
.projection .hero {
  min-height: 230px;
}
.projection .lobby-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.stage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.stage-head h1 {
  font-size: clamp(1.8rem, 4vw, 3.3rem);
}
.stat {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--green);
}
.barrow {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(90px, 1fr) 45px;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
}
.barpair {
  display: grid;
  gap: 4px;
}
.bar {
  height: 10px;
  border-radius: 6px;
  background: #ffffff10;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: #8aa8cf;
  border-radius: 6px;
}
.bar.after i {
  background: var(--gold);
}
.storytext {
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.75;
  white-space: pre-line;
}
.resource {
  padding: 10px 13px;
  border: 1px solid #8bd6b24c;
  border-left: 3px solid var(--green);
  background: #15382f55;
  border-radius: 10px;
  font-size: 0.87rem;
}
.rule {
  padding: 15px;
  background: #101d2b;
  border-left: 3px solid var(--gold);
  border-radius: 7px;
  line-height: 1.6;
}
.divider {
  border: 0;
  border-top: 1px solid #ffffff16;
  width: 100%;
  margin: 2px 0;
}
.callout {
  font-size: 0.9rem;
  line-height: 1.5;
  border-left: 3px solid var(--gold);
  padding: 9px 12px;
  background: #f3c78110;
  border-radius: 7px;
}
.warning {
  border-color: var(--danger);
  background: #ffa99d10;
}
.center {
  text-align: center;
}
.resultcard {
  border-left: 4px solid var(--team, var(--gold));
  padding: 17px;
  background: #142333;
  border-radius: 12px;
  display: grid;
  gap: 10px;
}
.themechip {
  color: var(--accent, var(--gold));
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tagline {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
}
.cardbutton {
  border: 1px solid #40576d;
  background: #1a2d41;
  color: var(--ink);
  text-align: left;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  cursor: pointer;
  width: 100%;
}
.cardbutton:hover {
  border-color: var(--gold);
}
.cardbutton > div:last-child {
  padding: 15px;
  display: grid;
  gap: 7px;
}
.cardbutton h3 {
  font-size: 1.15rem;
}
.linkbutton {
  background: none;
  border: none;
  color: var(--gold);
  text-decoration: underline;
  padding: 0;
  font-weight: 600;
}
.footer {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
  padding: 16px;
}
.hidden {
  display: none !important;
}
#toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  z-index: 100;
  background: #f3c781;
  color: #162433;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 30px #0007;
  display: none;
}
#toast.show {
  display: block;
}
.enter {
  animation: enter 0.25s ease-out;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 760px) {
  .wrap,
  .projection {
    width: calc(100% - 24px);
    padding: 18px 0 40px;
  }
  .layout,
  .grid.three,
  .projection .lobby-hero {
    grid-template-columns: 1fr;
  }
  .grid {
    gap: 10px;
  }
  .panel {
    padding: 16px;
  }
  .top {
    padding: 11px 12px;
    gap: 7px;
  }
  .top .tag {
    display: none;
  }
  .topnav .pill {
    font-size: 0.66rem;
  }
  .hero {
    min-height: 310px;
    padding: 22px;
  }
  .hero.home {
    min-height: 360px;
  }
  .hero.story {
    min-height: 220px;
  }
  .projection .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .barrow {
    grid-template-columns: minmax(90px, 1fr) minmax(70px, 1fr) 38px;
  }
  .top .btn.tiny {
    font-size: 0.7rem;
    padding: 5px 7px;
  }
  .narrow {
    padding-top: 13px;
  }
  .projection .panel {
    padding: 16px;
  }
}
@media (max-width: 420px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .projection .team-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero.home h1 {
    font-size: 3.7rem;
  }
  .top .brand {
    font-size: 0.82rem;
  }
  .topnav {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
