/* 《遗卷寻踪》原型样式：水墨卷轴 · 宣纸 · 朱砂印 */

:root {
  --paper: #f4ede0;
  --paper-2: #ece3d2;
  --paper-3: #ddd0b8;
  --paper-4: #faf6ed;
  --ink: #221f19;
  --ink-2: #4c463a;
  --ink-3: #7a7162;
  --red: #a2332a;
  --red-bright: #c04a37;
  --gold: #a3855a;
  --jade: #456355;
  --line: rgba(34, 31, 25, 0.14);
  --line-strong: rgba(34, 31, 25, 0.28);
  --shadow: 0 16px 40px rgba(34, 28, 20, 0.18);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
}

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

html {
  background: #cfc4af;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.16), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(120, 100, 70, 0.16), transparent 50%),
    #cbc0ab;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button {
  font-family: inherit;
  color: inherit;
}

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

img {
  display: block;
}

.app {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 30px 80px rgba(30, 24, 16, 0.28);
  overflow-x: hidden;
}

@media (min-width: 900px) {
  .app::before {
    content: "开卷知遗脉\A寻踪见匠心";
    white-space: pre;
    position: fixed;
    left: calc(50% - 310px);
    top: 110px;
    writing-mode: vertical-rl;
    font-family: var(--serif);
    font-size: 13px;
    letter-spacing: 0.32em;
    color: rgba(34, 31, 25, 0.34);
    pointer-events: none;
  }
  .app::after {
    content: "遗";
    position: fixed;
    right: calc(50% - 305px);
    bottom: 80px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-size: 18px;
    color: rgba(162, 51, 42, 0.75);
    border: 1px solid rgba(162, 51, 42, 0.4);
    pointer-events: none;
  }
}

.page {
  position: relative;
  padding: 24px 20px 44px;
}

.page-nav {
  padding-bottom: calc(94px + env(safe-area-inset-bottom));
}

#screen {
  min-height: 100dvh;
}

.screen {
  min-height: 100dvh;
}

/* ---------- 基础排版 ---------- */

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.kicker {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}

.muted {
  color: var(--ink-3);
}

.soft-note {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-3);
}

.home-footnote {
  margin: 26px 0 6px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.text-link {
  color: var(--red);
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

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

.section-row h2,
.section-row h3 {
  font-size: 19px;
  letter-spacing: 0.1em;
}

.section-row h2::before,
.section-row h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 15px;
  margin-right: 9px;
  background: var(--red);
  vertical-align: 1px;
}

.section-row > span {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  padding: 3px 8px;
  font-size: 10.5px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
}

.tag-row.small span {
  font-size: 10px;
  padding: 2px 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #f8f0e1;
  background: var(--red);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-muted {
  background: var(--ink-3);
}

.theme-tag {
  display: inline-flex;
  padding: 3px 8px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink);
  background: rgba(244, 237, 224, 0.9);
  border: 1px solid var(--line-strong);
}

.seal-sm,
.tiny-seal,
.brand-stamp,
.big-seal,
.dm-seal,
.result-seal,
.rec-seal,
.teaser-seal,
.room-code {
  display: inline-grid;
  place-items: center;
  font-family: var(--serif);
}

.seal-sm {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  color: #f7efe0;
  background: var(--red);
  font-size: 17px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.tiny-seal {
  width: 22px;
  height: 22px;
  color: #f7efe0;
  background: var(--red);
  font-size: 11px;
}

.tiny-badge {
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border: 1px solid currentColor;
  opacity: 0.7;
}

/* ---------- 按钮 ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  background: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.42;
  pointer-events: none;
}

.btn-lg {
  width: 100%;
  padding: 15px 18px;
  font-size: 14.5px;
  letter-spacing: 0.16em;
}

.btn-mini {
  padding: 6px 11px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.btn-block {
  width: 100%;
}

.btn-ink {
  color: #f5edde;
  background: linear-gradient(180deg, #2d2821 0%, #1c1914 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 8px 22px rgba(30, 24, 16, 0.18);
}

.btn-paper {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line-strong);
}

.btn-line {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.28);
  border-color: var(--line-strong);
}

.btn-ghost {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: rgba(34, 31, 25, 0.25);
  text-underline-offset: 4px;
}

.btn-text {
  color: var(--red);
  padding: 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.btn-danger {
  color: #fff4e7;
  background: var(--red);
  border-color: #7c231c;
}

.btn.is-loading {
  opacity: 0.7;
}

/* ---------- 启动页 ---------- */

.loading-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  padding: 54px 22px 34px;
  overflow: hidden;
  background: #d8cbb4;
}

.loading-bg {
  position: absolute;
  inset: 0;
}

.loading-bg .bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: sepia(0.25) contrast(0.95);
}

.loading-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(244, 237, 224, 0.55), rgba(244, 237, 224, 0.9) 40%, rgba(231, 221, 202, 0.95)),
    radial-gradient(circle at 50% 30%, transparent 20%, rgba(34, 31, 25, 0.08));
}

.loading-top {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
}

.scroll-frame {
  position: relative;
  z-index: 2;
  width: min(100%, 340px);
  margin: auto 0;
  animation: riseIn 0.9s cubic-bezier(0.22, 0.68, 0.3, 1) both;
}

