:root {
  --night: #082f31;
  --night-deep: #041f21;
  --night-soft: #13494a;
  --red: #8f201b;
  --red-bright: #b33127;
  --red-deep: #52130f;
  --gold: #d0a34d;
  --gold-light: #f3d88b;
  --paper: #f8efd9;
  --paper-deep: #e9d6ae;
  --ink: #2a1b14;
  --muted: #776451;
  --green: #4e765f;
  --blue: #3d6e7c;
  --cream: #fff8e7;
  --white: #fffdf8;
  --danger: #b63b2c;
  --shadow: 0 30px 90px rgba(2, 20, 21, .34);
  --paper-shadow: 0 18px 50px rgba(38, 22, 13, .17);
  --radius: 24px;
  --body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  --display: "DFKai-SB", "BiauKai", "Noto Serif TC", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--night);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream);
  font-family: var(--body);
  background:
    radial-gradient(circle at 12% 18%, rgba(171, 48, 34, .22), transparent 25rem),
    radial-gradient(circle at 84% 10%, rgba(211, 164, 76, .14), transparent 28rem),
    linear-gradient(140deg, var(--night-deep), var(--night) 44%, #0b393a);
  overflow-x: hidden;
}

h1,
h2,
h3,
.brand strong,
.mode-copy strong,
.question-title,
.room-code,
.result-score,
.rank-score strong {
  font-family: var(--serif);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(32deg, transparent 46%, rgba(255, 235, 183, .18) 47%, transparent 48%),
    linear-gradient(148deg, transparent 46%, rgba(255, 235, 183, .12) 47%, transparent 48%);
  background-size: 92px 92px;
  mask-image: radial-gradient(circle at center, #000 20%, transparent 82%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(243, 216, 139, .58);
  outline-offset: 3px;
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 38rem;
  height: 38rem;
  border: 1px solid rgba(245, 218, 148, .1);
  border-radius: 50%;
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(245, 218, 148, .08);
  border-radius: inherit;
}

.ambient::after {
  inset: 25%;
}

.ambient-one {
  top: -18rem;
  right: -10rem;
}

.ambient-two {
  bottom: -24rem;
  left: -12rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 201, 128, .28), transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
}

.brand-seal,
.seal-loader,
.avatar-disc {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(244, 216, 143, .56);
  color: var(--gold-light);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .1), transparent),
    var(--red);
  box-shadow: inset 0 0 0 4px rgba(73, 13, 9, .25), 0 8px 24px rgba(0, 0, 0, .2);
}

.brand-seal {
  width: 44px;
  height: 44px;
  border-radius: 10px 10px 14px 10px;
  font-family: var(--display);
  font-size: 24px;
  transform: rotate(-2deg);
}

.brand small {
  display: block;
  margin-bottom: 2px;
  color: #d7bd7c;
  font-size: 9px;
  letter-spacing: .16em;
}

.brand strong {
  font-size: 17px;
  letter-spacing: .12em;
}

.main-nav {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(255, 244, 218, .11);
  border-radius: 999px;
  background: rgba(4, 28, 29, .5);
}

.main-nav button {
  padding: 9px 15px;
  border-radius: 999px;
  color: rgba(255, 248, 229, .86);
  background: transparent;
  font-size: 14px;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.main-nav button:hover,
.main-nav button.active {
  color: var(--cream);
  background: rgba(151, 39, 29, .76);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  padding: 10px 14px;
  border: 1px solid rgba(255, 244, 218, .18);
  border-radius: 12px;
  color: var(--cream);
  background: rgba(4, 28, 29, .72);
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 38px 0 80px;
}

.boot-card {
  display: grid;
  place-items: center;
  min-height: 52vh;
  color: #dbc58c;
}

.seal-loader {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  font-family: var(--display);
  font-size: 38px;
  animation: sealPulse 1.5s ease-in-out infinite;
}

.boot-card p {
  letter-spacing: .18em;
}

@keyframes sealPulse {
  50% { transform: translateY(-7px) rotate(2deg); box-shadow: inset 0 0 0 4px rgba(73, 13, 9, .25), 0 18px 35px rgba(0, 0, 0, .28); }
}

.view-enter {
  animation: viewEnter .55s cubic-bezier(.2, .75, .2, 1) both;
}

@keyframes viewEnter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 36px;
  padding: clamp(28px, 5vw, 70px);
  border: 1px solid rgba(238, 208, 135, .35);
  border-radius: 32px 32px 48px 32px;
  color: var(--cream);
  background:
    linear-gradient(120deg, rgba(117, 23, 17, .98), rgba(71, 17, 13, .97) 60%, rgba(43, 18, 14, .97)),
    var(--red-deep);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.home-hero::before,
.red-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background:
    repeating-linear-gradient(135deg, transparent 0 17px, rgba(255, 224, 151, .16) 18px, transparent 19px),
    radial-gradient(circle at 80% 10%, rgba(255, 216, 121, .34), transparent 28rem);
}

