/* ============================================================
 * app.css — HENTI · 暗粉画册
 * 暗粉底 / 米白卡片 / 高饱和粉按钮；移动端 9:16，桌面端双栏
 * 移动端以 360 宽为基准缩放（core.js 改 html font-size）
 * ============================================================ */

:root {
  --bg: #2B0F1D;
  --bg-2: #351325;
  --bg-3: #1F0A15;
  --ink: #FFD9E6;          /* 淡粉：正文 / 问题 */
  --ink-strong: #FFF1F6;
  --muted: #C89CB0;
  --faint: rgba(255, 217, 230, 0.42);
  --pink: #FF2E7E;         /* 高饱和粉：回答 / 主按钮 */
  --pink-2: #FF6BA3;
  --pink-3: rgba(255, 46, 126, 0.18);
  --line: rgba(255, 217, 230, 0.16);
  --line-2: rgba(255, 217, 230, 0.30);
  --cream: #FFF3F7;
  --cream-2: #FFE4EE;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", -apple-system, sans-serif;
}

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

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0D0409;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body { display: flex; align-items: center; justify-content: center; background: #0D0409; }

button { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(255, 46, 126, 0.45); }

/* ---------------- 屏幕 ---------------- */
#screen {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90% 55% at 50% -10%, rgba(255, 46, 126, 0.14), transparent 60%),
    radial-gradient(70% 50% at 100% 110%, rgba(255, 46, 126, 0.08), transparent 58%),
    linear-gradient(180deg, #1D0913 0%, #14060E 55%, #0B0307 100%);
  isolation: isolate;
}
@media (min-width: 900px) {
  #screen { border-radius: 0; box-shadow: none; }
}

.screen { display: flex; flex-direction: column; min-height: 0; height: 100%; position: relative; z-index: 1; }
.bubbles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; display: block; }

/* 点击碎屑层：盖在界面之上，但不接收点击 */
.burst-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 95; pointer-events: none; }

/* 按钮点击回弹 */
@keyframes btnPop {
  0% { transform: scale(1); }
  30% { transform: scale(0.94); }
  65% { transform: scale(1.035); }
  100% { transform: scale(1); }
}
.btn-pop { animation: btnPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.page { position: relative; z-index: 2; display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 1.2rem 1.25rem 1rem; }

/* ---------------- 通用 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 2.7rem;
  padding: 0 1.1rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease, opacity 0.15s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn--block { width: 100%; }
.btn--primary {
  background: var(--pink);
  border-color: var(--pink);
  color: #2A0D19;
  font-weight: 700;
}
.btn--primary:active { background: #F01F6E; }
.btn--ghost { background: rgba(20, 9, 15, 0.55); color: var(--ink); border-color: var(--line-2); }
.btn--plain { background: transparent; border-color: transparent; color: var(--muted); font-size: 0.72rem; }
.btn--outline { background: transparent; color: var(--pink-2); border-color: rgba(255, 46, 126, 0.55); }
.btn--sm { height: 2rem; font-size: 0.66rem; padding: 0 0.7rem; }
.btn--lg { height: 3.05rem; font-size: 0.92rem; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 1.45rem;
  padding: 0 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.hidden { display: none !important; }
.tip-line { margin: 0; font-size: 0.64rem; line-height: 1.7; color: var(--muted); }

/* ---------------- 首页 ---------------- */
.home { padding: 1.6rem 1.4rem 1.2rem; }
.home-grid { display: flex; flex-direction: column; gap: 1.2rem; flex: 1; min-height: 0; }
.home-left { display: flex; flex-direction: column; flex: 1; justify-content: center; padding-right: 2.9rem; }

.brand { display: flex; align-items: center; gap: 0.5rem; }
.brand__mark {
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 0.55rem;
  background: linear-gradient(160deg, #FF7AAE, var(--pink));
  color: #2A0D19;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1rem;
}
.brand__name {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--ink-strong);
}
.brand__name span {
  display: block;
  margin-top: 0.1rem;
  font-family: var(--sans);
  font-size: 0.46rem;
  letter-spacing: 0.22em;
  color: var(--faint);
}

.eyebrow {
  margin: 1.5rem 0 0;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.headline {
  margin: 0.7rem 0 0;
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-strong);
}
.sub {
  margin: 0.85rem 0 0;
  font-size: 0.72rem;
  line-height: 1.9;
  color: var(--muted);
}

.resume-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.15rem;
}
.resume-bar { width: 2px; height: 1.6rem; background: linear-gradient(180deg, var(--pink), transparent); flex: none; }
.resume-text { flex: 1; min-width: 0; font-size: 0.6rem; color: var(--faint); line-height: 1.5; }

