/* ==========================================================
   问号团子 · 每日一签
   设计方向：柔和人文风（Warm Humanist）+ 拼贴印章元素
   概念：一张会开盲盒的和纸签台
   ========================================================== */

:root {
  /* 色彩系统：暖纸底 + 墨棕 + 问号橙主导 + 朱砂印泥红强调 */
  --paper: #FBF6EC;
  --paper-2: #F4EBDB;
  --ink: #3B3229;
  --ink-2: rgb(59 50 41 / .66);
  --ink-3: rgb(59 50 41 / .40);
  --orange: #FF9F4A;
  --orange-soft: #FFDDBC;
  --seal: #E04E39;
  --epic: #9B7EDE;
  --gold: #E8B84B;
  --stage-dark: #1A1410;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgb(59 50 41 / .06), 0 3px 10px rgb(59 50 41 / .05);
  --shadow-lg: 0 2px 4px rgb(59 50 41 / .05), 0 10px 28px rgb(59 50 41 / .10);

  --f-display: "LXGW WenKai Screen", "Kaiti SC", "STKaiti", "KaiTi", serif;
  --f-body: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
html, body { height: 100%; }

body {
  font-family: var(--f-body);
  color: var(--ink);
  background:
    radial-gradient(42rem 30rem at 85% -8%, rgb(255 159 74 / .14), transparent 60%),
    radial-gradient(36rem 26rem at -10% 100%, rgb(224 78 57 / .07), transparent 55%),
    var(--paper);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* 全局纸纹噪点 */
.grain::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .05; z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ 屏幕框架 ============ */
.screen {
  display: none; flex-direction: column;
  width: 100%; height: 100dvh;
  max-width: 480px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 16px) 20px 0;
  position: relative;
}
.screen.active { display: flex; }

/* ============ 主页顶部 ============ */
.home-top { display: flex; justify-content: space-between; align-items: flex-start; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--orange); color: #fff;
  font-family: var(--f-display); font-size: 30px; font-weight: 700;
  display: grid; place-items: center;
  transform: rotate(-4deg);
  box-shadow: var(--shadow-sm);
}
.brand-text h1 { font-family: var(--f-display); font-size: 22px; letter-spacing: .05em; }
.brand-text p { font-size: 11px; color: var(--ink-3); letter-spacing: .12em; margin-top: 2px; }

