/* 拾光 · 家庭多媒体服务中心 */
:root {
  --bg: #f3eee4;
  --bg-deep: #ebe3d4;
  --paper: #fbf8f1;
  --paper-2: #f6f0e5;
  --ink: #24201a;
  --ink-2: #38322a;
  --muted: #756a5c;
  --faint: #a29584;
  --line: rgba(36, 32, 26, .12);
  --line-strong: rgba(36, 32, 26, .22);
  --accent: #b2532c;
  --accent-deep: #8d3b1d;
  --accent-soft: #f0ddd1;
  --moss: #5b6650;
  --moss-soft: #e2e6da;
  --gold: #c1975b;
  --danger: #a23a27;
  --danger-soft: #f7e2dc;
  --night: #211d17;
  --night-2: #2b261e;
  --night-text: #f0e7d9;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow: 0 18px 50px rgba(55, 43, 27, .09);
  --shadow-lg: 0 30px 80px rgba(30, 24, 16, .2);
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --serif: "Songti SC", "STZhongsong", "STSong", "Noto Serif SC", "SimSun", serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --nav-h: 66px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .22;
  background-image: radial-gradient(rgba(67, 53, 35, .32) .55px, transparent .65px);
  background-size: 4px 4px;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff8ee; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }

/* ---------- 基础控件 ---------- */
.btn {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-border: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border: 1px solid var(--btn-border); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 13.5px; font-weight: 600; letter-spacing: .02em;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(50, 38, 23, .1); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { --btn-bg: var(--accent); --btn-fg: #fff8ef; --btn-border: var(--accent); }
.btn-primary:hover { --btn-bg: var(--accent-deep); }
.btn-moss { --btn-bg: var(--moss); --btn-fg: #f8f5ed; --btn-border: var(--moss); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(36,32,26,.06); box-shadow: none; }
.btn-outline { --btn-bg: transparent; }
.btn-danger { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-border: rgba(162,58,39,.24); }
.btn-dark { --btn-bg: var(--night); --btn-fg: var(--night-text); --btn-border: var(--night); }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 12.5px; gap: 6px; }
.btn-lg { min-height: 50px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-round { width: 42px; height: 42px; min-height: 0; padding: 0; border-radius: 50%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid transparent; border-radius: 50%;
  background: transparent; color: var(--muted);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.icon-btn:hover { background: rgba(36,32,26,.07); color: var(--ink); }
.icon-btn.is-active { background: var(--accent-soft); color: var(--accent-deep); }
.icon-btn.is-fav { color: var(--accent); }
.icon-btn.is-fav .icon { fill: currentColor; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .field-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.field .hint { font-size: 12px; color: var(--faint); line-height: 1.6; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: 11px;
  background: rgba(255, 252, 245, .72); color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(178, 83, 44, .12); background: #fffdf8; }
.textarea { resize: vertical; min-height: 96px; line-height: 1.75; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; cursor: pointer; }
.input-sm { min-height: 36px; padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon > .icon { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
.input-with-icon > .input { padding-left: 43px; }
.input-with-icon .icon-btn { position: absolute; right: 4px; width: 36px; height: 36px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 20px; margin-top: 8px; }
.form-success { color: var(--moss); font-size: 13px; }
.form-grid { display: flex; flex-direction: column; gap: 18px; }
.check-row { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.check-row strong { display: block; font-size: 13.5px; }
.check-row span { display: block; font-size: 12px; color: var(--muted); }

.switch { position: relative; display: inline-flex; align-items: center; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch i { position: absolute; inset: 0; background: #d8cebd; border-radius: 99px; transition: background .2s ease; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fffdf7; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: transform .2s ease; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }

.segmented { display: inline-flex; padding: 4px; gap: 2px; background: rgba(36,32,26,.06); border-radius: 999px; }
.segmented button {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--muted);
  min-height: 32px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.segmented button.is-active { background: var(--paper); color: var(--ink); box-shadow: 0 3px 9px rgba(50,38,23,.09); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,252,245,.5); color: var(--muted); font-size: 12px; font-weight: 600;
  transition: all .18s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fbf6ec; }
.chip .count { opacity: .55; font-weight: 500; }
.chip-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-deep); }
.pill { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(36,32,26,.07); color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; white-space: nowrap; }
.pill-accent { background: var(--accent-soft); color: var(--accent-deep); }
.pill-moss { background: var(--moss-soft); color: var(--moss); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-gold { background: #f3e8d4; color: #8b6428; }

.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; background: rgba(36,32,26,.055); color: var(--muted); font-size: 11.5px; }
.tag::before { content: "#"; opacity: .45; margin-right: 1px; }
.mono { font-family: var(--mono); font-size: 11.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.serif { font-family: var(--serif); }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scroll-thin { scrollbar-width: thin; scrollbar-color: rgba(36,32,26,.18) transparent; }

/* ---------- 启动 / 登录 ---------- */
.boot-screen { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--bg); transition: opacity .4s ease; }
.boot-screen.is-done { opacity: 0; pointer-events: none; }
.boot-mark { font-family: var(--serif); font-size: 54px; letter-spacing: .24em; text-indent: .24em; color: var(--ink); }
.boot-line { width: 64px; height: 1px; background: var(--accent); transform-origin: left; animation: bootline 1.4s ease infinite; }
.boot-screen p { font-size: 12px; letter-spacing: .24em; color: var(--faint); }
@keyframes bootline { 0% { transform: scaleX(.2); opacity: .4; } 50% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(.2); opacity: .4; } }

.login-screen { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(420px, .75fr); background: var(--bg); overflow: auto; }
.login-visual { position: relative; min-height: 100vh; padding: 54px 60px; overflow: hidden; background: #26221c; color: #f7efe2; display: flex; flex-direction: column; justify-content: space-between; }
.login-visual::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 74% 20%, rgba(199, 151, 91, .38), transparent 34%), radial-gradient(circle at 15% 80%, rgba(178, 83, 44, .3), transparent 38%), linear-gradient(135deg, #1d1a15 0%, #342c22 58%, #4a3929 100%); }
.login-visual::after { content: ""; position: absolute; inset: 0; opacity: .28; background-image: radial-gradient(rgba(255,247,232,.4) .6px, transparent .8px); background-size: 5px 5px; mix-blend-mode: soft-light; }
.login-brand { position: relative; z-index: 2; display: flex; align-items: baseline; gap: 16px; font-family: var(--serif); font-size: 30px; letter-spacing: .16em; }
.login-brand span { font-family: var(--sans); font-size: 10px; letter-spacing: .34em; opacity: .55; }
.polaroids { position: relative; z-index: 2; width: min(560px, 72%); margin: 3vh auto 0; height: 52vh; min-height: 330px; }
.polaroid { position: absolute; width: 56%; padding: 12px 12px 0; background: #f6efe1; color: #4b4237; box-shadow: 0 30px 60px rgba(0,0,0,.35); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.polaroid .ph { aspect-ratio: 4 / 3; background: linear-gradient(145deg, #d8bc94, #957653); position: relative; overflow: hidden; }
.polaroid .ph::before { content: ""; position: absolute; width: 34%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,246,226,.56); right: 12%; top: 10%; }
.polaroid .ph::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -22%; height: 60%; background: linear-gradient(180deg, transparent, rgba(40,31,22,.55)); }
.polaroid .ph-b { background: linear-gradient(150deg, #718172, #35443b); }
.polaroid .ph-c { background: linear-gradient(145deg, #c08e68, #6f452f); }
.polaroid span { display: block; padding: 13px 4px 15px; font-family: var(--serif); font-size: 15px; letter-spacing: .14em; }
.polaroid.p1 { left: 0; top: 3%; transform: rotate(-7deg); z-index: 2; }
.polaroid.p2 { left: 25%; top: 24%; transform: rotate(3.5deg); z-index: 3; }
.polaroid.p3 { right: 0; top: 8%; transform: rotate(9deg); z-index: 1; }
.login-visual:hover .p1 { transform: rotate(-9deg) translateY(-8px); }
.login-visual:hover .p2 { transform: rotate(1.5deg) translateY(-6px); }
.login-visual:hover .p3 { transform: rotate(11deg) translateY(-4px); }
.login-quote { position: relative; z-index: 2; }
.login-quote p { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 38px); line-height: 1.65; letter-spacing: .06em; }
.login-quote span { display: block; margin-top: 20px; font-size: 10px; letter-spacing: .3em; opacity: .48; }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 6vw; position: relative; background: var(--bg); }
.login-card { width: min(360px, 100%); }
.login-mini-mark { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 24px; margin-bottom: 34px; }
.login-card h1 { font-family: var(--serif); font-size: 38px; font-weight: 600; letter-spacing: .08em; }
.login-sub { color: var(--muted); margin: 10px 0 34px; font-size: 13.5px; }
.login-card .field > span { font-size: 11px; }
.login-card .btn-block { margin-top: 22px; }
.login-note { display: flex; gap: 8px; align-items: flex-start; color: var(--faint); font-size: 11.5px; line-height: 1.7; margin-top: 26px; }
.login-note .icon { margin-top: 2px; }
.login-footer { position: absolute; bottom: 28px; font-size: 10.5px; color: var(--faint); letter-spacing: .08em; }
.login-footer span { margin: 0 6px; }
.pw-toggle { color: var(--faint); }

/* ---------- 应用框架 ---------- */
.app { min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
  position: fixed; z-index: 60; inset: 0 auto 0 0; width: 248px;
  display: flex; flex-direction: column; padding: 32px 20px 22px;
  background: var(--night); color: var(--night-text);
  border-right: 1px solid rgba(255, 247, 232, .06);
}
.brand { display: flex; align-items: center; gap: 13px; cursor: pointer; padding: 0 8px; }
.brand-seal { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff4e5; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; box-shadow: inset 0 0 0 1px rgba(255,248,236,.28); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: .18em; }
.brand-text span { font-size: 8.5px; letter-spacing: .24em; color: rgba(240,231,217,.4); margin-top: 5px; }
.side-nav { display: flex; flex-direction: column; gap: 5px; margin-top: 48px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 13px;
  min-height: 48px; padding: 0 14px; border-radius: 12px;
  color: rgba(240,231,217,.62); font-size: 14px;
  transition: background .18s ease, color .18s ease;
}
.nav-link .icon { width: 19px; height: 19px; opacity: .8; }
.nav-link small { margin-left: auto; font-size: 8px; letter-spacing: .16em; opacity: .3; }
.nav-link:hover { background: rgba(255,247,232,.055); color: var(--night-text); }
.nav-link.is-active { background: rgba(255,247,232,.09); color: #fff8ed; }
.nav-link.is-active::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--accent); }
.nav-link.is-active .icon { opacity: 1; color: #e4b18b; }
.side-spacer { flex: 1; }
.side-storage { padding: 16px 14px; border: 1px solid rgba(255,247,232,.08); border-radius: 14px; margin-bottom: 10px; }
.side-storage .label { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .12em; color: rgba(240,231,217,.42); margin-bottom: 10px; }
.side-storage .bar { height: 3px; border-radius: 4px; background: rgba(255,247,232,.1); overflow: hidden; }
.side-storage .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.side-storage p { margin-top: 10px; font-size: 11px; color: rgba(240,231,217,.6); }
.side-model { margin: 0 4px 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255,247,232,.04); color: rgba(240,231,217,.55); font-size: 10.5px; display: flex; align-items: center; gap: 8px; letter-spacing: .03em; }
.side-model .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.side-model.is-on .dot { background: #9db184; box-shadow: 0 0 0 4px rgba(157,177,132,.1); }
.side-model a { color: #dfb18c; }
.side-foot { display: flex; align-items: center; border-top: 1px solid rgba(255,247,232,.07); padding-top: 12px; }
.side-foot .nav-settings { flex: 1; min-height: 42px; padding: 0 10px; }
.side-logout { display: inline-flex; border: 0; background: transparent; color: rgba(240,231,217,.4); width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; }
.side-logout:hover { background: rgba(255,247,232,.07); color: var(--night-text); }
.app-main { margin-left: 248px; min-height: 100vh; position: relative; z-index: 1; }
.mobile-topbar { display: none; }
.page { max-width: 1500px; margin: 0 auto; padding: 46px 48px 90px; outline: none; }
.page-inner { animation: pagein .42s cubic-bezier(.2,.8,.2,1); }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bottom-nav { display: none; }
.offline-banner { position: fixed; z-index: 220; top: 0; left: 0; right: 0; padding: 8px; text-align: center; background: #6f3d24; color: #fff3e2; font-size: 12px; letter-spacing: .03em; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 12px; }
.page-eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.page-title { font-family: var(--serif); font-size: clamp(34px, 3.2vw, 46px); line-height: 1.15; font-weight: 600; letter-spacing: .06em; }
.page-desc { color: var(--muted); margin-top: 10px; font-size: 13px; max-width: 620px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.page-back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--muted); padding: 0; margin-bottom: 16px; font-size: 12px; }
.page-back:hover { color: var(--ink); }

/* ---------- 时光 / 媒体库 ---------- */
.library-greeting { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.library-date { font-size: 11px; letter-spacing: .18em; color: var(--faint); text-align: right; line-height: 1.8; }
.stat-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px; }
.stat-card { background: rgba(251,248,241,.72); padding: 18px 22px; min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; }
.stat-card .k { display: flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: .18em; color: var(--faint); text-transform: uppercase; }
.stat-card .v { font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: .02em; }
.stat-card .v small { font-family: var(--sans); font-size: 11px; letter-spacing: .08em; color: var(--faint); margin-left: 6px; }
.stat-card.accent .v { color: var(--accent); }

.library-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.search-box { position: relative; flex: 1; min-width: 0; }
.search-box .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-box input { width: 100%; height: 48px; padding: 0 44px 0 46px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255,252,245,.8); font-size: 14px; transition: border-color .18s, box-shadow .18s, background .18s; }
.search-box input::placeholder { color: var(--faint); letter-spacing: .02em; }
.search-box input:focus { outline: none; background: #fffdf8; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(178,83,44,.09); }
.search-box .search-clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); }
.search-hint { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 10px; letter-spacing: .08em; color: var(--faint); pointer-events: none; }
.library-filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 20px; }
.library-filterbar .chip-row { flex: 1; }
.filter-toggle.is-active { background: var(--ink); color: var(--piece, #fbf6ec); border-color: var(--ink); }
.filter-panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(251,248,241,.72); padding: 18px 20px; margin-bottom: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; animation: dropdown .2s ease; }
@keyframes dropdown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.filter-panel .span-2 { grid-column: span 2; }
.filter-panel .filter-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; }
.active-filters:empty { display: none; }
.filter-note { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 11.5px; margin-bottom: 18px; }
.filter-note .icon { color: var(--gold); }
.transcript-hits { border: 1px solid var(--line); border-radius: 12px; background: rgba(251,248,241,.72); margin: 0 0 18px; overflow: hidden; }
.transcript-hits-head { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.transcript-hits-head .icon { color: var(--gold); }
.transcript-hits-head strong { color: var(--ink); font-weight: 600; letter-spacing: .04em; }
.transcript-hits-head span { margin-left: auto; font-size: 10.5px; }
.transcript-hit { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 11px 16px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; transition: background .15s; }
.transcript-hit:first-of-type { border-top: 0; }
.transcript-hit:hover { background: rgba(178,83,44,.05); }
.transcript-hit-time { color: var(--accent); font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
.transcript-hit-text { color: var(--ink); font-size: 13px; line-height: 1.55; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.transcript-hit-media { color: var(--faint); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.transcript-hits-note { padding: 8px 16px 11px; font-size: 10.5px; color: var(--faint); }
@media (max-width: 640px) {
  .transcript-hit { grid-template-columns: 88px minmax(0, 1fr); }
  .transcript-hit-media { display: none; }
}

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.media-card { position: relative; border-radius: 14px; overflow: hidden; background: #ded3c1; aspect-ratio: 1; cursor: zoom-in; isolation: isolate; }
.media-card::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,250,240,.18); border-radius: inherit; pointer-events: none; }
.media-card img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s cubic-bezier(.2,.8,.2,1), filter .3s; }
.media-card:hover img { transform: scale(1.045); }
.media-card .thumb-fallback { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,248,238,.7); background: linear-gradient(145deg, #cabda8, #9f8e75); }
.media-card .thumb-fallback .icon { width: 34px; height: 34px; }
.media-card.is-document .thumb-fallback { color: rgba(255,248,238,.9); background: linear-gradient(145deg, #b4a78f, #8a7960); }
.media-card.is-document .thumb-fallback .icon { width: 46px; height: 46px; }
.media-card .card-top { position: absolute; z-index: 2; top: 9px; left: 9px; right: 9px; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.media-card .card-bottom { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #fff8ed; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.media-card .card-bottom::before { content: ""; position: absolute; inset: -34px -12px -12px; z-index: -1; background: linear-gradient(transparent, rgba(16,13,9,.62)); border-radius: 0 0 14px 14px; pointer-events: none; }
.media-card .card-meta { display: flex; align-items: center; gap: 7px; font-size: 10.5px; letter-spacing: .03em; opacity: .92; }
.media-card .card-meta .icon { width: 14px; height: 14px; }
.media-card .fav-indicator { color: #f2b28f; }
.media-card .fav-indicator .icon { fill: currentColor; }
.media-card .status-dot { position: absolute; z-index: 3; top: 12px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,248,236,.8); box-shadow: 0 0 0 3px rgba(20,16,10,.15); }
.media-card .status-dot.pending { background: #d5b06a; }
.media-card .status-dot.processing { background: #89a2b3; animation: pulse 1.5s infinite; }
.media-card .status-dot.failed { background: #c26a58; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.media-card .select-check { position: absolute; z-index: 4; top: 10px; left: 10px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(255,250,240,.8); background: rgba(20,16,10,.25); display: flex; align-items: center; justify-content: center; color: #fff; backdrop-filter: blur(4px); }
.media-card .select-check .icon { width: 14px; height: 14px; opacity: 0; }
.media-card.is-selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.media-card.is-selected .select-check { background: var(--accent); border-color: var(--accent); }
.media-card.is-selected .select-check .icon { opacity: 1; }
.media-card.is-selected img { filter: brightness(.82); }
.media-card .quick-fav { position: absolute; z-index: 4; right: 8px; bottom: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(20,16,10,.4); color: #fff3e4; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .18s; backdrop-filter: blur(5px); }
.media-card:hover .quick-fav { opacity: 1; }
.media-card .quick-fav .icon { width: 15px; height: 15px; }
.media-card .quick-fav.is-fav .icon { fill: currentColor; color: #f4ae85; }
.media-card .ai-pill { position: absolute; z-index: 3; left: 10px; bottom: 8px; display: none; }
.media-card .ai-pill.is-shown { display: inline-flex; }
.media-card .card-kind { display: inline-flex; align-items: center; gap: 4px; }
.media-card .card-kind .icon { width: 14px; height: 14px; }
.media-grid.loading { opacity: .5; pointer-events: none; }
.date-group-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; padding: 14px 2px 0; }
.date-group-head:first-child { padding-top: 0; }
.date-group-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.date-group-head span { font-size: 11px; color: var(--faint); }
.year-rail { margin: -6px 0 18px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.year-rail::-webkit-scrollbar { display: none; }
.year-rail .chip { flex: none; min-height: 28px; font-size: 11.5px; }
.albums-tabs { margin: 0 0 20px; }
.photo-timeline-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.photo-timeline-tools .year-rail { flex: 1; min-width: 0; margin: 0; }
.photo-timeline-tools .segmented { flex: none; }
@media (max-width: 640px) {
  .photo-timeline-tools { flex-direction: column; align-items: stretch; }
  .photo-timeline-tools .segmented { align-self: flex-start; }
  .date-group-head { padding-top: 10px; }
}
.load-more { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 32px 0 8px; }
.load-more-status { color: var(--faint); font-size: 11.5px; letter-spacing: .08em; }
.grid-end { text-align: center; padding: 34px 0 12px; color: var(--faint); font-size: 11px; letter-spacing: .18em; }

.empty-state { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(251,248,241,.4); }
.empty-state .empty-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--paper-2); display: flex; align-items: center; justify-content: center; color: var(--accent); margin-bottom: 20px; }
.empty-state h3 { font-family: var(--serif); font-size: 23px; font-weight: 500; }
.empty-state p { max-width: 400px; color: var(--muted); font-size: 12.5px; margin: 9px 0 22px; line-height: 1.8; }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.skeleton-card { border-radius: 14px; aspect-ratio: 1; background: linear-gradient(100deg, #e7dece 30%, #f2ebdf 50%, #e7dece 70%); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.selection-bar { position: fixed; z-index: 90; left: 50%; bottom: 26px; transform: translateX(calc(-50% + 124px)); display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 20px; border-radius: 999px; background: rgba(33,29,23,.94); color: var(--night-text); box-shadow: var(--shadow-lg); backdrop-filter: blur(18px); animation: floatin .25s ease; }
@keyframes floatin { from { opacity: 0; transform: translate(calc(-50% + 124px), 12px); } to { opacity: 1; transform: translate(calc(-50% + 124px), 0); } }
.selection-bar .sel-count { font-size: 12.5px; letter-spacing: .02em; padding-right: 10px; white-space: nowrap; }
.selection-bar .sel-count strong { font-family: var(--serif); font-size: 17px; margin-right: 4px; }
.selection-bar .sel-actions { display: flex; align-items: center; gap: 4px; }
.selection-bar button, .selection-bar a { border: 0; background: transparent; color: rgba(240,231,217,.8); min-height: 36px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.selection-bar button:hover, .selection-bar a:hover { background: rgba(255,247,232,.1); color: #fff8ed; }
.selection-bar .sel-close { width: 34px; padding: 0; justify-content: center; }
.selection-bar .sel-divider { width: 1px; height: 20px; background: rgba(255,247,232,.14); margin: 0 4px; }
.selection-bar .btn-primary { background: var(--accent); color: #fff; }
.selection-bar .btn-primary:hover { background: #c25e34; }

.upload-progress-panel { position: fixed; z-index: 95; right: 26px; bottom: 26px; width: min(360px, calc(100vw - 32px)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px; animation: floatin2 .25s ease; }
@keyframes floatin2 { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.upload-progress-panel h4 { font-size: 12px; letter-spacing: .1em; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 12px; }
.upload-progress-item { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.upload-progress-item .up-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.upload-progress-item .up-head span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress-item .up-bar { height: 3px; background: rgba(36,32,26,.08); border-radius: 4px; overflow: hidden; }
.upload-progress-item .up-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .25s ease; }
.upload-progress-item.is-done .up-bar i { background: var(--moss); }
.upload-progress-item.is-error .up-bar i { background: var(--danger); }

/* ---------- 媒体详情 / Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 160; display: grid; grid-template-columns: minmax(0, 1fr) 370px; background: #17130f; color: #f4ecdf; animation: fadein .22s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.lb-stage { position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 54px 40px 76px; background: radial-gradient(circle at center, #2a241c 0%, #14110d 74%); }
.lb-media { max-width: 100%; max-height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-media img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; box-shadow: 0 30px 90px rgba(0,0,0,.4); border-radius: 3px; }
.lb-media video { max-width: 100%; max-height: calc(100vh - 150px); border-radius: 4px; background: #000; }
.lb-media .lb-doc-frame { width: min(920px, 100%); height: calc(100vh - 150px); border: 0; border-radius: 6px; background: #fdfaf4; box-shadow: 0 30px 90px rgba(0,0,0,.4); }
.lb-media .lb-doc { width: min(440px, 82vw); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 38px 30px; text-align: center; border: 1px solid rgba(255,248,238,.14); border-radius: 16px; background: rgba(30,25,19,.55); color: #f4ecdf; }
.lb-doc-icon { width: 74px; height: 74px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: rgba(255,248,238,.08); color: #e6b27a; }
.lb-doc-icon .icon { width: 38px; height: 38px; }
.lb-doc-name { font-family: var(--serif); font-size: 18px; line-height: 1.5; word-break: break-word; }
.lb-doc-meta { font-size: 11px; letter-spacing: .08em; color: rgba(244,236,223,.55); }
.lb-doc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.lb-top { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; }
.lb-counter { font-size: 11px; letter-spacing: .18em; color: rgba(244,236,223,.52); }
.lb-nav { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,248,238,.16); background: rgba(20,16,11,.4); color: #f4ecdf; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); transition: background .18s; }
.lb-nav:hover { background: rgba(255,248,238,.13); }
.lb-nav.prev { left: 18px; }
.lb-nav.next { right: 18px; }
.lb-nav:disabled { opacity: .2; cursor: default; }
.lb-bottom { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 22px; background: linear-gradient(transparent, rgba(12,10,7,.5)); }
.lb-bottom-left { display: flex; align-items: center; gap: 10px; font-size: 11px; color: rgba(244,236,223,.52); letter-spacing: .04em; }
.lb-close { color: #f4ecdf; background: rgba(20,16,11,.4); border: 1px solid rgba(255,248,238,.14); }
.lb-close:hover { background: rgba(255,248,238,.12); color: #fff; }
.lb-info { background: var(--paper); color: var(--ink); display: flex; flex-direction: column; min-height: 0; border-left: 1px solid rgba(255,255,255,.06); }
.lb-info-head { padding: 26px 26px 20px; border-bottom: 1px solid var(--line); }
.lb-info-head .eyebrow { font-size: 9.5px; letter-spacing: .26em; color: var(--accent); font-weight: 800; margin-bottom: 12px; }
.lb-title { font-family: var(--serif); font-size: 22px; line-height: 1.45; font-weight: 600; word-break: break-word; }
.lb-sub { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.lb-body { padding: 22px 26px; overflow-y: auto; flex: 1; min-height: 0; }
.lb-section { margin-bottom: 24px; }
.lb-section-label { font-size: 9.5px; letter-spacing: .2em; color: var(--faint); font-weight: 800; text-transform: uppercase; margin-bottom: 10px; }
.lb-caption { font-family: var(--serif); font-size: 15px; line-height: 1.9; color: var(--ink-2); white-space: pre-line; }
.lb-caption.is-empty { color: var(--faint); font-family: var(--sans); font-size: 12.5px; }
.lb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-meta { display: grid; gap: 0; border-top: 1px solid var(--line); }
.lb-meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.lb-meta-row span:first-child { color: var(--faint); }
.lb-meta-row span:last-child { text-align: right; color: var(--ink-2); }
.lb-similar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lb-similar button { border: 0; padding: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 1; background: var(--paper-2); }
.lb-similar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-alert { padding: 10px 12px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: 11.5px; line-height: 1.6; }
.lb-actions { padding: 16px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 6px; flex-wrap: wrap; background: var(--paper); }
.lb-actions .btn { flex: 1; min-width: 0; padding: 0 10px; font-size: 12px; }
.lb-actions .icon-btn { border: 1px solid var(--line); }
.lb-loading { height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.lb-loading .skeleton-line { height: 14px; border-radius: 6px; background: #e8dfd0; animation: shimmer2 1.4s infinite; background-size: 220% 100%; }
@keyframes shimmer2 { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* 通用媒体预览弹窗 */
.media-preview { position: fixed; inset: 0; z-index: 155; background: rgba(15,12,9,.92); display: flex; align-items: center; justify-content: center; padding: 30px; animation: fadein .2s; }
.media-preview img, .media-preview video { max-width: min(1100px, 92vw); max-height: 86vh; object-fit: contain; border-radius: 4px; }
.media-preview .preview-doc-frame { width: min(1100px, 92vw); height: 86vh; border: 0; border-radius: 4px; background: #fff; }
.media-preview .preview-doc { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 420px; padding: 36px 28px; text-align: center; color: #f4ecdf; border: 1px solid rgba(255,248,238,.15); border-radius: 16px; background: rgba(30,25,19,.6); }
.media-preview .preview-doc .icon { width: 44px; height: 44px; color: #e6b27a; }
.media-preview .preview-close { position: absolute; top: 20px; right: 22px; color: #fff; background: rgba(255,255,255,.1); }
.media-preview .preview-caption { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: rgba(255,248,238,.7); font-size: 12px; padding: 0 20px; }

/* ---------- 弹窗 ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 140; background: rgba(28,23,17,.52); backdrop-filter: blur(7px); display: flex; align-items: center; justify-content: center; padding: 28px; animation: fadein .18s ease; }
body.has-lightbox .modal-backdrop { z-index: 170; }
.modal { width: min(620px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; background: var(--paper); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; animation: modalin .25s cubic-bezier(.2,.8,.2,1); }
@keyframes modalin { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-lg { width: min(980px, 100%); }
.modal-xl { width: min(1180px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 26px 16px; border-bottom: 1px solid var(--line); }
.modal-title { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .04em; }
.modal-sub { color: var(--muted); font-size: 12px; margin-top: 5px; }
.modal-body { padding: 22px 26px; overflow-y: auto; min-height: 0; flex: 1; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 26px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(246,240,229,.6); }
.modal-foot .left { margin-right: auto; }
.confirm-body p { color: var(--muted); line-height: 1.8; font-size: 13.5px; }
.confirm-body strong { color: var(--ink); }

/* 媒体选择器 */
.picker-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.picker-toolbar .search-box { flex: 1; }
.picker-toolbar .search-box input { height: 42px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; min-height: 180px; }
.picker-item { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 9px; overflow: hidden; background: var(--paper-2); }
.picker-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker-item .pick-check { position: absolute; top: 6px; right: 6px; width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.85); background: rgba(20,16,10,.28); color: #fff; display: flex; align-items: center; justify-content: center; }
.picker-item .pick-check .icon { width: 12px; height: 12px; opacity: 0; }
.picker-item.is-selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.picker-item.is-selected .pick-check { background: var(--accent); border-color: var(--accent); }
.picker-item.is-selected .pick-check .icon { opacity: 1; }
.picker-item .pick-duration { position: absolute; right: 5px; bottom: 5px; padding: 1px 5px; border-radius: 4px; background: rgba(15,12,8,.62); color: #fff; font-size: 9.5px; }
.picker-selected-count { font-size: 11px; color: var(--muted); }
.picker-empty { grid-column: 1/-1; display: flex; align-items: center; justify-content: center; min-height: 160px; color: var(--faint); font-size: 12px; }
.picker-loading { grid-column: 1/-1; display: flex; justify-content: center; padding: 30px; }
.loader { width: 22px; height: 22px; border: 2px solid rgba(36,32,26,.15); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 相册 ---------- */
.albums-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 22px; }
.album-card { cursor: pointer; group: album; }
.album-card .album-cover { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: linear-gradient(145deg, #d8c8b2, #a99378); box-shadow: 0 16px 36px rgba(50,38,23,.12); }
.album-card .album-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .5s ease; }
.album-card:hover .album-cover img { transform: scale(1.03); }
.album-card .album-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 72%, rgba(20,15,10,.22)); }
.album-card .album-badge { position: absolute; z-index: 2; top: 12px; left: 12px; background: rgba(250,245,235,.88); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-size: 9.5px; letter-spacing: .12em; font-weight: 700; }
.album-card .album-state { margin-top: 12px; color: var(--ink); }
.album-card .album-state h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: .04em; }
.album-card .album-state p { font-size: 10.5px; color: var(--muted); margin-top: 3px; letter-spacing: .05em; }
.album-card .album-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; color: var(--faint); font-size: 10.5px; }
.album-card .album-actions { display: flex; gap: 2px; }
.album-card .album-actions .icon-btn { width: 30px; height: 30px; }
.album-card .album-actions .icon { width: 15px; height: 15px; }
.album-create { border: 1px dashed var(--line-strong); border-radius: 14px; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); background: rgba(251,248,241,.36); transition: background .2s, border-color .2s; }
.album-create:hover { border-color: var(--accent); background: rgba(251,248,241,.7); color: var(--accent-deep); }
.album-create .plus-round { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; }
.album-create span { font-size: 12px; letter-spacing: .05em; }

.album-composer { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); gap: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 28px; margin-bottom: 34px; box-shadow: var(--shadow); animation: pagein .3s ease; }
.composer-left { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.composer-right { border-left: 1px solid var(--line); padding-left: 28px; display: flex; flex-direction: column; gap: 22px; }
.selected-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.selected-photos .sel-photo { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.selected-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.selected-photos .remove { position: absolute; top: 4px; right: 4px; width: 19px; height: 19px; border: 0; border-radius: 50%; background: rgba(15,12,8,.62); color: #fff; display: flex; align-items: center; justify-content: center; }
.selected-photos .remove .icon { width: 11px; height: 11px; }
.selected-photos .add-tile { border: 1px dashed var(--line-strong); background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--faint); border-radius: 8px; font-size: 9.5px; }
.selected-photos .add-tile:hover { color: var(--accent); border-color: var(--accent); }
.photo-counter { font-size: 11px; color: var(--faint); }
.style-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.style-option { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: transparent; transition: all .18s; }
.style-option strong { display: block; font-size: 12.5px; font-family: var(--serif); font-weight: 600; letter-spacing: .04em; }
.style-option span { display: block; font-size: 9.5px; color: var(--faint); margin-top: 3px; line-height: 1.5; }
.style-option.is-active { border-color: var(--accent); background: var(--accent-soft); }
.style-option.is-active strong { color: var(--accent-deep); }
.album-generating { display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; min-height: 280px; text-align: center; }
.album-generating .gen-orbit { width: 66px; height: 66px; border-radius: 50%; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; position: relative; }
.album-generating .gen-orbit::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1.5px solid transparent; border-top-color: var(--accent); animation: spin 1.3s linear infinite; }
.album-generating h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.album-generating p { color: var(--faint); font-size: 11.5px; }
.gen-steps { display: flex; gap: 18px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
.gen-steps span { font-size: 10px; letter-spacing: .06em; color: var(--faint); display: flex; align-items: center; gap: 5px; }
.gen-steps span.done { color: var(--moss); }
.gen-steps span.active { color: var(--accent); }
.album-result { text-align: center; }
.album-result img { width: 100%; max-height: 480px; object-fit: cover; object-position: top; border-radius: 10px; margin-bottom: 18px; box-shadow: var(--shadow); }
.album-viewer { display: flex; flex-direction: column; }
.album-viewer .long-image { max-height: 68vh; overflow: auto; background: #d8cfbf; border-radius: 8px; }
.album-viewer .long-image img { width: 100%; display: block; }

/* ---------- 助手 ---------- */
.agent-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); height: calc(100vh - 136px); min-height: 560px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); position: relative; }
.conv-sidebar { background: rgba(246,240,229,.6); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.conv-head { padding: 18px 16px 12px; }
.conv-head .btn { width: 100%; }
.conv-list { overflow-y: auto; padding: 4px 10px 14px; flex: 1; }
.conv-item { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; border-radius: 10px; cursor: pointer; position: relative; transition: background .18s; }
.conv-item:hover { background: rgba(36,32,26,.05); }
.conv-item.is-active { background: var(--paper); box-shadow: 0 2px 8px rgba(40,30,18,.06); }
.conv-item strong { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 20px; }
.conv-item span { font-size: 10px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .conv-del { position: absolute; top: 8px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--faint); display: flex; align-items: center; justify-content: center; opacity: 0; }
.conv-item:hover .conv-del { opacity: 1; }
.conv-item .conv-del:hover { background: rgba(36,32,26,.08); color: var(--danger); }
.conv-item .conv-del .icon { width: 13px; height: 13px; }
.conv-empty { padding: 20px 12px; color: var(--faint); font-size: 11px; line-height: 1.8; }
.agent-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.agent-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); min-height: 62px; }
.agent-title { display: flex; align-items: center; gap: 11px; }
.agent-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--night); color: var(--night-text); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 14px; flex: none; }
.agent-header strong { font-family: var(--serif); font-size: 16px; font-weight: 600; letter-spacing: .04em; display: block; }
.agent-header p { font-size: 9.5px; color: var(--faint); margin-top: 1px; letter-spacing: .04em; }
.agent-header .mobile-conv-toggle { display: none; }
.chat-scroll { flex: 1; overflow-y: auto; min-height: 0; padding: 26px 24px 16px; scroll-behavior: smooth; }
.chat-inner { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.chat-welcome { padding: 22px 0 6px; animation: pagein .4s ease; }
.chat-welcome .welcome-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.chat-welcome .welcome-mark .agent-avatar { width: 42px; height: 42px; font-size: 18px; }
.chat-welcome h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); font-weight: 500; letter-spacing: .04em; line-height: 1.4; }
.chat-welcome > p { color: var(--muted); font-size: 12.5px; line-height: 1.9; max-width: 560px; margin-bottom: 22px; }
.suggestion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.suggestion { text-align: left; border: 1px solid var(--line); border-radius: 12px; background: rgba(246,240,229,.5); padding: 13px 15px; color: var(--ink-2); font-size: 12px; line-height: 1.6; transition: all .18s; display: flex; gap: 10px; align-items: flex-start; }
.suggestion:hover { border-color: var(--accent); background: var(--paper); transform: translateY(-1px); }
.suggestion .icon { color: var(--accent); margin-top: 1px; }
.msg { display: flex; gap: 11px; align-items: flex-start; animation: msgIn .28s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.msg.user { flex-direction: row-reverse; }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; margin-top: 2px; }
.msg.assistant .msg-avatar { background: var(--night); color: var(--night-text); font-family: var(--serif); }
.msg.user .msg-avatar { background: var(--accent-soft); color: var(--accent-deep); font-size: 10px; font-weight: 700; }
.msg-content { min-width: 0; max-width: min(78%, 660px); }
.msg-bubble { padding: 12px 16px; border-radius: 14px; font-size: 13.5px; line-height: 1.85; overflow-wrap: break-word; }
.msg.assistant .msg-bubble { background: var(--paper-2); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg.user .msg-bubble { background: var(--accent); color: #fff6ea; border-top-right-radius: 4px; }
.msg.user .msg-content { display: flex; flex-direction: column; align-items: flex-end; }
.msg-bubble p + p { margin-top: 8px; }
.msg-bubble strong { font-weight: 700; }
.msg-bubble ul, .msg-bubble ol { padding-left: 20px; margin: 6px 0; list-style: disc; }
.msg-bubble ol { list-style: decimal; }
.msg-bubble li { margin: 3px 0; }
.msg-bubble code { font-family: var(--mono); font-size: .9em; background: rgba(36,32,26,.07); padding: 1px 5px; border-radius: 4px; }
.msg.assistant .msg-bubble a { color: var(--accent); text-decoration: underline; }
.msg-time { font-size: 9px; color: var(--faint); margin-top: 5px; letter-spacing: .04em; }
.msg.user .msg-time { text-align: right; }
.msg-attachments { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; justify-content: flex-end; }
.msg-attachments .att { width: 56px; height: 56px; border-radius: 7px; overflow: hidden; border: 1px solid rgba(255,255,255,.3); }
.msg-attachments img { width: 100%; height: 100%; object-fit: cover; }
.artifact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; max-width: 560px; }
.artifact-media { position: relative; border: 0; padding: 0; border-radius: 7px; overflow: hidden; aspect-ratio: 1; background: var(--bg-deep); }
.artifact-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artifact-media .artifact-doc { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,248,238,.85); background: linear-gradient(145deg, #b4a78f, #8a7960); }
.artifact-media .artifact-doc .icon { width: 30px; height: 30px; }
.artifact-media .am-kind { position: absolute; right: 5px; bottom: 5px; color: #fff; background: rgba(15,12,8,.52); border-radius: 3px; font-size: 8px; padding: 1px 4px; letter-spacing: .05em; }
.artifact-album { margin-top: 10px; display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); cursor: pointer; max-width: 420px; }
.artifact-album img { width: 62px; height: 82px; object-fit: cover; object-position: top; border-radius: 5px; flex: none; }
.artifact-album strong { display: block; font-family: var(--serif); font-size: 14px; }
.artifact-album span { display: block; font-size: 10px; color: var(--faint); margin-top: 4px; }
.artifact-job { margin-top: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; background: var(--paper); max-width: 440px; }
.artifact-job .job-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.artifact-job strong { font-size: 12px; }
.artifact-job p { font-size: 10.5px; color: var(--faint); margin: 5px 0 9px; }
.job-bar { height: 4px; background: rgba(36,32,26,.08); border-radius: 4px; overflow: hidden; }
.job-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; }
.artifact-job.is-done .job-bar i { background: var(--moss); }
.artifact-job.is-failed .job-bar i { background: var(--danger); }
.artifact-action { margin-top: 10px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); max-width: 480px; }
.artifact-action-cover { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bg-deep); }
.artifact-action-icon { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.artifact-action-icon .icon { width: 22px; height: 22px; }
.artifact-action-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.artifact-action-eyebrow { font-size: 8.5px; letter-spacing: .12em; color: var(--faint); }
.artifact-action-main strong { font-family: var(--serif); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-action-main > span:last-child { font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-action-buttons { display: flex; gap: 6px; flex: none; }
.artifact-action-buttons .btn { white-space: nowrap; }
.agent-playlist-items { display: flex; flex-direction: column; gap: 3px; }
.agent-playlist-item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: transparent; padding: 8px 6px; border-radius: 9px; text-align: left; cursor: pointer; }
.agent-playlist-item:hover { background: var(--paper-2); }
.agent-playlist-item img, .agent-playlist-fallback { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; flex: none; background: var(--bg-deep); }
.agent-playlist-fallback { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.agent-playlist-fallback .icon { width: 19px; height: 19px; }
.agent-playlist-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.agent-playlist-info strong { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-playlist-info small { font-size: 10px; color: var(--faint); }
.agent-playlist-item em { font-style: normal; font-size: 9px; color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; flex: none; }
.trace { margin-top: 8px; max-width: 560px; }
.trace summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 10.5px; padding: 5px 2px; }
.trace summary::-webkit-details-marker { display: none; }
.trace summary .icon { width: 12px; height: 12px; transition: transform .2s; }
.trace[open] summary .icon { transform: rotate(180deg); }
.trace-list { margin-top: 4px; border-left: 1px solid var(--line-strong); padding-left: 12px; display: flex; flex-direction: column; gap: 7px; }
.trace-item { font-size: 10.5px; color: var(--muted); display: flex; align-items: flex-start; gap: 6px; line-height: 1.6; }
.trace-item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--moss); margin-top: 5px; flex: none; }
.trace-item.is-error .dot { background: var(--danger); }
.trace-item strong { color: var(--ink-2); font-weight: 600; }
.typing { display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-error { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 12px; line-height: 1.7; margin-top: 8px; }
.chat-error a { text-decoration: underline; font-weight: 700; cursor: pointer; }
.composer-wrap { border-top: 1px solid var(--line); padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); background: rgba(251,248,241,.9); }
.composer { max-width: 820px; margin: 0 auto; border: 1px solid var(--line-strong); border-radius: 16px; background: #fffdf8; padding: 10px 11px; transition: border-color .18s, box-shadow .18s; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(178,83,44,.08); }
.composer-attachments { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 8px; }
.composer-attachments .att-chip { display: flex; align-items: center; gap: 6px; background: var(--paper-2); border-radius: 7px; padding: 4px 8px 4px 4px; font-size: 10px; color: var(--muted); }
.composer-attachments .att-chip img { width: 26px; height: 26px; border-radius: 4px; object-fit: cover; }
.composer-attachments .att-chip button { border: 0; background: transparent; color: var(--faint); display: flex; padding: 0; }
.composer textarea { width: 100%; border: 0; background: transparent; resize: none; min-height: 26px; max-height: 150px; padding: 4px 2px; font-size: 13.5px; line-height: 1.7; outline: none; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.composer-tools { display: flex; align-items: center; gap: 2px; }
.composer-tools .icon-btn { width: 32px; height: 32px; }
.composer-hint { font-size: 9px; color: var(--faint); margin-left: 6px; }
.send-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--accent); color: #fff7ed; display: flex; align-items: center; justify-content: center; transition: background .18s, opacity .18s; }
.send-btn:hover { background: var(--accent-deep); }
.send-btn:disabled { opacity: .3; }
.composer-wrap .composer-note { text-align: center; color: var(--faint); font-size: 9px; margin-top: 8px; letter-spacing: .02em; }

/* ---------- 剪辑工作室 ---------- */
.studio-layout { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 24px; align-items: start; }
.studio-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.studio-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 8px 26px rgba(50,38,23,.035); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-title { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: .04em; }
.panel-sub { font-size: 10.5px; color: var(--faint); margin-top: 4px; line-height: 1.6; }
.panel-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: transparent; padding: 0; text-align: left; }
.panel-toggle .chevron { transition: transform .2s; color: var(--faint); }
.panel.is-collapsed .panel-body { display: none; }
.panel.is-collapsed .chevron { transform: rotate(-90deg); }
.clip-list { display: flex; flex-direction: column; gap: 10px; }
.clip-card { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: rgba(246,240,229,.42); }
.clip-thumb { position: relative; aspect-ratio: 4/3; border-radius: 7px; overflow: hidden; background: var(--bg-deep); }
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-thumb .idx { position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(20,16,10,.6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 8.5px; }
.clip-info { min-width: 0; }
.clip-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.clip-title strong { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-title span { font-size: 9.5px; color: var(--faint); flex: none; }
.clip-controls { display: grid; grid-template-columns: minmax(64px, .8fr) minmax(64px, .8fr) minmax(76px, 1fr) minmax(82px, 1fr); gap: 6px; align-items: center; }
.clip-controls label { display: flex; flex-direction: column; gap: 3px; font-size: 8.5px; color: var(--faint); letter-spacing: .06em; }
.clip-actions { display: flex; align-items: center; gap: 1px; margin-top: 6px; }
.clip-actions .icon-btn { width: 26px; height: 26px; }
.clip-actions .icon { width: 13px; height: 13px; }
.clip-actions .remove { color: var(--faint); margin-left: auto; }
.clip-actions .remove:hover { color: var(--danger); }
.clip-empty { border: 1px dashed var(--line-strong); border-radius: 12px; min-height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--faint); font-size: 11.5px; }
.timeline { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.timeline-head { display: flex; justify-content: space-between; align-items: center; font-size: 9.5px; letter-spacing: .1em; color: var(--faint); margin-bottom: 8px; }
.timeline-track { display: flex; gap: 2px; height: 40px; border-radius: 6px; overflow: hidden; background: var(--bg-deep); }
.timeline-seg { position: relative; min-width: 10px; background: linear-gradient(145deg, #b9a789, #8d775b); overflow: hidden; }
.timeline-seg:nth-child(odd) { background: linear-gradient(145deg, #a8957c, #77654d); }
.timeline-seg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; display: block; }
.timeline-seg span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #fff8ec; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.music-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: rgba(246,240,229,.4); }
.music-card .music-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--moss-soft); color: var(--moss); display: flex; align-items: center; justify-content: center; flex: none; }
.music-card .music-meta { flex: 1; min-width: 0; }
.music-card .music-meta strong { display: block; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-card .music-meta span { display: block; font-size: 9.5px; color: var(--faint); }
.subtitle-list { display: flex; flex-direction: column; gap: 7px; }
.subtitle-row { display: grid; grid-template-columns: minmax(0, 1fr) 62px 62px 28px; gap: 5px; align-items: center; }
.subtitle-row .input { min-height: 32px; padding: 4px 8px; font-size: 11px; border-radius: 7px; }
.subtitle-row .icon-btn { width: 26px; height: 26px; }
.add-row { display: flex; justify-content: flex-start; margin-top: 8px; }
.studio-options-summary { display: flex; flex-direction: column; gap: 10px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.summary-row strong { color: var(--ink); font-weight: 600; }
.estimate-card { background: var(--night); color: var(--night-text); border-radius: var(--radius); padding: 18px 20px; position: relative; overflow: hidden; }
.estimate-card::after { content: ""; position: absolute; right: -36px; top: -36px; width: 120px; height: 120px; border-radius: 50%; border: 1px solid rgba(255,247,232,.1); }
.estimate-card .k { font-size: 9px; letter-spacing: .2em; color: rgba(240,231,217,.45); }
.estimate-card .v { font-family: var(--serif); font-size: 30px; margin: 7px 0 4px; }
.estimate-card p { font-size: 10px; color: rgba(240,231,217,.5); line-height: 1.7; }
.estimate-card .btn { margin-top: 15px; width: 100%; background: var(--accent); border-color: var(--accent); color: #fff7ed; }
.estimate-card .btn:hover { background: #c15c33; }
.job-list { display: flex; flex-direction: column; gap: 8px; }
.job-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(246,240,229,.4); }
.job-item .job-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; margin-bottom: 7px; }
.job-item .job-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-item p { font-size: 9.5px; color: var(--faint); margin-top: 5px; }
.studio-empty-videos { display: flex; flex-direction: column; align-items: center; padding: 24px; gap: 10px; color: var(--faint); font-size: 11.5px; border: 1px dashed var(--line-strong); border-radius: 12px; text-align: center; }
.studio-result { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); }
.studio-result video { width: 100%; max-height: 340px; background: #000; display: block; }
.studio-result .res-info { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.studio-result .res-info strong { font-size: 12px; }
.studio-result .res-info span { font-size: 10px; color: var(--faint); }

/* ---------- 同步 ---------- */
.sync-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.sync-step { background: rgba(251,248,241,.6); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; }
.sync-step .num { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 12px; color: var(--accent); flex: none; }
.sync-step strong { display: block; font-size: 12px; }
.sync-step p { font-size: 10px; color: var(--faint); margin-top: 3px; line-height: 1.7; }
.sync-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 22px; align-items: start; }
.sync-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.sync-side { display: flex; flex-direction: column; gap: 16px; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: rgba(251,248,241,.45); padding: 38px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.is-drag { border-color: var(--accent); background: rgba(251,248,241,.85); }
.dropzone .drop-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--paper-2); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.dropzone h3 { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.dropzone p { font-size: 11px; color: var(--faint); max-width: 360px; line-height: 1.8; }
.dropzone .btn { margin-top: 6px; }
.sync-queue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sync-queue-head h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.sync-queue { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sync-item { display: flex; align-items: center; gap: 10px; padding: 10px 13px; background: rgba(251,248,241,.5); border-bottom: 1px solid var(--line); }
.sync-item:last-child { border-bottom: 0; }
.sync-item .file-thumb { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; background: var(--paper-2); flex: none; display: flex; align-items: center; justify-content: center; color: var(--faint); }
.sync-item .file-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.sync-item .file-info { flex: 1; min-width: 0; }
.sync-item .file-info strong { display: block; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.sync-item .file-info span { display: block; font-size: 9px; color: var(--faint); margin-top: 2px; }
.sync-item .file-state { flex: none; display: flex; align-items: center; gap: 8px; }
.sync-item .file-progress { width: 86px; height: 3px; border-radius: 3px; background: rgba(36,32,26,.08); overflow: hidden; }
.sync-item .file-progress i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.sync-item .state-icon { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--faint); background: rgba(36,32,26,.05); }
.sync-item .state-icon .icon { width: 12px; height: 12px; }
.sync-item.is-verified .state-icon { background: var(--moss-soft); color: var(--moss); }
.sync-item.is-failed .state-icon { background: var(--danger-soft); color: var(--danger); }
.sync-item.is-uploading .state-icon { color: var(--accent); background: var(--accent-soft); }
.sync-item .retry-btn { border: 0; background: transparent; color: var(--accent); font-size: 10px; padding: 3px 5px; }
.sync-batch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.sync-summary { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--faint); }
.sync-progress-total { flex: 1; min-width: 100px; height: 4px; background: rgba(36,32,26,.08); border-radius: 4px; overflow: hidden; }
.sync-progress-total i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.receipt { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: rgba(251,248,241,.6); }
.receipt + .receipt { margin-top: 8px; }
.receipt-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.receipt-head strong { font-size: 11px; }
.receipt-head span { font-size: 9px; color: var(--faint); white-space: nowrap; }
.receipt p { font-size: 9.5px; color: var(--faint); margin-top: 5px; line-height: 1.7; word-break: break-all; }
.receipt-files { margin-top: 9px; display: flex; flex-direction: column; gap: 5px; }
.receipt-file { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.receipt-file .icon { width: 12px; height: 12px; color: var(--moss); flex: none; }
.receipt-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-file .receipt-name { flex: 1; min-width: 0; }
.receipt-file .cleaned { margin-left: auto; color: var(--faint); display: flex; align-items: center; gap: 4px; font-size: 9px; flex: none; }
.receipt-file .cleaned input { width: 12px; height: 12px; accent-color: var(--moss); }
.receipt-file .receipt-clean { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: rgba(36,32,26,.05); color: var(--faint); font-size: 8.5px; overflow: visible; }
.receipt-file .receipt-clean .icon { width: 10px; height: 10px; color: currentColor; }
.receipt-file .receipt-clean.is-done { background: var(--moss-soft); color: var(--moss); }
.receipt-file .receipt-clean.is-warn { background: var(--danger-soft); color: var(--danger); }
.receipt-file.is-cleaned .icon { color: var(--moss); }
.receipt-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.cleanup-callout { display: flex; align-items: center; gap: 13px; margin-top: 12px; padding: 15px 16px; border: 1px solid rgba(178,83,44,.22); border-radius: 13px; background: linear-gradient(135deg, rgba(240,221,209,.7), rgba(251,248,241,.5)); }
.cleanup-callout.is-done { border-color: rgba(91,102,80,.2); background: rgba(226,230,218,.55); }
.cleanup-callout-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: rgba(255,252,245,.7); color: var(--accent); }
.cleanup-callout.is-done .cleanup-callout-icon { color: var(--moss); }
.cleanup-callout-icon .icon { width: 17px; height: 17px; }
.cleanup-callout > div:not(.cleanup-callout-actions) { flex: 1; min-width: 0; }
.cleanup-callout strong { display: block; font-size: 11.5px; }
.cleanup-callout p { margin-top: 2px; font-size: 9.5px; color: var(--muted); line-height: 1.7; }
.cleanup-callout .btn { flex: none; }
.cleanup-callout-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.honesty-card { border: 1px solid #e3d3b4; border-radius: 12px; background: #f7efdf; padding: 14px 16px; display: flex; gap: 11px; align-items: flex-start; }
.honesty-card .icon { color: #9a7336; margin-top: 2px; flex: none; }
.honesty-card strong { display: block; font-size: 11.5px; color: #6f5224; }
.honesty-card p { font-size: 10px; color: #8b734c; line-height: 1.8; margin-top: 3px; }
.cleanup-list { display: flex; flex-direction: column; gap: 6px; }
.cleanup-row { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); padding: 5px 0; border-bottom: 1px solid var(--line); }
.cleanup-row:last-child { border: 0; }
.cleanup-row .icon { width: 13px; height: 13px; color: var(--moss); flex: none; }
.cleanup-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-list { display: flex; flex-direction: column; gap: 6px; }
.batch-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 10.5px; }
.batch-row:last-child { border: 0; }
.batch-row span { color: var(--faint); font-size: 9px; }

/* ---------- 设置 ---------- */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.settings-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.settings-side { display: flex; flex-direction: column; gap: 16px; }
.settings-panel .panel-head { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.model-status { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 11px; background: rgba(36,32,26,.035); border: 1px solid var(--line); margin-bottom: 18px; }
.model-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.model-status.is-on .dot { background: var(--moss); box-shadow: 0 0 0 4px rgba(91,102,80,.1); }
.model-status strong { display: block; font-size: 11.5px; }
.model-status span { display: block; font-size: 9.5px; color: var(--faint); margin-top: 2px; }
.model-status .btn { margin-left: auto; }
.api-key-row { display: flex; gap: 8px; align-items: flex-end; }
.api-key-row .field { flex: 1; }
.test-results { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.test-result { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; border-radius: 8px; background: rgba(36,32,26,.035); font-size: 10.5px; }
.test-result .icon { width: 14px; height: 14px; margin-top: 1px; flex: none; }
.test-result.ok .icon { color: var(--moss); }
.test-result.bad .icon { color: var(--danger); }
.test-result strong { display: block; font-size: 10.5px; }
.test-result span { display: block; color: var(--faint); font-size: 9.5px; margin-top: 1px; line-height: 1.6; word-break: break-word; }
.storage-big { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; }
.storage-big strong { font-family: var(--serif); font-size: 31px; font-weight: 500; }
.storage-big span { font-size: 10px; color: var(--faint); }
.storage-bar { height: 6px; border-radius: 6px; background: rgba(36,32,26,.08); overflow: hidden; }
.storage-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 6px; }
.storage-legend { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 9.5px; color: var(--faint); }
.helper-lead { display: flex; gap: 12px; align-items: flex-start; }
.helper-mark { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--accent-soft); color: var(--accent-deep); }
.helper-mark .icon { width: 19px; height: 19px; }
.helper-lead strong { display: block; font-size: 12px; }
.helper-lead p { margin-top: 3px; font-size: 10px; color: var(--faint); line-height: 1.8; }
.helper-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.helper-devices { margin-top: 14px; border-top: 1px solid var(--line); }
.helper-device { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.helper-device:last-child { border-bottom: 0; }
.helper-device-icon { width: 31px; height: 31px; border-radius: 50%; background: var(--moss-soft); color: var(--moss); display: flex; align-items: center; justify-content: center; flex: none; }
.helper-device-info { flex: 1; min-width: 0; }
.helper-device-info strong { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.helper-device-info span { display: block; margin-top: 1px; color: var(--faint); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.helper-fineprint { display: flex; align-items: flex-start; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9px; line-height: 1.7; }
.helper-fineprint .icon { margin-top: 1px; flex: none; }
.device-requests { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.device-section-title { margin-bottom: 2px; font-size: 9px; letter-spacing: .14em; color: var(--faint); }
.device-request { padding: 12px 13px; border: 1px dashed rgba(178,83,44,.32); border-radius: 11px; background: rgba(246,240,229,.45); }
.device-request-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.device-code { font-family: var(--mono); font-size: 17px; font-weight: 600; letter-spacing: .14em; color: var(--accent-deep); }
.device-code-inline { margin-left: 6px; font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: .08em; color: var(--faint); }
.device-request-meta { display: flex; flex-direction: column; gap: 2px; margin-top: 7px; font-size: 9.5px; color: var(--faint); }
.device-request-meta strong { font-size: 11px; color: var(--ink); }
.device-request-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.access-url { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(246,240,229,.4); }
.access-url .url { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-url .icon-btn { width: 30px; height: 30px; }
.qr-wrap { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.helper-apk-qr { padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(246,240,229,.35); }
.qr-wrap .qr-box { width: 128px; height: 128px; padding: 8px; border-radius: 10px; background: #fffdf8; border: 1px solid var(--line); flex: none; }
.qr-wrap .qr-box img { width: 100%; height: 100%; display: block; }
.qr-wrap h4 { font-size: 11.5px; margin-bottom: 5px; }
.qr-wrap p { font-size: 9.5px; color: var(--faint); line-height: 1.7; }
.feature-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 10.5px; }
.feature-row:last-child { border: 0; }
.feature-row span { color: var(--faint); }
.feature-row strong { font-weight: 500; text-align: right; font-size: 10.5px; }
.account-card { display: flex; flex-direction: column; gap: 12px; }
.password-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-zone { border-color: rgba(162,58,39,.2); }
.danger-zone .panel-title { color: var(--danger); }
.reanalyze-actions { display: flex; flex-direction: column; gap: 7px; }
.reanalyze-actions .btn { justify-content: flex-start; }
.pwa-note { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; border-radius: 9px; background: var(--paper-2); font-size: 10px; line-height: 1.75; color: var(--muted); margin-top: 12px; }
.pwa-note .icon { flex: none; margin-top: 1px; color: var(--gold); }
.page-foot { margin-top: 34px; text-align: center; font-size: 9px; letter-spacing: .14em; color: var(--faint); }

/* ---------- Toast ---------- */
.toast-root { position: fixed; z-index: 300; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(420px, calc(100vw - 28px)); }
.toast { display: flex; align-items: flex-start; gap: 9px; background: rgba(33,29,23,.96); color: #f5eddf; padding: 11px 16px; border-radius: 999px; box-shadow: var(--shadow-lg); font-size: 12px; line-height: 1.5; animation: toastin .25s ease; max-width: 100%; }
.toast .icon { width: 15px; height: 15px; margin-top: 1px; flex: none; }
.toast.success .icon { color: #b3c59b; }
.toast.error .icon { color: #e2a08b; }
.toast.is-out { opacity: 0; transform: translateY(6px); transition: all .25s; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 分享 / 自动化 / 通知 / 离线 ---------- */
.side-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: rgba(240,231,217,.45); flex: none; }
.side-bell:hover { background: rgba(255,247,232,.07); color: var(--night-text); }
.side-bell.has-unread { color: #e4b18b; }
.notify-badge { position: absolute; top: -1px; right: -3px; display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff8ef; font-size: 9px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px var(--night); }
#notify-btn-mobile { position: relative; }
#notify-btn-mobile .notify-badge { box-shadow: 0 0 0 2px var(--bg); }
.notify-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0; color: var(--faint); font-size: 11px; }
.notify-list { display: flex; flex-direction: column; gap: 3px; }
.notify-row { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 11px 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 9px; background: transparent; text-align: left; transition: background .16s ease; }
.notify-row:last-child { border-bottom: 0; }
.notify-row:hover { background: rgba(36,32,26,.04); }
.notify-row.is-read { opacity: .62; }
.notify-icon { display: flex; align-items: center; justify-content: center; width: 33px; height: 33px; border-radius: 50%; background: var(--paper-2); color: var(--gold); flex: none; }
.notify-row.has-unread .notify-icon, .notify-row:not(.is-read) .notify-icon { background: var(--accent-soft); color: var(--accent-deep); }
.notify-icon .icon { width: 15px; height: 15px; }
.notify-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notify-body strong { font-size: 11.5px; font-weight: 600; }
.notify-body span { font-size: 10px; color: var(--muted); line-height: 1.65; }
.notify-body small { font-size: 9px; color: var(--faint); margin-top: 1px; }
.notify-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 14px; }

.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.auto-list { display: flex; flex-direction: column; }
.auto-row { display: flex; align-items: center; gap: 11px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.auto-row:last-child { border-bottom: 0; }
.auto-row.compact { padding: 8px 0; }
.auto-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--paper-2); color: var(--muted); flex: none; }
.auto-icon .icon { width: 16px; height: 16px; }
.auto-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.auto-info strong { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-info > span { font-size: 9.5px; color: var(--muted); line-height: 1.6; }
.auto-info > small { font-size: 9px; color: var(--faint); line-height: 1.6; }
.auto-row-actions { display: flex; align-items: center; gap: 5px; flex: none; }
.auto-row-actions .icon-btn { width: 32px; height: 32px; }
.auto-row .switch { flex: none; }
.auto-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.empty-inline { display: flex; align-items: flex-start; gap: 12px; padding: 18px 16px; border: 1px dashed var(--line-strong); border-radius: 12px; background: rgba(251,248,241,.45); }
.empty-inline > .icon { width: 20px; height: 20px; color: var(--faint); margin-top: 2px; flex: none; }
.empty-inline strong { display: block; font-size: 11.5px; }
.empty-inline span { display: block; margin-top: 2px; font-size: 10px; color: var(--faint); line-height: 1.7; }
.storage-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.storage-summary > div { padding: 12px 13px; border-radius: 11px; background: rgba(246,240,229,.6); border: 1px solid var(--line); min-width: 0; }
.storage-summary strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.storage-summary span { display: block; margin-top: 2px; font-size: 9px; color: var(--faint); line-height: 1.5; }
.security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.security-block { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(251,248,241,.4); }
.security-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.security-block .auto-info strong { white-space: normal; }
.storage-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 6px 0; font-size: 9.5px; color: var(--muted); }
.storage-row .storage-bar { height: 5px; }
.storage-row strong { font-weight: 500; font-size: 9.5px; color: var(--ink-2); white-space: nowrap; }
.audit-filter { width: auto; max-width: 118px; height: 26px; padding: 0 26px 0 8px; border-radius: 8px; font-size: 9.5px; background-position: calc(100% - 12px) 11px, calc(100% - 8px) 11px; }
.audit-list { display: flex; flex-direction: column; }
.audit-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 9.5px; }
.audit-row:last-child { border-bottom: 0; }
.audit-row span { color: var(--faint); font-size: 9px; }
.audit-row strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-row small { color: var(--faint); font-size: 8.5px; overflow: hidden; text-overflow: ellipsis; max-width: 80px; white-space: nowrap; }
.path-text { font-family: var(--mono); font-size: 8.5px; color: var(--faint); word-break: break-all; }

.share-created { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0; }
.share-created-mark { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); margin-bottom: 12px; }
.share-created-mark .icon { width: 24px; height: 24px; }
.share-created h3 { font-family: var(--serif); font-size: 21px; font-weight: 500; }
.share-created > p { margin-top: 4px; font-size: 10.5px; color: var(--faint); }
.share-link-box { display: flex; gap: 8px; width: 100%; margin-top: 16px; }
.share-link-box .input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11px; }
.share-created-qr { display: flex; align-items: center; gap: 13px; width: 100%; margin-top: 14px; padding: 12px; border-radius: 11px; background: rgba(246,240,229,.55); text-align: left; }
.share-created-qr img { width: 92px; height: 92px; border-radius: 6px; background: #fff; flex: none; }
.share-created-qr span { font-size: 10px; color: var(--muted); line-height: 1.7; }
.share-created .honesty-card { text-align: left; width: 100%; }

.integrity-alert { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 16px; border: 1px solid #e3d3b4; border-radius: 14px; background: #f7efdf; }
.integrity-alert > .icon { color: #9a7336; flex: none; }
.integrity-alert > div { flex: 1; min-width: 0; }
.integrity-alert strong { display: block; font-size: 11.5px; color: #6f5224; }
.integrity-alert span { display: block; margin-top: 2px; font-size: 10px; color: #8b734c; line-height: 1.7; }
.integrity-alert .btn { flex: none; }

.offline-head .library-date { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--accent-deep); border: 1px solid rgba(178,83,44,.22); background: rgba(240,221,209,.5); padding: 9px 13px; border-radius: 999px; }
.offline-head .library-date .icon { width: 15px; height: 15px; }
.offline-note { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 20px; padding: 14px 16px; border: 1px solid #e3d3b4; border-radius: 12px; background: #f7efdf; }
.offline-note > .icon { color: #9a7336; margin-top: 2px; flex: none; }
.offline-note > div { flex: 1; min-width: 0; }
.offline-note strong { display: block; font-size: 11.5px; color: #6f5224; }
.offline-note p { margin-top: 2px; font-size: 10px; color: #8b734c; line-height: 1.75; }
.offline-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.offline-card { position: relative; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(55,43,27,.06); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.offline-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.offline-thumb { position: relative; aspect-ratio: 4/3; background: var(--bg-deep); overflow: hidden; }
.offline-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s ease; }
.offline-thumb img.is-ready { opacity: 1; }
.offline-thumb-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--faint); }
.offline-badge { position: absolute; top: 9px; left: 9px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(33,29,23,.72); color: #f5eddf; font-size: 8.5px; backdrop-filter: blur(6px); }
.offline-badge .icon { width: 10px; height: 10px; }
.offline-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; }
.offline-play .icon { width: 44px; height: 44px; padding: 12px; border-radius: 50%; background: rgba(33,29,23,.55); box-sizing: content-box; backdrop-filter: blur(4px); }
.offline-meta { padding: 11px 13px 13px; }
.offline-meta strong { display: block; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offline-meta span { display: block; margin-top: 2px; font-size: 9px; color: var(--faint); }
.offline-remove { position: absolute; top: 7px; right: 7px; width: 30px; height: 30px; background: rgba(33,29,23,.55); color: #f5eddf; backdrop-filter: blur(6px); opacity: 0; }
.offline-card:hover .offline-remove, .offline-card:focus-within .offline-remove { opacity: 1; }
.offline-remove:hover { background: rgba(162,58,39,.85); color: #fff; }
.offline-player { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #171410; border-radius: 10px; padding: 18px; min-height: 240px; }
.offline-player img, .offline-player video { max-height: 68vh; border-radius: 6px; }
.offline-player audio { width: min(480px, 100%); }
.offline-audio-mark { color: #f4ecdf; }

@media (max-width: 640px) {
  .storage-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .security-grid { grid-template-columns: minmax(0, 1fr); }
  .auto-row { flex-wrap: wrap; }
  .auto-row-actions { margin-left: 45px; }
  .auto-row > .pill { order: 3; }
  .panel-actions { justify-content: flex-start; }
  .offline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .offline-note { flex-wrap: wrap; }
  .offline-note .btn { margin-left: 31px; }
  .notify-row { padding: 10px 4px; }
  .share-link-box { flex-direction: column; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1220px) {
  .page { padding: 38px 34px 90px; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
  .agent-layout { grid-template-columns: 235px minmax(0, 1fr); }
  .studio-layout, .settings-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .album-composer { grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); }
  .filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .sidebar { width: 218px; padding: 28px 14px 18px; }
  .app-main { margin-left: 218px; }
  .nav-link small { display: none; }
  .page { padding: 32px 26px 86px; }
  .sync-layout { grid-template-columns: minmax(0, 1fr); }
  .sync-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .studio-layout { grid-template-columns: minmax(0, 1fr) 286px; gap: 16px; }
  .settings-layout { grid-template-columns: minmax(0, 1fr) 286px; gap: 16px; }
  .selection-bar { transform: translateX(calc(-50% + 109px)); }
  @keyframes floatin { from { opacity: 0; transform: translate(calc(-50% + 109px), 12px); } to { opacity: 1; transform: translate(calc(-50% + 109px), 0); } }
}
@media (max-width: 860px) {
  .sidebar { display: none; }
  .app-main { margin-left: 0; padding-top: calc(58px + env(safe-area-inset-top)); }
  .mobile-topbar { display: flex; align-items: center; justify-content: space-between; position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; background: rgba(243,238,228,.9); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
  .brand-mobile { padding: 0; gap: 9px; }
  .brand-mobile .brand-seal { width: 32px; height: 32px; font-size: 15px; }
  .brand-mobile .brand-text strong { font-size: 19px; letter-spacing: .14em; }
  .page { padding: 24px 16px calc(var(--nav-h) + 26px + env(safe-area-inset-bottom)); }
  .bottom-nav { position: fixed; z-index: 75; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-start; justify-content: space-around; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 7px 6px env(safe-area-inset-bottom); background: rgba(251,248,241,.94); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
  .bottom-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 54px; padding: 4px 8px; border-radius: 10px; color: var(--faint); font-size: 9px; letter-spacing: .06em; }
  .bottom-link .icon { width: 21px; height: 21px; }
  .bottom-link.is-active { color: var(--accent-deep); }
  .bottom-link.is-active .icon { stroke-width: 1.9; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 22px; }
  .page-title { font-size: 34px; }
  .page-actions { justify-content: flex-start; width: 100%; }
  .page-actions .btn { flex: 0 0 auto; }
  .library-greeting { align-items: flex-start; }
  .library-date { display: none; }
  .stat-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); border-radius: 14px; }
  .stat-card { padding: 10px 8px; min-height: 76px; }
  .stat-card .k { font-size: 9px; letter-spacing: .06em; }
  .stat-card .k .icon { display: none; }
  .stat-card .v { font-size: 19px; }
  .stat-card .v small { display: none; }
  .library-tools { gap: 6px; flex-wrap: wrap; }
  .search-box { flex: 1 1 100%; }
  .search-box input { height: 44px; }
  .library-filterbar { margin: 12px 0 16px; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .library-filterbar::-webkit-scrollbar { display: none; }
  .library-filterbar .chip-row { flex-wrap: nowrap; }
  .library-filterbar .chip { flex: none; }
  .filter-panel { grid-template-columns: 1fr 1fr; padding: 14px; gap: 10px; }
  .filter-panel .span-2 { grid-column: span 2; }
  .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .media-card { border-radius: 7px; }
  .media-card:hover img { transform: none; }
  .media-card .card-bottom { left: 7px; right: 7px; bottom: 6px; }
  .media-card .card-bottom::before { inset: -24px -8px -8px; border-radius: 0 0 7px 7px; }
  .media-card .card-meta { font-size: 9px; }
  .media-card .status-dot { top: 8px; right: 8px; width: 6px; height: 6px; }
  .media-card .quick-fav { display: none; }
  .selection-bar { left: 8px; right: 8px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); transform: none; justify-content: space-between; padding: 7px 8px 7px 14px; border-radius: 16px; }
  @keyframes floatin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .selection-bar .sel-actions button span, .selection-bar .sel-actions a span { display: none; }
  .selection-bar .sel-actions button, .selection-bar .sel-actions a { padding: 0 9px; }
  .upload-progress-panel { right: 10px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: minmax(0, 58vh) minmax(0, 1fr); background: #17130f; }
  .lb-stage { padding: 48px 12px 16px; }
  .lb-media img, .lb-media video { max-height: calc(58vh - 70px); }
  .lb-media .lb-doc-frame { height: calc(58vh - 70px); }
  .lb-nav { width: 38px; height: 38px; top: 42%; }
  .lb-nav.prev { left: 6px; }
  .lb-nav.next { right: 6px; }
  .lb-bottom { padding: 8px 14px 10px; }
  .lb-info { border-left: 0; border-top: 1px solid rgba(255,255,255,.06); border-radius: 18px 18px 0 0; margin-top: -14px; z-index: 4; }
  .lb-info-head { padding: 18px 18px 14px; }
  .lb-body { padding: 16px 18px; }
  .lb-title { font-size: 18px; }
  .lb-actions { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .lb-close { background: rgba(20,16,11,.5); }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; }
  .modal-head { padding: 18px 18px 13px; }
  .modal-body { padding: 16px 18px; }
  .modal-foot { padding: 13px 18px calc(13px + env(safe-area-inset-bottom)); }
  .picker-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .album-card .album-cover { border-radius: 10px; }
  .album-card .album-state h3 { font-size: 17px; }
  .album-card .album-meta { font-size: 9px; }
  .album-card .album-actions { display: none; }
  .album-composer { grid-template-columns: 1fr; padding: 18px; gap: 20px; }
  .composer-right { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .selected-photos { grid-template-columns: repeat(5, 1fr); }
  .comment .style-options { grid-template-columns: 1fr 1fr; }
  .agent-layout { grid-template-columns: 1fr; height: calc(100dvh - 58px - var(--nav-h) - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 430px; border-radius: 14px; margin: 0 -2px; }
  .conv-sidebar { position: absolute; z-index: 20; inset: 0 auto 0 0; width: min(290px, 84%); background: var(--paper); transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .conv-sidebar.is-open { transform: none; }
  .conv-backdrop { position: absolute; z-index: 19; inset: 0; background: rgba(20,16,11,.34); }
  .agent-header { padding: 10px 13px; min-height: 54px; }
  .agent-header .mobile-conv-toggle { display: inline-flex; }
  .agent-title { gap: 8px; }
  .agent-avatar { width: 29px; height: 29px; font-size: 12px; }
  .agent-header strong { font-size: 14px; }
  .chat-scroll { padding: 16px 12px 10px; }
  .chat-inner { gap: 16px; }
  .chat-welcome h2 { font-size: 23px; }
  .suggestion-grid { grid-template-columns: 1fr; }
  .suggestion { padding: 10px 12px; font-size: 11.5px; }
  .msg-content { max-width: 86%; }
  .msg-bubble { font-size: 13px; padding: 10px 12px; }
  .msg-avatar { width: 26px; height: 26px; font-size: 10px; }
  .artifact-grid { grid-template-columns: repeat(3, 1fr); }
  .artifact-action { flex-wrap: wrap; gap: 9px; }
  .artifact-action-main { flex-basis: calc(100% - 68px); }
  .artifact-action-buttons { width: 100%; justify-content: flex-end; }
  .composer-wrap { padding: 9px 11px calc(9px + env(safe-area-inset-bottom)); }
  .composer-hint, .composer-note { display: none; }
  .studio-layout { grid-template-columns: 1fr; }
  .studio-side { position: static; }
  .clip-controls { grid-template-columns: 1fr 1fr; }
  .studio-side .panel { padding: 16px 16px; }
  .sync-steps { grid-template-columns: 1fr; gap: 8px; margin-bottom: 18px; }
  .sync-step { padding: 11px 13px; }
  .sync-side { grid-template-columns: 1fr; }
  .sync-layout { gap: 14px; }
  .dropzone { padding: 28px 16px; }
  .receipt-actions { width: 100%; justify-content: flex-start; }
  .cleanup-callout { align-items: flex-start; flex-wrap: wrap; }
  .cleanup-callout > div:not(.cleanup-callout-actions) { flex-basis: calc(100% - 52px); }
  .cleanup-callout .btn, .cleanup-callout-actions { margin-left: 51px; }
  .helper-actions .btn { flex: 1 1 auto; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-side { display: grid; grid-template-columns: 1fr; }
  .settings-panel { padding: 18px 16px; }
  .field-row { grid-template-columns: 1fr; }
  .login-screen { display: flex; flex-direction: column; overflow-y: auto; }
  .login-visual { min-height: 230px; padding: 26px 24px; justify-content: flex-start; }
  .login-brand { font-size: 23px; }
  .polaroids { display: none; }
  .login-quote { margin-top: 26px; }
  .login-quote p { font-size: 22px; }
  .login-quote span { margin-top: 10px; font-size: 8px; }
  .login-panel { padding: 30px 24px 60px; flex: 1; }
  .login-card h1 { font-size: 30px; }
  .login-mini-mark { display: none; }
  .login-footer { position: static; margin-top: 34px; }
  .page-foot { padding-bottom: 10px; }
  .album-viewer .long-image { max-height: 62vh; }
}
@media (max-width: 390px) {
  .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .selected-photos { grid-template-columns: repeat(4, 1fr); }
  .page-title { font-size: 30px; }
  .library-tools .btn span { display: none; }
  .library-tools .btn { padding: 0 13px; }
  .album-grid { grid-template-columns: 1fr 1fr; }
  .clip-card { grid-template-columns: 64px minmax(0, 1fr); }
  .stat-card .v { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 家庭成员档案 ---------- */
.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff8ed;
  font-family: var(--font-display, "Noto Serif SC", serif);
  font-size: 17px;
  font-weight: 600;
  overflow: hidden;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-sm { width: 28px; height: 28px; font-size: 13px; }
.profile-avatar-lg { width: 58px; height: 58px; font-size: 24px; }

.profile-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 4px 12px;
  padding: 9px 10px;
  border: 1px solid rgba(255,247,232,.09);
  border-radius: 12px;
  background: rgba(255,247,232,.045);
  color: var(--cream, #f2ead9);
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.profile-button:hover { background: rgba(255,247,232,.09); border-color: rgba(228,177,139,.35); }
.profile-button-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.profile-button-meta strong { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-button-meta small { font-size: 10px; letter-spacing: .08em; color: rgba(240,231,217,.45); }
.profile-chevron { width: 14px; height: 14px; color: rgba(240,231,217,.4); flex: none; }
.profile-button-mobile {
  width: auto;
  margin: 0;
  padding: 4px 10px 4px 4px;
  background: var(--paper, #fbf7ef);
  border-color: rgba(80,64,40,.14);
  color: var(--ink, #3a2f24);
  border-radius: 999px;
}
.profile-button-mobile:hover { background: var(--paper, #fbf7ef); border-color: var(--clay, #a8552e); }
.profile-button-mobile .profile-button-meta strong { font-size: 12px; }
.profile-button-mobile .profile-button-meta small { color: var(--muted, #8a7a67); font-size: 9px; }
.profile-button-mobile .profile-chevron { color: var(--muted, #8a7a67); }
.profile-button-mobile .profile-avatar-sm { width: 26px; height: 26px; }

.profile-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--line, #e4dacb);
  background: var(--paper, #fbf7ef);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.profile-tile:hover { transform: translateY(-2px); border-color: var(--profile-color, #a8552e); box-shadow: 0 12px 24px rgba(60,42,24,.08); }
.profile-tile.is-current { border-color: var(--profile-color, #a8552e); background: color-mix(in srgb, var(--profile-color, #a8552e) 7%, var(--paper, #fbf7ef)); }
.profile-tile-name { font-family: var(--font-display, "Noto Serif SC", serif); font-size: 16px; font-weight: 600; color: var(--ink, #3a2f24); }
.profile-tile-note { font-size: 10.5px; letter-spacing: .04em; color: var(--muted, #8a7a67); display: inline-flex; align-items: center; gap: 3px; }
.profile-tile-note .icon { width: 11px; height: 11px; }
.profile-check {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--profile-color, #a8552e); color: #fff;
}
.profile-check .icon { width: 12px; height: 12px; }

.pin-prompt { display: flex; flex-direction: column; gap: 16px; }
.pin-profile { display: flex; align-items: center; gap: 14px; }
.pin-profile > div { display: flex; flex-direction: column; gap: 3px; }
.pin-profile strong { font-family: var(--font-display, "Noto Serif SC", serif); font-size: 18px; color: var(--ink); }
.pin-profile span { font-size: 11.5px; color: var(--muted); }
.pin-input {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 26px; letter-spacing: .5em; text-align: center; font-family: var(--font-mono, monospace);
  background: var(--paper); color: var(--ink);
}
.pin-input:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(168,85,46,.12); }

body.is-kids .profile-tile.is-current { box-shadow: 0 0 0 2px rgba(168,85,46,.15); }

.member-list { display: flex; flex-direction: column; }
.member-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}
.member-row:last-child { border-bottom: 0; }
.member-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.member-info strong { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ink); }
.member-info > span { font-size: 11.5px; color: var(--muted); }
.member-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(168,85,46,.1);
  color: var(--clay);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .04em;
}
.member-badge-kids { background: rgba(91,122,99,.14); color: #47634f; }
.member-actions { display: flex; gap: 4px; flex: none; }

.member-editor { display: flex; flex-direction: column; gap: 18px; }
.member-avatar-editor { display: flex; align-items: center; gap: 16px; }
.member-avatar-editor .hint { margin: 6px 0 0; }
.member-upload { position: relative; overflow: hidden; }
.member-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.member-color {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid transparent;
  background: var(--swatch);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.member-color .icon { width: 14px; height: 14px; opacity: 0; transition: opacity .15s ease; }
.member-color:hover { transform: scale(1.08); }
.member-color.is-selected { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--swatch); }
.member-color.is-selected .icon { opacity: 1; }
.member-kids-row { align-items: center; }
.member-clear-pin { font-size: 12.5px; color: var(--muted); gap: 8px; }

@media (max-width: 860px) {
  .member-row { flex-wrap: wrap; }
  .member-actions { width: 100%; justify-content: flex-end; }
  .member-avatar-editor { align-items: flex-start; }
  .profile-button:not(.profile-button-mobile) { display: none; }
  .profile-button-mobile .profile-button-meta { display: none; }
  .profile-button-mobile { padding: 4px; }
  .profile-button-mobile .profile-chevron { display: none; }
  .profile-picker { gap: 10px; }
  .profile-tile { padding: 16px 8px 12px; }
}

.sync-log-view {
  margin: 0;
  padding: 14px 16px;
  max-height: min(58vh, 560px);
  overflow: auto;
  background: #221d18;
  color: #f2e9dc;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 相册 · 故事 */
.story-intro { margin-bottom: 18px; }
.story-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.story-card { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,252,245,.6); }
.story-cover { flex: none; width: 96px; height: 120px; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #d8c8b2, #a99378); color: rgba(255,248,238,.7); }
.story-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.story-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.story-card-head h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.story-meta { margin: 0; font-size: 11.5px; color: var(--faint); }
.story-excerpt { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; }
.story-actions .icon-btn { margin-left: auto; }
.story-editor { margin-bottom: 24px; padding: 20px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--paper); box-shadow: 0 14px 34px rgba(50,38,23,.08); display: flex; flex-direction: column; gap: 16px; }
.story-editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.story-editor-head h2 { margin: 2px 0 0; font-size: 20px; }
.story-range { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 12px; align-items: end; }
.story-range .segmented { min-height: 44px; align-items: center; }
.story-pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.story-pick-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.story-over { margin-left: 10px; color: var(--danger); font-weight: 600; }
.story-pick-hint { margin: -8px 0 0; font-size: 12px; color: var(--faint); }
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: 520px; overflow-y: auto; padding: 2px; }
.story-empty { grid-column: 1 / -1; padding: 36px 12px; text-align: center; color: var(--faint); font-size: 13px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.story-day-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 10px 2px 0; }
.story-day-head:first-child { padding-top: 0; }
.story-day-head h3 { margin: 0; font-size: 14px; }
.story-day-head span { font-size: 11px; color: var(--faint); }
.story-day-head .btn { margin-left: auto; }
.story-tile { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: #cabda8; cursor: pointer; outline-offset: 2px; }
.story-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .18s ease, filter .18s ease; }
.story-tile.is-off img { opacity: .35; filter: grayscale(.7); }
.story-check { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.story-check .icon { width: 13px; height: 13px; }
.story-tile.is-off .story-check { background: rgba(255,252,245,.85); border: 1.5px solid rgba(36,32,26,.3); }
.story-extra { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 99px; background: rgba(91,102,80,.9); color: #fff; font-size: 10.5px; font-weight: 700; }
.story-video { position: absolute; right: 6px; bottom: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.story-video .icon { width: 15px; height: 15px; }
.story-zoom { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; display: none; align-items: center; justify-content: center; background: rgba(20,16,12,.55); color: #fff; }
.story-zoom .icon { width: 14px; height: 14px; }
.story-tile:hover .story-zoom, .story-tile:focus-visible .story-zoom { display: flex; }
.story-form { display: flex; flex-direction: column; gap: 14px; }
.story-editor-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.story-editor-foot .hint { margin-right: auto; font-size: 12px; color: var(--faint); }
.story-review { display: flex; flex-direction: column; gap: 12px; }
.story-review-row { display: flex; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; transition: opacity .18s ease; }
.story-review-row.is-off { opacity: .45; }
.story-review-pick { position: relative; flex: none; width: 92px; cursor: pointer; }
.story-review-pick img { width: 92px; height: 92px; object-fit: cover; border-radius: 9px; display: block; }
.story-review-pick input { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; accent-color: var(--accent); }
.story-review-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.story-review-fields .textarea { min-height: 62px; }
.story-review-old { font-size: 12px; color: var(--faint); line-height: 1.6; }
.story-review-old span { margin-right: 8px; font-weight: 700; color: var(--muted); }
.story-review-old em { display: block; font-style: normal; }
@media (max-width: 640px) {
  .story-list { grid-template-columns: 1fr; }
  .story-range { grid-template-columns: 1fr 1fr; }
  .story-range .field:nth-child(3), .story-range [data-load-range] { grid-column: 1 / -1; }
  .story-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); max-height: 60vh; }
  .story-editor { padding: 14px; }
  .story-review-row { flex-direction: column; }
}

/* ---------- 文档库 ---------- */
.doc-page-head { margin-bottom: 26px; }
.doc-stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px; }
.doc-stat { background: rgba(251,248,241,.72); padding: 18px 22px; min-height: 92px; display: flex; flex-direction: column; gap: 7px; }
.doc-stat span { font-size: 10.5px; letter-spacing: .16em; color: var(--faint); text-transform: uppercase; }
.doc-stat strong { font-family: var(--serif); font-size: 30px; line-height: 1; font-weight: 600; }
.doc-stat small { font-size: 10.5px; color: var(--faint); letter-spacing: .03em; }
.doc-tools { margin-bottom: 14px; }
.doc-filterbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.doc-filterbar .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.doc-filterbar .chip-row::-webkit-scrollbar { display: none; }
.doc-filterbar .chip { flex: none; }
.doc-sort { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 11px; color: var(--faint); }
.doc-sort .select { width: auto; min-width: 122px; height: 34px; }
.doc-note { color: var(--faint); font-size: 11.5px; margin: -6px 0 16px; }
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-row { display: flex; align-items: flex-start; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(251,248,241,.72); cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.doc-row:hover { background: #fffaf1; border-color: var(--line-strong); transform: translateY(-1px); }
.doc-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc-file-icon { position: relative; flex: none; width: 56px; height: 68px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff8ec; background: linear-gradient(145deg, #a8552e, #71341c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 4px 12px rgba(88,47,26,.14); }
.doc-file-icon .icon { width: 25px; height: 25px; opacity: .9; margin-top: -7px; }
.doc-file-icon span { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 8px; font-weight: 700; letter-spacing: .12em; opacity: .9; }
.doc-file-icon.is-pdf { background: linear-gradient(145deg, #9b4330, #5d2017); }
.doc-file-icon.is-pptx, .doc-file-icon.is-ppt { background: linear-gradient(145deg, #b65b2f, #873819); }
.doc-row-main { flex: 1; min-width: 0; }
.doc-row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-row-head h3 { font-family: var(--serif); font-size: 16px; font-weight: 600; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.doc-status { flex: none; display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 10px; letter-spacing: .04em; background: rgba(157,177,132,.16); color: #5f7347; }
.doc-status.is-pending, .doc-status.is-processing { background: rgba(178,83,44,.1); color: var(--accent-deep); }
.doc-status.is-empty, .doc-status.is-unsupported, .doc-status.is-failed { background: rgba(120,110,96,.12); color: var(--muted); }
.doc-row-meta { margin-top: 5px; font-size: 11px; color: var(--faint); letter-spacing: .02em; }
.doc-row-snippet { margin-top: 9px; font-size: 12.5px; line-height: 1.65; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.doc-row-snippet mark, .doc-content-text mark { background: rgba(196,148,74,.3); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.doc-row-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; align-self: stretch; }
.doc-row-side .icon-btn { color: var(--faint); }
.doc-row:hover .icon-btn { color: var(--ink); }
.doc-open { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--faint); }
.doc-row:hover .doc-open { color: var(--accent-deep); }
.doc-load-more { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 24px 0 8px; color: var(--faint); font-size: 11px; }
.doc-empty { min-height: 300px; }
.doc-empty .empty-icon .icon { width: 30px; height: 30px; }
.skeleton-doc-row { pointer-events: none; }
.skeleton-doc-row .skeleton-line { height: 12px; border-radius: 6px; margin-top: 9px; background: linear-gradient(100deg, #e7dece 30%, #f2ebdf 50%, #e7dece 70%); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
.skeleton-pulse { background: linear-gradient(100deg, #e7dece 30%, #f2ebdf 50%, #e7dece 70%); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
.doc-modal .modal-body { padding: 0; }
.doc-modal .modal-body .doc-detail { padding: 22px 26px; }
.doc-viewer { height: min(68vh, 760px); background: #231d16; border-bottom: 1px solid var(--line); }
.doc-viewer iframe { width: 100%; height: 100%; border: 0; display: block; background: #f7f3ea; }
.doc-detail-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.doc-detail-head .doc-file-icon { width: 48px; height: 58px; }
.doc-detail-name { font-family: var(--serif); font-size: 16px; word-break: break-all; }
.doc-detail-meta { margin-top: 5px; font-size: 11.5px; color: var(--faint); }
.doc-detail-status { margin-top: 8px; }
.doc-detail-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin-bottom: 16px; border-radius: 10px; background: rgba(178,83,44,.06); color: var(--muted); font-size: 12px; line-height: 1.6; }
.doc-detail-note .icon { flex: none; color: var(--accent); margin-top: 1px; }
.doc-detail-section { border-top: 1px solid var(--line); padding-top: 14px; }
.doc-detail-label { font-size: 10.5px; letter-spacing: .18em; color: var(--faint); text-transform: uppercase; margin-bottom: 10px; }
.doc-content-text { font-size: 13px; line-height: 1.85; color: var(--ink); white-space: pre-wrap; word-break: break-word; max-height: 46vh; overflow: auto; padding-right: 6px; }
.doc-detail-empty { font-size: 12.5px; line-height: 1.7; color: var(--muted); }

@media (max-width: 860px) {
  .doc-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-stat { min-height: 76px; padding: 12px 14px; }
  .doc-stat strong { font-size: 24px; }
  .doc-filterbar { gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .doc-filterbar::-webkit-scrollbar { display: none; }
  .doc-filterbar .chip-row { overflow: visible; }
  .doc-sort { margin-left: 0; flex: none; }
  .doc-row { gap: 11px; padding: 13px 12px; }
  .doc-file-icon { width: 44px; height: 54px; }
  .doc-file-icon .icon { width: 20px; height: 20px; margin-top: -6px; }
  .doc-row-head h3 { font-size: 14px; }
  .doc-row-side .doc-open { display: none; }
  .doc-row-side { justify-content: flex-start; }
  .doc-modal .modal-body .doc-detail { padding: 16px 18px; }
  .doc-viewer { height: 56vh; }
  .doc-content-text { max-height: none; }
  .bottom-link { min-width: 0; flex: 1; padding: 4px 3px; }
}

.stat-card.stat-link { color: inherit; text-decoration: none; cursor: pointer; transition: background .18s ease; }
.stat-card.stat-link:hover { background: #fffaf1; }
.stat-card.stat-link .k::after { content: "→"; margin-left: auto; color: var(--accent); opacity: .7; }
