:root {
  --fs: 1.18; /* 全局字号缩放倍率：改这一个值即可整体放大/缩小 */
  color-scheme: light; /* 纸片风为浅色：原生下拉/滚动条按浅色渲染 */
  /* 纸片涂鸦风调色板（变量名沿用，便于 base.css 与历史规则兼容） */
  --void: #F4ECDA;      /* 页面奶油纸底 */
  --mauve: #8A7A5E;     /* 次级文字 / 弱描边（暖棕） */
  --hot: #E0492E;       /* 砖红：主按钮 / 强调 */
  --mag: #3F76C4;       /* 钢笔蓝：庄家答案 / 链接色 */
  --pink: #F5B31B;      /* 芥末黄：高亮 / 轮到你 / 星星 */
  --ink: #1F1B16;       /* 描边与正文（近黑） */
  --paper: #FFFDF4;     /* 卡片纸面 */
  --ink-shadow: 4px 4px 0 rgba(31, 27, 22, .85);  /* 硬投影 */

  /* 字体：标题用站酷快乐体（马克笔感），正文回归清爽黑体，西文数字用圆体 Fredoka */
  --font-display: 'ZCOOL KuaiLe', 'Fredoka', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', 'Fredoka', sans-serif;
  --font-mono: 'Fredoka', 'Noto Sans SC', sans-serif;
}