.pulls-left { display: flex; gap: 6px; padding-top: 6px; }
.pull-dot {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--orange-soft); border: 1.5px solid var(--orange);
  display: grid; place-items: center; font-size: 13px;
  transform: rotate(3deg);
}
.pull-dot:nth-child(2) { transform: rotate(-4deg); }
.pull-dot.used { background: var(--paper-2); border-color: var(--ink-3); opacity: .4; filter: grayscale(1); }
.pull-dot.bonus { border-color: var(--seal); background: #FCE3DD; }

/* ============ 今日签横条 ============ */
.today-strip {
  margin-top: 14px; min-height: 40px;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-size: 14px; color: var(--ink-2);
}
.today-strip .strip-card {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: var(--radius-sm);
  border: 1px dashed rgb(59 50 41 / .25);
  padding: 8px 14px; width: 100%;
  box-shadow: var(--shadow-sm);
  transform: rotate(-.5deg);
  cursor: pointer;
}
.strip-card img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.strip-card .strip-level {
  font-size: 12px; color: #fff; background: var(--seal);
  border-radius: 6px; padding: 2px 7px; font-weight: 700; letter-spacing: .1em;
  flex-shrink: 0;
}
.strip-card .strip-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 盲盒舞台 ============ */
.box-stage {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative;
}
.stage-shelf {
  position: absolute; bottom: 18%; width: 78%; height: 14px;
  background: var(--paper-2); border-radius: 7px;
  box-shadow: 0 3px 0 rgb(59 50 41 / .08);
}
.mystery-box { position: relative; cursor: pointer; z-index: 2; transition: transform .2s; }
.mystery-box:active { transform: scale(.96); }
.mystery-box.disabled { filter: grayscale(.8); opacity: .55; cursor: default; }

.box-body {
  width: min(46vw, 200px); height: min(46vw, 200px);
  background: linear-gradient(160deg, #FFB877, var(--orange) 55%, #F08A2E);
  border-radius: 26px; position: relative;
  box-shadow: var(--shadow-lg), inset 0 2px 0 rgb(255 255 255 / .35);
  animation: boxIdle 3.2s ease-in-out infinite;
}
@keyframes boxIdle {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}
.box-lid {
  position: absolute; top: -12px; left: -4%; width: 108%; height: 34px;
  background: linear-gradient(160deg, #FFC894, #F79A44);
  border-radius: 14px;
  box-shadow: 0 3px 6px rgb(59 50 41 / .12);
}
.box-q {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-display); font-size: min(24vw, 104px); color: #fff; font-weight: 700;
  text-shadow: 0 4px 0 rgb(59 50 41 / .12);
}
.box-tape {
  position: absolute; top: 46%; left: -10px; width: calc(100% + 20px); height: 26px;
  background: rgb(251 246 236 / .5); transform: rotate(-3deg);
  border-left: 2px dashed rgb(255 255 255 / .6);
  border-right: 2px dashed rgb(255 255 255 / .6);
}
.box-shadow {
  width: 60%; height: 16px; margin: 10px auto 0;
  background: radial-gradient(closest-side, rgb(59 50 41 / .18), transparent);
  border-radius: 50%;
}
.stage-hint {
  margin-top: 26px; font-family: var(--f-display);
  font-size: 16px; color: var(--ink-2); letter-spacing: .08em;
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse { 50% { opacity: .5; } }

/* ============ 保底进度 ============ */
.pity-bar { padding: 0 4px 12px; display: flex; flex-direction: column; gap: 7px; }
.pity-row { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.pity-label { width: 52px; color: var(--ink-3); letter-spacing: .1em; flex-shrink: 0; }
.pity-label.gold { color: #B8860B; }
.pity-track { flex: 1; height: 7px; background: var(--paper-2); border-radius: 4px; overflow: hidden; }
.pity-fill { height: 100%; background: var(--orange); border-radius: 4px; transition: width .5s cubic-bezier(.22,1,.36,1); }
.pity-fill.gold { background: linear-gradient(90deg, var(--gold), #F5D57A); }
.pity-num { width: 44px; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ============ 底部导航 ============ */
.bottom-nav {
  display: flex; gap: 8px;
  padding: 10px 0 calc(env(safe-area-inset-bottom) + 12px);
}
.nav-btn {
  flex: 1; border: none; background: transparent;
  font-family: var(--f-body); font-size: 12px; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0; border-radius: var(--radius-sm); cursor: pointer;
  transition: all .2s;
}
.nav-btn .nav-ico { font-size: 20px; filter: grayscale(1) opacity(.5); }
.nav-btn.active { color: var(--seal); background: #fff; box-shadow: var(--shadow-sm); }
.nav-btn.active .nav-ico { filter: none; }

/* ============ 通用按钮 ============ */
.btn {
  font-family: var(--f-body); font-size: 15px; font-weight: 500;
  border: none; border-radius: 999px; padding: 13px 28px;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
  letter-spacing: .04em;
}
.btn:active { transform: scale(.96); }
.btn.primary {
  background: var(--seal); color: #fff;
  box-shadow: 0 4px 14px rgb(224 78 57 / .32);
}
.btn.ghost {
  background: #fff; color: var(--ink);
  border: 1.5px solid rgb(59 50 41 / .15);
}
.btn.ghost.light { background: rgb(255 255 255 / .12); color: #fff; border-color: rgb(255 255 255 / .3); }
.btn.text-btn { background: none; color: var(--ink-3); font-size: 13px; }

/* ============ 拆盒演出 ============ */
.ceremony {
  position: fixed; inset: 0; z-index: 100;
  background: var(--stage-dark);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: background .8s;
}
.ceremony.hidden { display: none; }
.ceremony .act {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 24px; z-index: 2;
}
.ceremony .act.hidden { display: none; }
#fxCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.ceremony-skip {
  position: absolute; bottom: calc(env(safe-area-inset-bottom) + 14px); left: 0; right: 0;
  text-align: center; font-size: 11px; color: rgb(255 255 255 / .35);
  z-index: 3; letter-spacing: .1em;
}

/* 幕零：许愿 */
.wish-title { font-family: var(--f-display); font-size: 24px; color: #F5EBDD; letter-spacing: .1em; }
.wish-options { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 320px; }
.wish-chip {
  font-family: var(--f-display); font-size: 16px;
  background: rgb(255 255 255 / .08); color: #F5EBDD;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 999px; padding: 11px 22px; cursor: pointer;
  transition: all .2s;
}
.wish-chip:active, .wish-chip.picked {
  background: var(--seal); border-color: var(--seal); transform: scale(1.05);
}
.wish-custom {
  display: flex; gap: 10px; margin-top: 20px; width: min(320px, 82vw);
}
.wish-custom input {
  flex: 1; min-width: 0;
  font-family: var(--f-display); font-size: 15px;
  background: rgb(255 255 255 / .08); color: #F5EBDD;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 999px; padding: 11px 18px; outline: none;
}
.wish-custom input::placeholder { color: rgb(245 235 221 / .38); }
.wish-custom input:focus { border-color: var(--seal); }
.wish-custom .btn { padding: 11px 20px; white-space: nowrap; }
.wish-custom-hint { font-size: 12px; color: rgb(245 235 221 / .45); margin-top: 10px; }

/* 幕一：摇盒 */
.act-tip { font-family: var(--f-display); font-size: 17px; color: rgb(245 235 221 / .8); letter-spacing: .08em; }
.c-box { touch-action: none; cursor: grab; position: relative; }
.c-box:active { cursor: grabbing; }
.c-box-body {
  width: min(56vw, 240px); height: min(56vw, 240px);
  background: linear-gradient(160deg, #FFB877, var(--orange) 55%, #F08A2E);
  border-radius: 30px; position: relative;
  box-shadow: 0 18px 50px rgb(0 0 0 / .5), inset 0 2px 0 rgb(255 255 255 / .35);
}
.c-box-lid {
  position: absolute; top: -14px; left: -4%; width: 108%; height: 40px;
  background: linear-gradient(160deg, #FFC894, #F79A44);
  border-radius: 16px; transition: transform .3s;
}
.c-box-q {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-display); font-size: min(30vw, 128px); color: #fff; font-weight: 700;
  text-shadow: 0 5px 0 rgb(59 50 41 / .15);
}
.peek-ahoge {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%) scale(0);
  font-family: var(--f-display); font-size: 34px; font-weight: 700; color: var(--orange);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.peek-ahoge.show { transform: translateX(-50%) scale(1); }
.shake-hint-msg {
  min-height: 24px; font-family: var(--f-display); font-size: 15px;
  color: var(--gold); letter-spacing: .05em; text-align: center;
}

/* 幕二：悬念光柱（盒子留场，光从盒口射出） */
.ceremony .act-suspense { justify-content: flex-end; }
.suspense-stage {
  position: relative; width: 220px;
  margin-bottom: 14vh;
  display: flex; justify-content: center;
}
.s-box {
  width: min(44vw, 180px); height: min(40vw, 160px);
  background: linear-gradient(160deg, #FFB877, var(--orange) 55%, #F08A2E);
  border-radius: 24px; position: relative; z-index: 3;
  box-shadow: 0 18px 50px rgb(0 0 0 / .55), inset 0 2px 0 rgb(255 255 255 / .35);
  animation: boxTremble .45s ease-in-out;
}
@keyframes boxTremble {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px) rotate(-1.5deg); }
  40% { transform: translateX(5px) rotate(1.5deg); }
  60% { transform: translateX(-4px) rotate(-1deg); }
  80% { transform: translateX(4px) rotate(1deg); }
}
.s-q {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-display); font-size: min(22vw, 88px); color: #fff; font-weight: 700;
  text-shadow: 0 4px 0 rgb(59 50 41 / .15);
}
.s-lid {
  position: absolute; top: -12px; left: -4%; width: 108%; height: 32px;
  background: linear-gradient(160deg, #FFC894, #F79A44);
  border-radius: 14px; z-index: 4;
  transition: transform .55s cubic-bezier(.34,1.2,.64,1), opacity .35s;
}
.s-lid.fly { transform: translateY(-150px) rotate(-28deg) scale(.9); opacity: 0; }
.light-beam {
  position: absolute; bottom: 60px; left: 50%; z-index: 2;
  width: min(52vw, 210px); height: 82vh;
  transform: translateX(-50%) scaleY(0); transform-origin: bottom;
  transition: transform .8s cubic-bezier(.22,1,.36,1);
  background: linear-gradient(to top, rgb(255 243 205 / .92), rgb(255 243 205 / 0) 82%);
  clip-path: polygon(40% 100%, 60% 100%, 94% 0, 6% 0);
  filter: blur(1px);
  pointer-events: none;
}
.light-beam.rise { transform: translateX(-50%) scaleY(1); }
.beam-core {
  position: absolute; bottom: 0; top: 0; left: 50%; width: 40px;
  transform: translateX(-50%);
  background: linear-gradient(to top, rgb(255 255 255 / .95), rgb(255 255 255 / 0) 70%);
  filter: blur(4px);
}
.light-beam.rare { background: linear-gradient(to top, rgb(126 200 227 / .9), rgb(126 200 227 / 0) 82%); }
.light-beam.epic { background: linear-gradient(to top, rgb(155 126 222 / .9), rgb(155 126 222 / 0) 82%); }
.light-beam.hidden-r {
  background: linear-gradient(to top, rgb(245 197 66 / .95), rgb(245 197 66 / 0) 85%);
  width: min(64vw, 260px);
  clip-path: polygon(38% 100%, 62% 100%, 100% 0, 0 0);
}
.mouth-glow {
  position: absolute; bottom: 40px; left: 50%; z-index: 5;
  width: 230px; height: 80px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(255 240 200 / .95), transparent 70%);
  filter: blur(5px);
  opacity: 0; transition: opacity .5s;
  pointer-events: none;
}
.mouth-glow.on { opacity: 1; }

/* 幕三+四：签文卡 */
.act-reveal { gap: 16px; }
.fortune-card {
  width: min(88vw, 360px);
  perspective: 800px;
  animation: cardIn .7s cubic-bezier(.34,1.4,.64,1);
}
@keyframes cardIn {
  from { transform: translateY(60px) scale(.7); opacity: 0; }
}
.card-inner {
  background: var(--paper);
  border-radius: 18px;
  padding: 22px 22px 16px;
  position: relative;
  box-shadow: 0 24px 70px rgb(0 0 0 / .55);
  border: 1px solid rgb(59 50 41 / .1);
  background-image: repeating-linear-gradient(0deg, transparent, transparent 27px, rgb(59 50 41 / .035) 28px);
}
.card-inner::before {
  content: ""; position: absolute; inset: 7px;
  border: 1px dashed rgb(59 50 41 / .22);
  border-radius: 12px; pointer-events: none;
}
.card-level {
  font-family: var(--f-display); font-size: 44px; font-weight: 700;
  text-align: center; letter-spacing: .18em; color: var(--seal);
  margin-bottom: 4px;
}
.card-level.rare { color: #4A90B8; }
.card-level.epic { color: var(--epic); }
.card-level.hidden-r {
  background: linear-gradient(120deg, #B8860B, var(--gold), #B8860B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.card-doll { text-align: center; }
.card-doll img {
  width: 172px; height: 172px; object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.card-stamp {
  position: relative; text-align: center; margin-top: -22px; z-index: 2;
}
.card-stamp span {
  display: inline-block;
  font-family: var(--f-display); font-size: 19px; font-weight: 700;
  color: #fff; background: var(--seal);
  padding: 5px 16px; border-radius: 8px;
  transform: rotate(-2.5deg);
  box-shadow: 0 3px 10px rgb(224 78 57 / .4);
  letter-spacing: .06em;
}
.card-stamp.stamped span { animation: stampIn .35s cubic-bezier(.34,1.8,.64,1); }
@keyframes stampIn {
  0% { transform: rotate(-2.5deg) scale(2.4); opacity: 0; }
  60% { transform: rotate(-2.5deg) scale(.92); opacity: 1; }
}
.card-theme {
  text-align: center; margin-top: 8px;
  font-family: var(--f-display); font-size: 14px; color: var(--ink-2);
  letter-spacing: .3em;
}
.card-divider { height: 1px; background: rgb(59 50 41 / .12); margin: 12px 8px; }
.card-yi-ji { display: flex; flex-direction: column; gap: 7px; padding: 0 6px; }
.yi, .ji { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.yj-tag {
  font-family: var(--f-display); font-weight: 700; font-size: 15px;
  color: #fff; background: #6B9B6E; border-radius: 6px;
  padding: 1px 8px; flex-shrink: 0;
}
.ji-tag { background: #B06A5B; }
.card-quote {
  margin: 12px 8px 0; padding: 10px 12px;
  font-family: var(--f-display); font-size: 15px; line-height: 1.7;
  color: var(--ink); background: rgb(255 159 74 / .1);
  border-left: 3px solid var(--orange); border-radius: 0 8px 8px 0;
}
.card-wish-reply {
  margin: 8px 8px 0; font-family: var(--f-display);
  font-size: 13px; color: var(--seal); line-height: 1.6;
}
.card-wish-reply::before { content: "🙏 "; }
.card-meta {
  display: flex; justify-content: space-between; margin-top: 14px; padding: 0 6px;
  font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em;
}
.card-new-badge {
  position: absolute; top: -10px; right: -8px;
  background: var(--gold); color: #5B4508;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  padding: 5px 12px; border-radius: 999px;
  transform: rotate(6deg);
  box-shadow: var(--shadow-sm);
}
.reveal-actions { display: flex; gap: 10px; z-index: 3; }
.reveal-actions .btn { padding: 12px 20px; font-size: 14px; }

/* 隐藏款金卡 */
.fortune-card.golden .card-inner {
  background: linear-gradient(150deg, #FFF8E3, #F9E9BC);
  border: 1px solid var(--gold);
  box-shadow: 0 0 60px rgb(245 197 66 / .5), 0 24px 70px rgb(0 0 0 / .55);
}

/* ============ 图鉴 ============ */
.page-head { padding: 8px 0 14px; }
.page-head h2 { font-family: var(--f-display); font-size: 24px; letter-spacing: .08em; }
.dex-progress { margin-top: 6px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dex-grid {
  flex: 1; overflow-y: auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  align-content: start; padding-bottom: 12px;
}
.dex-cell {
  background: #fff; border-radius: var(--radius-sm);
  padding: 10px 8px 8px; text-align: center;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .15s;
  position: relative;
}
.dex-cell:active { transform: scale(.95); }
.dex-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; }
.dex-cell.locked img { filter: brightness(0) opacity(.13); }
.dex-cell .dex-name {
  margin-top: 6px; font-size: 11px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dex-cell.locked .dex-name { color: var(--ink-3); }
.dex-cell .dex-limited {
  position: absolute; top: 5px; left: 5px;
  font-size: 9px; background: var(--seal); color: #fff;
  border-radius: 999px; padding: 1px 7px; font-weight: 700; letter-spacing: .04em;
}
.dex-cell .dex-count {
  position: absolute; top: 5px; right: 5px;
  font-size: 10px; background: var(--orange); color: #fff;
  border-radius: 999px; padding: 1px 7px; font-weight: 700;
}
.dex-cell.r-rare { border: 1.5px solid #A8CFE0; }
.dex-cell.r-epic { border: 1.5px solid #C9B8EE; }
.dex-cell.r-hidden { border: 1.5px solid var(--gold); background: linear-gradient(150deg, #fff, #FBF2D9); }

/* ============ 设置页 ============ */
.about-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.about-card {
  background: #fff; border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-sm);
}
.about-card h3 { font-family: var(--f-display); font-size: 16px; margin-bottom: 12px; }
.about-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.about-actions .btn { padding: 10px 18px; font-size: 13px; }
.rates-text { font-size: 13px; color: var(--ink-2); line-height: 1.9; }
.disclaimer { text-align: center; font-size: 11px; color: var(--ink-3); padding: 8px 0 20px; }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.modal.hidden { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgb(26 20 16 / .6); backdrop-filter: blur(3px); }
.modal-body {
  position: relative; z-index: 1;
  background: var(--paper); border-radius: var(--radius);
  padding: 22px; width: min(88vw, 380px);
  max-height: 84dvh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .3s cubic-bezier(.34,1.3,.64,1);
}
@keyframes modalIn { from { transform: translateY(30px) scale(.94); opacity: 0; } }

.modal-close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: var(--paper-2); color: var(--ink-2);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.detail-body { text-align: center; }
.detail-body img { width: 150px; height: 150px; border-radius: 16px; object-fit: cover; }
.detail-body h3 { font-family: var(--f-display); font-size: 21px; margin-top: 10px; }
.detail-body .d-theme { font-size: 13px; color: var(--ink-3); margin-top: 4px; letter-spacing: .2em; }
.detail-body .d-intro {
  font-family: var(--f-display); font-size: 14px; color: var(--ink-2);
  line-height: 1.8; margin-top: 12px; padding: 0 8px;
}
.detail-body .d-meta {
  display: flex; justify-content: center; gap: 16px; margin-top: 14px;
  font-size: 11px; color: var(--ink-3);
}
.detail-body .d-quotes { margin-top: 12px; text-align: left; }
.detail-body .d-quotes p {
  font-family: var(--f-display); font-size: 12.5px; color: var(--ink-2);
  padding: 6px 10px; background: rgb(255 159 74 / .08);
  border-radius: 8px; margin-top: 6px; line-height: 1.6;
}

.share-body { padding: 14px; }
#shareImg {
  width: 100%; border-radius: 12px; box-shadow: var(--shadow-sm); display: block;
  /* 允许微信长按图片弹出保存/发送菜单 */
  -webkit-touch-callout: default;
  -webkit-user-select: auto; user-select: auto;
}
.share-wechat-hint {
  text-align: center; margin-top: 12px;
  font-family: var(--f-display); font-size: 14px; color: var(--seal);
  letter-spacing: .05em;
}
.share-actions { display: flex; gap: 10px; margin-top: 14px; }
.share-actions .btn { flex: 1; }

/* ============ toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 15%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  font-size: 14px; padding: 11px 22px; border-radius: 999px;
  z-index: 300; box-shadow: var(--shadow-lg);
  animation: toastIn .3s;
  max-width: 80vw; text-align: center;
}
@keyframes toastIn { from { transform: translate(-50%, 16px); opacity: 0; } }
.toast.hidden { display: none; }

/* ============ 三选一 ============ */
.pick-row { display: flex; gap: 18px; margin: 10px 0; }
.pick-box {
  position: relative; width: 88px; height: 88px;
  background: linear-gradient(160deg, #FFB877, var(--orange) 55%, #F08A2E);
  border: none; border-radius: 20px; cursor: pointer;
  box-shadow: 0 12px 30px rgb(0 0 0 / .45), inset 0 2px 0 rgb(255 255 255 / .35);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), opacity .5s;
  animation: pickBob 2.6s ease-in-out infinite;
}
.pick-box:nth-child(2) { animation-delay: -.9s; }
.pick-box:nth-child(3) { animation-delay: -1.8s; }
@keyframes pickBob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}
.pick-q {
  font-family: var(--f-display); font-size: 40px; font-weight: 700;
  color: rgb(255 255 255 / .95); text-shadow: 0 2px 4px rgb(0 0 0 / .15);
}
.pick-tape {
  position: absolute; top: -6px; left: calc(50% + var(--tapex, 0%));
  width: 34px; height: 16px; margin-left: -17px;
  background: rgb(245 235 221 / .8); border-radius: 3px;
  transform: rotate(-3deg);
}
.pick-box.chosen {
  transform: scale(1.22) rotate(0deg); z-index: 2;
  animation: none;
}
.pick-box.away { opacity: 0; transform: scale(.6) translateY(30px); pointer-events: none; animation: none; }
.pick-sub { font-family: var(--f-display); font-size: 13px; color: rgb(245 235 221 / .55); letter-spacing: .08em; }

/* ============ 连签 ============ */
.home-top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.streak-chip {
  font-family: var(--f-display); font-size: 12px; font-weight: 700;
  color: var(--seal);
  background: rgb(224 78 57 / .1);
  border: 1px dashed rgb(224 78 57 / .4);
  border-radius: 999px; padding: 3px 10px;
  cursor: pointer;
}
.streak-banner {
  font-family: var(--f-display); font-size: 14px; font-weight: 700;
  color: #FFE9B3;
  background: rgb(245 197 66 / .14);
  border: 1px dashed rgb(245 197 66 / .5);
  border-radius: 999px; padding: 8px 18px;
  margin-bottom: 4px; z-index: 3;
  animation: toastIn .4s;
}

/* ============ 羁绊 ============ */
.card-bond {
  font-family: var(--f-display); font-size: 14px; line-height: 1.6;
  color: var(--seal);
  background: rgb(224 78 57 / .07);
  border-radius: var(--radius-sm);
  padding: 10px 14px; margin-top: 10px;
  text-align: left;
}
.bond-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: #fff; background: var(--seal);
  border-radius: 999px; padding: 1px 9px; margin-right: 8px;
  vertical-align: 2px;
}
.d-bonds { margin-top: 14px; text-align: left; }
.d-bonds-title {
  font-family: var(--f-display); font-size: 13px; font-weight: 700;
  color: var(--ink-2); letter-spacing: .08em; margin-bottom: 6px;
}
.d-bond {
  font-family: var(--f-display); font-size: 13px; line-height: 1.7;
  color: var(--ink-3); padding: 4px 0;
}
.d-bond.on { color: var(--seal); }
.d-bond-need { font-size: 11px; color: var(--ink-3); margin-left: 8px; }
.d-bond-lock { letter-spacing: .04em; }

/* ============ 送 TA 一签 ============ */
.gift-btn {
  width: 100%; margin-top: 10px;
  font-family: var(--f-display); font-weight: 700;
  background: rgb(224 78 57 / .08); color: var(--seal);
  border: 1.5px dashed rgb(224 78 57 / .5);
  border-radius: 14px; padding: 12px;
  cursor: pointer;
}
.gift-wrap { text-align: center; }
.gift-title {
  font-family: var(--f-display); font-size: 22px; font-weight: 700;
  color: var(--ink); letter-spacing: .06em; margin-bottom: 18px;
}
.gift-stage { display: flex; flex-direction: column; align-items: center; }
.gift-box {
  position: relative; width: 150px; height: 150px;
  background: linear-gradient(160deg, #FFB877, var(--orange) 55%, #F08A2E);
  border-radius: 26px; display: grid; place-items: center;
  box-shadow: var(--shadow-lg);
  animation: pickBob 2.4s ease-in-out infinite;
  margin-bottom: 16px;
}
.gift-q {
  font-family: var(--f-display); font-size: 64px; font-weight: 700;
  color: rgb(255 255 255 / .95);
}
.gift-ribbon {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 64px; height: 20px;
  background: var(--seal); border-radius: 4px;
}
.gift-ribbon::after {
  content: "赠"; color: #fff; font-size: 13px; font-weight: 700;
  display: grid; place-items: center; height: 100%;
  font-family: var(--f-display);
}
.gift-sub { font-family: var(--f-display); font-size: 14px; color: var(--ink-2); margin-bottom: 18px; }
.gift-reveal { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gift-card {
  background: #fff; border-radius: var(--radius);
  padding: 22px 26px; box-shadow: var(--shadow-sm);
  border: 1px dashed rgb(59 50 41 / .2);
}
.gift-from { font-family: var(--f-display); font-size: 12px; color: var(--ink-3); letter-spacing: .1em; margin-bottom: 12px; }
.gift-card img { width: 130px; height: 130px; border-radius: 18px; object-fit: cover; }
.gift-card h3 { font-family: var(--f-display); font-size: 22px; margin: 10px 0 2px; }
.gift-level { font-family: var(--f-display); font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.gift-yj { text-align: left; font-size: 14px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.gift-quote { font-family: var(--f-display); font-size: 14px; color: var(--seal); }

/* 桌面端适配 */
@media (min-width: 520px) {
  body { display: grid; place-items: center; }
  .screen {
    height: min(92dvh, 880px);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    background: rgb(255 255 255 / .35);
  }
}