.roller {
  height: 22px;
  background:
    linear-gradient(90deg, rgba(65, 52, 36, 0.15), transparent 18%, transparent 82%, rgba(65, 52, 36, 0.15)),
    linear-gradient(180deg, #4a3a29, #2d2319 55%, #54412c);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 8px rgba(30, 24, 16, 0.28);
}

.scroll-body {
  position: relative;
  padding: 30px 26px 24px;
  text-align: center;
  background:
    repeating-linear-gradient(0deg, rgba(120, 100, 70, 0.035) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #fbf6ec, #f1e7d4);
  border-left: 1px solid rgba(80, 64, 44, 0.16);
  border-right: 1px solid rgba(80, 64, 44, 0.16);
  box-shadow: inset 0 0 40px rgba(120, 95, 60, 0.08);
}

.scroll-body::before,
.scroll-body::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.scroll-body::before {
  top: 12px;
}

.scroll-body::after {
  bottom: 12px;
}

.brand-stamp {
  width: 38px;
  height: 38px;
  margin: 0 auto 16px;
  color: #f9f2e3;
  background: var(--red);
  font-size: 21px;
  transform: rotate(-3deg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.brand-title {
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
}

.brand-slogan {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
}

.ink-line {
  width: 90px;
  height: 1px;
  margin: 18px auto;
  background: linear-gradient(90deg, transparent, var(--ink-3), transparent);
  position: relative;
}

.ink-line::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  width: 5px;
  height: 5px;
  background: var(--red);
  transform: translateX(-50%) rotate(45deg);
}

.brand-sub {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--ink-2);
}

.loading-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.fineprint {
  margin-top: 18px;
  font-size: 9.5px;
  line-height: 1.8;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.loading-footer {
  position: absolute;
  z-index: 2;
  bottom: 18px;
  left: 22px;
  right: 22px;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

/* ---------- 登录 ---------- */

.auth-page {
  min-height: 100dvh;
  padding: 78px 20px 40px;
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  overflow: hidden;
  opacity: 0.28;
  mask-image: linear-gradient(180deg, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
}

.auth-bg .bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.3);
}

.back-btn {
  position: relative;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(250, 246, 237, 0.75);
  font-family: var(--serif);
  font-size: 22px;
  cursor: pointer;
}

.back-btn.light {
  position: absolute;
  top: 18px;
  left: 18px;
  color: #f7efe1;
  background: rgba(28, 24, 18, 0.45);
  border-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
}

.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 26px 22px;
  background:
    repeating-linear-gradient(0deg, rgba(120, 100, 70, 0.03) 0 1px, transparent 1px 3px),
    rgba(250, 246, 237, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-top: 6px;
  font-size: 27px;
  letter-spacing: 0.18em;
}

.auth-desc {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

.auth-switch {
  display: flex;
  margin: 20px 0 16px;
  border-bottom: 1px solid var(--line);
}

.auth-switch button {
  flex: 1;
  padding: 9px 0;
  border: none;
  background: none;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  cursor: pointer;
}

.auth-switch button.active {
  color: var(--ink);
  border-bottom: 2px solid var(--red);
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field > span {
  display: block;
  margin-bottom: 5px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.field input,
.field select,
.ws-form input,
.ws-form textarea,
.ws-form select {
  width: 100%;
  padding: 10px 2px;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  border-radius: 0;
}

.field input::placeholder,
.ws-form input::placeholder,
.ws-form textarea::placeholder {
  color: #a89f90;
  font-size: 12.5px;
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.code-row input {
  flex: 1;
}

.code-row .btn {
  flex: 0 0 auto;
  align-self: flex-end;
}

.check-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 16px 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.check-line input {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  accent-color: var(--red);
}

.inline-link {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: var(--red);
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.or-line {
  position: relative;
  margin: 18px 0 12px;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}

.or-line::before,
.or-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 36%;
  height: 1px;
  background: var(--line);
}

.or-line::before {
  left: 0;
}

.or-line::after {
  right: 0;
}

.auth-hint {
  margin-top: 14px;
  font-size: 9.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* ---------- 角色创建 ---------- */

.character-page {
  padding: 70px 20px 120px;
  background:
    radial-gradient(circle at 100% 0, rgba(162, 51, 42, 0.05), transparent 40%),
    var(--paper);
}

.character-page > .back-btn {
  position: absolute;
  top: 18px;
  left: 18px;
}

.page-head {
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 6px 0 8px;
  font-size: 28px;
  letter-spacing: 0.14em;
}

.page-head > p:last-child {
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-3);
}

.base-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.base-card {
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--paper-4);
  cursor: pointer;
  transition: 0.2s ease;
}

.base-card.selected {
  border-color: var(--red);
  box-shadow: 0 6px 18px rgba(162, 51, 42, 0.14);
}

.base-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #e3d7c2, #cab99d);
}

.base-img .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.08) saturate(0.9);
}

.base-body {
  padding: 10px 11px 12px;
}

.base-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.base-head h3 {
  font-size: 18px;
  letter-spacing: 0.14em;
}

.base-check {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--red);
}

.base-sub {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--red);
}

.base-desc {
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--ink-3);
}

.skin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}

.skin-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  font-size: 9px;
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.skin-chip.locked {
  color: var(--ink-3);
  opacity: 0.6;
}

.skin-chip i {
  font-style: normal;
  font-size: 8px;
  color: var(--red);
}

.pref-block {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pref-block h3 {
  font-size: 15px;
  letter-spacing: 0.1em;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.chip.active {
  color: #f7efe1;
  background: var(--ink);
  border-color: var(--ink);
}

.sticky-cta {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 430px);
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(244, 237, 224, 0), rgba(244, 237, 224, 0.94) 26%);
  backdrop-filter: blur(2px);
}

.sticky-cta .btn {
  box-shadow: 0 10px 26px rgba(30, 24, 16, 0.2);
}

.cta-note {
  margin-top: 8px;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

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

.bottom-nav {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 430px);
  display: flex;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(244, 237, 224, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  border: none;
  background: none;
  cursor: pointer;
}

.nav-seal {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-3);
  transition: 0.2s;
}