/* ===== 动画 ===== */
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes popIn { 0% { transform: scale(.82); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes tilt { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(-1deg); } }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-6px); opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes drift { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(0, -120px, 0); } }
@keyframes floaty { 0% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-22px) rotate(10deg); } 100% { transform: translateY(0) rotate(0); } }
@keyframes sheen { 0%, 100% { box-shadow: var(--ink-shadow); } 50% { box-shadow: var(--ink-shadow), 0 0 0 4px rgba(245, 179, 27, .5); } }
@keyframes zoomin { 0% { transform: scale(.4) rotate(-8deg); opacity: 0; } 70% { transform: scale(1.08) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { transform: scale(.45); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes corePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.4); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ===== 舞台 ===== */
.stage {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(24px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.motes { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.mote { position: absolute; border-radius: 50%; opacity: .3; animation: drift linear infinite; }

.screen { display: none; flex-direction: column; flex: 1; position: relative; z-index: 1; }
.screen.is-active { display: flex; animation: riseIn .34s cubic-bezier(.2,.8,.2,1) both; }

.avatar-svg { display: block; width: 100%; height: 100%; }

/* ===== 开始屏 ===== */
.screen--start { justify-content: center; gap: calc(18px * var(--fs)); position: relative; }

.void-ring {
  position: absolute;
  top: 4%;
  right: -10%;
  width: 46vw;
  max-width: 230px;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
/* 不完整圆：缺口随旋转移动 */
.ring-arc {
  fill: none;
  stroke: var(--mauve);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 240 87; /* 周长≈327，留缺口 */
  opacity: .55;
  transform-box: view-box;
  transform-origin: 60px 60px;
  animation: spin 7s linear infinite;
}
/* 圈内的趣味动画：扩散脉冲 + 呼吸圆点 */
.ring-ping {
  fill: none;
  stroke: var(--hot);
  stroke-width: 2;
  transform-box: view-box;
  transform-origin: 60px 60px;
  animation: ping 1.8s ease-out infinite;
}
.ring-core {
  fill: var(--hot);
  transform-box: view-box;
  transform-origin: 60px 60px;
  animation: corePulse 1.8s ease-in-out infinite;
}

.kicker {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs));
  letter-spacing: .22em;
  color: var(--mauve);
  text-transform: uppercase;
  margin: 0 0 6px;
}

.title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: calc(clamp(64px, 22vw, 128px) * var(--fs));
  line-height: .92;
  margin: 0;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}
.title__l1 { margin-left: 2%; }
.title__l2-wrap {
  margin-left: 26%;
  position: relative;
  display: block;
  width: fit-content;
}

/* 「额」= 品牌记忆点：砖红主色 + 墨色描边 + 芥末黄手绘下划线 + 轻微放大。
   放大仅 1.06em，与「探」（1em）协调不破坏排版；下划线用 transform 缩放，
   不依赖字号，因此在任何断点下笔画粗细都保持一致。 */
.title__l2 {
  color: var(--hot);
  position: relative;
  z-index: 1;
  /* 相对「探」放大 6%：仍走 --fs 缩放体系，保证全局字号调节一致 */
  font-size: calc(clamp(64px, 22vw, 128px) * var(--fs) * 1.06);
  -webkit-text-stroke: 2.5px var(--ink);
  paint-order: stroke fill;
  text-shadow:
    3px 3px 0 var(--ink),
    0 0 18px rgba(245, 179, 27, .35);
}
.title-underline {
  position: absolute;
  left: -.04em;
  right: -.04em;
  /* 落在字形底部之下（字高约 1em，行盒含降部空间），避免被笔画遮住 */
  bottom: -.10em;
  width: calc(100% + .08em);
  height: .15em;
  z-index: 0;
  overflow: visible;
  filter: drop-shadow(2px 2px 0 rgba(31, 27, 22, .55));
}
.title-underline path {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: draw 1s .45s cubic-bezier(.3, .7, .3, 1) forwards;
}

/* 艺术体的「头」：手绘笔触 + 落笔动画 */
/* 装饰图形（探额旁的问号徽记）：比原「头」字略小并留出间距，
   避免与「探」字笔画挤在一起。 */
.title-char {
  display: inline-block;
  width: .82em;
  height: .82em;
  margin-left: .04em;
  vertical-align: -0.04em;
  animation: floaty 7s ease-in-out infinite;
  filter: drop-shadow(0 3px 0 rgba(31, 27, 22, .18));
}
.title-char path {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: draw .9s ease forwards;
}
.title-char path:nth-child(2) { animation-delay: .12s; }
.title-char path:nth-child(3) { animation-delay: .24s; }
.title-char path:nth-child(4) { animation-delay: .36s; }
.title-char path:nth-child(5) { animation-delay: .5s; }

.lede { font-size: calc(clamp(0.9rem, 3.8vw, 1rem) * var(--fs)); line-height: 1.7; color: var(--mauve); max-width: 32ch; margin: 4px 0 8px; }

.cast { display: flex; align-items: center; gap: calc(14px * var(--fs)); margin: 6px 0 4px; flex-wrap: wrap; }
.cast__item { display: flex; align-items: center; gap: calc(8px * var(--fs)); }
.cast__avatar { width: calc(46px * var(--fs)); height: calc(46px * var(--fs)); }
.cast__avatar .avatar-svg { animation: bob 3.6s ease-in-out infinite; }
.cast__item:last-child .cast__avatar .avatar-svg { animation-delay: .6s; }
.cast__name { font-family: var(--font-mono); font-size: calc(12px * var(--fs)); letter-spacing: .12em; color: var(--mauve); }
.cast__vs { font-family: var(--font-mono); font-size: calc(12px * var(--fs)); letter-spacing: .2em; color: var(--hot); }

.hint { font-family: var(--font-mono); font-size: calc(11px * var(--fs)); letter-spacing: .12em; color: var(--mauve); opacity: .75; margin-top: 10px; }

/* ===== 按钮：纸片风 = 实色 + 粗黑描边 + 硬投影 ===== */
.btn {
  border: 2.5px solid var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: calc(16px * var(--fs));
  letter-spacing: .14em;
  padding: calc(14px * var(--fs)) calc(28px * var(--fs));
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn--hot { background: var(--hot); color: #FFFDF4; align-self: flex-start; margin-left: 6%; box-shadow: var(--ink-shadow); }
.btn--hot:hover { animation: sheen 1.6s ease-in-out infinite; }
.btn:disabled { opacity: .45; }
.btn--pink { background: var(--pink); color: var(--ink); border-color: var(--ink); align-self: center; box-shadow: var(--ink-shadow); }

/* ===== 游戏屏 ===== */
.screen--play { gap: calc(16px * var(--fs)); position: relative; }

.hud { display: flex; align-items: center; justify-content: space-between; gap: calc(10px * var(--fs)); }
.cat-tag {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs));
  letter-spacing: .1em;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 4px 10px;
  background: var(--pink);
  border-radius: 10px;
  animation: tilt 4.5s ease-in-out infinite;
}
.score { font-family: var(--font-mono); font-size: calc(12px * var(--fs)); letter-spacing: .12em; color: var(--hot); font-weight: 700; }
.hud__right { display: flex; align-items: center; gap: calc(10px * var(--fs)); }
.hud__btn {
  font-family: var(--font-mono);
  font-size: calc(11px * var(--fs));
  letter-spacing: .08em;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: calc(4px * var(--fs)) calc(10px * var(--fs));
  border-radius: 10px;
  box-shadow: 0 2px 0 var(--ink);
}
.hud__btn:active { transform: translateY(2px); box-shadow: none; }

.keeper { margin-top: 8px; align-self: flex-start; max-width: 90%; display: flex; gap: calc(12px * var(--fs)); align-items: flex-start; }
.keeper__avatar { width: calc(58px * var(--fs)); height: calc(58px * var(--fs)); flex: 0 0 auto; }
.keeper__avatar .avatar-svg { animation: bob 3.6s ease-in-out infinite; }
.keeper.is-thinking .keeper__avatar .avatar-svg { animation: pulse 1.1s ease-in-out infinite; }
.keeper__body { display: flex; flex-direction: column; gap: calc(6px * var(--fs)); min-width: 0; }
.keeper__label { font-family: var(--font-mono); font-size: calc(11px * var(--fs)); letter-spacing: .18em; color: var(--mag); }
.keeper__ans {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: calc(clamp(30px, 10vw, 50px) * var(--fs));
  line-height: 1.1;
  color: var(--mag);
  border: 2.5px solid var(--ink);
  padding: 10px 18px;
  background: var(--paper);
  box-shadow: var(--ink-shadow);
  word-break: break-word;
  min-height: 1.2em;
}
.keeper__ans.pop { animation: popIn .34s cubic-bezier(.2,.9,.2,1.2); }
/* 开场白：用"说话"字号，黄签纸卡片 */
.keeper__ans--intro {
  font-size: calc(clamp(15px, 4.6vw, 19px) * var(--fs));
  line-height: 1.55;
  letter-spacing: .02em;
  padding: 12px 16px;
  color: var(--ink);
  border-color: var(--ink);
  background: #FFF3C9;
}
/* 嘲讽：醒目 + 抖动 */
.keeper__ans--taunt {
  font-size: calc(clamp(16px, 5vw, 22px) * var(--fs));
  line-height: 1.5;
  color: var(--hot);
  border-color: var(--ink);
  background: #FDE9E4;
  transform: rotate(-1.2deg);
}
.keeper.shake { animation: shake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

/* ===== 等待态（2026-10-12）：与答案态严格互斥 =====
   设计要点：
   1) 复用答案卡片的视觉语言（墨色描边 + 硬阴影 + 纸张底），保持风格统一；
   2) 显式给出 `[hidden] { display: none }` —— 否则 display:inline-flex 会
      覆盖 hidden 属性，导致等待点常驻可见（这是旧实现的真实缺陷）；
   3) 打字机省略号：三点逐个跳动 + 文案末尾循环，暗示「正在生成」；
   4) 降低对比度但保持可读，不与真实答案争夺注意力。 */
.keeper__waiting {
  display: inline-flex;
  align-items: center;
  gap: calc(6px * var(--fs));
  align-self: flex-start;
  min-height: 1.2em;
  padding: 10px 18px;
  border: 2.5px dashed var(--ink);
  background: var(--paper);
  box-shadow: var(--ink-shadow);
  color: var(--mag);
  font-family: var(--font-mono);
  font-weight: 700;
  /* 字号略小于答案卡片：等待态不该抢戏（真实截图显示过大时"正在思考"会折行） */
  font-size: calc(clamp(15px, 4.6vw, 23px) * var(--fs));
  line-height: 1.2;
  /* 单行不折行：短文案必须排成一行，保持节奏稳定 */
  white-space: nowrap;
}
.keeper__waiting[hidden] { display: none; }
/* 轻微呼吸，暗示「活着」，不喧宾夺主 */
.keeper__waiting-text { opacity: .82; }
/* 极窄屏兜底：放不下时才允许换行，避免溢出裁切 */
@media (max-width: 320px) {
  .keeper__waiting { white-space: normal; }
}
.keeper__dots { display: inline-flex; gap: calc(5px * var(--fs)); }
.keeper__dots i {
  width: .5em; height: .5em; border-radius: 50%;
  background: var(--mag); display: block;
  animation: waitingDot 1.15s ease-in-out infinite;
}
.keeper__dots i:nth-child(2) { animation-delay: .16s; }
.keeper__dots i:nth-child(3) { animation-delay: .32s; }
@keyframes waitingDot {
  0%, 70%, 100% { transform: translateY(0); opacity: .3; }
  35% { transform: translateY(-.28em); opacity: 1; }
}
/* 无障碍：尊重「减少动态效果」的系统偏好 */
@media (prefers-reduced-motion: reduce) {
  .keeper__waiting { animation: none; }
  .keeper__dots i { animation: none; opacity: .7; }
}
/* 窄屏：与答案卡片保持同样的内边距节奏 */
@media (max-width: 480px) {
  .keeper__waiting { padding: 8px 14px; }
}

/* ===== 日志星丛 ===== */
.log-wrap { display: flex; flex-direction: column; gap: calc(8px * var(--fs)); flex: 1; min-height: 0; }
.log-toggle {
  align-self: flex-end;
  font-family: var(--font-mono);
  font-size: calc(11px * var(--fs));
  letter-spacing: .08em;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: calc(4px * var(--fs)) calc(10px * var(--fs));
  border-radius: 10px;
  box-shadow: 0 2px 0 var(--ink);
}
.log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: calc(14px * var(--fs)); padding: 4px 2px; -webkit-overflow-scrolling: touch; }
.log.collapsed { display: none; }

.entry { display: flex; flex-direction: column; gap: calc(8px * var(--fs)); }
.line { display: flex; align-items: flex-end; gap: calc(8px * var(--fs)); animation: riseIn .3s ease both; }
.line--q { justify-content: flex-end; }
.line--a { justify-content: flex-start; }
.mini-avatar { width: calc(30px * var(--fs)); height: calc(30px * var(--fs)); flex: 0 0 auto; }
.mini-avatar .avatar-svg { animation: bob 3.6s ease-in-out infinite; }

.entry__q {
  text-align: right;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: calc(clamp(0.92rem, 3.9vw, 1rem) * var(--fs));
  color: var(--ink);
  border: 2px solid var(--ink);
  border-right: 4px solid var(--hot);
  padding: 6px 12px;
  background: var(--paper);
  box-shadow: 2px 2px 0 rgba(31, 27, 22, .8);
  max-width: 78%;
  word-break: break-word;
}
.entry__a {
  font-family: var(--font-mono);
  font-size: calc(14px * var(--fs));
  letter-spacing: .03em;
  color: var(--mag);
  border: 2px solid var(--ink);
  border-left: 4px solid var(--mag);
  padding: 6px 12px;
  background: var(--paper);
  box-shadow: 2px 2px 0 rgba(31, 27, 22, .8);
  max-width: 78%;
  word-break: break-word;
}

/* ===== 输入区 ===== */
.compose { display: flex; flex-direction: column; gap: calc(10px * var(--fs)); }
.compose__top { display: flex; align-items: center; justify-content: space-between; gap: calc(10px * var(--fs)); }
.player-badge { display: flex; align-items: center; gap: calc(8px * var(--fs)); }
.player-badge__avatar { width: calc(36px * var(--fs)); height: calc(36px * var(--fs)); }
.player-badge__avatar .avatar-svg { animation: bob 3.6s ease-in-out infinite; }
.player-badge__name { font-family: var(--font-mono); font-size: calc(12px * var(--fs)); letter-spacing: .12em; color: var(--hot); font-weight: 700; }
.compose__tip { font-family: var(--font-mono); font-size: calc(11px * var(--fs)); letter-spacing: .04em; color: var(--mauve); opacity: .85; }

.compose__row { display: flex; align-items: center; gap: calc(8px * var(--fs)); }

.field {
  flex: 1;
  min-width: 0;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  color: var(--ink);
  font-size: calc(16px * var(--fs)); /* ≥16px 防止 iOS 聚焦时自动放大 */
  padding: calc(12px * var(--fs)) calc(16px * var(--fs));
  border-radius: 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field:focus { border-color: var(--hot); box-shadow: 0 3px 0 var(--hot); }
.field::placeholder { color: var(--mauve); opacity: .7; }
.btn--send { padding: calc(12px * var(--fs)) calc(18px * var(--fs)); font-size: calc(14px * var(--fs)); margin-left: 0; }

/* ===== 选类别屏 ===== */
.screen--cat { gap: calc(14px * var(--fs)); }
.cat-title { font-family: var(--font-display); font-weight: 400; font-size: calc(clamp(30px, 9vw, 46px) * var(--fs)); color: var(--ink); margin: 2px 0 6px; }
.cat-grid { display: flex; flex-wrap: wrap; gap: calc(9px * var(--fs)); align-content: flex-start; overflow-y: auto; flex: 1; min-height: 0; padding-bottom: 6px; }
.cat-chip {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: calc(14px * var(--fs));
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: calc(9px * var(--fs)) calc(14px * var(--fs));
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .12s ease, background .2s ease, color .2s ease;
}
.cat-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.cat-chip:hover { background: var(--pink); }
.btn--plain {
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-size: calc(13px * var(--fs));
  padding: calc(10px * var(--fs)) calc(18px * var(--fs));
  align-self: center;
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--ink);
}

/* ===== 通关/庆祝屏 ===== */
.screen--win { justify-content: center; align-items: center; gap: calc(12px * var(--fs)); text-align: center; position: relative; overflow: hidden; }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.blob { position: absolute; width: 38vw; max-width: 200px; height: 38vw; max-height: 200px; border-radius: 50%; filter: blur(38px); opacity: .35; animation: floaty 7s ease-in-out infinite; }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

.win-avatar { width: calc(92px * var(--fs)); height: calc(92px * var(--fs)); animation: zoomin .6s cubic-bezier(.2,.9,.2,1.3) both; }
.win-avatar .avatar-svg { animation: bob 1.6s ease-in-out infinite; }
.win-kicker { font-family: var(--font-mono); font-size: calc(12px * var(--fs)); letter-spacing: .3em; color: var(--mauve); margin: 0; }
.win-title { font-family: var(--font-display); font-weight: 400; font-size: calc(clamp(44px, 15vw, 78px) * var(--fs)); color: var(--ink); margin: 0; animation: zoomin .55s cubic-bezier(.2,.9,.2,1.3) both; }
.win-ans { font-family: var(--font-mono); font-weight: 700; font-size: calc(clamp(30px, 10vw, 48px) * var(--fs)); color: var(--hot); margin: 0; word-break: break-all; animation: popIn .5s .12s cubic-bezier(.2,.9,.2,1.2) both; }
.win-stats { display: flex; gap: calc(18px * var(--fs)); align-items: center; font-family: var(--font-mono); font-size: calc(14px * var(--fs)); color: var(--mauve); }
.stars { color: var(--hot); letter-spacing: .1em; font-size: calc(20px * var(--fs)); }
.win-next { font-family: var(--font-mono); font-size: calc(12px * var(--fs)); letter-spacing: .1em; color: var(--mauve); margin: 2px 0 0; }

.screen--win > :not(.confetti):not(.fx) { position: relative; z-index: 3; }

/* ===== Toast：黄签纸 ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--pink);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--ink-shadow);
  font-family: var(--font-mono);
  font-size: calc(13px * var(--fs));
  padding: calc(10px * var(--fs)) calc(16px * var(--fs));
  z-index: 50;
  max-width: 90vw;
  text-align: center;
  animation: riseIn .2s ease both;
}

/* ===== 出品人 ===== */
.credit {
  text-align: center;
  font-family: var(--font-mono);
  font-size: calc(11px * var(--fs));
  letter-spacing: .16em;
  color: var(--mauve);
  opacity: .65;
  padding-top: 10px;
}

@media (min-width: 560px) {
  .stage { max-width: 560px; }
}

/* 小屏（≤380px，如 iPhone SE）收紧排版 */
@media (max-width: 380px) {
  .title { font-size: calc(clamp(54px, 24vw, 96px) * var(--fs)); }
  /* 描边随字号收窄，避免小屏下「额」字糊成一团 */
  .title__l2 { -webkit-text-stroke-width: 2px; text-shadow: 2px 2px 0 var(--ink), 0 0 14px rgba(245, 179, 27, .35); }
  .title-underline path { stroke-width: 9; }
  .cat-chip { font-size: calc(13px * var(--fs)); padding: calc(8px * var(--fs)) calc(11px * var(--fs)); }
  .keeper__ans { padding: 8px 14px; }
  .keeper__avatar { width: calc(48px * var(--fs)); height: calc(48px * var(--fs)); }
  .btn--send { padding: calc(12px * var(--fs)) calc(14px * var(--fs)); }
}

/* 横屏/窄高时减少上边距，避免内容被顶出 */
@media (max-height: 620px) {
  .screen--start { gap: calc(12px * var(--fs)); }
  .title { font-size: calc(clamp(46px, 16vh, 96px) * var(--fs)); }
}

/* ===== 入口按钮 ===== */
.entry-btns { display: flex; gap: calc(10px * var(--fs)); flex-wrap: wrap; }

/* ===== 多人：入口 ===== */
.screen--mp-entry { justify-content: center; gap: calc(14px * var(--fs)); }
.mp-title { font-family: var(--font-display); font-weight: 400; font-size: calc(clamp(34px, 11vw, 56px) * var(--fs)); color: var(--ink); margin: 0 0 4px; }
.mp-form { display: flex; flex-direction: column; gap: calc(10px * var(--fs)); }
.mp-form input {
  background: var(--paper); border: 2.5px solid var(--ink);
  color: var(--ink); font-size: calc(16px * var(--fs)); padding: calc(12px * var(--fs)) calc(16px * var(--fs)); border-radius: 12px; outline: none;
}
.mp-form input:focus { border-color: var(--hot); box-shadow: 0 3px 0 var(--hot); }
.mp-or { text-align: center; font-family: var(--font-mono); font-size: calc(11px * var(--fs)); color: var(--mauve); letter-spacing: .2em; }
.mp-msg { font-family: var(--font-mono); font-size: calc(12px * var(--fs)); color: var(--hot); font-weight: 700; margin: 0; min-height: 1.2em; }
.mp-note { font-family: var(--font-body); font-size: calc(11px * var(--fs)); line-height: 1.6; color: var(--mauve); margin: 0; }

/* ===== 多人：房间 / 桌面 ===== */
.screen--room { gap: calc(10px * var(--fs)); }
.room-bar { display: flex; align-items: center; justify-content: space-between; gap: calc(8px * var(--fs)); }
.room-id { font-family: var(--font-mono); font-size: calc(12px * var(--fs)); color: var(--mauve); display: inline-flex; align-items: center; gap: calc(6px * var(--fs)); }
.room-id b { color: var(--ink); letter-spacing: .18em; }
.room-phase { font-family: var(--font-mono); font-size: calc(11px * var(--fs)); color: var(--hot); font-weight: 700; }

/* 玩家列表：白卡 + 粗黑描边 + 硬投影 */
.players-wrap { flex: 1; min-height: 0; overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; padding: 2px 0; }
.players { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(148px * var(--fs)), 1fr)); gap: calc(9px * var(--fs)); align-content: start; }
.pc {
  display: flex; align-items: center; gap: calc(9px * var(--fs)); padding: 9px 11px;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(31, 27, 22, .8);
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.pc--in { animation: riseIn .3s ease both; }
.pc--me { border-color: var(--hot); background: #FFF1EA; }
.pc--turn { border-color: var(--ink); background: #FFF3C9; animation: sheen 1.6s ease-in-out infinite; }
.pc--dead { opacity: .45; filter: grayscale(.7); }
.pc--off { border-style: dashed; }
/* 已通关（按名次）：黄签纸高亮 */
.pc--win { border-color: var(--ink); background: #FFF3C9; opacity: 1; filter: none; }
.pc--win .pc__name { color: var(--hot); }
/* 自己的问答：默认折叠，点击展开 */
.pc__hist-toggle {
  align-self: flex-start; margin-top: 2px;
  font-size: calc(11px * var(--fs)); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px;
  padding: calc(1px * var(--fs)) calc(8px * var(--fs));
}
.pc__hist { display: none; list-style: none; margin: 2px 0 0; padding: 0; gap: 2px; flex-direction: column; max-height: 34vh; overflow-y: auto; }
.pc--hist-open .pc__hist { display: flex; }
.pc__hist li { font-size: calc(11.5px * var(--fs)); line-height: 1.45; color: var(--mauve); border-left: 2px dashed var(--mauve); padding-left: calc(7px * var(--fs)); word-break: break-word; }
.pc__avatar { width: calc(34px * var(--fs)); height: calc(34px * var(--fs)); flex: 0 0 auto; }
.pc__avatar > span { display: block; width: 100%; height: 100%; }
.avatar-svg--face svg { display: block; width: 100%; height: 100%; }
.pc__main { display: flex; flex-direction: column; gap: calc(2px * var(--fs)); min-width: 0; }
.pc__name { font-size: calc(13px * var(--fs)); font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc__card {
  font-size: calc(12.5px * var(--fs)); color: var(--mag); background: #EDF3FB;
  border: 1.5px dashed var(--mag); border-radius: 8px; padding: calc(1px * var(--fs)) calc(9px * var(--fs));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pc--me .pc__card { color: var(--mauve); border-color: var(--mauve); background: #F5EFE2; }
.pc--show .pc__card { background: var(--pink); color: var(--ink); border: 2px solid var(--ink); font-weight: 700; }

.room-status { display: flex; flex-direction: column; align-items: center; gap: calc(2px * var(--fs)); text-align: center; }
.room-status b { font-size: calc(13px * var(--fs)); color: var(--ink); }
.room-status span { font-size: calc(11px * var(--fs)); color: var(--mauve); }
.room-status .qline { color: var(--hot); font-weight: 700; }
.room-status .hintline { font-size: calc(10px * var(--fs)); opacity: .85; }

.room-controls { display: flex; flex-direction: column; gap: calc(8px * var(--fs)); }
.ctl-row { display: flex; align-items: center; gap: calc(8px * var(--fs)); }
.ctl-row label { font-family: var(--font-mono); font-size: calc(11px * var(--fs)); color: var(--mauve); width: 34px; }
.ctl-row select, .ctl-row input {
  flex: 1; min-width: 0; background: var(--paper); border: 2px solid var(--ink);
  color: var(--ink); font-size: calc(16px * var(--fs)); padding: calc(9px * var(--fs)) calc(12px * var(--fs)); border-radius: 12px; outline: none;
}
.ctl-btns { display: flex; gap: calc(8px * var(--fs)); flex-wrap: wrap; align-items: center; }
.ctl-btns .btn { padding: calc(10px * var(--fs)) calc(16px * var(--fs)); font-size: calc(14px * var(--fs)); }
.ctl-btns input { flex: 1; min-width: 120px; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); font-size: calc(16px * var(--fs)); padding: calc(9px * var(--fs)) calc(12px * var(--fs)); border-radius: 12px; outline: none; }
.ctl-note { font-family: var(--font-body); font-size: calc(12px * var(--fs)); color: var(--mauve); margin: 0; }

.room-log { list-style: none; max-height: 28vh; overflow-y: auto; display: flex; flex-direction: column; gap: calc(4px * var(--fs)); padding: 4px 0; }
.room-log li { font-size: calc(12.5px * var(--fs)); color: var(--mauve); line-height: 1.5; border-left: 2px dashed var(--mauve); padding-left: 8px; word-break: break-word; }
.room-log .lg-a { color: var(--mag); border-color: var(--mag); }
.room-log .lg-miss { border-color: var(--mauve); }
.room-log .lg-hit { color: var(--hot); border-color: var(--hot); font-weight: 700; }
.room-log .lg-sys { opacity: .8; }

/* ===== 本局结果榜（局末自动公布）：大黄卡 ===== */
.result {
  position: absolute; inset: 0; z-index: 35;
  display: flex; align-items: center; justify-content: center;
  padding: calc(12px * var(--fs));
  background: rgba(31, 27, 22, .55); border-radius: 18px;
}
.result__card {
  width: 100%; max-width: calc(430px * var(--fs)); max-height: 100%; overflow-y: auto;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: 6px 6px 0 rgba(31, 27, 22, .85);
  padding: calc(14px * var(--fs));
  display: flex; flex-direction: column; gap: calc(10px * var(--fs));
  animation: zoomin .42s cubic-bezier(.2, .9, .2, 1.3) both;
}
.result__title { margin: 0; text-align: center; font-size: calc(18px * var(--fs)); color: var(--ink); font-family: var(--font-display); }
.result__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(7px * var(--fs)); }
.result__item {
  display: grid; grid-template-columns: auto auto 1fr; align-items: center;
  gap: calc(8px * var(--fs));
  padding: calc(7px * var(--fs)) calc(10px * var(--fs));
  border-radius: 12px; background: #FBF6E9;
  border: 2px solid rgba(31, 27, 22, .35);
}
.result__item--1 { border-color: var(--ink); background: #FFF3C9; }
.result__item--2 { border-color: rgba(31, 27, 22, .6); background: #F1EFE8; }
.result__item--3 { border-color: rgba(31, 27, 22, .5); background: #FBE9DC; }
.result__rank { font-size: calc(13px * var(--fs)); color: var(--ink); white-space: nowrap; font-weight: 700; }
.result__avatar { width: calc(30px * var(--fs)); height: calc(30px * var(--fs)); }
.result__avatar > span { display: block; width: 100%; height: 100%; }
.result__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.result__name { font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result__stat { font-size: calc(12px * var(--fs)); color: var(--mauve); }
.result__item--1 .result__stat { color: var(--hot); font-weight: 700; }
.result[hidden] { display: none; }

/* ===== 纸片风：原生控件与细节 ===== */
/* 原生下拉：白底墨字，自绘三角箭头 */
select {
  background-color: var(--paper) !important;
  color: var(--ink) !important;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 30px !important;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select option { background-color: var(--paper); color: var(--ink); }

/* 输入框统一：白纸面 + 墨描边 + 圆角矩形 */
.ctl-row select, .ctl-row input, .mp-form input, .ctl-btns input, .field {
  border-radius: 12px !important;
  border-width: 2px !important;
}
.field { border-left-width: 2px !important; padding: calc(12px * var(--fs)) calc(16px * var(--fs)) !important; }

/* 按钮与小标签：圆角矩形（跟随参考图，不再是胶囊） */
.btn, .btn--plain, .hud__btn, .log-toggle, .cat-chip { border-radius: 12px !important; }
.toast { border-radius: 12px !important; }

/* 气泡与卡片：圆角矩形 + 硬投影 */
.keeper__ans { border-radius: 14px !important; }
.entry__q, .entry__a { border-radius: 10px !important; }

/* ===== 自定义类别输入行（出现在类别网格末尾） ===== */
.cat-custom { display: flex; gap: calc(8px * var(--fs)); width: 100%; align-items: center; }
.cat-custom input {
  flex: 1; min-width: 0; background: var(--paper);
  border: 2px solid var(--ink); color: var(--ink);
  font-size: calc(15px * var(--fs));
  padding: calc(10px * var(--fs)) calc(14px * var(--fs));
  border-radius: 12px; outline: none;
}
.cat-custom input:focus { border-color: var(--hot); box-shadow: 0 3px 0 var(--hot); }
.cat-custom .btn { padding: calc(10px * var(--fs)) calc(14px * var(--fs)); font-size: calc(13px * var(--fs)); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* ===== 自定义类别：可长按删除（V1.0.2） ===== */
.cat-chip--mine { background: #FFF3C9; border-color: var(--ink); }
.cat-chip--mine:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(31, 27, 22, .8); }
