/* ==========================================================================
   欲望冷藏室 (Desire Chill Room) - 低饱和日系治愈美学系统
   ========================================================================== */

:root {
  --bg-primary: #f5f6f4;
  --bg-secondary: #eef1ee;
  --bg-card: rgba(255, 255, 255, 0.78);
  --bg-card-hover: rgba(255, 255, 255, 0.92);
  
  /* 日系低饱和色盘：冰青、晨霜、凝冰白、暖杏金 */
  --ice-mint: #7ea499;
  --ice-mint-dark: #4e7368;
  --ice-mint-light: #d8e5e1;
  --ice-mint-glow: rgba(126, 164, 153, 0.28);
  
  --glacier-blue: #9ab4c2;
  --glacier-light: #e4edf1;
  
  --warm-gold: #c29b7a;
  --warm-gold-light: #f7ede2;

  --frost-border: rgba(188, 209, 204, 0.55);
  --frost-shadow: 0 12px 36px -8px rgba(78, 102, 98, 0.09);

  --text-primary: #2c3834;
  --text-secondary: #6e7c77;
  --text-muted: #9aa8a3;
  --text-gold: #ab825c;

  /* 中文字体优先：日文明朝体会把简体字拆成两种字形混排，导致字大小/基线不一 */
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: #e4e7e4;
  background-image: 
    radial-gradient(at 0% 0%, rgba(216, 229, 225, 0.65) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(228, 237, 241, 0.7) 0px, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  min-height: var(--app-height, 100dvh);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* 移动端 App 模拟容器
   手机浏览器的 100vh 不含地址栏 / 底部工具栏，会比看得见的区域高，导致一屏放不下；
   这里用 JS 写入的实际可见高度（--app-height），不支持时退回 100dvh */
.app-container {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  max-height: 890px;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

/* 手机上 App 就是整个页面：禁止页面本身滚动，避免整体被推走 */
@media (max-width: 479px) {
  html,
  body {
    height: var(--app-height, 100dvh);
    overflow: hidden;
  }
}

@media (min-width: 480px) {
  .app-container {
    height: 92vh;
    border-radius: 36px;
    border: 8px solid #ffffff;
    box-shadow: 0 30px 80px rgba(78, 102, 98, 0.16);
  }
}

/* 视图面板管理 */
.view-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  z-index: 10;
  overflow: hidden;
}

.view-panel:not(.active) {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.97);
}

.detail-view {
  transform: translateX(100%);
  z-index: 25;
}

.detail-view.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* 顶部环境霜雾光晕 */
.frost-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 220px;
  background: radial-gradient(circle, rgba(162, 196, 188, 0.32) 0%, rgba(245, 246, 244, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

/* 顶部导航与状态条 */
.app-header {
  position: relative;
  z-index: 10;
  padding: 24px 20px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.brand-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-sub {
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-seal {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid var(--ice-mint);
  color: var(--ice-mint);
  border-radius: 4px;
  transform: rotate(-3deg);
  font-family: var(--font-serif);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--frost-border);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

.icon-btn:hover {
  background: #ffffff;
  color: var(--ice-mint);
  transform: scale(1.05);
}

.icon-btn:active {
  transform: scale(0.94);
}

/* 守护金库横幅 (Stat Card) */
.stat-banner {
  position: relative;
  z-index: 10;
  margin: 4px 20px 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--frost-border);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-feature-settings: "tnum";
}

.stat-value.gold {
  color: var(--text-gold);
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(188, 209, 204, 0.3);
}

/* 主内容视口与冷藏仓列表 */
.vault-viewport {
  position: relative;
  z-index: 5;
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 100px;
  scroll-behavior: smooth;
}

.vault-viewport::-webkit-scrollbar {
  width: 4px;
}
.vault-viewport::-webkit-scrollbar-thumb {
  background: var(--ice-mint-light);
  border-radius: 4px;
}

.vault-intro {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
  padding: 0 2px;
}

.vault-intro .zen-quote {
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--text-muted);
}

/* 欲望冰块网格 (The Ice Vault Grid) */
.vault-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* 放行回访卡片 */
.followup-card {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--frost-border);
  box-shadow: var(--frost-shadow);
  animation: cardFadeIn 0.4s ease-out backwards;
}

.followup-question {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.followup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.followup-btn {
  border: 1px solid var(--frost-border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.followup-btn:active {
  transform: scale(0.96);
}

.followup-skip {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}

/* ==========================================================================
   清醒洞察
   ========================================================================== */
.insights-view {
  transform: translateX(100%);
  z-index: 26;
  padding: 18px 20px 0;
}

.insights-view.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.header-spacer {
  width: 76px;
}

.insights-body {
  flex: 1;
  overflow-y: auto;
  margin: 14px -20px 0;
  padding: 0 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ins-card {
  background: #ffffff;
  border: 1px solid var(--frost-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 4px 20px rgba(126, 164, 153, 0.06);
}

.ins-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.ins-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ins-empty {
  text-align: center;
  padding: 28px 20px;
}

.ins-empty-icon {
  margin-bottom: 10px;
}

.ins-empty-icon img,
.empty-icon img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 10px 24px -8px rgba(78, 102, 98, 0.35);
}

.ins-empty h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  margin-bottom: 6px;
}

.ins-empty p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* 主数字：放下率 */
.ins-hero {
  text-align: center;
  padding: 22px 18px 16px;
}

.ins-hero-value {
  font-family: var(--font-sans);
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.ins-hero-value span {
  font-size: 26px;
  margin-left: 2px;
  color: var(--text-secondary);
}

.ins-hero-label {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--text-secondary);
}

.ins-split {
  display: flex;
  gap: 2px; /* 分段之间的表面间隙 */
  height: 12px;
  margin: 18px 0 10px;
}

.ins-split-seg {
  min-width: 4px;
}

.ins-split-seg:first-child {
  border-radius: 4px 0 0 4px;
}

.ins-split-seg:last-child {
  border-radius: 0 4px 4px 0;
}

.ins-split.single .ins-split-seg {
  border-radius: 4px;
}

.ins-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.ins-legend i,
.ins-record-outcome i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: 0;
}

/* 统计小卡 */
.ins-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ins-tile {
  background: #ffffff;
  border: 1px solid var(--frost-border);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ins-tile-label {
  font-size: 11px;
  color: var(--text-muted);
}

.ins-tile-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.ins-tile-value small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

/* 洞察句子 */
.ins-sentences {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ins-sentences li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.ins-sentences b {
  color: var(--text-primary);
}

.ins-sentence-icon {
  flex-shrink: 0;
  width: 22px;
  display: flex;
  justify-content: center;
  padding-top: 2px;
  color: var(--ice-mint-dark);
}

/* 冲动时段柱状图 */
.ins-cols {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 96px;
  margin-top: 18px;
  border-bottom: 1px solid #e3e8e6;
}

.ins-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  cursor: default;
}

.ins-col-bar {
  width: 100%;
  max-width: 24px;
  border-radius: 4px 4px 0 0;
}

.ins-col-label {
  position: absolute;
  top: -16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ins-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.ins-table {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.ins-table summary {
  cursor: pointer;
  color: var(--text-muted);
}

.ins-table table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.ins-table th,
.ins-table td {
  text-align: left;
  padding: 4px 0;
  border-bottom: 1px solid #eef1ef;
}

/* 各类放下率横向条 */
.ins-bars {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ins-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: default;
}

.ins-bar-name.ins-mood-name {
  flex-basis: 76px;
}

.ins-bar-name {
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-primary);
}

/* 绘图区右侧留出数值标签的位置，百分比按绘图区宽度计算 */
.ins-bar-track {
  flex: 1;
  position: relative;
  height: 14px;
  margin-right: 82px;
  min-width: 0;
}

.ins-bar-fill {
  height: 100%;
  border-radius: 0 4px 4px 0;
}

.ins-bar-value {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.ins-bar-value small {
  font-weight: 400;
  color: var(--text-muted);
}

/* 最近裁决 */
.ins-records {
  list-style: none;
  margin-top: 8px;
}

.ins-record {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1ef;
}

.ins-record:last-child {
  border-bottom: none;
}

.ins-record-icon {
  display: flex;
  flex-shrink: 0;
}

.ins-record-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ins-record-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ins-record-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.ins-record-outcome {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

/* 图表悬停提示 */
.chart-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 50;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(44, 56, 52, 0.92);
  color: #ffffff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
}

.chart-tooltip.show {
  opacity: 1;
}

/* 到期提醒横幅 */
.due-banner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(194, 155, 122, 0.35);
  border-radius: var(--radius-md);
  background: var(--warm-gold-light);
  color: var(--text-gold);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  animation: cardFadeIn 0.4s ease-out backwards;
}

/* 详情页：到期提醒 / 加到日历 */
.reminder-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.reminder-pill {
  border: 1px solid var(--frost-border);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
}

.reminder-pill:active {
  transform: scale(0.96);
}

.reminder-pill.on {
  color: var(--ice-mint-dark);
  border-color: var(--ice-mint);
  background: var(--ice-mint-light);
}

/* 页内提示条 */
.app-toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 100px;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(44, 56, 52, 0.9);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.app-toast-action {
  flex-shrink: 0;
  border: none;
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  background: var(--ice-mint);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* 左滑删除行 */
.swipe-row {
  position: relative;
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s, margin 0.3s;
}

.swipe-row.removing {
  opacity: 0;
  margin-bottom: -16px; /* 抵消 grid gap，让下面的卡片无缝顶上 */
  overflow: hidden;
}

.swipe-delete {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0;
  opacity: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: #e0625a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(224, 98, 90, 0.45);
}

.swipe-delete:active {
  background: #c9524b;
}

.swipe-row .ice-card {
  touch-action: pan-y;
}

/* 核心拟物冰块卡片 */
.ice-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(235, 246, 244, 0.72) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  outline: 1px solid var(--frost-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 
    var(--frost-shadow),
    inset 0 1px 3px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(126, 164, 153, 0.15);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  animation: cardFadeIn 0.4s ease-out backwards;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 0 16px 40px -6px rgba(126, 164, 153, 0.25);
}

.ice-card:active {
  transform: scale(0.98);
}

.ice-card-inner {
  display: flex;
  gap: 14px;
  position: relative;
  z-index: 2;
}

/* 3D 拟真微缩冰块图标外壳 */
.item-thumb-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(216, 238, 234, 0.6) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 8px 18px rgba(126, 164, 153, 0.18),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 5px rgba(100, 140, 130, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  flex-shrink: 0;
}

.item-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) brightness(1.02);
}

.frost-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(188, 222, 215, 0.45) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline; /* 价格与标题首行基线对齐 */
  gap: 8px;
}

.item-top > div:first-child {
  min-width: 0;
}

.item-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 4px;
  text-wrap: balance; /* 折行时两行均分，避免第二行只剩一个字 */
}

.item-price {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-gold);
  font-feature-settings: "tnum";
}

.item-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(126, 164, 153, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
  width: fit-content;
}

.freeze-status-row {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.countdown-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ice-mint-dark);
  background: rgba(126, 164, 153, 0.15);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.countdown-badge.expired {
  color: #c46a63;
  background: rgba(196, 106, 99, 0.15);
}

.countdown-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.status-hint {
  font-size: 11px;
  color: var(--ice-mint);
  font-weight: 500;
}

/* 空状态 */
.empty-vault {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-icon {
  font-size: 48px;
  opacity: 0.7;
  animation: floatAir 3s ease-in-out infinite;
}

@keyframes floatAir {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-primary);
}

.empty-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 260px;
}

/* 底部操作浮栏 */
.bottom-dock {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 16px 20px 24px;
  background: linear-gradient(to top, var(--bg-primary) 70%, rgba(245, 246, 244, 0) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.freeze-action-btn {
  flex: 1;
  height: 52px;
  background: linear-gradient(135deg, var(--ice-mint) 0%, #689286 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 24px -4px var(--ice-mint-glow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.freeze-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -2px rgba(126, 164, 153, 0.4);
}

.freeze-action-btn:active {
  transform: scale(0.97);
}

/* ==========================================================================
   2. 3D 拟真物理冰块详情页 (Detail View with Three.js)
   ========================================================================== */

.detail-view {
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}

.back-nav-btn {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--frost-border);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

.back-nav-btn:hover {
  background: #ffffff;
  color: var(--ice-mint);
}

.back-arrow {
  font-size: 16px;
  line-height: 1;
}

.detail-tag-badge {
  font-size: 12px;
  color: var(--ice-mint-dark);
  background: var(--ice-mint-light);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-serif);
}

.crack-pill {
  font-size: 12px;
  color: var(--text-gold);
  background: var(--warm-gold-light);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

/* 顶部冷藏时间倒计时仪表板 */
.timer-dashboard {
  position: relative;
  z-index: 5;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--frost-border);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(126, 164, 153, 0.08);
  backdrop-filter: blur(12px);
  margin-top: 8px;
}

.timer-subhead {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-family: var(--font-serif);
}

.timer-countdown {
  font-size: 30px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1px 0;
  font-feature-settings: "tnum";
  letter-spacing: 0.02em;
}

.time-unit {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
}

.timer-hint {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.timer-hint b {
  color: var(--ice-mint-dark);
}

.ice-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ice-mint);
  animation: pulseDot 1.5s infinite;
}

/* 核心 3D 冰块舞台 */
.ice-stage {
  flex: 1;
  min-height: 0; /* 允许在矮屏上收缩 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 4px 0;
}

/* 浮动飘字发射器 */
.float-emitter {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.float-chip {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--ice-mint);
  color: var(--ice-mint-dark);
  font-size: 14px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(126, 164, 153, 0.35);
  pointer-events: none;
  animation: floatUpFade 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes floatUpFade {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.7); }
  25% { opacity: 1; transform: translate(-50%, -16px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -56px) scale(0.9); }
}

/* 3D WebGL 渲染容器 */
.ice-3d-canvas-container {
  width: calc(100% + 40px);
  /* 向上延伸到计时面板下方（画布背景与页面同色），给冰块倾斜时留出头部空间 */
  margin: -56px -20px 0;
  /* 占满计时面板与底部操作之间剩下的空间，而不是固定高度 */
  flex: 1 1 auto;
  height: auto;
  min-height: 200px;
  max-height: 500px;
  position: relative;
  cursor: pointer;
  touch-action: none;
}

.ice-3d-canvas-container canvas {
  display: block;
}

/* 有鼠标的设备：冰块区域隐藏系统光标，用小锤子代替 */
@media (hover: hover) and (pointer: fine) {
  .ice-3d-canvas-container canvas {
    cursor: none;
  }
}

/* 🔨 锤子光标：外层跟随指针，内层负责挥锤旋转 */
.hammer-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  will-change: transform;
}

.hammer-cursor.visible {
  opacity: 1;
}

.hammer-inner {
  display: block;
  font-size: 48px;
  line-height: 1;
  transform-origin: 82% 82%; /* 以握柄末端为支点 */
  transform: rotate(8deg);
  transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.3, 1);
  filter: drop-shadow(0 4px 6px rgba(44, 56, 52, 0.25));
}

