/* ===== 折跃陪伴空间 · 全屏沉浸版 ===== */

:root {
  --primary: #dd9a6e;
  --primary-deep: #c47d50;
  --primary-light: rgba(245, 212, 184, 0.92);
  --rose: #ec9e94;
  --rose-deep: #dd7c70;
  --text: #4a3328;
  --text-soft: #7a5c4e;
  --text-white: rgba(255, 248, 240, 0.95);
  --text-white-mute: rgba(255, 240, 225, 0.7);
  --bubble-ayao: rgba(255, 248, 240, 0.92);
  --bubble-user: linear-gradient(135deg, #e5a67a, #c47d50);
  --shadow-soft: 0 8px 32px rgba(60, 30, 10, 0.2);
  --shadow-light: 0 4px 16px rgba(60, 30, 10, 0.12);
  --radius-pill: 999px;
  --radius-bubble: 24px;
  --ease-soft: cubic-bezier(.32,.72,.34,1);
  --ease-spring: cubic-bezier(.22,1.2,.36,1);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* H5 响应式根字号：基于视口宽度等比缩放，桌面端锁定上限 */
html {
  font-size: clamp(15px, 4.2vw, 18px);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: none;
  background: #0d0704;
  touch-action: manipulation;
}

/* 所有可点击元素：去除高亮 + 触摸优化 */
button, a, [role="button"], input, select, textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* 防止长按选中文字（移动端体验） */
.no-select, .cap-btn, .pill-btn, .quick-pill, .shop-tab, .shop-main-tab, .shop-item, .currency-add, .story-choice, .story-close {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ============ 9:16 手机壳容器 ============ */
/* 手机端（窄屏）：全屏铺满，适配刘海屏安全区 */
.phone-shell {
  position: fixed; inset: 0; z-index: 1;
  overflow: hidden;
  overflow-x: hidden;
  background: #1a0f07;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
/* 桌面/宽屏端：居中显示9:16比例手机面板 */
@media (min-width: 600px) and (min-height: 700px) {
  body {
    display: grid; place-items: center;
    background: radial-gradient(ellipse at center, #2a1a0d 0%, #0d0704 70%);
  }
  .phone-shell {
    position: relative;
    width: min(420px, calc(100vh * 9 / 16 - 40px));
    height: min(calc(100vh - 40px), calc(100vw * 16 / 9 - 40px));
    max-width: 420px;
    max-height: 900px;
    border-radius: 40px;
    box-shadow:
      0 0 0 1px rgba(255,255,255,.06),
      0 30px 80px rgba(0,0,0,.6),
      0 0 0 10px #1a0f07,
      0 0 0 12px rgba(255,200,150,.08);
    overflow: hidden;
  }
  /* 手机壳刘海装饰 */
  .phone-shell::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 120px; height: 28px; background: #0d0704;
    border-radius: 0 0 18px 18px; z-index: 500;
  }
}

*:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
button, input, select { font-family: inherit; border: none; background: none; }
input::placeholder { color: rgba(122, 92, 78, 0.6); font-weight: 400; }
::selection { background: rgba(221, 154, 110, 0.4); color: #fff; }

/* ============ 开场推门 ============ */
.opening {
  position: absolute; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 55%, rgba(255,210,160,.15) 0%, transparent 55%),
              radial-gradient(circle at 50% 50%, #2a1a0d 0%, #150b05 70%);
  overflow: hidden;
  transition: opacity 1s var(--ease-soft);
}
.opening.fade-out { opacity: 0; pointer-events: none; }
.opening-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,.65) 100%);
  z-index: 3; pointer-events: none;
}

.door {
  position: relative; width: min(360px, 78vw); height: min(560px, 76vh); z-index: 2;
  perspective: 1400px;
}
.door-panel {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background:
    linear-gradient(90deg, rgba(0,0,0,.35), transparent 25%, transparent 75%, rgba(0,0,0,.35)),
    linear-gradient(180deg, rgba(255,220,180,.04), rgba(0,0,0,.12)),
    repeating-linear-gradient(180deg, #5c3d29 0 58px, #3e2a1b 58px 60px, #5c3d29 60px 118px, #7a5236 118px 120px);
  box-shadow: inset 0 0 50px rgba(0,0,0,.5), 0 0 40px rgba(0,0,0,.6);
  transition: transform 1.8s cubic-bezier(.4,.05,.15,1), opacity 1s var(--ease-soft);
  backface-visibility: hidden; will-change: transform;
}
.door-left { left: 0; border-radius: 10px 2px 2px 10px; transform-origin: left center; }
.door-right { right: 0; border-radius: 2px 10px 10px 2px; transform-origin: right center; }
.door-left::after, .door-right::after {
  content: ""; position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe8b8, #c89545 60%, #8b6320);
  box-shadow: 0 2px 8px rgba(0,0,0,.5), inset 0 -2px 3px rgba(0,0,0,.3);
}
.door-left::after { right: 14px; }
.door-right::after { left: 14px; }

.door-seam {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 14px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent 0%, rgba(255,220,170,.7) 18%, rgba(255,238,205,.92) 50%, rgba(255,220,170,.7) 82%, transparent 100%);
  box-shadow: 0 0 40px 14px rgba(255,200,130,.4), 0 0 90px 34px rgba(255,180,100,.18);
  z-index: 1; animation: seamBreathe 5s ease-in-out infinite;
  filter: blur(2px);
}
@keyframes seamBreathe {
  0%,100% { opacity:.7; box-shadow: 0 0 36px 12px rgba(255,200,130,.32), 0 0 80px 30px rgba(255,180,100,.14); }
  50%     { opacity:.95; box-shadow: 0 0 50px 18px rgba(255,200,130,.55), 0 0 110px 44px rgba(255,180,100,.24); }
}
.door-glow {
  position: absolute; inset: -15%;
  background: radial-gradient(ellipse at center, rgba(255,215,160,.9) 0%, rgba(255,170,95,.55) 35%, transparent 70%);
  filter: blur(14px); z-index: 0; opacity: 0;
  transition: opacity .8s var(--ease-soft) .2s;
}
.opening .door-left { transform: rotateY(-8deg); }
.opening .door-right { transform: rotateY(8deg); }
.opening.pushed .door-left { transform: translateX(-65%) rotateY(-85deg); opacity: .9; }
.opening.pushed .door-right { transform: translateX(65%) rotateY(85deg); opacity: .9; }
.opening.pushed .door-glow { opacity: 1; }
.opening.pushed .door-seam { opacity: 0; transition: opacity .25s ease; }

.opening-text {
  position: absolute; left: 0; right: 0; bottom: 14%; z-index: 4;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  transition: opacity .6s var(--ease-soft), transform .9s var(--ease-soft);
}
.opening.pushed .opening-text { opacity: 0; transform: translateY(24px); }
.opening-line {
  font-size: clamp(0.95rem, 5vw, 1.25rem); font-weight: 500; line-height: 1.85;
  color: #fff2df; text-shadow: 0 3px 20px rgba(255,170,90,.5), 0 0 40px rgba(0,0,0,.5);
  letter-spacing: 0.1rem; animation: breathe 4.5s ease-in-out infinite;
  padding: 0 0.5rem;
}
@keyframes breathe { 0%,100%{opacity:.85} 50%{opacity:1} }

.cap-btn {
  font-family: var(--font); font-size: 1rem; font-weight: 500; letter-spacing: 0.5px;
  color: var(--text); background: rgba(255,250,244,.92); border: none;
  padding: 0.7rem 1.5rem; border-radius: var(--radius-pill); cursor: pointer;
  transition: transform .28s var(--ease-spring), box-shadow .28s var(--ease-soft), background .22s var(--ease-soft);
  box-shadow: 0 6px 18px rgba(150,90,50,.12);
  display: inline-flex; align-items: center; gap: 0.3rem; user-select: none;
  -webkit-tap-highlight-color: transparent; position: relative; overflow: hidden;
  min-height: 2.8rem;
}
.cap-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(150,90,50,.18); background: #fff; }
.cap-btn:active { transform: translateY(0) scale(.97); }
.cap-btn--enter {
  font-size: clamp(1rem, 5.5vw, 1.2rem); padding: 0.9rem 2.8rem; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 12px 32px rgba(196,125,80,.5);
  animation: nudge 2.6s ease-in-out infinite; letter-spacing: 0.18rem;
  min-height: 3rem;
}
.cap-btn--enter:hover { background: linear-gradient(135deg, #e5a67a, var(--primary-deep)); box-shadow: 0 18px 40px rgba(196,125,80,.55); }
@keyframes nudge {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.cap-btn--primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); box-shadow: 0 10px 24px rgba(196,125,80,.38); }
.cap-btn--ghost { background: rgba(255,250,244,.75); box-shadow: none; border: 1px solid rgba(205,160,120,.25); }
.cap-btn--ghost:hover { background: #fff; border-color: var(--primary); box-shadow: 0 6px 18px rgba(150,90,50,.12); }
.opening-tip {
  font-size: 0.95rem; color: rgba(255,235,210,.92); letter-spacing: 0.12rem;
  font-weight: 500; animation: tipBlink 2s ease-in-out infinite;
  text-shadow: 0 2px 12px rgba(255,180,100,.6);
}
@keyframes tipBlink {
  0%,100% { opacity: .55; transform: translateY(0); }
  50%     { opacity: 1;   transform: translateY(-2px); }
}

/* ============ 主空间：全屏沉浸 ============ */
.space {
  position: absolute; inset: 0; z-index: 1; opacity: 0;
  transition: opacity 1.2s var(--ease-soft) .3s;
}
.space.shown { opacity: 1; }
.space[aria-hidden="true"] { pointer-events: none; }

/* 全屏阿耀背景 */
.ayaofull {
  position: absolute; inset: 0; overflow: hidden;
}
.ayao-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 65% 5%;
  animation: breatheScale 8s ease-in-out infinite alternate;
}
@keyframes breatheScale {
  0% { transform: scale(1.02); }
  100% { transform: scale(1.06); }
}

/* 呼吸光晕（阿耀面部/胸口的暖光呼吸） */
.ayao-breathe {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 35% 30% at 48% 28%, rgba(255,220,170,.25) 0%, transparent 60%);
  animation: lightBreathe 5s ease-in-out infinite;
  mix-blend-mode: screen; pointer-events: none;
}
@keyframes lightBreathe {
  0%,100% { opacity: .5; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.08); }
}

/* 顶部暗角（让顶栏更清晰） */
.vignette-top {
  position: absolute; top: 0; left: 0; right: 0; height: 25%;
  background: linear-gradient(180deg, rgba(20,10,4,.5) 0%, transparent 100%);
  pointer-events: none;
}
/* 底部暗角（让输入区和气泡更清晰，但不黑） */
.vignette-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; height: 45%;
  background: linear-gradient(0deg, rgba(30,15,6,.55) 0%, rgba(30,15,6,.2) 40%, transparent 100%);
  pointer-events: none;
}
/* 暖色氛围叠加 */
.warm-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 40% at 50% 40%, rgba(255,200,130,.08), transparent 70%);
  pointer-events: none; mix-blend-mode: soft-light;
}