.nav-label {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.nav-item.active .nav-seal {
  color: #f7efe1;
  background: var(--red);
  border-color: var(--red);
}

.nav-item.active .nav-label {
  color: var(--ink);
}

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

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup h1 {
  font-size: 22px;
  letter-spacing: 0.16em;
}

.brand-lockup p {
  margin-top: 2px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.avatar-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper-2);
  cursor: pointer;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.sm {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.avatar.lg {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.guest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding: 9px 12px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  background: rgba(162, 51, 42, 0.07);
  border: 1px dashed rgba(162, 51, 42, 0.3);
}

.guest-banner button {
  padding: 3px 9px;
  border: 1px solid var(--red);
  background: none;
  color: var(--red);
  font-size: 10px;
  cursor: pointer;
}

.hero-card {
  position: relative;
  height: 258px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  cursor: pointer;
  background: #cdbfa8;
}

.hero-img {
  position: absolute;
  inset: 0;
}

.hero-img .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(19, 16, 12, 0.78) 0%, rgba(19, 16, 12, 0.4) 55%, rgba(19, 16, 12, 0.06) 100%),
    linear-gradient(0deg, rgba(19, 16, 12, 0.72), transparent 55%);
}

.hero-content {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  color: #f7efe1;
}

.hero-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  background: var(--red);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-content h2 {
  margin: 10px 0 4px;
  font-size: 27px;
  letter-spacing: 0.16em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: rgba(247, 239, 225, 0.82);
}

.hero-meta {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: rgba(247, 239, 225, 0.72);
}

.hero-meta span + span::before {
  content: "·";
  margin-right: 8px;
  opacity: 0.5;
}

.hero-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: #f7efe1;
  border-bottom: 1px solid rgba(247, 239, 225, 0.45);
  padding-bottom: 2px;
}

.rec-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 26px;
  padding: 14px 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.22));
}

.rec-seal {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: var(--red);
  border: 1px solid var(--red);
  font-size: 17px;
  transform: rotate(-4deg);
}

.rec-body {
  flex: 1;
  min-width: 0;
}

.rec-body h3 {
  margin: 3px 0 3px;
  font-size: 16px;
  letter-spacing: 0.1em;
}

.rec-body p:last-child {
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.rec-card .btn {
  flex: 0 0 auto;
}

.lobby-section {
  margin-top: 6px;
}

.filter-block {
  margin: 4px 0 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filter-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 9px;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-label {
  flex: 0 0 30px;
  padding-top: 7px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.filter-row .chip-row {
  gap: 6px;
}

.filter-row .chip {
  padding: 5px 9px;
  font-size: 10px;
}

.script-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.script-card {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-4);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.script-card:active {
  transform: scale(0.995);
}

.script-card.is-preparing {
  filter: saturate(0.65);
}

.card-cover {
  position: relative;
  flex: 0 0 108px;
  width: 108px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #d8cab3, #bfae92);
}

.card-cover .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-cover .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 8.5px;
  padding: 3px 6px;
}

.card-cover .theme-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 9px;
  padding: 2px 6px;
}

.card-body {
  flex: 1;
  min-width: 0;
  padding: 11px 12px 10px;
  display: flex;
  flex-direction: column;
}

.card-meta {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.card-body h3 {
  margin-top: 3px;
  font-size: 17px;
  letter-spacing: 0.1em;
}

.card-sub {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.progress-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.5px;
  color: var(--ink-3);
}

.workshop-teaser {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 16px 14px;
  color: var(--ink);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 6px),
    linear-gradient(135deg, #2a251f, #1d1914);
  color: #f2e9d9;
  cursor: pointer;
}

.teaser-seal {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(247, 239, 225, 0.4);
  color: #f2e9d9;
  font-size: 19px;
}

.workshop-teaser .kicker {
  color: #d9b5a4;
}

.workshop-teaser h3 {
  margin: 2px 0 4px;
  font-size: 17px;
  color: #f7efe1;
  letter-spacing: 0.12em;
}

.workshop-teaser p:last-child {
  font-size: 10px;
  color: rgba(247, 239, 225, 0.62);
  line-height: 1.6;
}

.workshop-teaser .text-link {
  margin-left: auto;
  color: #e0b7a5;
}

/* ---------- 剧本详情 ---------- */

.detail-page {
  padding: 0 0 36px;
}

.detail-cover {
  position: relative;
  height: 330px;
  overflow: hidden;
  background: #cabb9f;
}

.detail-cover .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 17, 12, 0.18), transparent 35%, rgba(20, 17, 12, 0.6)),
    linear-gradient(90deg, rgba(20, 17, 12, 0.25), transparent 60%);
}

.detail-cover-meta {
  position: absolute;
  left: 18px;
  bottom: 44px;
  display: flex;
  gap: 7px;
}

.detail-sheet {
  position: relative;
  z-index: 2;
  margin-top: -30px;
  padding: 26px 20px 20px;
  background: var(--paper);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -10px 28px rgba(24, 19, 13, 0.12);
}

.detail-sheet h1 {
  margin: 6px 0 3px;
  font-size: 30px;
  letter-spacing: 0.12em;
}

.detail-sub {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
}

.detail-intro {
  margin: 16px 0 6px;
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-2);
  text-align: justify;
}

.resume-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  padding: 11px 12px;
  background: rgba(69, 99, 85, 0.08);
  border: 1px solid rgba(69, 99, 85, 0.28);
}

.resume-seal {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  font-family: var(--serif);
  font-size: 14px;
  color: #f5eee0;
  background: var(--jade);
}

.resume-card strong {
  font-size: 12px;
  letter-spacing: 0.06em;
}

.resume-card p {
  font-size: 10.5px;
  color: var(--ink-3);
}

.detail-section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.role-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.role-scroller::-webkit-scrollbar {
  display: none;
}