.hammer-glyph {
  display: inline-block;
}

.hammer-glyph.mirror {
  transform: scaleX(-1);
}

.hammer-cursor.raised .hammer-inner {
  transform: rotate(38deg);
}

.hammer-cursor.strike .hammer-inner {
  animation: hammerStrike 0.32s cubic-bezier(0.3, 0, 0.2, 1);
}

@keyframes hammerStrike {
  0%   { transform: rotate(38deg); }
  28%  { transform: rotate(-16deg); }
  48%  { transform: rotate(-6deg); }
  100% { transform: rotate(8deg); }
}

.ice-3d-canvas-container:active {
  cursor: grabbing;
}

/* 冰块下方悬浮信息卡 */
.floating-item-card {
  margin-top: -28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--frost-border);
  border-radius: var(--radius-pill);
  padding: 6px 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  z-index: 10;
}

.detail-item-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-item-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-gold);
  font-feature-settings: "tnum";
}



.tap-guide {
  position: absolute;
  top: 18px;
  right: 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 12;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  pointer-events: none;
  transition: opacity 0.3s;
}

.tap-hand {
  animation: handBounce 1s infinite alternate;
}

@keyframes handBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

/* 详情页底部控制区 */
.detail-footer {
  position: relative;
  z-index: 20;
}

