:root {
  color-scheme: dark; --bg:#100f10; --panel:#1a1719; --raised:#211c1e; --line:#342a2e; --muted:#b6a6aa;
  --ink:#fcf4ee; --red:#f46c64; --hot:#d7433d; --gold:#edbc83; --green:#8bd2ae;
  font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;
}
* {box-sizing:border-box}
body {margin:0;min-width:320px;background:radial-gradient(ellipse at 50% 8%,#231519 0%,var(--bg) 55%);color:var(--ink);font-size:14px}
button,input,select,textarea {font:inherit}
button {cursor:pointer}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible {outline:2px solid var(--gold);outline-offset:3px}
button:disabled {cursor:default;opacity:.45}
a {color:var(--red);text-underline-offset:4px}
p {line-height:1.65;margin:.4em 0}
h1,h2,h3 {margin:0}
.top {position:sticky;top:0;z-index:2;background:#131113f5;border-bottom:1px solid #30262a;backdrop-filter:blur(12px)}
.top-inner {max-width:1320px;margin:auto;min-height:70px;padding:0 32px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand {display:flex;align-items:center;gap:12px;background:none;border:0;color:var(--ink);font-size:17px;font-weight:850;letter-spacing:.09em;padding:0;white-space:nowrap}
.mark {color:#ff7067;display:grid;place-items:center;background:#311a1d;border:1px solid #6b3031;width:35px;height:35px;border-radius:8px;font-size:23px}
nav {display:flex;align-items:stretch;gap:28px;align-self:stretch}
nav button {border:0;background:none;color:var(--muted);position:relative;padding:0 3px;min-height:48px;white-space:nowrap}
nav button.current {color:#fff;font-weight:750}
nav .current::after {content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--red)}
.top-status {font-size:12px;color:var(--muted);display:flex;align-items:center;gap:8px;white-space:nowrap}
.top-status i {width:7px;height:7px;border-radius:50%;background:#83c99f;box-shadow:0 0 12px #6aa98a55}
.layout,.footer {width:min(1230px,calc(100% - 64px));margin:auto}
.layout {min-height:calc(100vh - 148px);padding:36px 0 54px}
.footer {display:flex;justify-content:space-between;gap:18px;border-top:1px solid var(--line);padding:25px 0;color:var(--muted);font-size:12px}
.hero {position:relative;isolation:isolate;border:1px solid #513037;border-radius:18px;overflow:hidden;min-height:420px;display:flex;align-items:center;background:#22171a}
.hero::before {content:"";position:absolute;z-index:-2;inset:0;background:url("/forest.png") right 38% / cover no-repeat}
.hero::after {content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#130e10 1%,#1c1215e8 20%,#1c121569 57%,#100b0b14 90%),linear-gradient(0deg,#160e11c0,transparent 55%)}
.hero-copy {padding:54px 54px 46px;max-width:650px}
.kicker {display:flex;align-items:center;gap:9px;color:#ffa097;font-weight:800;letter-spacing:.18em;font-size:12px}
.kicker::before {content:"";width:20px;height:1px;background:currentColor}
.hero h1 {font-family:"Songti SC","SimSun",serif;font-size:clamp(62px,7.7vw,110px);letter-spacing:.055em;line-height:1.1;margin:13px 0 15px;color:#fff3eb;text-shadow:0 6px 36px #0009}
.hero p {color:#f3dbd9;font-size:16px;max-width:345px}
.hero-meta {display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}
.badge {display:inline-flex;align-items:center;gap:5px;padding:4px 8px;background:#31272b;border:1px solid #534047;border-radius:5px;color:#e2cfd3;font-size:11px;white-space:nowrap}
.hero .badge {background:#27171bba;border-color:#754247;color:#f5dcda;padding:6px 10px}
.section-title {display:flex;justify-content:space-between;align-items:center;gap:12px;margin:30px 0 14px}
.section-title h2 {font-size:20px}
.muted,.detail {color:var(--muted)}
.detail {font-size:12px}
.mode-grid,.role-grid {display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.mode,.panel,.role-card,.rule-card {background:var(--panel);border:1px solid var(--line);border-radius:13px}
.mode {text-align:left;display:flex;gap:14px;align-items:center;padding:22px 17px;color:var(--ink);transition:background .15s,border-color .15s}
.mode:hover {border-color:#845052;background:#291b20}
.mode:first-child {border-color:#83413e;background:linear-gradient(110deg,#381d20,#23191c)}
.mode strong {display:block;font-size:16px;margin-bottom:5px}
.mode small {color:var(--muted);font-size:12px;line-height:1.5}
.mode-icon,.sigil {display:grid;place-items:center;width:45px;height:45px;flex:0 0 45px;border-radius:9px;background:#332226;border:1px solid #603238;color:#fe8e86;font-size:21px}
.mode .arrow {margin-left:auto;color:#d19695;font-size:18px}
.quicklinks {display:flex;flex-wrap:wrap;gap:10px}
.quicklinks button {text-align:left;flex:1;min-width:150px;justify-content:space-between}
.page-banner {padding:24px 0 25px;border-bottom:1px solid var(--line);margin-bottom:22px}
.page-banner h1 {font-size:37px;margin:10px 0}
.role-card,.rule-card,.panel {padding:20px}
.role-card h3 {margin:12px 0 6px;font-size:17px}
.role-card p,.rule-card p {color:var(--muted)}
.rule-grid {display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.sources {margin-top:18px;color:var(--muted);display:flex;flex-wrap:wrap;gap:16px}
.room-bar {display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px;padding:18px 20px}
.room-title {display:flex;align-items:center;gap:14px;min-width:0}
.room-title h1 {font-size:23px}
.room-title p {margin:3px 0 0}
.room-tools,.buttons,.pills {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.pills {margin:10px 0}
.btn {background:#30262b;color:#f5e7e9;border:1px solid #52404a;border-radius:8px;padding:9px 13px;white-space:nowrap;font-weight:650;text-decoration:none;display:inline-flex;align-items:center;gap:7px;justify-content:center}
.btn:hover:not(:disabled) {background:#403038;border-color:#805e6a}
.btn.primary {color:white;background:#b93732;border-color:#ed655a}
.btn.primary:hover:not(:disabled) {background:#cc4640}
.btn.ghost {background:transparent}
.btn.small {padding:5px 8px;font-size:12px}
.btn.active {border-color:var(--red);background:#452629;color:#fff}
.room-grid {display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:16px;align-items:start}
.stack {display:flex;flex-direction:column;gap:14px;min-width:0}
.panel-head {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}
.panel-head h2 {font-size:17px}
.seats {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.seat {min-height:74px;padding:10px;border:1px solid var(--line);background:#211c1f;border-radius:9px;text-align:left;color:var(--ink);display:flex;gap:8px;align-items:flex-start;position:relative;min-width:0}
.seat.selectable {width:100%;border-color:#835651;cursor:pointer}
.seat.selectable:hover,.seat.selected {border-color:var(--red);background:#3d2429}
.seat.you {border-color:#784747}
.seat.empty {border-style:dashed;color:var(--muted);align-items:center}
.seat.dead {opacity:.58}
.seat .no {background:#34262d;color:#edb5b3;border-radius:5px;padding:3px 5px;font-variant-numeric:tabular-nums;font-size:11px;line-height:1.5}
.seat-body {min-width:0}
.seat strong {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.seat .detail {font-size:10px;display:block;margin-top:3px;overflow-wrap:anywhere}
.seat .remove {position:absolute;top:3px;right:4px;color:var(--muted);background:#241b20;border:0;border-radius:4px}
.seat .remove:hover {color:white;background:#6b2a32}
.config {display:grid;gap:12px}
.role-control {display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid #32282d}
.role-control:last-child {border-bottom:0}
.role-control label {font-size:13px;display:flex;align-items:center;gap:7px}
.role-control input {width:66px;padding:5px 8px}
.config-block {border:1px solid var(--line);border-radius:8px;padding:8px 10px}
summary {cursor:pointer;color:#f2d9de;font-weight:650}
.config-block summary {padding:4px 0}
.config-section {display:grid;gap:10px;grid-template-columns:1fr 1fr}
.config-section label,.field {display:flex;flex-direction:column;gap:6px}
.checks {display:grid;grid-template-columns:1fr 1fr;gap:9px;color:#e6d5d8}
.checks label {display:flex;gap:6px;align-items:flex-start;font-size:12px}
input[type=checkbox] {accent-color:var(--hot)}
input:not([type=checkbox]),select,textarea {background:#151215;color:var(--ink);border:1px solid #53414a;border-radius:7px;padding:9px;min-width:0}
textarea {resize:vertical;width:100%;min-height:94px}
.error {color:#ffa39e;min-height:1.3em}
.phase {border-color:#784449;background:linear-gradient(130deg,#362125,#1d171a 72%)}
.phase-line {display:flex;align-items:center;justify-content:space-between;gap:9px}
.phase h2 {font-size:24px;margin:3px 0 6px}
.role-label {color:#ffada2;font-weight:800}
.timer {font-family:ui-monospace,monospace;border:1px solid #92585a;border-radius:7px;padding:6px 10px;color:#ffc4bd;font-size:18px}
.role-notes {margin:7px 0 0;color:#efc49d;font-size:12px;line-height:1.7}
.action-panel form,.form-layout {display:grid;gap:10px}
.action-tips {color:var(--muted);margin-bottom:13px}
.events,.discussion {display:flex;flex-direction:column;gap:8px;max-height:290px;overflow:auto}
.event {padding:7px 0;border-bottom:1px solid var(--line);color:#e1cdd0;font-size:13px}
.bubble {padding:9px 11px;background:#241e22;border:1px solid #3b3036;border-radius:8px;overflow-wrap:anywhere}
.bubble strong {color:#ffc0b6;font-size:12px}
.bubble p {white-space:pre-wrap;margin:4px 0}
.red {color:#ff9b92}
.loading {padding:40px;color:var(--muted)}
.empty-note {color:var(--muted);padding:11px 0}
dialog {width:min(440px,calc(100% - 28px));color:var(--ink);border:1px solid #6f4247;border-radius:15px;background:#211a1e;padding:23px}
dialog::backdrop {background:#09070bba;backdrop-filter:blur(3px)}
dialog form {display:grid;gap:13px}
dialog h2 {font-size:22px}
dialog .field input {width:100%}
#toast {position:fixed;z-index:4;bottom:24px;left:50%;transform:translateX(-50%);max-width:calc(100% - 30px);padding:11px 15px;border:1px solid #754d54;border-radius:8px;background:#33232b;color:#fff2ef;box-shadow:0 6px 25px #0008}
#toast:empty {display:none}
@media (max-width:850px) {
  .layout,.footer {width:calc(100% - 32px)}
  .top-inner {padding:0 16px}
  .hero {min-height:350px}
  .hero-copy {padding:38px 28px}
  .seats {grid-template-columns:repeat(2,minmax(0,1fr))}
  .mode {padding:16px 12px;gap:9px}
}
@media (max-width:620px) {
  .top-inner {flex-wrap:wrap;gap:0;justify-content:space-between;padding-top:11px}
  nav {order:3;width:100%;justify-content:center}
  nav button {min-height:43px}
  .hero-copy {padding:30px 20px}
  .hero {min-height:315px}
  .hero::before {background-position:65% 38%}
  .hero::after {background:linear-gradient(90deg,#130e10ef,#1c12158a 63%,#100b0b18)}
  .hero h1 {font-size:59px}
  .hero p {font-size:14px;max-width:220px}
  .layout {padding-top:20px}
  .mode-grid,.room-grid,.rule-grid {grid-template-columns:1fr}
  .role-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .role-card,.panel,.rule-card {padding:14px}
  .room-bar {flex-wrap:wrap}
  .seats {grid-template-columns:repeat(3,minmax(0,1fr))}
  .seat {padding:7px;gap:5px}
  .seat strong {font-size:12px}
}