/* 顶栏：极简悬浮，所有元素一行 */
.topbar {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.35rem 0.5rem;
  flex-wrap: nowrap; gap: 0.25rem;
}
.currency-bar {
  display: inline-flex; align-items: center; gap: 0.2rem;
  flex-shrink: 0;
}
.currency {
  display: inline-flex; align-items: center; gap: 0.15rem;
  padding: 0.2rem 0.4rem; background: rgba(0,0,0,.3);
  border-radius: var(--radius-pill);
  font-size: 0.7rem; font-weight: 700; color: #fff;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.12);
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
  white-space: nowrap;
}
.currency-icon { font-size: 0.7rem; }
.currency-label { display: none; }
.currency-silver { border-color: rgba(220,200,160,.3); }
.currency-copper { border-color: rgba(220,160,100,.3); }

/* 充值 + 按钮（古风暗金） */
.currency-add {
  display: inline-grid; place-items: center;
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 1px solid rgba(210,160,90,.55);
  background: linear-gradient(135deg, #d8a663, #b9884a 60%, #9a6f38);
  color: #fff8ea; font-size: 0.6rem; font-weight: 700; line-height: 1;
  cursor: pointer; flex-shrink: 0; margin-left: 0.1rem;
  box-shadow: 0 1px 3px rgba(120,70,30,.35), 0 0 3px rgba(210,160,90,.3) inset;
  transition: all .22s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  user-select: none; position: relative; overflow: hidden;
}
.currency-add:hover {
  transform: scale(1.12);
  box-shadow: 0 2px 6px rgba(180,130,60,.5), 0 0 6px rgba(230,190,110,.4) inset;
}
.currency-add:active { transform: scale(.92); }

.top-actions { display: flex; gap: 0.2rem; flex-shrink: 0; flex-wrap: nowrap; }
.pill-btn {
  font-size: 0.68rem; font-weight: 600; color: var(--text-white);
  padding: 0.3rem 0.45rem; border-radius: var(--radius-pill); cursor: pointer;
  background: rgba(0,0,0,.25); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.12);
  transition: all .25s var(--ease-soft);
  letter-spacing: 0;
  white-space: nowrap; min-height: 1.8rem;
}
.pill-btn:hover { background: rgba(255,255,255,.15); transform: translateY(-1px); }
.pill-btn--rose { background: rgba(221,124,112,.35); border-color: rgba(255,180,170,.25); }
.pill-btn--rose:hover { background: rgba(221,124,112,.5); }
.pill-btn--amber { background: rgba(210,150,80,.4); border-color: rgba(255,210,150,.3); }
.pill-btn--amber:hover { background: rgba(210,150,80,.55); }
.pill-btn--icon { padding: 0.3rem 0.4rem; min-height: 1.8rem; }

/* 阿耀身份：左下角 */
.ayao-id {
  position: absolute; left: 1.2rem; top: 8%; z-index: 10;
  animation: fadeInDown 1s var(--ease-soft) .5s both;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.ayao-name {
  font-size: clamp(1.6rem, 9vw, 2.2rem); font-weight: 600; color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,.65), 0 2px 10px rgba(0,0,0,.5);
  letter-spacing: 0.35rem; margin-bottom: 0.35rem;
  padding: 0.3rem 0.8rem 0.3rem 0.5rem;
  background: linear-gradient(90deg, rgba(30,15,6,.55), rgba(30,15,6,0));
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ayao-status {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: rgba(255,240,220,.9);
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
  letter-spacing: 1px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #8de08d;
  box-shadow: 0 0 0 0 rgba(141,224,141,.6); animation: pulse 2.2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(141,224,141,.6); }
  70% { box-shadow: 0 0 0 10px rgba(141,224,141,0); }
  100% { box-shadow: 0 0 0 0 rgba(141,224,141,0); }
}

/* ============ 浮动对话气泡 ============ */
.chat-float {
  position: absolute; right: 0.8rem; left: 0.8rem; bottom: 9rem; z-index: 8;
  width: auto;
  padding: 0; pointer-events: none;
  margin: 0 auto;
}
.chat-bubbles {
  display: flex; flex-direction: column; gap: 0.55rem;
  max-height: 34vh; overflow-y: auto; padding: 0.4rem 0.2rem 0.4rem 0;
  scrollbar-width: none; pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}
.chat-bubbles::-webkit-scrollbar { display: none; }
.chat-bubbles { scroll-behavior: smooth; }

.bubble {
  display: flex; max-width: 76%; animation: bubbleIn .5s var(--ease-spring);
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(16px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.bubble-ayao { align-self: flex-start; }
.bubble-user { align-self: flex-end; flex-direction: row-reverse; }

.bubble-text {
  padding: 0.6rem 1.1rem; border-radius: 18px;
  font-size: 0.88rem; font-weight: 400; line-height: 1.6; letter-spacing: .3px;
  word-break: break-word; white-space: pre-wrap;
  box-shadow: var(--shadow-light); position: relative;
}
/* 微信风格小尖角 */
.bubble-ayao .bubble-text {
  background: var(--bubble-ayao); color: var(--text);
  border-top-left-radius: 6px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.bubble-ayao .bubble-text::before {
  content: ''; position: absolute; left: -7px; top: 12px;
  border-width: 6px 8px 6px 0; border-style: solid; border-color: transparent;
  border-right-color: var(--bubble-ayao);
}
.bubble-user .bubble-text {
  background: var(--bubble-user); color: #fff;
  border-top-right-radius: 6px;
  box-shadow: 0 6px 20px rgba(196,125,80,.35);
}
.bubble-user .bubble-text::before {
  content: ''; position: absolute; right: -7px; top: 12px;
  border-width: 6px 0 6px 8px; border-style: solid; border-color: transparent;
  border-left-color: #c47d50;
}

/* 说话者标签（只在用户填了名字时显示） */
.bubble-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 1px;
  padding: 0 0.4rem 0.25rem; opacity: 0.85; white-space: nowrap;
}
.bubble-ayao .bubble-label { align-self: flex-start; color: var(--primary-deep); }
.bubble-user .bubble-label { align-self: flex-end; color: var(--text-soft); padding-right: 0.2rem; }

/* 首条阿耀消息：特殊加大，更有仪式感 */
.bubble-ayao.bubble-first { max-width: 82%; }
.bubble-ayao.bubble-first .bubble-text {
  font-size: 0.96rem; padding: 1rem 1.3rem; line-height: 1.85;
  background: rgba(255,248,240,.95);
  box-shadow: 0 8px 32px rgba(60,30,10,.25);
}

.typing .bubble-text {
  display: inline-flex; gap: 6px; align-items: center;
  padding: 0.85rem 1.2rem;
}
.typing .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-deep); animation: bounce 1.2s infinite; }
.typing .dot:nth-child(2) { animation-delay: .2s; }
.typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0);opacity:.4} 30%{transform:translateY(-7px);opacity:1} }

