/* ============================================================
 * CuTi · 萌属性测试
 *   奶油粉纸感 + 淡粉 + 手绘贴纸
 * ============================================================ */

:root {
  --bg: #FFF8FA;
  --paper: #FFFFFF;
  --ink: #3B2F2A;
  --ink-soft: #5D4C55;
  --muted: #9C8A94;
  --line: #EFDEE7;
  --accent: #E8799B;
  --accent-deep: #D1567C;
  --accent-soft: rgba(232, 121, 155, 0.14);
  --sun: #F4B6CC;
  --mint: #8CC9B5;
  --lilac: #B9A7D6;
  --peach: #FBE0E9;
  --radius-lg: 26px;
  --radius-md: 18px;
  --shadow-card: 0 14px 34px rgba(96, 64, 45, 0.08);
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-display: "Hiragino Maru Gothic ProN", "Yuanti SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #F9EEF4;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(232, 121, 155, 0.12), transparent 36%),
    radial-gradient(circle at 88% 92%, rgba(140, 201, 181, 0.14), transparent 40%),
    #F9EEF4;
}

button, input { font-family: inherit; }

a { color: inherit; }

.hidden { display: none !important; }

/* ---------------- 手机画幅 ---------------- */
.screen::before {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(34% 40% at 18% 14%, rgba(244, 182, 204, .45), transparent 72%),
    radial-gradient(38% 42% at 84% 22%, rgba(185, 167, 214, .30), transparent 74%),
    radial-gradient(42% 46% at 56% 88%, rgba(140, 201, 181, .26), transparent 76%),
    radial-gradient(26% 26% at 76% 78%, rgba(255, 255, 255, .5), transparent 72%);
  filter: blur(26px);
  animation: bgFloat 30s ease-in-out infinite alternate;
}
@keyframes bgFloat {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2.5%, 2%, 0) scale(1.08); }
}

.screen::after {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(18% 22% at 14% 76%, rgba(255, 255, 255, .8), transparent 72%),
    radial-gradient(16% 18% at 88% 64%, rgba(244, 182, 204, .5), transparent 72%),
    radial-gradient(20% 24% at 68% 14%, rgba(140, 201, 181, .28), transparent 74%),
    radial-gradient(14% 16% at 38% 30%, rgba(185, 167, 214, .22), transparent 72%);
  filter: blur(16px);
  animation: bgBreath 16s ease-in-out infinite alternate;
}
@keyframes bgBreath {
  from { opacity: .55; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: .95; transform: translate3d(-1.5%, -1%, 0) scale(1.05); }
}

.screen {
  position: relative;
  width: 390px;
  height: 844px;
  overflow: hidden;
  background:
    radial-gradient(rgba(216, 196, 178, 0.28) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--bg);
  box-shadow: none;
}

.is-wide .screen {
  box-shadow: none;
  background:
    radial-gradient(rgba(216, 196, 178, 0.25) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg);
}

.bubbles { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1; pointer-events: none; z-index: 1; }

.page {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 1.25rem calc(1.4rem + env(safe-area-inset-bottom));
  scrollbar-width: none;
}
.page::-webkit-scrollbar { display: none; }

/* 入场：默认完整显示，动画只做轻微位移，避免任何环境下半透明 */
[data-enter] { opacity: 1; }
.motion-in { animation: cutiIn .55s cubic-bezier(.2, .9, .3, 1) both; animation-delay: var(--delay, 0ms); }
@keyframes cutiIn {
  from { transform: translateY(8px); }
  to { transform: none; }
}
.page.is-leaving { opacity: 0; transition: opacity .25s ease; }

/* ---------------- 通用 ---------------- */
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  height: 4rem;
  padding-top: env(safe-area-inset-top);
}
.topbar__title {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
}
.topbar__title--sub { font-size: .62rem; letter-spacing: .04em; color: var(--muted); font-weight: 600; }

