/* ============================================================
   小宝和哥哥 · 温柔浪漫主题
   ============================================================ */
:root {
  --bg1: #FFF7EF;
  --bg2: #FDEFF2;
  --ink: #5B4636;
  --ink2: #96816F;
  --rose: #C98A8E;
  --rose-deep: #B96A70;
  --gold: #D9B38C;
  --card: rgba(255, 255, 255, 0.86);
  --line: #F1E3D9;
  --serif: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 500px at 15% -10%, #FBE3E6 0%, transparent 60%),
    radial-gradient(900px 500px at 95% 15%, #FBE9D8 0%, transparent 55%),
    linear-gradient(160deg, var(--bg1) 0%, var(--bg2) 100%) fixed;
  min-height: 100vh;
  line-height: 1.7;
}
button { font-family: inherit; color: inherit; border: none; background: none; cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }

/* 全屏特效层 */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- 通用 ---------- */
.wrap { max-width: 440px; margin: 0 auto; padding: 20px 18px 40px; }
.page-in { animation: pageIn .5s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-block;
  background: linear-gradient(135deg, #E7A6AC, var(--rose-deep));
  color: #fff;
  padding: 10px 26px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 1px;
  box-shadow: 0 6px 18px rgba(185, 106, 112, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(0.96); }
.btn.big { padding: 14px 34px; font-size: 16px; }

.hint { color: var(--ink2); font-size: 13.5px; text-align: center; }
.back {
  display: inline-block; color: var(--ink2); font-size: 14px;
  padding: 6px 10px; margin-bottom: 8px; border-radius: 10px;
}
.back:active { background: rgba(0,0,0,0.04); }
.page-title { font-family: var(--serif); font-size: 24px; margin: 8px 0 4px; }
.page-end { height: 30px; }

/* ---------- 首页 ---------- */
.hero { text-align: center; padding: 26px 0 10px; }
.avatars { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 14px; }
.avatar {
  width: 74px; height: 74px; border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(201, 138, 142, 0.35);
  overflow: hidden; background: #FBE3E6;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.me { background: #FFF3E2; }
.amp { font-family: var(--serif); font-size: 26px; color: var(--rose); }
.hero h1 { font-family: var(--serif); font-size: 27px; letter-spacing: 2px; }
.amp-txt { color: var(--rose); font-size: 20px; margin: 0 4px; }
.hero-sub { color: var(--ink2); font-size: 13.5px; margin-top: 8px; letter-spacing: 1px; }

.bd-card {
  margin: 22px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 14px 34px rgba(201, 138, 142, 0.14);
}
.bd-card.today { border-color: #F3C9CC; }
.bd-fire { font-size: 40px; margin-bottom: 6px; }
.bd-label { color: var(--ink2); font-size: 14px; letter-spacing: 2px; }
.bd-count {
  font-family: var(--serif);
  font-size: 64px; line-height: 1.15;
  color: var(--rose-deep);
  font-weight: 700;
}
.bd-count small { font-size: 20px; margin-left: 6px; color: var(--ink2); font-weight: 400; }
.bd-sub { color: var(--ink2); font-size: 13px; margin-top: 6px; letter-spacing: 1px; }
.bd-card .btn { margin-top: 16px; }
.bd-lock { color: var(--ink2); font-size: 13px; margin-top: 14px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.g-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 12px 16px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(201, 138, 142, 0.10);
  transition: transform .15s ease;
}
.g-card:active { transform: scale(0.97); }
.g-icon { font-size: 30px; display: block; margin-bottom: 6px; }
.g-label { font-size: 15px; letter-spacing: 2px; }
.g-lock { position: absolute; top: 10px; right: 12px; font-size: 13px; opacity: 0.7; }

.foot { text-align: center; margin-top: 34px; color: var(--ink2); font-size: 13px; }
.foot-tiny { font-size: 11.5px; opacity: 0.75; margin-top: 4px; }

/* ---------- 全屏生日流程 ---------- */
.flow {
  position: fixed; inset: 0; z-index: 30;
  background:
    radial-gradient(900px 420px at 20% -8%, #FBE3E6 0%, transparent 60%),
    radial-gradient(800px 420px at 92% 12%, #FBE9D8 0%, transparent 55%),
    linear-gradient(165deg, #FFF9F1 0%, #FDEFF2 100%);
}
.scene {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 30px 22px 46px;
  max-width: 460px;
  margin: 0 auto;
}
.scene-in { animation: sceneIn .55s ease both; }
@keyframes sceneIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.scene-title {
  font-family: var(--serif); font-size: 22px; text-align: center;
  letter-spacing: 2px; margin-bottom: 8px;
}

/* 信纸卡片 */
.letter-card {
  background: #FFFDF8;
  border: 1px solid #F3E7DA;
  border-radius: 20px;
  padding: 30px 24px;
  margin: 24px auto;
  max-width: 380px;
  box-shadow: 0 16px 40px rgba(201, 138, 142, 0.16);
  font-family: var(--serif);
  font-size: 16.5px;
}
.letter-card.center { text-align: center; }
.letter-card h3 { font-size: 18px; margin-bottom: 12px; letter-spacing: 1px; }
.envelope { font-size: 52px; margin-bottom: 10px; animation: floaty 2.6s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.l-line { margin: 10px 0; opacity: 0; }
.l-line.rise, .l-sign.rise, .btn.rise, .rise { animation: riseIn .7s ease both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.l-sign { text-align: right; color: var(--rose-deep); margin-top: 18px; opacity: 0; }
.letter-card .btn { display: block; margin: 20px auto 0; }

/* ---------- 蛋糕 ---------- */
.cake-wrap { position: relative; width: 250px; margin: 34px auto 30px; text-align: center; }
.candles { display: flex; justify-content: center; gap: 6px; position: relative; z-index: 2; margin-bottom: -4px; }
.candle { position: relative; width: 30px; height: 44px; cursor: pointer; }
.candle .stick {
  width: 12px; height: 40px; margin: 4px auto 0; border-radius: 5px;
  background: repeating-linear-gradient(45deg, #F8B7C0 0 5px, #FFF6F0 5px 10px);
  box-shadow: inset -2px 0 3px rgba(0,0,0,0.08);
}
.candle .flame {
  position: absolute; top: -20px; left: 50%;
  width: 13px; height: 20px;
  transform: translateX(-50%) scale(0.3);
  background: radial-gradient(circle at 50% 72%, #FFF7C0 0%, #FFC24D 55%, #FF8A3C 100%);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  transform-origin: 50% 100%;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  filter: drop-shadow(0 0 6px rgba(255, 180, 80, 0.75));
}
.candle.lit .flame { opacity: 1; transform: translateX(-50%) scale(1); animation: flick .16s ease-in-out infinite alternate; }
@keyframes flick {
  from { transform: translateX(-50%) scale(1) rotate(-2.5deg); }
  to   { transform: translateX(-50%) scale(1.08) rotate(2.5deg); }
}
.candle.out .flame { opacity: 0; transform: translateX(-50%) scale(2.4); transition: all .35s ease-out; animation: none; }
.candle .smoke {
  position: absolute; top: -26px; left: 50%;
  width: 10px; height: 14px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(150,140,135,0.55), transparent 70%);
  opacity: 0;
  filter: blur(2px);
}
.candle.out .smoke { animation: smokeUp 1.4s ease-out forwards; }
@keyframes smokeUp {
  0% { opacity: 0.9; transform: translateX(-50%) translateY(0) scale(0.7); }
  100% { opacity: 0; transform: translateX(-58%) translateY(-34px) scale(1.7); }
}
.tier { position: relative; margin: 0 auto; border-radius: 14px 14px 9px 9px; z-index: 1; }
.tier.t1 {
  width: 150px; height: 52px;
  background: linear-gradient(#FFEDE0, #FFE2CE);
  box-shadow: inset 0 -8px 12px rgba(216, 166, 128, 0.25);
}
.tier.t1::after {
  content: ""; position: absolute; left: 10px; top: -4px; right: 10px; height: 14px;
  background: radial-gradient(circle at 8px 8px, #FFF8F0 7px, transparent 8px) repeat-x;
  background-size: 24px 16px;
}
.tier.t2 {
  width: 192px; height: 58px; margin-top: -6px;
  background: linear-gradient(#FBDCC8, #F7CDB4);
  background-image:
    radial-gradient(circle at 12px 12px, #F2A9B4 5px, transparent 6px),
    linear-gradient(#FBDCC8, #F7CDB4);
  background-size: 46px 30px, 100% 100%;
}
.tier.t3 {
  width: 234px; height: 62px; margin-top: -6px;
  background: linear-gradient(#F6D0BA, #EFC0A4);
  box-shadow: 0 14px 26px rgba(196, 141, 106, 0.28);
}
.plate {
  width: 264px; height: 26px; margin: -8px auto 0;
  border-radius: 50%;
  background: linear-gradient(#FFFFFF, #EFE4DC);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

/* 吹气按钮 */
.blow-btn {
  position: relative;
  width: 104px; height: 104px;
  margin: 6px auto 0;
  display: block;
  border-radius: 50%;
  background: #FFFDF8;
  box-shadow: 0 10px 26px rgba(201, 138, 142, 0.35);
  font-size: 15px; line-height: 1.3;
  color: var(--rose-deep);
  letter-spacing: 1px;
  user-select: none;
  touch-action: none;
}
.blow-btn svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.blow-btn .ring-bg { fill: none; stroke: #F3E1D8; stroke-width: 5; }
.blow-btn .ring { fill: none; stroke: var(--rose-deep); stroke-width: 5; stroke-linecap: round; }
.blow-btn span { position: relative; top: 8px; }

.after-blow { text-align: center; margin-top: 26px; animation: riseIn .8s ease both; }
.hb-title {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: 3px;
  background: linear-gradient(120deg, #C98A8E, #D9A06B 60%, #C98A8E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.hb-sub { color: var(--ink2); margin-bottom: 18px; letter-spacing: 2px; }

/* ---------- 电话 ---------- */
.phone-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  margin: 20px auto;
  max-width: 340px;
  box-shadow: 0 14px 34px rgba(201, 138, 142, 0.14);
}
.phone-display {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 6px 0 18px;
  font-family: var(--serif); font-size: 26px; letter-spacing: 2px;
}
.pfx {
  background: #F7E9DF; color: var(--ink);
  padding: 4px 12px; border-radius: 12px; font-size: 22px;
}
.slot {
  width: 44px; height: 44px;
  border-bottom: 2px solid #E4CFC2;
  display: flex; align-items: center; justify-content: center;
  color: var(--rose-deep); font-size: 24px;
  transition: border-color .2s;
}
.slot.filled { border-color: var(--rose); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key {
  height: 54px; border-radius: 16px;
  background: #FFFDF8; font-size: 20px;
  border: 1px solid #F3E7DA;
  box-shadow: 0 3px 8px rgba(201, 138, 142, 0.12);
}
.key:active { transform: scale(0.95); }
.key.ghost { color: var(--ink2); }
.key.call {
  background: linear-gradient(135deg, #E7A6AC, var(--rose-deep));
  color: #fff; font-size: 16px; letter-spacing: 2px;
  border: none;
}
.key.call:disabled { opacity: 0.45; }
.dial-msg { text-align: center; color: var(--ink2); font-size: 14px; min-height: 24px; margin-top: 14px; }

/* ---------- 时光轴（S 型：左右交错 + 中轴） ---------- */
.timeline { position: relative; padding: 8px 0 4px; margin-top: 18px; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(#F2C6C9, #E9D3B8);
  border-radius: 2px;
}
.tl-item { position: relative; margin-bottom: 26px; width: 50%; }
.tl-item:nth-child(odd) { padding-right: 16px; }
.tl-item:nth-child(even) { margin-left: 50%; padding-left: 16px; }
.tl-dot {
  position: absolute; top: 24px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--rose);
  box-shadow: 0 0 0 3px rgba(201, 138, 142, 0.15);
  z-index: 1;
}
.tl-item:nth-child(odd) .tl-dot { right: 0; transform: translateX(50%); }
.tl-item:nth-child(even) .tl-dot { left: 0; transform: translateX(-50%); }
.tl-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 8px 22px rgba(201, 138, 142, 0.10);
  transition: transform .3s ease;
}
/* 轻微的一左一右倾斜，让 S 型更俏皮 */
.tl-item:nth-child(odd) .tl-card { transform: rotate(-0.9deg); }
.tl-item:nth-child(even) .tl-card { transform: rotate(0.9deg); }
.tl-card.dashed { border-style: dashed; background: rgba(255, 253, 248, 0.6); text-align: center; padding: 18px 12px; }
.tl-media { border-radius: 12px; overflow: hidden; }
.tl-media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; cursor: zoom-in; }
.tl-media video { width: 100%; display: block; border-radius: 12px; }
.tl-caption { font-family: var(--serif); font-size: 15.5px; margin: 10px 4px 2px; }
.tl-no { color: var(--ink2); font-size: 11.5px; margin: 0 4px 2px; letter-spacing: 1px; }
.tl-more { font-family: var(--serif); font-size: 17px; color: var(--rose-deep); letter-spacing: 2px; }

/* ---------- 祝福墙 ---------- */
.bless-list { max-width: 380px; margin: 20px auto; }
.bless-card {
  background: #FFFDF8;
  border: 1px solid #F3E7DA;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
  font-family: var(--serif); font-size: 15.5px;
  box-shadow: 0 10px 26px rgba(201, 138, 142, 0.12);
  transform: rotate(-0.6deg);
}
.bless-card:nth-child(2n) { transform: rotate(0.7deg); }
.bless-card.dashed { border-style: dashed; color: var(--ink2); font-size: 13.5px; }
.bless-from { text-align: right; color: var(--rose-deep); margin-top: 10px; font-size: 13.5px; }

/* ---------- 愿望清单 ---------- */
.wish-progress { color: var(--ink2); font-size: 13px; margin: 10px 2px; }
.wish-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.wish {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  text-align: left;
  transition: background .2s;
}
.wish.ok { background: rgba(252, 240, 226, 0.9); color: var(--ink2); }
.wish.ok span:last-child { text-decoration: line-through; text-decoration-color: var(--rose); }
.wish-box {
  flex: 0 0 24px; width: 24px; height: 24px;
  border: 2px solid var(--rose);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--rose-deep); font-size: 14px;
  background: #fff;
}
.wish-add { display: flex; gap: 10px; margin-top: 16px; }
.wish-add input {
  flex: 1;
  border: 1.5px solid #E9D5C8;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  background: #FFFDF8;
  color: var(--ink);
  outline: none;
}
.wish-add input:focus { border-color: var(--rose); }

/* ---------- 信箱 ---------- */
.mail-envelope { text-align: center; font-size: 64px; margin: 30px 0 14px; animation: floaty 3s ease-in-out infinite; }
.mail-empty { text-align: center; font-family: var(--serif); font-size: 17px; }
.mail-note { text-align: center; color: var(--ink2); font-size: 13.5px; max-width: 300px; margin: 10px auto; }

/* ---------- 照片查看器 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(43, 30, 28, 0.88);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .25s ease both;
  cursor: default;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lb-viewer { flex-direction: column; gap: 14px; }
.lb-viewer .lb-x {
  position: absolute; top: 16px; right: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 253, 248, 0.16);
  color: #fff; font-size: 16px;
}
.lb-stage {
  position: relative;
  max-width: 94vw;
  display: flex; align-items: center; justify-content: center;
  touch-action: pan-y;
}
.lb-real {
  display: block;
  max-width: 88vw; max-height: 62vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.lb-flip {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .65s cubic-bezier(0.25, 0.7, 0.3, 1);
  cursor: pointer;
}
.lb-flip.flipped { transform: rotateY(180deg); }
.lb-flip .lb-real, .lb-anime { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.lb-anime {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: rotateY(180deg);
  border-radius: 14px;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink); font-size: 26px; line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }
.lb-nav:active { transform: translateY(-50%) scale(0.92); }
/* 旋转按钮 */
.lb-tools { display: flex; gap: 12px; justify-content: center; }
.lb-tools button {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 253, 248, 0.16);
  color: #fff; font-size: 19px;
  transition: transform .2s ease, background .2s ease;
}
.lb-tools button:active { transform: scale(0.9); background: rgba(255, 253, 248, 0.3); }

/* 旋转容器：90°/270° 时换算长宽约束，保证转完还在屏幕里 */
.lb-rot { transition: transform .3s ease; transform-origin: center center; }
.lb-rot.r90 { transform: rotate(90deg); }
.lb-rot.r180 { transform: rotate(180deg); }
.lb-rot.r270 { transform: rotate(270deg); }
.lb-rot.r90 .lb-real, .lb-rot.r270 .lb-real { max-width: 62vh; max-height: 88vw; }

.lb-meta { text-align: center; color: #fff; max-width: 86vw; }
.lb-cap { font-family: var(--serif); font-size: 15px; }
.lb-no { font-size: 12px; opacity: 0.75; margin-top: 4px; letter-spacing: 2px; }
.lb-hint { font-size: 11px; opacity: 0.55; margin-top: 10px; }

/* 翻转卡上的放大按钮 */
.tl-media { position: relative; }
.tl-zoom {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink); font-size: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* ---------- 翻转照片卡 ---------- */
.flip-wrap { perspective: 1100px; }
.flip {
  position: relative;
  aspect-ratio: 3 / 4;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(0.25, 0.7, 0.3, 1);
  cursor: pointer;
}
.flip.flipped { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  background: #FFF6EC;
}
.flip-face img { width: 100%; height: 100%; object-fit: cover; }
.flip-back { transform: rotateY(180deg); }
.flip-tag {
  position: absolute; left: 10px; bottom: 10px;
  max-width: calc(100% - 20px);
  font-size: 11px; line-height: 1.4;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.88);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  pointer-events: none;
}

/* ---------- 锁卡弹窗 ---------- */
.lock-modal {
  position: fixed; inset: 0; z-index: 46;
  background: rgba(43, 30, 28, 0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .25s ease both;
}
.lock-card { max-width: 330px; width: 100%; margin: 0; }
.lock-card h3 { font-size: 18px; margin-bottom: 10px; letter-spacing: 1px; }
.lock-line { font-size: 14px; margin: 6px 0; opacity: 1 !important; color: var(--ink); font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif; }
.lock-line b { color: var(--rose-deep); font-size: 18px; }
.lm-gate {
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink2);
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: opacity .2s, transform .2s;
  border-top: 1px dashed #EFD9CB;
  padding-top: 12px;
}
.lm-gate b { color: var(--rose-deep); }
.lm-gate.holding { opacity: 0.45; transform: scale(0.96); }

/* ---------- 编辑台 ---------- */
.gear {
  position: fixed; right: 14px; bottom: 16px;
  z-index: 42;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(201, 138, 142, 0.25);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease;
}
.gear:active { transform: rotate(90deg) scale(0.92); }

.admin-mask {
  position: fixed; inset: 0; z-index: 56;
  background: rgba(43, 30, 28, 0.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .25s ease both;
}
.admin-panel {
  width: 100%; max-width: 520px;
  max-height: 88vh;
  background: #FFFDF8;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.22);
  display: flex; flex-direction: column;
  animation: sheetUp .35s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.adm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: 17px;
}
.adm-x {
  width: 34px; height: 34px; border-radius: 50%;
  background: #F7EFE8; color: var(--ink2); font-size: 14px;
}
.adm-body { overflow-y: auto; padding: 12px 18px 20px; flex: 1; }
.adm-body details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
}
.adm-body summary {
  list-style: none;
  padding: 13px 16px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}
.adm-body summary::-webkit-details-marker { display: none; }
.adm-body summary::after { content: "▸"; float: right; color: var(--ink2); transition: transform .2s; }
.adm-body details[open] summary::after { transform: rotate(90deg); }
.adm-body details > *:not(summary) { margin: 0 16px 12px; }
.adm-label { display: block; font-size: 12.5px; color: var(--ink2); margin-bottom: 10px; }
.adm-in {
  display: block; width: 100%;
  margin-top: 4px;
  border: 1.5px solid #E9D5C8;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  background: #FFFDF8;
  color: var(--ink);
  font-family: inherit;
  outline: none;
}
.adm-in:focus { border-color: var(--rose); }
textarea.adm-in { resize: vertical; line-height: 1.7; }
.adm-tip { font-size: 12px; color: var(--ink2); opacity: 0.85; }
.adm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed #F0E2D8;
}
.adm-row:last-of-type { border-bottom: none; }
.adm-thumb {
  width: 46px; height: 46px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 46px;
  border: 1px solid var(--line);
}
.adm-row-main { flex: 1; min-width: 0; }
.adm-row-main .adm-in { margin-top: 4px; }
.adm-row-main .adm-in + .adm-in { margin-top: 6px; }
.adm-file { font-size: 11.5px; color: var(--ink2); }
.adm-row-btns { display: flex; flex-direction: column; gap: 4px; }
.adm-mini {
  width: 30px; height: 26px;
  border-radius: 8px;
  background: #F7EFE8;
  color: var(--ink);
  font-size: 12px;
}
.adm-mini.danger { background: #FBE3E6; color: var(--rose-deep); }
.adm-addrow { margin: 10px 0; padding: 10px; background: #FDF6EE; border-radius: 12px; }
.adm-addrow .adm-in { margin-bottom: 6px; }
.adm-btn {
  display: inline-block;
  background: #F7EFE8;
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 13.5px;
  color: var(--ink);
}
.adm-btn.primary { background: linear-gradient(135deg, #E7A6AC, var(--rose-deep)); color: #fff; }
.adm-btn.danger { background: #FBE3E6; color: var(--rose-deep); }
.adm-foot {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #FFF9F2;
}

/* ---------- 桌面端 ---------- */
@media (min-width: 720px) {
  .wrap { max-width: 480px; padding-top: 48px; }
  .hero h1 { font-size: 32px; }
  .scene { max-width: 500px; padding-top: 56px; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  #fx { display: none; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
