:root {
  color-scheme: dark;
  --bg: #101820;
  --bar: #111b25;
  --panel: #17232e;
  --input: #111c26;
  --line: #2c3c48;
  --text: #f0ebdf;
  --muted: #aab7be;
  --gold: #e7c794;
  --cyan: #9ddbd0;
  --blue: #a2cef1;
  --red: #f2a9a2;
  --display: "Noto Serif SC", "Songti SC", SimSun, Georgia, serif;
  --body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Inter", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 51% 0%, #1b2b34 0%, transparent 62%), var(--bg);
  color: var(--text);
  font: 15px/1.65 var(--body);
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
button:focus-visible, a:focus-visible, input:focus, textarea:focus, summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { font-weight: 700; }
.topbar { background: #111a23f2; border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1264px; padding: 0 32px; height: 72px; margin: auto; display: flex; align-items: center; gap: 54px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .08em; line-height: 1.12; white-space: nowrap; }
.brand small { display: block; color: #aeb7b6; font-size: 8px; letter-spacing: .24em; margin-top: 6px; }
.brand-mark { display: grid; place-items: center; color: var(--gold); background: #c9a26b19; border: 1px solid #c49a5e66; border-radius: 9px; width: 36px; height: 36px; font-size: 20px; }
.main-nav { display: flex; align-self: stretch; gap: 28px; align-items: stretch; font-size: 13px; white-space: nowrap; }
.main-nav a { display: grid; place-items: center; border-bottom: 2px solid transparent; color: var(--muted); padding-inline: 3px; }
.main-nav a:hover, .main-nav .active { color: var(--gold); }
.main-nav .active { border-bottom-color: var(--gold); }
.host-link { margin-left: auto; }
.host-link span { color: var(--gold); }
.shell { width: min(1264px, 100%); margin: 0 auto; padding: 42px 32px 54px; flex: 1; }
.landing { display: grid; grid-template-columns: minmax(0, 2.03fr) minmax(285px, 1fr); gap: 20px; align-items: stretch; }
.hero {
  min-height: 452px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  isolation: isolate;
  border-radius: 18px;
  border: 1px solid #3c4c51;
  background:
    radial-gradient(ellipse at 79% 47%, #52635a69, transparent 55%),
    radial-gradient(ellipse at 9% 83%, #23443b65, transparent 48%),
    linear-gradient(142deg, #192a34, #101c25 66%, #1c2d31);
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #13232bea 0%, #13232ba0 33%, transparent 68%); pointer-events: none; }
.hero-content { padding: 38px clamp(26px, 4.2vw, 65px); }
.eyebrow { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .14em; display: flex; align-items: center; gap: 9px; }
.eyebrow > span { width: 7px; height: 7px; border: 1px solid var(--gold); transform: rotate(45deg); }
.hero h1 { font: 700 clamp(3.5rem, 6.6vw, 5.6rem)/1.15 var(--display); letter-spacing: -.055em; margin: 20px 0 16px; }
.hero h1 span { color: var(--gold); }
.hero p { color: #d3dedc; font-size: clamp(.94rem, 1.4vw, 1.13rem); line-height: 1.85; letter-spacing: .05em; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 27px; }
.hero-stats span { display: inline-flex; align-items: center; gap: 7px; color: #dfebec; font-size: 12px; padding: 5px 10px; border-radius: 6px; background: #101c24bb; border: 1px solid #59727670; }
.hero-stats i, .waiting i, .online i, .offline i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--cyan); flex-shrink: 0; }
.hero-stats span:nth-child(2) i, .offline i { background: var(--red); }
.orbit { --orb-size: clamp(355px, 47vw, 620px); position: absolute; left: 65%; top: 49%; width: var(--orb-size); height: var(--orb-size); transform: translate(-43%, -50%); z-index: -2; }
.orbit-grid { position: absolute; inset: -50px; opacity: .48; background-image: radial-gradient(circle, #9faea389 .8px, transparent 1px), linear-gradient(#a8ccbd13 1px, transparent 1px), linear-gradient(90deg, #a8ccbd13 1px, transparent 1px); background-size: 43px 43px, 43px 43px, 43px 43px; mask-image: radial-gradient(ellipse, #000 23%, transparent 68%); }
.orbital-lines {
  position: absolute; inset: 6%; border-radius: 50%; opacity: .83;
  background:
    radial-gradient(circle, transparent 17%, #deba7775 17.2%, transparent 17.55%, transparent 26%, #a8c2a45e 26.15%, transparent 26.45%, transparent 34.7%, #edc38089 35%, transparent 35.25%, transparent 40%, #b99c6b90 40.2%, transparent 40.55%, transparent 47%, #dabb6f54 47.15%, transparent 47.55%, transparent 57%, #9aaa9d52 57.2%, transparent 57.5%, transparent 65%, #beab7b35 65.12%, transparent 65.5%),
    repeating-conic-gradient(from 0deg, #b6c7ac38 0deg .26deg, transparent .35deg 22.5deg);
  mask-image: radial-gradient(circle, #000 47%, #0009 65%, transparent 71%);
}
.orbital-lines::before, .orbital-lines::after { content: ""; position: absolute; width: 52%; height: 52%; border: 1px solid #e6c38c45; inset: 24%; transform: rotate(45deg); }
.orbital-lines::after { transform: rotate(22.5deg); border-color: #d6c5a526; }
.orbital-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 20%; height: 20%; display: grid; place-items: center; }
.orbital-core i { position: absolute; width: 66%; height: 66%; border: 1px solid #e1c68a80; transform: rotate(45deg); box-shadow: 0 0 24px #ecc27222, inset 0 0 20px #b893481c; }
.orbital-core i:last-child { width: 83%; height: 83%; border-color: #e1c68a33; }
.orbital-core b { color: #ffe1aa; font: 400 clamp(37px, 6vw, 75px)/1 Georgia, serif; text-shadow: 0 0 30px #e4be75b8; }
.orbital-seat { position: absolute; width: 26px; height: 26px; translate: -50% -50%; display: grid; place-items: center; border-radius: 50%; border: 1px solid #d3b67a8f; background: #213032; color: #e0c89d; font: 10px "IBM Plex Mono", Consolas, monospace; }
.s1 { left: 50%; top: 18%; } .s2 { left: 72.63%; top: 27.37%; }
.s3 { left: 82%; top: 50%; } .s4 { left: 72.63%; top: 72.63%; }
.s5 { left: 50%; top: 82%; } .s6 { left: 27.37%; top: 72.63%; }
.s7 { left: 18%; top: 50%; } .s8 { left: 27.37%; top: 27.37%; }
.star { position: absolute; color: #ecd3a4; opacity: .73; }
.star-one { left: 28%; top: 20%; } .star-two { left: 80%; top: 33%; font-size: 10px; } .star-three { left: 69%; top: 80%; font-size: 15px; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.entrance { padding: 24px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border: 1px solid var(--line); padding: 4px; background: var(--input); border-radius: 9px; }
.tabs a { text-align: center; white-space: nowrap; color: var(--muted); border-radius: 6px; padding: 6px 8px; font-size: 13px; font-weight: 600; }
.tabs a.selected { background: #2e4148; color: #edf6f3; }
.entry-copy { margin: 15px 0 13px; }
.entry-copy h2 { font-size: 23px; }
.entry-copy p, .panel p { color: var(--muted); }
.entry-copy p { font-size: 13px; margin-top: 2px; }
.join-form, .restore-form { display: grid; gap: 10px; }
.restore-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
label { display: block; font-size: 13px; color: #d6e1e1; }
input, textarea { width: 100%; display: block; color: var(--text); background: var(--input); border-radius: 8px; border: 1px solid #384c58; padding: 8px 10px; margin-top: 4px; }
input { height: 38px; }
textarea { min-height: 88px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8d9ea8; }
.join-form input[name="room"], .join-form input[name="invite"] { text-transform: uppercase; letter-spacing: .045em; }
.join-form input::placeholder { text-transform: none; letter-spacing: normal; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 700; line-height: 1.3; }
.button span { font-size: 15px; }
.wide { width: 100%; }
.primary { background: var(--cyan); border-color: var(--cyan); color: #102522; }
.primary:hover:enabled { background: #b9eee4; }
.entrance .primary { min-height: 41px; margin-top: 3px; justify-content: space-between; }
.outline { background: #24333e75; border-color: #43545e; color: #e3e8e7; }
.outline:hover { background: #30444d; }
.danger { border-color: #a96560; background: #663c3d; color: #ffe9e6; }
.danger:hover:enabled { background: #805050; }
.form-error { margin-top: 8px; font-size: 13px; color: var(--red) !important; }
.saved { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; font-size: 11px; color: var(--muted); }
.saved > span { flex-basis: 100%; }
.saved a { color: #dce7e4; border: 1px solid var(--line); padding: 2px 6px; border-radius: 5px; }
.saved a:hover { border-color: var(--cyan); }
.saved b { color: var(--cyan); margin-left: 4px; }
.landing-missions { margin-top: 33px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.section-heading h2 { font-size: 24px; line-height: 1.35; margin-top: 3px; }
.muted { color: var(--muted); }
.text-link, .back { color: var(--gold); font-size: 13px; white-space: nowrap; }
.text-link:hover, .back:hover { text-decoration: underline; }
.mission-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.mission { background: #17232d; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.mission-top { display: flex; justify-content: space-between; gap: 4px; color: var(--gold); font: 700 11px/1.2 var(--body); letter-spacing: .09em; }
.mission-top span:last-child { font-size: 14px; }
.mission strong, .mission small { display: block; margin-top: 4px; }
.mission strong { font-size: 14px; }
.mission small { font-size: 11px; color: var(--muted); }
.mission.success { background: #1b353e; border-color: #5f9ab0; }
.mission.failure { background: #3c2a30; border-color: #a66968; }
.mission.current { border-color: #bca47d; }
.mission.success .mission-top { color: var(--blue); }
.mission.failure .mission-top { color: var(--red); }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer > div { width: min(1264px, 100%); margin: auto; padding: 15px 32px; display: flex; justify-content: space-between; }
.footer a:hover { color: var(--gold); }
.page-intro { margin: 16px 0 24px; }
.page-intro h1, .room-title h1 { margin: 3px 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.25; }
.page-intro p { color: var(--muted); margin-top: 9px; }
.rules-layout, .room-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; gap: 16px; margin-top: 18px; }
.rule-card, .room-panel { padding: 19px; min-width: 0; }
.rule-card h2, .room-panel h2 { font-size: 19px; }
.rule-card ol { padding-left: 24px; margin: 11px 0 0; color: #c9d5d6; }
.rule-card li + li { margin-top: 8px; }
.role-list { display: grid; gap: 10px; margin-top: 12px; }
.role-row, .identity { display: flex; gap: 10px; align-items: flex-start; }
.role-row + .role-row { border-top: 1px solid var(--line); padding-top: 9px; }
.role-row small { font-weight: 400; color: var(--muted); }
.role-row p { font-size: 13px; }
.role-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; font-size: 18px; }
.role-icon.blue, .seat-number.blue { color: var(--blue); background: #334b63; }
.role-icon.red, .seat-number.red { color: var(--red); background: #583b44; }
.room-top, .room-title, .room-tools, .status-line, .actions, .panel-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.room-top { justify-content: space-between; align-items: end; margin-bottom: 12px; }
.room-title { margin-top: 4px; }
.room-code { border-radius: 6px; border: 1px solid #665940; background: #332d24; padding: 4px 7px; color: var(--gold); font-family: "IBM Plex Mono", Consolas, monospace; }
.room-code span { padding-left: 4px; }
.status-line { justify-content: space-between; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.status-line > div { display: flex; gap: 13px; }
.online i, .offline i { margin: 0 6px 2px 0; }
.blue-text { color: var(--blue) !important; }
.red-text { color: var(--red) !important; }
.room-main, .room-side { display: grid; min-width: 0; gap: 12px; }
.panel-heading { justify-content: space-between; margin-bottom: 9px; }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 11px; white-space: nowrap; color: var(--muted); }
.seat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seat { display: flex; align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; background: #13202b; }
.seat.speaking { border-color: #c6a879; }
.seat-number { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 6px; background: #2b3d49; color: #c2d4d6; font: 12px "IBM Plex Mono", Consolas, monospace; flex: 0 0 auto; }
.seat-name { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.seat-name > strong, .seat-name > small { display: block; }
.seat-name strong { font-size: 13px; }
.seat-name small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.seat-pill { font-size: 10px; white-space: nowrap; color: var(--gold); }
.mini { border: 1px solid #49616b; border-radius: 6px; padding: 4px; background: transparent; color: var(--cyan); font-size: 10px; white-space: nowrap; }
.mini:hover { background: #30444d; }
.waiting { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.actions, .room-panel > button { margin-top: 10px; }
.small-label { font-weight: 700; font-size: 11px; color: var(--gold); letter-spacing: .09em; }
.identity { align-items: center; margin: 10px 0; line-height: 1.24; }
.identity h3 { font-size: 19px; }
.identity div > span { font-size: 11px; }
.clues { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.clues > span { color: var(--muted); font-size: 11px; width: 100%; }
.clues > div { background: #253a43; border-radius: 5px; padding: 3px 6px; font-size: 12px; }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 9px 0; }
.choice { text-align: left; color: var(--text); background: var(--input); border: 1px solid #455765; min-width: 0; border-radius: 7px; padding: 6px; overflow-wrap: anywhere; }
.choice.chosen { background: #2b494d; color: #e7fffa; border-color: var(--cyan); }
.choice span, .choice strong { display: block; font-size: 12px; }
.choice span { color: var(--muted); }
.team-line { color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.textarea-label { margin-top: 8px; }
.host-note p { margin-top: 3px; font-size: 13px; }
.event-list { list-style: none; padding: 0 6px 0 0; margin: 8px 0 0; max-height: 450px; overflow: auto; }
.event-list li { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.event-list li:last-child { border-bottom: 0; }
.event-list time { color: #a9b9bd; font-family: Consolas, monospace; align-self: start; }
.event-list li span { color: #d5e1e0; white-space: pre-wrap; overflow-wrap: anywhere; }
details { border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; }
summary { cursor: pointer; font-size: 12px; color: var(--gold); }
summary span { float: right; color: var(--muted); }
.proposals { max-height: 220px; overflow: auto; }
.proposals article { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.proposals article:last-child { border-bottom: 0; }
.result.blue { background: #1f3b49; border-color: #6496ad; }
.result.red { background: #442e37; border-color: #9c666c; }
.result h2 { margin-top: 3px; font-size: 26px; }
.mvp-result { color: var(--gold) !important; }
.score-list { list-style: none; margin: 6px 0 0; padding: 0; }
.score-list li { display: flex; justify-content: space-between; padding-block: 3px; border-bottom: 1px solid var(--line); }
.score-list li:last-child { border-bottom: 0; }
.empty { max-width: 440px; margin: 55px auto; padding: 22px; }
.empty p { margin: 8px 0; }
.toast { z-index: 10; position: fixed; max-width: calc(100vw - 32px); bottom: 16px; right: 16px; padding: 9px 13px; border: 1px solid #699b95; background: #223c3d; border-radius: 7px; color: #e5fff8; box-shadow: 0 8px 24px #0007; font-size: 13px; }
.toast.error { border-color: #9c666c; background: #442e37; color: #ffe3df; }
@media (max-width: 850px) {
  .top-inner { gap: 28px; }
  .shell { padding-top: 27px; }
  .orbit { left: 70%; top: 49%; }
  .hero h1 { font-size: clamp(3.2rem, 8vw, 4.7rem); }
  .entrance { padding: 16px; }
}
@media (max-width: 680px) {
  .shell { padding: 17px 14px 34px; }
  .top-inner { height: 60px; padding: 0 14px; gap: 14px; }
  .main-nav { display: none; }
  .footer > div { padding-inline: 14px; }
  .landing, .rules-layout, .room-layout { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .hero { min-height: 260px; }
  .hero-content { padding: 20px; }
  .hero h1 { margin: 11px 0 8px; }
  .hero-stats { margin-top: 13px; }
  .orbit { left: 66%; top: 53%; }
  .landing-missions { margin-top: 22px; }
  .mission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .mission { padding: 7px 8px; }
  .room-panel { padding: 12px; }
  .room-tools .button { min-height: 32px; padding-block: 5px; }
}
@media (max-width: 370px) {
  .seat-grid { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
