/* letni 生活图像：取值照设计交付包的 tokens（浅色 / 深色跟随系统） */
:root {
  color-scheme: light dark;
  --bg: #F6F5F2; --surface: #FFFFFF; --surface-2: #EFEDE8; --border: #E2DFD9; --divider: #EFEDE8;
  --text: #17171A; --text-2: #5C5C5C; --text-3: #6B6B6B; --body: #3A3A3A;
  --primary: #17171A; --on-primary: #FFFFFF;
  --ai: #5B4CF0; --ai-tint: #EEEAFE;
  --danger: #A12A1E; --danger-tint: #FBE4E1; --success: #0F7A5F;
  --public: #0F7A5F; --public-tint: #E3F2EC; --public-badge: #0F7A5F;
  --shared: #A65308; --shared-tint: #FBEBDC; --shared-badge: #A65308;
  --private: #2F3542; --private-tint: #E6E8EC; --private-badge: #2F3542;
  --scrim: rgba(0,0,0,0.5);
  --font: Inter, 'Noto Sans SC', 'PingFang SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --safe-b: max(env(safe-area-inset-bottom, 0px), 14px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214; --surface: #1C1C1F; --surface-2: #26262A; --border: #34343A; --divider: #2E2E33;
    --text: #F2F1EE; --text-2: #A8A6A0; --text-3: #8F8D87; --body: #D8D6D0;
    --primary: #F2F1EE; --on-primary: #121214;
    --ai: #A99BFF; --ai-tint: #2A2547;
    --danger: #F08A7E; --danger-tint: #3A1A17; --success: #4CC79F;
    --public: #4CC79F; --public-tint: #12302A; --public-badge: #138A69;
    --shared: #F0A35E; --shared-tint: #3A2614; --shared-badge: #C46A12;
    --private: #C3CAD6; --private-tint: #2A2E36; --private-badge: #5A6475;
    --scrim: rgba(0,0,0,0.6);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; position: fixed; inset: 0; width: 100%; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); overscroll-behavior: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
#app { position: relative; max-width: 480px; height: 100dvh; margin: 0 auto; background: var(--surface); overflow: hidden; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface); }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 14px; height: 14px; stroke-width: 2; }
svg.i.m { width: 22px; height: 22px; }

