/* =========================================================
   风车车与假老练 · 视觉系统
   纸张、朱砂、墨色；编辑感 + 一点卷宗气
   ========================================================= */

:root {
  --paper: #f2eadb;
  --paper-2: #ebe0cd;
  --card: #fbf7ee;
  --card-strong: #fffdf7;
  --ink: #211f1a;
  --ink-2: #343129;
  --muted: #7c7467;
  --muted-2: #9b9283;
  --line: rgba(43, 38, 29, 0.13);
  --line-strong: rgba(43, 38, 29, 0.22);
  --red: #c4472c;
  --red-deep: #9f3420;
  --red-soft: #f2d9cf;
  --jade: #176f63;
  --gold: #b88a43;
  --shadow: 0 18px 50px rgba(53, 40, 20, 0.13);
  --shadow-soft: 0 8px 22px rgba(53, 40, 20, 0.08);
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --hand: "Kaiti SC", "KaiTi", "STKaiti", "SimSun", serif;
  --latin: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --ease: cubic-bezier(0.22, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 250, 237, 0.9), transparent 32%),
    radial-gradient(circle at 82% 82%, rgba(196, 71, 44, 0.08), transparent 30%),
    linear-gradient(135deg, #e9decb 0%, #f0e7d7 45%, #e5d8c2 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: radial-gradient(rgba(61, 47, 25, 0.11) 0.55px, transparent 0.75px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

::selection {
  background: var(--red);
  color: #fff7ea;
}

/* ---------------- 背景装饰 ---------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-word {
  position: absolute;
  right: -4vw;
  top: 50%;
  transform: translateY(-50%) rotate(8deg);
  font-family: var(--serif);
  font-size: min(48vw, 720px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(80, 60, 32, 0.09);
  opacity: 0.9;
}

.ambient-ring {
  position: absolute;
  border: 1px solid rgba(80, 60, 32, 0.11);
  border-radius: 50%;
}

.ambient-ring-a {
  width: 44vw;
  height: 44vw;
  left: -16vw;
  bottom: -18vw;
}

.ambient-ring-b {
  width: 28vw;
  height: 28vw;
  left: -8vw;
  bottom: -10vw;
  border-color: rgba(196, 71, 44, 0.12);
}

/* ---------------- 舞台 ---------------- */

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 460px) auto;
  align-items: center;
  justify-content: center;
  gap: clamp(44px, 7vw, 110px);
  width: 100%;
  max-width: 1240px;
  height: 100dvh;
  margin: 0 auto;
  padding: 28px 48px;
}

.stage-copy {
  max-width: 440px;
  padding-bottom: 12px;
}

.stage-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.stage-seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff6e6;
  background: var(--red);
  border-radius: 7px 5px 8px 4px;
  font-family: var(--hand);
  font-size: 21px;
  letter-spacing: 0;
  transform: rotate(-3deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.32),
    0 5px 12px rgba(150, 40, 20, 0.18);
}

.stage-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(56px, 5.5vw, 82px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.02em;
}

.stage-title span {
  display: block;
}

.stage-title span:last-child {
  color: var(--red);
  transform: translateX(0.42em);
}

.stage-lead {
  margin: 28px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.03em;
}

.stage-divider {
  width: 58px;
  height: 2px;
  margin: 26px 0 20px;
  background: var(--ink);
  opacity: 0.82;
}

.stage-points {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.stage-points li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.point-no {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--red);
  border: 1px solid rgba(196, 71, 44, 0.35);
  border-radius: 50%;
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 28px;
}

.stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  color: var(--ink-2);
  background: rgba(255, 252, 244, 0.58);
  border: 1px solid rgba(43, 38, 29, 0.14);
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.chip-dot {
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(196, 71, 44, 0.12);
}

.stage-note {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 52px;
  padding-top: 16px;
  color: var(--muted-2);
  border-top: 1px solid rgba(43, 38, 29, 0.14);
  font-size: 9px;
  letter-spacing: 0.12em;
}

/* ---------------- 手机外壳 ---------------- */

.device-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.device {
  position: relative;
  width: min(390px, calc((100dvh - 48px) * 0.462));
  aspect-ratio: 390 / 844;
  padding: 9px;
  background:
    linear-gradient(145deg, #2d2a24 0%, #191815 42%, #353029 100%);
  border-radius: 52px;
  box-shadow:
    0 50px 90px rgba(54, 40, 18, 0.26),
    0 16px 30px rgba(54, 40, 18, 0.18),
    inset 0 0 0 1px rgba(255, 244, 220, 0.22),
    inset 0 0 0 4px rgba(0, 0, 0, 0.35);
}

.device::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border: 1px solid rgba(255, 244, 220, 0.12);
  border-radius: 54px;
}

.device-sensor {
  position: absolute;
  top: 17px;
  left: 50%;
  z-index: 10;
  width: 74px;
  height: 19px;
  transform: translateX(-50%);
  background: #161513;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.device-sensor::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 15px;
  width: 5px;
  height: 5px;
  background: #262a2b;
  border-radius: 50%;
  box-shadow: inset 0 0 2px rgba(120, 180, 190, 0.35);
}

.app-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  border-radius: 44px;
}

.app-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.3;
  background-image: radial-gradient(rgba(61, 47, 25, 0.1) 0.5px, transparent 0.7px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

.device-home {
  position: absolute;
  bottom: 16px;
  left: 50%;
  z-index: 20;
  width: 120px;
  height: 4px;
  transform: translateX(-50%);
  background: rgba(35, 32, 26, 0.75);
  border-radius: 999px;
}

/* ---------------- 状态栏 / App ---------------- */

.statusbar {
  position: relative;
  z-index: 30;
  display: flex;
  flex: 0 0 29px;
  align-items: flex-end;
  justify-content: space-between;
  height: 29px;
  padding: 0 22px 5px;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.86;
}

.app {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
}

.screens {
  position: absolute;
  inset: 0;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
}

.screen.is-active {
  display: flex;
  animation: screen-in 0.34s var(--ease) both;
}

.screen-scroll {
  height: 100%;
  padding: 0 20px 100px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.screen-scroll::-webkit-scrollbar {
  display: none;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------- 底部导航 ---------------- */

.tabbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  height: 66px;
  padding: 7px 34px 6px;
  background: rgba(248, 242, 231, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  transition: transform 0.3s var(--ease), opacity 0.25s ease;
}

.tabbar.is-hidden {
  opacity: 0;
  transform: translateY(110%);
  pointer-events: none;
}

.tab {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 3px 0 0;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.1em;
  transition: color 0.2s ease;
}

.tab svg {
  width: 21px;
  height: 21px;
}

.tab.is-active {
  color: var(--red);
}

.tab.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  width: 12px;
  height: 2px;
  background: var(--red);
  border-radius: 999px;
}

/* ---------------- 通用组件 ---------------- */

.icon-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: var(--ink-2);
  background: rgba(255, 253, 247, 0.62);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.seal-mark {
  display: grid;
  place-items: center;
  color: #fff6e6;
  background: var(--red);
  font-family: var(--hand);
  border-radius: 7px 5px 8px 4px;
  transform: rotate(-3deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    0 4px 10px rgba(150, 40, 20, 0.16);
}

.eyebrow {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.serif {
  font-family: var(--serif);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 9px;
}

.section-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.section-head span {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--red);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.section-link .arrow {
  color: inherit;
}

.section-link:active {
  opacity: 0.65;
}

.arrow {
  color: inherit;
  font-family: var(--latin);
  font-size: 13px;
}

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

.home-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
}

.brand-seal {
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  font-size: 21px;
}

.brand-copy {
  min-width: 0;
}

.brand-copy .eyebrow {
  margin: 0 0 2px;
  font-size: 7.5px;
}

.brand-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.home-top .icon-btn {
  margin-left: auto;
}

.hero {
  position: relative;
  padding: 22px 2px 17px;
}

.issue-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--red);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.issue-line::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.hero h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: 0.015em;
}

.hero h2 em {
  position: relative;
  color: var(--red);
  font-style: normal;
}

.hero h2 em::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 5px;
  background: rgba(196, 71, 44, 0.16);
  border-radius: 50%;
  transform: rotate(-1deg);
}