/* 主操作：开始 / 精准 / 记录 */
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.15rem;
  width: 100%;
  max-width: 26rem;
}
.stack .btn {
  width: 100%;
  height: 3.1rem;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}
.stack .btn small {
  font-size: 0.54rem;
  font-style: normal;
  letter-spacing: 0.02em;
  padding: 0.06rem 0.36rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--faint);
}
.stack .btn--primary small {
  color: rgba(42, 13, 25, 0.75);
  border-color: rgba(42, 13, 25, 0.28);
}
.badge {
  margin-left: 0.1rem;
  font-style: normal;
  font-size: 0.48rem;
  letter-spacing: 0.02em;
  padding: 0.04rem 0.32rem;
  border: 1px solid rgba(255, 46, 126, 0.6);
  border-radius: 999px;
  color: var(--pink-2);
}

/* 右侧圆形按钮（竖向贴右边缘） */
.side-actions {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.fab {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(18, 8, 13, 0.6);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, transform 0.12s ease;
}
.fab:active { transform: scale(0.94); background: rgba(255, 46, 126, 0.16); }
.fab svg {
  width: 1.02rem;
  height: 1.02rem;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fab span {
  position: absolute;
  top: 100%;
  margin-top: 0.12rem;
  font-size: 0.42rem;
  letter-spacing: 0.02em;
  color: rgba(255, 217, 230, 0.45);
  white-space: nowrap;
}

.quota {
  margin-top: 0.9rem;
  font-size: 0.54rem;
  letter-spacing: 0.04em;
  color: rgba(255, 217, 230, 0.34);
}

.music-toggle {
  margin-top: 0.55rem;
  align-self: flex-start;
  padding: 0.15rem 0;
  background: none;
  border: 0;
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  color: rgba(255, 217, 230, 0.36);
  cursor: pointer;
}
.music-toggle:active { color: var(--pink-2); }

/* 底部角色一览（桌面端显示） */
.cast { display: none; }

/* ---------------- 顶栏 ---------------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; height: 2rem; flex: none; }
.icon-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
}
.icon-btn:active { background: rgba(255, 255, 255, 0.06); }
.topbar__title { font-size: 0.62rem; letter-spacing: 0.24em; color: var(--muted); }
.topbar__right { display: flex; align-items: center; gap: 0.4rem; }

/* ---------------- 答题 ---------------- */
.quiz { flex: 1; display: flex; flex-direction: column; padding-top: 0.1rem; }
.progress { height: 2px; background: rgba(255, 217, 230, 0.12); overflow: hidden; margin: 0.9rem 0 0.4rem; flex: none; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, rgba(255, 46, 126, 0.5), var(--pink)); transition: width 0.35s ease; }
.dots { display: flex; gap: 0.24rem; justify-content: center; margin: 0.4rem 0 1.1rem; flex: none; }
.dots i { width: 0.22rem; height: 0.22rem; border-radius: 50%; background: rgba(255, 217, 230, 0.16); transition: background 0.2s ease, transform 0.2s ease; }
.dots i.is-done { background: rgba(255, 46, 126, 0.7); }
.dots i.is-now { background: var(--ink-strong); transform: scale(1.6); }

.question { display: flex; flex-direction: column; gap: 1.15rem; margin-top: auto; margin-bottom: auto; }
.question__index { font-size: 0.56rem; letter-spacing: 0.32em; color: var(--pink-2); }
.question__text {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.62;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);            /* 淡粉问题 */
}
.options { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.15rem; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  padding: 0.85rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.65rem;
  background: var(--pink);       /* 高饱和粉回答 */
  color: #2A0D19;
  font-size: 0.8rem;
  line-height: 1.55;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.option:active { transform: scale(0.99); filter: brightness(1.05); }
.option__key {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--pink);
  background: #2A0D19;
}
.option.is-picked { box-shadow: 0 0 0 2px #2B0F1D, 0 0 0 4px var(--pink-2); }
.option.is-picked .option__key { background: #2A0D19; color: #FFDCE9; }

.quiz__tip { margin: 0.85rem 0 0; text-align: center; font-size: 0.56rem; letter-spacing: 0.06em; color: rgba(255, 217, 230, 0.28); }
.quiz__foot { padding-top: 0.9rem; display: flex; gap: 0.6rem; }
.quiz__foot .btn { flex: 1; }

.enter { animation: fadeUp 0.28s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 结果 ---------------- */
.result { flex: 1; display: flex; align-items: center; min-height: 0; }
.result__inner { display: flex; gap: 1rem; width: 100%; align-items: flex-start; }
.result__left { flex: none; }
.result__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}
html.is-wide .result__head { gap: 1.6rem; }
.result__headline { min-width: 0; }
.result__owner {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  max-width: 100%;
  padding: 0.26rem 0.46rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 8, 13, 0.55);
}
.result__owner img {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  flex: none;
}
.result__owner-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.result__owner-text strong {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 6rem;
}
.result__owner-text span { font-size: 0.46rem; color: var(--faint); white-space: nowrap; }
.result__art {
  position: relative;
  isolation: isolate;
  flex: none;
  width: 9.6rem;
  height: 13.4rem;
  padding: 0.4rem;
  border-radius: 0.5rem;
  background: var(--cream);
  box-shadow: 0 1rem 2.4rem -0.6rem rgba(0, 0, 0, 0.55);
  transform: rotate(-1.6deg);
}
.result__art::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #3A1524;
  transform: rotate(3deg) translate(6px, 6px);
  z-index: -1;
}
.result__art img { width: 100%; height: 100%; object-fit: cover; border-radius: 0.25rem; }
.result__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.result__name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--ink-strong);
}
.result__meta { margin: 0.28rem 0 0; font-size: 0.48rem; letter-spacing: 0.26em; color: var(--faint); }
.radar { width: 100%; aspect-ratio: 1 / 1; margin: 0.55rem 0 0.25rem; max-height: 10.2rem; }
.radar__svg { display: block; width: 100%; height: 100%; }
.result__intro {
  margin: 0.3rem 0 0;
  font-size: 0.66rem;
  line-height: 1.85;
  color: var(--muted);
  padding-right: 0.15rem;
}

