:root {
  --bg: #0b1120;
  --surface: #141d30;
  --surface-2: #1b2740;
  --surface-3: #24334f;
  --border: #2b3d5c;
  --border-soft: #223148;
  --text: #eaf0fa;
  --muted: #8ea2c0;
  --dim: #64789a;
  --accent: #3d8bfd;
  --accent-dim: #1e4b8f;
  --online: #35d29a;
  --warn: #f0a33c;
  --danger: #f2665a;
  --gold: #ffd24a;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3 { font-weight: 700; }
.page { min-height: 100%; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.6; }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); }
.err { color: var(--danger); font-size: 13px; line-height: 1.5; }
.okmsg { color: var(--online); font-size: 13px; line-height: 1.5; }
.nowrap { white-space: nowrap; }

/* ---------- 控件 ---------- */
button { font-family: inherit; font-size: 14px; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.35; }
input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
textarea { resize: vertical; line-height: 1.6; }
label { font-size: 13px; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn.ghost:hover:not(:disabled) { color: var(--text); border-color: var(--dim); filter: none; }
.btn.ok { background: var(--online); color: #052b1e; }
.btn.warn { background: var(--warn); color: #34210a; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.danger.armed { background: var(--danger); color: #fff; }
.btn.big { padding: 16px 24px; font-size: 17px; }
.btn.wide { width: 100%; }
.btn .key {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.7;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 0 4px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--muted);
  white-space: nowrap;
}
.pill.on { background: rgba(53, 210, 154, 0.16); color: var(--online); }
.pill.off { background: rgba(242, 102, 90, 0.14); color: var(--danger); }
.pill.warn { background: rgba(240, 163, 60, 0.16); color: var(--warn); }
.pill.accent { background: rgba(61, 139, 253, 0.16); color: #7fb2ff; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- 卡片页（登录 / 选手 / 首页） ---------- */
.play-page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.play-card {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px;
}
.play-card h1 { margin: 0 0 6px; font-size: 22px; }
.play-card > .hint { margin: 0 0 18px; }
.play-card label { display: block; margin: 14px 0 6px; }
.play-card input { width: 100%; padding: 12px; font-size: 16px; }
.play-card .btn { margin-top: 18px; width: 100%; padding: 13px; font-size: 16px; }
.play-card .btn.ghost { margin-top: 16px; }
.home-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 14px 16px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
}
.home-link:hover { border-color: var(--accent); }
.home-link small { color: var(--muted); font-weight: 400; }

/* ---------- 选手端 ---------- */
.play-shell { width: min(560px, 100%); }
.play-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 14px;
}
.play-team { color: var(--accent); font-size: 13px; }
.play-name { font-size: 22px; font-weight: 700; margin-top: 2px; }
.play-score-box { text-align: right; }
.play-score { font-size: 30px; font-weight: 800; color: var(--gold); line-height: 1; }
.play-rank { font-size: 12px; color: var(--muted); margin-top: 3px; }

.clock-wrap { margin-bottom: 16px; }
.clock-line { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.clock-num { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--warn); }
.clock-num.urgent { color: var(--danger); animation: pulse 0.6s ease-in-out infinite alternate; }
.clock-num.paused { color: var(--dim); animation: none; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--warn); transition: width 0.2s linear; }
.bar > i.urgent { background: var(--danger); }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.45; } }

.q-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.q-text { font-size: 22px; line-height: 1.45; margin: 0 0 18px; word-break: break-word; }
.buzz-btn {
  width: 100%;
  min-height: 160px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ff6b5f, #d63b2e);
  color: #fff;
  box-shadow: 0 8px 0 #8f2318;
  transition: transform 0.06s, box-shadow 0.06s;
}
.buzz-btn:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 #8f2318; }
.buzz-btn:disabled { background: var(--surface-3); color: var(--dim); box-shadow: none; opacity: 1; }
.buzz-hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; }

