/* ============================================================
   梦境记录仪 H5 · V2 方案A「暗夜紫金」
   依据：DESIGN.md（workspace/projects/dream-recorder/ui-v2）+
   Figma V2 · DS 方案A + shared-skills/design-excellence
   纪律：色值只走 Token；字号阶梯 22/17/15/14/12；间距 8pt 网格；
   触控≥44；按下 −20% 透明度；动效只动 transform/opacity；
   字体只用系统栈（外部字体=黑屏 1 分钟的坑，不踩）。
   ============================================================ */

:root {
  color-scheme: dark;
  /* 语义色 Token —— 方案A 暗夜紫金 */
  --bg: #12101E;          /* surface-base 深夜紫底 */
  --panel: #1D1930;       /* surface-raised 卡片 */
  --panel-2: #272142;     /* surface-overlay 二级卡/浮层 */
  --text: #F5F1E8;        /* text-primary 暖米白 */
  --muted: #B0A8CC;       /* text-secondary 紫灰（暗底 7.2:1） */
  --faint: #7E7699;       /* text-tertiary 仅 caption/装饰 */
  --line: #322B4D;        /* hairline 分割线/描边 */
  --accent: #F0C35C;      /* brand-accent 唯一强调金 */
  --accent-soft: #D9A83C; /* 金色渐变深端 */
  --accent-ink: #1E1830;  /* 金底上的文字 */
  --gold-bg: #2E2616;     /* 金色淡底（选中/标签） */
  --good: #7BD9A9;        /* success */
  --good-bg: #182D24;
  --danger: #F27D7D;      /* 仅错误 */
  --danger-bg: #2E1B26;
  --track: #262040;       /* 进度轨道 */
  --accent-bright: #F6D38B; /* 金色渐变亮端 */
  --night-violet: #3A2E5C;  /* 详情头图紫夜深端 */
  --shell-a: #241F3A;       /* 桌面手机壳渐变亮端 */
  --shell-b: #0B0912;       /* 桌面手机壳渐变深端 */
  --notch: #0A0810;         /* 刘海 */
  --backdrop: #0C0A14;      /* 桌面画布底色 */
  /* 圆角档位 */
  --r-card: 16px;
  --r-btn: 14px;
  --r-sm: 12px;
  /* 动效档位（微反馈 120ms / 常规 240ms，标准曲线） */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 120ms;
  --t-mid: 240ms;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 8%, rgba(240, 195, 92, 0.10), transparent 26rem),
    radial-gradient(circle at 85% 15%, rgba(87, 66, 140, 0.22), transparent 24rem),
    var(--backdrop);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }

/* ---------- 桌面端手机外壳 ---------- */
.desktop-frame {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.phone-frame {
  position: relative;
  width: min(390px, calc(100vw - 24px));
  height: min(844px, calc(100vh - 24px));
  height: min(844px, calc(100dvh - 24px));
  min-height: 620px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 42px;
  background: linear-gradient(145deg, var(--shell-a), var(--shell-b));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

.phone-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 20;
  width: 118px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 0 0 18px 18px;
  background: var(--notch);
}

.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 32px;
  background: var(--bg);
}

.phone-home-indicator {
  position: absolute;
  bottom: 18px;
  left: 50%;
  width: 120px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: rgba(245, 241, 232, 0.5);
}

.status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 26px;
  color: var(--text);
  font-size: 12px; /* caption 档 */
  pointer-events: none;
}

.status-icons { display: flex; gap: 7px; align-items: center; }

/* ---------- 页面基座 ---------- */
.page {
  position: absolute;
  inset: 0;
  display: none;
  overflow: auto;
  padding: 58px 16px 96px; /* 左右 16 统一边距 */
  background: var(--bg);
}

.page.active {
  display: block;
  animation: pageIn var(--t-mid) var(--ease);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-header, .edit-header, .profile-header, .record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- 首页 ---------- */
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }

.logo-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-soft));
}

.avatar, .profile-avatar {
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-soft));
}

.avatar { width: 40px; height: 40px; border-radius: 50%; font-weight: 700; }

.home-greeting { margin: 24px 0 16px; }

.greeting-title {
  margin: 0 0 8px;
  font-size: 22px; /* Display 档 */
  font-weight: 700;
}

.greeting-sub { margin: 0; color: var(--muted); font-size: 14px; }
.greeting-sub strong { color: var(--accent); }

.timeline { display: grid; gap: 16px; }

.dream-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: opacity var(--t-fast) var(--ease);
}

.dream-card:active { opacity: 0.8; } /* 按下 −20% */

.dream-image-card {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel-2);
}

.dream-image, .dream-cover, .dream-image-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dream-image { object-fit: cover; }