.scores { display: flex; gap: 0.35rem; padding: 0.6rem 0.05rem 0; flex-wrap: wrap; margin-top: auto; }
.score-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.24rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.54rem;
  color: var(--muted);
  white-space: nowrap;
}
.score-chip i { width: 0.3rem; height: 0.3rem; border-radius: 50%; }
.score-chip b { color: var(--ink); font-weight: 600; }
.score-chip em { font-style: normal; color: var(--pink-2); font-weight: 700; }
.score-chip__sep { opacity: 0.4; }
.score-chip__opp { color: var(--faint); }

.actions { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.8rem; }
.actions .btn { width: 100%; }

/* ---------------- 记录 ---------------- */
.list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.5rem 0 0.6rem; -webkit-overflow-scrolling: touch; }
.record {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
}
.record:active { background: rgba(255, 46, 126, 0.10); }
.record__thumb { flex: none; width: 2.4rem; height: 3.2rem; overflow: hidden; border-radius: 0.25rem; background: #3A1524; }
.record__thumb img { width: 100%; height: 100%; object-fit: cover; }
.record__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.record__name { font-family: var(--serif); font-size: 0.82rem; letter-spacing: 0.06em; color: var(--ink-strong); }
.record__tags { display: flex; gap: 0.3rem; font-size: 0.54rem; }
.record__tag { padding: 0.02rem 0.28rem; border: 1px solid var(--line); border-radius: 999px; }
.record__time { font-size: 0.5rem; color: var(--faint); }

.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7rem; text-align: center; padding: 2rem 1rem; }
.empty__mark { font-family: var(--serif); font-size: 2rem; color: rgba(255, 46, 126, 0.5); }
.empty__text { margin: 0; font-size: 0.7rem; color: var(--muted); }