.cooling-status-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.crack-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(188, 209, 204, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.crack-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ice-mint) 0%, var(--warm-gold) 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.cooling-hint-text {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-serif);
}

.judgment-action-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.judgment-banner {
  background: var(--warm-gold-light);
  color: var(--text-gold);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 12px;
  text-align: center;
  font-weight: 500;
  animation: pulseDot 2s infinite;
}

.shatter-btn {
  height: 50px;
  background: linear-gradient(135deg, #4f7d70 0%, #3a6257 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(58, 98, 87, 0.28);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.shatter-btn:active {
  transform: scale(0.97);
}

.melt-btn {
  height: 42px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.melt-btn:hover {
  background: #e2e8e4;
  color: var(--text-primary);
}

/* ==========================================================================
   3. 抽屉弹窗 (Freeze Modal) & 照片上传预览
   ========================================================================== */

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(44, 56, 52, 0.4);
  backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-mask.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  padding: 24px 24px 34px;
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.1);
  max-height: 88%; /* 相对 App 容器（= 实际可见高度），不用 vh */
  overflow-y: auto;
}

.modal-mask.active .modal-sheet {
  transform: translateY(0);
}

/* 封存弹窗：压缩留白，保证一屏内放下 */
#freeze-modal .modal-sheet {
  padding: 14px 20px 22px;
  max-height: 94%;
}