/* ============ 快捷胶囊行 ============ */
.quick-row {
  position: absolute; left: 0; right: 0; bottom: 5rem; z-index: 9;
  display: flex; gap: 0.4rem; padding: 0 1rem;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  animation: fadeInUp 1s var(--ease-soft) .8s both;
}
.quick-row::-webkit-scrollbar { display: none; }
.quick-pill {
  flex: none; font-size: 0.8rem; font-weight: 500; color: var(--text-white);
  padding: 0.5rem 0.9rem; border-radius: var(--radius-pill); cursor: pointer;
  background: rgba(0,0,0,.3); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.15);
  transition: all .25s var(--ease-spring);
  letter-spacing: .5px; white-space: nowrap; min-height: 2.5rem;
}
.quick-pill:hover {
  background: rgba(221,154,110,.5); border-color: rgba(255,220,180,.3);
  transform: translateY(-2px) scale(1.03);
}
.quick-pill:active { transform: translateY(0) scale(.97); }

/* ============ 底部输入区 ============ */
.composer-float {
  position: absolute; left: 0.8rem; right: 0.8rem; bottom: 1rem; z-index: 10;
  display: flex; gap: 0.5rem; align-items: center;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  background: rgba(255,248,240,.88);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 32px rgba(30,15,5,.25), inset 0 1px 0 rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.5);
  animation: fadeInUp 1s var(--ease-soft) 1s both;
}
#chat-input-box {
  flex: 1; font-size: 0.95rem; font-weight: 400; color: var(--text);
  background: transparent; outline: none; padding: 0.55rem 0;
  min-height: 2.5rem;
}
.send-btn {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(196,125,80,.4);
  transition: all .25s var(--ease-spring);
  flex: none;
}
.send-btn:hover { transform: scale(1.08); box-shadow: 0 8px 24px rgba(196,125,80,.5); }
.send-btn:active { transform: scale(.95); }
.send-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.send-btn svg { display: block; }

/* ============ 语音交互 ============ */
.mic-btn {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, #e8985c, #c8723a);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(200,114,58,.35);
  transition: all .25s var(--ease-spring);
  flex: none; border: none; position: relative;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.mic-btn:hover { transform: scale(1.08); box-shadow: 0 8px 24px rgba(200,114,58,.45); }
.mic-btn:active { transform: scale(.95); }
.mic-btn svg { display: block; position: relative; z-index: 2; }
.mic-ripple {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(230,100,80,.4);
  opacity: 0; transform: scale(1);
  pointer-events: none;
}
.mic-btn.recording {
  background: linear-gradient(135deg, #e85c5c, #c53838);
  box-shadow: 0 0 0 0 rgba(230,80,80,.5), 0 6px 18px rgba(200,60,60,.4);
  animation: micPulse 1.2s ease-in-out infinite;
}
.mic-btn.recording .mic-ripple {
  animation: micRipple 1.4s ease-out infinite;
}
.mic-btn.recording .mic-ripple--2 {
  animation: micRipple 1.4s ease-out infinite .7s;
}
@keyframes micPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(230,80,80,.45), 0 6px 18px rgba(200,60,60,.4); }
  50%     { box-shadow: 0 0 0 10px rgba(230,80,80,0), 0 6px 18px rgba(200,60,60,.4); }
}
@keyframes micRipple {
  0%   { opacity: .6; transform: scale(1); }
  100% { opacity: 0;  transform: scale(2.2); }
}
/* 识别中：橙色脉冲（区别于录音的红色脉冲） */
.mic-btn.processing {
  background: linear-gradient(135deg, #f0a050, #e08030);
  box-shadow: 0 0 0 0 rgba(240,160,80,.55), 0 6px 18px rgba(200,120,50,.45);
  animation: micProcessPulse 1s ease-in-out infinite;
  cursor: wait;
}
.mic-btn.processing .mic-ripple {
  animation: micRipple 1.6s ease-out infinite;
}
@keyframes micProcessPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(240,160,80,.5), 0 6px 18px rgba(200,120,50,.45); }
  50%     { box-shadow: 0 0 0 8px rgba(240,160,80,0), 0 6px 18px rgba(200,120,50,.45); }
}

