/* =========================================================
   月下手账 · 梦幻手账风主题
   在功能样式之上覆盖视觉：奶油纸、雾紫、蜜桃、薄荷、奶油黄
   ========================================================= */

@font-face {
  font-family: "Ma Shan Zheng";
  src: url("../fonts/MaShanZheng-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("../fonts/Caveat-subset.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fbf4ec;
  --paper-deep: #f6e9df;
  --cream: #fffaf4;
  --ink: #4d3a5b;
  --plum: #4d3a5b;
  --muted: #8d7995;
  --faint: #b6a4bc;
  --line: #e7d4e1;
  --line-soft: #f2e5ec;
  --wash: #f8edf3;
  --red: #e87598;
  --red-dark: #c95880;
  --lilac: #d8cdf7;
  --lilac-deep: #bfaef0;
  --peach: #ffd8c7;
  --peach-deep: #ffc3ac;
  --mint: #cdecdd;
  --mint-deep: #9ed9bb;
  --butter: #ffe9b6;
  --sky: #cbe4fb;
  --green: #5f9d7f;
  --shadow: 0 16px 36px rgba(92, 63, 108, 0.12);
  --shadow-soft: 0 7px 16px rgba(92, 63, 108, 0.08);
  --hand: "Ma Shan Zheng", "Kaiti SC", "KaiTi", "STKaiti", "Noto Serif SC", serif;
  --script: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --font: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --ui: "Noto Sans SC", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

body {
  color: var(--plum);
  background:
    radial-gradient(circle at 8% 8%, rgba(216, 205, 247, 0.55) 0, rgba(216, 205, 247, 0) 31%),
    radial-gradient(circle at 92% 12%, rgba(255, 216, 199, 0.7) 0, rgba(255, 216, 199, 0) 30%),
    radial-gradient(circle at 78% 94%, rgba(205, 236, 221, 0.55) 0, rgba(205, 236, 221, 0) 34%),
    radial-gradient(circle at 12% 92%, rgba(203, 228, 251, 0.45) 0, rgba(203, 228, 251, 0) 30%),
    var(--paper);
  background-attachment: fixed;
  font-family: var(--font);
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image: radial-gradient(rgba(103, 76, 116, 0.16) 1px, transparent 1px);
  background-size: 25px 25px;
  content: "";
  opacity: 0.5;
  pointer-events: none;
}

body::after {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  content: "";
  mix-blend-mode: multiply;
  opacity: 0.045;
  pointer-events: none;
}

::selection {
  color: var(--plum);
  background: var(--butter);
}

.page-frame {
  display: none !important;
}

.skip-link {
  border-radius: 999px;
  background: var(--plum);
}

/* ---------- 头部 ---------- */

.masthead {
  padding: 19px 46px 16px;
  border-bottom: 1.5px dashed rgba(91, 64, 105, 0.35);
  background: rgba(255, 250, 244, 0.72);
  backdrop-filter: blur(10px);
}

.brand {
  gap: 13px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(77, 58, 91, 0.15);
  border-radius: 15px 17px 14px 18px;
  color: var(--plum);
  background: linear-gradient(140deg, var(--lilac), var(--peach));
  box-shadow: 0 7px 0 rgba(143, 112, 156, 0.12), inset 0 2px 0 rgba(255, 255, 255, 0.65);
  font-family: var(--hand);
  font-size: 28px;
  font-weight: 400;
  transform: rotate(-4deg);
}

.brand-type strong {
  color: var(--plum);
  font-family: var(--hand);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.brand-type small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--script);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.masthead-note {
  color: var(--muted);
  font-family: var(--script);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.masthead-note span {
  color: var(--red);
}

.server-status {
  padding: 6px 10px;
  border: 1px dashed rgba(95, 157, 127, 0.45);
  border-radius: 999px;
  color: var(--green);
  background: rgba(205, 236, 221, 0.55);
  font-family: var(--ui);
  font-size: 9px;
  cursor: pointer;
}

.server-status:focus-visible {
  outline: 2px dashed var(--red);
  outline-offset: 3px;
}

.server-status .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.server-status.is-online .status-dot {
  background: #6ab58c;
}

.sound-toggle,
.quit-button {
  border: 1px dashed rgba(77, 58, 91, 0.3);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 250, 244, 0.75);
  font-family: var(--ui);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.sound-toggle {
  padding: 7px 11px;
}

.sound-toggle:hover {
  color: var(--plum);
  border-color: var(--red);
  background: var(--peach);
}

.quit-button {
  padding: 6px 10px;
  border-bottom-style: dashed;
}

.quit-button:hover {
  color: var(--red-dark);
  border-color: var(--red);
}

.sound-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

/* ---------- 首页 ---------- */

.screen-home {
  padding-top: clamp(46px, 6.5vh, 70px);
}

.eyebrow {
  color: var(--muted);
  font-family: var(--hand);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: none;
}

.rule-short {
  width: 27px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--peach-deep));
  transform: rotate(-4deg);
}

.hero h1 {
  margin: 26px 0 24px;
  color: var(--plum);
  font-family: var(--hand);
  font-size: clamp(60px, 6.9vw, 100px);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.07;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55);
}

.accent {
  position: relative;
  display: inline-block;
  color: var(--red-dark);
  background: linear-gradient(transparent 61%, rgba(255, 233, 182, 0.9) 61%, rgba(255, 233, 182, 0.9) 91%, transparent 91%);
  border-radius: 8px;
  padding: 0 0.05em;
}

.lede {
  max-width: 500px;
  color: #715e79;
  font-family: var(--font);
  font-size: 15px;
  letter-spacing: 0.03em;
  line-height: 2;
}

.hero-meta {
  gap: 28px;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1.5px dashed rgba(91, 64, 105, 0.3);
}

.meta-item strong {
  color: var(--red-dark);
  font-family: var(--script);
  font-size: 58px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.meta-item span {
  color: var(--muted);
  font-family: var(--ui);
  font-size: 9px;
}

.meta-scope {
  border-left: 1px dashed var(--line);
  color: var(--muted);
  font-family: var(--hand);
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.65;
}

/* ---------- 入场卡片 ---------- */

.setup-card {
  position: relative;
  border: 1.5px dashed rgba(91, 64, 105, 0.32);
  border-radius: 30px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: var(--shadow);
  transform: rotate(0.35deg);
}

.setup-card::before {
  position: absolute;
  z-index: 3;
  top: -15px;
  left: 50%;
  width: 118px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 0 7px, transparent 7px 14px),
    rgba(255, 205, 187, 0.8);
  box-shadow: 0 2px 5px rgba(99, 71, 113, 0.08);
  content: "";
  transform: translateX(-50%) rotate(-2.5deg);
}