#freeze-modal .sheet-handle {
  margin-bottom: 12px;
}

#freeze-modal .sheet-header {
  margin-bottom: 14px;
}

#freeze-modal .form-label {
  margin-bottom: 8px;
}

.freeze-confirm {
  width: 100%;
  height: 50px;
  flex: none;
  margin-top: 4px;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: #d8deda;
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sheet-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ==========================================================================
   2D 冰块（3D 不可用时的降级）
   ========================================================================== */
.ice2d {
  /* 旧设备（不支持 WebGL2 的多半也不支持 color-mix / aspect-ratio），这里只用兼容性好的写法 */
  --ice-a: #eaf6fb;
  --ice-b: #9fd3e6;
  --ice-b-rgb: 159, 211, 230;
  --melt-scale: 1;
  --puddle-scale: 1;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 40px; /* 容器上方有一截藏在计时面板下 */
  overflow: hidden;
}

.ice2d-stage {
  position: relative;
  width: 62vw;
  max-width: 240px;
  height: 62vw;
  max-height: 240px;
  transform: scale(var(--melt-scale));
  transform-origin: 50% 100%;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .ice2d-stage {
    cursor: none;
  }
}

.ice2d-back,
.ice2d-front {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  transition: opacity 1.8s ease, transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 冰体：浅蓝渐变 + 底部加深（越厚越蓝）+ 柔和投影 */
.ice2d-back {
  background:
    radial-gradient(120% 80% at 50% 110%, rgba(var(--ice-b-rgb), 0.7) 0%, rgba(var(--ice-b-rgb), 0) 60%),
    linear-gradient(150deg, var(--ice-a) 0%, rgba(var(--ice-b-rgb), 0.6) 100%),
    var(--ice-a);
  box-shadow: 0 30px 40px -24px rgba(44, 56, 52, 0.45);
}

/* 正面：顶部高光、边缘反光、白色棱线，叠在卡片上方营造「冻在里面」的感觉 */
.ice2d-front {
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(0deg, rgba(var(--ice-b-rgb), 0.28) 0%, rgba(var(--ice-b-rgb), 0) 45%);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.9),
    inset 0 -14px 28px rgba(var(--ice-b-rgb), 0.3),
    inset 8px 0 18px rgba(255, 255, 255, 0.35);
}

.ice2d-front::before {
  content: "";
  position: absolute;
  top: 9%;
  left: 10%;
  width: 36%;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  transform: rotate(-6deg);
  filter: blur(0.5px);
}

.ice2d-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 74%;
  transform: translate(-50%, -50%) rotate(-2deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  background: linear-gradient(160deg, #fffdf8, #f1ede4);
  box-shadow: 0 6px 14px -8px rgba(44, 56, 52, 0.35);
  text-align: center;
  opacity: 0.94;
  transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s;
}

.ice2d-card.photo {
  justify-content: flex-start;
  padding: 7px 7px 8px;
  background: #fbfaf6;
}

.ice2d-card img {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: cover;
  border-radius: 6px;
}

.ice2d-card-tag {
  font-size: 9px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: #e1ebe7;
  color: var(--ice-mint-dark);
  font-family: var(--font-serif);
}

.ice2d-card-icon svg {
  display: block;
  width: 44px;
  height: 44px;
}

.ice2d-card-title {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  text-wrap: balance;
}

.ice2d-card-price {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-gold);
}

/* 裂纹 */
.ice2d-cracks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ice2d-cracks path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.ice2d-crack-shadow {
  stroke: rgba(88, 122, 130, 0.35);
  stroke-width: 2.2;
  transform: translate(0.4px, 0.5px);
}

.ice2d-crack-line {
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 1.2;
}

.ice2d-crack-dot {
  fill: rgba(255, 255, 255, 0.9);
}

.ice2d-cracks g.grow {
  transform-box: fill-box;
  transform-origin: center;
  animation: crackGrow 0.18s ease-out;
}

@keyframes crackGrow {
  from { opacity: 0; transform: scale(0.2); }
  to { opacity: 1; transform: none; }
}

/* 敲击：轻微挤压回弹 */
.ice2d-stage.hit {
  animation: ice2dHit 0.28s cubic-bezier(0.3, 0, 0.2, 1);
}

@keyframes ice2dHit {
  0% { transform: scale(var(--melt-scale)); }
  30% { transform: scale(calc(var(--melt-scale) * 0.96)) rotate(-1deg); }
  60% { transform: scale(calc(var(--melt-scale) * 1.01)) rotate(0.5deg); }
  100% { transform: scale(var(--melt-scale)); }
}

/* 地面水渍 */
.ice2d-puddle {
  position: absolute;
  left: 50%;
  top: calc(50% + 20px + min(31vw, 120px) - 14px);
  width: 78vw;
  max-width: 300px;
  height: 44px;
  transform: translateX(-50%) scale(var(--puddle-scale));
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(170, 205, 215, 0.45), rgba(170, 205, 215, 0));
  transition: transform 1.2s ease;
}