/* 录音浮层 */
.voice-overlay {
  position: absolute; inset: 0; z-index: 200;
  background: rgba(30,15,8,.6); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; animation: fade .2s var(--ease-soft);
}
.voice-overlay[hidden] { display: none; }
/* 非录音态（识别中/成功/失败）：隐藏波纹动画，缩短间距 */
.voice-overlay--quiet { gap: 12px; }
.voice-overlay--quiet .voice-wave { display: none; }
.voice-overlay--quiet .voice-level { display: none; }
/* 实时音量条（拾音灵敏度可视化） */
.voice-level {
  width: 220px; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,.14); overflow: hidden;
}
.voice-level i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #e8985c, #ffd0a0);
  border-radius: 3px; transition: width .09s linear;
}
.voice-wave {
  display: flex; align-items: center; gap: 5px; height: 60px;
}
.voice-wave span {
  width: 4px; background: linear-gradient(to top, #e8985c, #ffd0a0);
  border-radius: 3px;
  animation: waveBar 1s ease-in-out infinite;
}
.voice-wave span:nth-child(1)  { animation-delay: 0s;   height: 20px; }
.voice-wave span:nth-child(2)  { animation-delay: .1s; height: 30px; }
.voice-wave span:nth-child(3)  { animation-delay: .2s; height: 45px; }
.voice-wave span:nth-child(4)  { animation-delay: .3s; height: 55px; }
.voice-wave span:nth-child(5)  { animation-delay: .4s; height: 40px; }
.voice-wave span:nth-child(6)  { animation-delay: .3s; height: 50px; }
.voice-wave span:nth-child(7)  { animation-delay: .2s; height: 60px; }
.voice-wave span:nth-child(8)  { animation-delay: .1s; height: 35px; }
.voice-wave span:nth-child(9)  { animation-delay: .25s;height: 25px; }
.voice-wave span:nth-child(10) { animation-delay: .15s;height: 45px; }
@keyframes waveBar {
  0%,100% { transform: scaleY(.5); }
  50%     { transform: scaleY(1); }
}
.voice-hint {
  font-size: 1rem; color: #fff2df; text-align: center; line-height: 1.8;
  letter-spacing: 1px; font-weight: 500;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
  padding: 0 1rem;
}
.voice-hint small { font-size: 0.75rem; opacity: .7; font-weight: 400; letter-spacing: 0; }
/* 状态文案配色：成功绿 / 失败红 */
.voice-hint.state-success { color: #8ef0b0; }
.voice-hint.state-error { color: #ffb4a0; }

/* 语音播报开关：右下角浮动 */
.voice-toggle {
  position: absolute; right: 1rem; bottom: 5rem; z-index: 11;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: rgba(0,0,0,.3); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: all .25s var(--ease-soft);
  animation: fadeInUp 1s var(--ease-soft) 1.3s both;
}
.voice-toggle:hover { background: rgba(0,0,0,.45); transform: scale(1.1); }
.voice-toggle:active { transform: scale(.95); }
.voice-toggle .voice-off { display: none; }
.voice-toggle.muted { background: rgba(0,0,0,.2); border-color: rgba(255,255,255,.08); opacity: .5; }
.voice-toggle.muted .voice-on { display: none; }
.voice-toggle.muted .voice-off { display: block; color: rgba(255,255,255,.7); }

.chat-hint {
  position: absolute; left: 1rem; right: 1rem; bottom: 7.5rem; z-index: 9;
  padding: 0.55rem 0.8rem; font-size: 0.75rem; font-weight: 500; text-align: center;
  color: #8b5a35; background: rgba(255,248,240,.92);
  border-radius: 14px; border: 1px solid rgba(205,160,120,.25);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(30,15,5,.12);
  animation: fadeInUp .5s var(--ease-soft);
}
.chat-hint a { color: var(--primary-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; margin-left: 4px; }

/* ============ 弹窗（通用 + 古风主题） ============ */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(30,15,8,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .28s var(--ease-soft); }
@keyframes fade { from{opacity:0} to{opacity:1} }
.modal-box {
  position: relative; width: min(28rem, 94vw); max-height: 82vh; overflow-y: auto;
  background: #fffaf4; border-radius: 1.5rem;
  box-shadow: 0 30px 70px rgba(30,15,5,.3), 0 0 0 1px rgba(255,255,255,.5);
  animation: pop .35s var(--ease-spring); scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.modal-box--wide { width: min(27rem, 94vw); }
@keyframes pop { from{opacity:0;transform:scale(.92) translateY(20px)} to{opacity:1;transform:scale(1) translateY(0)} }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1rem 0.3rem; }
.modal-head h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: 1px; color: var(--text); }
.modal-close {
  width: 2rem; height: 2rem; border: none; background: #fdf1e2;
  border-radius: 50%; font-size: 0.9rem; color: var(--text-soft); cursor: pointer;
  transition: all .2s var(--ease-soft); display: grid; place-items: center;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--primary-light); color: var(--text); transform: rotate(90deg); }
.modal-body { padding: 0.4rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.modal-body--center { align-items: center; text-align: center; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field-label { font-size: 0.9rem; font-weight: 500; color: var(--text); letter-spacing: .3px; }
.field input[type="password"], .field input[type="text"], .field input[type="tel"], .field input[type="url"], .field select {
  font-family: var(--font); font-size: 0.9rem; font-weight: 400;
  padding: 0.75rem 1rem; border: 1.5px solid rgba(205,160,120,.25); border-radius: 0.9rem;
  background: #fff; color: var(--text); outline: none;
  transition: border-color .22s var(--ease-soft), box-shadow .22s var(--ease-soft);
  min-height: 2.8rem;
}
.field textarea {
  font-family: var(--font); font-size: 0.9rem; font-weight: 400;
  padding: 0.75rem 1rem; border: 1.5px solid rgba(205,160,120,.25); border-radius: 0.9rem;
  background: #fff; color: var(--text); outline: none; resize: vertical;
  transition: border-color .22s var(--ease-soft), box-shadow .22s var(--ease-soft);
  min-height: 4rem; line-height: 1.6;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 4px 14px rgba(196,125,80,.12); }
.field-tip { font-size: 0.75rem; color: var(--text-soft); line-height: 1.6; }
.field-row { flex-direction: row; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.field-row input { width: 1.2rem; height: 1.2rem; accent-color: var(--primary); flex: none; }
.field-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.3rem; flex-wrap: wrap; }

/* 后端连接状态显示 */
.backend-status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.75rem; border-radius: 0.8rem;
  background: #fdf1e2; border: 1px solid rgba(210,160,100,.2);
  margin-bottom: 0.2rem; font-size: 0.8rem; color: #8b5a35;
}
.bs-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #bbb; box-shadow: 0 0 0 0 rgba(200,200,200,.5);
  transition: all .3s var(--ease-soft);
}
.backend-status.ok .bs-dot { background: #66c070; box-shadow: 0 0 0 0 rgba(102,192,112,.6); animation: pulse 2s infinite; }
.backend-status.warn .bs-dot { background: #e8825c; }
.backend-status.err .bs-dot { background: #e05a5a; }
.backend-status.ok { background: #ecf9ee; border-color: rgba(102,192,112,.25); color: #2f7a3a; }
.backend-status.warn, .backend-status.err { background: #fff0ec; border-color: rgba(224,120,80,.25); color: #a05030; }
.qr-card { background: #fdf1e2; border-radius: 1.3rem; padding: 1.3rem; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; width: 100%; }
.qr-placeholder { width: 11rem; height: 11rem; background: #fff; border-radius: 0.9rem; display: grid; place-items: center; color: var(--text-mute); font-size: 0.8rem; box-shadow: 0 4px 16px rgba(150,90,50,.1); }
.qr-tip { font-size: 0.85rem; font-weight: 500; letter-spacing: 1px; color: var(--text); }
.private-intro { font-size: 0.9rem; line-height: 2; color: var(--text-soft); }
.private-note { font-size: 0.75rem; color: rgba(122,92,78,.5); }
.private-note code { background: var(--primary-light); color: var(--primary-deep); padding: 2px 7px; border-radius: 5px; font-size: 0.7rem; font-family: "SF Mono", Menlo, monospace; }

/* ============ 古风宣纸弹窗公用样式 ============ */
.ancient-box {
  width: min(28rem, 94vw);
  max-height: 82vh;
  overflow-y: auto;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,220,170,.22), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(255,200,150,.18), transparent 60%),
    linear-gradient(180deg, #fdf3e3 0%, #f7e5cb 100%);
  border: 1.5px solid rgba(168,112,60,.35);
  border-radius: 1.3rem;
  box-shadow:
    0 0 0 1px rgba(255,230,180,.35) inset,
    0 25px 60px rgba(40,20,8,.45),
    0 0 0 4px rgba(120,70,30,.12);
  padding: 6px;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.ancient-box::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px solid rgba(168,112,60,.22);
  border-radius: 16px;
  pointer-events: none;
}
/* 暗金四角装饰 */
.ancient-corner { position: absolute; width: 28px; height: 28px; z-index: 5; pointer-events: none; }
.ancient-corner::before, .ancient-corner::after {
  content: ""; position: absolute; background: linear-gradient(135deg, #b9884a, #d8a663 60%, #f2c886);
  box-shadow: 0 0 6px rgba(200,150,80,.35);
}
.ancient-corner--tl { top: 10px; left: 10px; }
.ancient-corner--tl::before { top: 0; left: 0; width: 20px; height: 2px; }
.ancient-corner--tl::after  { top: 0; left: 0; width: 2px; height: 20px; }
.ancient-corner--tr { top: 10px; right: 10px; }
.ancient-corner--tr::before { top: 0; right: 0; width: 20px; height: 2px; }
.ancient-corner--tr::after  { top: 0; right: 0; width: 2px; height: 20px; }
.ancient-corner--bl { bottom: 10px; left: 10px; }
.ancient-corner--bl::before { bottom: 0; left: 0; width: 20px; height: 2px; }
.ancient-corner--bl::after  { bottom: 0; left: 0; width: 2px; height: 20px; }
.ancient-corner--br { bottom: 10px; right: 10px; }
.ancient-corner--br::before { bottom: 0; right: 0; width: 20px; height: 2px; }
.ancient-corner--br::after  { bottom: 0; right: 0; width: 2px; height: 20px; }

/* 古风标题 */
.ancient-head { padding: 1.2rem 1.4rem 0.3rem; }
.ancient-title {
  font-size: clamp(1.2rem, 6vw, 1.6rem); font-weight: 700; letter-spacing: 0.35rem;
  color: #5a3218; text-align: center; flex: 1;
  text-shadow: 0 1px 0 rgba(255,240,210,.8);
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  margin: 0;
}
.ancient-title-deco { font-size: 0.9rem; color: #b9884a; letter-spacing: 0; text-shadow: 0 0 8px rgba(200,150,80,.4); }
.ancient-close { background: rgba(168,112,60,.15); color: #6b3f1f; }
.ancient-close:hover { background: rgba(168,112,60,.3); color: #3a1f0c; }

/* ============ 心意小铺（古风） ============ */
.modal-box--shop {
  width: min(26rem, 92vw);
  display: flex; flex-direction: column;
}
/* 主切换（小铺 / 背包） */
.shop-main-tabs {
  display: flex; gap: 0.4rem; margin: 0.2rem 0;
  padding: 0.3rem; background: rgba(168,112,60,.12);
  border-radius: 0.8rem; border: 1px solid rgba(168,112,60,.18);
}
.shop-main-tab {
  flex: 1; padding: 0.35rem 0; border: none; cursor: pointer;
  background: transparent; border-radius: 0.6rem;
  font-family: var(--font); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.12rem;
  color: #7a4f2a; transition: all .25s var(--ease-soft);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 2rem;
}
.shop-main-tab .main-tab-ico { font-size: 0.85rem; }
.shop-main-tab:hover { background: rgba(255,240,210,.5); color: #5a3218; }
.shop-main-tab.active {
  background: linear-gradient(135deg, #8b5a35, #6b3f1f);
  color: #fdecd0;
  box-shadow: 0 4px 12px rgba(120,70,30,.35), 0 0 0 1px rgba(255,220,170,.2) inset;
}

/* 钱袋（木牌） */
.ancient-wallet {
  display: flex; align-items: center; gap: 0; padding: 0.5rem 0.8rem;
  background: linear-gradient(135deg, #fff8ea 0%, #f2e1c5 100%);
  border: 1px solid rgba(168,112,60,.28);
  border-radius: 0.8rem; position: relative;
  box-shadow: 0 2px 8px rgba(120,70,30,.08) inset;
}
.wallet-item {
  flex: 1; display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.95rem; font-weight: 600; color: #5a3218;
}
.wallet-item b { font-size: 1rem; font-weight: 800; color: #8b5a35; font-family: "Georgia", var(--font); letter-spacing: 1px; }
.wallet-label { color: #8b5a35; font-size: 0.78rem; font-weight: 600; }
.wallet-icon { font-size: 1.1rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.1)); }
.wallet-silver b { color: #8b5a35; }
.wallet-copper b { color: #c06b2e; }
.wallet-divider {
  width: 1px; align-self: stretch;
  background: linear-gradient(180deg, transparent, rgba(168,112,60,.3), transparent);
  margin: 0 0.6rem;
}
.wallet-tip {
  text-align: center; margin-top: 0.3rem;
  font-size: 0.7rem; color: #8b5a35; opacity: .75; letter-spacing: .5px;
}

/* 分类 tab */
.shop-tabs {
  display: flex; gap: 0.35rem; margin-top: 0.8rem; margin-bottom: 0.4rem;
  padding-bottom: 0; border-bottom: none;
  flex-wrap: wrap;
}
.shop-tab {
  padding: 0.3rem 0.6rem; border-radius: 0.5rem; border: 1.5px solid rgba(168,112,60,.3);
  font-family: var(--font); font-size: 0.8rem; font-weight: 600; cursor: pointer; letter-spacing: 0.12rem;
  background: rgba(255,245,225,.6); color: #7a4f2a;
  transition: all .25s var(--ease-soft);
  min-height: 1.8rem;
}
.shop-tab:hover { background: rgba(255,230,190,.8); color: #5a3218; border-color: #b9884a; }
.shop-tab.active {
  background: linear-gradient(135deg, #c88a4a, #a66a2f);
  color: #fff8ea; border-color: #a66a2f;
  box-shadow: 0 4px 12px rgba(120,70,30,.35);
}

/* 商品网格 */
.shop-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem;
  max-height: 32vh; overflow-y: auto; padding: 0.1rem;
  -webkit-overflow-scrolling: touch;
}
.shop-item {
  display: flex; flex-direction: column; gap: 0.2rem; padding: 0.4rem;
  background: linear-gradient(180deg, #fff8ea 0%, #f9ead0 100%);
  border-radius: 0.8rem; cursor: pointer;
  border: 1.5px solid rgba(168,112,60,.28);
  transition: all .3s var(--ease-soft);
  position: relative; overflow: hidden;
  box-shadow: 0 3px 10px rgba(120,70,30,.08);
}
.shop-item::before {
  content: ""; position: absolute; inset: 4px;
  border: 1px solid rgba(168,112,60,.15); border-radius: 0.65rem;
  pointer-events: none;
}
.shop-item:hover {
  border-color: #b9884a;
  box-shadow: 0 8px 24px rgba(120,70,30,.22);
  transform: translateY(-3px);
  background: linear-gradient(180deg, #fffaf0 0%, #fcf0d8 100%);
}
.shop-item:active { transform: translateY(-1px) scale(.98); }
.shop-item.bought {
  opacity: .85; border-color: #6aa06a; background: linear-gradient(180deg, #f0f8ed 0%, #e3efdf 100%);
}
.shop-item.disabled { opacity: .5; cursor: not-allowed; }
.shop-item.disabled:hover { transform: none; box-shadow: 0 3px 10px rgba(120,70,30,.08); border-color: rgba(168,112,60,.28); }

.item-emoji {
  font-size: clamp(1.2rem, 8vw, 1.8rem); flex-shrink: 0;
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255,220,170,.5), rgba(240,200,140,.4));
  border-radius: 0.8rem; border: 1px solid rgba(168,112,60,.2);
  margin: 0 auto;
}
.item-info { flex: 1; min-width: 0; text-align: center; }
.item-name {
  font-size: 0.88rem; font-weight: 700; color: #4a280f;
  margin-bottom: 0.2rem; letter-spacing: 1px;
}
.item-desc {
  font-size: 0.72rem; color: #6b4728; font-weight: 500; line-height: 1.55;
  margin-bottom: 0.4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-price {
  display: inline-flex; align-items: center; gap: 0.15rem;
  font-size: 0.78rem; font-weight: 800; padding: 0.22rem 0.55rem; border-radius: 1.2rem;
  background: linear-gradient(135deg, #f3d9a8, #e4bd7d);
  color: #5a3218; letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(120,70,30,.18);
  border: 1px solid rgba(168,112,60,.3);
}
.item-price.price-silver { background: linear-gradient(135deg, #f3d9a8, #e4bd7d); }
.item-price.price-copper { background: linear-gradient(135deg, #f6c89a, #e09868); }
.item-price .price-icon { font-size: 0.85rem; }
.item-buy-hint {
  font-size: 0.72rem; color: #5a8a5a; font-weight: 600; margin-top: 0.2rem;
}

/* 背包 */
.ancient-sub {
  font-size: 0.92rem; font-weight: 700; color: #5a3218; letter-spacing: 0.15rem;
  text-align: center; margin: 0.2rem 0 0.4rem;
  padding-bottom: 0.4rem; border-bottom: 1px dashed rgba(168,112,60,.3);
}
/* ============ 小铺分类引导文案 ============ */
.shop-cat-intro {
  margin: 0.6rem 0.2rem 0.4rem; padding: 0.7rem 0.9rem;
  background: linear-gradient(135deg, #fff6e2 0%, #f9e8c8 100%);
  border-left: 3px solid #d8a663; border-radius: 0 0.7rem 0.7rem 0;
  font-size: 0.9rem; line-height: 1.7; color: #6b4320;
  font-weight: 600; letter-spacing: 0.5px;
}

/* ============ 寄心礼 · 地址弹窗 ============ */
.modal-ancient .ancient-box--addr { width: min(400px, 100%); }
.addr-gift-preview {
  display: flex; align-items: center; gap: 0.6rem; justify-content: center;
  padding: 0.8rem; margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff4dc 0%, #f9e4be 100%);
  border: 1px dashed rgba(168,112,60,.35); border-radius: 0.8rem;
}
.addr-gift-emoji { font-size: 1.8rem; }
.addr-gift-name { font-size: 1.05rem; font-weight: 800; color: #4a280f; }
.addr-gift-price { font-size: 0.85rem; font-weight: 700; color: #a83c3c; margin-left: auto; }
.addr-form { padding: 0 0.5rem; }
.addr-hint {
  font-size: 0.9rem; color: #6b4320; line-height: 1.6;
  margin-bottom: 0.8rem; text-align: center;
}
.addr-row {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.addr-row label {
  flex-shrink: 0; width: 4.5rem; font-size: 0.88rem;
  font-weight: 700; color: #6b4320; text-align: right;
}
.addr-row input, .addr-row select {
  flex: 1; padding: 0.6rem 0.7rem; font-size: 0.95rem;
  border: 1.5px solid rgba(168,112,60,.3); border-radius: 0.6rem;
  background: #fffaf0; color: #4a280f;
  font-family: var(--font, inherit);
}
.addr-row input:focus, .addr-row select:focus {
  outline: none; border-color: #d8a663;
  box-shadow: 0 0 0 2px rgba(216,166,99,.2);
}
.addr-row--select select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4l3 3 3-3' stroke='%238b5a35' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center;
  padding-right: 2rem;
}
#btn-addr-submit { margin-top: 0.8rem; width: 100%; }

.shop-inventory { padding-top: 0.2rem; }
.bag-time-card {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0.6rem 0.2rem 0.8rem; padding: 0.7rem 0.9rem;
  background: linear-gradient(135deg, #fff4dc 0%, #f9e4be 100%);
  border: 1.5px solid rgba(168,112,60,.35); border-radius: 0.9rem;
  box-shadow: 0 2px 8px rgba(168,112,60,.12);
}
.bag-time-icon { font-size: 1.4rem; }
.bag-time-label { font-size: 0.9rem; font-weight: 700; color: #6b4320; letter-spacing: 1px; }
.bag-time-value {
  margin-left: auto; font-size: 1.05rem; font-weight: 800; color: #a83c3c;
  font-family: "Georgia", serif;
}
.inv-grid { gap: 0.4rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
  max-height: 46vh; overflow-y: auto; padding: 0.2rem;
  -webkit-overflow-scrolling: touch;
}
.inv-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.6rem 0.4rem;
  background: linear-gradient(180deg, #fff8ea 0%, #f5e5c5 100%);
  border: 1px solid rgba(168,112,60,.25); border-radius: 0.8rem;
}
.inv-item .item-emoji { width: 2.6rem; height: 2.6rem; font-size: 1.8rem; }
.inv-item .inv-name { font-size: 0.82rem; font-weight: 700; color: #4a280f; text-align: center; line-height: 1.3; }
.inv-empty {
  grid-column: 1/-1; text-align: center; padding: 2rem 0.5rem;
  color: #8b5a35; font-size: 0.9rem; font-weight: 500; letter-spacing: 1px;
}

/* ============ 长情契 ============ */
.ancient-box--contract { width: min(28rem, 94vw); }
.contract-body { padding: 0.3rem 1.5rem 1.5rem; gap: 0.5rem; }
.contract-scroll { padding: 0.4rem 0.3rem; position: relative; }
.contract-text {
  font-size: clamp(0.95rem, 5vw, 1.15rem); font-weight: 600; color: #4a280f; line-height: 2.0;
  text-align: center; letter-spacing: 0.18rem;
  margin: 0.6rem 0 0.9rem;
  text-shadow: 0 1px 0 rgba(255,240,210,.6);
}
.contract-sub {
  text-align: center; font-size: 0.85rem; font-weight: 500;
  color: #8b5a35; letter-spacing: 1px; margin: 0 0 1rem;
  padding-bottom: 0.7rem; border-bottom: 1px dashed rgba(168,112,60,.3);
}
.field-ancient .field-label { font-size: 0.9rem; font-weight: 700; color: #5a3218; letter-spacing: 1px; }
.field-ancient input, .field-ancient textarea {
  background: rgba(255,248,234,.9);
  border-color: rgba(168,112,60,.3);
  font-size: 0.9rem; color: #4a280f;
}
.field-ancient input::placeholder, .field-ancient textarea::placeholder { color: #b9926a; }
.contract-addr { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.3rem; }
.contract-actions { display: flex; justify-content: center; margin: 1.2rem 0 0.4rem; }
.cap-btn--seal {
  font-size: clamp(0.95rem, 5vw, 1.15rem); font-weight: 700; letter-spacing: 0.25rem;
  padding: 0.85rem 2rem; color: #fdecd0;
  background: linear-gradient(135deg, #a83c3c, #7a1e1e);
  border: 2px solid #d4a060;
  border-radius: 0.8rem;
  box-shadow:
    0 6px 18px rgba(120,30,30,.35),
    0 0 0 2px rgba(168,60,60,.15),
    0 0 20px rgba(210,150,80,.25) inset;
  cursor: pointer; transition: all .3s var(--ease-soft);
  position: relative; overflow: hidden;
  animation: sealGlow 2.5s ease-in-out infinite;
  font-family: var(--font);
  min-height: 2.8rem;
}
.cap-btn--seal:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 26px rgba(120,30,30,.45),
    0 0 0 2px rgba(168,60,60,.2),
    0 0 26px rgba(210,150,80,.4) inset;
}
.cap-btn--seal:active { transform: translateY(0) scale(.97); }
@keyframes sealGlow {
  0%,100% { box-shadow: 0 6px 18px rgba(120,30,30,.35), 0 0 0 2px rgba(168,60,60,.15), 0 0 20px rgba(210,150,80,.22) inset; }
  50%     { box-shadow: 0 6px 22px rgba(160,40,40,.5),  0 0 0 2px rgba(168,60,60,.2),  0 0 28px rgba(230,170,90,.4) inset; }
}
.contract-tip { text-align: center; font-size: 0.75rem; color: #8b5a35; opacity: .8; letter-spacing: .5px; margin: 0.5rem 0 0; }

/* ============ 长情契 · 套餐卡片 ============ */
.plan-list {
  display: flex; flex-direction: column; gap: 0.6rem; margin: 0.4rem 0 0.6rem;
}
.plan-card {
  position: relative; padding: 0.8rem 1rem; cursor: pointer;
  border: 2px solid rgba(168,112,60,.28); border-radius: 0.85rem;
  background: linear-gradient(180deg, #fff8ea 0%, #f9ead0 100%);
  transition: all .28s var(--ease-soft);
  overflow: hidden; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.plan-card::before {
  content: ""; position: absolute; inset: 3px;
  border: 1px solid rgba(168,112,60,.12); border-radius: 0.65rem;
  pointer-events: none;
}
.plan-card:hover {
  border-color: #b9884a; transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(120,70,30,.18);
}
.plan-card.selected {
  border-color: #a83c3c;
  background: linear-gradient(180deg, #fff5e6 0%, #fce8c8 100%);
  box-shadow: 0 4px 16px rgba(160,60,60,.2), 0 0 0 2px rgba(168,60,60,.12);
}
.plan-card.selected::after {
  content: "✓"; position: absolute; top: 0.5rem; right: 0.7rem;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: linear-gradient(135deg, #a83c3c, #7a1e1e);
  color: #fdecd0; font-size: 0.8rem; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(120,30,30,.35);
}
.plan-tag {
  position: absolute; top: 0; left: 0; z-index: 2;
  padding: 0.15rem 0.6rem; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.1rem; color: #fdecd0;
  background: linear-gradient(135deg, #b9884a, #9a6f38);
  border-radius: 0.85rem 0 0.5rem 0;
}
.plan-card[data-tag="热门"] .plan-tag { background: linear-gradient(135deg, #a83c3c, #7a1e1e); }
.plan-card[data-tag="挚爱"] .plan-tag { background: linear-gradient(135deg, #6b3f9f, #4a2870); }

.plan-head {
  display: flex; align-items: baseline; gap: 0.5rem;
  margin: 0.4rem 0 0; flex-wrap: wrap;
}
.plan-name {
  font-size: 1.1rem; font-weight: 700; color: #4a280f; letter-spacing: 0.12rem;
}
.plan-price {
  font-size: 1.5rem; font-weight: 800; color: #a83c3c;
  font-family: "Georgia", var(--font); letter-spacing: 0.5px;
}
.plan-price::before { content: "¥"; font-size: 0.85rem; font-weight: 600; }
.plan-price-currency { font-size: 0.85rem; color: #8b5a35; font-weight: 600; }

.plan-benefits {
  display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0 0;
}
.benefit-chip {
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.2rem 0.6rem; font-size: 0.78rem; font-weight: 700;
  border-radius: 0.5rem; white-space: nowrap;
}
.benefit-silver { background: rgba(220,200,160,.35); color: #6b4320; border: 1px solid rgba(168,112,60,.2); }
.benefit-copper { background: rgba(240,200,140,.3); color: #8b4513; border: 1px solid rgba(200,140,80,.2); }
.benefit-hours { background: rgba(168,60,60,.12); color: #a83c3c; border: 1px solid rgba(168,60,60,.2); }
.benefit-chip .chip-icon { font-size: 0.85rem; }

.plan-desc {
  font-size: 0.78rem; font-weight: 600; color: #6b4728; margin-top: 0.35rem;
  letter-spacing: 0.5px;
}

/* 剩余时长 */
.chat-remaining {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  margin: 0.6rem 0 0.3rem; padding: 0.5rem 0.8rem;
  background: rgba(255,240,210,.5); border: 1px dashed rgba(168,112,60,.3);
  border-radius: 0.6rem;
}
.remaining-icon { font-size: 1rem; }
.remaining-label { font-size: 0.8rem; font-weight: 600; color: #6b4320; }
.remaining-value { font-size: 0.95rem; font-weight: 800; color: #a83c3c; font-family: "Georgia", var(--font); }

/* 地址折叠 */
.contract-addr-toggle {
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
  margin: 0.6rem 0 0; padding: 0.4rem; cursor: pointer;
  font-size: 0.82rem; font-weight: 600; color: #8b5a35;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.addr-toggle-arrow { font-size: 0.7rem; transition: transform .25s; }
.contract-addr-toggle.open .addr-toggle-arrow { transform: rotate(180deg); }

/* 印章按钮禁用态 */
.cap-btn--seal:disabled {
  opacity: .55; cursor: not-allowed; animation: none;
  background: linear-gradient(135deg, #8b6355, #6b4f45);
  box-shadow: none;
}

/* 购买成功toast（古风印章式） */
.toast-buy {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9);
  z-index: 500; padding: 1.2rem 1.8rem;
  background: linear-gradient(135deg, rgba(70,40,20,.95), rgba(100,60,30,.92));
  color: #fdecd0; font-size: 1rem; font-weight: 600; border-radius: 1.2rem; text-align: center;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0,0,0,.35), 0 0 0 2px rgba(210,150,80,.3) inset;
  border: 1.5px solid rgba(210,150,80,.4);
  opacity: 0; pointer-events: none; transition: all .4s var(--ease-spring);
  letter-spacing: 2px; max-width: 80vw; word-break: break-word;
}
.toast-buy.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast-buy .toast-emoji { font-size: 2.4rem; display: block; margin-bottom: 0.4rem; }
.toast-buy .toast-sub { font-size: 0.75rem; font-weight: 400; color: rgba(253,236,208,.7); margin-top: 0.2rem; letter-spacing: 1px; }

/* ============ 响应式 ============ */

/* 小屏手机（≤380px）：进一步压缩，保证一行 */
@media (max-width: 380px) {
  html { font-size: clamp(13px, 3.8vw, 15px); }
  .topbar { padding: 0.25rem 0.4rem; gap: 0.15rem; }
  .currency { padding: 0.15rem 0.3rem; gap: 0.1rem; font-size: 0.65rem; }
  .currency-icon { font-size: 0.65rem; }
  .currency-add { width: 0.95rem; height: 0.95rem; font-size: 0.55rem; }
  .pill-btn { padding: 0.25rem 0.4rem; font-size: 0.62rem; min-height: 1.6rem; }
  .pill-btn--icon { padding: 0.25rem 0.35rem; }
  .top-actions { gap: 0.15rem; }
  .ayao-id { left: 0.5rem; top: 6%; }
  .ayao-name { font-size: 1.3rem; letter-spacing: 0.2rem; padding: 0.2rem 0.6rem; }
  .chat-float { right: 0.5rem; left: 0.5rem; bottom: 8rem; width: auto; }
  .quick-row { bottom: 4.5rem; padding: 0 0.6rem; }
  .quick-pill { padding: 0.4rem 0.7rem; font-size: 0.72rem; min-height: 2.2rem; }
  .composer-float { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; }
  .send-btn, .mic-btn { width: 2.2rem; height: 2.2rem; }
  .voice-toggle { right: 0.5rem; bottom: 4.5rem; width: 2.2rem; height: 2.2rem; }
  .chat-hint { bottom: 6.5rem; left: 0.5rem; right: 0.5rem; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
  .inv-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 中等手机（381px~600px）：标准移动端布局 */
@media (min-width: 381px) and (max-width: 600px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 矮屏手机：压缩对话区高度 */
@media (max-height: 700px) {
  .chat-bubbles { max-height: 34vh; }
  .ayao-id { top: 6%; }
}

/* 横屏模式：重新排列底部元素 */
@media (orientation: landscape) and (max-height: 500px) {
  .ayao-id { top: 7%; left: 1rem; }
  .chat-float { right: 0.8rem; left: 0.8rem; bottom: 5.5rem; width: auto; }
  .quick-row { bottom: 4rem; }
  .composer-float { bottom: 0.5rem; }
  .voice-toggle { bottom: 4rem; }
  .chat-hint { bottom: 5.5rem; }
  .chat-bubbles { max-height: 30vh; padding-right: 0.5rem; }
}

/* 桌面宽屏：取消 phone-shell 的 safe-area padding */
@media (min-width: 600px) and (min-height: 700px) {
  .phone-shell {
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ============ 夜步清溪 · 互动剧情 ============ */
.modal-story { z-index: 1000; }
.story-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
/* 舞台：手机端全屏沉浸；桌面端居中成手机面板，与 phone-shell 一致 */
.story-stage {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  z-index: 1001; overflow: hidden;
  background: #1a0f07;
}
@media (min-width: 600px) and (min-height: 700px) {
  .story-stage {
    inset: auto; margin: auto;
    width: min(420px, calc(100vh * 9 / 16 - 40px));
    height: min(calc(100vh - 40px), calc(100vw * 16 / 9 - 40px));
    max-width: 420px; max-height: 900px;
    border-radius: 32px;
    box-shadow: 0 0 0 10px #1a0f07, 0 0 0 12px rgba(255,200,150,.08), 0 30px 80px rgba(0,0,0,.6);
  }
  .story-mask { border-radius: 0; }
}
/* 背景图 */
.story-bg {
  position: absolute; inset: 0; z-index: 0;
  background: url('../assets/story_bg_riverside.jpg') center / cover no-repeat;
  background-color: #1a1a2e;
  transition: opacity 0.4s ease-in-out;
}
.story-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,10,5,.3) 0%, transparent 30%, transparent 45%, rgba(20,10,5,.78) 100%);
}
/* 顶部标题 */
.story-header {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: center;
  padding: 0.8rem 1rem; gap: 1rem;
  padding-top: max(0.8rem, env(safe-area-inset-top));
  flex-shrink: 0;
}
.story-act-title {
  font-size: 1rem; font-weight: 700; color: #fdecd0; letter-spacing: 0.3rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.story-close {
  position: absolute; right: 1rem; top: 0.8rem; top: max(0.8rem, env(safe-area-inset-top));
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.2);
  color: #fdecd0; font-size: 1rem; cursor: pointer;
  display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
}
.story-close:active { transform: scale(.9); }

/* 对话区：贴底，古风半透明 */
.story-dialog {
  position: relative; z-index: 2;
  margin: auto 0.7rem 0.5rem; padding: 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(30,20,10,.85) 0%, rgba(45,30,15,.8) 100%);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(184,136,74,.35);
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255,230,180,.15) inset, 0 8px 30px rgba(0,0,0,.4);
  min-height: 5rem;
  -webkit-user-select: none; user-select: none;
}
.story-speaker {
  font-size: 0.8rem; font-weight: 700; color: #d8a663; letter-spacing: 0.15rem;
  margin-bottom: 0.4rem; min-height: 1rem;
}
.story-speaker.narration { color: rgba(255,230,180,.6); font-style: italic; }
.story-speaker.system { color: #c9a06a; }
.story-text {
  font-size: 0.95rem; font-weight: 600; line-height: 1.75; color: #f5e6c8;
  letter-spacing: 0.5px; min-height: 2rem;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.story-text.typing::after {
  content: "▎"; animation: blink .6s step-end infinite; color: #d8a663;
}
@keyframes blink { 50% { opacity: 0; } }

/* 选项按钮：默认隐藏，仅在 renderChoices 时显示 */
.story-choices {
  position: relative; z-index: 2; display: flex; flex-direction: column; gap: 0.55rem;
  margin: 0 0.7rem 0.7rem; animation: slideUp .35s var(--ease-soft);
  flex-shrink: 0;
}
.story-choices[hidden] { display: none !important; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.story-choice {
  padding: 0.85rem 1.05rem; font-size: 0.9rem; font-weight: 700; line-height: 1.5;
  color: #4a280f; text-align: left; cursor: pointer;
  background: linear-gradient(180deg, #fff8ea 0%, #f9ead0 100%);
  border: 1.5px solid rgba(168,112,60,.3); border-radius: 14px;
  transition: all .25s var(--ease-soft);
  -webkit-tap-highlight-color: transparent; position: relative; overflow: hidden;
  touch-action: manipulation;
  min-height: 44px;
}
.story-choice::before {
  content: "❖"; margin-right: 0.5rem; color: #b9884a; font-size: 0.75rem;
}
.story-choice:hover {
  border-color: #b9884a; transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(120,70,30,.2);
  background: linear-gradient(180deg, #fffaf0 0%, #fcf0d8 100%);
}
.story-choice:active { transform: scale(.97); }

/* 继续提示 */
.story-tap-hint {
  position: relative; z-index: 2; text-align: center;
  font-size: 0.74rem; font-weight: 600; color: rgba(253,236,208,.55);
  letter-spacing: 0.2rem; padding: 0.5rem; margin: 0 0 0.3rem;
  margin-bottom: max(0.3rem, env(safe-area-inset-bottom));
  animation: pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse { 50% { opacity: .4; } }
.story-tap-hint[hidden] { display: none; }

/* 夜步按钮配色 */
.pill-btn--story {
  background: rgba(70,40,20,.45); border-color: rgba(200,160,90,.25);
}
.pill-btn--story:hover { background: rgba(90,55,30,.5); }

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

}

/* 剧情入口卡片：图片缩略图 */
.shop-item--story .item-emoji--img {
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid rgba(212,175,55,0.3);
}


/* ============ 合规:协议弹窗 ============ */
.modal-agreement, .modal-pay-confirm {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-agreement[hidden], .modal-pay-confirm[hidden] { display: none; }
.agreement-mask, .pay-confirm-mask {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(40,20,8,.82) 0%, rgba(13,7,4,.94) 70%);
  backdrop-filter: blur(6px);
}
.agreement-box, .pay-confirm-box {
  position: relative; z-index: 1;
  width: min(380px, 100%); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(180deg, #fff8ea 0%, #f9ead0 100%);
  border: 1.5px solid rgba(168,112,60,.4);
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(255,230,180,.4) inset, 0 20px 50px rgba(40,20,8,.5);
  padding: 1.5rem 1.25rem;
}
.agreement-head, .pay-confirm-head {
  text-align: center; margin-bottom: 1rem;
}
.agreement-deco { color: var(--primary); font-size: 1rem; margin: 0 .3rem; }
.agreement-title, .pay-confirm-title {
  display: inline; font-size: 1.3rem; font-weight: 800; color: var(--text);
  letter-spacing: 0.25rem;
}
.agreement-body { font-size: 0.85rem; color: var(--text-soft); line-height: 1.75; }
.agreement-welcome { color: var(--text); margin-bottom: .8rem; font-weight: 600; }
.agreement-list { padding-left: 1.2rem; margin-bottom: .8rem; }
.agreement-list li { margin-bottom: .55rem; }
.agreement-list b, .pay-confirm-list b { color: var(--text); font-weight: 700; }
.agreement-foot { color: var(--text-soft); font-size: 0.78rem; font-style: italic; }
.agreement-check {
  display: flex; align-items: center; gap: .5rem;
  margin: 1rem 0 .8rem; padding: .7rem .8rem;
  background: rgba(255,240,210,.6); border-radius: 12px;
  border: 1px solid rgba(168,112,60,.2);
  cursor: pointer;
}
.agreement-check input { width: 18px; height: 18px; accent-color: var(--primary-deep); cursor: pointer; }
.agreement-check-text { font-size: 0.82rem; color: var(--text); font-weight: 600; }
.agreement-actions { text-align: center; }
.agreement-actions .cap-btn { width: 100%; padding: .8rem; font-size: 1rem; }
.agreement-actions .cap-btn:disabled { opacity: .5; cursor: not-allowed; }
.agreement-exit {
  text-align: center; margin-top: .8rem; font-size: 0.78rem;
  color: var(--text-soft); text-decoration: underline; cursor: pointer;
}

/* ============ 合规:支付二次确认 ============ */
.pay-confirm-body { font-size: 0.88rem; color: var(--text-soft); line-height: 1.75; }
.pay-confirm-text { color: var(--text); font-weight: 600; margin-bottom: .6rem; }
.pay-confirm-list { list-style: none; padding-left: 0; margin-bottom: .8rem; }
.pay-confirm-list li { padding: .3rem 0 .3rem 1.1rem; position: relative; }
.pay-confirm-list li::before { content: "❀"; position: absolute; left: 0; color: var(--primary); font-size: .7rem; top: .5rem; }
.pay-confirm-amount {
  text-align: center; font-size: 1.4rem; font-weight: 800; color: var(--rose-deep);
  padding: .6rem; background: rgba(255,240,210,.5); border-radius: 10px;
}
.pay-confirm-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.pay-confirm-actions .cap-btn { flex: 1; padding: .75rem; font-size: .95rem; }
.cap-btn--ghost {
  background: transparent; color: var(--text-soft);
  border: 1.5px solid rgba(168,112,60,.35);
}

/* ============ 合规:AI 身份徽章 ============ */
.ai-badge {
  display: inline-block; vertical-align: middle;
  margin-left: .35rem; padding: 1px 7px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-deep), var(--rose-deep));
  border-radius: var(--radius-pill);
  cursor: help;
  box-shadow: 0 2px 6px rgba(196,125,80,.35);
  animation: ai-badge-pulse 2.4s var(--ease-soft) infinite;
}
@keyframes ai-badge-pulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(196,125,80,.35); }
  50% { box-shadow: 0 2px 14px rgba(221,124,112,.55); }
}

/* ============ 合规:2小时提醒 toast ============ */
.reminder-toast {
  position: fixed; left: 50%; bottom: 20%; transform: translateX(-50%);
  z-index: 9000; width: min(320px, 88vw);
  background: linear-gradient(180deg, #fff8ea 0%, #f9ead0 100%);
  border: 1.5px solid rgba(168,112,60,.4); border-radius: 16px;
  box-shadow: 0 12px 36px rgba(40,20,8,.4);
  padding: 1rem 1.1rem; text-align: center;
  animation: reminder-in .5s var(--ease-spring);
}
@keyframes reminder-in { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
.reminder-emoji { font-size: 1.6rem; margin-bottom: .3rem; }
.reminder-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .3rem; }
.reminder-text { font-size: 0.82rem; color: var(--text-soft); line-height: 1.6; }
.reminder-close { margin-top: .6rem; padding: .4rem 1.2rem; font-size: .82rem;
  background: var(--primary-light); border: none; border-radius: var(--radius-pill); color: var(--text); cursor: pointer; }


/* === 心意四档商品 · 转化第一梯队视觉强化 === */
.shop-grid .shop-item[data-cat="心意"],
.shop-item[data-cat="心意"] {
  border: 1.8px solid rgba(221,154,110,.55);
  background: linear-gradient(180deg, #fff7ea 0%, #fce7c7 100%);
  box-shadow: 0 4px 14px rgba(196,125,80,.18);
  position: relative;
}
.shop-item[data-cat="心意"]::after {
  content: attr(data-tag);
  position: absolute;
  top: 0.25rem; right: 0.35rem;
  background: linear-gradient(135deg, #e4996a, #c47d50);
  color: #fffaf0;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 1px;
  padding: 0.08rem 0.35rem; border-radius: 999px;
  box-shadow: 0 2px 5px rgba(120,70,30,.25);
}
.shop-item[data-cat="心意"] .item-name {
  color: #6e3a16;
}
.shop-item[data-cat="心意"] .item-desc {
  color: #8b5a35;
  font-size: 0.74rem;
}

/* === 心意商品购买后 · 阿耀情感反应弹窗 === */
.reaction-box {
  max-width: 360px;
  margin: 0 auto;
}
.ancient-title--reaction {
  font-size: 1.05rem;
  color: #6e3a16;
  letter-spacing: 4px;
}
.reaction-title {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #5a3218;
  padding: 0.1rem 0 0.35rem;
  border-bottom: 1px dashed rgba(168,112,60,.3);
  margin-bottom: 0.3rem;
  letter-spacing: 1.5px;
}
.reaction-body {
  max-height: 42vh;
  overflow-y: auto;
  padding: 0.3rem 0.15rem 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.reaction-line {
  display: flex; align-items: flex-start; gap: 0.35rem;
  padding: 0.15rem 0;
  line-height: 1.55;
  animation: reaction-in .5s ease both;
}
@keyframes reaction-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reaction-dot {
  flex-shrink: 0;
  width: 0.4rem; height: 0.4rem; border-radius: 50%;
  margin-top: 0.35rem;
  background: linear-gradient(135deg, #e4996a, #c47d50);
  box-shadow: 0 0 0 3px rgba(221,154,110,.18);
}
.reaction-words {
  flex: 1; min-width: 0;
  font-size: 0.9rem;
  color: #4a280f;
  font-weight: 500;
}
.reaction-action {
  font-size: 0.78rem;
  color: #a06b44;
  font-style: italic;
  padding-left: 0.8rem;
  letter-spacing: 0.5px;
}
.reaction-line--last {
  opacity: .55;
}
.reaction-ok {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.92rem;
  letter-spacing: 2px;
}