.home-hero::after {
  content: "問";
  position: absolute;
  right: -20px;
  bottom: -100px;
  color: rgba(255, 226, 160, .055);
  font-family: var(--display);
  font-size: clamp(240px, 34vw, 460px);
  line-height: 1;
}

.hero-copy,
.join-panel,
.red-stage > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 2px;
  background: var(--gold);
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(54px, 8vw, 108px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: .94;
  text-shadow: 0 4px 0 rgba(53, 8, 5, .5);
}

.hero-title span {
  display: block;
  margin-top: 14px;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: .25em;
  font-weight: 700;
  letter-spacing: .28em;
  text-shadow: none;
}

.hero-lede {
  max-width: 650px;
  margin: 28px 0;
  padding-left: 18px;
  border-left: 3px solid var(--gold);
  color: rgba(255, 244, 218, .84);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.9;
}

.score-formula {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.score-formula span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 231, 176, .18);
  border-radius: 999px;
  color: #f1d898;
  background: rgba(255, 255, 255, .06);
  font-size: 12px;
}

.join-panel {
  align-self: center;
  padding: 24px;
  border: 1px solid rgba(255, 230, 169, .28);
  border-radius: 22px;
  background: rgba(39, 12, 9, .44);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

.panel-label {
  display: block;
  margin-bottom: 8px;
  color: #f0cf82;
  font-size: 12px;
  letter-spacing: .15em;
}

.join-panel h2,
.paper-card h2,
.section-heading h2,
.red-stage h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.35;
}

.join-panel p {
  color: rgba(255, 246, 224, .86);
  line-height: 1.7;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.field > span,
.field label {
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.inline-input {
  width: 100%;
  border: 1px solid rgba(105, 72, 42, .26);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 252, 242, .92);
  box-shadow: inset 0 1px 3px rgba(64, 34, 20, .08);
}

.field input,
.field select,
.inline-input {
  height: 48px;
  padding: 0 14px;
}

.field textarea {
  min-height: 112px;
  padding: 12px 14px;
  resize: vertical;
}

.join-panel .field input {
  border-color: rgba(255, 231, 175, .2);
  color: var(--cream);
  background: rgba(255, 255, 255, .08);
}

.join-panel .field input::placeholder {
  color: rgba(255, 248, 227, .42);
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin: 10px 0 18px;
}

.avatar-option {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 235, 184, .2);
  border-radius: 12px;
  color: var(--gold-light);
  background: rgba(255, 255, 255, .06);
  font-family: var(--display);
  font-size: 21px;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.avatar-option:hover,
.avatar-option.active {
  color: var(--red-deep);
  background: var(--gold-light);
  transform: translateY(-2px);
}

.paper-card .avatar-option {
  border-color: rgba(106, 59, 31, .24);
  color: #6d3425;
  background: rgba(255, 251, 239, .88);
  box-shadow: 0 5px 14px rgba(73, 38, 20, .07);
}

.paper-card .avatar-option:hover {
  border-color: rgba(143, 32, 27, .48);
  color: var(--red);
  background: #fffaf0;
}

.paper-card .avatar-option.active {
  border-color: var(--red);
  color: #fff8e7;
  background: linear-gradient(145deg, var(--red-bright), var(--red));
  box-shadow: 0 8px 22px rgba(118, 25, 17, .22);
}

.join-panel .avatar-option {
  border-color: rgba(255, 235, 184, .28);
  color: #f5d98e;
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
}

.join-panel .avatar-option:hover,
.join-panel .avatar-option.active {
  border-color: var(--gold-light);
  color: var(--red-deep);
  background: var(--gold-light);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  min-height: 48px;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.primary-btn {
  color: #fff9e9;
  background: linear-gradient(135deg, var(--red-bright), var(--red));
  box-shadow: 0 10px 24px rgba(118, 25, 17, .24), inset 0 1px rgba(255, 255, 255, .17);
}

.primary-btn.gold {
  color: #42130e;
  background: linear-gradient(135deg, #f0d88f, #c8993f);
  box-shadow: 0 10px 24px rgba(15, 4, 2, .24), inset 0 1px rgba(255, 255, 255, .35);
}

.secondary-btn {
  color: var(--ink);
  border: 1px solid rgba(93, 55, 31, .22);
  background: rgba(255, 249, 231, .76);
}

.ghost-btn {
  color: inherit;
  border: 1px solid currentColor;
  background: transparent;
  opacity: .8;
}

.danger-btn {
  color: #fff;
  background: var(--danger);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(.8);
  opacity: .52;
  transform: none;
}

.full {
  width: 100%;
}

.home-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.mode-card,
.paper-card {
  position: relative;
  border: 1px solid rgba(105, 72, 42, .22);
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 250, 235, .96), rgba(244, 232, 203, .96)),
    var(--paper);
  box-shadow: var(--paper-shadow);
  overflow: hidden;
}

.mode-card {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 160px;
  padding: 24px;
  border-radius: 18px 18px 26px 18px;
  text-align: left;
}

.mode-card::after,
.paper-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(153, 49, 35, .2);
  border-radius: inherit;
}