.role-mini {
  flex: 0 0 83px;
  width: 83px;
  padding: 0 0 7px;
  border: 1px solid var(--line);
  background: var(--paper-4);
  text-align: center;
  cursor: pointer;
}

.role-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: sepia(0.05);
}

.role-mini-name {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.role-mini-base {
  display: block;
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.info-block {
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.32);
  border-left: 3px solid var(--ink-3);
}

.info-block h4 {
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.info-block p {
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-2);
  text-align: justify;
}

.seed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seed-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.28);
}

.seed-seal {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--red);
  border: 1px solid var(--red);
}

.seed-card p {
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.seed-card span:last-child {
  font-size: 9px;
  color: var(--ink-3);
}

.boundary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.boundary-list span {
  padding: 4px 8px;
  font-size: 10px;
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ---------- 好友房 ---------- */

.room-page {
  padding: 18px 20px 130px;
}

.simple-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.simple-head > div {
  flex: 1;
  min-width: 0;
}

.simple-head h1 {
  margin-top: 2px;
  font-size: 21px;
  letter-spacing: 0.1em;
}

.room-code {
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
}

.room-head-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}

.room-cover {
  width: 78px;
  height: 100px;
  flex: 0 0 78px;
  overflow: hidden;
  background: var(--paper-3);
}

.room-cover .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-head-card h3 {
  margin: 3px 0 3px;
  font-size: 18px;
  letter-spacing: 0.1em;
}

.room-head-card .muted {
  font-size: 10.5px;
}

.warn-strip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 11px 12px;
  background: rgba(162, 51, 42, 0.06);
  border: 1px dashed rgba(162, 51, 42, 0.35);
}

.warn-seal {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  color: #f7efe1;
  background: var(--red);
  font-family: var(--serif);
  font-size: 13px;
}

.warn-strip strong {
  display: block;
  font-size: 11.5px;
  color: var(--red);
  letter-spacing: 0.08em;
}

.warn-strip p {
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

.room-section {
  margin-top: 22px;
}

.seat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.seat {
  position: relative;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.32);
}

.seat.empty {
  color: var(--ink-3);
  border-style: dashed;
  background: transparent;
  font-size: 10px;
}

.seat-empty-mark {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-3);
}

.seat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.seat-name {
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.seat-type {
  padding: 1px 5px;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  border: 1px solid var(--line);
}

.seat-type.host {
  color: var(--red);
  border-color: rgba(162, 51, 42, 0.35);
}

.seat-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: none;
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
}

.room-tools {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.room-tools .btn {
  flex: 1;
}

.voice-panel {
  margin-top: 22px;
  padding: 15px 14px;
  color: #f2e9d9;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px),
    linear-gradient(160deg, #2b261f, #1c1813);
}

.voice-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.voice-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fae8c;
  box-shadow: 0 0 0 3px rgba(127, 174, 140, 0.18);
  animation: pulse 2s infinite;
}

.voice-head .tiny-badge {
  margin-left: auto;
  color: rgba(242, 233, 217, 0.65);
}

.voice-transcript {
  margin-top: 11px;
  padding: 8px 10px;
  font-size: 10.5px;
  line-height: 1.7;
  color: rgba(242, 233, 217, 0.72);
  background: rgba(255, 255, 255, 0.06);
  border-left: 2px solid rgba(224, 183, 165, 0.5);
}

.voice-controls {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.voice-btn {
  flex: 1;
  padding: 7px 4px;
  border: 1px solid rgba(242, 233, 217, 0.24);
  background: transparent;
  color: #f2e9d9;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.voice-btn.off {
  color: rgba(242, 233, 217, 0.55);
  border-color: rgba(242, 233, 217, 0.12);
}

.voice-btn.danger {
  color: #e8b3a7;
  border-color: rgba(224, 183, 165, 0.4);
}

.voice-panel .soft-note {
  color: rgba(242, 233, 217, 0.5);
}

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

.friend-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.32);
}

.friend-row + .friend-row {
  margin-top: 6px;
}

.friend-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.friend-info strong {
  font-size: 12px;
  letter-spacing: 0.06em;
}

.friend-info span {
  font-size: 9.5px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-cta {
  text-align: center;
}

/* ---------- 选角色 ---------- */

.role-page {
  padding: 18px 20px 120px;
}

.role-pick-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.role-pick {
  display: flex;
  gap: 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-4);
  text-align: left;
  cursor: pointer;
}

.role-pick.selected {
  border-color: var(--red);
  box-shadow: 0 6px 18px rgba(162, 51, 42, 0.13);
}

.role-pick-img {
  position: relative;
  width: 92px;
  flex: 0 0 92px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-3);
}

.role-pick-img .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.base-tag {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 1px 5px;
  font-size: 8.5px;
  color: #f7efe1;
  background: rgba(34, 31, 25, 0.7);
}

.role-pick-body {
  flex: 1;
  min-width: 0;
  padding: 9px 11px 10px 0;
}

.role-pick-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.role-pick-head h3 {
  font-size: 18px;
  letter-spacing: 0.12em;
}

.role-age {
  font-size: 9px;
  color: var(--ink-3);
}

.role-title {
  font-size: 10.5px;
  color: var(--red);
  letter-spacing: 0.04em;
}

.role-goal {
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--ink-2);
}

.role-public {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.65;
  color: var(--ink-3);
}

.role-state {
  display: inline-block;
  margin-top: 6px;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--red);
}

/* ---------- 局内 ---------- */

.game-page {
  padding: 0 0 18px;
}

.game-top {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 9px;
  background: rgba(244, 237, 224, 0.95);
  backdrop-filter: blur(12px);
}

.game-top .back-btn {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  font-size: 19px;
}