/* 化开：冰体消失，卡片落进水里 */
.ice2d.melted .ice2d-back,
.ice2d.melted .ice2d-front,
.ice2d.shattered .ice2d-back,
.ice2d.shattered .ice2d-front {
  opacity: 0;
  transform: scale(0.3) translateY(40%);
}

.ice2d.melted .ice2d-stage,
.ice2d.shattered .ice2d-stage {
  transform: none;
  cursor: default;
}

.ice2d.melted .ice2d-card,
.ice2d.shattered .ice2d-card {
  opacity: 1;
  transform: translate(-50%, -22%) perspective(500px) rotateX(58deg);
}

.ice2d.melted .ice2d-puddle {
  transform: translate(-50%, -54px) scale(1.8, 2.4);
}

.ice2d.instant * {
  transition: none !important;
}

/* 击碎：冰屑飞散 */
.ice2d-shards {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ice2d-shards i {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 3px 8px 2px 6px;
  background: linear-gradient(140deg, #ffffff, var(--ice-b));
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9);
  animation: shardFly 1.2s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}

@keyframes shardFly {
  from { transform: translate(0, 0) rotate(0); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* 新版本提醒 */
.update-banner {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(44, 56, 52, 0.94);
  backdrop-filter: blur(10px);
  color: #ffffff;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.35);
  transform: translateY(-140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

.update-banner.show {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.update-icon {
  display: flex;
  color: #9fd3e6;
}

.update-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.update-title {
  font-size: 13px;
}

.update-notes {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.update-btn {
  flex-shrink: 0;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  background: #9fd3e6;
  color: #1e3a44;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.update-btn:disabled {
  opacity: 0.7;
}

.update-close {
  flex-shrink: 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
}

/* 数据只存在本机的提醒 */
.storage-tip {
  position: relative;
  z-index: 10;
  margin: -6px 20px 14px;
  padding: 8px 8px 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  background: var(--warm-gold-light);
  font-size: 12px;
  color: var(--text-gold);
}

.storage-tip-text {
  flex: 1;
  line-height: 1.4;
}

.storage-tip-btn {
  flex-shrink: 0;
  border: 1px solid rgba(194, 155, 122, 0.5);
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--text-gold);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
}

.storage-tip-close {
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

/* 洞察页：数据与备份 */
.backup-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.backup-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--frost-border);
  border-radius: var(--radius-pill);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
}

.backup-btn.primary {
  border-color: var(--ice-mint);
  background: var(--ice-mint-light);
  color: var(--ice-mint-dark);
  font-weight: 600;
}

.backup-meta {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* 心愿存钱罐卡片 */
.wish-card {
  position: relative;
  z-index: 10;
  margin: -4px 20px 14px;
  padding: 12px 16px;
  width: calc(100% - 40px);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--frost-border);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(234, 244, 241, 0.85));
  font-family: var(--font-sans);
  cursor: pointer;
}

.wish-card.empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.55);
}

.wish-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wish-kicker {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.wish-card.done .wish-kicker {
  color: #1a8c78;
  font-weight: 600;
}

.wish-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.wish-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wish-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.wish-amount {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  font-feature-settings: "tnum";
}

.wish-amount b {
  font-size: 14px;
  color: var(--text-gold);
}

.wish-bar {
  margin-top: 5px;
  height: 6px;
  border-radius: 3px;
  background: #e3ece9;
  overflow: hidden;
}

.wish-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: #1a8c78;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.wish-chevron {
  font-size: 20px;
  color: var(--text-muted);
}

.wish-intro {
  margin: -6px 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.wish-inputs .wish-target {
  flex-basis: 110px;
}

#wish-modal .preset-pills {
  margin-bottom: 18px;
}

.wish-complete-btn {
  width: 100%;
  margin-top: 10px;
}

/* 情绪标签与冷静期推荐说明 */
.form-label-note {
  margin-left: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.mood-row {
  margin-top: 0;
}

.period-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ice-mint-dark);
}

.period-hint:empty {
  display: none;
}

/* 封存弹窗：名称 + 金额 + 照片 同一行 */
.freeze-section {
  margin-bottom: 16px;
}

.freeze-main-row {
  display: flex;
  gap: 8px;
}

.freeze-main-row #input-title {
  flex: 1;
  min-width: 0;
}