.mode-card:hover {
  transform: translateY(-4px) rotate(-.2deg);
  box-shadow: 0 25px 70px rgba(2, 20, 21, .28);
}

.mode-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 84px;
  border-radius: 12px 12px 20px 12px;
  color: var(--gold-light);
  background: var(--red);
  font-family: var(--display);
  font-size: 35px;
  box-shadow: inset 0 0 0 4px rgba(62, 9, 6, .24);
}

.mode-copy small {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15em;
}

.mode-copy strong {
  display: block;
  margin-bottom: 7px;
  font-size: 23px;
}

.mode-copy span {
  color: var(--muted);
  line-height: 1.65;
}

.mode-arrow {
  color: var(--red);
  font-size: 28px;
}

.stat-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 24px;
  border: 1px solid rgba(242, 216, 151, .18);
  border-radius: 18px;
  background: rgba(242, 216, 151, .16);
  overflow: hidden;
}

.stat-ribbon > div {
  padding: 18px 20px;
  background: rgba(5, 36, 37, .84);
}

.stat-ribbon strong {
  display: block;
  color: var(--gold-light);
  font-size: 26px;
}

.stat-ribbon span {
  color: rgba(255, 247, 225, .76);
  font-size: 12px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading p {
  max-width: 580px;
  margin: 8px 0 0;
  color: rgba(255, 246, 225, .8);
  line-height: 1.7;
}

.paper-card {
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius);
}

.paper-card > * {
  position: relative;
  z-index: 1;
}

.paper-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.setup-card {
  max-width: 820px;
  margin: 0 auto;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.setup-grid .span-two {
  grid-column: 1 / -1;
}

.hint {
  color: #665340;
  font-size: 13px;
  line-height: 1.6;
}

.setup-notice {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-left: 4px solid var(--red);
  border-radius: 0 12px 12px 0;
  color: #5f4936;
  background: rgba(255, 250, 235, .68);
  line-height: 1.7;
}

.setup-notice strong {
  color: var(--red);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(105, 72, 42, .2);
  border-radius: 12px;
  background: rgba(255, 251, 240, .58);
}

.checkbox-row input {
  width: 19px;
  height: 19px;
  accent-color: var(--red);
}

.checkbox-row small {
  color: #6a5641;
}

.red-stage {
  position: relative;
  min-height: 70vh;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(237, 207, 132, .35);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(110, 25, 19, .98), rgba(61, 17, 13, .98));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.game-topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.game-topbar > :last-child {
  justify-self: end;
}

.round-label,
.score-pill,
.room-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 232, 176, .2);
  border-radius: 999px;
  color: #f6dfa2;
  background: rgba(41, 8, 5, .28);
  font-size: 13px;
}

.score-pill strong {
  color: #fff9e7;
  font-size: 18px;
}

.timer-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
}

.timer-ring {
  --progress: 100%;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--gold-light) var(--progress), rgba(255, 255, 255, .12) 0);
  box-shadow: 0 10px 30px rgba(25, 4, 2, .28);
}