.answer-box textarea { width: 100%; min-height: 96px; font-size: 17px; }
.answer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 10px; }
.big-status {
  text-align: center;
  padding: 30px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.big-status .icon { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.big-status .word { font-size: 24px; font-weight: 700; }
.big-status .sub { color: var(--muted); font-size: 13px; margin-top: 8px; }
.big-status.good { border-color: var(--online); }
.big-status.good .word { color: var(--online); }
.big-status.bad { border-color: var(--danger); }
.big-status.bad .word { color: var(--danger); }
.big-status.wait { border-color: var(--warn); }
.big-status.wait .word { color: var(--warn); }

.conn-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 8px 14px;
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  text-align: center;
  z-index: 50;
}
.play-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 10px; }

/* ---------- 大屏 ---------- */
/* display 页由 JS 调整 <html> 的 font-size 做整体缩放，本节一律用 rem。 */
.display-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1.2rem;
  gap: 0.8rem;
}
.display-bar { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.display-bar h1 { margin: 0; font-size: 1.4rem; }
.display-bar .grow { flex: 1; }
.display-bar .meta { color: var(--muted); font-size: 0.85rem; }
.zoom-ctl { display: flex; gap: 0.3rem; opacity: 0.25; transition: opacity 0.2s; }
.display-page:hover .zoom-ctl { opacity: 1; }
.zoom-ctl button {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
}
.stage { flex: 1; min-height: 0; display: flex; gap: 0.8rem; }
.stage-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.8rem; }

.rail {
  width: 15rem;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: hidden;
}
.rail h3 { margin: 0 0 0.3rem; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 7px;
  background: var(--surface-2);
  font-size: 0.95rem;
}
.rank-row .no { width: 1.6rem; text-align: center; font-weight: 800; color: var(--dim); font-size: 0.9rem; }
.rank-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .sc { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; }
.rank-row.top { background: rgba(255, 210, 74, 0.12); }
.rank-row.top .no { color: var(--gold); }
.rank-row.lit { outline: 2px solid var(--warn); }
.rank-row.bump { animation: bump 0.7s ease-out; }
@keyframes bump {
  0% { background: rgba(53, 210, 154, 0.45); }
  100% { background: var(--surface-2); }
}