/* ---------------- 排行榜 ---------------- */
.rank { flex: 1; display: flex; flex-direction: column; gap: 0.75rem; padding-top: 0.5rem; overflow-y: auto; }
.rank__content { display: flex; flex-direction: column; gap: 0.75rem; }
.panel { border: 1px solid var(--line); border-radius: 0.75rem; background: rgba(255, 255, 255, 0.03); padding: 0.7rem; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.55rem; }
.panel__title { margin: 0; font-family: var(--serif); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.1em; color: var(--ink-strong); }
.panel__sub { font-size: 0.48rem; color: var(--faint); }

.stats { display: flex; flex-direction: column; gap: 0.4rem; }
.stat-row { display: flex; align-items: center; gap: 0.4rem; }
.stat-row__av { width: 1.15rem; height: 1.15rem; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line-2); }
.stat-row__name { width: 3.1rem; flex: none; font-family: var(--serif); font-size: 0.6rem; color: var(--ink); }
.stat-row__bar { flex: 1; height: 0.22rem; background: rgba(255, 217, 230, 0.10); overflow: hidden; }
.stat-row__bar i { display: block; height: 100%; background: linear-gradient(90deg, rgba(255, 46, 126, 0.55), var(--pink)); transition: width 0.5s ease; }
.stat-row__num { width: 2.5rem; text-align: right; font-size: 0.54rem; color: var(--faint); }
.stat-row__num b { color: var(--ink); font-size: 0.6rem; margin-right: 0.12rem; }
.stat-row__num small { font-size: 0.44rem; opacity: 0.8; }

/* 六维单项榜 */
.attrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.attr-card {
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.45rem 0.5rem 0.5rem;
  background: rgba(255, 255, 255, 0.02);
}
.attr-card__head { display: flex; align-items: center; gap: 0.32rem; margin-bottom: 0.38rem; }
.attr-card__dot { width: 0.36rem; height: 0.36rem; border-radius: 50%; flex: none; }
.attr-card__name { font-size: 0.6rem; letter-spacing: 0.04em; color: var(--ink); }
.attr-card__rows { display: flex; flex-direction: column; gap: 0.3rem; }
.attr-card__empty { margin: 0; font-size: 0.5rem; color: var(--faint); }
.attr-row { display: flex; align-items: center; gap: 0.32rem; }
.attr-row__rank { width: 0.8rem; flex: none; text-align: center; font-size: 0.5rem; color: var(--faint); }
.attr-row__avatar {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  flex: none;
}
.attr-row__avatar--empty { display: grid; place-items: center; font-size: 0.46rem; color: var(--ink); }
.attr-row--top .attr-row__avatar { width: 1.75rem; height: 1.75rem; border: 1px solid var(--pink-2); }
.attr-row__name {
  flex: 1;
  min-width: 0;
  font-size: 0.52rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attr-row--top .attr-row__name { color: var(--ink-strong); font-weight: 600; }
.attr-row__value { font-size: 0.58rem; color: var(--pink-2); flex: none; }
.attr-row--top .attr-row__value { font-size: 0.74rem; }
html.is-wide .attrs { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.players { display: flex; flex-direction: column; }
.player { display: flex; align-items: center; gap: 0.45rem; padding: 0.34rem 0.1rem; border-bottom: 1px solid rgba(255, 217, 230, 0.07); }
.player:last-child { border-bottom: 0; }
.player--me { background: rgba(255, 46, 126, 0.10); border-radius: 0.4rem; border-bottom-color: transparent; }
.player__rank { width: 1.2rem; flex: none; text-align: center; font-size: 0.6rem; color: var(--faint); }
.player--top .player__rank { color: var(--pink-2); }
.player__avatar { width: 1.55rem; height: 1.55rem; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); background: #3A1524; }
.player__avatar--empty { display: grid; place-items: center; font-size: 0.58rem; color: var(--pink-2); }
.player__main { flex: 1; min-width: 0; }
.player__name { font-size: 0.64rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__char { font-size: 0.52rem; color: var(--faint); }
.player__char b { color: var(--pink-2); font-weight: 600; }
.player__count { font-size: 0.54rem; color: var(--faint); }
.player__count b { color: var(--ink); font-size: 0.66rem; margin-right: 0.08rem; }

.rank__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.15rem 0 0.3rem; }
.rank__mine { font-size: 0.54rem; color: var(--faint); }

/* ---------------- 门禁 / 弹窗 ---------------- */
.gate { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; text-align: center; padding: 0.4rem 0.3rem; }
.gate__kicker { font-size: 0.5rem; letter-spacing: 0.3em; color: var(--pink-2); }
.gate__numeral { font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--pink); }
.gate__title { margin: 0; font-family: var(--serif); font-size: 1.02rem; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-strong); }
.gate__text { margin: 0; font-size: 0.7rem; line-height: 1.9; color: var(--muted); }
.gate__note { margin: 0; font-size: 0.54rem; color: var(--faint); }
.gate__input {
  width: 100%;
  margin: 0.55rem 0 0.1rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.6rem;
}
.gate__actions { width: 100%; display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.65rem; }
.gate__link {
  margin-top: 0.1rem;
  background: none;
  border: 0;
  font-size: 0.56rem;
  color: var(--faint);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.modal.show { opacity: 1; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(18, 6, 12, 0.82); backdrop-filter: blur(6px); }
.modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 17rem;
  padding: 1.3rem 1.1rem 1.05rem;
  border: 1px solid var(--line-2);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #2A101E 0%, #170711 100%);
  box-shadow: 0 2rem 4rem -1.2rem rgba(0, 0, 0, 0.8);
  transform: translateY(0.4rem);
  transition: transform 0.22s ease;
}
.modal.show .modal__panel { transform: none; }