.timer-ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: #5a1813;
}

.timer-value {
  position: relative;
  z-index: 1;
  color: #fff9e7;
  font-size: 25px;
  font-weight: 900;
}

.question-shell {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-height: 54vh;
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 0 10px;
}

.question-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.question-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #f5d994;
  background: rgba(255, 255, 255, .07);
  font-size: 12px;
}

.question-title {
  max-width: 900px;
  margin: 0 auto 34px;
  color: #fff8e5;
  font-size: clamp(27px, 4vw, 50px);
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.answer-btn {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 237, 190, .2);
  border-radius: 16px;
  color: var(--cream);
  background: rgba(255, 255, 255, .075);
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, .06);
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.answer-btn:nth-child(2) { background: rgba(191, 126, 45, .16); }
.answer-btn:nth-child(3) { background: rgba(41, 105, 99, .18); }
.answer-btn:nth-child(4) { background: rgba(53, 89, 124, .2); }

.answer-btn:hover:not(:disabled) {
  z-index: 1;
  transform: translateY(-3px) scale(1.008);
  border-color: rgba(255, 229, 163, .6);
}

.answer-btn:disabled {
  cursor: default;
  opacity: .56;
}

.answer-btn.selected {
  border-color: var(--gold-light);
  background: rgba(224, 177, 75, .24);
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(232, 198, 114, .12);
}

.answer-btn.correct {
  border-color: #c9e0b2;
  background: rgba(68, 118, 74, .68);
  opacity: 1;
}

.answer-btn.wrong {
  border-color: #f2a08e;
  background: rgba(151, 42, 31, .72);
  opacity: 1;
}

.answer-key {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 235, 181, .28);
  border-radius: 10px;
  color: var(--gold-light);
  font-weight: 900;
  background: rgba(0, 0, 0, .12);
}

.waiting-card,
.feedback-card {
  max-width: 760px;
  margin: 24px auto 0;
  padding: 20px 22px;
  border: 1px solid rgba(255, 235, 181, .2);
  border-radius: 16px;
  color: rgba(255, 248, 230, .94);
  background: rgba(34, 8, 6, .34);
  text-align: center;
  line-height: 1.75;
}

.feedback-card.correct {
  border-color: rgba(173, 215, 167, .45);
  background: rgba(31, 80, 48, .45);
}

.feedback-card.wrong {
  border-color: rgba(238, 139, 117, .45);
  background: rgba(106, 28, 22, .54);
}

.feedback-card strong {
  display: block;
  margin-bottom: 4px;
  color: #fff7df;
  font-size: 24px;
}

.source-link {
  display: inline-block;
  margin-top: 9px;
  color: var(--gold-light);
  font-size: 12px;
}

.vote-panel {
  max-width: 760px;
  margin: 16px auto 0;
  padding: 18px;
  border: 1px solid rgba(255, 231, 174, .25);
  border-radius: 18px;
  color: #fff8e7;
  background:
    linear-gradient(145deg, rgba(87, 22, 15, .72), rgba(28, 8, 7, .62)),
    repeating-linear-gradient(135deg, transparent 0 20px, rgba(255, 232, 176, .035) 20px 21px);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .07),
    0 14px 34px rgba(13, 3, 2, .15);
}

.host-heat-panel {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(87, 22, 15, .6), rgba(28, 8, 7, .5)),
    repeating-linear-gradient(135deg, transparent 0 20px, rgba(255, 232, 176, .035) 20px 21px);
}

.vote-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.vote-heading span {
  display: grid;
  gap: 2px;
}

.vote-heading b {
  color: #fff9e8;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .03em;
}

.vote-heading small {
  color: rgba(255, 248, 230, .62);
  font-size: 11px;
  font-weight: 500;
}

.vote-heading strong {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(255, 228, 160, .22);
  border-radius: 999px;
  color: #34150e;
  background: var(--gold-light);
  font-size: 12px;
  line-height: 1;
}

.vote-list {
  display: grid;
  gap: 8px;
}

.vote-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 237, 193, .1);
  border-radius: 13px;
  background: rgba(255, 255, 255, .035);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.vote-row.leading {
  border-color: rgba(243, 216, 139, .34);
  background: rgba(218, 166, 67, .1);
}