.dream-cover {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 18%, rgba(240, 195, 92, 0.20), transparent 6rem),
    radial-gradient(circle at 78% 28%, rgba(126, 118, 153, 0.28), transparent 7rem),
    radial-gradient(circle at 42% 92%, rgba(240, 195, 92, 0.12), transparent 8rem),
    linear-gradient(135deg, var(--cover-a), var(--cover-b));
}

.dream-cover::before, .dream-cover::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.dream-cover::before {
  left: 26px; right: 26px; bottom: 32px;
  height: 34px;
  background: rgba(245, 241, 232, 0.10);
  filter: blur(14px);
}

.dream-cover::after {
  width: 150px; height: 150px;
  border: 1px solid rgba(240, 195, 92, 0.22);
  transform: rotate(-18deg);
}

.dream-cover-mood {
  position: relative;
  z-index: 1;
  font-size: 48px; /* emoji 装饰，非文本阶梯 */
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.28));
}

.dream-image-shade {
  background: linear-gradient(180deg, rgba(18, 16, 30, 0.04), rgba(18, 16, 30, 0.58));
}

.dream-play {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: var(--accent-ink);
  background: rgba(240, 195, 92, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.dream-image-label {
  position: absolute;
  left: 12px; bottom: 12px;
  z-index: 2;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 16, 30, 0.66);
  color: var(--text);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.dream-main { min-width: 0; padding: 2px 2px 4px; }

.dream-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dream-row h3 {
  margin: 0;
  overflow: hidden;
  font-size: 15px; /* Body-Em 档 */
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dream-row time, .detail-date, .edit-helper, .record-subtitle,
.generating-stage, .generating-tip, .login-sub, .login-hint, .profile-bio {
  color: var(--muted);
  font-size: 12px; /* caption 档 */
}

.dream-main p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 14px; /* Body 档 */
  line-height: 1.6;
}

.dream-tags, .detail-tags, .edit-tags, .generating-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 标签胶囊：一屏一强调，标签统一弱金调（一致性法则） */
.dream-tags span, .edit-tag, .gen-tag, .d-tag {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--gold-bg);
  color: var(--accent);
  font-size: 12px;
}

/* ---------- Tab 栏（浮岛胶囊，挂手机屏层级，滚动不跟随） ---------- */
.tab-bar {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 10;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(29, 25, 48, 0.94);
  backdrop-filter: blur(16px);
}

.tab-bar.visible { display: grid; }

.tab-item {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 48px; /* 触控 ≥44 */
  border-radius: var(--r-btn);
  color: var(--faint);
  text-decoration: none;
  transition: opacity var(--t-fast) var(--ease);
}

.tab-item:active { opacity: 0.8; }

.tab-item.active { color: var(--accent); background: var(--gold-bg); }

.tab-icon { font-size: 17px; line-height: 1; }

.tab-icon-record {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--accent-ink);
  background: var(--accent);
}

.tab-label { font-size: 12px; }

/* ---------- 通用按钮 ---------- */
.icon-btn, .text-btn, .cancel-btn, .toolbar-btn, .action-btn,
.share-cancel, .login-code-btn, .login-submit {
  min-height: 44px; /* 触控 ≥44 */
  border-radius: var(--r-sm);
  color: var(--text);
  background: var(--panel-2);
  transition: opacity var(--t-fast) var(--ease);
}

.icon-btn:active, .text-btn:active, .cancel-btn:active, .toolbar-btn:active,
.action-btn:active, .share-cancel:active, .login-code-btn:active, .login-submit:active {
  opacity: 0.8;
}

button[disabled], button.is-disabled { opacity: 0.4; cursor: not-allowed; }

.icon-btn { display: grid; place-items: center; width: 44px; font-size: 22px; }

/* 主 CTA：唯一强调金 */
.text-btn, .login-submit {
  padding: 0 16px;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-soft));
  color: var(--accent-ink);
}

.cancel-btn { width: 100%; background: var(--panel-2); color: var(--text); }

/* ---------- 录音页 ---------- */
.page-record, .page-generating, .page-login {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 26%, rgba(240, 195, 92, 0.14), transparent 12rem),
    radial-gradient(circle at 50% 78%, rgba(87, 66, 140, 0.20), transparent 12rem),
    var(--bg);
}

.record-content, .generating-content, .login-wrap {
  display: grid;
  justify-items: center;
  text-align: center;
}

.record-content { padding-top: 48px; }

.record-title {
  margin: 0 0 8px;
  font-size: 22px; /* Display 档 */
  font-weight: 700;
}

.keyword-chips { display: flex; gap: 8px; margin: 24px 0 48px; }

