/* 雅名 · 共享样式 — 国风+奢华系统
   设备框架 + token + 原语。各屏幕 <link> 此文件，再按需内联屏内样式。 */
:root {
  --bg:      oklch(96% 0.012 75);
  --surface: oklch(99% 0.006 75);
  --fg:      oklch(24% 0.014 55);
  --muted:   oklch(52% 0.012 55);
  --border:  oklch(88% 0.012 70);
  --accent:  oklch(54% 0.19 28);
  --gold:    oklch(72% 0.075 85);

  --accent-soft: color-mix(in oklch, var(--accent) 14%, transparent);
  --fg-soft:     color-mix(in oklch, var(--fg) 6%, transparent);
  --gold-soft:   color-mix(in oklch, var(--gold) 20%, transparent);

  --font-display: 'Songti SC', 'STSong', 'Noto Serif SC', 'SimSun', serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-h1: 26px; --fs-h2: 20px; --fs-h3: 16px; --fs-body: 15px; --fs-meta: 12px;
  --radius-card: 18px; --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: radial-gradient(70% 60% at 50% 0%, color-mix(in oklch, var(--gold) 10%, oklch(93% 0.012 75)) 0%, oklch(93% 0.012 75) 55%);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  padding: 32px;
}

.stage { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.caption { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.caption strong { color: var(--fg); font-weight: 500; }

/* ── device frame (from seed — do not rewrite) ── */
.device {
  position: relative; width: 390px; height: 844px;
  border-radius: 56px; padding: 12px;
  background: linear-gradient(160deg, #2a2a2c 0%, #1a1a1c 50%, #0e0e10 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset, 0 0 0 2px #000 inset, 0 28px 60px -12px rgba(0,0,0,0.45), 0 8px 20px -8px rgba(0,0,0,0.35);
  isolation: isolate;
}
.device::before, .device::after {
  content: ''; position: absolute; width: 3px;
  background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.06) 8%, transparent 16%, transparent 84%, rgba(255,255,255,0.04) 92%, transparent 100%);
  top: 100px; bottom: 100px; pointer-events: none;
}
.device::before { left: -1px; } .device::after { right: -1px; }
.island { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 124px; height: 36px; background: #000; border-radius: 999px; z-index: 5; }
.btn-rail { position: absolute; width: 4px; background: #0a0a0c; border-radius: 2px; }
.btn-rail.left-1  { left: -3px; top: 174px; height: 32px; }
.btn-rail.left-2  { left: -3px; top: 220px; height: 60px; }
.btn-rail.left-3  { left: -3px; top: 290px; height: 60px; }
.btn-rail.right-1 { right: -3px; top: 250px; height: 100px; }

.screen { position: relative; width: 100%; height: 100%; background: var(--bg); border-radius: 44px; overflow: hidden; display: flex; flex-direction: column; }
.statusbar { flex: 0 0 47px; padding: 18px 26px 0; display: flex; align-items: flex-start; justify-content: space-between; font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--fg); letter-spacing: -0.01em; }
.statusbar .right { display: inline-flex; align-items: center; gap: 6px; }
.statusbar svg { width: 17px; height: 11px; fill: var(--fg); }
.statusbar .battery { width: 25px; }
.content { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 0 0 16px; }
.content::-webkit-scrollbar { display: none; }
.home-indicator { flex: 0 0 28px; position: relative; }
.home-indicator::after { content: ''; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: 134px; height: 5px; background: var(--fg); border-radius: 999px; opacity: 0.85; }

/* ── primitives ── */
.pad { padding-inline: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.header { padding: 8px 20px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header h1 { font-family: var(--font-display); font-size: var(--fs-h1); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.greeting { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.h2 { font-family: var(--font-display); font-size: var(--fs-h2); letter-spacing: -0.015em; line-height: 1.2; margin: 0; }
.h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; margin: 0; }
.meta { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--muted); letter-spacing: 0.04em; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px; }
.card.accent { background: var(--accent); color: #fff; border-color: transparent; }
.card.accent .meta { color: rgba(255,255,255,0.72); }
.card.flat { background: transparent; border: 0; padding: 12px 0; border-top: 1px solid var(--border); border-radius: 0; }
.card.flat:first-child { border-top: 0; padding-top: 0; }

.list-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: 0; }
.list-row .avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-soft), var(--fg-soft)), var(--surface); border: 1px solid var(--border); }
.list-row .body .title { font-size: 15px; font-weight: 500; line-height: 1.25; }
.list-row .body .sub { color: var(--muted); font-size: 13px; line-height: 1.3; margin-top: 2px; }

.tabbar { flex: 0 0 auto; display: grid; grid-template-columns: repeat(var(--tabs, 3), 1fr); padding: 8px 8px 0; border-top: 1px solid var(--border); background: color-mix(in oklch, var(--surface) 92%, transparent); backdrop-filter: blur(20px); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; color: var(--muted); font-size: 10px; letter-spacing: 0.02em; cursor: pointer; text-decoration: none; }
.tab.active { color: var(--accent); }
.tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.tab.active svg { stroke-width: 2; }

.btn-primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 14px 20px; background: var(--accent); color: #fff; border: 0; border-radius: 14px; font: inherit; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; cursor: pointer; text-decoration: none; }
.btn-primary:disabled { opacity: 0.72; }
.btn-secondary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 14px 20px; background: transparent; color: var(--fg); border: 1px solid var(--border); border-radius: 14px; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--fg); cursor: pointer; text-decoration: none; }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; }

.tag { display: inline-flex; padding: 3px 9px; background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; font-size: 11px; }
.tag.gold { color: var(--gold); border-color: var(--gold-soft); background: var(--gold-soft); }
.tag.accent { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.ph-img { background: linear-gradient(135deg, var(--accent-soft), var(--fg-soft)), var(--surface); border: 1px solid var(--border); border-radius: 14px; aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; }
.ph-img.square { aspect-ratio: 1 / 1; }
.progress { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); }

/* reduced-motion fallback (per animation-discipline) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