.vote-key {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 232, 176, .25);
  border-radius: 10px;
  color: var(--gold-light);
  background: rgba(255, 255, 255, .06);
  font-family: var(--serif);
  font-weight: 900;
}

.vote-row.leading .vote-key {
  border-color: rgba(255, 231, 169, .7);
  color: #32130d;
  background: linear-gradient(145deg, #f6dc91, #c58a35);
  box-shadow: 0 6px 18px rgba(202, 141, 48, .2);
}

.vote-meter {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.vote-track {
  height: 12px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .085);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .22);
  overflow: hidden;
}

.vote-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a96b25, #f1cf76);
  box-shadow: 0 0 14px rgba(241, 207, 118, .25);
  transition: width .35s ease;
}

.vote-meter > small {
  color: rgba(255, 248, 230, .62);
  font-size: 10px;
  line-height: 1;
}

.vote-row.correct .vote-key {
  border-color: #bfe0a7;
  color: #18331f;
  background: #bfe0a7;
}

.vote-row.correct .vote-track i {
  background: linear-gradient(90deg, #4f8154, #bfe0a7);
}

.vote-row > strong {
  color: #fff9e7;
  font-size: 14px;
  text-align: right;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: 24px;
}

.result-hero {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 520px;
  padding: 36px;
  text-align: center;
}

.result-rank {
  color: var(--red);
  font-family: var(--display);
  font-size: 94px;
  line-height: 1;
}

.result-score {
  margin: 18px 0 8px;
  font-size: 52px;
  font-weight: 900;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  margin-top: 24px;
  border-top: 1px solid rgba(110, 70, 38, .18);
}

.result-stats div {
  padding: 18px 10px 0;
}

.result-stats strong {
  display: block;
  color: var(--red);
  font-size: 22px;
}

.leaderboard-card {
  padding: 0;
}

.ranking-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 48px 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid rgba(100, 64, 36, .14);
  border-radius: 14px;
  background: rgba(255, 252, 242, .62);
}

.rank-row.top-one {
  background: linear-gradient(110deg, rgba(242, 211, 126, .58), rgba(255, 252, 242, .7));
  transform: scale(1.015);
}

.rank-number {
  color: var(--red);
  font-size: 20px;
  font-weight: 900;
}

.avatar-disc {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 20px;
}

.rank-name strong {
  display: block;
}

.rank-name small {
  color: var(--muted);
}

.rank-score {
  text-align: right;
}

.rank-score strong {
  display: block;
  color: var(--red);
  font-size: 20px;
}

.rank-score small {
  color: var(--muted);
}

.tabs {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(255, 235, 183, .17);
  border-radius: 999px;
  background: rgba(4, 28, 29, .48);
}

.tabs button {
  padding: 9px 16px;
  border-radius: 999px;
  color: rgba(255, 247, 225, .62);
  background: transparent;
}

.tabs button.active {
  color: #fff7df;
  background: var(--red);
}

.room-code {
  color: var(--gold-light);
  font-size: clamp(56px, 10vw, 126px);
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 6px 0 rgba(32, 5, 3, .38);
}

.lobby-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 30px;
  align-items: start;
}

.qr-card {
  padding: 20px;
  border-radius: 22px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--paper-shadow);
  text-align: center;
}

.qr-card img {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  border-radius: 12px;
}

.qr-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.player-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 234, 181, .18);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(255, 255, 255, .07);
  animation: chipIn .35s ease both;
}

.stage-copy {
  color: rgba(255, 246, 224, .86);
  line-height: 1.75;
}

@keyframes chipIn {
  from { opacity: 0; transform: scale(.88); }
}

.host-question-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
  align-items: start;
}

.host-side {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 12px;
}

.host-stat {
  padding: 18px;
  border: 1px solid rgba(255, 233, 180, .18);
  border-radius: 16px;
  background: rgba(35, 8, 6, .3);
}

.host-stat strong {
  display: block;
  color: var(--gold-light);
  font-size: 30px;
}

.host-heat-empty p {
  margin: 12px 0 0;
  color: rgba(255, 248, 230, .62);
  font-size: 13px;
  line-height: 1.6;
}

.library-shell {
  display: grid;
  gap: 22px;
}