.keyword-chip {
  padding: 8px 12px; /* 触控高度补足 */
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
}

.record-stage { position: relative; display: grid; justify-items: center; }

/* 录音 orb：金色圆环 + 柔金核（Figma V2 同款签名元素） */
.wave-rings { position: absolute; inset: -45px; pointer-events: none; }

.wave-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(240, 195, 92, 0.3);
  border-radius: 50%;
  animation: pulse 2.8s ease-in-out infinite;
}

.wave-ring-2 { animation-delay: 0.45s; }
.wave-ring-3 { animation-delay: 0.9s; }

.record-btn {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 136px; height: 136px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-soft));
  box-shadow: 0 18px 60px rgba(240, 195, 92, 0.26);
  transition: opacity var(--t-fast) var(--ease);
}

.record-btn:active { opacity: 0.8; }

.record-btn-inner {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent-ink);
}

.record-btn.recording .record-btn-inner {
  border-radius: var(--r-sm);
  background: var(--danger);
}

.record-hint, .record-timer { margin: 16px 0 0; }

.record-hint { font-size: 15px; color: var(--text); }

.record-timer {
  color: var(--accent);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.record-footer { position: absolute; left: 16px; right: 16px; bottom: 28px; }

/* 记录页文字录入入口 */
.record-text-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--panel-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: opacity var(--t-fast) var(--ease);
}

.record-text-btn:active { opacity: 0.8; }

/* ---------- 文字编辑页 ---------- */
.edit-title, .profile-title { margin: 0; font-size: 17px; font-weight: 500; } /* Title 档 */

.edit-meta { display: flex; gap: 8px; margin: 16px 0; }

.edit-meta-item {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.edit-editor { display: grid; gap: 8px; }

.edit-textarea {
  width: 100%;
  min-height: 250px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  outline: none;
  padding: 16px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.edit-textarea:focus { border-color: var(--accent); }

.edit-tags { margin: 16px 0; }

.edit-toolbar, .detail-actions, .share-grid, .profile-stats {
  display: grid;
  gap: 8px;
}

.edit-toolbar, .detail-actions { grid-template-columns: repeat(4, 1fr); }

.toolbar-btn, .action-btn {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.toolbar-icon, .action-icon { font-size: 17px; }
.toolbar-label, .action-label { font-size: 12px; color: var(--muted); }

/* ---------- 生成等待页 ---------- */
.generating-content { padding-top: 80px; }

.nebula {
  position: relative;
  width: 166px; height: 166px;
  margin-bottom: 32px;
}

.nebula-core, .nebula-ring { position: absolute; inset: 0; border-radius: 50%; }

.nebula-core {
  inset: 44px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-soft));
  filter: blur(1px);
}

.nebula-ring {
  border: 1px solid rgba(240, 195, 92, 0.25);
  animation: spin 8s linear infinite; /* 旋转 spinner 用 linear 属标准做法 */
}

.nebula-ring-2 { inset: 18px; animation-duration: 6s; }
.nebula-ring-3 { inset: 34px; animation-duration: 4s; }

.generating-title { margin: 0 0 8px; font-size: 22px; font-weight: 700; }

.progress-track {
  width: 100%;
  height: 8px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--track);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  transition: width 0.12s ease;
}

.progress-percent { margin: 10px 0 20px; color: var(--accent); font-size: 15px; }

/* ---------- 详情页 ---------- */
.page-detail { padding: 0 0 96px; }

.detail-image {
  position: relative;
  height: 270px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--panel), var(--panel-2) 48%, var(--night-violet));
}

.image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

/* 星点装饰（CSS 绘制，不增加 DOM） */
.image-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(240, 195, 92, 0.85) 1.5px, transparent 1.6px),
    radial-gradient(circle, rgba(240, 195, 92, 0.5) 1px, transparent 1.1px),
    radial-gradient(circle, rgba(245, 241, 232, 0.4) 1px, transparent 1.1px);
  background-size: 140px 140px, 90px 90px, 60px 60px;
  background-position: 20% 15%, 70% 40%, 40% 70%;
}

.image-glow {
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(240, 195, 92, 0.22);
  filter: blur(18px);
}

.detail-back { position: absolute; top: 54px; left: 16px; }

.detail-body { padding: 16px; }

.detail-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-title {
  margin: 0;
  font-size: 22px; /* Display 档 */
  font-weight: 700;
}

.detail-tags, .detail-actions { margin: 16px 0; }

/* 标签统一弱金调；保留 4 个变体类名兼容 JS，视觉收敛为同族 */
.d-tag-purple, .d-tag-pink, .d-tag-blue, .d-tag-orange {
  background: var(--gold-bg);
  color: var(--accent);
}