.icon-btn {
  width: 2.3rem;
  height: 2.3rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 4px 14px rgba(96, 64, 45, .08);
  color: var(--ink);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.is-ghost { opacity: 0; pointer-events: none; }

.icon-pill {
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(96, 64, 45, .06);
  transition: transform .15s ease, border-color .15s ease;
}
.icon-pill:active { transform: scale(.93); }
.icon-pill svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 3rem;
  padding: 0 1.15rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: .92rem;
  font-weight: 800;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--block { width: 100%; }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(232, 121, 155, .28);
}
.btn--primary:active { background: var(--accent-deep); }
.btn--soft {
  background: #FFF0F6;
  border-color: #F3D8E3;
  color: var(--ink);
}
.btn--plain {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
}
.btn--ghost { background: rgba(255,255,255,.7); border-color: var(--line); }
.btn--sm { min-height: 2.2rem; font-size: .72rem; padding: 0 .85rem; }
.btn--lg { min-height: 3.3rem; font-size: 1rem; }
.btn small {
  font-size: .66rem;
  font-weight: 700;
  opacity: .72;
  padding: .18rem .45rem;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
}
.btn--soft small, .btn--plain small { background: rgba(59,47,42,.06); }
.btn .badge {
  font-style: normal;
  font-size: .58rem;
  font-weight: 800;
  color: var(--accent-deep);
  background: rgba(232, 121, 155, .14);
  padding: .2rem .42rem;
  border-radius: 999px;
}
.btn .badge.hidden { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: .3rem .6rem;
  border-radius: 999px;
  background: #FFF0F6;
  color: var(--accent-deep);
  font-size: .66rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ---------------- 首页 ---------------- */
.home-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.brand { display: flex; align-items: center; gap: .55rem; }
.brand__mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: .8rem;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  font-family: var(--font-display);
  box-shadow: 0 6px 14px rgba(232, 121, 155, .3);
  transform: rotate(-4deg);
}
.brand__name {
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1.05;
}
.brand__name small {
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--muted);
  margin-top: .2rem;
}
.topbar--home { justify-content: space-between; }
.top-actions { display: flex; gap: .5rem; }

.hero { display: block; padding-top: .4rem; }
.hero__copy { max-width: 30rem; }
.eyebrow {
  margin: 0 0 .55rem;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--accent-deep);
}
.headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1.06;
  letter-spacing: -.01em;
  font-weight: 900;
  color: var(--ink);
}
.headline em {
  position: relative;
  font-style: normal;
  color: var(--accent);
  z-index: 0;
}
.headline em::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: .08em;
  height: .3em;
  background: var(--sun);
  opacity: .5;
  border-radius: 999px;
  z-index: -1;
  transform: rotate(-1.5deg);
}
.sub {
  margin: .85rem 0 0;
  color: var(--ink-soft);
  font-size: .8rem;
  line-height: 1.7;
  font-weight: 500;
}

.resume-row {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: 1rem;
  font-size: .66rem;
  color: var(--muted);
  font-weight: 600;
}
.resume-dot { width: .4rem; height: .4rem; border-radius: 50%; background: var(--mint); flex: none; }

.stack { display: flex; flex-direction: column; gap: .6rem; margin-top: 1rem; }
.stack .btn { justify-content: space-between; padding: 0 1.1rem; }
.stack .btn small { margin-left: auto; }
.stack .btn .badge { margin-left: .35rem; }

.quota {
  margin: .75rem 0 0;
  font-size: .62rem;
  color: var(--muted);
  font-weight: 600;
}
.music-toggle {
  margin-top: .5rem;
  border: none;
  background: none;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 700;
  padding: .2rem 0;
  cursor: pointer;
}