/* 按钮 */
.btn { height: 52px; min-width: 52px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.danger { background: var(--danger-tint); color: var(--danger); border-color: transparent; }
.btn.danger.solid { background: var(--danger); color: #fff; }
.btn.grow { flex: 1; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.btn.sq { width: 52px; padding: 0; flex: none; }
.pill { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; position: relative; }
.pill::after, .lnk::after { content: ""; position: absolute; inset: -6px 0; }           /* 可点区域补到 44 */
.lnk { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; position: relative; min-height: 28px; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; display: flex; align-items: center; justify-content: center; color: var(--text); flex: none; }
.icon-btn.on-img { background: rgba(0,0,0,0.45); color: #fff; }
.bar { padding: 12px 20px calc(20px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--divider); display: flex; gap: 10px; flex: none; }
.bar.col { flex-direction: column; }

/* 首页：取景 */
.cam { background: #2E2924; color: #fff; }
.cam video, .cam .fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam .corner { position: absolute; width: 30px; height: 30px; border: 0 solid #fff; }
.cam .corner.tl { left: 16%; top: 22.5%; border-left-width: 3px; border-top-width: 3px; border-top-left-radius: 10px; }
.cam .corner.tr { right: 16%; top: 22.5%; border-right-width: 3px; border-top-width: 3px; border-top-right-radius: 10px; }
.cam .corner.bl { left: 16%; bottom: 30%; border-left-width: 3px; border-bottom-width: 3px; border-bottom-left-radius: 10px; }
.cam .corner.br { right: 16%; bottom: 30%; border-right-width: 3px; border-bottom-width: 3px; border-bottom-right-radius: 10px; }
.tabs { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 16px); display: flex; justify-content: center; z-index: 2; }
.tabs > div { display: flex; gap: 2px; padding: 3px; background: rgba(0,0,0,0.45); border-radius: 999px; }
.tabs button { height: 32px; min-width: 56px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: #E8E6E1; font-weight: 500; font-size: 13px; position: relative; }
.tabs button::after { content: ""; position: absolute; inset: -6px 0; }
.tabs button[aria-selected="true"] { background: #fff; color: #17171A; font-weight: 600; }
.tabs.light > div { background: var(--surface-2); }
.tabs.light button { color: var(--text-2); }
.tabs.light button[aria-selected="true"] { background: var(--primary); color: var(--on-primary); }
.cam .hint { position: absolute; left: 0; right: 0; bottom: calc(84px + var(--safe-b) + 108px); text-align: center; font-size: 13px; text-shadow: 0 1px 4px rgba(0,0,0,.6); padding: 0 20px; }
.cam .ctl { position: absolute; left: 0; right: 0; bottom: calc(70px + var(--safe-b) + 14px); height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 44px; }
.cam .ctl .gal { width: 52px; height: 52px; border-radius: 14px; border: 2px solid #fff; background: #6F8C7A; color: #fff; display: flex; align-items: center; justify-content: center; }
.cam .ctl .shut { width: 80px; height: 80px; border-radius: 50%; border: 4px solid #fff; background: none; display: flex; align-items: center; justify-content: center; padding: 0; }
.cam .ctl .shut span { width: 62px; height: 62px; border-radius: 50%; background: #fff; display: block; transition: transform .12s var(--ease); }
.cam .ctl .shut:active span { transform: scale(.9); }
.cam .ctl .flip { width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.45); color: #fff; display: flex; align-items: center; justify-content: center; }
.nocam { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 0 32px calc(84px + var(--safe-b)); text-align: center; }
.nocam .big { width: 100%; max-width: 300px; height: 64px; border-radius: 16px; border: 0; background: #fff; color: #17171A; font-weight: 600; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.nocam p { margin: 0; font-size: 13px; color: #D6D3CD; line-height: 1.6; }
.nocam b { font-size: 15px; color: #fff; }

/* 底部导航 */
.nav { flex: none; height: calc(70px + var(--safe-b)); padding-top: 8px; display: flex; justify-content: space-around; align-items: flex-start; background: var(--surface); border-top: 1px solid var(--divider); position: relative; }
.nav.dark { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(14,14,16,0.82); border: 0; }
.nav button { width: 96px; height: 48px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 11px; font-weight: 500; }
.nav button[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav.dark button { color: #D6D3CD; }
.nav.dark button[aria-current="page"] { color: #fff; }
.nav .shoot { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: var(--on-primary); margin-top: -26px; box-shadow: 0 6px 16px rgba(0,0,0,.22); border: 4px solid var(--surface); }

/* 结果页 */
.photo { position: absolute; left: 0; right: 0; top: 0; height: 132px; background: #2E2924; border: 0; padding: 0; overflow: hidden; display: block; width: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.tall { height: 100%; }
.top-l, .top-r { position: absolute; top: calc(var(--safe-t) + 12px); z-index: 3; }
.top-l { left: 16px; } .top-r { right: 16px; }
.card { position: absolute; left: 0; right: 0; top: 112px; bottom: 0; background: var(--surface); border-radius: 24px 24px 0 0; display: flex; flex-direction: column; }
.enter .card { animation: rise .28s var(--ease); }
.card .scroll { padding: 22px 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.card .scroll > * { flex-shrink: 0; }      /* 内容多时往下滚，不把哪一块压扁（“读出的全文”曾被压成一条缝） */
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat { height: 32px; padding: 0 12px 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; position: relative; max-width: 100%; }
.cat::after { content: ""; position: absolute; inset: -6px 0; }
.cat.ro { padding-right: 14px; }
.cat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aim { width: 18px; height: 18px; border-radius: 50%; background: var(--ai-tint); display: inline-flex; align-items: center; justify-content: center; flex: none; vertical-align: middle; }
.aim svg { width: 11px; height: 11px; fill: var(--ai); }
.name { border: 0; background: none; padding: 0; text-align: left; font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--text); display: block; width: 100%; min-height: 44px; word-break: break-word; }
.name .aim { margin-left: 6px; }
.name.empty { color: var(--text-3); font-weight: 500; }
.desc { margin: 0; font-size: 15px; line-height: 1.65; color: var(--body); white-space: pre-wrap; word-break: break-word; }
.ainote { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ai); }
.ainote svg { width: 11px; height: 11px; fill: var(--ai); }
.meta { display: flex; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.meta > span { display: inline-flex; align-items: center; gap: 4px; }
.hr { height: 1px; background: var(--divider); flex: none; }
.lbl { font-size: 13px; color: var(--text-2); font-weight: 500; }
.vis3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vis3 button { height: 64px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 500; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 2px; line-height: 1.15; text-align: center; }
.vis3 button[aria-checked="true"] { border-width: 2px; font-weight: 700; }
.vis3 button[data-v="public"][aria-checked="true"] { border-color: var(--public); background: var(--public-tint); color: var(--public); }
.vis3 button[data-v="protected"][aria-checked="true"] { border-color: var(--shared); background: var(--shared-tint); color: var(--shared); }
.vis3 button[data-v="private"][aria-checked="true"] { border-color: var(--private); background: var(--private-tint); color: var(--private); }
.tip { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.vtag { height: 30px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.vtag svg { width: 15px; height: 15px; }
.vtag.public { background: var(--public-tint); color: var(--public); }
.vtag.protected { background: var(--shared-tint); color: var(--shared); }
.vtag.private { background: var(--private-tint); color: var(--private); }
.textbox { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; color: var(--body); }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); font-size: 13px; line-height: 1.5; color: var(--text-2); }
.banner b { color: var(--text); font-weight: 600; }
.banner.ok { background: var(--public-tint); border-color: transparent; color: var(--public); }
.banner.warn { background: var(--shared-tint); border-color: transparent; color: var(--shared); }
.banner .grow { flex: 1; min-width: 0; }
.cands { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 500; white-space: nowrap; position: relative; flex: none; }
.chip::after { content: ""; position: absolute; inset: -5px 0; }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); font-weight: 600; }

/* 识别中 */
.steps { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.step { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text-3); }
.step.on { color: var(--text); font-weight: 600; }
.step.done { color: var(--text); }
.step i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex: none; display: flex; align-items: center; justify-content: center; }
.step.done i { background: var(--success); border-color: var(--success); color: #fff; }
.step.done i svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; fill: none; }
.step.on i { border-color: var(--text); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 24px 32px; }
.center h2 { margin: 0; font-size: 20px; font-weight: 700; }
.center p { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.65; }
.center .ico { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.center .ico svg { width: 32px; height: 32px; }

/* 底部面板 */
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; animation: fade .2s linear; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { background: var(--surface); border-radius: 24px 24px 0 0; max-height: 88%; display: flex; flex-direction: column; animation: up .28s var(--ease); }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 8px auto 0; flex: none; }
.sheet .head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 20px; min-height: 52px; flex: none; }
.sheet .head h3 { margin: 0; font-size: 17px; font-weight: 700; flex: none; }
.sheet .head .saved { font-size: 13px; color: var(--success); display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.sheet .head .saved button { border: 0; background: none; padding: 8px 4px; font-size: 13px; font-weight: 600; color: var(--text); text-decoration: underline; }
.sheet .body { padding: 4px 20px calc(20px + var(--safe-b)); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.sheet .body h4 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; }
.sheet .body p { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.65; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .l { font-size: 13px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.field .src { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: 400; }
.in { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 15px; outline: none; }
.in:focus { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
textarea.in { resize: none; line-height: 1.6; min-height: 96px; }
select.in { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.rowbtn { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 15px; display: flex; align-items: center; gap: 8px; text-align: left; }
.rowbtn .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code { display: flex; align-items: center; gap: 8px; }
.code .in { flex: 1; font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px; }
.catlist { display: flex; flex-direction: column; gap: 4px; }
.catlist .g { font-size: 12px; color: var(--text-3); padding: 12px 2px 4px; font-weight: 600; }
.catlist button { min-height: 44px; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.catlist button[aria-current="true"] { background: var(--surface-2); font-weight: 600; }

/* 提示条 */
.toast { position: absolute; left: 20px; right: 20px; bottom: calc(100px + var(--safe-b)); min-height: 48px; padding: 10px 16px; border-radius: 14px; background: #17171A; color: #fff; font-size: 14px;
  display: flex; align-items: center; gap: 10px; z-index: 40; animation: rise .2s var(--ease); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast i { width: 24px; height: 24px; border-radius: 50%; background: var(--success); flex: none; display: flex; align-items: center; justify-content: center; }
.toast.err i { background: #C8442F; }
.toast i svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; fill: none; }

/* 普通页面的页头 */
.hdr { flex: none; padding: calc(var(--safe-t) + 8px) 12px 8px 20px; display: flex; align-items: center; gap: 8px; min-height: 60px; }
.hdr h1 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.25; flex: 1; }
.hdr.sub { padding-left: 8px; }
.hdr.sub h1 { font-size: 17px; }
.chips { flex: none; display: flex; gap: 8px; padding: 4px 20px 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.grid-h { font-size: 13px; color: var(--text-2); font-weight: 600; padding: 12px 20px 8px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 3px; }
.thumb { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--surface-2); overflow: hidden; border-radius: 6px; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .bd { position: absolute; right: 5px; bottom: 5px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 0 0 2px var(--surface); }
.thumb .bd svg { width: 12px; height: 12px; stroke-width: 2.2; }
.bd.public { background: var(--public-badge); } .bd.protected { background: var(--shared-badge); } .bd.private { background: var(--private-badge); }
.thumb .ck { position: absolute; left: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; }
.thumb[aria-pressed="true"] .ck { background: var(--ai); border-color: var(--ai); }
.thumb[aria-pressed="true"] img { opacity: .7; }
.thumb .ck svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; fill: none; }
.search { margin: 0 20px 10px; flex: none; }

/* 我的 / 套餐 */
.list { display: flex; flex-direction: column; }
.item { min-height: 56px; padding: 10px 20px; border: 0; background: none; text-align: left; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--divider); width: 100%; font-size: 15px; }
.item .grow { flex: 1; min-width: 0; }
.item small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
.item .val { color: var(--text-2); font-size: 14px; flex: none; max-width: 46%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item.danger { color: var(--danger); }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex: none; }
.switch { width: 48px; height: 28px; border-radius: 14px; background: var(--border); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s var(--ease); }
[aria-checked="true"] > .switch { background: var(--success); }
[aria-checked="true"] > .switch::after { transform: translateX(20px); }
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.meter i.full { background: var(--danger); }
.plan { border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.plan.cur { border: 2px solid var(--text); }
.plan b { font-size: 16px; } .plan small { display: block; color: var(--text-3); font-size: 13px; }
.plan .tag { margin-left: auto; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.pad { padding: 8px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.kv { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--divider); }
.kv .k { font-size: 12px; color: var(--text-3); }
.kv .v { font-size: 13px; word-break: break-all; display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.kv .v span { flex: 1; font-family: ui-monospace, Menlo, monospace; }
.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.acts.four { grid-template-columns: repeat(4, 1fr); }
.acts button { min-height: 64px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px 2px; text-align: center; line-height: 1.2; }
.acts button.danger { color: var(--danger); background: var(--danger-tint); border-color: transparent; }
.qr { width: 180px; height: 180px; margin: 0 auto; border-radius: 12px; background: #fff; padding: 6px; }
.qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.stepn { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.stepn i { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-style: normal; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
@media (min-width: 481px) { body { background: #0E0E10; } }
.big .photo { height: 300px; } .big .card { top: 276px; }
@media (max-height: 700px) { .photo { height: 104px; } .card { top: 86px; } .big .photo { height: 230px; } .big .card { top: 206px; } }
.sidbox { border: 1px solid var(--border); border-radius: 14px; background: var(--bg); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.sidbox .k { font-size: 12px; color: var(--text-3); font-weight: 600; margin-top: 6px; }
.sidbox .k:first-child { margin-top: 0; }
.sidbox .v { font-size: 14px; line-height: 1.5; word-break: break-all; }
.sidbox .v.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--text-2); }
.sheet.tall { max-height: 94%; }
.nocam .alt { height: 52px; padding: 0 22px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.7); background: none; color: #fff; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }

/* iPhone 上日期框会比容器宽：去掉系统样式，限制在容器里 */
.field { min-width: 0; }
input.in[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; display: block; text-align: left; }
input.in[type="date"]::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }
.sheet .foot { flex: none; padding: 12px 20px calc(16px + var(--safe-b)); border-top: 1px solid var(--divider); display: flex; gap: 10px; background: var(--surface); }
.sheet .body.has-foot { padding-bottom: 16px; }

/* ---------- SID 卡片 ---------- */
.sid { border: 1px solid var(--border); border-radius: 18px; background: var(--bg); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px;
  --c-n: #5B4CF0; --c-ty: #6B6B6B; --c-ca: #0B6BCB; --c-ow: #0F7A5F; --c-ti: #A65308; --c-pl: #B3261E; }
@media (prefers-color-scheme: dark) { .sid { --c-n: #A99BFF; --c-ty: #A8A6A0; --c-ca: #6CB6FF; --c-ow: #4CC79F; --c-ti: #F0A35E; --c-pl: #F08A7E; } }
.sid-t { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--text-3); line-height: 1.4; }
.sid-t b { font-size: 12px; letter-spacing: 1px; color: var(--on-primary); background: var(--primary); border-radius: 6px; padding: 2px 7px; flex: none; }
.sid-line { display: flex; flex-wrap: wrap; align-items: flex-start; row-gap: 10px; font-size: 20px; line-height: 1.35; font-weight: 700; color: var(--text); font-family: 'Noto Serif SC', 'Songti SC', Georgia, serif; }
.sid-line .g { display: inline-flex; align-items: flex-start; max-width: 100%; min-width: 0; }
.sid-line .pu { color: var(--text-3); font-weight: 400; padding: 0 1px; white-space: pre; }
.sid-line .seg { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; max-width: 100%; font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: center; }
.sid-line .seg .v { border-bottom: 2px solid var(--border); padding: 0 2px 3px; overflow-wrap: anywhere; min-width: 1.5em; }
.sid-line .seg .k { font: 600 11px/1.2 var(--font); color: var(--text-3); display: inline-flex; align-items: center; gap: 3px; letter-spacing: .5px; }
.sid-line .seg .k svg { width: 10px; height: 10px; opacity: .7; }
.sid-line .n .v { border-color: var(--c-n); } .sid-line .n .k { color: var(--c-n); }
.sid-line .ty .v { border-color: var(--c-ty); } .sid-line .ca .v { border-color: var(--c-ca); } .sid-line .ca .k { color: var(--c-ca); }
.sid-line .ow .v { border-color: var(--c-ow); } .sid-line .ow .k { color: var(--c-ow); }
.sid-line .ti .v { border-color: var(--c-ti); } .sid-line .ti .k { color: var(--c-ti); }
.sid-line .pl .v { border-color: var(--c-pl); } .sid-line .pl .k { color: var(--c-pl); }
.sid-line .ty .v, .sid-line .ti .v { white-space: nowrap; }
.sid-line button.seg { cursor: pointer; }
.sid-line .seg.miss .v { color: var(--danger); border-bottom-style: dashed; font-weight: 500; }
.sid-fp { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; font-size: 12px; color: var(--text-3); }
.sid-fp code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--text-2); word-break: break-all; }
.banner .spin, i.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--text); border-top-color: transparent; animation: spin .8s linear infinite; flex: none; display: block; }
button.vtag { border: 0; cursor: pointer; position: relative; padding-right: 8px; }
button.vtag::after { content: ""; position: absolute; inset: -7px 0; }
.toast button { margin-left: auto; border: 0; background: none; color: #fff; font-weight: 700; font-size: 14px; text-decoration: underline; padding: 8px 4px; flex: none; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); text-align: left; }
.opt span { flex: 1; } .opt b { display: block; font-size: 15px; } .opt small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.45; margin-top: 2px; }
.opt[aria-pressed="true"] { border-width: 2px; }
.opt.public[aria-pressed="true"] { border-color: var(--public); background: var(--public-tint); color: var(--public); }
.opt.protected[aria-pressed="true"] { border-color: var(--shared); background: var(--shared-tint); color: var(--shared); }
.opt.private[aria-pressed="true"] { border-color: var(--private); background: var(--private-tint); color: var(--private); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.desc[role="button"] { cursor: pointer; }

/* ---------- 首页：调起系统相机 / 页面内取景 ---------- */
.launch { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 32px calc(84px + var(--safe-b)); text-align: center; }
.launch b { font-size: 20px; color: #fff; }
.launch p { margin: 0 0 6px; font-size: 13px; color: #D6D3CD; line-height: 1.6; max-width: 300px; }
.launch .alt { height: 52px; padding: 0 22px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.7); background: none; color: #fff; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.shut.xl { width: 132px; height: 132px; border-radius: 50%; border: 5px solid #fff; background: none; padding: 0; display: flex; align-items: center; justify-content: center; }
.shut.xl span { width: 106px; height: 106px; border-radius: 50%; background: #fff; color: #17171A; display: flex; align-items: center; justify-content: center; transition: transform .12s var(--ease); }
.shut.xl:active span { transform: scale(.93); }
.shut.xl svg { width: 44px; height: 44px; }
.cam .ring { position: absolute; width: 72px; height: 72px; margin: -36px 0 0 -36px; border: 2px solid #FFD54A; border-radius: 10px; pointer-events: none; animation: ring .25s var(--ease); }
@keyframes ring { from { transform: scale(1.35); opacity: 0; } to { transform: none; opacity: 1; } }
.cam .ctl { gap: 10px; }
.cam .ctl .flip { font-weight: 700; font-size: 15px; }
.cam #cam { cursor: crosshair; }

/* ---------- 电脑版（宽 900 以上）---------- */
#side { display: none; }
.drop { flex: 1; margin: 8px 40px 40px; border: 2px dashed var(--border); border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 40px; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--ai); background: var(--ai-tint); }
.drop h2 { margin: 0; font-size: 26px; } .drop p { margin: 0 0 8px; color: var(--text-2); max-width: 460px; line-height: 1.6; }
.drop .ico { width: 84px; height: 84px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.drop .ico svg { width: 38px; height: 38px; }
body.desk { background: var(--bg); }
body.desk #app { max-width: none; background: var(--bg); }
body.desk #side { display: flex; flex-direction: column; gap: 4px; position: absolute; left: 0; top: 0; bottom: 0; width: 232px; padding: 22px 14px; background: var(--surface); border-right: 1px solid var(--divider); z-index: 5; }
body.desk #side .brand { font-size: 24px; font-weight: 800; padding: 4px 12px 18px; letter-spacing: -.5px; }
body.desk #side button { height: 46px; border: 0; background: none; border-radius: 12px; display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--text-2); text-align: left; }
body.desk #side button[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 700; }
body.desk #view { left: 232px; background: var(--bg); }
body.desk #view > .view { background: var(--surface); margin: 20px; inset: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--divider); position: absolute; }
body.desk .nav { display: none; }
body.desk .view.split .photo, body.desk .view.split.big .photo { left: 0; top: 0; bottom: 0; right: auto; width: 46%; height: 100%; background: #17171A; }
body.desk .view.split .photo img { object-fit: contain; }
body.desk .view.split .card, body.desk .view.split.big .card { left: 46%; top: 0; border-radius: 0; animation: none; }
body.desk .view.split .card .scroll { padding: 28px 32px 20px; }
body.desk .view.split .top-r { right: calc(54% + 16px); }
body.desk .bar { padding: 14px 32px 20px; }
body.desk .grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; padding: 0 20px; }
body.desk .thumb { border-radius: 12px; }
body.desk .scrim { justify-content: center; align-items: center; left: 232px; }
body.desk .sheet { width: 520px; max-width: 92%; border-radius: 20px; max-height: 86%; animation: rise .2s var(--ease); }
body.desk .sheet .grab { display: none; }
body.desk .sheet .head { padding-top: 12px; }
body.desk .toast { left: auto; right: 40px; bottom: 40px; width: 380px; }
body.desk .list, body.desk .pad { max-width: 640px; }
body.desk .hdr h1 { font-size: 26px; }
body.desk .sid-line { font-size: 22px; }

/* ---------- 第一次打开 ---------- */
.ob { background: var(--surface); }
.ob-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 32px 16px; gap: 16px;
  background: radial-gradient(120% 70% at 50% 0%, var(--ai-tint), transparent 70%); }
.ob-logo { width: 96px; height: 96px; border-radius: 28px; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.ob-logo svg { width: 46px; height: 46px; }
.ob h1 { margin: 0; font-size: 28px; line-height: 1.25; font-weight: 800; }
.ob p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text-2); max-width: 420px; }
.ob-body { padding: calc(var(--safe-t) + 48px) 24px 20px; display: flex; flex-direction: column; gap: 18px; }
.ob .bar { border-top: 0; }
.dots { display: flex; gap: 6px; justify-content: center; padding-bottom: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); } .dots i.on { background: var(--text); width: 20px; border-radius: 4px; }
.perm { display: flex; gap: 14px; align-items: flex-start; }
.perm .pi { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex: none; position: relative; }
.perm .pi > svg { width: 24px; height: 24px; }
.perm b { display: block; font-size: 17px; } .perm small { display: block; font-size: 14px; color: var(--text-2); line-height: 1.55; margin-top: 2px; }
.pm { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 0 0 2px var(--surface); }
.pm.ok { background: var(--success); } .pm.no { background: var(--danger); } .pm svg { width: 12px; height: 12px; stroke-width: 3; }
.or { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-3); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--divider); }

/* ---------- 电脑上看手机版 ---------- */
#simbar { display: none; }
body.sim { background: #0E0E10; }
body.sim #app { max-width: 390px; height: min(844px, calc(100dvh - 32px)); margin: 16px auto; border-radius: 36px; box-shadow: 0 0 0 10px #26262A, 0 30px 80px rgba(0,0,0,.5); }
body.sim #simbar { display: block; position: fixed; left: 20px; bottom: 20px; z-index: 50; }
#simbar button { height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid #44444A; background: #1C1C1F; color: #F2F1EE; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
body.desk #side .brand { background: none; border: 0; text-align: left; height: auto; color: var(--text); cursor: pointer; }
body.desk #side .foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--divider); padding-top: 10px; }
body.desk #side .foot a { height: 46px; border-radius: 12px; display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--text-2); }
body.desk #side .foot a:hover, body.desk #side button:hover { background: var(--surface-2); }
body.desk #view > .view.ob { max-width: 560px; margin: 20px auto; left: 0; right: 0; }
body.desk.nonav #side { display: none; }
body.desk.nonav #view { left: 0; }

/* SID 卡片：名称单独一行，属性一行小一号，整体更紧凑 */
.sid-line .g:first-child { flex-basis: 100%; }
.sid-line .g:not(:first-child) { font-size: .8em; }
.sid-t .pill { height: 28px; font-size: 12px; flex: none; }
.sinlink { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.sinlink span { flex: 1; min-width: 0; } .sinlink small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.4; }
.sinlink b { display: block; font-size: 14px; font-weight: 600; color: var(--ai); text-decoration: underline; overflow-wrap: anywhere; margin-top: 3px; line-height: 1.45; }
.sinframe { flex: 1; width: 100%; min-height: 62vh; border: 0; background: #fff; border-top: 1px solid var(--divider); }
.sid-t .pill::after { inset: -9px 0; }
.sid-line button.seg { min-width: 44px; }

/* 手机横过来、iPad：还是手机版，居中一列 */
@media (min-width: 481px) and (hover: none), (min-width: 481px) and (pointer: coarse) { body { background: #0E0E10; } }

/* 其他语种的 SID、原图语种 */
.langs { display: flex; flex-direction: column; gap: 6px; }
.lsrc { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.lsrc b { color: var(--text); font-weight: 600; }
.lsid { display: flex; align-items: baseline; gap: 10px; text-align: start; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; line-height: 1.45; cursor: pointer; }
.lsid small { flex: none; min-width: 52px; font-size: 12px; color: var(--text-3); }
.lsid span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lsid svg { flex: none; align-self: center; color: var(--text-3); }
.lsid.pend { cursor: default; color: var(--text-3); }
.lsid.pend .spin { display: inline-block; vertical-align: -2px; margin-inline-end: 6px; }
.lnote { font-size: 12px; color: var(--text-3); }

/* 框选 */
.top-r2 { position: absolute; top: calc(var(--safe-t) + 12px); right: 68px; z-index: 3; }
body.desk .view.split .top-r2 { right: calc(54% + 68px); }
.cropper { position: absolute; inset: 0; z-index: 60; background: #0B0B0C; color: #fff; display: flex; flex-direction: column; }
.crop-top { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 12px) 16px 12px; font-size: 14px; }
.crop-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 24px 26px; overflow: hidden; }
.crop-wrap { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
.crop-wrap img { width: 100%; height: 100%; display: block; pointer-events: none; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,0.55); touch-action: none; cursor: move; outline: none; }
.crop-box .h { position: absolute; width: 44px; height: 44px; margin: -22px; }
.crop-box .h::after { content: ""; position: absolute; left: 14px; top: 14px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.crop-box .nw { left: 0; top: 0; cursor: nwse-resize; } .crop-box .ne { left: 100%; top: 0; cursor: nesw-resize; }
.crop-box .se { left: 100%; top: 100%; cursor: nwse-resize; } .crop-box .sw { left: 0; top: 100%; cursor: nesw-resize; }
.crop-box .n { left: 50%; top: 0; cursor: ns-resize; } .crop-box .s { left: 50%; top: 100%; cursor: ns-resize; }
.crop-box .w { left: 0; top: 50%; cursor: ew-resize; } .crop-box .e { left: 100%; top: 50%; cursor: ew-resize; }
.cropper .bar { background: transparent; border: 0; }
.cropper .btn:not(.primary) { background: rgba(255,255,255,0.14); color: #fff; border-color: transparent; }
.cropper .btn.primary { background: #fff; color: #111; }

/* 各语种的 SID：每条都是链接 */
.sinrow { display: flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 2px 4px 2px 14px; }
.sinrow .go { flex: 1; min-width: 0; text-align: start; background: none; border: 0; padding: 10px 0; color: var(--text); font: inherit; }
button.go { cursor: pointer; }
.sinrow small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.4; }
.sinrow b { display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; margin-top: 2px; line-height: 1.45; }
.sinrow button.go b { color: var(--ai); text-decoration: underline; }
.sinrow.pend span { display: block; font-size: 14px; color: var(--text-3); margin-top: 2px; }
.sinrow.lsid { display: flex; padding: 2px 4px 2px 14px; cursor: default; }
.lnote { display: flex; gap: 6px; align-items: flex-start; line-height: 1.5; } .lnote svg { flex: none; margin-top: 2px; }