.library-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 44px;
  min-height: 340px;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid rgba(235, 204, 127, .32);
  border-radius: 28px 28px 48px 28px;
  background:
    linear-gradient(115deg, rgba(93, 21, 16, .96), rgba(61, 15, 12, .96)),
    var(--red-deep);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.library-hero::before {
  content: "卷";
  position: absolute;
  right: 18%;
  bottom: -150px;
  color: rgba(255, 224, 154, .05);
  font-family: var(--display);
  font-size: 430px;
  line-height: 1;
  transform: rotate(-8deg);
}

.library-hero > * {
  position: relative;
  z-index: 1;
}

.library-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #fff9e8;
  font-family: var(--display);
  font-size: clamp(39px, 6vw, 72px);
  line-height: 1.2;
  letter-spacing: .01em;
}

.library-hero > div > p:last-child {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 247, 225, .86);
  font-size: 17px;
  line-height: 1.85;
}

.library-count-seal {
  display: grid;
  place-items: center;
  width: 210px;
  height: 238px;
  justify-self: end;
  border: 1px solid rgba(255, 225, 153, .52);
  border-radius: 22px 22px 42px 22px;
  color: var(--gold-light);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .08), transparent 46%),
    rgba(58, 9, 7, .6);
  box-shadow: inset 0 0 0 7px rgba(73, 10, 7, .24), 0 24px 50px rgba(30, 4, 2, .24);
  transform: rotate(2deg);
}

.library-count-seal span,
.library-count-seal small {
  letter-spacing: .22em;
}

.library-count-seal strong {
  color: #fff4d0;
  font-family: var(--display);
  font-size: 72px;
  line-height: .85;
}

.library-controls {
  padding-top: 28px;
  padding-bottom: 24px;
}

.library-control-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 180px;
  gap: 14px;
  align-items: end;
}

.library-control-grid .field {
  margin: 0;
}

.library-control-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(106, 66, 38, .14);
  color: #6b5744;
  font-size: 12px;
}

.library-admin-link {
  padding: 6px 0;
  color: var(--red);
  background: transparent;
  font-weight: 800;
}

.library-results {
  display: grid;
  gap: 16px;
}

.library-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 0 4px;
  color: rgba(255, 247, 226, .76);
  font-size: 13px;
}

.library-result-head p {
  margin: 0;
}

.library-result-head strong {
  color: var(--gold-light);
  font-size: 22px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.library-card {
  position: relative;
  border: 1px solid rgba(105, 72, 42, .22);
  border-radius: 18px 18px 26px 18px;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 251, 239, .98), rgba(242, 229, 197, .98)),
    var(--paper);
  box-shadow: 0 14px 38px rgba(20, 10, 6, .15);
  overflow: hidden;
}

.library-card::after {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(151, 46, 33, .15);
  border-radius: inherit;
}

.library-card summary,
.library-card-body {
  position: relative;
  z-index: 1;
}

.library-card summary {
  display: grid;
  grid-template-columns: 48px 1fr 42px;
  align-items: start;
  gap: 14px;
  min-height: 156px;
  padding: 24px 22px;
  cursor: pointer;
  list-style: none;
}

.library-card summary::-webkit-details-marker {
  display: none;
}

.library-card summary:hover .library-prompt strong {
  color: var(--red);
}

.library-number {
  color: var(--red);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 900;
}

.library-prompt {
  display: grid;
  gap: 12px;
}

.library-prompt > strong {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  transition: color .18s ease;
}

.library-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.library-tags span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #775238;
  background: rgba(172, 125, 63, .12);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}

.library-tags .temporal-tag {
  color: #8c3d25;
  background: rgba(172, 72, 41, .12);
}

.library-unseal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  border-radius: 9px 9px 13px 9px;
  color: var(--gold-light);
  background: var(--red);
  font-family: var(--display);
  font-size: 18px;
  box-shadow: inset 0 0 0 3px rgba(74, 10, 7, .2);
}

.library-unseal b {
  display: none;
}

.library-card[open] .library-unseal i {
  display: none;
}

.library-card[open] .library-unseal b {
  display: inline;
}

.library-card[open] summary {
  min-height: auto;
  border-bottom: 1px solid rgba(112, 68, 38, .15);
  background: rgba(255, 253, 245, .45);
}

.library-card-body {
  display: grid;
  gap: 20px;
  padding: 22px;
}

.library-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.library-options > div {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid rgba(105, 70, 42, .14);
  border-radius: 11px;
  color: #6e5a48;
  background: rgba(255, 253, 246, .62);
}