.content-title { margin: 24px 0 10px; font-size: 15px; font-weight: 500; }

.content-text, .ai-card {
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.ai-card {
  display: flex;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent); /* 金色左缘 = 本屏强调点 */
  border-radius: var(--r-sm);
  background: var(--panel);
}

.ai-card p { margin: 0; }
.ai-icon { color: var(--accent); }

/* ---------- 分享弹窗 ---------- */
.page-share { z-index: 15; padding: 0; background: transparent; }

.share-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 16, 0.56);
}

.share-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px 26px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--panel);
  animation: sheetIn 280ms var(--ease);
}

@keyframes sheetIn {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.share-handle {
  width: 42px; height: 4px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: var(--line);
}

.share-title { margin: 0 0 16px; text-align: center; font-size: 17px; font-weight: 500; }

.share-grid { grid-template-columns: repeat(3, 1fr); }

.share-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--r-sm);
  color: var(--text);
  background: var(--panel-2);
  transition: opacity var(--t-fast) var(--ease);
}

.share-item:active { opacity: 0.8; }

.share-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 15px;
}

.share-name { font-size: 12px; }

.share-cancel { width: 100%; margin-top: 16px; }

/* ---------- 个人主页 ---------- */
.profile-user { display: grid; justify-items: center; margin: 24px 0 20px; }

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 24px;
  font-size: 22px;
  font-weight: 700;
}

.profile-name { margin: 12px 0 4px; font-size: 17px; font-weight: 500; }

.profile-stats { grid-template-columns: repeat(3, 1fr); }

.stat-card {
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  text-align: center;
  background: var(--panel);
}

.stat-num {
  color: var(--accent);
  font-size: 22px; /* 阶梯内 */
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-label { margin-top: 4px; color: var(--muted); font-size: 12px; }

.profile-menu { display: grid; gap: 8px; margin-top: 20px; }

.menu-item {
  display: grid;
  grid-template-columns: 30px 1fr 20px;
  align-items: center;
  min-height: 48px; /* 触控 ≥44 */
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  background: var(--panel);
  text-decoration: none;
  font-size: 14px;
  transition: opacity var(--t-fast) var(--ease);
}

.menu-item:active { opacity: 0.8; }

.menu-icon { color: var(--accent); }
.menu-arrow { color: var(--faint); text-align: right; }

/* ---------- 登录页 ---------- */
.login-wrap { padding-top: 64px; }
.login-logo { font-size: 48px; } /* emoji 装饰 */
.login-brand { margin: 10px 0 4px; font-size: 22px; font-weight: 700; color: var(--accent); }

.login-form {
  display: grid;
  gap: 10px;
  width: min(100%, 300px);
  min-width: 0;
  margin-top: 32px;
}

.login-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.login-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  outline: none;
  padding: 0 16px;
  color: var(--text);
  background: var(--panel);
  font-size: 14px;
}

.login-input:focus { border-color: var(--accent); }

.login-submit { min-height: 48px; }

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: 96px;
  z-index: 40;
  max-width: calc(100% - 48px);
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--accent-ink);
  background: rgba(245, 241, 232, 0.94);
  font-size: 14px;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 动效 ---------- */
@keyframes pulse {
  0% { opacity: 0.8; transform: scale(0.72); }
  70%, 100% { opacity: 0; transform: scale(1.18); }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 移动端去壳 ---------- */
@media (max-width: 520px) {
  .desktop-frame { padding: 0; }
  .phone-frame {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
    border: 0;
    border-radius: 0;
  }
  .phone-screen { border-radius: 0; }
  .phone-notch, .phone-home-indicator { display: none; }
}

/* ---------- 服务/审核状态、空态 ---------- */
.service-status, .audit-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--muted);
  background: var(--panel);
  font-size: 12px;
}

.service-status::before, .audit-status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.service-status[data-state="online"]::before, .audit-status:not(:empty)::before {
  background: var(--good);
}

.empty-state {
  display: grid;
  gap: 8px;
  min-height: 220px;
  place-content: center;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.empty-state::before {
  content: "☾";
  color: var(--accent);
  font-size: 22px;
}

.empty-state strong { color: var(--text); font-size: 17px; font-weight: 500; }

.detail-image.has-image { background-position: center; background-size: cover; }
.detail-image.has-image .image-placeholder {
  background: linear-gradient(180deg, transparent 45%, rgba(12, 10, 20, 0.48));
}

/* ---------- 焦点可见性 ---------- */
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 3px solid rgba(240, 195, 92, 0.55);
  outline-offset: 2px;
}

/* ---------- 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