.setup-head {
  padding: 19px 22px 13px;
  border-bottom: 1px dashed rgba(91, 64, 105, 0.3);
  color: var(--plum);
  background: transparent;
}

.setup-head h2 {
  font-family: var(--hand);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.setup-head span {
  color: var(--muted);
  font-family: var(--script);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.entry-tabs {
  gap: 6px;
  margin: 14px 18px 0;
  border-bottom: 0;
}

.entry-tab {
  padding: 10px 14px;
  border: 1px dashed transparent;
  border-radius: 13px 13px 5px 5px;
  color: var(--muted);
  background: #f8edf2;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 600;
}

.entry-tab + .entry-tab {
  border-left: 1px dashed transparent;
}

.entry-tab.is-active {
  color: var(--plum);
  border-color: rgba(91, 64, 105, 0.18);
  border-bottom-color: var(--peach-deep);
  background: var(--peach);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.entry-form .field,
.field {
  border-bottom: 1px dashed rgba(91, 64, 105, 0.2);
}

.entry-form .field {
  padding: 14px 20px 15px;
}

.field legend {
  color: var(--plum);
  font-family: var(--hand);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.field legend span {
  color: var(--faint);
  font-family: var(--script);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.field legend b {
  color: var(--red-dark);
}

.field-label {
  color: var(--muted);
  font-family: var(--ui);
  font-size: 10px;
  font-weight: 600;
}

.text-input {
  padding: 11px 13px;
  border: 1.5px dashed rgba(91, 64, 105, 0.3);
  border-radius: 14px;
  color: var(--plum);
  background: #fffdf9;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 500;
}

.text-input:focus {
  border-color: var(--red);
  outline: 2px solid rgba(232, 117, 152, 0.2);
  outline-offset: 1px;
}

.code-input {
  font-family: var(--script);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.field-hint {
  color: var(--faint);
  font-family: var(--ui);
}

.mode-list {
  gap: 8px;
}

.mode-body {
  padding: 11px 13px;
  border: 1.5px dashed rgba(91, 64, 105, 0.22);
  border-radius: 16px;
  background: #fffdf9;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.mode-option:hover .mode-body {
  border-color: rgba(91, 64, 105, 0.42);
  transform: translateY(-1px) rotate(-0.3deg);
}

.mode-option input:checked + .mode-body {
  color: var(--plum);
  border-color: rgba(91, 64, 105, 0.32);
  background: linear-gradient(135deg, rgba(216, 205, 247, 0.9), rgba(255, 216, 199, 0.75));
  box-shadow: 0 6px 0 rgba(143, 112, 156, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.mode-index {
  color: var(--red-dark);
  font-family: var(--script);
  font-size: 16px;
}

.mode-copy strong {
  font-family: var(--hand);
  font-size: 19px;
  font-weight: 400;
}

.mode-copy small {
  color: var(--muted);
  font-family: var(--ui);
  font-size: 9px;
}

.mode-option input:checked + .mode-body .mode-copy small {
  color: #816d8b;
}

.mode-arrow {
  color: var(--red-dark);
}

.cat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.cat span {
  position: relative;
  min-height: 33px;
  padding-right: 13px;
  border: 1.5px dashed rgba(91, 64, 105, 0.25);
  border-radius: 11px;
  color: #6e5a78;
  background: #fffdf9;
  font-family: var(--ui);
  font-size: 10px;
  font-weight: 500;
  transition: transform 150ms var(--ease), background 150ms var(--ease), box-shadow 150ms var(--ease);
}

.cat input:checked + span::after {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 4px;
  height: 7px;
  border-right: 1.5px solid var(--plum);
  border-bottom: 1.5px solid var(--plum);
  content: "";
  transform: rotate(45deg);
}

.cat:nth-child(8n + 1) span {
  background: #fff0e9;
}

.cat:nth-child(8n + 2) span {
  background: #f2edff;
}

.cat:nth-child(8n + 3) span {
  background: #eaf8f0;
}

.cat:nth-child(8n + 4) span {
  background: #fff7db;
}

.cat:nth-child(8n + 5) span {
  background: #eef5ff;
}

.cat:nth-child(8n + 6) span {
  background: #fdeef5;
}

.cat:nth-child(8n + 7) span {
  background: #f2f9e9;
}

.cat:nth-child(8n + 8) span {
  background: #f5efff;
}

.cat:hover span {
  border-color: var(--red);
  transform: translateY(-1px) rotate(-0.8deg);
}

.cat input:checked + span {
  color: var(--plum);
  border-color: rgba(91, 64, 105, 0.35);
  background: linear-gradient(135deg, var(--lilac), var(--peach));
  box-shadow: 0 4px 0 rgba(143, 112, 156, 0.1);
}

.cat-links button {
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  font-family: var(--ui);
}

.cat-links button:hover {
  color: var(--red-dark);
  border-color: var(--red);
}

.cat-tools p {
  color: var(--faint);
  font-family: var(--ui);
}

.start-button {
  width: calc(100% - 40px);
  margin: 20px;
  padding: 14px 19px;
  border: 0;
  border-radius: 999px;
  color: #fffdf9;
  background: linear-gradient(135deg, #ed8fa9, #e4648d);
  box-shadow: 0 9px 0 rgba(181, 84, 117, 0.16), 0 12px 22px rgba(231, 100, 141, 0.18);
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transform: rotate(-0.3deg);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.start-button:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #e77b9b, #d95380);
  box-shadow: 0 11px 0 rgba(181, 84, 117, 0.14), 0 16px 26px rgba(231, 100, 141, 0.22);
  transform: translateY(-2px) rotate(0.2deg);
}

.start-button:active {
  transform: translateY(3px);
  box-shadow: 0 5px 0 rgba(181, 84, 117, 0.14);
}

.start-button:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
}

.start-button:disabled {
  color: #a996b0;
  border-color: transparent;
  background: #f0e2e9;
  box-shadow: none;
  transform: none;
}

.setup-foot {
  padding: 0 20px 16px;
  color: var(--faint);
  font-family: var(--ui);
  font-size: 8px;
}

.form-error {
  margin: 0 20px 12px;
  border: 1px dashed rgba(232, 117, 152, 0.45);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  color: var(--red-dark);
  background: #fff2f4;
  font-family: var(--ui);
}

/* ---------- 玩法 ---------- */

.howto {
  margin-top: clamp(56px, 8vh, 86px);
  padding-top: 20px;
  border-top: 1.5px dashed rgba(91, 64, 105, 0.3);
}

.section-head h2 {
  color: var(--plum);
  font-family: var(--hand);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.section-head > span {
  color: var(--muted);
  font-family: var(--script);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.howto-grid {
  gap: 14px;
  margin-top: 12px;
}

.howto-grid article,
.howto-grid article + article {
  min-height: 160px;
  padding: 22px 23px 18px;
  border: 1.5px dashed rgba(91, 64, 105, 0.22);
  border-radius: 22px;
  background: #fff6ef;
  box-shadow: var(--shadow-soft);
  transform: rotate(-1deg);
}

.howto-grid article:nth-child(2) {
  background: #f3efff;
  transform: rotate(1.1deg);
}

.howto-grid article:nth-child(3) {
  background: #edf8f1;
  transform: rotate(-0.5deg);
}

.howto-num {
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: var(--red-dark);
  background: var(--butter);
  font-family: var(--script);
  font-size: 18px;
  font-weight: 600;
}

.howto-grid h3 {
  margin-top: 10px;
  color: var(--plum);
  font-family: var(--hand);
  font-size: 25px;
  font-weight: 400;
}

.howto-grid p {
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
}

/* ---------- 房间 ---------- */

.screen-room {
  padding-top: 38px;
}

.room-head {
  padding-bottom: 22px;
  border-bottom: 1.5px dashed rgba(91, 64, 105, 0.35);
}

.room-head h1 {
  color: var(--plum);
  font-family: var(--hand);
  font-size: clamp(44px, 5.3vw, 72px);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.room-code-inline {
  color: var(--red-dark);
  font-family: var(--script);
  font-size: 1.22em;
  letter-spacing: 0.04em;
}

.room-sub {
  color: var(--muted);
  font-family: var(--font);
}

.button-line,
.button-solid {
  border: 1.5px dashed rgba(91, 64, 105, 0.35);
  border-radius: 999px;
  font-family: var(--ui);
  font-size: 10px;
  transition: transform 150ms var(--ease), background 150ms var(--ease), box-shadow 150ms var(--ease);
}

.button-line {
  color: var(--muted);
  background: rgba(255, 250, 244, 0.7);
}

.button-line:hover {
  color: var(--plum);
  border-color: var(--red);
  background: var(--peach);
}

.button-solid {
  border-color: transparent;
  color: #fffdf9;
  background: linear-gradient(135deg, #ed8fa9, #e4648d);
  box-shadow: 0 5px 0 rgba(181, 84, 117, 0.14);
}

.button-solid:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #e77b9b, #d95380);
  transform: translateY(-1px);
}

.room-grid {
  gap: 16px;
  border: 0;
}

.room-code-panel,
.room-players-panel,
.room-settings-panel {
  position: relative;
  padding: 23px 22px 21px;
  border: 1.5px dashed rgba(91, 64, 105, 0.28);
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.9);
  box-shadow: var(--shadow-soft);
}

.room-code-panel {
  border-right: 1.5px dashed rgba(91, 64, 105, 0.28);
  background: #fff8ef;
  transform: rotate(-0.35deg);
}

.room-code-panel::before,
.question-card::before,
.result-card::before {
  position: absolute;
  z-index: 2;
  top: -12px;
  left: 50%;
  width: 86px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.3) 0 6px, transparent 6px 12px),
    rgba(216, 205, 247, 0.78);
  content: "";
  transform: translateX(-50%) rotate(2deg);
}

.room-players-panel {
  border-right: 1.5px dashed rgba(91, 64, 105, 0.28);
  background: #f6f1ff;
  transform: rotate(0.3deg);
}

.room-settings-panel {
  background: #f1faf4;
  transform: rotate(-0.2deg);
}

.room-code {
  color: var(--red-dark);
  font-family: var(--script);
  font-size: clamp(62px, 7.3vw, 104px);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.rail-label {
  color: var(--muted);
  font-family: var(--ui);
  font-size: 8px;
}

.room-link-label {
  color: var(--muted);
  font-family: var(--hand);
  font-size: 15px;
}

.room-link-row code {
  border: 1.5px dashed rgba(91, 64, 105, 0.25);
  border-radius: 12px;
  color: var(--muted);
  background: #fffdf9;
  font-family: var(--ui);
}

.room-link-row .button-solid {
  border-radius: 12px;
  box-shadow: 0 4px 0 rgba(181, 84, 117, 0.12);
}

.room-note {
  color: var(--faint);
  font-family: var(--ui);
}

.room-panel-head {
  border-bottom: 1px dashed rgba(91, 64, 105, 0.25);
}

.room-panel-head h2 {
  color: var(--plum);
  font-family: var(--hand);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.room-panel-head span {
  color: var(--muted);
  font-family: var(--script);
  font-size: 13px;
}

.room-player {
  border: 1.5px dashed rgba(91, 64, 105, 0.22);
  border-radius: 16px;
  background: #fff9f2;
}

.room-player.slot-0 {
  background: #ffede6;
}

.room-player.slot-1 {
  background: #eaf7f0;
}

.room-player.is-you {
  border-color: var(--red);
  border-style: solid;
  box-shadow: 0 4px 0 rgba(232, 117, 152, 0.1);
}

.room-player.is-empty {
  border-color: rgba(91, 64, 105, 0.2);
  background: rgba(255, 255, 255, 0.35);
}

.room-player-side {
  border-radius: 50%;
  color: #fffdf9;
  background: var(--plum);
  font-family: var(--script);
  font-size: 15px;
}

.room-player.slot-0 .room-player-side {
  background: var(--red);
}

.room-player.is-empty .room-player-side {
  color: var(--faint);
  background: #eee2ea;
}

.room-player-copy strong {
  color: var(--plum);
  font-family: var(--ui);
}

.room-player-copy small {
  color: var(--muted);
  font-family: var(--ui);
}

.room-player-state {
  color: var(--green);
  font-family: var(--ui);
}

.room-status {
  color: var(--muted);
  font-family: var(--font);
}

.room-settings > div {
  border-bottom: 1px dashed rgba(91, 64, 105, 0.22);
}

.room-settings dt {
  color: var(--muted);
  font-family: var(--ui);
}

.room-settings dd {
  color: var(--plum);
  font-family: var(--ui);
  font-weight: 500;
}

.room-settings-panel .start-button {
  width: 100%;
  margin: 18px 0 0;
}

.room-settings-panel .start-button:disabled {
  color: #a996b0;
  background: #eadfe6;
  box-shadow: none;
}

/* ---------- 对局 ---------- */

/* 抢分模式每题都会重绘，重绘时不要再播放入场动画。 */
#gameStage .game-body,
#gameStage .waiting-body,
#gameStage .countdown-stage {
  animation: none !important;
}

.online-head {
  padding-bottom: 13px;
  border-bottom: 1.5px dashed rgba(91, 64, 105, 0.32);
}

.game-match > span {
  color: var(--red-dark);
  font-family: var(--hand);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.game-match > strong {
  color: var(--muted);
  font-family: var(--ui);
  font-size: 11px;
}

.room-chip {
  color: var(--faint);
  font-family: var(--script);
  font-size: 12px;
}

.room-chip b {
  color: var(--muted);
  font-family: var(--script);
  font-size: 14px;
}

.scoreboard {
  gap: 9px;
}

.score-card {
  padding: 9px 15px 7px;
  border: 1.5px dashed rgba(91, 64, 105, 0.25);
  border-top: 1.5px dashed rgba(91, 64, 105, 0.25);
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: var(--shadow-soft);
  transform: rotate(-0.3deg);
}

.score-b {
  transform: rotate(0.3deg);
}

.score-a.is-active {
  border-color: rgba(232, 117, 152, 0.55);
  border-top-color: rgba(232, 117, 152, 0.55);
  background: #ffe9df;
  box-shadow: 0 5px 0 rgba(232, 117, 152, 0.12);
}

.score-b.is-active {
  border-color: rgba(143, 112, 156, 0.45);
  border-top-color: rgba(143, 112, 156, 0.45);
  background: #eee8ff;
  box-shadow: 0 5px 0 rgba(143, 112, 156, 0.1);
}

.score-card.is-offline {
  opacity: 0.6;
}

.score-player {
  color: var(--muted);
  font-family: var(--ui);
}

.score-side {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: #fffdf9;
  background: var(--plum);
  font-family: var(--script);
  font-size: 14px;
  font-weight: 600;
}

.score-a .score-side {
  background: var(--red);
}

.score-line strong {
  color: var(--plum);
  font-family: var(--script);
  font-size: clamp(40px, 4.2vw, 58px);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.score-line span {
  font-family: var(--ui);
}

.you-tag {
  border-radius: 999px;
  background: var(--red) !important;
  font-family: var(--ui);
}

.offline-tag {
  border: 1px dashed var(--line) !important;
  border-radius: 999px;
  font-family: var(--ui);
}

.match-center {
  border-right: 1px dashed rgba(91, 64, 105, 0.25);
  border-left: 1px dashed rgba(91, 64, 105, 0.25);
}

.match-center span:first-child {
  color: var(--plum);
  font-family: var(--hand);
  font-size: 14px;
  font-weight: 400;
}

.match-center span:last-child {
  color: var(--muted);
  font-family: var(--ui);
}

.timer-track {
  height: 10px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: #f1e3ea;
  box-shadow: inset 0 1px 2px rgba(91, 64, 105, 0.08);
}

.timer-fill {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--peach-deep) 50%, var(--lilac-deep));
}

.game-body {
  gap: 16px;
  margin-top: 21px;
  border: 0;
}

.question-card {
  position: relative;
  padding: 32px 32px 28px;
  border: 1.5px dashed rgba(91, 64, 105, 0.3);
  border-radius: 27px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: var(--shadow);
}

.cat-chip {
  min-height: 25px;
  padding: 4px 10px;
  border: 1px dashed rgba(91, 64, 105, 0.2);
  border-radius: 999px;
  color: var(--plum);
  background: var(--peach);
  font-family: var(--ui);
  font-size: 9px;
  font-weight: 600;
}

.q-index {
  color: var(--muted);
  font-family: var(--script);
  font-size: 15px;
  letter-spacing: 0.05em;
}

.turn-badge {
  border: 1px dashed rgba(232, 117, 152, 0.55);
  border-radius: 999px;
  color: var(--red-dark);
  background: #fff2f4;
  font-family: var(--ui);
}

.question-card h2 {
  margin: 22px 0 27px;
  color: var(--plum);
  font-family: var(--font);
  font-size: clamp(25px, 2.8vw, 39px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.42;
}

.options {
  gap: 11px;
}

.option {
  position: relative;
  min-height: 76px;
  padding: 14px 15px;
  border: 1.5px dashed rgba(91, 64, 105, 0.2);
  border-radius: 17px;
  color: var(--plum);
  background: #fff6ef;
  box-shadow: 0 4px 0 rgba(143, 112, 156, 0.06);
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 150ms var(--ease), background 150ms var(--ease), box-shadow 150ms var(--ease);
}

#options .option:nth-child(2):not(.is-correct):not(.is-wrong):not(.is-dim):not(.is-pending) {
  background: #f3efff;
}

#options .option:nth-child(3):not(.is-correct):not(.is-wrong):not(.is-dim):not(.is-pending) {
  background: #eaf8f0;
}

#options .option:nth-child(4):not(.is-correct):not(.is-wrong):not(.is-dim):not(.is-pending) {
  background: #fff7dc;
}

.option.is-pending,
.skip-button.is-pending {
  background: var(--butter) !important;
  outline: 2px dashed var(--red);
  outline-offset: 3px;
  animation: pending-pulse 900ms ease-in-out infinite;
}

.quit-button.is-armed {
  color: #fffdf9;
  border-color: var(--red);
  background: var(--red);
}

.option:hover:not(:disabled) {
  color: var(--plum);
  border-color: rgba(232, 117, 152, 0.6);
  background: #fff3ed;
  box-shadow: 0 7px 0 rgba(232, 117, 152, 0.08);
  transform: translateY(-2px) rotate(-0.35deg);
}

.option-letter {
  width: 31px;
  height: 31px;
  border: 1px dashed rgba(91, 64, 105, 0.35);
  border-radius: 50%;
  color: var(--plum);
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--script);
  font-size: 18px;
  font-weight: 600;
}

.option:hover:not(:disabled) .option-letter {
  color: var(--plum);
  border-color: var(--red);
  background: var(--peach);
}

.option-text {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 500;
}

.option.is-correct {
  color: var(--plum);
  border-color: var(--mint-deep);
  border-style: solid;
  background: var(--mint);
  box-shadow: 0 4px 0 rgba(94, 157, 127, 0.14), inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.option.is-correct .option-letter {
  color: #fffdf9;
  border-color: var(--green);
  background: var(--green);
}

.option.is-wrong {
  color: var(--red-dark);
  border-color: var(--red);
  border-style: solid;
  background: #ffe3e9;
}

.option.is-wrong .option-letter {
  color: #fffdf9;
  border-color: var(--red);
  background: var(--red);
}

.option.is-wrong .option-text {
  text-decoration-thickness: 1.5px;
}

.option.is-dim {
  opacity: 0.42;
}

.verdict {
  margin-top: 23px;
  padding: 17px 18px 16px;
  border: 1.5px dashed rgba(91, 64, 105, 0.26);
  border-radius: 18px;
  background: #fff5e9;
}

.verdict.is-miss {
  background: #fff0f2;
}

.verdict-head strong {
  color: var(--plum);
  font-family: var(--hand);
  font-size: 23px;
  font-weight: 400;
}

.verdict-head span {
  color: var(--red-dark);
  font-family: var(--script);
  font-size: 20px;
  font-weight: 600;
}

.verdict p {
  color: var(--muted);
  font-family: var(--font);
}

.verdict .verdict-answer {
  color: var(--plum);
  font-family: var(--ui);
}

.verdict .verdict-answer span {
  color: var(--red-dark);
}

.auto-next {
  color: var(--faint);
  font-family: var(--script);
  font-size: 13px;
}

.next-button {
  border: 1.5px dashed rgba(91, 64, 105, 0.35);
  border-radius: 999px;
  color: var(--plum);
  background: #fffaf4;
  font-family: var(--ui);
}

.next-button:hover {
  color: #fffdf9;
  border-color: transparent;
  background: var(--plum);
}

.play-rail,
.waiting-aside {
  padding: 25px 22px 21px;
  border: 1.5px dashed rgba(91, 64, 105, 0.25);
  border-radius: 24px;
  background: rgba(248, 237, 243, 0.9);
  box-shadow: var(--shadow-soft);
}

.turn-box {
  border-bottom: 1px dashed rgba(91, 64, 105, 0.25);
}

.turn-box strong {
  color: var(--plum);
  font-family: var(--hand);
  font-size: 29px;
  font-weight: 400;
}

.turn-box > span:last-child {
  color: var(--red-dark);
  font-family: var(--ui);
}

.turn-box.is-p2 > span:last-child {
  color: var(--plum);
}

.clock {
  color: var(--red-dark);
}

.clock > span {
  font-family: var(--script);
  font-size: 76px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.clock > small {
  color: var(--muted);
  font-family: var(--ui);
}

.clock-box.is-urgent .clock {
  color: var(--red);
}

.clock-scale {
  height: 4px;
  border-radius: 999px;
  background-image: repeating-linear-gradient(to right, var(--muted) 0 1px, transparent 1px 10%);
  opacity: 0.25;
}

.mini-stats > div {
  border-bottom: 1px dashed rgba(91, 64, 105, 0.25);
}

.mini-stats dt {
  color: var(--muted);
  font-family: var(--ui);
}

.mini-stats dd {
  color: var(--plum);
  font-family: var(--script);
  font-size: 17px;
  font-weight: 600;
}

.rail-tip {
  color: var(--faint);
  font-family: var(--ui);
}

.skip-button {
  border: 1.5px dashed rgba(91, 64, 105, 0.25);
  border-radius: 999px;
  color: var(--muted);
  background: #fffaf4;
  font-family: var(--ui);
}

.skip-button:hover {
  color: var(--plum);
  border-color: var(--red);
  background: var(--peach);
}

/* 等待对方 */

.waiting-body {
  position: relative;
  gap: 16px;
  border: 0;
}

.waiting-main {
  position: relative;
  padding: 40px 38px;
  border: 1.5px dashed rgba(91, 64, 105, 0.3);
  border-radius: 27px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: var(--shadow);
}

.waiting-main::before {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 94px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 0 6px, transparent 6px 12px),
    rgba(255, 216, 199, 0.8);
  content: "";
  transform: translateX(-50%) rotate(-2deg);
}

.waiting-kicker {
  color: var(--red-dark);
  font-family: var(--hand);
  font-size: 16px;
  font-weight: 400;
}

.waiting-main h2 {
  color: var(--plum);
  font-family: var(--font);
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.waiting-main p {
  color: var(--muted);
  font-family: var(--font);
}

.waiting-clock {
  color: var(--red-dark);
}

.waiting-clock span {
  font-family: var(--script);
  font-size: clamp(64px, 8vw, 100px);
  font-weight: 600;
}

.waiting-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

/* 倒计时 */

.countdown-stage {
  position: relative;
  min-height: 540px;
  border: 1.5px dashed rgba(91, 64, 105, 0.3);
  border-radius: 30px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: var(--shadow);
}

.countdown-stage::before {
  position: absolute;
  top: -15px;
  left: 50%;
  width: 120px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 0 7px, transparent 7px 14px),
    rgba(216, 205, 247, 0.8);
  content: "";
  transform: translateX(-50%) rotate(-2deg);
}

.countdown-kicker {
  color: var(--red-dark);
  font-family: var(--hand);
  font-size: 17px;
}

.countdown-number {
  color: var(--red-dark);
  font-family: var(--script);
  font-size: clamp(150px, 18vw, 220px);
  font-weight: 600;
  text-shadow: 0 5px 0 rgba(232, 117, 152, 0.12);
}

.countdown-stage p {
  color: var(--muted);
  font-family: var(--font);
}

.countdown-players {
  padding: 8px 14px;
  border: 1px dashed rgba(91, 64, 105, 0.22);
  border-radius: 999px;
  background: #fff9f2;
}

.countdown-players i {
  border-radius: 50%;
}

/* 抢分 */

.sprint-last {
  margin: -5px 0 18px;
  padding: 9px 12px;
  border: 1px dashed rgba(91, 64, 105, 0.22);
  border-radius: 13px;
  color: var(--muted);
  background: #fff6e8;
  font-family: var(--font);
}

.sprint-last.is-good {
  border-color: rgba(94, 157, 127, 0.35);
  background: #eaf8f0;
}

.sprint-last.is-bad {
  border-color: rgba(232, 117, 152, 0.35);
  background: #fff0f2;
}

.sprint-last b {
  color: var(--plum);
  font-family: var(--script);
  font-size: 15px;
}

.sprint-done h2 {
  color: var(--plum);
  font-family: var(--font);
}

.sprint-done p {
  color: var(--muted);
  font-family: var(--font);
}

.sprint-done-badge {
  border-radius: 999px;
  color: #fffdf9;
  background: var(--plum);
  font-family: var(--ui);
}

.opponent-mini {
  border-top: 1px dashed rgba(91, 64, 105, 0.25);
}

.opponent-mini strong {
  color: var(--plum);
  font-family: var(--ui);
}

.opponent-mini span {
  color: var(--muted);
  font-family: var(--ui);
}

/* ---------- 结果 ---------- */

.result-head {
  border-bottom: 1.5px dashed rgba(91, 64, 105, 0.35);
}

.winner-badge {
  border-radius: 999px;
  color: #fffdf9;
  background: linear-gradient(135deg, #ed8fa9, #e4648d);
  box-shadow: 0 4px 0 rgba(181, 84, 117, 0.12);
  font-family: var(--script);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  transform: rotate(-2deg);
}

.winner-badge.is-draw {
  background: var(--plum);
}

.result-head h1 {
  color: var(--plum);
  font-family: var(--font);
  font-weight: 800;
}

.result-sub {
  color: var(--muted);
  font-family: var(--font);
}

.result-board {
  gap: 16px;
  border: 0;
}

.result-card {
  position: relative;
  padding: 24px 24px 21px;
  border: 1.5px dashed rgba(91, 64, 105, 0.28);
  border-radius: 25px;
  background: #fff8ef;
  box-shadow: var(--shadow-soft);
  transform: rotate(-0.35deg);
}

.result-card + .result-card {
  border-top: 1.5px dashed rgba(91, 64, 105, 0.28);
  border-left: 1.5px dashed rgba(91, 64, 105, 0.28);
  background: #f3efff;
  transform: rotate(0.35deg);
}

.result-card.is-you {
  border-top: 1.5px dashed rgba(91, 64, 105, 0.28);
}

.result-card.is-winner,
.result-card.is-winner.is-you {
  border-color: rgba(232, 117, 152, 0.5);
  border-top-color: rgba(232, 117, 152, 0.5);
  background: linear-gradient(145deg, #fff8e4, #ffe4ec 70%);
  box-shadow: 0 13px 26px rgba(232, 117, 152, 0.14);
}

.result-card.is-draw {
  background: linear-gradient(145deg, #fff8e4, #eef5ff);
}

.result-side {
  border-radius: 50%;
  background: var(--plum);
  font-family: var(--script);
  font-size: 15px;
}

.result-a .result-side {
  background: var(--red);
}

.result-card-head h2 {
  color: var(--plum);
  font-family: var(--ui);
}

.result-verdict {
  border: 1.5px dashed rgba(91, 64, 105, 0.3);
  border-radius: 50%;
  color: var(--muted);
  background: #fffaf4;
  font-family: var(--ui);
  font-size: 10px;
  font-weight: 600;
}

.result-card.is-winner .result-verdict {
  color: #fffdf9;
  border-color: transparent;
  background: var(--red);
}

.result-card.is-draw .result-verdict {
  color: #fffdf9;
  border-color: transparent;
  background: var(--plum);
}

.result-score strong {
  color: var(--plum);
  font-family: var(--script);
  font-size: clamp(74px, 8.8vw, 112px);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.result-score span {
  font-family: var(--ui);
}

.result-stats {
  border-top: 1px dashed rgba(91, 64, 105, 0.25);
}

.result-stats > div {
  border-bottom: 1px dashed rgba(91, 64, 105, 0.25);
}

.result-stats dt {
  color: var(--muted);
  font-family: var(--ui);
}

.result-stats dd {
  color: var(--plum);
  font-family: var(--script);
  font-size: 23px;
  font-weight: 600;
}

.result-bar {
  height: 10px;
  border-radius: 999px;
  background: #f2e4eb;
}

.result-bar i {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--peach-deep));
}

.result-b .result-bar i {
  background: linear-gradient(90deg, var(--lilac-deep), var(--sky));
}

.result-actions .is-waiting {
  color: var(--muted);
  font-family: var(--ui);
}

/* 错题回顾 */

.review {
  border-top: 1.5px dashed rgba(91, 64, 105, 0.3);
}

.review-grid {
  gap: 16px;
}

.review-player {
  padding: 15px 17px;
  border: 1.5px dashed rgba(91, 64, 105, 0.24);
  border-radius: 20px;
  background: rgba(255, 250, 244, 0.75);
}

.review-player-head {
  border-bottom: 1px dashed rgba(91, 64, 105, 0.25);
}

.review-player-head strong {
  color: var(--plum);
  font-family: var(--hand);
  font-size: 19px;
  font-weight: 400;
}

.review-player-head span {
  color: var(--muted);
  font-family: var(--ui);
}

.review-item {
  border-bottom: 1px dashed rgba(91, 64, 105, 0.22);
}

.review-cat {
  color: var(--red-dark);
  font-family: var(--ui);
}

.review-item h3 {
  color: var(--plum);
  font-family: var(--font);
}

.review-answer {
  color: var(--muted);
  font-family: var(--ui);
}

.review-answer b {
  color: var(--plum);
}

.review-note {
  color: var(--faint);
  font-family: var(--font);
}

.review-empty,
.review-player-empty {
  color: var(--muted);
  font-family: var(--font);
}

/* ---------- 弹层 / 连接 ---------- */

.conn-banner {
  border: 1.5px dashed rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  color: #fffdf9;
  background: var(--plum);
  box-shadow: var(--shadow-soft);
  font-family: var(--ui);
}

.notice {
  background: rgba(251, 244, 236, 0.94);
  backdrop-filter: blur(6px);
}

.notice-panel {
  position: relative;
  border: 1.5px dashed rgba(91, 64, 105, 0.3);
  border-top: 1.5px dashed rgba(91, 64, 105, 0.3);
  border-radius: 28px;
  background: var(--cream);
  box-shadow: var(--shadow);
}

.notice-panel::before {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 104px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 0 6px, transparent 6px 12px),
    rgba(255, 216, 199, 0.85);
  content: "";
  transform: translateX(-50%) rotate(-2deg);
}

.notice-kicker {
  color: var(--red-dark);
  font-family: var(--hand);
  font-size: 16px;
  font-weight: 400;
}

.notice-panel h2 {
  color: var(--plum);
  font-family: var(--hand);
  font-weight: 400;
}

.notice-text {
  color: var(--muted);
  font-family: var(--font);
}

.overlay-button {
  border: 0;
  border-radius: 999px;
  color: #fffdf9;
  background: linear-gradient(135deg, #ed8fa9, #e4648d);
  box-shadow: 0 7px 0 rgba(181, 84, 117, 0.14);
  font-family: var(--ui);
}

.overlay-button:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #e77b9b, #d95380);
  transform: translateY(-1px);
}

.toast {
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: var(--plum);
  font-family: var(--ui);
}

/* ---------- 手账装饰层：纸纹、贴纸、便签、手写批注 ---------- */

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.hero {
  position: relative;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.date-stamp {
  padding-bottom: 2px;
  border-bottom: 1.5px dashed rgba(91, 64, 105, 0.28);
  color: var(--muted);
  font-family: var(--script);
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  transform: rotate(-2deg);
}

.sticker {
  position: absolute;
  z-index: 4;
  display: block;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 3px 2px rgba(74, 49, 89, 0.14));
}

.sticker-cluster {
  position: absolute;
  top: 70px;
  right: -74px;
  width: 94px;
  height: 150px;
  z-index: 3;
  pointer-events: none;
}

.sticker-hero-star {
  top: 0;
  right: 10px;
  width: 52px;
  height: 52px;
  color: #efb3c6;
  transform: rotate(13deg);
}

.sticker-hero-flower {
  top: 54px;
  right: 0;
  width: 39px;
  height: 39px;
  color: #bba6e9;
  transform: rotate(-10deg);
}

.sticker-hero-sparkle {
  top: 100px;
  right: 44px;
  width: 22px;
  height: 22px;
  color: #f4c987;
  transform: rotate(8deg);
}

.sticker-hero-heart {
  top: 111px;
  right: 4px;
  width: 25px;
  height: 25px;
  color: #9fd9bb;
  transform: rotate(-14deg);
}

/* 便签纸 */

.sticky-note {
  position: relative;
  width: 270px;
  margin: 28px 24px 0 auto;
  padding: 20px 20px 17px;
  border: 1px solid rgba(120, 93, 78, 0.16);
  border-radius: 3px 11px 4px 9px;
  color: #5c4763;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 25%),
    linear-gradient(155deg, #fff8d9, #ffeab1);
  box-shadow: 5px 6px 0 rgba(151, 112, 136, 0.08), 0 12px 24px rgba(92, 63, 108, 0.1);
  font-family: var(--hand);
  line-height: 1.25;
  transform: rotate(-1.6deg);
}

.sticky-note p {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.18;
}

.sticky-note small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--ui);
  font-size: 8px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.note-tape {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 74px;
  height: 19px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0 6px, transparent 6px 12px),
    rgba(255, 197, 180, 0.82);
  transform: translateX(-50%) rotate(-2deg);
}

.note-sticker {
  right: 11px;
  bottom: 8px;
  width: 31px;
  height: 31px;
  color: #e98aa6;
  transform: rotate(10deg);
}

.note-home {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 25%),
    linear-gradient(155deg, #f0edff, #ddd3f8);
  transform: rotate(1.4deg);
}

.note-home .note-tape {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0 6px, transparent 6px 12px),
    rgba(205, 231, 218, 0.82);
}

.note-room {
  width: auto;
  margin: 18px 0 0;
  padding: 16px 16px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 25%),
    linear-gradient(150deg, #eaf8ef, #d1eedf);
  transform: rotate(1.3deg);
}

.note-room p {
  font-size: 20px;
}

.note-room small {
  font-size: 8px;
}

.note-room .note-tape {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0 6px, transparent 6px 12px),
    rgba(255, 233, 182, 0.85);
}

.note-result {
  width: 240px;
  margin: 20px 0 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 25%),
    linear-gradient(150deg, #ffe9ef, #ffd3df);
  transform: rotate(2deg);
}

.note-result p {
  font-size: 23px;
}

/* 卡片上的贴纸 / 胶带 / 折角 */

.setup-card::after {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 34px;
  height: 34px;
  border-radius: 0 0 30px 0;
  background: linear-gradient(135deg, transparent 48%, #efd6e3 49%, #fffaf4 72%);
  content: "";
  pointer-events: none;
}

.room-code-panel {
  position: relative;
}

.sticker-room-star {
  top: 14px;
  right: 22px;
  width: 27px;
  height: 27px;
  color: #efb3c6;
  transform: rotate(16deg);
}

.sticker-room-flower {
  top: -14px;
  left: 22px;
  width: 30px;
  height: 30px;
  color: #bba6e9;
  transform: rotate(-11deg);
}

.question-card::after {
  position: absolute;
  top: -11px;
  left: 24px;
  width: 13px;
  height: 39px;
  border: 2px solid #b9a6c9;
  border-radius: 9px;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.65) inset;
  content: "";
  pointer-events: none;
  transform: rotate(11deg);
}

.stage-sticker {
  width: 33px;
  height: 33px;
  opacity: 0.95;
}

.stage-sticker-a {
  right: 24px;
  bottom: 22px;
  color: #efb3c6;
  transform: rotate(12deg);
}

.stage-sticker-b {
  right: 66px;
  bottom: 43px;
  width: 21px;
  height: 21px;
  color: #bba6e9;
  transform: rotate(-9deg);
}

.stage-sticker-c {
  right: 72px;
  bottom: 34px;
  width: 24px;
  height: 24px;
  color: #f0c98e;
  transform: rotate(9deg);
}

.stage-sticker-d {
  right: 24px;
  bottom: 52px;
  width: 25px;
  height: 25px;
  color: #a8d8bd;
  transform: rotate(-12deg);
}

.stage-sticker-e {
  right: 28px;
  bottom: 19px;
  width: 17px;
  height: 17px;
  color: #efb3c6;
  transform: rotate(7deg);
}

.paper-stamp {
  position: absolute;
  right: 28px;
  bottom: 20px;
  padding: 4px 7px;
  border: 2px solid rgba(200, 88, 128, 0.58);
  border-radius: 3px;
  color: rgba(200, 88, 128, 0.7);
  font-family: var(--hand);
  font-size: 15px;
  letter-spacing: 0.08em;
  line-height: 1;
  pointer-events: none;
  transform: rotate(-8deg);
}

.rail-sticky {
  width: 108px;
  margin: 16px 0 4px auto;
  padding: 10px 12px;
  border: 1px solid rgba(120, 93, 78, 0.14);
  border-radius: 2px 8px 3px 7px;
  color: #64506b;
  background: linear-gradient(150deg, #fff8d9, #ffecb9);
  box-shadow: 3px 3px 0 rgba(151, 112, 136, 0.07);
  font-family: var(--hand);
  font-size: 18px;
  line-height: 1.1;
  transform: rotate(-2deg);
}

.rail-sticky-sprint {
  background: linear-gradient(150deg, #eef9f1, #d8efdf);
  transform: rotate(1.5deg);
}

.waiting-sticker {
  top: 18px;
  right: 24px;
  width: 41px;
  height: 41px;
  color: #bcd8f3;
  transform: rotate(-8deg);
}

.countdown-sticker {
  width: 39px;
  height: 39px;
}

.countdown-moon {
  top: 32px;
  left: 36px;
  color: #d8c8f4;
  transform: rotate(-12deg);
}

.countdown-star {
  top: 44px;
  right: 39px;
  width: 27px;
  height: 27px;
  color: #f3c0ce;
  transform: rotate(13deg);
}

.result-head {
  position: relative;
}

.result-stickers {
  position: absolute;
  top: 52px;
  left: 43%;
  width: 120px;
  height: 70px;
  pointer-events: none;
}

.sticker-result-star {
  top: 14px;
  left: 8px;
  width: 35px;
  height: 35px;
  color: #efb3c6;
  transform: rotate(14deg);
}

.sticker-result-moon {
  top: 0;
  left: 48px;
  width: 29px;
  height: 29px;
  color: #cdbcf0;
  transform: rotate(-12deg);
}

.sticker-result-sparkle {
  top: 34px;
  left: 77px;
  width: 18px;
  height: 18px;
  color: #f3c987;
  transform: rotate(6deg);
}

.result-card-sticker {
  right: 17px;
  bottom: 34px;
  width: 28px;
  height: 28px;
  opacity: 0.9;
  transform: rotate(10deg);
}

/* 更细的纸纤维 + 内页横线 */

body {
  background-image:
    repeating-linear-gradient(0deg, rgba(120, 92, 74, 0.022) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(120, 92, 74, 0.016) 0 1px, transparent 1px 9px),
    radial-gradient(circle at 8% 8%, rgba(216, 205, 247, 0.55) 0, rgba(216, 205, 247, 0) 31%),
    radial-gradient(circle at 92% 12%, rgba(255, 216, 199, 0.7) 0, rgba(255, 216, 199, 0) 30%),
    radial-gradient(circle at 78% 94%, rgba(205, 236, 221, 0.55) 0, rgba(205, 236, 221, 0) 34%),
    radial-gradient(circle at 12% 92%, rgba(203, 228, 251, 0.45) 0, rgba(203, 228, 251, 0) 30%);
  background-color: var(--paper);
}

.question-card {
  background-image:
    linear-gradient(90deg, rgba(232, 117, 152, 0.18) 0 1px, transparent 1px),
    linear-gradient(180deg, transparent 31px, rgba(122, 94, 116, 0.055) 32px);
  background-position: 48px 0, 0 0;
  background-size: 100% 100%, 100% 32px;
}

/* ---------- 响应式补充 ---------- */

@media (max-width: 1280px) {
  .sticker-cluster {
    display: none;
  }
}

@media (max-width: 940px) {
  .result-stickers {
    display: none;
  }

  .note-result {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .hero-topline {
    flex-wrap: wrap;
    gap: 8px;
  }

  .date-stamp {
    font-size: 13px;
  }

  .sticky-note {
    width: auto;
    margin: 22px 0 0;
    padding: 18px 17px 15px;
    transform: rotate(-1deg);
  }

  .sticky-note p {
    font-size: 22px;
  }

  .note-home {
    width: 100%;
  }

  .note-room {
    margin-top: 15px;
  }

  .note-result {
    width: 100%;
    margin-top: 16px;
  }

  .stage-sticker,
  .paper-stamp,
  .question-card::after,
  .result-card-sticker {
    display: none;
  }

  .rail-sticky {
    width: 94px;
    margin-top: 13px;
    font-size: 16px;
  }

  .waiting-sticker {
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
  }

  .countdown-moon {
    top: 18px;
    left: 18px;
    width: 30px;
    height: 30px;
  }

  .countdown-star {
    top: 23px;
    right: 19px;
    width: 22px;
    height: 22px;
  }

  .sticker-room-star {
    top: 10px;
    right: 12px;
    width: 22px;
    height: 22px;
  }

  .sticker-room-flower {
    left: 12px;
    width: 24px;
    height: 24px;
  }
}

@keyframes pending-pulse {
  0%,
  100% {
    outline-color: rgba(232, 117, 152, 0.35);
  }
  50% {
    outline-color: var(--red);
  }
}

@media (max-width: 940px) {
  .play-rail {
    border: 1.5px dashed rgba(91, 64, 105, 0.25);
    border-radius: 24px;
  }

  .waiting-aside {
    border: 1.5px dashed rgba(91, 64, 105, 0.25);
  }
}

@media (max-width: 720px) {
  body::after {
    display: none;
  }

  .masthead {
    padding: 14px 18px 12px;
    backdrop-filter: none;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px 14px 12px 15px;
    font-size: 23px;
  }

  .brand-type strong {
    font-size: 21px;
  }

  .brand-type small {
    font-size: 11px;
  }

  .server-status {
    padding: 5px 7px;
  }

  .hero h1 {
    font-size: clamp(47px, 13vw, 72px);
    line-height: 1.08;
  }

  .eyebrow {
    font-size: 14px;
  }

  .setup-card {
    border-radius: 24px;
  }

  .setup-head h2 {
    font-size: 22px;
  }

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

  .start-button {
    width: calc(100% - 28px);
    margin: 15px 14px;
  }

  .setup-foot {
    padding: 0 14px 14px;
  }

  .howto-grid article,
  .howto-grid article + article {
    min-height: 0;
    border: 1.5px dashed rgba(91, 64, 105, 0.22);
  }

  .room-code {
    font-size: clamp(54px, 17vw, 78px);
  }

  .score-card {
    padding: 7px 9px 6px;
    border-radius: 14px;
  }

  .score-line strong {
    font-size: 35px;
  }

  .match-center span:first-child {
    font-size: 12px;
  }

  .timer-track {
    height: 8px;
  }

  .question-card {
    padding: 23px 18px 21px;
    border-radius: 22px;
  }

  .question-card h2 {
    font-size: clamp(23px, 6.6vw, 30px);
  }

  .option {
    min-height: 60px;
  }

  .play-rail {
    padding: 19px 18px;
  }

  .clock > span {
    font-size: 50px;
  }

  .waiting-main {
    padding: 30px 22px;
  }

  .countdown-stage {
    min-height: 430px;
  }

  .countdown-number {
    font-size: clamp(120px, 32vw, 165px);
  }

  .result-card {
    border-radius: 21px;
  }

  .result-score strong {
    font-size: clamp(66px, 19vw, 92px);
  }
}