.game-top-title {
  flex: 1;
  min-width: 0;
}

.game-top-title p {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-top-title h2 {
  margin-top: 1px;
  font-size: 15px;
  letter-spacing: 0.12em;
}

.stage-count {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.progress-track {
  height: 3px;
  background: rgba(34, 31, 25, 0.1);
}

.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red), #c98b6c);
  transition: width 0.4s ease;
}

.game-scene {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #c4b397;
}

.game-scene .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 17, 12, 0.16), transparent 35%, rgba(20, 17, 12, 0.72));
}

.scene-shade.soft {
  background: linear-gradient(180deg, rgba(20, 17, 12, 0.1), transparent 30%, rgba(20, 17, 12, 0.45));
}

.scene-badge {
  position: absolute;
  top: 14px;
  left: 16px;
  padding: 4px 9px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #f7efe1;
  background: rgba(162, 51, 42, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.scene-dm {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  background: rgba(22, 19, 14, 0.62);
  backdrop-filter: blur(4px);
  border-left: 2px solid rgba(224, 183, 165, 0.7);
}

.scene-dm p {
  font-size: 10.5px;
  line-height: 1.6;
  color: rgba(247, 239, 225, 0.9);
}

.dm-seal {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  color: #f7efe1;
  background: var(--red);
  font-size: 12px;
  transform: rotate(-3deg);
}

.game-body {
  padding: 20px 20px 110px;
}

.game-body > h1 {
  margin: 4px 0 8px;
  font-size: 24px;
  letter-spacing: 0.08em;
  line-height: 1.45;
}

.body-lead {
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-2);
  text-align: justify;
}

.role-inline {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.role-inline > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.role-inline strong {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.role-inline span {
  font-size: 9.5px;
  color: var(--ink-3);
}

.act-head {
  margin: 20px 0 14px;
}

.act-head h1 {
  margin-top: 4px;
  font-size: 26px;
  letter-spacing: 0.12em;
}

.act-paragraph {
  margin-bottom: 13px;
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 2.05;
  color: var(--ink);
  text-align: justify;
  text-indent: 2em;
  animation: fadeUp 0.5s ease both;
}

.act-paragraph:nth-of-type(2) {
  animation-delay: 0.06s;
}

.act-paragraph:nth-of-type(3) {
  animation-delay: 0.12s;
}

.secret-note {
  margin: 16px 0;
  padding: 13px 14px;
  background:
    repeating-linear-gradient(0deg, rgba(162, 51, 42, 0.035) 0 1px, transparent 1px 3px),
    rgba(162, 51, 42, 0.06);
  border: 1px solid rgba(162, 51, 42, 0.24);
}

.secret-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.secret-seal {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 11px;
  color: #f7efe1;
  background: var(--red);
}

.secret-head strong {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--red);
}

.secret-note p {
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-2);
}

.key-box {
  margin: 14px 0;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.25);
}

.key-box summary {
  padding: 10px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
}

.key-box summary::-webkit-details-marker {
  display: none;
}

.key-box summary::before {
  content: "＋";
  margin-right: 7px;
  color: var(--red);
}

.key-box[open] summary::before {
  content: "－";
}

.key-box p {
  padding: 0 12px 12px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.dm-line {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 16px 0;
  padding: 10px 11px;
  background: rgba(34, 31, 25, 0.045);
  border-left: 2px solid var(--ink-3);
}

.dm-line > div {
  flex: 1;
}

.dm-name {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.dm-line p:last-child {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* 搜证 */

.search-scene {
  position: relative;
  height: 320px;
  margin: 16px 0 8px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #cbbda5;
}

.search-scene .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 3;
}

.hotspot-no {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #f9f2e4;
  background: rgba(162, 51, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 12px;
  box-shadow: 0 0 0 0 rgba(162, 51, 42, 0.45);
  animation: hotspotPulse 2.4s infinite;
}

.hotspot-label {
  padding: 2px 5px;
  font-size: 8.5px;
  white-space: nowrap;
  color: #f7efe1;
  background: rgba(22, 19, 14, 0.72);
  border-radius: 1px;
}

.hotspot.found .hotspot-no {
  background: var(--jade);
  animation: none;
}

.hotspot.found .hotspot-label {
  background: rgba(69, 99, 85, 0.8);
}

.search-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.legend-item {
  padding: 3px 6px;
  font-size: 9px;
  color: var(--ink-3);
  border: 1px dashed var(--line);
}

.legend-item.found {
  color: var(--jade);
  border-color: rgba(69, 99, 85, 0.3);
  border-style: solid;
}

.clue-strip {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding: 8px 0 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.clue-strip::-webkit-scrollbar {
  display: none;
}

.strip-label {
  flex: 0 0 auto;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.clue-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 3px 7px;
  font-size: 9.5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.clue-chip i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--serif);
  font-size: 9px;
  color: var(--red);
  border: 1px solid rgba(162, 51, 42, 0.3);
}

.game-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 8px;
}

/* 讨论 */

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid var(--line);
}

.chat-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: fadeUp 0.45s ease both;
}

.chat-name {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.chat-bubble {
  align-self: flex-start;
  max-width: 86%;
  padding: 8px 11px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 2px 8px 8px 8px;
}

.chat-row.me {
  align-items: flex-end;
}

.chat-bubble.me {
  align-self: flex-end;
  color: #f7efe1;
  background: rgba(162, 51, 42, 0.82);
  border-color: rgba(122, 35, 28, 0.5);
  border-radius: 8px 2px 8px 8px;
}

.statement-list {
  margin-top: 12px;
}

.statement-title {
  margin-bottom: 8px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.statement-card {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  text-align: left;
  cursor: pointer;
  transition: 0.16s;
}

.statement-card:active {
  border-color: var(--red);
  background: rgba(162, 51, 42, 0.05);
}

.statement-tone {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--red);
}

.statement-card p {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink);
}