.library-options > div > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--red);
  background: rgba(143, 32, 27, .08);
  font-weight: 900;
}

.library-options > div > strong {
  font-size: 13px;
  line-height: 1.5;
}

.library-options > div > small {
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
}

.library-options > div.correct {
  border-color: rgba(143, 32, 27, .28);
  color: var(--ink);
  background: rgba(239, 209, 131, .32);
}

.library-options > div.correct > span {
  color: #fff8e7;
  background: var(--red);
}

.library-explanation {
  padding: 18px;
  border-left: 4px solid var(--red);
  border-radius: 0 14px 14px 0;
  background: rgba(255, 250, 235, .66);
}

.library-explanation .eyebrow {
  margin-bottom: 7px;
  color: var(--red);
}

.library-explanation h3 {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 22px;
}

.library-explanation > p:not(.eyebrow) {
  margin: 0;
  color: #5f4b39;
  line-height: 1.75;
}

.library-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #75614f;
  font-size: 11px;
}

.library-source-row a {
  color: var(--red);
  font-weight: 800;
}

.library-more {
  justify-self: center;
  min-width: 220px;
  margin-top: 10px;
}

.library-empty {
  grid-column: 1 / -1;
  border-radius: 20px;
  background: var(--paper);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 24px;
}

.admin-shell {
  display: grid;
  gap: 20px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: 1fr 180px 160px auto;
  gap: 10px;
}

.question-list {
  display: grid;
  gap: 10px;
}

.question-row {
  display: grid;
  grid-template-columns: 85px 1fr 120px auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid rgba(103, 67, 39, .14);
  border-radius: 14px;
  background: rgba(255, 252, 242, .6);
}

.question-row.inactive {
  opacity: .52;
}

.question-id {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.question-copy strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.55;
}

.question-copy small {
  color: var(--muted);
}

.difficulty-dots {
  display: flex;
  gap: 4px;
}

.difficulty-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(143, 32, 27, .18);
}

.difficulty-dots i.on {
  background: var(--red);
}

.editor-card {
  border-color: rgba(160, 53, 39, .34);
}

.editor-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 11px;
}

.status-badge.temporal {
  background: #9a672e;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  gap: 9px;
  max-width: min(380px, calc(100% - 40px));
}

.toast {
  padding: 13px 16px;
  border: 1px solid rgba(255, 235, 183, .24);
  border-radius: 13px;
  color: var(--cream);
  background: rgba(47, 16, 12, .94);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .3);
  animation: toastIn .3s ease both;
}

.toast.error {
  background: rgba(126, 30, 24, .96);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid rgba(239, 215, 156, .13);
  color: rgba(255, 245, 218, .42);
  font-size: 11px;
  letter-spacing: .08em;
}