.hero p.hero-sub {
  max-width: 300px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

/* 每日乡音 */

.daily-card {
  position: relative;
  padding: 14px 15px 13px;
  overflow: hidden;
  color: #f8eedb;
  background:
    radial-gradient(circle at 92% 10%, rgba(196, 71, 44, 0.45), transparent 40%),
    linear-gradient(135deg, #27251f 0%, #1c1b18 70%, #2f2a22 100%);
  border-radius: 19px;
  box-shadow: 0 13px 30px rgba(44, 34, 18, 0.18);
}

.daily-card::before {
  content: "";
  position: absolute;
  top: -38px;
  right: -28px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(248, 238, 219, 0.16);
  border-radius: 50%;
}

.daily-card::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -10px;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(248, 238, 219, 0.1);
  border-radius: 50%;
}

.daily-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.daily-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.live-dot {
  width: 5px;
  height: 5px;
  background: #e87150;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(232, 113, 80, 0.18);
  animation: breathe 2.4s ease-in-out infinite;
}

.daily-audience {
  color: rgba(248, 238, 219, 0.56);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.daily-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 2px;
}

.daily-region {
  margin: 0 0 3px;
  color: rgba(248, 238, 219, 0.58);
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.daily-pinyin {
  margin: 0;
  font-family: var(--latin);
  font-size: 33px;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.daily-pinyin.is-long {
  font-size: 25px;
}

.daily-pinyin small {
  margin-left: 6px;
  color: rgba(248, 238, 219, 0.42);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.listen-btn {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  color: var(--ink);
  background: #f7ead3;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.26);
  transition: transform 0.2s ease, background 0.2s ease;
}

.listen-btn:active {
  transform: scale(0.94);
}

.listen-btn svg {
  width: 15px;
  height: 15px;
  margin-left: 2px;
}

.listen-btn.is-playing {
  animation: listen-pulse 0.9s ease-in-out infinite;
}

.wave {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 18px;
}

.wave span {
  display: block;
  width: 2.5px;
  height: var(--h, 7px);
  background: currentColor;
  border-radius: 999px;
  opacity: 0.48;
  transform-origin: center;
}

.wave.is-playing span {
  animation: wave-dance 0.7s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 0) * 0.035s);
}

.daily-wave {
  position: relative;
  z-index: 1;
  margin: 9px 0 10px;
  color: #f2c9a0;
  opacity: 0.75;
}

.daily-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(248, 238, 219, 0.13);
}

.daily-tip {
  overflow: hidden;
  color: rgba(248, 238, 219, 0.58);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  color: #f8eedb;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.daily-done {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #e8b783;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* 模式入口 */

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 0;
}

.mode-card {
  position: relative;
  min-height: 148px;
  padding: 13px 13px 12px;
  overflow: hidden;
  text-align: left;
  border-radius: 17px;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.mode-card:active {
  transform: scale(0.98);
}

.mode-online {
  color: #fff4e4;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 219, 177, 0.26), transparent 42%),
    linear-gradient(145deg, #cd5437 0%, #bd4028 55%, #a63421 100%);
  box-shadow: 0 12px 26px rgba(157, 52, 32, 0.22);
}

.mode-online::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 128px;
  height: 128px;
  border: 1px solid rgba(255, 244, 228, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 18px rgba(255, 244, 228, 0.055),
    0 0 0 38px rgba(255, 244, 228, 0.035);
}

.mode-solo {
  color: var(--ink);
  background:
    linear-gradient(160deg, rgba(255, 253, 247, 0.96), rgba(243, 234, 218, 0.94));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.mode-solo::after {
  content: "36";
  position: absolute;
  right: -4px;
  bottom: -20px;
  color: rgba(33, 31, 26, 0.055);
  font-family: var(--latin);
  font-size: 92px;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
}

.mode-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mode-kicker {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  opacity: 0.72;
}

.mode-arrow {
  font-family: var(--latin);
  font-size: 13px;
  opacity: 0.8;
}

.mode-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 10px 0 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.85;
}

.mode-icon svg {
  width: 17px;
  height: 17px;
}

.mode-solo .mode-icon {
  margin-top: 9px;
}

.mode-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 3px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mode-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.02em;
  opacity: 0.66;
}

.mode-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* 首页开局卡 */

.match-card {
  position: relative;
  padding: 15px 15px 13px;
  overflow: hidden;
  color: #f8eedb;
  background:
    radial-gradient(circle at 92% 8%, rgba(196, 71, 44, 0.46), transparent 42%),
    linear-gradient(135deg, #292620 0%, #1b1a17 70%, #302b23 100%);
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(44, 34, 18, 0.2);
}

.match-card::before {
  content: "";
  position: absolute;
  top: -54px;
  right: -38px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(248, 238, 219, 0.14);
  border-radius: 50%;
}

.match-card::after {
  content: "";
  position: absolute;
  top: -26px;
  right: -10px;
  width: 105px;
  height: 105px;
  border: 1px solid rgba(248, 238, 219, 0.09);
  border-radius: 50%;
}

.match-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.match-card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.match-card-badge {
  padding: 2px 6px;
  color: rgba(248, 238, 219, 0.6);
  border: 1px solid rgba(248, 238, 219, 0.18);
  border-radius: 999px;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.match-card h3 {
  position: relative;
  z-index: 1;
  margin: 13px 0 5px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.match-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(248, 238, 219, 0.58);
  font-size: 9.5px;
  line-height: 1.75;
}

.match-card-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 7px;
  margin-top: 14px;
}

.match-primary,
.match-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 41px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.match-primary {
  color: #fff7e8;
  background: var(--red);
  box-shadow: 0 5px 13px rgba(159, 52, 32, 0.24);
}

.match-secondary {
  color: #f8eedb;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(248, 238, 219, 0.2);
}

.match-primary:active,
.match-secondary:active {
  transform: scale(0.98);
}

.match-card-roles {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 5px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid rgba(248, 238, 219, 0.12);
}

.match-card-roles span {
  padding: 2px 6px;
  color: rgba(248, 238, 219, 0.48);
  border: 1px solid rgba(248, 238, 219, 0.12);
  border-radius: 999px;
  font-size: 7px;
  letter-spacing: 0.04em;
}

.role-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.role-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.role-seal {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: #fff7e8;
  border-radius: 7px 5px 8px 4px;
  font-family: var(--hand);
  font-size: 16px;
  transform: rotate(-2deg);
}

.role-seal.is-host {
  background: var(--red);
}

.role-seal.is-guess {
  background: var(--jade);
}

.role-card strong {
  display: block;
  margin-bottom: 1px;
  font-size: 9.5px;
  font-weight: 600;
}

.role-card > div span {
  display: block;
  color: var(--muted-2);
  font-size: 7.5px;
  line-height: 1.45;
}

/* 模式选择 */

.mode-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-choice {
  position: relative;
  min-height: 132px;
  padding: 13px 14px 12px;
  overflow: hidden;
  text-align: left;
  border-radius: 17px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.mode-choice:active {
  transform: scale(0.985);
}

.mode-choice.is-create {
  color: #f8eedb;
  background:
    radial-gradient(circle at 92% 0%, rgba(196, 71, 44, 0.45), transparent 44%),
    linear-gradient(140deg, #2b2821, #1a1916 75%, #302a21);
  box-shadow: 0 10px 24px rgba(43, 32, 16, 0.17);
}

.mode-choice.is-random {
  color: var(--ink);
  background:
    radial-gradient(circle at 96% 0%, rgba(23, 111, 99, 0.13), transparent 38%),
    linear-gradient(145deg, #fffdf7, #f0e8d9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.mode-choice-kicker {
  display: block;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.58;
}

.mode-choice-icon {
  position: absolute;
  top: 12px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff7e8;
  background: var(--red);
  border-radius: 8px 6px 9px 5px;
  font-family: var(--hand);
  font-size: 19px;
  transform: rotate(-3deg);
  box-shadow: 0 4px 10px rgba(100, 30, 15, 0.16);
}

.mode-choice.is-random .mode-choice-icon {
  background: var(--jade);
}

.mode-choice h3 {
  margin: 9px 0 2px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mode-choice p {
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
  opacity: 0.6;
}

.mode-choice-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.88;
}

/* 首页统计 */

.stats-strip {
  display: flex;
  align-items: stretch;
  margin: 15px 0 4px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-item + .stat-item {
  border-left: 1px solid var(--line);
}

.stat-value {
  display: block;
  font-family: var(--latin);
  font-size: 18px;
  line-height: 1.1;
}

.stat-label {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.home-footnote {
  margin: 9px 0 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ---------------- 页头 ---------------- */

.page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 11px;
}

.page-head-copy {
  flex: 1;
  min-width: 0;
}

.page-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.page-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

/* ---------------- 关卡首页 ---------------- */

.collection-card {
  position: relative;
  margin-top: 14px;
  padding: 15px;
  overflow: hidden;
  color: #f7eedc;
  background:
    radial-gradient(circle at 90% 0%, rgba(23, 111, 99, 0.38), transparent 46%),
    linear-gradient(140deg, #272620, #1a1a17);
  border-radius: 19px;
}

.collection-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.collection-top h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.collection-top p {
  margin: 0;
  color: rgba(247, 238, 220, 0.58);
  font-size: 9px;
  line-height: 1.6;
}

.collection-count {
  font-family: var(--latin);
  font-size: 30px;
  line-height: 1;
}

.collection-count small {
  color: rgba(247, 238, 220, 0.45);
  font-size: 10px;
}

.stamp-row {
  display: flex;
  gap: 7px;
  margin-top: 14px;
}

.pack-stamp {
  display: grid;
  place-items: center;
  flex: 1;
  aspect-ratio: 1;
  max-width: 42px;
  color: rgba(247, 238, 220, 0.34);
  border: 1px dashed rgba(247, 238, 220, 0.24);
  border-radius: 50%;
  font-family: var(--hand);
  font-size: 15px;
  transition: all 0.2s ease;
}

.pack-stamp.is-earned {
  color: #201d17;
  background: #e9c98f;
  border: 1px solid #f3dcb3;
  box-shadow: 0 0 0 3px rgba(233, 201, 143, 0.12);
}

.pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 11px;
  padding-bottom: 8px;
}

.pack-card {
  position: relative;
  min-height: 136px;
  padding: 13px 12px 11px;
  overflow: hidden;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.pack-card:active {
  transform: scale(0.98);
}

.pack-card .pack-water {
  position: absolute;
  right: -7px;
  bottom: -22px;
  color: var(--pack-color);
  font-family: var(--serif);
  font-size: 86px;
  line-height: 1;
  opacity: 0.075;
  pointer-events: none;
}

.pack-file {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.pack-dot {
  width: 6px;
  height: 6px;
  background: var(--pack-color);
  border-radius: 50%;
}

.pack-card h3 {
  position: relative;
  z-index: 1;
  margin: 13px 0 2px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.pack-dialect {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.pack-progress {
  position: relative;
  z-index: 1;
  margin-top: 12px;
}

.pack-progress-line {
  height: 2px;
  overflow: hidden;
  background: rgba(43, 38, 29, 0.09);
  border-radius: 99px;
}

.pack-progress-line i {
  display: block;
  height: 100%;
  background: var(--pack-color);
  border-radius: inherit;
}

.pack-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 8px;
}

.pack-progress-meta strong {
  color: var(--pack-color);
  font-family: var(--latin);
  font-size: 10px;
  font-weight: 400;
}

.pack-finished {
  position: absolute;
  top: 28px;
  right: -21px;
  width: 76px;
  padding: 3px 0;
  color: #fff6e6;
  background: var(--pack-color);
  font-family: var(--hand);
  font-size: 8px;
  text-align: center;
  letter-spacing: 0.12em;
  transform: rotate(38deg);
  opacity: 0.9;
}

/* ---------------- 卷宗详情 ---------------- */

.pack-hero {
  position: relative;
  margin-top: 14px;
  padding: 17px 16px 15px;
  overflow: hidden;
  color: #fff7e8;
  background:
    radial-gradient(circle at 88% 5%, rgba(255, 255, 255, 0.18), transparent 42%),
    var(--pack-color);
  border-radius: 19px;
}

.pack-hero::after {
  content: attr(data-char);
  position: absolute;
  right: -3px;
  bottom: -36px;
  color: rgba(255, 255, 255, 0.11);
  font-family: var(--serif);
  font-size: 128px;
  line-height: 1;
}

.pack-hero .eyebrow {
  color: rgba(255, 247, 232, 0.62);
}

.pack-hero h2 {
  position: relative;
  z-index: 1;
  margin: 5px 0 4px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pack-hero p {
  position: relative;
  z-index: 1;
  max-width: 240px;
  margin: 0;
  color: rgba(255, 247, 232, 0.74);
  font-size: 9.5px;
  line-height: 1.65;
}

.pack-hero-progress {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
}

.pack-hero-progress .bar {
  flex: 1;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
}

.pack-hero-progress .bar i {
  display: block;
  height: 100%;
  background: #fff1d7;
  border-radius: inherit;
}

.pack-hero-progress span {
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.level-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
}

.level-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 11px 11px 10px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.level-row:active {
  transform: scale(0.99);
}

.level-row.is-current {
  border-color: rgba(196, 71, 44, 0.42);
  box-shadow: 0 0 0 2px rgba(196, 71, 44, 0.06);
}

.level-row.is-locked {
  opacity: 0.52;
}

.level-index {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--latin);
  font-size: 10px;
}

.level-row.is-done .level-index {
  color: #fff7e8;
  background: var(--pack-color);
  border-color: var(--pack-color);
}

.level-row.is-current .level-index {
  color: var(--red);
  border-color: rgba(196, 71, 44, 0.4);
}

.level-copy {
  flex: 1;
  min-width: 0;
}

.level-title {
  display: block;
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.level-sub {
  display: block;
  overflow: hidden;
  margin: 0;
  color: var(--muted-2);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-copy h4 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.level-copy p {
  overflow: hidden;
  margin: 0;
  color: var(--muted-2);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-stars {
  display: flex;
  gap: 2px;
  margin-top: 3px;
}

.level-stars svg {
  width: 9px;
  height: 9px;
}

.level-stars .star-on {
  color: var(--gold);
}

.level-stars .star-off {
  color: rgba(43, 38, 29, 0.13);
}

.level-state {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.level-state.is-go {
  padding: 4px 7px;
  color: #fff7e8;
  background: var(--red);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
}

.level-lock {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

/* ---------------- 我的 ---------------- */

.profile-card {
  position: relative;
  margin-top: 14px;
  padding: 17px 16px 15px;
  overflow: hidden;
  color: #f8efdd;
  background:
    radial-gradient(circle at 90% 8%, rgba(196, 71, 44, 0.42), transparent 42%),
    linear-gradient(145deg, #292720, #191815);
  border-radius: 20px;
}

.profile-card::after {
  content: "偵";
  position: absolute;
  right: -8px;
  bottom: -34px;
  color: rgba(248, 239, 221, 0.055);
  font-family: var(--serif);
  font-size: 130px;
  line-height: 1;
}

.profile-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  color: #211f1a;
  background: #e7c587;
  border-radius: 50%;
  font-family: var(--hand);
  font-size: 21px;
  box-shadow: 0 0 0 2px rgba(231, 197, 135, 0.18);
}

.profile-copy h2 {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.profile-copy p {
  margin: 0;
  color: rgba(248, 239, 221, 0.55);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.profile-score {
  margin-left: auto;
  text-align: right;
}

.profile-score strong {
  display: block;
  font-family: var(--latin);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.profile-score span {
  color: rgba(248, 239, 221, 0.45);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.rank-line {
  position: relative;
  z-index: 1;
  margin-top: 15px;
}

.rank-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: rgba(248, 239, 221, 0.5);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.rank-bar {
  height: 3px;
  overflow: hidden;
  background: rgba(248, 239, 221, 0.12);
  border-radius: 99px;
}

.rank-bar i {
  display: block;
  height: 100%;
  background: #e7c587;
  border-radius: inherit;
}

.me-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.me-stat {
  padding: 11px 9px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.me-stat strong {
  display: block;
  font-family: var(--latin);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.me-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.stamp-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 9px;
}

.stamp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 2px 7px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.stamp-item i {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: var(--muted-2);
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  font-family: var(--hand);
  font-size: 12px;
  font-style: normal;
}

.stamp-item.is-earned i {
  color: #fff7e7;
  background: var(--stamp-color, var(--red));
  border: 1px solid transparent;
}

.stamp-item span {
  color: var(--muted-2);
  font-size: 7.5px;
}

.settings-list {
  overflow: hidden;
  margin-top: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 13px;
  text-align: left;
}

.setting-row + .setting-row {
  border-top: 1px solid var(--line);
}

.setting-row .setting-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--muted);
  background: rgba(43, 38, 29, 0.04);
  border-radius: 7px;
}

.setting-row .setting-icon svg {
  width: 13px;
  height: 13px;
}

.setting-copy {
  flex: 1;
}

.setting-copy strong {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
}

.setting-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8px;
}

.setting-arrow {
  color: var(--muted-2);
  font-family: var(--latin);
  font-size: 13px;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 20px;
  background: rgba(43, 38, 29, 0.14);
  border-radius: 99px;
  transition: background 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fffaf0;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s var(--ease);
}

.switch.is-on {
  background: var(--jade);
}

.switch.is-on::after {
  transform: translateX(14px);
}

.about-note {
  margin: 12px 0 6px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.7;
  text-align: center;
  letter-spacing: 0.02em;
}

/* ---------------- 游戏通用 ---------------- */

.game-screen {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 253, 247, 0.7), transparent 40%),
    var(--paper);
}

.game-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.game-header {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 8px 14px 4px;
}

.game-head-copy {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.game-head-copy strong {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-head-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 7.5px;
  letter-spacing: 0.12em;
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 62px;
  height: 28px;
  padding: 0 8px;
  color: #f8efdd;
  background: var(--ink);
  border-radius: 999px;
  font-family: var(--latin);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  transition: background 0.25s ease, transform 0.2s ease;
}

.timer-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  background: #e9c98f;
  border-radius: 50%;
}

.timer-pill.is-low {
  background: var(--red);
  animation: timer-pulse 1s ease-in-out infinite;
}

.timer-pill.is-low::before {
  background: #fff1d7;
}

.question-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 28px;
  padding: 0 9px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.question-pill strong {
  font-size: 14px;
  font-weight: 400;
}

.question-pill.is-low {
  color: var(--red);
  border-color: rgba(196, 71, 44, 0.35);
}

/* 房间大厅 */

.room-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  color: var(--jade);
  border: 1px solid rgba(23, 111, 99, 0.22);
  border-radius: 999px;
  font-size: 8px;
  white-space: nowrap;
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 15px;
}

.room-card {
  position: relative;
  width: 100%;
  padding: 13px 14px 12px;
  overflow: hidden;
  text-align: left;
  background:
    radial-gradient(circle at 100% 0%, rgba(196, 71, 44, 0.06), transparent 35%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.room-card:active {
  transform: scale(0.985);
}

.room-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.room-card-host {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 8px;
}

.room-card-host .seal-mark {
  width: 23px;
  height: 23px;
  font-size: 13px;
}

.room-card-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--jade);
  font-size: 7.5px;
  letter-spacing: 0.04em;
}

.room-card-state::before {
  content: "";
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}

.room-card h3 {
  margin: 10px 0 2px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.room-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.55;
}

.room-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  color: var(--red);
  font-size: 9px;
  font-weight: 700;
}

.room-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 28px;
  padding: 0 9px;
  color: #fff7e8;
  background: var(--jade);
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.room-switch.is-danger {
  background: var(--red);
}

.host-reveal-btn {
  margin-left: 7px;
  padding: 4px 8px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 8px;
}

/* 玩家条 */

.players {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 5px 15px 7px;
}

.player {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-width: 80px;
}

.player-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff8e9;
  background: var(--avatar-bg, #555047);
  border: 2px solid var(--paper);
  border-radius: 50%;
  font-family: var(--hand);
  font-size: 12px;
  box-shadow: 0 2px 7px rgba(43, 38, 29, 0.14);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.player.is-host .player-avatar {
  box-shadow:
    0 0 0 2px var(--red),
    0 2px 7px rgba(43, 38, 29, 0.14);
}

.player.is-me .player-avatar {
  color: var(--ink);
  background: #e7c587;
}

.players.is-many .player-avatar {
  width: 28px;
  height: 28px;
  font-size: 9px;
  border-width: 1.5px;
}

.players.is-many .player-name {
  font-size: 7px;
}

.players.is-many .host-ribbon {
  font-size: 5px;
  padding: 0 3px;
}

.player.is-speaking .player-avatar {
  animation: avatar-bob 1s ease-in-out infinite;
}

.player-name {
  display: flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  margin-top: 3px;
  font-size: 8.5px;
  font-weight: 500;
  white-space: nowrap;
}

.player-name em {
  padding: 1px 3px;
  color: var(--red);
  border: 1px solid rgba(196, 71, 44, 0.28);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 6.5px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.player-score {
  margin-top: 1px;
  color: var(--muted-2);
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.player.is-me .player-score {
  color: var(--red);
}

.host-ribbon {
  position: absolute;
  top: -5px;
  left: 50%;
  z-index: 2;
  padding: 1px 4px;
  color: #fff6e6;
  background: var(--red);
  border-radius: 3px;
  font-size: 6px;
  letter-spacing: 0.08em;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* 题卡 */

.word-card {
  position: relative;
  flex: 0 0 auto;
  margin: 0 15px 7px;
  padding: 12px 14px 11px;
  overflow: hidden;
  color: #f8efdd;
  background:
    radial-gradient(circle at 94% 0%, rgba(196, 71, 44, 0.35), transparent 42%),
    linear-gradient(140deg, #282620 0%, #1b1a17 72%, #302b23 100%);
  border-radius: 17px;
  box-shadow: 0 10px 24px rgba(42, 32, 16, 0.17);
}

.word-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -50px;
  width: 135px;
  height: 135px;
  border: 1px solid rgba(248, 239, 221, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(248, 239, 221, 0.025);
}

.word-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.word-region {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(248, 239, 221, 0.62);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.word-region::before {
  content: "";
  width: 4px;
  height: 4px;
  background: #df8b68;
  border-radius: 50%;
}

.word-hint {
  color: rgba(248, 239, 221, 0.36);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.word-middle {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 3px;
}

.pinyin {
  margin: 0;
  font-family: var(--latin);
  font-size: 37px;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0.005em;
  word-break: break-word;
}

.pinyin.is-long {
  font-size: 28px;
}

.pinyin.is-xlong {
  font-size: 23px;
}

.roman-label {
  display: block;
  margin-top: 2px;
  color: rgba(248, 239, 221, 0.35);
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.word-middle .listen-btn {
  width: 41px;
  height: 41px;
  background: #f3dfbe;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.23);
}

.word-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 5px;
}

.word-bottom .wave {
  flex: 1;
  color: #e9bd8f;
  opacity: 0.58;
}

.word-bottom span {
  color: rgba(248, 239, 221, 0.34);
  font-size: 7px;
  letter-spacing: 0.05em;
}

/* 单人题卡 */

.solo-card {
  margin-bottom: 6px;
}

.question-budget {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(248, 239, 221, 0.11);
}

.budget-label {
  color: rgba(248, 239, 221, 0.43);
  font-size: 7px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.budget-dots {
  display: flex;
  flex: 1;
  gap: 3px;
}

.budget-dots i {
  flex: 1;
  max-width: 9px;
  height: 3px;
  background: rgba(248, 239, 221, 0.17);
  border-radius: 99px;
  transition: background 0.2s ease;
}

.budget-dots i.is-used {
  background: var(--red);
}

.budget-left {
  color: rgba(248, 239, 221, 0.72);
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.04em;
}

/* 出题人题卡与裁决 */

.host-word-card .word-middle {
  margin-bottom: 5px;
}

.host-reveal {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(248, 239, 221, 0.12);
}

.host-reveal-label {
  padding: 1px 4px;
  color: #e7c587;
  border: 1px solid rgba(231, 197, 135, 0.32);
  border-radius: 3px;
  font-size: 6.5px;
  letter-spacing: 0.1em;
}

.host-reveal strong {
  color: #f4dfbe;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.host-reveal span:last-child {
  overflow: hidden;
  color: rgba(248, 239, 221, 0.56);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-question {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 8px 9px;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 3px 10px rgba(53, 40, 20, 0.04);
}

.host-question-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  color: #fff7e8;
  background: var(--avatar-bg, #5b554a);
  border-radius: 50%;
  font-family: var(--hand);
  font-size: 9px;
}

.host-question-copy {
  min-width: 0;
}

.host-question-copy p {
  margin: 0 0 2px;
  color: var(--muted-2);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.host-question-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.host-answer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.host-answer {
  height: 42px;
  color: #fff7e8;
  border-radius: 11px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.host-answer:active {
  transform: scale(0.98);
  filter: brightness(0.96);
}

.host-answer.is-yes {
  background: var(--red);
  box-shadow: 0 5px 13px rgba(159, 52, 32, 0.2);
}

.host-answer.is-no {
  background: var(--ink);
  box-shadow: 0 5px 13px rgba(33, 31, 26, 0.17);
}

.host-answer-note {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 7.5px;
  text-align: center;
  letter-spacing: 0.03em;
}

.host-waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 58px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.game-screen .composer {
  padding-bottom: 28px;
}

/* 问答流 */

.feed {
  flex: 1 1 auto;
  min-height: 0;
  padding: 5px 15px 9px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.feed::-webkit-scrollbar {
  display: none;
}

.msg {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
  animation: msg-in 0.24s var(--ease) both;
}

.msg.is-me {
  justify-content: flex-end;
}

.msg-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 12px;
  color: #fff7e7;
  background: var(--avatar-bg, #5b554a);
  border-radius: 50%;
  font-family: var(--hand);
  font-size: 8px;
}

.msg-body {
  max-width: calc(100% - 44px);
}

.msg.is-me .msg-body {
  max-width: 82%;
}

.msg-name {
  margin: 0 0 2px 2px;
  color: var(--muted-2);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.msg.is-me .msg-name {
  margin-right: 2px;
  text-align: right;
}

.bubble {
  position: relative;
  padding: 7px 9px;
  color: var(--ink-2);
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 3px 11px 11px 11px;
  font-size: 10.5px;
  line-height: 1.55;
  box-shadow: 0 3px 9px rgba(53, 40, 20, 0.04);
}

.msg.is-me .bubble {
  color: #fff7e8;
  background: var(--ink);
  border-color: var(--ink);
  border-radius: 11px 3px 11px 11px;
}

.bubble.is-host-intro {
  border-left: 2px solid var(--red);
}

.bubble.is-system {
  padding: 4px 8px;
  color: var(--muted-2);
  background: rgba(43, 38, 29, 0.035);
  border: 0;
  border-radius: 999px;
  font-size: 8px;
}

.msg.is-system {
  justify-content: center;
  margin: 2px 0 8px;
}

.msg.is-system .msg-body {
  max-width: 100%;
}

.qa-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.qa-text {
  flex: 1;
  min-width: 0;
}

.stamp {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 25px;
  height: 20px;
  padding: 0 4px;
  color: var(--red);
  border: 1.5px solid currentColor;
  border-radius: 3px;
  font-family: var(--hand);
  font-size: 10px;
  letter-spacing: 0.04em;
  transform: rotate(-4deg);
  animation: stamp-in 0.26s var(--ease) both;
}

.stamp.is-no {
  color: #777064;
}

.stamp.is-maybe {
  color: var(--gold);
}

.msg.is-me .stamp {
  color: #f2c9a0;
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 11px;
  padding: 0 3px;
}

.typing i {
  width: 4px;
  height: 4px;
  background: var(--muted-2);
  border-radius: 50%;
  animation: typing 1.1s ease-in-out infinite;
}

.typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing i:nth-child(3) {
  animation-delay: 0.3s;
}

.feed-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
  line-height: 1.8;
}

.feed-empty .empty-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  color: var(--muted-2);
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  font-family: var(--hand);
  font-size: 16px;
}

/* 输入区 */

.composer {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  padding: 7px 12px 10px;
  background: linear-gradient(180deg, rgba(242, 234, 219, 0), var(--paper) 18%);
}

.composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 2px 5px;
  color: var(--muted-2);
  font-size: 7.5px;
  letter-spacing: 0.04em;
}

.composer-meta strong {
  color: var(--red);
  font-weight: 600;
}

.chip-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 1px 1px 3px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip-row.is-locked {
  opacity: 0.55;
  pointer-events: none;
}

.chip:disabled {
  opacity: 0.55;
  cursor: default;
}

.chip {
  flex: 0 0 auto;
  padding: 6px 8px;
  color: var(--ink-2);
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.chip:active {
  background: var(--red-soft);
  border-color: rgba(196, 71, 44, 0.22);
}

.chip.is-muted {
  color: var(--muted-2);
  border-style: dashed;
}

.chip svg {
  width: 10px;
  height: 10px;
  margin-right: 3px;
  vertical-align: -1px;
}

.ask-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

.ask-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 39px;
  padding: 0 5px 0 11px;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 3px 10px rgba(53, 40, 20, 0.04);
}

.ask-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 10.5px;
}

.ask-field input::placeholder {
  color: var(--muted-2);
}

.ask-field.is-locked {
  opacity: 0.58;
  pointer-events: none;
}

.ask-send {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  color: #f8efdd;
  background: var(--ink);
  border-radius: 8px;
}

.ask-send svg {
  width: 13px;
  height: 13px;
}

.guess-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 39px;
  padding: 0 12px;
  color: #fff7e8;
  background: var(--red);
  border-radius: 11px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 5px 13px rgba(159, 52, 32, 0.22);
  transition: transform 0.18s ease, background 0.18s ease;
}

.guess-btn:active {
  transform: scale(0.97);
}

.guess-btn svg {
  width: 13px;
  height: 13px;
}

.guess-btn.is-pulse {
  animation: guess-pulse 1.8s ease-in-out infinite;
}

.composer.is-disabled {
  opacity: 0.56;
  pointer-events: none;
}

/* ---------------- 弹层通用 ---------------- */

.modal-layer {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(24, 21, 16, 0.48);
  backdrop-filter: blur(4px);
  animation: fade-in 0.22s ease both;
}

.modal-layer.is-center {
  align-items: center;
  padding: 18px;
}

.sheet {
  position: relative;
  width: 100%;
  max-height: 88%;
  padding: 19px 17px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background:
    radial-gradient(circle at 90% 0%, rgba(196, 71, 44, 0.07), transparent 30%),
    var(--paper);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -18px 50px rgba(24, 20, 12, 0.22);
  animation: sheet-up 0.32s var(--ease) both;
  scrollbar-width: none;
}

.sheet::-webkit-scrollbar {
  display: none;
}

.sheet::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 34px;
  height: 4px;
  background: rgba(43, 38, 29, 0.15);
  border-radius: 99px;
  transform: translateX(-50%);
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 3px;
}

.sheet-title {
  flex: 1;
}

.sheet-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sheet-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.sheet-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  color: var(--muted);
  background: rgba(43, 38, 29, 0.05);
  border-radius: 50%;
}

.sheet-close svg {
  width: 12px;
  height: 12px;
}

.dialog {
  position: relative;
  width: 100%;
  max-width: 340px;
  max-height: 86%;
  padding: 21px 19px;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(20, 16, 9, 0.3);
  animation: dialog-in 0.3s var(--ease) both;
  scrollbar-width: none;
}

.dialog::-webkit-scrollbar {
  display: none;
}

.dialog.is-dark {
  color: #f8efdd;
  background:
    radial-gradient(circle at 90% 0%, rgba(196, 71, 44, 0.33), transparent 42%),
    linear-gradient(145deg, #2b2821, #191815);
}

/* 问题面板 */

.question-groups {
  margin-top: 14px;
}

.question-group + .question-group {
  margin-top: 13px;
}

.question-group h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--muted-2);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.question-group h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.question-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.question-option {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 39px;
  padding: 8px 9px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 9.5px;
  line-height: 1.4;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.question-option:active {
  background: var(--red-soft);
}

.question-option .q-plus {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--muted-2);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--latin);
  font-size: 10px;
}

.question-option.is-asked {
  opacity: 0.42;
  pointer-events: none;
}

.question-option.is-asked .q-plus {
  font-size: 8px;
}

/* 猜词面板 */

/* 原创语音录制 */

.record-stage {
  margin-top: 14px;
  padding: 14px 12px 11px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.record-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 122px;
  height: 39px;
  padding: 0 14px;
  color: #fff7e8;
  background: var(--red);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 5px 14px rgba(159, 52, 32, 0.2);
}

.record-btn.is-recording {
  background: var(--ink);
  animation: timer-pulse 1.2s ease-in-out infinite;
}

.record-dot {
  width: 6px;
  height: 6px;
  background: #fff1d7;
  border-radius: 50%;
}

.record-btn.is-recording .record-dot {
  background: #ff8c6b;
}

.record-timer {
  display: inline-block;
  min-width: 42px;
  margin-left: 8px;
  color: var(--muted);
  font-family: var(--latin);
  font-size: 13px;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.record-wave {
  display: flex;
  justify-content: center;
  margin: 9px 0 3px;
  color: var(--red);
  opacity: 0.55;
}

.record-status {
  margin: 3px 0 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.6;
}

.record-audio {
  width: 100%;
  height: 34px;
  margin-top: 8px;
}

.upload-link {
  display: inline-block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.record-field {
  display: block;
  margin-top: 10px;
}

.record-field span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.record-field input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  font-size: 10.5px;
}

.record-field input::placeholder {
  color: var(--muted-2);
}

.custom-audio-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 7px 0 8px;
}

.custom-audio-row .listen-btn {
  width: 38px;
  height: 38px;
}

.custom-audio-copy {
  flex: 1;
  min-width: 0;
}

.custom-audio-copy strong {
  display: block;
  margin-bottom: 2px;
  color: #f4dfbe;
  font-size: 10px;
  font-weight: 600;
}

.custom-audio-copy span {
  display: block;
  overflow: hidden;
  color: rgba(248, 239, 221, 0.48);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-audio-row .wave {
  flex: 0 0 52px;
  color: #e9bd8f;
  opacity: 0.45;
}

#custom-audio {
  display: none;
}

.result-audio {
  width: 100%;
  height: 34px;
  margin-top: 9px;
}

.result-mode {
  margin: 0;
  color: var(--red);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* 人数选择 */

.count-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin: 16px 0 0;
}

.count-btn {
  display: grid;
  place-items: center;
  height: 41px;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--latin);
  font-size: 16px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.count-btn.is-selected {
  color: #fff7e8;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 5px 13px rgba(159, 52, 32, 0.2);
}

.setup-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 8.5px;
}

.setup-summary strong {
  color: var(--ink);
  font-family: var(--latin);
  font-size: 15px;
  font-weight: 400;
}

.setup-plus {
  color: var(--muted-2);
}

.setup-note {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.7;
  text-align: center;
}

.guess-panel {
  margin-top: 15px;
}

.guess-field {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 13px;
  background: var(--card-strong);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
}

.guess-field input {
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.guess-field input::placeholder {
  color: var(--muted-2);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
}

.guess-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 9px 1px 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.6;
}

.guess-note strong {
  color: var(--red);
  font-weight: 600;
}

.guess-aliases {
  margin: 11px 0 0;
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(43, 38, 29, 0.035);
  border-radius: 9px;
  font-size: 8.5px;
  line-height: 1.6;
}

.guess-aliases strong {
  color: var(--ink-2);
  font-weight: 600;
}

.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 46px;
  margin-top: 13px;
  color: #fff7e8;
  background: var(--red);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 20px rgba(159, 52, 32, 0.2);
  transition: transform 0.18s ease;
}

.primary-btn:active {
  transform: scale(0.985);
}

.primary-btn.is-dark {
  background: var(--ink);
  box-shadow: 0 8px 20px rgba(33, 31, 26, 0.17);
}

.primary-btn.is-ghost {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 41px;
  margin-top: 7px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* 规则 */

.rule-hero {
  margin: 3px 0 13px;
  text-align: center;
}

.rule-hero .seal-mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  font-size: 25px;
}

.rule-hero h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.rule-hero p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.rule-no {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  color: var(--red);
  border: 1px solid rgba(196, 71, 44, 0.3);
  border-radius: 50%;
  font-family: var(--latin);
  font-size: 8px;
}

.rule-item h3 {
  margin: 0 0 2px;
  font-size: 10.5px;
  font-weight: 600;
}

.rule-item p {
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.6;
}

.rule-scoring {
  margin-top: 11px;
  padding: 10px 11px;
  color: var(--muted);
  background: rgba(196, 71, 44, 0.055);
  border: 1px dashed rgba(196, 71, 44, 0.25);
  border-radius: 10px;
  font-size: 8.5px;
  line-height: 1.7;
}

.rule-scoring strong {
  color: var(--red);
  font-weight: 600;
}

/* ---------------- 对局结果 ---------------- */

.result-dialog {
  padding: 19px 17px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.result-dialog::-webkit-scrollbar {
  display: none;
}

.result-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.result-confetti i {
  position: absolute;
  top: -10px;
  left: var(--x);
  width: 5px;
  height: 9px;
  background: var(--c);
  border-radius: 1px;
  opacity: 0;
  transform: rotate(var(--r));
  animation: confetti-fall var(--d) ease-in var(--delay) both;
}

.result-head {
  position: relative;
  z-index: 1;
  text-align: center;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
  padding: 3px 8px;
  color: var(--red);
  border: 1px solid rgba(196, 71, 44, 0.3);
  border-radius: 999px;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.result-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.result-head .result-sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.result-word {
  position: relative;
  z-index: 1;
  margin: 13px 0 10px;
  padding: 12px 12px 11px;
  text-align: center;
  background: rgba(43, 38, 29, 0.035);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.result-word .pinyin {
  color: var(--red);
  font-size: 18px;
  line-height: 1.2;
}

.result-word h3 {
  margin: 3px 0 4px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.result-word p {
  margin: 0;
  color: var(--ink-2);
  font-size: 10.5px;
}

.result-example {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--card);
  border-left: 2px solid var(--gold);
  border-radius: 0 7px 7px 0;
  font-size: 8.5px;
  line-height: 1.65;
}

.result-stars {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 1px;
}

.result-stars svg {
  width: 20px;
  height: 20px;
}

.result-stars .star-on {
  color: var(--gold);
}

.result-stars .star-off {
  color: rgba(43, 38, 29, 0.14);
}

.result-score {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.result-score-label {
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.6;
}

.result-score-label strong {
  display: block;
  color: var(--ink);
  font-family: var(--latin);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.1;
}

.result-breakdown {
  color: var(--muted-2);
  font-size: 7.5px;
  line-height: 1.7;
  text-align: right;
}

.result-board {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  padding: 8px 9px;
  background: rgba(43, 38, 29, 0.035);
  border-radius: 9px;
}

.result-board h4 {
  margin: 0 0 5px;
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.board-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 8.5px;
}

.board-row .rank {
  width: 13px;
  color: var(--muted-2);
  font-family: var(--latin);
  font-size: 8px;
}

.board-row .board-name {
  flex: 1;
}

.board-row .board-score {
  font-family: var(--latin);
  font-size: 9px;
}

.board-row.is-me {
  color: var(--red);
  font-weight: 600;
}

.result-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.result-actions .primary-btn,
.result-actions .secondary-btn {
  flex: 1;
  height: 43px;
  margin: 0;
}

.result-actions .secondary-btn {
  flex: 0 0 38%;
}

/* 匹配中 */

.match-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  color: #f8efdd;
  text-align: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(196, 71, 44, 0.28), transparent 32%),
    linear-gradient(160deg, #2b2821 0%, #161512 70%, #24221c 100%);
}

.match-back {
  position: absolute;
  top: 13px;
  left: 13px;
  color: rgba(248, 239, 221, 0.7);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(248, 239, 221, 0.18);
}

.match-screen .match-kicker {
  margin-bottom: 10px;
  color: rgba(248, 239, 221, 0.46);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.match-radar {
  position: relative;
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin: 8px 0 14px;
}

.radar-ring {
  position: absolute;
  border: 1px solid rgba(248, 239, 221, 0.12);
  border-radius: 50%;
}

.radar-ring:nth-child(1) {
  width: 100%;
  height: 100%;
}

.radar-ring:nth-child(2) {
  width: 70%;
  height: 70%;
}

.radar-ring:nth-child(3) {
  width: 40%;
  height: 40%;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(196, 71, 44, 0.38), transparent 28%, transparent 100%);
  animation: radar-spin 2.6s linear infinite;
  mask-image: radial-gradient(circle, transparent 26%, #000 27%);
  -webkit-mask-image: radial-gradient(circle, transparent 26%, #000 27%);
}

.radar-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  color: #211f1a;
  background: #e7c587;
  border-radius: 50%;
  font-family: var(--hand);
  font-size: 27px;
  box-shadow: 0 0 0 8px rgba(231, 197, 135, 0.08);
}

.match-screen h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.match-screen .match-sub {
  margin: 6px 0 0;
  color: rgba(248, 239, 221, 0.52);
  font-size: 9px;
  line-height: 1.7;
}

.match-found {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  max-width: 300px;
  margin: 20px auto 4px;
}

.match-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 38px;
  opacity: 0;
  transform: translateY(8px);
  animation: person-in 0.35s var(--ease) forwards;
}

.match-person:nth-child(2) {
  animation-delay: 0.35s;
}

.match-person:nth-child(3) {
  animation-delay: 0.7s;
}

.match-person .player-avatar {
  width: 34px;
  height: 34px;
  border-color: #2b2821;
}

.match-person span {
  color: rgba(248, 239, 221, 0.58);
  font-size: 7.5px;
}

.match-actions {
  margin-top: 22px;
}

.match-cancel {
  padding: 7px 14px;
  color: rgba(248, 239, 221, 0.5);
  border: 1px solid rgba(248, 239, 221, 0.18);
  border-radius: 999px;
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.match-dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 3px;
}

.match-dots i {
  width: 3px;
  height: 3px;
  background: currentColor;
  border-radius: 50%;
  animation: typing 1.1s ease-in-out infinite;
}

.match-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.match-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

/* 空状态 */

.blank-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 30px;
  text-align: center;
}

.blank-screen h2 {
  margin: 12px 0 5px;
  font-family: var(--serif);
  font-size: 20px;
}

.blank-screen p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

/* Toast */

.toast-root {
  position: absolute;
  right: 0;
  bottom: 76px;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.toast {
  max-width: calc(100% - 44px);
  padding: 8px 13px;
  color: #fff7e8;
  background: rgba(28, 26, 21, 0.92);
  border: 1px solid rgba(255, 247, 232, 0.12);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(24, 20, 12, 0.2);
  font-size: 9.5px;
  line-height: 1.5;
  text-align: center;
  animation: toast-in 0.25s var(--ease) both;
  backdrop-filter: blur(8px);
}

/* ---------------- 动画 ---------------- */

@keyframes breathe {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes listen-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.26);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 7px rgba(247, 234, 211, 0.12);
  }
}

@keyframes wave-dance {
  from {
    transform: scaleY(0.55);
    opacity: 0.35;
  }
  to {
    transform: scaleY(1.4);
    opacity: 0.9;
  }
}

@keyframes timer-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes avatar-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stamp-in {
  from {
    opacity: 0;
    transform: scale(1.3) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(-4deg);
  }
}

@keyframes typing {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes guess-pulse {
  0%,
  100% {
    box-shadow: 0 5px 13px rgba(159, 52, 32, 0.22);
  }
  50% {
    box-shadow: 0 5px 20px rgba(159, 52, 32, 0.42);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes radar-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes person-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translateY(-10px) rotate(0);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(310px) rotate(420deg);
  }
}

/* ---------------- 响应式 ---------------- */

@media (hover: hover) and (pointer: fine) {
  .mode-card:hover,
  .pack-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(53, 40, 20, 0.14);
  }

  .chip:hover {
    background: var(--card-strong);
    border-color: var(--line-strong);
  }

  .tab:hover {
    color: var(--ink-2);
  }
}

@media (max-width: 1080px) {
  .stage {
    grid-template-columns: minmax(260px, 340px) auto;
    gap: 46px;
    padding: 24px 32px;
  }

  .stage-title {
    font-size: 62px;
  }

  .stage-lead {
    font-size: 13px;
  }

  .stage-note {
    margin-top: 34px;
  }
}

@media (max-width: 860px) {
  .stage {
    display: flex;
    justify-content: center;
    padding: 20px;
  }

  .stage-copy {
    display: none;
  }

  .device {
    width: min(390px, calc((100dvh - 40px) * 0.462));
  }
}

@media (max-width: 560px) {
  body {
    background: var(--paper);
  }

  body::after {
    display: none;
  }

  .ambient {
    display: none;
  }

  .stage {
    display: block;
    width: 100%;
    height: 100dvh;
    padding: 0;
  }

  .device-wrap,
  .device {
    width: 100%;
    height: 100dvh;
  }

  .device {
    padding: 0;
    aspect-ratio: auto;
    background: var(--paper);
    border-radius: 0;
    box-shadow: none;
  }

  .device::before,
  .device-sensor,
  .device-home {
    display: none;
  }

  .app-frame {
    border-radius: 0;
  }

  .statusbar {
    height: calc(29px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }

  .tabbar {
    height: calc(66px + env(safe-area-inset-bottom));
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }

  .screen-scroll {
    padding-right: 18px;
    padding-left: 18px;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .composer {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .game-screen .composer {
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }

  .sheet {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .toast-root {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .screen-scroll {
    padding-right: 15px;
    padding-left: 15px;
  }

  .hero h2 {
    font-size: 29px;
  }

  .daily-pinyin {
    font-size: 29px;
  }

  .pinyin {
    font-size: 32px;
  }

  .pinyin.is-long {
    font-size: 24px;
  }

  .mode-card {
    min-height: 142px;
    padding: 12px;
  }

  .mode-card h3 {
    font-size: 18px;
  }

  .pack-grid {
    gap: 7px;
  }
}

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

/* =========================================================
   浏览器原生界面重构
   去掉假手机 / 桌面海报，改成全宽响应式应用
   ========================================================= */

:root {
  --bg: #f4efe4;
  --surface: #fffdf8;
  --surface-2: #faf6ed;
  --ink: #1f1d18;
  --ink-2: #302d26;
  --muted: #70695d;
  --muted-2: #958b7c;
  --line: #e2d8c8;
  --line-strong: #cfc2ae;
  --red: #b83d29;
  --red-deep: #97301f;
  --red-soft: #f7e4dc;
  --jade: #1e6f60;
  --gold: #a77b37;
  --shadow: 0 16px 40px rgba(48, 38, 24, 0.1);
  --shadow-soft: 0 6px 18px rgba(48, 38, 24, 0.07);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --hand: "Kaiti SC", "KaiTi", "STKaiti", serif;
}

html,
body {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 252, 244, 0.9), transparent 34%),
    linear-gradient(180deg, #f7f2e8 0%, #f1eadf 100%);
}

body::after {
  display: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

.browser-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
  min-height: 64px;
  padding: 0 clamp(16px, 4vw, 44px);
  background: rgba(250, 246, 237, 0.92);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff8ec;
  background: var(--red);
  border-radius: 9px;
  font-family: var(--hand);
  font-size: 18px;
  transform: rotate(-2deg);
}

.brand-name {
  font-family: var(--serif);
  font-size: 17px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.tab {
  height: 34px;
  padding: 0 14px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 13px;
  transition: background 0.18s ease, color 0.18s ease;
}

.tab:hover {
  color: var(--ink);
  background: rgba(31, 29, 24, 0.05);
}

.tab.is-active {
  color: var(--red-deep);
  background: var(--red-soft);
  font-weight: 700;
}

.tabs.is-hidden {
  display: none;
}

.top-link {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.top-link:hover {
  color: var(--red-deep);
  border-color: rgba(184, 61, 41, 0.35);
}

.app {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: transparent;
}

.screens {
  position: absolute;
  inset: 0;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

.screen.is-active {
  display: flex;
}

.screen-scroll {
  width: 100%;
  height: 100%;
  padding: 30px clamp(18px, 5vw, 56px) 56px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.screen-scroll > * {
  width: 100%;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.screen-scroll::-webkit-scrollbar {
  width: 8px;
}

.screen-scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

/* 首页 */

.home-top {
  display: none;
}

.hero {
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--line);
}

.issue-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.issue-line::before {
  width: 22px;
  height: 1px;
  background: currentColor;
  content: "";
}

.hero h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 6.2vw, 68px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0.01em;
}

.hero h2 em {
  color: var(--red);
  font-style: normal;
}

.hero h2 em::after {
  display: none;
}

.hero p.hero-sub {
  max-width: 600px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 14px;
}

.section-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.04em;
}

.section-head span {
  color: var(--muted-2);
  font-size: 12px;
}

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

.mode-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 210px;
  padding: 22px;
  overflow: hidden;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.mode-choice:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.mode-choice:active {
  transform: translateY(0);
}

.mode-choice.is-create {
  background: linear-gradient(145deg, #221f1a 0%, #3b2b22 100%);
  border-color: #221f1a;
  color: #fff8ec;
}

.mode-choice.is-random {
  background: var(--surface);
}

.mode-choice-kicker {
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.mode-choice.is-create .mode-choice-kicker {
  color: rgba(255, 248, 236, 0.6);
}

.mode-choice-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 18px 0 12px;
  color: #fff8ec;
  background: var(--red);
  border-radius: 11px;
  font-family: var(--hand);
  font-size: 22px;
}

.mode-choice.is-random .mode-choice-icon {
  background: var(--jade);
}

.mode-choice h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.03em;
}

.mode-choice p {
  margin: 6px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.mode-choice.is-create p {
  color: rgba(255, 248, 236, 0.66);
}

.mode-choice-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.mode-choice.is-create .mode-choice-cta {
  color: #f1c58a;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 26px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px;
  background: var(--surface);
}

.stat-value {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
}

.stat-label {
  color: var(--muted-2);
  font-size: 11px;
}

.home-footnote {
  margin: 16px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

/* 页面标题 */

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 2px 0 18px;
  border-bottom: 1px solid var(--line);
}

.page-head-copy {
  flex: 1;
  min-width: 0;
}

.page-head .eyebrow {
  margin: 0 0 5px;
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.page-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* 房间 */

.room-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 5px 10px;
  color: var(--jade);
  border: 1px solid rgba(30, 111, 96, 0.22);
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.room-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.room-card {
  width: 100%;
  padding: 18px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.room-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.room-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.room-card-host {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.room-card-state {
  color: var(--jade);
  font-size: 10px;
}

.room-card h3 {
  margin: 14px 0 4px;
  font-family: var(--serif);
  font-size: 20px;
}

.room-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.room-card-cta {
  display: inline-flex;
  gap: 4px;
  margin-top: 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.seal-mark {
  width: 26px;
  height: 26px;
  color: #fff8ec;
  background: var(--red);
  border-radius: 7px;
  font-family: var(--hand);
  font-size: 15px;
  transform: none;
  box-shadow: none;
}

/* 游戏页 */

.game-screen {
  background: transparent;
}

.game-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 820px;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 24px);
}

.game-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px 0 6px;
}

.game-head-copy {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.game-head-copy strong {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-head-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.room-switch {
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 11px;
}

.players {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 8px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.players::-webkit-scrollbar {
  display: none;
}

.player {
  flex: 0 0 auto;
  min-width: 44px;
}

.player-avatar {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.player-name {
  margin-top: 4px;
  font-size: 9px;
}

.host-ribbon {
  font-size: 6px;
}

.word-card {
  flex: 0 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.word-card .word-region {
  font-size: 10px;
}

.word-card .word-hint {
  font-size: 9px;
}

.word-card .pinyin {
  font-size: clamp(30px, 5vw, 44px);
}

.word-card .word-main strong {
  font-size: 20px;
}

.word-card .word-main span {
  font-size: 11px;
}

.record-status {
  font-size: 11px;
  line-height: 1.6;
}

.feed {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 2px;
  overflow-y: auto;
}

.msg {
  gap: 8px;
  margin-bottom: 10px;
}

.msg-avatar {
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.msg-name {
  margin-bottom: 3px;
  font-size: 10px;
}

.bubble {
  max-width: 86%;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.6;
  border-radius: 12px;
}

.msg.is-me .bubble {
  font-size: 13px;
}

.qa-text {
  font-size: 13px;
}

.stamp {
  font-size: 10px;
  padding: 2px 7px;
}

.composer {
  flex: 0 0 auto;
  padding: 10px 0 14px;
  background: transparent;
}

.composer-meta {
  margin: 0 2px 6px;
  font-size: 10px;
}

.chip {
  padding: 7px 10px;
  font-size: 11px;
}

.ask-row {
  gap: 7px;
  margin-top: 7px;
}

.ask-field {
  height: 43px;
  border-radius: 10px;
}

.ask-field input {
  font-size: 13px;
}

.ask-send {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.guess-btn {
  height: 43px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 12px;
}

.host-waiting {
  font-size: 11px;
}

.host-question-copy p {
  font-size: 9px;
}

.host-question-copy strong {
  font-size: 13px;
}

.host-answer {
  font-size: 13px;
}

.host-answer-note {
  font-size: 10px;
}

/* 我的 */

.profile-card {
  margin-top: 18px;
  padding: 20px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.profile-copy h2 {
  color: var(--ink);
}

.profile-copy p {
  color: var(--muted);
}

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

.profile-card::after {
  display: none;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  font-size: 22px;
}

.profile-copy h2 {
  font-size: 20px;
}

.profile-copy p {
  font-size: 12px;
}

.rank-meta {
  font-size: 10px;
}

.settings-list {
  margin-top: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* 弹层 / 按钮 */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(24, 21, 16, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.sheet {
  width: min(560px, 100%);
  max-height: min(86vh, 820px);
  padding: 20px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(24, 20, 12, 0.28);
  animation: none;
}

.sheet::before {
  display: none;
}

.sheet-title h2 {
  font-size: 20px;
}

.sheet-title p {
  font-size: 12px;
}

.dialog {
  width: min(500px, 100%);
  max-height: min(86vh, 760px);
  padding: 22px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(24, 20, 12, 0.28);
}

.rule-hero h2 {
  font-size: 22px;
}

.rule-hero p {
  font-size: 13px;
}

.rule-item h3 {
  font-size: 14px;
}

.rule-item p {
  font-size: 12px;
}

.primary-btn {
  height: 48px;
  border-radius: 10px;
  font-size: 14px;
}

.secondary-btn {
  height: 44px;
  border-radius: 10px;
  font-size: 13px;
}

.toast-root {
  position: fixed;
  right: 0;
  bottom: 24px;
  left: 0;
  z-index: 200;
}

.toast {
  max-width: min(90vw, 460px);
  padding: 10px 16px;
  font-size: 13px;
}

/* 小屏 */

@media (max-width: 720px) {
  .topbar {
    min-height: 56px;
    gap: 8px;
    padding: 0 14px;
  }

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

  .brand-mark {
    width: 29px;
    height: 29px;
    font-size: 16px;
  }

  .tab {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }

  .top-link {
    height: 30px;
    padding: 0 9px;
    font-size: 11px;
  }

  .screen-scroll {
    padding: 20px 16px 36px;
  }

  .hero {
    padding: 12px 0 20px;
  }

  .hero h2 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .hero p.hero-sub {
    font-size: 14px;
    line-height: 1.75;
  }

  .mode-picker,
  .room-list {
    grid-template-columns: 1fr;
  }

  .mode-choice {
    min-height: 180px;
    padding: 18px;
  }

  .mode-choice h3 {
    font-size: 23px;
  }

  .stats-strip {
    margin-top: 18px;
  }

  .stat-value {
    font-size: 22px;
  }

  .game-shell {
    padding: 0 12px;
  }

  .game-header {
    padding-top: 8px;
  }

  .word-card {
    padding: 15px;
  }

  .bubble {
    max-width: 90%;
  }

  .sheet {
    padding: 18px 16px;
  }
}

@media (max-width: 420px) {
  .brand-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tab {
    padding: 0 8px;
  }

  .top-link {
    display: none;
  }

  .players {
    justify-content: flex-start;
    padding-left: 4px;
  }
}


/* 更大的按钮与更清晰的正文 */

.hero p.hero-sub {
  font-size: 17px;
}

.section-head h3 {
  font-size: 22px;
}

.mode-choice {
  min-height: 230px;
  padding: 24px;
}

.mode-choice-kicker {
  font-size: 12px;
}

.mode-choice h3 {
  font-size: 29px;
}

.mode-choice p {
  font-size: 15px;
}

.mode-choice-cta {
  font-size: 15px;
}

.stat-value {
  font-size: 30px;
}

.stat-label {
  font-size: 13px;
}

.room-card {
  padding: 20px;
}

.room-card h3 {
  font-size: 23px;
}

.room-card p {
  font-size: 14px;
}

.room-card-cta {
  font-size: 14px;
}

.room-card-host {
  font-size: 12px;
}

.room-card-state {
  font-size: 11px;
}

.page-head p {
  font-size: 15px;
}

.game-head-copy strong {
  font-size: 17px;
}

.game-head-copy span {
  font-size: 11px;
}

.player-avatar {
  width: 40px;
  height: 40px;
  font-size: 13px;
}

.player-name {
  font-size: 11px;
}

.bubble {
  font-size: 15px;
  line-height: 1.65;
}

.msg-name {
  font-size: 11px;
}

.qa-text {
  font-size: 15px;
}

.stamp {
  font-size: 11px;
  padding: 3px 8px;
}

.composer-meta {
  font-size: 11px;
}

.chip {
  padding: 9px 12px;
  font-size: 13px;
}

.ask-field {
  height: 50px;
}

.ask-field input {
  font-size: 15px;
}

.ask-send {
  width: 36px;
  height: 36px;
}

.guess-btn {
  height: 50px;
  padding: 0 16px;
  font-size: 14px;
}

.room-switch {
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

.icon-btn {
  width: 42px;
  height: 42px;
}

.primary-btn {
  height: 56px;
  font-size: 16px;
}

.secondary-btn {
  height: 50px;
  font-size: 15px;
}

.setting-row {
  min-height: 64px;
  padding: 14px 16px;
}

.setting-row .setting-icon {
  width: 32px;
  height: 32px;
}

.setting-row .setting-icon svg {
  width: 16px;
  height: 16px;
}

.setting-copy strong {
  font-size: 14px;
}

.setting-copy span {
  margin-top: 3px;
  font-size: 11px;
}

.setting-arrow {
  font-size: 15px;
}

.tab {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.top-link {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.brand-name {
  font-size: 18px;
}

.sheet-title h2 {
  font-size: 22px;
}

.sheet-title p {
  font-size: 14px;
}

.dialog .rule-hero h2 {
  font-size: 24px;
}

.dialog .rule-hero p {
  font-size: 15px;
}

.host-answer {
  min-height: 52px;
  font-size: 15px;
}

.host-question-copy strong {
  font-size: 15px;
}

.host-question-copy p {
  font-size: 11px;
}

.host-answer-note,
.host-waiting {
  font-size: 12px;
}

@media (max-width: 720px) {
  .hero p.hero-sub {
    font-size: 15px;
  }

  .mode-choice {
    min-height: 200px;
  }

  .mode-choice h3 {
    font-size: 25px;
  }

  .mode-choice p {
    font-size: 14px;
  }

  .primary-btn {
    height: 54px;
    font-size: 15px;
  }

  .secondary-btn {
    height: 48px;
    font-size: 14px;
  }

  .setting-row {
    min-height: 60px;
    padding: 12px 13px;
  }

  .setting-copy strong {
    font-size: 13px;
  }

  .setting-copy span {
    font-size: 10px;
  }
}