/* 投票 */

.vote-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.vote-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.32);
  text-align: left;
  cursor: pointer;
}

.vote-card.selected {
  border-color: var(--red);
  background: rgba(162, 51, 42, 0.06);
}

.vote-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.vote-seal {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--red);
  border: 1px solid var(--red);
}

.vote-info {
  flex: 1;
  min-width: 0;
}

.vote-info h4 {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.1em;
}

.vote-info p {
  font-size: 10px;
  color: var(--ink-3);
}

.vote-check {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--red);
}

/* 真相 */

.truth-body {
  padding-top: 26px;
}

.truth-seal {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-family: var(--serif);
  font-size: 30px;
  color: #f9f1e2;
  background: var(--red);
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.2), 0 10px 24px rgba(162, 51, 42, 0.22);
  animation: stampIn 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.truth-body > h1 {
  text-align: center;
  font-size: 27px;
  letter-spacing: 0.12em;
}

.truth-lead {
  margin: 10px 0 18px;
  text-align: center;
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-2);
}

.vote-result {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
}

.vote-result.right {
  border-left: 3px solid var(--jade);
}

.vote-result.wrong {
  border-left: 3px solid var(--red);
}

.result-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  color: #f7efe1;
  background: var(--ink-3);
}

.vote-result.right .result-mark {
  background: var(--jade);
}

.vote-result.wrong .result-mark {
  background: var(--red);
}

.vote-result strong {
  font-size: 12px;
  letter-spacing: 0.06em;
}

.vote-result p {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--ink-3);
}

.truth-copy {
  margin: 18px 0;
}

.truth-copy p {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 2;
  text-align: justify;
  text-indent: 2em;
}

.fiction-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 12px;
  background: rgba(34, 31, 25, 0.05);
  border: 1px dashed var(--line-strong);
}

.fiction-seal {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 11px;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
}

.fiction-note p {
  font-size: 10.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

.truth-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.unlock-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.unlock-card {
  padding: 0 0 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-4);
  text-align: left;
  cursor: pointer;
}

.unlock-img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
}

.unlock-img .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.new-mark {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--serif);
  font-size: 10px;
  color: #f7efe1;
  background: var(--red);
}

.unlock-card strong {
  display: block;
  padding: 7px 8px 0;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.unlock-card > span:last-child {
  display: block;
  padding: 1px 8px 0;
  font-size: 9px;
  color: var(--ink-3);
}

.new-ach {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ach-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  font-size: 10.5px;
  border: 1px solid rgba(162, 51, 42, 0.3);
  background: rgba(162, 51, 42, 0.06);
}

.ach-pill i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--serif);
  font-size: 10px;
  color: #f7efe1;
  background: var(--red);
}

/* 结算 */

.result-page {
  text-align: center;
  padding-bottom: 50px;
}

.result-head {
  padding-top: 16px;
}

.result-seal {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  font-size: 26px;
  color: #f7efe1;
  background: var(--red);
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.result-head h1 {
  margin-top: 5px;
  font-size: 27px;
  letter-spacing: 0.12em;
}

.result-sub {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.result-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px auto 16px;
  width: 116px;
  height: 116px;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 50% 50%, rgba(162, 51, 42, 0.06), transparent 65%),
    rgba(255, 255, 255, 0.35);
}

.result-score strong {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  color: var(--red);
}

.result-score span {
  margin-top: 5px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
}

.result-cell {
  padding: 11px 4px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.result-cell:last-child {
  border-right: none;
}

.result-cell strong {
  display: block;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.result-cell span {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.ai-comment {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px;
  text-align: left;
  background: rgba(34, 31, 25, 0.05);
  border-left: 2px solid var(--ink-3);
}

.ai-comment p:last-child {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.result-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.result-section .section-row {
  margin-bottom: 12px;
}

.rate-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 6px 0 2px;
}

.star {
  padding: 2px;
  border: none;
  background: none;
  color: #b9ae9c;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.star.filled {
  color: var(--red);
}

span.star {
  cursor: default;
}

.mini-stars {
  display: flex;
  gap: 1px;
  margin-top: 2px;
}

.mini-stars .star {
  font-size: 12px;
  padding: 0;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 28px;
}

/* ---------- 个人中心 ---------- */

.profile-head {
  margin-bottom: 16px;
}

.identity-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: #f6edde;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 7px),
    linear-gradient(150deg, #2d2821, #1b1813);
}

.identity-info {
  flex: 1;
  min-width: 0;
}

.identity-info h2 {
  font-size: 22px;
  letter-spacing: 0.12em;
}

.identity-info p {
  margin-top: 2px;
  font-size: 10px;
  color: rgba(246, 237, 222, 0.62);
}

.identity-method {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 5px;
  font-size: 9px;
  border: 1px solid rgba(246, 237, 222, 0.3);
}

.identity-guest {
  font-size: 9px;
  color: #e0b7a5;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
}

.stat-cell {
  padding: 10px 2px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stat-cell:last-child {
  border-right: none;
}

.stat-cell strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--red);
}

.stat-cell span {
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.profile-section {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 11px;
  border: 1px solid transparent;
}

.rank-row.me {
  color: var(--red);
  border-color: rgba(162, 51, 42, 0.25);
  background: rgba(162, 51, 42, 0.05);
}

.rank-no {
  width: 18px;
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-3);
}

.rank-row:nth-child(1) .rank-no,
.rank-row:nth-child(2) .rank-no,
.rank-row:nth-child(3) .rank-no {
  color: var(--red);
}

.rank-name {
  flex: 1;
}

.rank-score {
  font-size: 10px;
  color: var(--ink-3);
}

.ach-tree {
  padding: 14px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid var(--line);
}

.ach-root {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--line-strong);
}

.root-seal {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 17px;
  color: #f7efe1;
  background: var(--ink);
}

.ach-root p {
  flex: 1;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.ach-root span:last-child {
  font-size: 9.5px;
  color: var(--ink-3);
}

.ach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ach-node {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.ach-node.unlocked {
  border-color: rgba(162, 51, 42, 0.3);
  background: rgba(162, 51, 42, 0.04);
}

.ach-node.locked {
  opacity: 0.62;
}

.ach-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
}

.ach-node.unlocked .ach-icon {
  color: #f7efe1;
  background: var(--red);
  border-color: var(--red);
}

.ach-name {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.ach-desc {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.5;
  color: var(--ink-3);
}

.ach-state {
  margin-top: 4px;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--red);
}

.ach-node.locked .ach-state {
  color: var(--ink-3);
}

.collection-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.collection-row + .collection-row {
  margin-top: 7px;
}

.collection-cover {
  width: 48px;
  height: 58px;
  flex: 0 0 48px;
  overflow: hidden;
  background: var(--paper-3);
}

.collection-cover .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-info {
  flex: 1;
  min-width: 0;
}

.collection-info h4 {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.collection-info p {
  font-size: 9.5px;
  color: var(--ink-3);
}

.card-wall {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wall-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-4);
  text-align: left;
  cursor: pointer;
}

.wall-card.locked {
  filter: grayscale(0.5);
}

.wall-img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
}

.wall-img .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lock-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.16em;
  color: rgba(247, 239, 225, 0.9);
  background: rgba(26, 22, 17, 0.58);
}