.booths {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.7rem;
  min-height: 0;
  align-content: start;
  overflow: auto;
}
.team {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.team h2 { margin: 0 0 0.5rem; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 0.5rem; }
.team h2 small { color: var(--muted); font-weight: 400; font-size: 0.75rem; }
.seats { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.5rem; min-height: 0; }
.seat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  color: var(--dim);
  overflow: hidden;
}
.seat.online { border-color: var(--online); color: var(--text); }
.seat.locked-tile { border-color: var(--warn); box-shadow: 0 0 0 2px rgba(240, 163, 60, 0.3); }
.seat-title { font-size: 0.9rem; font-weight: 650; line-height: 1.25; }
.seat-sub { font-size: 0.68rem; margin-top: 0.15rem; color: var(--dim); display: flex; gap: 0.4rem; align-items: center; }
.seat.online .seat-sub { color: var(--online); }
.seat-sub .lag-bad { color: var(--danger); }
.seat-page {
  flex: 1;
  margin-top: 0.4rem;
  background: var(--bg);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  min-height: 0;
  overflow: hidden;
}
.seat.empty .seat-page { display: none; }
.mini-page .m-team { font-size: 0.6rem; color: var(--accent); }
.mini-page .m-name { font-size: 0.85rem; font-weight: 700; margin: 0.1rem 0; }
.mini-page .m-status { font-size: 0.68rem; color: var(--online); }
.mini-page .m-status.wait { color: var(--muted); }
.mini-page .m-status.warn { color: var(--warn); }
.mini-draft {
  margin-top: 0.3rem;
  font-size: 0.7rem;
  color: var(--warn);
  word-break: break-all;
  border-left: 2px solid var(--warn);
  padding-left: 0.35rem;
  line-height: 1.35;
  max-height: 3.2rem;
  overflow: hidden;
}
.mini-caret { display: inline-block; width: 0.5ch; background: var(--warn); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.quiz-top {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.quiz-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem; }
.quiz-idx { font-size: 0.95rem; color: var(--muted); }
.quiz-clock {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 3.6rem;
  font-weight: 800;
  color: var(--warn);
  line-height: 0.9;
}
.quiz-clock.urgent { color: var(--danger); animation: pulse 0.6s ease-in-out infinite alternate; }
.quiz-clock.paused { color: var(--dim); animation: none; }
.quiz-prompt { font-size: 2.1rem; line-height: 1.3; margin: 0.3rem 0 0.7rem; word-break: break-word; }
.quiz-bar { height: 0.35rem; border-radius: 0.2rem; background: var(--surface-3); overflow: hidden; margin-bottom: 0.7rem; }
.quiz-bar > i { display: block; height: 100%; background: var(--warn); transition: width 0.2s linear; }
.quiz-bar > i.urgent { background: var(--danger); }
.quiz-banner { font-size: 1.15rem; min-height: 1.5rem; color: var(--online); font-weight: 600; }
.quiz-banner.warn { color: var(--warn); }
.quiz-banner.bad { color: var(--danger); }
.quiz-answer {
  margin-top: 0.5rem;
  font-size: 1.3rem;
  background: var(--surface-2);
  border-left: 0.25rem solid var(--accent);
  padding: 0.5rem 0.8rem;
  border-radius: 0 8px 8px 0;
  word-break: break-word;
}
.quiz-mosaic { flex: 1; display: grid; gap: 0.6rem; min-height: 0; }

.flash {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(11, 17, 32, 0.93);
  animation: flashin 0.18s ease-out;
}
.flash .who { font-size: 6rem; font-weight: 900; color: var(--warn); text-align: center; line-height: 1.05; padding: 0 2rem; }
.flash .sub { font-size: 1.6rem; color: var(--text); }
.flash .tag { font-size: 1.1rem; color: var(--muted); font-family: var(--mono); }
@keyframes flashin { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }

.finish { flex: 1; display: flex; flex-direction: column; gap: 0.6rem; overflow: auto; align-content: start; }
.finish h2 { margin: 0 0 0.4rem; font-size: 1.6rem; }
.finish-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 1.1rem;
  font-size: 1.6rem;
}
.finish-row .rk { width: 3rem; font-weight: 900; color: var(--dim); }
.finish-row .nm { flex: 1; }
.finish-row .sc { font-family: var(--mono); font-weight: 800; }
.finish-row.p1 { border-color: var(--gold); background: rgba(255, 210, 74, 0.1); }
.finish-row.p1 .rk { color: var(--gold); }
.finish-row.p2 { border-color: #b9c6d8; }
.finish-row.p3 { border-color: #c98b56; }

/* ---------- 后台 ---------- */
.admin-page { padding: 0; display: flex; flex-direction: column; min-height: 100%; }
.admin-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: wrap;
}
.admin-bar h1 { margin: 0; font-size: 17px; }
.admin-bar .grow { flex: 1; }
.admin-tabs { display: flex; gap: 4px; }
.admin-tabs button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 600;
}
.admin-tabs button.on { background: var(--surface-3); color: var(--text); border-color: var(--border); }
.admin-body { padding: 16px 18px 40px; }
.admin-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: 380px;
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.admin-toast.bad { border-color: var(--danger); color: #ffc9c3; }
.admin-toast.good { border-color: var(--online); color: #b6f0da; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.card > h2 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card > h2 .grow { flex: 1; }
.cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; }

.statusline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.state-big {
  font-size: 26px;
  font-weight: 800;
  padding: 2px 0;
}
.state-lobby { color: var(--muted); }
.state-open { color: var(--accent); }
.state-locked { color: var(--warn); }
.state-review { color: var(--gold); }
.state-scored { color: var(--online); }
.state-voided, .state-skipped { color: var(--danger); }
.state-finished { color: var(--muted); }

.now-q {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.now-q .prompt { font-size: 19px; line-height: 1.45; word-break: break-word; }
.now-q .note { margin-top: 8px; font-size: 13px; color: var(--gold); }
.now-q .kw { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kw-tag { padding: 2px 8px; border-radius: 6px; font-size: 12px; background: var(--surface-3); color: var(--muted); }
.kw-tag.hit { background: rgba(53, 210, 154, 0.18); color: var(--online); }
.kw-tag.miss { background: rgba(242, 102, 90, 0.14); color: var(--danger); }

.answer-panel {
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(255, 210, 74, 0.06);
  margin-bottom: 12px;
}
.answer-panel .who { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.answer-panel .text { font-size: 24px; line-height: 1.4; word-break: break-word; min-height: 1.4em; }
.answer-panel .text.empty { color: var(--dim); font-size: 17px; }
.answer-panel .verdict-row { display: flex; gap: 10px; margin-top: 14px; }
.answer-panel .verdict-row .btn { flex: 1; }
.tool-note { font-size: 12px; color: var(--dim); margin-top: 8px; line-height: 1.5; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { border-bottom: 1px solid var(--border-soft); padding: 7px 8px; text-align: left; vertical-align: middle; }
table.grid th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid td.num { font-family: var(--mono); text-align: right; }
table.grid .win { color: var(--online); font-weight: 700; }
table.grid .lose { color: var(--dim); }
.scroll-y { max-height: 340px; overflow-y: auto; }

.q-edit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.q-edit label { display: flex; flex-direction: column; gap: 5px; }
.q-edit .wide { grid-column: 1 / -1; }
.q-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--surface-2);
}
.q-row.cur { border-color: var(--accent); background: rgba(61, 139, 253, 0.1); }
.q-row.done-scored { border-left-color: var(--online); }
.q-row.done-voided, .q-row.done-skipped { border-left-color: var(--danger); }
.q-row .qno { font-size: 17px; font-weight: 800; text-align: center; color: var(--muted); }
.q-row .qmain { min-width: 0; }
.q-row .qprompt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-row .qmeta { font-size: 12px; color: var(--dim); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.q-row .qops { display: flex; gap: 4px; }
.q-row .qops button { padding: 5px 8px; font-size: 12px; }

.member-row {
  display: grid;
  grid-template-columns: 1fr 130px auto auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
}
.member-row input { padding: 6px 9px; }
.member-row .uname { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.member-row .ops { display: flex; gap: 4px; }
.member-row .ops button { padding: 5px 9px; font-size: 12px; }
.team-block { margin-bottom: 16px; }
.team-block h3 { margin: 0 0 6px; font-size: 14px; display: flex; gap: 8px; align-items: center; }

.inline-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-fields label { display: flex; flex-direction: column; gap: 5px; }
.inline-fields input { width: 120px; }
.inline-fields input.narrow { width: 84px; }
.inline-fields input.grow { width: 260px; }
.field-note { font-size: 12px; color: var(--dim); margin-top: 6px; line-height: 1.5; }

.shortcut-help { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--dim); margin-top: 10px; }
.shortcut-help kbd {
  font-family: var(--mono);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}
.score-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.score-chip {
  display: flex;
  gap: 6px;
  align-items: baseline;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 13px;
}
.score-chip b { font-family: var(--mono); font-size: 15px; }
.score-chip.top { border-color: var(--gold); }

/* ---------- 同步页 ---------- */
.sync-page { padding: 20px; max-width: 1000px; margin: 0 auto; }
.sync-config label { display: block; margin: 12px 0; }
.sync-config input { width: min(640px, 100%); margin-top: 6px; }
.sync-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sync-team { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.sync-team h3 { margin: 0 0 8px; font-size: 15px; }
.sync-team ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.sync-diff { padding-left: 18px; font-size: 13px; line-height: 1.8; }

@media (max-width: 1080px) {
  .cols { grid-template-columns: 1fr; }
  .q-edit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .q-edit { grid-template-columns: 1fr; }
  .member-row { grid-template-columns: 1fr; }
  .admin-body { padding: 12px 12px 40px; }
  .play-page { padding: 12px; align-items: flex-start; }
  .buzz-btn { min-height: 180px; }
}