.cast {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding: 1rem .1rem .4rem;
  margin-top: .9rem;
  scrollbar-width: none;
}
.cast::-webkit-scrollbar { display: none; }
.cast__item {
  flex: none;
  width: 3.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .45rem .3rem .5rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
}
.cast__item img { width: 2.4rem; height: 2.4rem; border-radius: 50%; object-fit: cover; }
.cast__item span { font-size: .54rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

.home-foot {
  display: flex;
  justify-content: space-between;
  padding: .9rem 0 .2rem;
  margin-top: auto;
  font-size: .56rem;
  color: var(--muted);
  letter-spacing: .02em;
}

/* 首页装饰卡（桌面/宽屏） */
.hero__art { display: none; }

/* ---------------- 答题 ---------------- */
.progress {
  height: .34rem;
  border-radius: 999px;
  background: #F1E0EA;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--sun));
  transition: width .3s ease;
}
.dots { display: flex; gap: .22rem; flex-wrap: wrap; padding: .6rem 0 0; }
.dots i { width: .34rem; height: .34rem; border-radius: 50%; background: #EDDCE6; }
.dots i.is-done { background: var(--accent); opacity: .45; }
.dots i.is-now { background: var(--accent); transform: scale(1.25); }

.question { padding-top: 1rem; }
.question__index {
  display: inline-flex;
  align-items: center;
  padding: .3rem .62rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.question__text {
  margin: .8rem 0 1.2rem;
  font-size: 1.32rem;
  line-height: 1.42;
  font-weight: 800;
  letter-spacing: -.005em;
  color: var(--ink);
  font-family: var(--font-display);
}
.options { display: flex; flex-direction: column; gap: .62rem; }
.option {
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  padding: .72rem .85rem;
  border-radius: 1.15rem;
  border: 1.5px solid var(--line);
  background: var(--paper);
  text-align: left;
  font-size: .84rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(96, 64, 45, .04);
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.option:active { transform: scale(.99); }
.option__key {
  flex: none;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 900;
  color: #fff;
  background: var(--accent);
}
.option:nth-child(2) .option__key { background: var(--sun); color: var(--ink); }
.option:nth-child(3) .option__key { background: var(--mint); }
.option:nth-child(4) .option__key { background: var(--lilac); }
.option.is-picked {
  border-color: var(--accent);
  background: #FFF2F8;
  box-shadow: 0 8px 20px rgba(232, 121, 155, .18);
}
.option.is-picked .option__text { color: var(--accent-deep); }

.quiz { display: flex; flex-direction: column; position: relative; }
.quiz::after {
  content: "C";
  position: absolute;
  right: -1.4rem;
  bottom: -3.4rem;
  font: 900 15rem var(--font-display);
  color: rgba(232, 121, 155, .055);
  pointer-events: none;
  z-index: 0;
}
.quiz > * { position: relative; z-index: 1; }
.quiz .question {
  margin-top: 1.1rem;
  padding: 1.05rem;
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, .6);
  border: 1.5px solid rgba(234, 223, 211, .9);
  box-shadow: 0 12px 30px rgba(96, 64, 45, .04);
}
.quiz__tip { margin: 1.1rem 0 0; text-align: center; font-size: .62rem; color: var(--muted); font-weight: 600; }
.quiz__deco { margin-top: .5rem; text-align: center; font-size: .58rem; color: #C3B0BB; letter-spacing: .02em; }
.quiz__deco span { color: var(--sun); margin: 0 .3rem; }
.quiz__foot { display: flex; justify-content: center; margin-top: auto; padding-top: 1rem; }

/* ---------------- 结果 ---------------- */
.result { padding-top: .3rem; }
.result__inner { display: flex; flex-direction: column; align-items: center; }
.result__left { width: 100%; display: flex; justify-content: center; }
.result__art {
  position: relative;
  width: 11.5rem;
  aspect-ratio: 3 / 4;
  border-radius: 1.5rem;
  background: var(--paper);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transform: rotate(-1.5deg);
}
.result__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result__stamp {
  position: absolute;
  right: .55rem;
  bottom: .55rem;
  padding: .22rem .5rem;
  border-radius: 999px;
  background: rgba(59, 47, 42, .72);
  color: #fff;
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.result__info { width: 100%; margin-top: 1.1rem; }
.result__kicker {
  margin: 0;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--accent-deep);
}
.result__head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; margin-top: .2rem; }
.result__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1.08;
  font-weight: 900;
  color: var(--ink);
}
.result__name.is-long { font-size: 1.9rem; }
.result__name.is-xlong { font-size: 1.55rem; }
.result__owner {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .55rem .3rem .3rem;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  flex: none;
  max-width: 9.5rem;
}
.result__owner img { width: 1.7rem; height: 1.7rem; border-radius: 50%; object-fit: cover; background: var(--peach); }
.result__owner-text { display: flex; flex-direction: column; min-width: 0; }
.result__owner-text strong { font-size: .58rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result__owner-text span { font-size: .5rem; color: var(--muted); white-space: nowrap; }
.result__owner.is-guest { opacity: .7; }

.radar { width: 100%; max-width: 19rem; margin: 1rem auto 0; aspect-ratio: 1; }
.radar__svg { width: 100%; height: 100%; overflow: visible; }

.result__intro {
  margin: 1rem 0 0;
  font-size: .78rem;
  line-height: 1.85;
  color: var(--ink-soft);
  font-weight: 500;
}

.scores {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1rem;
}
.score-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .32rem .58rem;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  font-size: .58rem;
  color: var(--muted);
  font-weight: 700;
}
.score-chip i { width: .42rem; height: .42rem; border-radius: 50%; }
.score-chip b { color: var(--ink); font-weight: 800; }
.score-chip em { font-style: normal; color: var(--accent-deep); font-weight: 900; }
.score-chip__sep { opacity: .4; }
.score-chip__opp { opacity: .8; }

.actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.1rem; padding-bottom: .4rem; }
.actions .btn--primary { flex: 1 1 100%; }
.actions .btn--soft, .actions .btn--plain { flex: 1; }

/* ---------------- 排行榜 ---------------- */
.rank { padding-bottom: 1.4rem; }
.rank__content { display: flex; flex-direction: column; gap: .85rem; }
.panel {
  background: rgba(255,255,255,.88);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(96,64,45,.05);
}
.panel--list { padding: 1rem .85rem; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.panel__title { margin: 0; font-size: .9rem; font-weight: 900; letter-spacing: .01em; }
.panel__sub { font-size: .55rem; color: var(--muted); font-weight: 600; }

.me-card {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem .85rem;
  border-radius: var(--radius-md);
  background: #FFF0F6;
  border: 1.5px solid #F3D8E3;
}
.me-card img { width: 2.2rem; height: 2.2rem; border-radius: 50%; object-fit: cover; }
.me-card__main { flex: 1; min-width: 0; }
.me-card__name { font-size: .78rem; font-weight: 900; }
.me-card__sub { font-size: .58rem; color: var(--muted); margin-top: .1rem; }

.stat-row { display: flex; align-items: center; gap: .5rem; padding: .32rem 0; }
.stat-row__av { width: 1.7rem; height: 1.7rem; border-radius: 50%; object-fit: cover; background: var(--peach); flex: none; }
.stat-row__name { width: 4.3rem; flex: none; font-size: .6rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-row__bar { flex: 1; height: .4rem; border-radius: 999px; background: #F5E4EC; overflow: hidden; }
.stat-row__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--sun)); }
.stat-row__num { width: 2.4rem; text-align: right; font-size: .55rem; color: var(--muted); display: flex; flex-direction: column; line-height: 1.2; }
.stat-row__num b { font-size: .68rem; color: var(--ink); }
.stat-row__num small { font-size: .5rem; }

.player {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .35rem;
  border-radius: .9rem;
}
.player--top { background: #FFF7FB; }
.player--me { background: #FFF0F6; border: 1px solid #F3D8E3; }
.player__rank { width: 1.2rem; text-align: center; font-size: .68rem; font-weight: 900; color: var(--muted); }
.player--top .player__rank { color: var(--accent-deep); }
.player__avatar { width: 1.9rem; height: 1.9rem; border-radius: 50%; object-fit: cover; background: var(--peach); flex: none; }
.player__avatar--empty { display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 900; color: #fff; background: var(--lilac); }
.player__main { flex: 1; min-width: 0; }
.player__name { font-size: .7rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__char { font-size: .55rem; color: var(--muted); margin-top: .1rem; }
.player__char b { color: var(--accent-deep); }
.player__count { text-align: right; font-size: .5rem; color: var(--muted); }
.player__count b { font-size: .82rem; color: var(--ink); font-weight: 900; }
.player__count small { margin-left: .1rem; }

.rank__foot { margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--line); }
.rank__mine { font-size: .6rem; color: var(--muted); font-weight: 700; }

.gate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .55rem; padding: 1rem .4rem .2rem; }
.gate__kicker { font-size: .55rem; font-weight: 900; letter-spacing: .16em; color: var(--accent-deep); }
.gate__title { margin: 0; font-size: 1.15rem; font-weight: 900; font-family: var(--font-display); }
.gate__text, .gate__note { margin: 0; font-size: .72rem; line-height: 1.75; color: var(--ink-soft); }
.gate__note { color: var(--muted); font-size: .64rem; }
.gate__actions { display: flex; flex-direction: column; gap: .5rem; width: 100%; margin-top: .6rem; }
.gate__input { width: 100%; padding: .7rem .8rem; border-radius: .8rem; border: 1.5px solid var(--line); font-size: .7rem; color: var(--ink); background: #FFFAFC; }

.tip-line { margin: .4rem 0; font-size: .68rem; color: var(--muted); text-align: center; }
.skeleton { border-radius: .6rem; background: linear-gradient(90deg, #F5E7EE, #FBF3F8, #F5E7EE); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 0 0; } to { background-position: -200% 0; } }

/* ---------------- 记录 ---------------- */
.list { display: flex; flex-direction: column; gap: .6rem; padding-bottom: 1rem; }
.record {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem;
  border-radius: 1.2rem;
  background: rgba(255,255,255,.9);
  border: 1.5px solid var(--line);
  text-decoration: none;
  box-shadow: 0 5px 14px rgba(96,64,45,.04);
}
.record__thumb { width: 3rem; height: 3.6rem; border-radius: .9rem; overflow: hidden; flex: none; background: var(--peach); }
.record__thumb img { width: 100%; height: 100%; object-fit: cover; }
.record__main { flex: 1; min-width: 0; }
.record__name { font-size: .86rem; font-weight: 900; }
.record__tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.record__tag { font-size: .55rem; font-weight: 700; }
.record__time { margin-top: .25rem; font-size: .54rem; color: var(--muted); }

.empty { display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: 3rem 0; }
.empty__mark { width: 4rem; height: 4rem; border-radius: 50%; background: #FFF0F6; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--accent); font-weight: 900; }
.empty__text { margin: 0; font-size: .72rem; color: var(--muted); }

/* ---------------- 弹窗 / toast ---------------- */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 1.2rem; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.modal.show { opacity: 1; pointer-events: auto; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(59, 47, 42, .36); backdrop-filter: blur(3px); }
.modal__panel {
  position: relative;
  width: min(22rem, 100%);
  max-height: 84vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 1.6rem;
  padding: 1.2rem;
  box-shadow: 0 24px 60px rgba(59, 42, 30, .28);
  transform: translateY(10px) scale(.98);
  transition: transform .24s cubic-bezier(.2,.9,.3,1.15);
}
.modal.show .modal__panel { transform: none; }
.modal--sm .modal__panel { width: min(19rem, 100%); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 12px);
  z-index: 120;
  max-width: 84vw;
  padding: .6rem .9rem;
  border-radius: 999px;
  background: rgba(59, 47, 42, .92);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast--ok { background: rgba(58, 122, 98, .94); }
.toast--warn { background: rgba(190, 96, 70, .94); }

.saving { position: fixed; inset: 0; z-index: 130; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; background: rgba(255, 248, 252, .9); }
.saving__spin { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 3px solid #F3D8E3; border-top-color: var(--accent); animation: spin .8s linear infinite; }
.saving__text { margin: 0; font-size: .74rem; font-weight: 700; color: var(--ink-soft); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
 * 桌面 / 宽屏
 * ============================================================ */
.is-wide .page { max-width: 64rem; margin: 0 auto; padding: 0 2rem 2rem; }
.is-wide .topbar { height: 5rem; }
.is-wide .brand__mark { width: 2.6rem; height: 2.6rem; font-size: 1.4rem; }
.is-wide .brand__name { font-size: 1.25rem; }
.is-wide .hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 2.5rem;
  padding-top: 1.2rem;
}
.is-wide .headline { font-size: 4.6rem; }
.is-wide .sub { font-size: .95rem; }
.is-wide .stack { max-width: 21rem; }
.is-wide .stack .btn { min-height: 3.4rem; font-size: 1rem; }
.is-wide .cast { margin-top: 2.4rem; }
.is-wide .hero__art { display: block; }

.art-card {
  position: relative;
  width: 21rem;
  aspect-ratio: 4 / 5;
  border-radius: 2.2rem;
  background: linear-gradient(160deg, #FFFDFB, #FFF0F6 60%, #FBE2EC);
  border: 1.5px solid #F2D9E6;
  box-shadow: 0 28px 60px rgba(120, 80, 55, .14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(2deg);
}
.art-card__ring {
  position: absolute;
  inset: 1.6rem;
  border-radius: 1.7rem;
  border: 1.5px dashed rgba(232, 121, 155, .35);
}
.art-card__glyph {
  font-family: var(--font-display);
  font-size: 7.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  text-shadow: 6px 6px 0 rgba(245, 196, 69, .35);
}
.art-card__caption {
  margin-top: .8rem;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .22em;
  color: var(--muted);
}
.sticker {
  position: absolute;
  padding: .32rem .7rem;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--ink);
  font-size: .68rem;
  font-weight: 800;
  box-shadow: 3px 3px 0 rgba(59, 47, 42, .12);
}
.sticker--a { top: 2.2rem; left: -1.2rem; transform: rotate(-7deg); color: var(--accent-deep); }
.sticker--b { bottom: 3rem; right: -1rem; transform: rotate(6deg); color: #5B4A8A; }
.sticker--c { bottom: 6.5rem; left: -1.4rem; transform: rotate(3deg); color: #3E7C69; }
.spark { position: absolute; color: var(--sun); font-size: 1.2rem; }
.spark--1 { top: 3rem; right: 1.8rem; }
.spark--2 { bottom: 2.2rem; left: 2rem; font-size: .9rem; }
.spark--3 { top: 50%; right: -1.4rem; font-size: 1rem; }

.is-wide .result__inner { flex-direction: row; align-items: flex-start; gap: 2.4rem; }
.is-wide .result__left { width: 18rem; flex: none; }
.is-wide .result__art { width: 18rem; transform: rotate(-2deg); }
.is-wide .result__info { margin-top: 0; max-width: 36rem; }
.is-wide .result__name { font-size: 3.2rem; }
.is-wide .radar { margin: 1rem 0 0; max-width: 21rem; }
.is-wide .result__intro { max-width: 30rem; }
.is-wide .scores { margin-top: 1.4rem; margin-left: 20.4rem; max-width: 36rem; }
.is-wide .actions { margin-left: 20.4rem; max-width: 26rem; }

.is-wide .rank__content { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 1.2rem; }
.is-wide .me-card { grid-column: 1 / -1; }
.is-wide .rank__content .panel:last-child { align-self: start; }

.is-wide .quiz .question { max-width: 34rem; margin: 0 auto; }
.is-wide .quiz .options { display: grid; grid-template-columns: 1fr; }
.is-wide .quiz__tip, .is-wide .quiz__foot { max-width: 34rem; margin-left: auto; margin-right: auto; }
.is-wide .progress, .is-wide .dots { max-width: 34rem; margin-left: auto; margin-right: auto; }

.is-wide .page .list { max-width: 38rem; margin: 0 auto; }


/* 首页贴纸带（移动端填充节奏） */
.hero__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.hero__tags span {
  padding: .26rem .58rem;
  border-radius: 999px;
  background: #fff;
  border: 1.2px solid var(--line);
  font-size: .58rem;
  font-weight: 800;
  color: var(--ink-soft);
  transform: rotate(-1deg);
}
.hero__tags span:nth-child(2n) { transform: rotate(1.4deg); color: var(--accent-deep); background: #FFF2F8; }
.hero__tags span:nth-child(3n) { color: #3E7C69; background: #F0F8F5; }


/* ============================================================
 * 首页角色立绘幻灯片
 * ============================================================ */
.hero { position: relative; display: flex; flex-direction: column; }
.hero__copy { position: relative; z-index: 2; order: 2; }
.hero__art {
  display: block;
  position: relative;
  order: 1;
  width: 100%;
  height: 11.6rem;
  margin: 0 0 .9rem;
  z-index: 1;
}
.slideshow { position: relative; height: 100%; cursor: pointer; user-select: none; }
.slideshow__frame {
  position: relative;
  height: calc(100% - 1.5rem);
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: #FFFDFB;
  box-shadow: 0 18px 40px rgba(96, 64, 45, .12);
  transform: rotate(-1.2deg);
  transition: transform .35s ease, box-shadow .35s ease;
}
.slideshow:hover .slideshow__frame { transform: rotate(0deg); box-shadow: 0 22px 46px rgba(96,64,45,.16); }
.slideshow.is-bump .slideshow__frame { animation: slideBump .4s cubic-bezier(.2,.9,.3,1.3); }
@keyframes slideBump { 45% { transform: scale(.985) rotate(0deg); } }
.slideshow__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  opacity: 1;
  transform: scale(1.03);
  transition: transform .9s cubic-bezier(.2,.9,.3,1);
}
.slideshow__frame img.is-in { transform: scale(1); }
.slideshow__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(59,47,42,0) 48%, rgba(59,47,42,.55) 100%);
  pointer-events: none;
}
.slideshow__count {
  position: absolute;
  top: .65rem;
  right: .65rem;
  z-index: 2;
  padding: .2rem .45rem;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: var(--ink);
  font-size: .52rem;
  font-weight: 900;
  letter-spacing: .06em;
}
.slideshow__meta {
  position: absolute;
  left: .8rem;
  bottom: .6rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.slideshow__meta b { font-size: 1.05rem; font-weight: 900; letter-spacing: .02em; }
.slideshow__meta span { font-size: .46rem; letter-spacing: .18em; opacity: .82; margin-top: .1rem; }
.slideshow__dots { display: flex; gap: .28rem; justify-content: center; padding-top: .5rem; }
.slideshow__dot {
  width: .4rem;
  height: .4rem;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #E9D8E2;
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.slideshow__dot.is-on { width: 1.05rem; background: var(--accent); }
.slideshow__hint {
  margin: .35rem 0 0;
  text-align: center;
  font-size: .5rem;
  color: var(--muted);
  letter-spacing: .04em;
}

/* ============================================================
 * 微交互
 * ============================================================ */
.btn, .option, .icon-pill, .icon-btn, .cast__item, .record, .player { position: relative; }
.ui-ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(232, 121, 155, .28);
  transform: scale(0);
  animation: ripple .55s ease-out forwards;
  pointer-events: none;
  z-index: 0;
}
.btn--primary .ui-ripple { background: rgba(255,255,255,.45); }
@keyframes ripple { to { transform: scale(22); opacity: 0; } }
.btn > *, .option > * { position: relative; z-index: 1; }

.btn:hover, .icon-pill:hover, .record:hover { transform: translateY(-1px); }
.icon-btn:hover { transform: rotate(-4deg) scale(1.03); }
.cast__item { transition: transform .2s ease, border-color .2s ease; }
.cast__item:hover { transform: translateY(-3px) rotate(-1deg); border-color: #F3D8E3; }

.option { overflow: hidden; }
.option::after {
  content: "";
  position: absolute;
  right: .9rem;
  top: 50%;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: -.55rem;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  transform: scale(.7);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}
.option.is-picked::after {
  content: "✓";
  opacity: 1;
  transform: scale(1);
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-size: .62rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.option.is-picked { animation: pickPop .28s cubic-bezier(.2,.9,.3,1.3); }
@keyframes pickPop { 0% { transform: scale(1); } 45% { transform: scale(.985); } 100% { transform: scale(1); } }

.progress i { position: relative; }
.progress i::after {
  content: "";
  position: absolute;
  right: -.1rem;
  top: 50%;
  width: .55rem;
  height: .55rem;
  margin-top: -.275rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--accent);
}
.dots i.is-now { animation: dotPulse 1.8s ease-in-out infinite; }
@keyframes dotPulse { 50% { transform: scale(1.45); opacity: .75; } }

/* 结果页细节 */
.result__art { transition: transform .3s ease; }
.result__art:hover { transform: rotate(-2.4deg) translateY(-2px); }
.result__stamp { animation: stampFloat 3.6s ease-in-out infinite; }
@keyframes stampFloat { 50% { transform: translateY(-3px) rotate(-2deg); } }
.result__name { animation: nameIn .6s cubic-bezier(.2,.9,.3,1.15) both; }
@keyframes nameIn { from { transform: translateY(8px); } }
.score-chip { animation: chipIn .45s ease both; }
.score-chip:nth-child(2) { animation-delay: .05s; }
.score-chip:nth-child(3) { animation-delay: .1s; }
.score-chip:nth-child(4) { animation-delay: .15s; }
@keyframes chipIn { from { transform: translateY(6px); } }
#radar svg { animation: radarIn .7s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes radarIn { from { transform: scale(.9); } }

/* 排行榜条形生长 */
.stat-row__bar i { transform-origin: left center; }
.player { animation: rowIn .4s ease both; }
.player:nth-child(2n) { animation-delay: .04s; }
@keyframes rowIn { from { transform: translateY(5px); } }

/* 页面转场幕布 */
.page-curtain {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.5, 0, .2, 1);
}
.page-curtain.is-on { transform: none; }
.page-curtain__mark {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: var(--accent);
  color: #fff;
  font: 900 1.5rem var(--font-display);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .25s ease .08s, transform .3s cubic-bezier(.2,.9,.3,1.3) .08s;
}
.page-curtain.is-on .page-curtain__mark { opacity: 1; transform: none; }

/* 宽屏转轮 */
.is-wide .hero__copy { order: 1; }
.is-wide .hero__art { order: 2; width: 19rem; height: 25rem; margin: 0; justify-self: center; }
.is-wide .slideshow__frame { border-radius: 2rem; transform: rotate(-2deg); }
.is-wide .slideshow__meta b { font-size: 1.35rem; }
.is-wide .slideshow__meta { left: 1.1rem; bottom: 1rem; }

/* 小屏时转轮压低存在感，只露一角 */
@media (max-width: 899px) {
  .hero__art { top: -1.8rem; right: -3.2rem; width: 11rem; height: 11rem; opacity: .96; }
}


.btn, .icon-pill, .icon-btn, .cast__item, .record, .player { overflow: hidden; }
.is-wide .wheel-note { display: none; }


@media (max-width: 899px) {
  .cast { display: none; }
  .hero { padding-top: .1rem; }
  .hero__art { height: 10.4rem; margin-bottom: .7rem; }
  .stack { gap: .5rem; margin-top: .85rem; }
  .stack .btn { min-height: 2.75rem; }
  .quota { margin-top: .55rem; }
  .music-toggle { margin-top: .3rem; }
  .slideshow__hint { margin-top: .2rem; }
}


/* 按钮回弹 */
.btn-pop { animation: btnPop .18s ease; }
@keyframes btnPop { 50% { transform: scale(.975); } }


/* 点击火花层 */
.spark-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 80;
  pointer-events: none;
}


/* ---------------- 查看 Ta 的属性 ---------------- */
.lookup-btn small { background: rgba(232, 121, 155, .12); }
.lookup__input {
  margin-top: .5rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.lookup__status {
  min-height: 1.1rem;
  margin: .45rem 0 0;
  text-align: center;
  font-size: .62rem;
  color: var(--accent-deep);
  font-weight: 700;
}
.lookup__head { display: flex; align-items: center; gap: .55rem; margin-top: .3rem; }
.lookup__avatar { width: 2.4rem; height: 2.4rem; border-radius: 50%; object-fit: cover; background: var(--peach); flex: none; }
.lookup__who { display: flex; flex-direction: column; min-width: 0; }
.lookup__who b { font-size: .8rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lookup__who span { font-size: .55rem; color: var(--muted); }
.lookup__card {
  display: flex;
  gap: .7rem;
  margin-top: .65rem;
  padding: .6rem;
  border-radius: 1rem;
  background: #FFFFFF;
  border: 1.5px solid var(--line);
  box-shadow: 0 8px 20px rgba(96,64,45,.06);
}
.lookup__art { width: 5.2rem; aspect-ratio: 3 / 4; object-fit: cover; border-radius: .7rem; flex: none; background: var(--peach); }
.lookup__main { flex: 1; min-width: 0; }
.lookup__label { font-size: .48rem; letter-spacing: .12em; color: var(--accent-deep); font-weight: 800; }
.lookup__name { margin: .12rem 0 .3rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; }
.lookup__intro { margin: 0; font-size: .62rem; line-height: 1.75; color: var(--ink-soft); }
.lookup__chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.lookup__chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .22rem .5rem;
  border-radius: 999px;
  background: #FFF0F6;
  border: 1px solid var(--line);
  font-size: .56rem;
  color: var(--muted);
}
.lookup__chip i { width: .4rem; height: .4rem; border-radius: 50%; }
.lookup__chip b { color: var(--ink); font-weight: 800; }
.lookup__chip em { font-style: normal; color: var(--accent-deep); font-weight: 700; }


/* 结果专属动态场景 */
.result-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .9s ease;
}
.result-fx.is-on { opacity: 1; }


/* ============================================================
 * 右侧悬浮操作（与 HENTI 相同的位置）
 * ============================================================ */
.side-actions {
  position: absolute;
  top: 50%;
  right: .55rem;
  transform: translateY(-50%);
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: .95rem;
}
.fab {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, .9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(96, 64, 45, .12);
  backdrop-filter: blur(6px);
  transition: transform .15s ease, background .15s ease;
}
.fab:active { transform: scale(.94); background: #FFF0F6; }
.fab svg {
  width: 1.08rem;
  height: 1.08rem;
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fab span {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: .18rem;
  font-size: .44rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
}
.hero__copy { padding-right: 3rem; }
.is-wide .side-actions { right: 3vw; gap: 1.15rem; }
.is-wide .fab { width: 2.9rem; height: 2.9rem; }
.is-wide .fab svg { width: 1.18rem; height: 1.18rem; }
.is-wide .fab span { font-size: .54rem; margin-top: .22rem; }
.is-wide .hero__copy { padding-right: 0; }