.wall-title {
  display: block;
  padding: 7px 8px 0;
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: 0.06em;
}

.wall-kicker {
  display: block;
  padding: 1px 8px 7px;
  font-size: 8.5px;
  color: var(--ink-3);
}

.offline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.offline-item {
  padding: 12px 6px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.22);
}

.offline-seal {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-3);
  border: 1px solid var(--line-strong);
}

.offline-item p {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.offline-item span:last-child {
  font-size: 8.5px;
  color: var(--ink-3);
}

.link-list {
  border-top: 1px solid var(--line);
}

.link-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 2px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}

.link-list i {
  font-style: normal;
  color: var(--ink-3);
}

.danger-zone {
  display: flex;
  gap: 8px;
}

.danger-zone .btn {
  flex: 1;
  border: 1px solid var(--line);
}

.danger-text {
  color: var(--red);
  text-decoration-color: rgba(162, 51, 42, 0.3);
}

/* ---------- 剧情工坊 ---------- */

.workshop-intro {
  padding: 15px;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(0deg, rgba(120, 100, 70, 0.03) 0 1px, transparent 1px 3px),
    rgba(255, 255, 255, 0.32);
}

.workshop-intro > p {
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-2);
}

.workshop-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.workshop-rules span {
  padding: 3px 7px;
  font-size: 9.5px;
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.ws-form {
  margin-top: 18px;
}

.ws-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ws-block {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ws-item {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.28);
}

.ws-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.ws-item-head span {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--red);
}

.ws-item-head button {
  padding: 0;
  border: none;
  background: none;
  font-size: 10px;
  color: var(--ink-3);
  cursor: pointer;
}

.ws-item input {
  border-bottom: 1px solid var(--line);
}

.ws-item textarea,
.ws-form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 8px 2px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink);
  resize: vertical;
  border-radius: 0;
}

.ws-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 22px;
}

.draft-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
}

.draft-row + .draft-row {
  margin-top: 7px;
}

.draft-row > div:first-child {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.draft-row strong {
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.draft-row span {
  font-size: 9.5px;
  color: var(--ink-3);
}

.draft-row > div:last-child {
  display: flex;
  gap: 5px;
}

/* ---------- 非遗小课堂 ---------- */

.classroom-hero {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-strong);
  background: var(--ink);
  color: #f7efe1;
}

.classroom-hero-img {
  width: 110px;
  height: 110px;
  flex: 0 0 110px;
  overflow: hidden;
  border: 1px solid rgba(247, 239, 225, 0.3);
}

.classroom-hero-img .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.classroom-hero-text h2 {
  font-size: 19px;
  letter-spacing: 0.12em;
}

.classroom-hero-text p {
  margin-top: 5px;
  font-size: 10.5px;
  line-height: 1.7;
  color: rgba(247, 239, 225, 0.68);
}

.lesson-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
}

.lesson-card summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

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

.lesson-cover {
  width: 76px;
  height: 84px;
  flex: 0 0 76px;
  overflow: hidden;
  background: var(--paper-3);
}

.lesson-cover .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lesson-card summary > div:last-child {
  flex: 1;
  min-width: 0;
}

.lesson-card h3 {
  margin-top: 2px;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.lesson-open {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--red);
}

.lesson-body {
  padding: 2px 13px 14px;
  border-top: 1px solid var(--line);
}

.lesson-body > p {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.95;
  color: var(--ink-2);
  text-align: justify;
}

.fact-box {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 13px 0;
  padding: 10px;
  background: rgba(162, 51, 42, 0.05);
  border-left: 2px solid rgba(162, 51, 42, 0.4);
}

.fact-seal {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 11px;
  color: var(--red);
  border: 1px solid rgba(162, 51, 42, 0.4);
}