.price-field {
  position: relative;
  flex: 0 0 96px;
}

.price-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.price-field .form-input {
  padding-left: 26px;
  padding-right: 8px;
}

.photo-btn {
  position: relative;
  flex: 0 0 46px;
  height: 46px;
  border: 1.5px dashed var(--frost-border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.photo-btn:hover {
  border-color: var(--ice-mint);
}

.upload-empty-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.upload-preview-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.upload-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-img-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(44, 56, 52, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.upload-size-note {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-feature-settings: "tnum";
}

.upload-size-note:empty {
  display: none;
}

.preset-pills {
  display: flex;
  gap: 8px;
  margin: 10px -20px 0;
  padding: 0 20px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.preset-pills::-webkit-scrollbar {
  display: none;
}

.preset-pill {
  flex: none;
  white-space: nowrap;
  background: var(--bg-secondary);
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.preset-pill small {
  margin-left: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.preset-pill:hover, .preset-pill.active {
  background: var(--ice-mint-light);
  color: var(--ice-mint);
  border-color: var(--ice-mint);
}

.form-input {
  width: 100%;
  height: 46px;
  background: var(--bg-primary);
  border: 1px solid var(--frost-border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--ice-mint);
  background: #ffffff;
}

.period-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

/* 欲望类型选择 */
.kind-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.kind-card {
  border: 1.5px solid var(--frost-border);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  height: 46px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.kind-card.active {
  background: #ffffff;
  border-color: var(--ice-mint);
  box-shadow: 0 4px 16px var(--ice-mint-glow);
}

.kind-icon {
  display: flex;
}

/* 自定义冷静期 */
.custom-period {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.custom-period .form-input {
  flex: 1;
}

.custom-period .unit-select {
  flex: 0 0 96px;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  cursor: pointer;
}

/* 线性 UI 图标（与类型图标同一套笔触） */
.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.ui-icon svg {
  display: block;
}

.icon-btn {
  color: var(--text-secondary);
}

.icon-btn .ui-icon svg {
  width: 18px;
  height: 18px;
}

.reminder-pill,
.ins-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.option-lock {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.appearance-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.pro-features li > .ui-icon {
  flex-shrink: 0;
  width: 30px;
  padding-top: 2px;
  color: var(--text-gold);
}

/* 列表缩略图里的类型图标 */
.item-kind-icon {
  display: flex;
  filter: drop-shadow(0 4px 8px rgba(78, 102, 98, 0.16));
}

.item-kind-icon svg,
.kind-icon svg {
  display: block;
}

.period-card {
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--frost-border);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.period-badge {
  position: absolute;
  top: -8px;
  right: 4px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--ice-mint);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.period-card.active {
  background: #ffffff;
  border-color: var(--ice-mint);
  box-shadow: 0 4px 16px var(--ice-mint-glow);
}

/* 全屏粒子 Canvas */
#particle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* ==========================================================================
   首次引导
   ========================================================================== */
.onboarding-welcome {
  position: absolute;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(159, 211, 230, 0.35) 0%, rgba(245, 246, 244, 0) 55%),
    var(--bg-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.onboarding-welcome.active {
  opacity: 1;
  pointer-events: auto;
}

.ob-inner {
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.ob-logo {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  box-shadow: 0 18px 36px -12px rgba(78, 102, 98, 0.4);
  animation: floatAir 3.2s ease-in-out infinite;
}

.ob-brand {
  margin-top: 22px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

.ob-title {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

.ob-desc {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.ob-label {
  margin-top: 30px;
  font-size: 12px;
  color: var(--text-muted);
}

.ob-choices {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ob-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px 12px;
  border: 1.5px solid var(--frost-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 6px 18px -8px rgba(78, 102, 98, 0.2);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.ob-choice:hover {
  border-color: var(--ice-mint);
}

.ob-choice:active {
  transform: scale(0.96);
}

.ob-choice-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.ob-choice-price {
  font-size: 11px;
  color: var(--text-muted);
}

.ob-skip {
  margin-top: 22px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

/* 引导提示气泡：只有气泡本身可点，不挡住敲冰 */
.coach-tip {
  position: absolute;
  bottom: 34px;
  left: 20px;
  right: 20px;
  z-index: 30;
  padding: 14px 16px 12px;
  border-radius: var(--radius-md);
  background: rgba(44, 56, 52, 0.9);
  backdrop-filter: blur(10px);
  color: #ffffff;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 最后一步底部是裁决按钮，气泡移到上方（此时冰已化平，不会挡住） */
.coach-tip.at-top {
  top: 176px;
  bottom: auto;
}

.coach-tip.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.coach-dots {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.coach-dots i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.coach-dots i.on {
  background: #9fd3e6;
}

.coach-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
}

.coach-text {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.coach-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.coach-action {
  display: inline-flex;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  background: #9fd3e6;
  color: #1e3a44;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.coach-skip {
  margin-left: auto;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  cursor: pointer;
}

/* 示范模式：隐藏与体验无关的操作，引导期间只保留敲冰与裁决 */
.detail-view.demo-mode .reminder-actions,
.detail-view.demo-mode #early-letgo-btn,
.detail-view.demo-mode #appearance-btn,
.detail-view.demo-mode .tap-guide {
  display: none !important;
}

/* 结案页：放下（庆祝）/ 放行（安心去买） */
.outcome-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(44, 56, 52, 0.38);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.outcome-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.outcome-card {
  position: relative;
  width: 100%;
  max-width: 330px;
  padding: 30px 24px 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8f7 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 60px -12px rgba(44, 56, 52, 0.35);
  text-align: center;
  overflow: hidden;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.outcome-overlay.active .outcome-card {
  transform: none;
}

/* 顶部淡淡的冰蓝光晕 */
.outcome-card::before {
  content: "";
  position: absolute;
  top: -90px;
  left: 50%;
  width: 260px;
  height: 200px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(159, 211, 230, 0.45) 0%, rgba(159, 211, 230, 0) 70%);
  pointer-events: none;
}

.outcome-overlay.bought .outcome-card::before {
  background: radial-gradient(circle, rgba(227, 161, 74, 0.28) 0%, rgba(227, 161, 74, 0) 70%);
}

.outcome-emblem {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: #ffffff;
  box-shadow: 0 10px 24px -6px rgba(78, 102, 98, 0.3), inset 0 0 0 1px rgba(188, 209, 204, 0.5);
  overflow: hidden;
}

.outcome-emblem svg {
  width: 100%;
  height: 100%;
}

.outcome-emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.outcome-overlay.active .outcome-emblem {
  animation: emblemPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s backwards;
}

@keyframes emblemPop {
  from { transform: scale(0.6) rotate(-8deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.outcome-kicker {
  position: relative;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.outcome-title {
  position: relative;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
  text-wrap: balance;
}

.outcome-amount {
  position: relative;
  margin-top: 14px;
  font-family: var(--font-sans);
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  color: #1a8c78;
  letter-spacing: -0.01em;
}

.outcome-sub {
  position: relative;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.outcome-quote {
  position: relative;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(188, 209, 204, 0.45);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  text-wrap: balance;
}

.outcome-actions {
  position: relative;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.outcome-btn {
  height: 46px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.outcome-btn:active {
  transform: scale(0.97);
}

.outcome-btn.primary {
  border: none;
  color: #ffffff;
  background: linear-gradient(135deg, var(--ice-mint) 0%, #5f8a7e 100%);
  box-shadow: 0 10px 20px -8px var(--ice-mint-glow);
}

.outcome-overlay.bought .outcome-btn.primary {
  background: linear-gradient(135deg, #d9a863 0%, #c29b7a 100%);
  box-shadow: 0 10px 20px -8px rgba(194, 155, 122, 0.5);
}

.outcome-btn.ghost {
  height: 38px;
  border: none;
  background: none;
  color: var(--ice-mint-dark);
  font-size: 13px;
  font-weight: 500;
}

/* 冷冻中：融化进度与提前放下 */
.melt-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.early-letgo-btn {
  border: none;
  background: none;
  color: var(--ice-mint-dark);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* 详情页：外观入口 */
.detail-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.appearance-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--frost-border);
  background: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  cursor: pointer;
}

/* 冰块外观选项 */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border: 1.5px solid var(--frost-border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.option-card.active {
  background: #ffffff;
  border-color: var(--ice-mint);
  box-shadow: 0 4px 16px var(--ice-mint-glow);
}

.option-swatch {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8), 0 4px 10px rgba(78, 102, 98, 0.15);
}

/* 材质色块：一眼看出每款冰的特点（透明度、色调、内含物） */
.option-swatch {
  position: relative;
  overflow: hidden;
}

.option-swatch::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 6px;
  width: 55%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
  transform: rotate(-8deg);
}

.option-swatch.skin-classic {
  background:
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.9) 0 1.5px, transparent 2px),
    radial-gradient(circle at 66% 40%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.5px),
    linear-gradient(150deg, #f2fafd 0%, #9fd3e6 100%);
}

/* 水晶：几乎无色，边缘带一圈彩虹色散 */
.option-swatch.skin-crystal {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.95) 0%, rgba(236, 244, 248, 0.8) 60%, rgba(214, 228, 236, 0.9) 100%),
    conic-gradient(from 200deg, #ffd6e8, #d8f0ff, #e2ffd9, #fff3c8, #ffd6e8);
  background-blend-mode: normal, normal;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.95), inset 0 0 8px rgba(160, 200, 255, 0.6), 0 4px 10px rgba(78, 102, 98, 0.15);
}

/* 樱花冰：粉色冰体里的花瓣 */
.option-swatch.skin-sakura {
  background:
    radial-gradient(ellipse 5px 4px at 32% 62%, #f08aa6 60%, transparent 70%),
    radial-gradient(ellipse 4px 3px at 68% 34%, #f4a3b9 60%, transparent 70%),
    radial-gradient(ellipse 3px 3px at 62% 74%, #f7bccb 60%, transparent 70%),
    linear-gradient(150deg, #fff4f7 0%, #f0a9bd 100%);
}

/* 琥珀冰：蜂蜜色 + 细碎金箔 */
.option-swatch.skin-amber {
  background:
    radial-gradient(circle at 28% 58%, #f7d27a 0 1.5px, transparent 2px),
    radial-gradient(circle at 60% 30%, #fbe39c 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 70%, #e9b54c 0 1.5px, transparent 2px),
    radial-gradient(circle at 42% 80%, #5a3b1e 0 1px, transparent 1.5px),
    linear-gradient(150deg, #fff1d6 0%, #e3a14a 70%, #b8741f 100%);
}

/* 深海冰：深蓝渐变 + 荧光微粒 */
.option-swatch.skin-deepsea {
  background:
    radial-gradient(circle at 30% 64%, rgba(170, 245, 255, 0.95) 0 1.5px, transparent 3px),
    radial-gradient(circle at 64% 36%, rgba(170, 245, 255, 0.85) 0 1px, transparent 2.5px),
    radial-gradient(circle at 56% 76%, rgba(170, 245, 255, 0.7) 0 1px, transparent 2px),
    linear-gradient(160deg, #cfe4f2 0%, #3f86b5 55%, #1c4d7a 100%);
}

.option-emoji {
  display: inline-block;
  font-size: 30px;
  line-height: 40px;
}

.option-emoji.mirror {
  transform: scaleX(-1);
}

.option-name {
  font-size: 12px;
  color: var(--text-primary);
}

.option-lock {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  background: var(--warm-gold-light);
  color: var(--text-gold);
}

/* 冷藏室 Pro */
.pro-sheet {
  text-align: center;
}

.pro-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #e9d3b7, #c29b7a);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.pro-title {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text-primary);
}

.pro-reason {
  margin: 8px auto 0;
  max-width: 300px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.pro-features {
  list-style: none;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.pro-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pro-features li > span {
  font-size: 22px;
  width: 30px;
  text-align: center;
}

.pro-features b {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
}

.pro-features small {
  font-size: 12px;
  color: var(--text-muted);
}

.pro-buy-btn {
  width: 100%;
}

.pro-buy-btn.reserved {
  background: var(--ice-mint-light);
  color: var(--ice-mint-dark);
  box-shadow: none;
  font-size: 14px;
  cursor: default;
}

.pro-price {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.pro-price b {
  font-size: 18px;
  color: var(--text-gold);
}

.pro-note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

/* 彩蛋：开发者通道 */
.unlock-mask {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 260;
}

.unlock-sheet {
  width: 100%;
  max-width: 300px;
  padding: 22px 20px 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 50px -12px rgba(44, 56, 52, 0.35);
  text-align: center;
}

.unlock-sheet.shake {
  animation: unlockShake 0.35s ease;
}

@keyframes unlockShake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.unlock-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-primary);
}

.unlock-desc {
  margin: 6px 0 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.unlock-error {
  min-height: 18px;
  margin-top: 6px;
  font-size: 12px;
  color: #c0584f;
}

.unlock-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.unlock-actions .melt-btn,
.unlock-actions .freeze-action-btn {
  width: 100%;
  height: 44px;
  margin: 0;
}

.pro-close-link {
  display: block;
  margin: 12px auto 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

/* 清醒战报分享图预览 */
.share-modal {
  position: absolute;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(44, 56, 52, 0.6);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.share-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.share-sheet {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #f5f7f5;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  object-fit: contain;
  -webkit-touch-callout: default;
  user-select: auto;
}

.share-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
}

.share-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--ice-mint);
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
}

.share-actions .melt-btn,
.share-actions .freeze-action-btn {
  width: 100%;
  margin: 0;
}

.share-actions .freeze-action-btn:disabled {
  opacity: 0.6;
}

.share-hint {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
}

.ins-share-btn {
  margin-top: 16px;
  border: 1px solid var(--ice-mint);
  background: var(--ice-mint-light);
  color: var(--ice-mint-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.ins-share-btn:active {
  transform: scale(0.97);
}


/* ==========================================================================
   矮屏适配（可见高度 < 720px：如 iPhone 13 / SE 在带上下工具栏的浏览器里）
   ========================================================================== */
@media (max-height: 720px) {
  .detail-view {
    padding: 10px 16px 14px;
  }

  .timer-dashboard {
    margin-top: 6px;
    padding: 7px 14px;
  }

  .timer-countdown {
    font-size: 26px;
  }

  .timer-hint {
    font-size: 10.5px;
  }

  .ice-3d-canvas-container {
    width: calc(100% + 32px);
    margin: -52px -16px 0;
    min-height: 180px;
  }

  .ice2d-stage {
    max-width: 190px;
    max-height: 190px;
  }

  .floating-item-card {
    margin-top: -34px;
  }

  .cooling-status-box {
    gap: 5px;
  }

  .reminder-pill {
    padding: 5px 10px;
  }

  .judgment-action-box {
    gap: 7px;
  }

  .judgment-banner {
    padding: 6px;
    font-size: 11px;
  }

  .shatter-btn {
    height: 44px;
  }

  .melt-btn {
    height: 38px;
  }

  /* 冷藏室首页 */
  .stat-banner {
    margin-bottom: 12px;
    padding: 10px 16px;
  }

  .wish-card {
    margin-bottom: 10px;
    padding: 10px 14px;
  }

  .bottom-dock {
    padding: 12px 20px 16px;
  }

  .freeze-action-btn {
    height: 48px;
  }
}