@media (max-width: 900px) {
  .home-hero,
  .result-layout,
  .lobby-layout,
  .host-question-layout {
    grid-template-columns: 1fr;
  }

  .home-modes,
  .paper-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .library-control-grid {
    grid-template-columns: 1fr 1fr;
  }

  .library-control-grid .field:first-child {
    grid-column: 1 / -1;
  }

  .host-side {
    position: static;
    grid-template-columns: repeat(2, 1fr);
  }

  .host-heat-panel,
  .host-heat-empty,
  .host-side > .primary-btn {
    grid-column: 1 / -1;
  }

  .qr-card {
    max-width: 380px;
    margin: 0 auto;
  }

  .stat-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    width: min(100% - 24px, 1240px);
    padding: 12px 0;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 15px;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    width: 210px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(3, 26, 27, .97);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .3);
  }

  .main-nav.open {
    display: grid;
  }

  .main-nav button {
    border-radius: 10px;
    text-align: left;
  }

  .nav-toggle {
    display: block;
  }

  .app-shell {
    width: min(100% - 24px, 1240px);
    padding: 18px 0 56px;
  }

  .home-hero {
    padding: 26px 20px;
    border-radius: 22px 22px 34px 22px;
  }

  .hero-title {
    font-size: clamp(48px, 18vw, 76px);
  }

  .hero-lede {
    margin: 20px 0;
    color: rgba(255, 246, 224, .92);
    font-size: 15px;
    line-height: 1.75;
  }

  .join-panel {
    padding: 20px 16px;
  }

  .join-panel p,
  .section-heading p {
    font-size: 14px;
    line-height: 1.75;
  }

  .paper-card {
    padding: 24px 16px;
    border-radius: 18px;
  }

  .library-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding: 30px 20px;
    border-radius: 22px 22px 34px 22px;
  }

  .library-hero h1 {
    font-size: clamp(36px, 11vw, 52px);
  }

  .library-hero > div > p:last-child {
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.75;
  }

  .library-count-seal {
    grid-template-columns: auto auto auto;
    gap: 10px;
    width: 100%;
    height: auto;
    padding: 18px 20px;
    justify-self: stretch;
    border-radius: 16px 16px 24px 16px;
    transform: none;
  }

  .library-count-seal strong {
    font-size: 48px;
  }

  .library-control-grid {
    grid-template-columns: 1fr;
  }

  .library-control-grid .field:first-child {
    grid-column: auto;
  }

  .library-control-foot,
  .library-result-head,
  .library-source-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-result-head {
    gap: 2px;
  }

  .library-card summary {
    grid-template-columns: 38px 1fr;
    gap: 10px;
    min-height: 138px;
    padding: 20px 16px;
  }

  .library-unseal {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 32px;
    height: 35px;
    font-size: 15px;
  }

  .library-prompt {
    padding-right: 22px;
  }

  .library-prompt > strong {
    font-size: 17px;
    line-height: 1.6;
  }

  .library-card-body {
    padding: 18px 14px;
  }

  .library-options {
    grid-template-columns: 1fr;
  }

  .paper-card::after {
    inset: 6px;
  }

  .mode-card {
    grid-template-columns: 58px 1fr;
    min-height: 138px;
    padding: 20px 18px;
  }

  .mode-copy strong {
    font-size: 20px;
  }

  .mode-copy span {
    font-size: 14px;
    line-height: 1.65;
  }

  .mode-mark {
    width: 54px;
    height: 68px;
    font-size: 27px;
  }

  .mode-arrow {
    display: none;
  }

  .setup-grid,
  .editor-options,
  .answer-grid {
    grid-template-columns: 1fr;
  }

  .setup-grid .span-two {
    grid-column: auto;
  }

  .field input,
  .field select,
  .inline-input {
    height: 52px;
    font-size: 16px;
  }

  .field textarea {
    font-size: 16px;
  }

  .avatar-picker {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .avatar-option {
    min-height: 58px;
    aspect-ratio: auto;
    font-size: 23px;
  }

  .game-topbar {
    grid-template-columns: 1fr auto;
  }

  .game-topbar > :last-child {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
  }

  .red-stage {
    min-height: calc(100vh - 120px);
    padding: 18px 14px 24px;
    border-radius: 22px;
  }

  .question-shell {
    min-height: 58vh;
    padding-top: 20px;
  }

  .question-title {
    margin-bottom: 22px;
    font-size: clamp(24px, 7vw, 34px);
  }

  .answer-btn {
    min-height: 68px;
    grid-template-columns: 38px 1fr;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.55;
  }

  .answer-key {
    width: 36px;
    height: 36px;
  }

  .timer-wrap {
    width: 68px;
    height: 68px;
  }

  .timer-value {
    font-size: 21px;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }

  .result-hero {
    min-height: auto;
    padding: 28px 18px;
  }

  .result-stats div {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(110, 70, 38, .12);
  }

  .room-code {
    letter-spacing: .06em;
  }

  .host-side {
    grid-template-columns: 1fr;
  }

  .host-heat-panel,
  .host-heat-empty,
  .host-side > .primary-btn {
    grid-column: auto;
  }

  .rank-row {
    grid-template-columns: 36px 40px 1fr auto;
    gap: 8px;
    padding: 11px 10px;
  }

  .rank-name {
    min-width: 0;
  }

  .rank-name strong,
  .rank-name small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rank-score strong {
    font-size: 17px;
  }

  .vote-panel {
    padding: 16px 14px;
  }

  .vote-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .vote-row {
    grid-template-columns: 34px minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .player-cloud {
    max-height: 230px;
    overflow-y: auto;
  }

  .rank-score small,
  .question-row .difficulty-dots {
    display: none;
  }

  .question-row {
    grid-template-columns: 70px 1fr auto;
  }

  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .site-footer {
    width: min(100% - 24px, 1240px);
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