.fact-box p {
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.source-text {
  margin: 8px 0;
  font-size: 9.5px !important;
  line-height: 1.7;
  color: var(--ink-3);
}

/* ---------- 弹层 ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(20, 17, 12, 0.58);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease both;
}

.modal-card {
  width: 100%;
  max-width: 430px;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  background:
    repeating-linear-gradient(0deg, rgba(120, 100, 70, 0.03) 0 1px, transparent 1px 3px),
    var(--paper);
  border-top: 3px solid var(--red);
  box-shadow: 0 -20px 50px rgba(20, 17, 12, 0.3);
  animation: sheetUp 0.34s cubic-bezier(0.22, 0.8, 0.26, 1) both;
}

.modal-card.is-wide {
  max-width: 470px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.modal-kicker {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--red);
}

.modal-title {
  margin-top: 2px;
  font-size: 20px;
  letter-spacing: 0.1em;
}

.modal-close {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: none;
  font-size: 16px;
  color: var(--ink-2);
  cursor: pointer;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  -webkit-overflow-scrolling: touch;
}

.modal-foot {
  display: flex;
  gap: 8px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(250, 246, 237, 0.75);
}

.modal-foot .btn {
  flex: 1;
}

.card-detail {
  overflow: hidden;
}

.card-detail-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--paper-3);
  border: 1px solid var(--line);
}

.card-detail-img .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-summary {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-2);
  text-align: justify;
}

.detail-block {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.35);
  border-left: 2px solid var(--ink-3);
}

.detail-block h4 {
  margin-bottom: 5px;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.detail-block p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-2);
}

.detail-block.is-fiction {
  border-left-color: var(--red);
  background: rgba(162, 51, 42, 0.05);
}

.detail-block.is-secret {
  border-left-color: var(--red);
}

.fact-list {
  margin: 0;
  padding-left: 16px;
}

.fact-list li {
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-2);
}

.fact-list li::marker {
  color: var(--red);
}

.locked-detail {
  padding: 10px 4px 6px;
  text-align: center;
}

.big-seal {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  font-size: 24px;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
}

.locked-detail p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-2);
}

.prose p {
  margin-bottom: 10px;
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--ink-2);
  text-align: justify;
}

.prose p:last-child {
  margin-bottom: 0;
}

.radio-line {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  cursor: pointer;
}

.radio-line input {
  accent-color: var(--red);
}

.role-detail-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.role-avatar {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.role-detail-head h4 {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.06em;
}

.role-public {
  font-size: 11.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.tutorial-lead {
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.tutorial-step {
  display: flex;
  gap: 11px;
  margin-top: 12px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid var(--line);
}

.step-no {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--red);
  line-height: 1.2;
}

.tutorial-step h4 {
  font-size: 12.5px;
  letter-spacing: 0.08em;
}

.tutorial-step p {
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.tutorial-note {
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--red);
  letter-spacing: 0.04em;
}

.ach-detail {
  text-align: center;
}

.ach-big {
  width: 62px;
  height: 62px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--ink-3);
  border: 1px solid var(--line-strong);
}

.ach-big.unlocked {
  color: #f7efe1;
  background: var(--red);
  border-color: var(--red);
}

.ach-detail .detail-block {
  text-align: left;
}

.ach-desc-full {
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-2);
}

.ach-state-line {
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--ink-3);
}

.chat-modal {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 46dvh;
  overflow-y: auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid var(--line);
}

.chat-modal-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-modal-row.me {
  align-items: flex-end;
}

.chat-modal-row span {
  font-size: 8.5px;
  color: var(--ink-3);
}

.chat-modal-row p {
  max-width: 82%;
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
}

.chat-modal-row.me p {
  color: #f7efe1;
  background: rgba(162, 51, 42, 0.82);
  border-color: rgba(122, 35, 28, 0.4);
}

.chat-input-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.chat-input-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.preview-script > h3 {
  margin: 3px 0;
  font-size: 20px;
}

.preview-h {
  margin: 16px 0 8px;
  padding-left: 8px;
  border-left: 2px solid var(--red);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.preview-act {
  margin-bottom: 9px;
  padding: 9px;
  border: 1px solid var(--line);
}

.preview-act h4 {
  font-size: 11.5px;
}

.preview-act p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.preview-clue {
  display: flex;
  gap: 8px;
  margin-bottom: 7px;
}

.preview-clue > span {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 10px;
  color: var(--red);
  border: 1px solid var(--red);
}

.preview-clue strong {
  font-size: 11.5px;
}

.preview-clue p {
  font-size: 10.5px;
  color: var(--ink-3);
  line-height: 1.7;
}

.empty-state {
  padding: 22px 16px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-3);
  border: 1px dashed var(--line-strong);
}

/* ---------- Toast ---------- */

#toast-root {
  position: fixed;
  z-index: 90;
  bottom: calc(96px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 430px);
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 100%;
  padding: 9px 14px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #f7efe1;
  background: rgba(29, 25, 19, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(20, 17, 12, 0.26);
  animation: toastIn 0.26s ease both;
}

.toast.is-out {
  animation: toastOut 0.4s ease both;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

@keyframes stampIn {
  0% {
    opacity: 0;
    transform: scale(1.5) rotate(-14deg);
  }
  70% {
    opacity: 1;
    transform: scale(0.96) rotate(-4deg);
  }
  100% {
    transform: scale(1) rotate(-6deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes hotspotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(162, 51, 42, 0.45);
  }
  60% {
    box-shadow: 0 0 0 9px rgba(162, 51, 42, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(162, 51, 42, 0);
  }
}

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

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

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

@media (max-width: 360px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .brand-title {
    font-size: 32px;
  }
  .hero-content h2 {
    font-size: 23px;
  }
  .script-card .card-cover {
    flex-basis: 96px;
    width: 96px;
  }
  .result-grid {
    grid-template-columns: 1fr 1fr;
  }
  .result-cell:nth-child(2) {
    border-right: none;
  }
  .result-cell:nth-child(1),
  .result-cell:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }
}