.confirm__title { margin: 0 0 0.5rem; font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.06em; color: var(--ink-strong); }
.confirm__text { margin: 0; font-size: 0.7rem; line-height: 1.8; color: var(--muted); }
.confirm__actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.confirm__actions .btn { flex: 1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 2.2rem;
  transform: translate(-50%, 0.5rem);
  z-index: 90;
  max-width: 82vw;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(43, 15, 29, 0.96);
  font-size: 0.66rem;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.saving {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  background: rgba(23, 8, 17, 0.9);
}
.saving__spin { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid rgba(255, 46, 126, 0.25); border-top-color: var(--pink); animation: spin 0.85s linear infinite; }
.saving__text { margin: 0; font-size: 0.66rem; letter-spacing: 0.2em; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, rgba(255, 217, 230, 0.05), rgba(255, 217, 230, 0.12), rgba(255, 217, 230, 0.05)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 0.3rem; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* 我的资料卡 */
.me-card { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 0.7rem; background: rgba(255, 255, 255, 0.03); }
.me-card img { width: 1.9rem; height: 1.9rem; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.me-card__main { flex: 1; min-width: 0; }
.me-card__name { font-size: 0.68rem; color: var(--ink-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card__sub { font-size: 0.52rem; color: var(--faint); }

/* ============================================================
 * 桌面端（>=900px）：双栏画册布局
 * ============================================================ */
html.is-wide #screen {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}
html.is-wide .page { padding: 6vh 6vw; max-width: 1440px; margin: 0 auto; width: 100%; }
html.is-wide .home { padding: 0 6vw; justify-content: center; }
html.is-wide .home-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}
html.is-wide .home-left {
  align-items: center;
  text-align: center;
  max-width: 760px;
  padding-right: 0;
}
html.is-wide .eyebrow { margin-top: 2.2rem; font-size: 0.8rem; }
html.is-wide .headline { font-size: 4rem; line-height: 1.2; margin-top: 1rem; }
html.is-wide .sub { font-size: 0.95rem; margin-top: 1.2rem; }
html.is-wide .resume-row { margin-top: 1.8rem; justify-content: center; }
html.is-wide .resume-text { font-size: 0.78rem; flex: 0 0 auto; }
html.is-wide .stack { max-width: 420px; margin-top: 1.4rem; gap: 0.7rem; align-items: stretch; }
html.is-wide .stack .btn { height: 3.5rem; font-size: 1rem; }
html.is-wide .stack .btn small { font-size: 0.62rem; }
html.is-wide .badge { font-size: 0.54rem; }
html.is-wide .side-actions { top: 50%; right: 3vw; gap: 1.2rem; }
html.is-wide .fab { width: 2.8rem; height: 2.8rem; }
html.is-wide .fab svg { width: 1.15rem; height: 1.15rem; }
html.is-wide .fab span { font-size: 0.55rem; margin-top: 0.2rem; color: var(--muted); }
html.is-wide .quota { margin-top: 1.4rem; font-size: 0.66rem; }
html.is-wide .music-toggle { align-self: center; font-size: 0.62rem; }
html.is-wide .brand { justify-content: center; }
html.is-wide .brand__mark { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; }
html.is-wide .brand__name { font-size: 1.15rem; }
html.is-wide .brand__name span { font-size: 0.52rem; }

/* 底部角色一览 */
html.is-wide .cast {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 760px;
}
.cast__item { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; }
.cast__item img {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-2);
  filter: saturate(0.92);
  opacity: 0.9;
}
.cast__item span { font-size: 0.58rem; color: var(--muted); letter-spacing: 0.02em; }

/* 桌面端其它页面：限制阅读宽度、放大字号 */
html.is-wide .quiz,
html.is-wide .result,
html.is-wide .list,
html.is-wide .rank,
html.is-wide .scores,
html.is-wide .actions,
html.is-wide .topbar { max-width: 760px; margin-left: auto; margin-right: auto; width: 100%; }
html.is-wide .page:not(.home) { padding: 5vh 6vw; }
html.is-wide .question__text { font-size: 1.7rem; }
html.is-wide .option { font-size: 0.95rem; padding: 1rem 1rem; }
html.is-wide .result { max-width: 900px; }
html.is-wide .result__info { max-width: 34rem; }
html.is-wide .result__art { width: 15rem; height: 21rem; }
html.is-wide .result__owner { gap: 0.6rem; padding: 0.42rem 0.8rem; }
html.is-wide .result__owner img { width: 2.4rem; height: 2.4rem; }
html.is-wide .result__owner-text strong { font-size: 0.85rem; max-width: 12rem; }
html.is-wide .result__owner-text span { font-size: 0.66rem; }
html.is-wide .result__name { font-size: 2.2rem; }
html.is-wide .result__intro { font-size: 0.8rem; max-width: 34rem; }
html.is-wide .radar { width: 15rem; max-height: 15rem; }
html.is-wide .actions { max-width: 26rem; margin-left: auto; margin-right: auto; }
html.is-wide .scores { max-width: 26rem; margin-left: auto; margin-right: auto; justify-content: center; }
html.is-wide .topbar__title { font-size: 0.72rem; }
html.is-wide .panel__title { font-size: 0.95rem; }
html.is-wide .player__name, html.is-wide .record__name { font-size: 0.78rem; }
html.is-wide .stat-row { gap: 0.6rem; }
html.is-wide .stat-row__name { width: 4rem; font-size: 0.72rem; }
html.is-wide .stat-row__num { width: 3.2rem; font-size: 0.66rem; }

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

/* ---------------- 转场动效：元素飞入 / 飞出 ---------------- */
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes enterIn {
  from {
    opacity: 0;
    transform: translate3d(var(--fx, 0px), var(--fy, 0px), 0) scale(var(--fs, 1));
  }
  to { opacity: 1; transform: none; }
}
@keyframes enterOut {
  from { opacity: 1; transform: none; }
  to {
    opacity: 0;
    transform: translate3d(calc(var(--fx, 0px) * 0.45), calc(var(--fy, 0px) * 0.45), 0) scale(0.97);
  }
}

.js [data-enter] { opacity: 0; will-change: transform, opacity; }
.js [data-enter].motion-in {
  animation: enterIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--delay, 0ms);
}
.js .page.is-leaving {
  animation: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.js .page.is-leaving [data-enter] {
  animation: enterOut 0.28s ease both !important;
  animation-delay: 0ms !important;
}

@media (prefers-reduced-motion: reduce) {
  .js .page,
  .js [data-enter],
  .js [data-enter].motion-in { animation: none !important; opacity: 1 !important; transform: none !important; }
}
/* 动画失效时的兜底：直接显示 */
.js [data-enter].motion-settled {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}