﻿:root {
  --ink: #112b46;
  --ink-soft: #435a72;
  --muted: #5e7185;
  --canvas: #f5f8fc;
  --surface: #ffffff;
  --line: #dce5ef;
  --blue: #1769d6;
  --blue-deep: #0f4f9d;
  --blue-soft: #eaf3ff;
  --navy: #102a43;
  --rose: #c93250;
  --rose-soft: #fff1f3;
  --shadow: 0 16px 40px rgba(19, 48, 79, .08);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

/* Phase 6 · compact personal operating desk */
#view-business {
  --business-blue:#356ae6;
  --business-blue-soft:#eef4ff;
  --business-ink:#172033;
  --business-muted:#6f7a91;
}
#view-business .business-hero {
  align-items:center;
  padding:22px;
  border-color:#dce6f7;
  background:linear-gradient(145deg,#f8fbff,#eef4ff);
  box-shadow:0 12px 32px rgba(50,91,167,.08);
}
#view-business .business-hero h1 { color:var(--business-ink); font-family:inherit; font-size:30px; }
#view-business .business-hero p { color:var(--business-muted); }
#view-business .business-hero .eyebrow { color:var(--business-blue); }
#view-business .primary-button { background:var(--business-blue); }
#view-business .outline-button { border-color:#bfd1f5; color:#2857bd; background:#fff; }
#view-business .business-summary { gap:8px; }
#view-business .business-summary article { padding:12px; border-color:#e1e8f3; box-shadow:none; }
#view-business .business-summary article.danger strong { color:#d84658; }
#view-business .business-module-tabs { background:#edf1f7; }
#view-business .business-module-tabs button.active { color:#2857bd; }
#view-business .business-focus { padding:14px; border-color:#e2e8f2; background:#f8faff; }
#view-business .business-action-list { grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); }
#view-business .business-action-card {
  padding:14px;
  border-color:#e1e7f1;
  box-shadow:none;
}
#view-business .business-action-card.overdue { border-left:4px solid #e04e60; }
#view-business .business-action-card.due_soon { border-left:4px solid #f3a437; }
.business-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; color:#60708a; font-size:11px; font-weight:800; }
.business-due-badge { padding:3px 7px; border-radius:999px; color:#9b640b; background:#fff3d6; font-style:normal; }
.business-due-badge.danger { color:#b92f43; background:#fff0f2; }
.business-progress { height:5px; overflow:hidden; border-radius:999px; background:#edf1f7; }
.business-progress > i { display:block; height:100%; border-radius:inherit; background:#5f8ef0; }
.business-card-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.business-card-actions button {
  padding:7px 9px;
  border:1px solid #dce5f3;
  border-radius:9px;
  color:#35537d;
  background:#f8fbff;
  font-size:11px;
}
.business-card-actions button.danger { color:#bd4050; background:#fff7f8; }
.business-product-card {
  grid-template-columns:52px minmax(0,1fr) 58px auto;
  gap:11px;
  padding:13px;
  border-color:#e1e7f1;
  box-shadow:none;
}
.business-product-open { min-width:0; padding:0; border:0; color:inherit; background:transparent; text-align:left; }
.business-product-open h3 { margin:4px 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.business-product-open p { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.business-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.business-form-more { padding:11px 13px; border:1px solid #dde5f0; border-radius:13px; background:#f8faff; }
.business-form-more summary { color:#405777; font-weight:800; cursor:pointer; }
.business-form-more[open] summary { margin-bottom:11px; }
.business-sheet-footer { position:sticky; bottom:0; z-index:2; padding:10px 0 calc(8px + env(safe-area-inset-bottom)); background:linear-gradient(transparent,#fff 18%); }
.business-sheet-footer .primary-button { margin-bottom:0; }
.business-detail-sheet { max-width:640px; }
.business-detail-overview { display:flex; justify-content:space-between; gap:16px; padding:6px 2px 16px; border-bottom:1px solid #e4e9f1; }
.business-detail-overview h2 { margin:4px 0; }
.business-node-list { display:grid; gap:9px; margin-top:16px; }
.business-node-list > header { display:flex; justify-content:space-between; }
.business-node { display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:10px; padding:11px; border:1px solid #e1e7f1; border-radius:13px; }
.business-node > i { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; color:var(--blue); background:var(--blue-soft); font-style:normal; font-weight:900; }
.business-node.done > i { box-sizing:border-box; border:1px solid #bfd1f5; color:#2857bd; background:#eaf1ff; }
.business-node p { margin:4px 0; color:#748096; font-size:11px; }
.business-node > button { padding:7px 9px; border:1px solid #cddaf2; border-radius:9px; color:#315ebc; background:#f7faff; }
.business-sales-mini { margin-top:18px; }
.business-sales-mini p { display:flex; justify-content:space-between; margin:0; padding:9px 0; border-bottom:1px solid #edf0f5; }
.business-calendar-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:12px; }
.business-calendar-toolbar h2 { margin:0; }
.business-calendar-toolbar p { margin:4px 0 0; color:#6f7a91; font-size:12px; }
.business-calendar-modes { display:flex; gap:4px; padding:4px; border-radius:11px; background:#edf1f7; }
.business-calendar-modes button { padding:7px 9px; border:0; border-radius:8px; color:#647089; background:transparent; }
.business-calendar-modes button.active { color:#2857bd; background:#fff; }
.business-calendar-list { display:grid; gap:8px; margin-bottom:12px; }
.business-calendar-item { width:100%; display:grid; grid-template-columns:82px minmax(0,1fr) auto; align-items:center; gap:10px; padding:12px; border:1px solid #e1e7f1; border-radius:13px; background:#fff; color:inherit; text-align:left; }
.business-calendar-item time { color:var(--blue-deep); font-size:11px; font-weight:800; }
.business-calendar-item small { display:block; margin:4px 0 0; color:#778197; font-size:11px; }
.business-calendar-item > i { color:#8a96aa; font-style:normal; }
.business-node-actions { display:grid; gap:4px; }

@media (max-width:720px) {
  #view-business .business-hero { display:block; padding:18px; color:inherit; border-radius:20px; background:linear-gradient(145deg,#f9fbff,#edf4ff); }
  #view-business .business-hero h1 { color:var(--business-ink); font-size:26px; }
  #view-business .business-hero p { color:var(--business-muted); }
  #view-business .business-hero-actions { display:grid; grid-template-columns:1fr 1fr; margin-top:14px; }
  #view-business .business-hero .outline-button { margin-top:0; border-color:#bed0f2; color:#2857bd; background:#fff; }
  #view-business .business-summary { grid-template-columns:repeat(4,minmax(0,1fr)); }
  #view-business .business-summary article { padding:10px 4px; }
  #view-business .business-summary strong { font-size:19px; }
  #view-business .business-summary span { font-size:9px; }
  #view-business .business-action-list { grid-template-columns:1fr; }
  .business-product-card { grid-template-columns:46px minmax(0,1fr) 48px; }
  .business-product-cover,.business-product-placeholder { width:46px; height:46px; }
  .business-product-card .product-record-button { grid-column:1/-1; padding:8px; }
  .business-form-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .business-sheet { max-height:calc(100dvh - 12px); padding-bottom:0; border-radius:20px 20px 0 0; }
  .business-sheet .sheet-link-form { gap:10px; }
  .business-sheet textarea { min-height:72px; }
  .business-detail-overview { display:block; }
  .business-calendar-toolbar { display:block; }
  .business-calendar-modes { margin-top:10px; }
  .business-calendar-item { grid-template-columns:70px minmax(0,1fr) auto; }
}

/* UX53 action-first home, business controls and reader refinements */
.today-action-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0 0 18px; }
.today-action-strip button { display:grid; gap:3px; padding:13px 10px; border:1px solid var(--line); border-radius:16px; color:var(--ink); background:rgba(255,254,250,.92); text-align:left; }
.today-action-strip strong { color:#2857bd; font-size:20px; }
.today-action-strip span { color:var(--muted); font-size:11px; }
.business-card-tools { display:flex; justify-content:flex-end; gap:6px; margin-bottom:4px; }
.business-card-tools button { padding:5px 8px; border:1px solid #d7e2f3; border-radius:9px; color:#49617f; background:#f4f7fb; font-size:10px; }
.business-card-tools button:last-child { color:#b84c58; }
.business-tags { display:flex; flex-wrap:wrap; gap:5px; margin:7px 0; }
.business-tags span { padding:3px 7px; border:1px solid #d5e2fb; border-radius:999px; color:#315ebc; background:#eef4ff; font-size:10px; }
.business-calendar-shortcut { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.ebook-page.ebook-mode-scroll { scroll-snap-type:none; }
.ebook-comic-page { display:grid; place-items:center; min-height:100%; }
.ebook-comic-page img { display:block; max-width:100%; max-height:calc(100vh - 180px); object-fit:contain; }
.ebook-inline-illustration { display:grid; place-items:center; width:100%; margin:1.2em auto; overflow:hidden; }
.ebook-inline-illustration img { display:block; width:auto; max-width:100%; height:auto; max-height:calc(var(--ebook-page-height, 55dvh) - 20px); object-fit:contain; }
.ebook-text-sheet.ebook-cover-sheet { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:100%; }
.ebook-text-sheet.ebook-cover-sheet h1 { margin-bottom:.35em; }
.ebook-text-sheet.ebook-cover-sheet .ebook-cover-figure { margin:.4em auto; }
.ebook-text-sheet.ebook-cover-sheet .ebook-cover-figure img { max-height:calc(var(--ebook-page-height, 60dvh) - 150px); }
.ebook-resource-warning { max-width:32em; margin:12dvh auto 0; padding:18px; border:1px solid rgba(72,99,75,.18); border-radius:14px; font-size:15px; line-height:1.7; text-align:left; background:rgba(255,255,255,.48); }
#ebook-selection-actions { position:fixed; inset:auto; z-index:90; display:flex; gap:2px; width:max-content; min-width:0; max-width:calc(100vw - 16px); height:auto; min-height:0; padding:5px; border:0; border-radius:12px; color:#fff; background:#20272d; box-shadow:0 10px 28px rgba(0,0,0,.25); }
#ebook-selection-actions[hidden] { display:none; }
#ebook-selection-actions button { min-height:36px; padding:6px 9px; border:0; border-radius:8px; color:inherit; background:transparent; font-size:12px; font-weight:800; }
@media (max-width:720px) {
  .today-action-strip { gap:7px; }
  .today-action-strip button { padding:11px 8px; }
  .today-action-strip strong { font-size:17px; }
  .business-card-tools { grid-column:1/-1; }
  .business-module-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); overflow:visible; gap:4px; }
  .business-module-tabs button { min-width:0; padding:10px 4px; font-size:10px; white-space:nowrap; }
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { min-width: 320px; margin: 0; background: radial-gradient(circle at 100% 0, #e7f1ff 0, rgba(231, 241, 255, 0) 33rem), var(--canvas); }
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button, a { -webkit-touch-callout: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(23, 105, 214, .35); outline-offset: 3px; }
input, textarea { width: 100%; border: 1px solid #b9c9da; border-radius: 12px; padding: 13px 14px; color: var(--ink); background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
input::placeholder, textarea::placeholder { color: #6a7d91; opacity: 1; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 105, 214, .12); }
textarea { resize: vertical; min-height: 118px; line-height: 1.65; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.desktop-only { display: none; }
.app-shell { width: min(100%, 1480px); min-height: 100dvh; margin: 0 auto; }

.sidebar, .insight-rail { display: none; }
.workspace-main { width: min(100%, 760px); margin: 0 auto; padding: 20px 15px 94px; }
.mobile-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--navy); color: #fff; font-weight: 900; box-shadow: 0 8px 19px rgba(16, 42, 67, .2); }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.connection-state { min-height: 34px; border: 1px solid #c9d8e8; border-radius: 999px; padding: 0 11px; color: #31506f; background: #f8fbff; font-size: 12px; font-weight: 800; cursor: pointer; }
.integration-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.integration-status-grid span { padding: 12px; border-radius: 12px; background: #f3f7fb; color: #31506f; font-size: 13px; font-weight: 800; text-align: center; }
.integration-status-grid span:last-child:nth-child(3) { grid-column: 1 / -1; }
.sheet-note { margin: 2px 0 4px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.douyin-meta { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0 4px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdff; }
.douyin-meta[hidden] { display: none !important; }
.douyin-cover { width: 86px; height: 114px; object-fit: cover; border-radius: 10px; background: #e8eef5; flex: none; }
.douyin-copy { min-width: 0; }
.douyin-author { margin: 0 0 4px; font-weight: 800; color: var(--ink); }
.douyin-stats { margin: 0 0 6px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.douyin-play { font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; }

.view { display: none; }
.view.active { display: block; }
.view-topbar { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin: 4px 2px 20px; }
.view-topbar h1, .section-heading h1 { margin: 5px 0 0; font-size: clamp(28px, 6vw, 39px); line-height: 1.18; letter-spacing: -.055em; }
.eyebrow { margin: 0; color: var(--blue-deep); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.section-note { max-width: 520px; margin: 10px 0 0; color: var(--muted); line-height: 1.65; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 5px 2px 18px; }
.section-heading h1 { font-size: clamp(27px, 5vw, 34px); }
.section-heading h2 { margin: 5px 0 0; font-size: 22px; }

.quick-capture, .receipt-card, .inbox-panel, .brief-card, .chat-log, .memory-card, .capture-form { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.quick-capture { padding: 20px; }
.quick-capture-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.quick-capture h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.quick-capture-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.capture-signal { flex: 0 0 auto; border-radius: 99px; padding: 5px 8px; color: var(--blue-deep); background: var(--blue-soft); font-size: 11px; font-weight: 900; }
.quick-share-row { display: flex; gap: 9px; margin-top: 18px; }
.quick-share-row input { min-width: 0; }
.quick-status, .form-message, .muted, .inbox-empty { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.primary-button, .outline-button, .record-button, .soft-action, .text-button { min-height: 44px; border-radius: 12px; padding: 0 15px; font-weight: 900; cursor: pointer; }
.primary-button { border: 1px solid var(--blue); color: #fff; background: var(--blue); box-shadow: 0 9px 18px rgba(23, 105, 214, .22); }
.primary-button:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.primary-button:disabled { opacity: .62; cursor: wait; }
.outline-button { border: 1px solid #b9c9da; color: #244866; background: #fff; }
.outline-button:hover { border-color: var(--blue); color: var(--blue-deep); background: var(--blue-soft); }
.text-button { min-height: auto; border: 0; padding: 5px 0; color: var(--blue-deep); background: transparent; font-size: 13px; }
.text-button:hover { text-decoration: underline; }

.receipt-card { margin-top: 13px; padding: 17px 19px; border-color: #bfd9f7; background: linear-gradient(135deg, #f7fbff, #e9f4ff); }
.receipt-card span { display: block; color: var(--blue-deep); font-size: 12px; font-weight: 900; }
.receipt-card strong { display: block; margin-top: 4px; font-size: 17px; overflow-wrap: anywhere; }
.receipt-card p { margin: 7px 0 10px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.receipt-card button { border: 0; padding: 0; color: var(--blue-deep); background: transparent; font: inherit; font-size: 13px; font-weight: 900; cursor: pointer; }
.receipt-card button:hover { text-decoration: underline; }
.capture-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; }
.soft-action { border: 1px solid #d5e0ec; color: var(--ink-soft); background: rgba(255,255,255,.84); text-align: left; }
.soft-action span { margin-right: 5px; color: var(--blue); }
.soft-action:first-child span { color: var(--rose); }
.soft-action:hover { border-color: #9dbbe0; color: var(--blue-deep); background: #fff; }
.more-capture { margin-top: 14px; }
.more-capture summary { width: fit-content; padding: 9px 3px; color: var(--ink-soft); font-size: 13px; font-weight: 900; cursor: pointer; }
.capture-form { display: grid; gap: 15px; margin-top: 8px; padding: 19px; }
.capture-form label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.field-grid { display: grid; gap: 15px; }
.input-action { display: flex; gap: 8px; }
.input-action input { min-width: 0; }
.input-action .outline-button { flex: 0 0 auto; }
.video-picker { padding: 14px; border: 1px dashed #83addb; border-radius: 13px; background: #f8fbff; }
.video-picker input { padding: 10px; background: #fff; }
.video-picker span { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.55; }
.record-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px; border-radius: 15px; background: #f0f6fd; }
.record-panel strong { color: var(--ink); }
.record-panel p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.record-panel > div:last-child { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.record-button { border: 1px solid #f3c2cd; color: #a62540; background: var(--rose-soft); }
.record-button.recording { border-color: var(--rose); color: #fff; background: var(--rose); }
.form-submit { width: 100%; }

.inbox-panel { margin-top: 26px; padding: 19px; }
.inbox-panel .section-heading { margin: 0 0 14px; }
.inbox-list, .memory-list, .brief-grid { display: grid; gap: 11px; }
.inbox-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 13px 0; border-top: 1px solid #e6edf4; }
.inbox-item:first-child { border-top: 0; padding-top: 0; }
.inbox-dot { width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: #5d9dea; }
.inbox-item p { margin: 0 0 3px; color: var(--blue-deep); font-size: 11px; font-weight: 900; }
.inbox-item strong { display: block; overflow: hidden; color: var(--ink); font-size: 14px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item small { display: -webkit-box; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.inbox-item time { color: var(--muted); font-size: 11px; white-space: nowrap; }

.brief-card, .memory-card { padding: 18px 20px; }
.brief-headline { border-color: #c7dcf6; background: linear-gradient(135deg, #fff, #edf6ff); }
.brief-card h2, .memory-card h3 { margin: 4px 0 6px; font-size: 18px; line-height: 1.4; letter-spacing: -.01em; }
.brief-card p, .brief-card li, .memory-card .summary, .points { color: var(--ink-soft); line-height: 1.7; }
.brief-card ul, .points { margin: 6px 0 0; padding-left: 20px; }
.chat-log { display: grid; min-height: 320px; gap: 13px; padding: 17px; align-content: start; }
.assistant-bubble, .user-bubble { max-width: 88%; padding: 12px 14px; border-radius: 15px; line-height: 1.65; white-space: pre-wrap; }
.assistant-bubble { color: #254765; background: #edf5ff; }
.user-bubble { justify-self: end; color: #fff; background: var(--navy); }
.chat-sources { margin-top: 9px; padding-top: 8px; border-top: 1px solid #c6dbee; font-size: 12px; white-space: normal; }
.chat-sources a { margin-left: 5px; color: var(--blue-deep); }
.chat-form { display: flex; gap: 9px; position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); margin-top: 13px; padding: 7px 0; background: var(--canvas); }
.chat-form input { min-width: 0; }

.chat-draft-wrap { margin: 0 0 13px; padding: 12px 14px; border: 1px solid #c9dcf1; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(40,118,199,.08); }
.chat-draft-title { font-size: 13px; font-weight: 700; color: #254765; margin-bottom: 8px; }
.chat-draft-item { padding: 7px 0; border-bottom: 1px dashed #dbe7f3; }
.chat-draft-item:last-of-type { border-bottom: none; }
.chat-draft-item strong { display: block; font-size: 14px; color: #1f2329; line-height: 1.5; }
.chat-draft-due { color: #2876c7; font-size: 13px; margin-top: 2px; }
.chat-draft-note { color: #8a919f; font-size: 12px; margin-top: 2px; }
.chat-draft-actions { display: flex; gap: 8px; margin-top: 10px; }
.chat-draft-confirm, .chat-draft-skip { flex: 1; padding: 9px 0; border: none; border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer; }
.chat-draft-confirm { background: #2876c7; color: #fff; }
.chat-draft-confirm:disabled { background: #a9c3f8; }
.chat-draft-skip { background: #eef1f5; color: #5a6472; }
.search-box { display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #cbd8e5; border-radius: 14px; color: var(--ink-soft); background: #fff; box-shadow: 0 5px 15px rgba(19,48,79,.04); }
.search-box input { border: 0; padding-left: 0; box-shadow: none; }
.library-filter-block { display: grid; gap: 10px; margin-top: 13px; }
.library-folder-strip, .library-tag-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 7px; scrollbar-width: none; }
.library-folder-strip::-webkit-scrollbar, .library-tag-strip::-webkit-scrollbar { display: none; }
.library-folder, .library-tag-filter { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; border: 1px solid #dce5ee; border-radius: 12px; padding: 0 11px; color: #50677e; background: #fff; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.library-folder span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--blue-deep); background: var(--blue-soft); font-size: 11px; }
.library-folder small, .library-tag-filter small { color: #8c9bab; font-size: 11px; }
.library-folder.active, .library-tag-filter.active { border-color: #7fb0e9; color: #fff; background: var(--blue); box-shadow: 0 6px 14px rgba(23,105,214,.16); }
.library-folder.active span { color: var(--blue-deep); background: #fff; }
.library-folder.active small, .library-tag-filter.active small { color: #e8f2ff; }
.library-tag-strip { padding-bottom: 3px; }
.library-tag-filter { min-height: 30px; border-radius: 999px; padding: 0 10px; font-size: 12px; }
.filter-empty { color: var(--muted); font-size: 12px; }
.memory-list { margin-top: 13px; }
.memory-list .memory-card { overflow: hidden; border: 1px solid #e2e8ef; border-radius: 19px; background: #fff; box-shadow: 0 10px 28px rgba(19,48,79,.055); }
.memory-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.memory-card .category { font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); }
.memory-card time { color: var(--muted); font-size: 12px; }
.memory-card .summary { display: -webkit-box; overflow: hidden; margin: 8px 0 6px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.65; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.memory-card .points { margin: 6px 0 0; padding-left: 22px; color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.memory-card .points li { margin-bottom: 4px; }
.memory-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.category { border-radius: 99px; padding: 5px 8px; color: var(--blue-deep); background: var(--blue-soft); font-size: 12px; font-weight: 900; }
.memory-card time, .memory-id { color: var(--muted); font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span, .memory-tag { border: 0; border-radius: 999px; padding: 4px 8px; color: var(--blue-deep); background: #edf5ff; font: inherit; font-size: 12px; cursor: pointer; }
.memory-card-details { margin-top: 12px; border-top: 1px solid var(--line); }
.memory-card-details > summary { padding: 12px 0 0; color: var(--blue-deep); font-size: 13px; font-weight: 800; cursor: pointer; list-style: none; }
.memory-card-details > summary::after { content: "⌄"; float: right; color: #8da0b3; font-size: 16px; }
.memory-card-details[open] > summary::after { content: "⌃"; }
.memory-card-details > .points { margin-top: 12px; }
.action-value { margin: 12px 0 4px; padding: 12px 14px; border-left: 3px solid #65a0e5; border-radius: 4px 12px 12px 4px; background: #f3f8fe; }
.action-value strong { color: var(--blue-deep); font-size: 12px; }
.action-value p { margin: 5px 0 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.65; }
.memory-card-details > .memory-actions { margin-bottom: 0; }
.memory-card-details > .memory-id { margin-bottom: 0; }

/* 收藏列表只展示轻量真卡片，完整内容在独立详情页按需读取 */
.library-link-list, .memory-list { display: grid; gap: 12px; }
.library-link-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; min-height: 150px; padding: 18px 48px 16px 18px; border: 1px solid #e0e5eb; border-radius: 20px; background: #fff; box-shadow: 0 7px 20px rgba(19,48,79,.045); cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.library-link-card:hover { border-color: #c9d8e8; box-shadow: 0 12px 28px rgba(19,48,79,.08); transform: translateY(-1px); }
.library-link-card:focus-visible { outline: 3px solid rgba(33,111,219,.22); outline-offset: 2px; }
.library-link-copy { min-width: 0; }
.library-link-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.library-link-top > span { padding: 3px 9px; border-radius: 999px; color: var(--blue-deep); background: var(--blue-soft); font-weight: 800; }
.library-link-card h3 { display: -webkit-box; overflow: hidden; margin: 10px 0 7px; color: var(--ink); font-size: 19px; line-height: 1.42; letter-spacing: -.015em; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.library-link-card p { display: -webkit-box; overflow: hidden; margin: 0; color: #65717e; font-size: 14px; line-height: 1.58; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.library-link-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: #818b96; font-size: 12px; }
.library-media-state { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 5px 9px; border-radius: 999px; color: #a42e50; background: #fff0f4; font-size: 11.5px; font-weight: 800; }
.library-link-source { color: #42566b; font-weight: 800; }
.library-link-thumb { align-self: center; width: 92px; height: 92px; border-radius: 14px; object-fit: cover; background: #edf1f5; }
.library-link-star { position: absolute; top: 13px; right: 12px; border: 0; padding: 3px; color: #b7c0c9; background: transparent; font-size: 23px; cursor: pointer; }
.library-link-star.active { color: #dfa11d; }
.memory-detail-page { position: fixed; inset: 0; z-index: 205; overflow: auto; background: #f3f5f8; }
.memory-detail-page[hidden] { display: none; }
.memory-detail-content { width: min(760px, calc(100% - 24px)); margin: 22px auto 60px; }
.memory-detail-content .memory-card { padding: 24px; }
.source-link { display: inline-block; margin-top: 13px; color: var(--blue-deep); font-size: 13px; font-weight: 900; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.memory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 13px; }
.memory-actions .source-link { margin-top: 0; }
.memory-actions { padding-top: 10px; border-top: 1px solid var(--line); margin-top: 12px; }
.source-link { display: inline-flex; align-items: center; gap: 4px; color: var(--blue-deep); font-size: 13px; font-weight: 700; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.reanalyze-button { border: 1px solid #b9d2ee; border-radius: 999px; padding: 7px 10px; color: var(--blue-deep); background: #eef6ff; font-size: 12px; font-weight: 900; cursor: pointer; }
.reanalyze-button:hover:not(:disabled) { border-color: #77aee9; background: #dfeeff; }
.reanalyze-button:disabled { opacity: .58; cursor: wait; }
.organize-button { border: 1px solid #f0c766; border-radius: 999px; padding: 7px 10px; color: #80550a; background: #fff7df; font-size: 12px; font-weight: 900; cursor: pointer; }
.organize-button:hover { border-color: #e3ae3a; background: #ffefb8; }
.local-media { display: grid; gap: 8px; margin-top: 12px; }
.local-media audio, .local-media video { width: 100%; max-height: 260px; border-radius: 10px; background: var(--navy); }
.podcast-label { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #d8e7f7; border-radius: 13px; background: linear-gradient(135deg, #f6fbff, #edf5ff); }
.podcast-label > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; background: var(--blue); font-size: 18px; }
.podcast-label strong, .podcast-label small { display: block; }
.podcast-label strong { color: var(--ink); font-size: 14px; }
.podcast-label small { margin-top: 2px; color: var(--muted); font-size: 11.5px; }

.view-topbar-action { display: flex; align-items: end; gap: 14px; }
.desktop-add-button { display: none; min-height: 42px; border: 1px solid var(--blue); border-radius: 12px; padding: 0 14px; color: #fff; background: var(--blue); font-weight: 900; cursor: pointer; box-shadow: 0 8px 18px rgba(23, 105, 214, .18); }
.desktop-add-button.competitor-entry { border-color: #e5a224; background: #f2ad2d; box-shadow: 0 8px 18px rgba(204, 133, 24, .18); }
.home-search { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; padding: 0 15px; border: 1px solid #d8e1eb; border-radius: 14px; color: #526b86; background: #e8edf3; }
.home-search span { font-size: 22px; line-height: 1; }
.home-search input { border: 0; padding: 13px 0; color: var(--ink); background: transparent; box-shadow: none; }
.library-dashboard { display: grid; gap: 23px; }
.home-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.home-stat-card { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; min-height: 88px; border: 1px solid #e1e8f0; border-radius: 18px; padding: 13px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; box-shadow: 0 10px 28px rgba(19,48,79,.055); }
.home-stat-card:hover { border-color: #b9d2ef; transform: translateY(-1px); }
.home-stat-card strong { align-self: end; font-size: 16px; }
.home-stat-card em { align-self: start; color: #8797a8; font-style: normal; font-size: 13px; }
.stat-icon { grid-row: span 2; display: grid; place-items: center; width: 27px; height: 27px; color: #668095; font-size: 25px; }
.stat-icon { font-size: 20px; line-height: 1; }
.home-stat-card.blue .stat-icon { color: #3167de; }
.home-stat-card.amber .stat-icon { color: #e6a21e; }
.home-stat-card.rose .stat-icon { color: #e66a78; }
.library-group { display: grid; gap: 9px; }
.library-group-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; color: #718196; font-size: 15px; font-weight: 800; }
.round-add { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; padding: 0; color: #5f748b; background: transparent; font-size: 27px; font-weight: 400; line-height: 1; cursor: pointer; }
.round-add:hover { color: var(--blue-deep); background: var(--blue-soft); }
.library-row { display: grid; grid-template-columns: 33px minmax(0, 1fr) auto 15px; align-items: center; gap: 8px; min-height: 67px; border: 1px solid #e2e8ef; border-radius: 16px; padding: 0 15px; color: var(--ink); background: #fff; text-align: left; box-shadow: 0 8px 22px rgba(19,48,79,.035); cursor: pointer; }
.library-row:hover { border-color: #c4d9ed; }
.library-row strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.library-row small { color: #8797a8; font-size: 13px; }
.library-row i { color: #a7b3c0; font-size: 26px; font-style: normal; line-height: 1; }
.row-icon { display: grid; place-items: center; width: 28px; height: 28px; color: #6b8298; font-size: 19px; }
.row-icon.pin { color: #e14f60; }
.row-icon.today { color: #e66a78; }
.row-icon.bulb { color: #e0ad33; }
.row-icon.business { color: #3977d3; }
.disabled-row { color: #6d7c8b; cursor: default; background: #fafcff; }
.disabled-row:hover { border-color: #e2e8ef; }
.capture-toast { position: fixed; z-index: 12; right: 18px; bottom: 90px; left: 18px; padding: 15px 17px; border: 1px solid #bcd7f5; border-radius: 16px; background: #f6fbff; box-shadow: 0 16px 40px rgba(19,48,79,.16); }
.capture-toast span { display: block; color: var(--blue-deep); font-size: 12px; font-weight: 900; }
.capture-toast strong { display: block; margin-top: 4px; font-size: 14px; overflow-wrap: anywhere; }
.capture-toast p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.more-capture { display: none; }
.more-capture[open] { display: block; margin-top: 22px; }
.more-capture summary { display: none; }

.add-sheet-backdrop { display: none; position: fixed; z-index: 20; inset: 0; align-items: end; justify-content: center; padding: 12px; background: rgba(17, 30, 46, .32); }
.add-sheet-backdrop.open { display: flex; }
.add-sheet { width: min(100%, 610px); max-height: min(88dvh, 820px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border-radius: 24px 24px 18px 18px; padding: 9px 18px calc(18px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -10px 42px rgba(12,30,48,.2); }
.sheet-handle { width: 42px; height: 5px; margin: 0 auto 11px; border-radius: 99px; background: #dbe1e8; }
.add-sheet header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 40px; }
.add-sheet header strong { font-size: 18px; }
.sheet-cancel { width: fit-content; border: 0; padding: 5px 0; color: #62758a; background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.add-mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 16px 0; }
.add-mode { display: grid; justify-items: center; gap: 6px; border: 1px solid #edf0f4; border-radius: 14px; padding: 10px 5px; color: #5c6d80; background: #fafbfc; font-size: 12px; font-weight: 800; cursor: pointer; }
.add-mode.active { border-color: #bcd7f5; color: var(--blue-deep); background: #f1f7ff; }
.add-mode span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: #fff; background: #3978df; font-size: 19px; }
.add-mode .mode-note { background: #ed8d20; }
.add-mode .mode-voice { background: #df5f77; }
.add-mode .mode-video { background: #8a67d6; }
.add-mode .mode-pdd { background: #e79a1d; font-size: 14px; font-weight: 900; }
.sheet-link-form { display: grid; gap: 10px; }
.sheet-link-form label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.sheet-description { margin: 4px 0 15px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.sheet-link-form textarea { min-height: 110px; border-color: #d9e1e9; background: #f5f7f9; }
.paste-field { position: relative; }
.paste-field textarea { width: 100%; padding-right: 94px; }
.paste-button { position: absolute; top: 10px; right: 10px; min-height: 36px; padding: 0 12px; border: 1px solid #b9d1ee; border-radius: 10px; color: #1767c5; background: #fff; font-weight: 800; }
.sheet-link-form input { min-height: 44px; border-color: #d9e1e9; background: #f5f7f9; }
.sheet-link-form select { min-height: 44px; border: 1px solid #d9e1e9; border-radius: 12px; padding: 0 12px; color: var(--ink); background: #f5f7f9; font: inherit; }
.sheet-link-form .primary-button { width: 100%; }
body.sheet-open { overflow: hidden; }

.calendar-topbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 7px 2px 25px; }
.calendar-topbar h1 { margin: 5px 0 0; font-size: clamp(30px, 5vw, 39px); letter-spacing: -.055em; }
.calendar-topbar p:not(.eyebrow) { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.calendar-workspace { display: grid; gap: 17px; }
.calendar-card, .memo-panel { border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.calendar-card { padding: 20px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.calendar-header strong { font-size: 20px; letter-spacing: -.02em; }
.calendar-step { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #d9e2ec; border-radius: 11px; padding: 0; color: var(--ink-soft); background: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.calendar-step:hover { border-color: #a8c9ec; color: var(--blue-deep); background: #f3f8ff; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-weekdays { margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 900; text-align: center; }
.calendar-day, .calendar-blank { aspect-ratio: 1 / .9; }
.calendar-day { position: relative; display: grid; place-items: center; border: 0; border-radius: 12px; color: var(--ink-soft); background: transparent; font-weight: 800; cursor: pointer; }
.calendar-day:hover { color: var(--blue-deep); background: #edf5ff; }
.calendar-day.today { color: var(--blue-deep); background: #eef6ff; }
.calendar-day.selected { color: #fff; background: var(--blue); box-shadow: 0 7px 14px rgba(23,105,214,.22); }
.calendar-day i { position: absolute; right: 5px; bottom: 4px; display: grid; place-items: center; min-width: 14px; height: 14px; border-radius: 99px; padding: 0 3px; color: #fff; background: #e36776; font-size: 9px; font-style: normal; }
.calendar-day.selected i { color: var(--blue-deep); background: #fff; }
.memo-panel { padding: 20px; }
.memo-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.memo-panel h2 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.03em; }
.push-state { border-radius: 99px; padding: 6px 9px; color: #85621d; background: #fff5d7; font-size: 11px; font-weight: 900; white-space: nowrap; }
.push-state.ready { color: #17635d; background: #e6f7f2; }
.reminder-list { display: grid; gap: 10px; }
.memo-empty { padding: 27px 12px; border: 1px dashed #c9d7e7; border-radius: 17px; color: var(--muted); background: #f9fbfd; text-align: center; }
.memo-empty span { display: block; margin-bottom: 9px; color: #8fa1b6; font-size: 27px; }
.memo-empty strong { display: block; color: var(--ink-soft); font-size: 14px; }
.memo-empty p { margin: 7px 0 0; font-size: 12px; line-height: 1.55; }
.memo-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) 34px; align-items: start; gap: 10px; padding: 13px; border: 1px solid #e3eaf1; border-radius: 16px; background: #fff; }
.memo-item.done { opacity: .58; }
.memo-time { display: grid; gap: 4px; padding-top: 2px; }
.memo-time strong { color: var(--blue-deep); font-size: 13px; }
.memo-time span { color: var(--muted); font-size: 10px; line-height: 1.25; }
.memo-copy h3 { margin: 0; font-size: 14px; line-height: 1.45; }
.memo-copy p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.memo-complete { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #afcbe9; border-radius: 10px; padding: 0; color: var(--blue-deep); background: #f2f8ff; font-weight: 900; cursor: pointer; }
.memo-complete:hover { color: #fff; background: var(--blue); }
.memo-done { display: block; padding-top: 8px; color: #5b8c78; font-size: 10px; white-space: nowrap; }
.new-memo-inline { width: 100%; min-height: 43px; margin-top: 13px; border: 1px dashed #a9c6e6; border-radius: 12px; color: var(--blue-deep); background: #f7fbff; font-weight: 900; cursor: pointer; }
.new-memo-inline:hover { background: #edf6ff; }

.reminder-sheet-backdrop { display: none; position: fixed; z-index: 22; inset: 0; align-items: end; justify-content: center; padding: 12px; background: rgba(17, 30, 46, .32); }
.reminder-sheet-backdrop.open { display: flex; }
.reminder-sheet { width: min(100%, 610px); max-height: min(780px, calc(100dvh - 24px)); overflow: auto; border-radius: 24px 24px 18px 18px; padding: 9px 18px calc(18px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -10px 42px rgba(12,30,48,.2); }
.reminder-sheet > header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 40px; }
.reminder-sheet > header strong { font-size: 18px; }
.reminder-form { display: grid; gap: 13px; margin-top: 15px; }
.reminder-form label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 13px; font-weight: 900; }
.reminder-form select { width: 100%; min-height: 47px; border: 1px solid #b9c9da; border-radius: 12px; padding: 0 13px; color: var(--ink); background: #fff; }
.reminder-notice { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 12px; color: #35655e; background: #edf9f5; }
.reminder-notice span { color: #24a282; font-size: 16px; }
.reminder-notice p { margin: 0; font-size: 12px; line-height: 1.45; }

.mobile-nav { display: grid; grid-template-columns: repeat(7, 1fr); position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; padding: 7px max(6px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right)); border-top: 1px solid #d5e0ec; background: rgba(255,255,255,.94); box-shadow: 0 -10px 30px rgba(19,48,79,.08); backdrop-filter: blur(14px); }
.mobile-nav .tab { display: grid; gap: 2px; border: 0; padding: 4px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.mobile-nav .tab span { font-size: 18px; line-height: 1; }
.mobile-nav .tab.active { color: var(--blue-deep); }

@media (min-width: 620px) {
  .workspace-main { padding: 34px 28px 94px; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .brief-grid { grid-template-columns: 1.3fr 1fr; }
  .brief-headline { grid-row: span 2; }
}

@media (min-width: 980px) {
  body { background: radial-gradient(circle at 86% 3%, #e2f0ff 0, rgba(226, 240, 255, 0) 32rem), var(--canvas); }
  .app-shell { display: grid; grid-template-columns: minmax(196px, 220px) minmax(0, 1fr); gap: 16px; width: 100%; padding: 16px; }
  .mobile-header, .mobile-nav { display: none; }
  .sidebar, .insight-rail { display: flex; flex-direction: column; min-width: 0; }
  .sidebar { position: sticky; top: 24px; align-self: start; height: calc(100dvh - 48px); max-height: calc(100dvh - 48px); overflow: hidden; padding: 22px 16px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.84); box-shadow: 0 14px 36px rgba(19,48,79,.055); }
  .side-caption { margin: 34px 9px 8px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .11em; }
  .desktop-nav { display: grid; gap: 4px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(70,120,180,.4) transparent; padding-right: 2px; }
.desktop-nav::-webkit-scrollbar { width: 8px; }
.desktop-nav::-webkit-scrollbar-thumb { background: rgba(0,113,227,.45); border-radius: 999px; }
.desktop-nav::-webkit-scrollbar-track { background: transparent; }
  .desktop-nav .tab { display: flex; align-items: center; gap: 10px; min-height: 44px; border: 0; border-radius: 12px; padding: 0 11px; color: var(--ink-soft); background: transparent; text-align: left; font-weight: 900; cursor: pointer; }
  .desktop-nav .tab span { width: 18px; color: var(--muted); text-align: center; font-size: 17px; }
  .desktop-nav .tab:hover { color: var(--blue-deep); background: #f2f7fd; }
  .desktop-nav .tab.active { color: var(--blue-deep); background: var(--blue-soft); }
  .desktop-nav .tab.active span { color: var(--blue-deep); }
  .side-spacer { flex: 1; min-height: 36px; }
  .future-module { display: block; width: calc(100% - 2px); margin: 0 1px 15px; padding: 14px; border: 1px solid #d9e6f2; border-radius: 16px; text-align: left; cursor: pointer; background: linear-gradient(135deg, #f3f8ff, #fff); }
  .future-module p { margin: 0 0 4px; color: var(--blue-deep); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
  .future-module strong { display: block; font-size: 13px; }
  .future-module span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
  .connection-state { width: 100%; }
  .workspace-main { width: auto; min-width: 0; margin: 0; padding: 26px 4px 56px; }
  .view-topbar { margin-top: 7px; margin-bottom: 27px; }
  .desktop-only { display: block; max-width: 210px; margin: 0 2px 4px; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: right; }
  .desktop-add-button { display: inline-block; }
  .home-search { max-width: 510px; margin-bottom: 25px; }
  .library-dashboard { grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .home-stat-grid { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .home-stat-card { min-height: 96px; }
  .capture-toast { right: 32px; bottom: 28px; left: auto; width: min(410px, calc(100vw - 64px)); }
  .add-fab { display: none; }
  .calendar-workspace { grid-template-columns: minmax(420px, 1.12fr) minmax(320px, .88fr); align-items: start; }
  .calendar-card, .memo-panel { padding: 23px; }
  .calendar-day { border-radius: 13px; }
  .quick-capture { padding: 25px; }
  .quick-share-row { margin-top: 21px; }
  .capture-actions { grid-template-columns: max-content max-content; }
  .soft-action { text-align: center; }
  .inbox-panel { padding: 22px; }
  .insight-rail { position: static; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-self: start; gap: 14px; padding-top: 8px; }
  .rail-card { padding: 17px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.9); box-shadow: 0 11px 28px rgba(19,48,79,.055); }
  .rail-card h2 { margin: 7px 0 8px; font-size: 17px; letter-spacing: -.02em; }
  .rail-card p:not(.eyebrow), .mini-steps { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
  .rail-link { margin-top: 11px; }
  .mini-steps { padding-left: 18px; }
  .mini-steps li + li { margin-top: 6px; }
  .future-rail { border-color: #cce0f6; background: linear-gradient(135deg, #f8fbff, #eaf4ff); }
  .chat-form { bottom: 12px; }
}

@media (min-width: 1180px) {
  .app-shell { grid-template-columns: 236px minmax(0, 1fr) 274px; gap: 24px; padding: 24px; }
  .insight-rail {
    position: sticky;
    top: 24px;
    grid-column: auto;
    display: flex;
    grid-template-columns: none;
    padding-top: 26px;
  }
}

@media (max-width: 979px) {
  body { background: #f2f4f8; }
  .mobile-header { display: none; }
  .workspace-main { width: 100%; padding: 52px 22px 112px; }
  .view-topbar { margin: 0 0 23px; }
  .view-topbar .eyebrow, .view-topbar-action { display: none; }
  .view-topbar h1 { font-size: 42px; letter-spacing: -.065em; }
  .home-search { min-height: 58px; margin-bottom: 28px; border: 0; border-radius: 17px; background: #e1e4ea; }
  .home-search span { color: #67727e; font-size: 28px; }
  .home-search input { padding: 15px 0; font-size: 18px; }
  .home-search input::placeholder { color: #84909c; }
  .library-dashboard { gap: 28px; }
  .home-stat-grid { gap: 12px; }
  .home-stat-card { min-height: 104px; border: 0; border-radius: 20px; padding: 16px; box-shadow: 0 7px 18px rgba(19,48,79,.025); }
  .home-stat-card strong { font-size: 17px; }
  .home-stat-card em { font-size: 14px; }
  .stat-icon { width: 31px; height: 31px; font-size: 27px; }
  .library-group { gap: 11px; }
  .library-group-heading { padding: 0 6px; color: #8e99a7; font-size: 16px; }
  .library-row { min-height: 72px; border: 0; border-radius: 18px; padding: 0 16px; box-shadow: 0 6px 16px rgba(19,48,79,.025); }
  .library-row strong { font-size: 16px; }
  .library-row small { font-size: 14px; }
  .inbox-panel { margin-top: 30px; border: 0; border-radius: 20px; padding: 19px; box-shadow: 0 7px 18px rgba(19,48,79,.025); }
  .inbox-panel .section-heading h2 { font-size: 21px; }
  .more-capture[open] { margin-top: 20px; }
  .capture-form { border: 0; box-shadow: 0 7px 18px rgba(19,48,79,.035); }
  .mobile-nav { grid-template-columns: repeat(7, 1fr); z-index: 11; min-height: 72px; padding: 8px 6px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid #e2e5e9; background: rgba(250,251,253,.97); box-shadow: 0 -8px 24px rgba(19,48,79,.04); }
  .mobile-nav .tab { align-content: center; gap: 4px; color: #53606e; font-size: 10px; white-space: nowrap; }
  .mobile-nav .tab span { font-size: 22px; letter-spacing: 0; }
  .mobile-nav .tab.active { color: #171f28; }
  .add-nav-slot { display: block; }
  .add-fab { display: grid; position: fixed; z-index: 13; bottom: calc(30px + env(safe-area-inset-bottom)); left: 50%; place-items: center; width: 52px; height: 52px; border: 2px solid #273542; border-radius: 15px; padding: 0; color: #273542; background: #fff; box-shadow: 0 6px 18px rgba(19,48,79,.12); font-size: 37px; font-weight: 300; line-height: 1; transform: translateX(-50%); cursor: pointer; }
  .add-sheet { border-radius: 25px 25px 18px 18px; padding-right: 18px; padding-left: 18px; }
  .capture-toast { right: 16px; bottom: 94px; left: 16px; }
  .calendar-topbar { margin: 0 0 24px; align-items: flex-start; }
  .calendar-topbar .eyebrow { display: none; }
  .calendar-topbar h1 { font-size: 42px; }
  .calendar-topbar p:not(.eyebrow) { display: none; }
  .calendar-topbar .primary-button { min-height: 40px; padding: 0 12px; font-size: 12px; }
  .calendar-card, .memo-panel { border: 0; border-radius: 20px; padding: 19px; box-shadow: 0 7px 18px rgba(19,48,79,.035); }
  .calendar-day { border-radius: 11px; }
  .calendar-weekdays, .calendar-grid { gap: 4px; }
  .reminder-sheet { border-radius: 25px 25px 18px 18px; padding-right: 18px; padding-left: 18px; }
}

@media (max-width: 430px) {
  .workspace-main { padding-right: 12px; padding-left: 12px; }
  .quick-capture { padding: 18px; }
  .quick-share-row { align-items: stretch; }
  .quick-share-row .primary-button { padding: 0 13px; }
  .capture-actions { gap: 8px; }
  .soft-action { padding: 0 10px; font-size: 12px; }
  .record-panel { align-items: flex-start; }
  .record-panel > div:last-child { flex-direction: column; align-items: stretch; }
  .assistant-bubble, .user-bubble { max-width: 95%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* 金句语录 */
.quote-form { display: grid; gap: 10px; margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.quote-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 15px; line-height: 1.6; resize: vertical; font-family: inherit; }
.quote-form-row { display: flex; gap: 10px; align-items: center; }
.quote-form-row select { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fff; font-size: 14px; }
.quote-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.quote-chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: #fff; color: var(--ink-soft); font-size: 13px; font-weight: 700; cursor: pointer; }
.quote-chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.quote-list { display: grid; gap: 14px; }
.quote-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.quote-text { margin: 0 0 8px; font-size: 17px; line-height: 1.75; color: var(--ink); font-weight: 600; }
.quote-source { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
.quote-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quote-category { padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); font-size: 12px; font-weight: 800; }
.quote-tag { padding: 3px 10px; border-radius: 999px; background: #f3f7fb; color: var(--muted); font-size: 12px; font-weight: 700; }
.quote-meta time { margin-left: auto; color: var(--muted); font-size: 12px; }
.quote-delete { border: none; background: none; color: var(--rose); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 2px 6px; }

/* 卡片操作按钮 */
.delete-button { border: none; background: none; color: var(--rose); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 6px 4px; }
.tag-button { border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-soft); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 6px 12px; }
.speak-button { border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--blue-deep); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 6px 12px; }
.speak-button.speaking { background: var(--blue); border-color: var(--blue); color: #fff; }
.quote-speak { border: none; background: none; padding: 2px 6px; }

/* 文章全文阅读（仿 Cubox 文章视图：段落分明、行高舒展）*/
.article-body { margin-top: 14px; padding: 4px 0 0; border-top: 1px solid var(--line); }
.article-body summary { color: var(--blue-deep); font-size: 13px; font-weight: 800; cursor: pointer; user-select: none; padding: 4px 0; }
.article-body summary:hover { color: var(--navy); }
.article-paragraph { margin: 0 0 14px; color: #2c3e50; font-size: 15.5px; line-height: 1.9; word-break: break-word; overflow-wrap: break-word; text-align: justify; text-justify: inter-character; }
.article-paragraph:last-of-type { margin-bottom: 0; }
.article-truncated { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; font-style: italic; }
.article-iframe-wrap { margin: 6px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.article-iframe { display: block; width: 100%; border: 0; min-height: 360px; height: auto; background: #fff; }
.reader-open-button { display: inline-block; margin: 4px 0 10px; padding: 7px 12px; border: 1px solid #c0d3e8; border-radius: 999px; background: #f1f7ff; color: var(--blue-deep); font-size: 12.5px; font-weight: 800; cursor: pointer; }
.reader-open-button:hover { background: #e2eefd; }

/* 文章阅读器（接龙沉浸） */
.article-reader { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: var(--canvas); overflow: auto; }
.article-reader[hidden] { display: none; }
body.reader-open { overflow: hidden; }
.reader-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.reader-close { border: none; background: none; font-size: 28px; line-height: 1; padding: 4px 12px; cursor: pointer; color: var(--muted); }
.reader-close:hover { color: var(--rose); }
.reader-meta { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.reader-source { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-weight: 700; }
.reader-progress { font-size: 11.5px; color: var(--muted); }
.reader-spacer { width: 44px; }
.reader-title { width: min(760px, calc(100% - 40px)); margin: 34px auto 10px; font-size: 28px; line-height: 1.38; letter-spacing: -.025em; }
.reader-summary { margin: 0 20px 10px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.7; background: #f1f7ff; border-radius: 12px; padding: 10px 14px; }
.reader-points { margin: 0 20px 12px; padding-left: 26px; color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.reader-points li { margin-bottom: 4px; }
.reader-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 8px; }
.reader-tags span { padding: 3px 10px; border-radius: 999px; background: #f3f7fb; color: var(--muted); font-size: 12px; font-weight: 700; }
.reader-body { width: min(760px, calc(100% - 40px)); margin: 16px auto 14px; }
.reader-text-wrap { background: transparent; border: 0; border-radius: 0; padding: 0; }
.reader-source-link { display: block; width: min(760px, calc(100% - 40px)); margin: 6px auto 20px; color: var(--blue-deep); font-size: 13px; font-weight: 700; }
.reader-ai-notes { width: min(760px, calc(100% - 40px)); margin: 4px auto 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reader-ai-notes > summary { padding: 15px 0; color: var(--blue-deep); font-size: 14px; font-weight: 850; cursor: pointer; }
.reader-ai-notes .reader-summary { margin: 0 0 10px; }
.reader-ai-notes .reader-points { margin: 0 0 12px; }
.reader-ai-notes .reader-tags { padding: 0 0 14px; }
.reader-mode-switch { display: flex; width: min(760px, calc(100% - 40px)); margin: 12px auto 0; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.reader-mode-switch button { flex: 1; min-height: 38px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-weight: 800; cursor: pointer; }
.reader-mode-switch button.active { color: #fff; background: var(--blue); }
.reader-mode-switch #reader-refresh-snapshot { flex: 0 0 auto; padding: 0 13px; color: var(--blue-deep); }
.reader-snapshot-status { width: min(760px, calc(100% - 40px)); margin: 8px auto 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.snapshot-iframe-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.snapshot-iframe { display: block; width: 100%; min-height: 600px; border: 0; background: #fff; }
.snapshot-empty { padding: 38px 22px; border: 1px dashed #c6d2df; border-radius: 16px; background: #fff; text-align: center; }
.snapshot-empty strong { font-size: 18px; }
.snapshot-empty p { margin: 10px auto 0; max-width: 520px; color: var(--muted); line-height: 1.7; }
.snapshot-version-list { display: grid; gap: 10px; }
.snapshot-version-head { padding: 8px 2px 12px; }
.snapshot-version-head strong { font-size: 18px; }
.snapshot-version-head p { margin: 5px 0 0; color: var(--muted); line-height: 1.6; }
.snapshot-version-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.snapshot-version-row span:first-child { display: grid; gap: 4px; }
.snapshot-version-row small { color: var(--muted); }
.external-reports { margin: 20px 0 8px; padding: 18px 0 0; border-top: 1px solid var(--line); background: transparent; }
.external-reports-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.external-reports-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.external-reports-head button,.external-report-actions button { border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; color: var(--blue-deep); background: #fff; font-weight: 750; cursor: pointer; }
.external-report-list { display: grid; gap: 24px; margin-top: 16px; }
.external-report-card { padding: 0 0 20px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.external-report-card > div:first-child { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.external-report-card h4 { margin: 8px 0; font-size: 16px; }
.external-report-body { max-height: none; overflow: visible; color: var(--ink-soft); line-height: 1.85; }
.external-report-body > p { margin: 8px 0; }
.external-report-section { padding: 10px 0; border-top: 1px solid #e5edf5; }
.external-report-section:first-child { border-top: 0; }
.external-report-section h5 { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; color: #17395f; font-size: 15px; }
.external-report-section h5 span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: #3478c7; font-size: 12px; }
.external-report-section p { margin: 0; white-space: normal; }
.podcast-unavailable { display:grid; gap:4px; margin:10px 0; padding:13px 15px; border:1px dashed #c9d7e6; border-radius:14px; color:#52677e; background:#f8fafc; }
.podcast-unavailable strong { color:#263d58; }
.podcast-unavailable small { line-height:1.55; }
.external-report-actions { display: flex; gap: 8px; margin-top: 12px; }
.doubao-report-sheet { position: fixed; inset: 0; z-index: 260; display: grid; place-items: end center; padding: 18px; background: rgba(15,29,44,.48); }
.doubao-report-panel { display: grid; gap: 10px; width: min(620px,100%); max-height: min(86vh,760px); overflow: auto; padding: 18px; border-radius: 22px; background: #fff; box-shadow: 0 26px 80px rgba(15,29,44,.32); }
.doubao-report-head { display: flex; justify-content: space-between; align-items: center; font-size: 19px; }
.doubao-report-head button { border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.doubao-report-panel p { margin: 0; color: var(--muted); line-height: 1.6; }
.doubao-report-panel textarea,.doubao-report-panel input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--ink); background: #fff; font: inherit; }
.doubao-report-panel textarea[data-doubao-prompt] { min-height: 120px; color: var(--ink-soft); background: #f6f9fc; }
.doubao-report-panel textarea[data-doubao-body] { min-height: 210px; resize: vertical; }
.doubao-report-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.doubao-report-actions > button { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; cursor: pointer; }
.doubao-report-actions [data-doubao-paste] { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .doubao-report-sheet { padding: 0; }
  .doubao-report-panel { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .doubao-report-actions { grid-template-columns: 1fr; }
}
.reader-peek { display: flex; flex-direction: column; gap: 2px; margin: 4px 20px 12px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.reader-peek-label { font-size: 11.5px; color: var(--muted); font-weight: 800; }
.reader-peek-title { font-weight: 800; color: var(--ink); }
.reader-peek-source { font-size: 12.5px; color: var(--muted); }
.reader-nav { display: flex; gap: 12px; padding: 12px 20px 24px; border-top: 1px solid var(--line); }
.reader-nav button { flex: 1; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 14.5px; font-weight: 800; cursor: pointer; }
.reader-nav button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue-deep); }
.reader-nav button:disabled { opacity: .4; cursor: not-allowed; }
.reader-loading { padding: 30px; text-align: center; color: var(--muted); }
.inbox-item.clickable { cursor: pointer; }
.inbox-item.clickable:hover { border-color: #b9d2ef; }

/* 一键录音与灵感库 */
.inspiration-topbar h1 { margin: 4px 0 8px; font-size: 34px; }
.inspiration-topbar > div > p:last-child { margin: 0; color: var(--muted); line-height: 1.6; }
.inspiration-recorder { display: grid; justify-items: center; gap: 15px; margin: 24px 0 30px; padding: 24px; border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(150deg, #fff, #f3f8ff); box-shadow: var(--shadow); }
.inspiration-mode-row { display: flex; gap: 8px; justify-self: stretch; }
.inspiration-mode { flex: 1; min-height: 39px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-weight: 800; cursor: pointer; }
.inspiration-mode.active { border-color: var(--blue); color: #fff; background: var(--blue); }
.voice-visual { display: flex; align-items: center; justify-content: center; gap: 5px; height: 62px; }
.voice-visual i { display: block; width: 4px; height: 12px; border-radius: 99px; background: #91baf0; }
.voice-visual i:nth-child(3n) { height: 29px; }
.voice-visual i:nth-child(4n) { height: 42px; }
.voice-visual.recording i { animation: voice-wave .72s ease-in-out infinite alternate; }
.voice-visual.recording i:nth-child(2n) { animation-delay: -.28s; }
.voice-visual.recording i:nth-child(3n) { animation-delay: -.51s; }
@keyframes voice-wave { from { transform: scaleY(.35); opacity: .45; } to { transform: scaleY(1.35); opacity: 1; } }
.inspiration-record-button { display: grid; place-items: center; gap: 6px; min-width: 190px; border: 0; color: #9f2944; background: transparent; cursor: pointer; }
.inspiration-record-button span { display: grid; place-items: center; width: 72px; height: 72px; border: 8px solid #ffe6eb; border-radius: 50%; color: #e14e6e; background: #fff; box-shadow: 0 8px 22px rgba(186,47,80,.16); font-size: 37px; line-height: 1; }
.inspiration-record-button.recording span { color: #fff; background: #e14e6e; animation: record-pulse 1.35s ease-in-out infinite; }
@keyframes record-pulse { 50% { box-shadow: 0 0 0 13px rgba(225,78,110,.12); } }
.inspiration-record-button strong { font-size: 14px; }
#inspiration-record-time { color: var(--ink); font-size: 22px; font-variant-numeric: tabular-nums; font-weight: 800; }
.inspiration-recorder input, .inspiration-recorder textarea { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; color: var(--ink); background: rgba(255,255,255,.9); font: inherit; resize: vertical; }
.inspiration-save-button { width: 100%; }
.inspiration-recorder .form-message { justify-self: stretch; margin: 0; }
.inspiration-list-heading { margin-top: 10px; }
.daily-information-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.daily-information-head h1 { margin: 4px 0 8px; font-size: 34px; }
.daily-information-head p:last-child { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.6; }
.information-source-strip { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; padding: 2px 0 6px; scrollbar-width: none; }
.information-source-strip::-webkit-scrollbar { display: none; }
.information-source-strip button { flex: 0 0 auto; display:flex; align-items:center; gap:7px; padding: 8px 13px; border: 1px solid #cfe0f3; border-radius: 999px; color: var(--blue-deep); background: #f2f7fd; font:inherit; font-size: 12px; font-weight: 850; cursor:pointer; }
.information-source-strip button strong { display:grid; place-items:center; min-width:20px; height:20px; padding:0 5px; border-radius:999px; color:#66798d; background:rgba(255,255,255,.78); font-size:11px; }
.information-source-strip button.active { border-color:#8bb8e9; background:#e5f1ff; box-shadow:0 5px 14px rgba(55,114,177,.11); }
.information-section { scroll-margin-top:84px; margin: 18px 0 22px; padding:0 0 17px; border-bottom:1px solid #e5e9ed; }
.information-section-toggle { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 11px; padding:2px; border:0; color:inherit; background:transparent; text-align:left; cursor:pointer; }
.information-section-title { min-width:0; display:flex; align-items:center; gap:10px; }
.information-section-title > i { flex:0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color:#355372; background: #edf4fb; font-size: 17px; font-style:normal; font-weight:900; }
.information-section-title > span { min-width:0; display:grid; gap:2px; }
.information-section-title strong { font-size:20px; line-height:1.25; }
.information-section-title small { overflow:hidden; color:var(--muted); font-size:11.5px; font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.information-section-summary { flex:0 0 auto; display:grid; justify-items:end; gap:2px; color:var(--muted); font-size:11px; }
.information-section-summary b { color:var(--ink-soft); font-size:12px; }
.information-section-summary em { color:var(--blue-deep); font-style:normal; }
.information-card-grid { display: grid; gap: 10px; }
.information-card { width:100%; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 16px; border: 1px solid #e0e5e9; border-radius: 17px; color: inherit; background: #fff; box-shadow: 0 6px 16px rgba(19,48,79,.04); font:inherit; text-align:left; cursor:pointer; }
.information-card:hover { border-color: #bdcedf; transform: translateY(-1px); }
.information-rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: #69855d; font-weight: 900; }
.information-card-copy { min-width: 0; display:grid; gap:6px; }
.information-card-title { color:var(--ink); font-size: 16px; line-height: 1.48; }
.information-card-description { display: -webkit-box; overflow: hidden; color: #6a747e; font-size: 13px; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.information-card-meta { display: flex; flex-wrap: wrap; gap: 7px 10px; color: #87919c; font-size: 11.5px; }
.information-card-meta b { color: #55704c; }
.information-card-meta em { color:#537ca5; font-style:normal; }
.information-card > i { align-self: center; color: #94a0ab; font-size: 23px; font-style: normal; }
.information-empty { margin: 0; padding: 22px; border: 1px dashed #ccd5de; border-radius: 16px; color: var(--muted); background: rgba(255,255,255,.7); text-align: center; }
.information-section-actions { display:flex; justify-content:center; gap:8px; margin-top:10px; }
.information-more,.information-source-retry,.information-page-error button { padding:8px 14px; border:1px solid #ccdae8; border-radius:999px; color:var(--blue-deep); background:#f5f9fd; font:inherit; font-size:12px; font-weight:800; cursor:pointer; }
.information-page-error { display:grid; justify-items:center; gap:12px; padding:28px 18px; border:1px dashed #d7dfe7; border-radius:18px; color:var(--muted); text-align:center; }
.information-section.is-collapsed .information-card-grid,.information-section.is-collapsed .information-empty,.information-section.is-collapsed .information-section-actions { display:none; }

@media (max-width: 430px) {
  .library-link-card { min-height: 132px; padding: 15px 42px 14px 15px; border-radius: 17px; }
  .library-link-card h3 { margin-top: 8px; font-size: 17px; }
  .library-link-card p { font-size: 13.5px; }
  .library-link-thumb { width: 76px; height: 76px; border-radius: 12px; }
  .library-link-meta { margin-top: 9px; }
  .inspiration-recorder { padding: 19px 15px; }
  .daily-information-head { display: grid; }
  .daily-information-head .outline-button { justify-self: start; }
}

/* 星标收藏 */
.card-top-right { display: flex; align-items: center; gap: 8px; }
.fav-star { border: none; background: none; padding: 2px 4px; color: #b8c4d0; font-size: 20px; line-height: 1; cursor: pointer; }
.fav-star.active { color: #e6a21e; }
.library-head-actions { display: flex; align-items: center; gap: 10px; }
.fav-filter { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; background: #fff; color: var(--ink-soft); font-size: 13px; font-weight: 800; cursor: pointer; }
.fav-filter.active { background: #fff7e6; border-color: #e6a21e; color: #a86e07; }
.playback-speeds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.playback-speeds span { font-weight: 800; color: var(--ink-soft); }
.playback-speeds button { border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-soft); padding: 4px 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.playback-speeds button.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.source-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); font-size: 12px; font-weight: 800; margin-left: 6px; vertical-align: middle; }
.article-hero { display: block; width: 100%; max-height: 170px; object-fit: cover; border-radius: 12px; margin: 10px 0; background: #f0f3f7; }
.article-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.article-gallery img { width: 100%; border-radius: 10px; object-fit: cover; background: #f0f3f7; }
@media (min-width: 720px) { .article-gallery { grid-template-columns: repeat(3, 1fr); } }
.bark-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: -4px 0 8px; }
.bark-actions button { white-space: nowrap; }
.bark-actions span { color: var(--ink-soft); font-size: 12.5px; font-weight: 700; }
.brief-link { display: block; width: 100%; border: none; background: none; padding: 2px 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.brief-link strong { color: var(--blue-deep); }
.brief-link:hover strong { text-decoration: underline; }
.mobile-command-hero { display: none; }

.reading-hero, .business-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.reading-hero h1, .business-hero h1 { margin: 4px 0 8px; color: var(--ink); font-size: 34px; }
.reading-hero p, .business-hero p { margin: 0; color: var(--muted); line-height: 1.7; }
.business-hero-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.business-hero-actions .primary-button, .business-hero-actions .outline-button { width: auto; margin: 0; white-space: nowrap; }
.reading-import-button { flex: 0 0 auto; padding: 11px 16px; border-radius: 13px; color: #fff; background: var(--blue); font-weight: 800; cursor: pointer; }
.reading-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 22px; }
.book-card { position: relative; min-width: 0; }
.book-cover { display: flex; flex-direction: column; justify-content: space-between; width: 100%; aspect-ratio: .72; padding: 18px 15px; border: 0; border-radius: 10px 20px 20px 10px; color: #fff; background: linear-gradient(145deg,#566d59,#304635); box-shadow: -6px 0 0 #d9d0b9, 0 14px 25px rgba(39,55,43,.18); text-align: left; cursor: pointer; }
.book-cover span { font-size: 9px; font-weight: 900; letter-spacing: .16em; opacity: .7; }
.book-cover strong { font-family: ui-serif,"Songti SC",serif; font-size: 20px; line-height: 1.35; }
.book-cover small { opacity: .68; }
.book-color-1 .book-cover { background: linear-gradient(145deg,#7b5e50,#49372f); }
.book-color-2 .book-cover { background: linear-gradient(145deg,#58677e,#303b50); }
.book-color-3 .book-cover { background: linear-gradient(145deg,#7c6d3f,#50451f); }
.book-color-4 .book-cover { background: linear-gradient(145deg,#725970,#443342); }
.book-delete { width: 100%; margin-top: 9px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.reading-empty { grid-column: 1/-1; padding: 50px 24px; border: 1px dashed var(--line); border-radius: 22px; color: var(--muted); text-align: center; }
.reading-empty strong { color: var(--ink); font-size: 18px; }
.business-board { display: grid; gap: 12px; }
.business-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 16px; }
.business-summary article { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 8px 20px rgba(30,56,90,.05); }
.business-summary strong { color: var(--ink); font-size: 26px; }
.business-summary span { color: var(--muted); font-size: 11px; }
.business-module-tabs { display: flex; gap: 8px; margin: 0 0 16px; padding: 5px; border-radius: 15px; background: #edf1f7; }
.business-module-tabs button { flex: 1; padding: 10px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-weight: 800; }
.business-module-tabs button.active { color: var(--ink); background: #fff; box-shadow: 0 4px 12px rgba(34,61,96,.08); }
.business-module { display: none; }
.business-module.active { display: block; }
.compact-button { width: auto; margin: 0 0 14px; padding: 10px 15px; }
.business-products { display: grid; gap: 11px; }
.business-product-card { display: grid; grid-template-columns: 58px minmax(0,1fr) 94px auto; align-items: center; gap: 15px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.business-product-cover, .business-product-placeholder { width: 58px; height: 58px; border-radius: 15px; object-fit: cover; background: #eef2f7; }
.business-product-placeholder { display: grid; place-items: center; color: #536985; font-weight: 900; }
.business-product-main { min-width: 0; }
.business-product-card small { color: var(--blue); font-weight: 800; }
.business-product-card h3 { margin: 4px 0; }
.business-product-card p { margin: 0; color: var(--muted); font-size: 12px; }
.business-product-card .product-note { margin-top: 5px; line-height: 1.5; }
.product-source { margin-top: 6px; padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 800; }
.product-sales-value { display: grid; text-align: center; }
.product-sales-value strong { font-size: 23px; }
.product-sales-value span { color: var(--muted); font-size: 10px; }
.product-sales-value em { margin-top: 4px; color: var(--muted); font-size: 10px; font-style: normal; }
.business-product-card .product-record-button { padding: 9px 11px; border: 1px solid #c7d7f2; border-radius: 10px; color: #2857bd; background: #f3f7ff; font-weight: 800; }
.review-guide { display: grid; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.review-guide strong { font-size: 20px; }
.review-guide p { margin: 0; color: var(--muted); line-height: 1.65; }
.review-guide li { margin: 10px 0; color: var(--ink-soft); line-height: 1.6; }
.review-guide .primary-button { width: fit-content; margin: 0; }
.business-focus { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: #f7f9fc; }
.business-focus > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.business-focus > header small { color: var(--blue); font-weight: 900; }
.business-focus > header h2 { margin: 5px 0 0; color: var(--ink); font-size: 18px; }
.business-focus > header > span { display: grid; place-items: center; min-width: 29px; height: 29px; border-radius: 50%; color: var(--blue-deep); background: #e5edff; font-weight: 900; }
.business-action-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.business-archive { padding: 13px 17px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.business-archive summary { color: var(--muted); font-weight: 800; cursor: pointer; }
.business-archive .business-action-list { margin-top: 12px; }
.business-action-card { margin-bottom: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 20px rgba(30,56,90,.06); }
.business-action-card small { color: var(--blue); font-weight: 800; }
.business-action-card h3 { margin: 7px 0; font-size: 15px; }
.business-action-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.business-action-card .action-next { min-height: 39px; }
.business-action-card .action-next b { color: var(--ink-soft); }
.business-action-card .action-due { margin: 6px 0 10px; color: #66758c; font-size: 11px; }
.business-action-card select { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #f8faff; }
.business-sheet { max-height: min(780px, calc(100dvh - 24px)); overflow: auto; }
.ebook-reader { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; z-index: 50; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; overflow: hidden; background: #f3efe3; }
.ebook-reader[hidden] { display: none; }
.ebook-reader-header, .ebook-footer { display: grid; align-items: center; grid-template-columns: 90px 1fr 90px; min-height: 60px; padding: env(safe-area-inset-top) 16px 0; border-bottom: 1px solid rgba(65,72,59,.12); background: rgba(247,243,232,.94); backdrop-filter: blur(16px); }
.ebook-reader-header strong { overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.ebook-reader-header button, .ebook-footer button { border: 0; color: #405b45; background: transparent; font-weight: 800; }
.ebook-reader-header button:last-child { text-align: right; }
/* 阅读方式面板属于顶部固定行；正文、底部工具条各占独立行，防止面板抢走内容行高 */
.ebook-reader-header { grid-row: 1; }
.ebook-mode-panel { grid-row: 2; }
.ebook-page { grid-row: 3; }
.ebook-footer { grid-row: 4; }
.ebook-reader.pdf-mode .ebook-mode-panel,
.ebook-reader.comic-book .ebook-mode-panel { display: none; }
.ebook-settings { position:absolute; top:calc(60px + env(safe-area-inset-top)); right:clamp(10px,3vw,30px); z-index:55; width:min(430px,calc(100vw - 20px)); max-height:calc(100dvh - 90px - env(safe-area-inset-top)); overflow:auto; padding:14px 18px; border:1px solid rgba(65,72,59,.16); border-radius:0 0 18px 18px; background:rgba(255,253,246,.98); box-shadow:0 18px 42px rgba(35,48,38,.2); backdrop-filter:blur(18px); }
.ebook-settings label { display: flex; align-items: center; gap: 12px; }
.ebook-settings input { flex: 1; }
.ebook-font-row, .ebook-theme-row { display: flex; gap: 9px; margin-top: 10px; }
.ebook-font-row button, .ebook-theme-row button { flex: 1; padding: 8px; border: 1px solid #d8d8cf; border-radius: 10px; background: #fff; }
.ebook-page { min-width: 0; min-height: 0; overflow-y: auto; padding: clamp(24px,6dvh,64px) max(24px,calc((100vw - 860px)/2)) clamp(70px,10dvh,110px); color: #252a24; font-family: ui-serif,"Songti SC",serif; font-size: 19px; line-height: 1.82; background: #f3efe3; container-type: size; }
.ebook-page p { margin: 0 0 1.3em; text-align: justify; }
.ebook-theme-white { background: #fff; }
.ebook-theme-night { color: #d6d8d2; background: #171b18; }
.ebook-font-system { font-family: -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif; }
.ebook-font-serif { font-family: ui-serif,"Songti SC",serif; }
.ebook-font-kai { font-family: "Kaiti SC","STKaiti",serif; }
.ebook-pdf-page { padding: 0; }
.ebook-pdf-page iframe { width: 100%; height: 100%; border: 0; }
.ebook-format-note { max-width: 520px; margin: 15vh auto; padding: 28px; border-radius: 20px; background: rgba(255,255,255,.68); }
.ebook-footer { grid-template-columns: repeat(7,minmax(0,1fr)); padding: 0 6px env(safe-area-inset-bottom); border-top: 1px solid rgba(65,72,59,.12); border-bottom: 0; }
.ebook-footer span { text-align: center; font-size: 12px; }

/* Phase 5: real bookshelf + adaptive chapter reader. Keep controls compact and touch-safe. */
.reading-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: clamp(14px,2.6vw,24px); }
.book-card { position: relative; }
.book-cover { position: relative; overflow: hidden; aspect-ratio: .68; min-height: 0; padding: 14px 12px; }
.book-star { position: absolute; z-index: 4; top: 7px; right: 7px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.78); border-radius: 50%; color: #fff; background: rgba(20,28,36,.48); box-shadow: 0 3px 12px rgba(0,0,0,.18); font-size: 20px; line-height: 1; cursor: pointer; backdrop-filter: blur(7px); }
.book-star.active { color: #ffd54a; background: rgba(24,30,35,.72); }
.book-star:disabled { opacity: .55; }
.book-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.book-cover img:not([hidden]) ~ span,
.book-cover img:not([hidden]) ~ strong,
.book-cover img:not([hidden]) ~ small { position: relative; z-index: 1; padding: 3px 5px; border-radius: 7px; color: #fff; background: rgba(12,20,28,.68); text-shadow: 0 1px 2px #000; }
.book-cover strong { font-size: clamp(14px,2vw,19px); }
.book-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 9px; }
.book-actions button { min-height: 36px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); background: rgba(255,255,255,.84); font-size: 11px; cursor: pointer; }
.book-actions .book-download, .book-actions .book-cloud-backup, .book-actions .book-progress-sync { color: #174f94; background: #edf5ff; }
.book-actions .book-force-download,.book-actions .book-cloud-check { color:#174f94; background:#edf5ff; }
.book-cloud-missing { grid-column:1/-1; color:#7a8797; font-size:11px; line-height:1.4; text-align:center; }
.book-actions .book-delete { width: auto; margin: 0; color: #aa3547; }
.reading-sync-options { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; width: 100%; margin-top: 12px; }
.reading-sync-options label { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 14px; background: rgba(255,255,255,.1); cursor: pointer; }
.reading-sync-options input { flex: 0 0 auto; width: 19px; height: 19px; accent-color: #fff; }
.reading-sync-options span { display: grid; min-width: 0; }
.reading-sync-options strong { color: #fff; font-size: 12px; line-height: 1.35; }
.reading-sync-options small { color: rgba(255,255,255,.72); font-size: 10px; line-height: 1.35; }
.ebook-reader { grid-template-rows: auto auto minmax(0,1fr) auto; transition: background .2s ease; }
.ebook-reader-header { grid-template-columns: minmax(72px,auto) minmax(0,1fr) minmax(82px,auto); padding-top: env(safe-area-inset-top); transition: transform .22s ease,opacity .22s ease; }
.ebook-header-actions { display: flex; justify-content: flex-end; }
.ebook-header-actions button { min-width: 42px; min-height: 44px; font-size: 17px; }
.ebook-page { overscroll-behavior: contain; scroll-behavior: smooth; padding: clamp(28px,6dvh,68px) max(22px,calc((100vw - 760px)/2)) clamp(70px,9dvh,100px); -webkit-user-select: text; user-select: text; }
.ebook-reader:not(.comic-zoom-enabled) .ebook-page { touch-action:pan-y; }
.ebook-reader.comic-zoom-enabled .ebook-page { touch-action:pan-x pan-y pinch-zoom; }
.ebook-reader.comic-zoom-enabled .ebook-mode-comic-page { overflow:auto; }
.ebook-reader.comic-zoom-enabled .ebook-mode-comic-page .ebook-comic-page,
.ebook-reader.comic-zoom-enabled .ebook-mode-comic-page .ebook-comic-page img { width:auto; min-width:100%; height:auto; max-width:none; max-height:none; }
.ebook-text-sheet { width: min(100%,760px); margin: 0 auto; }
.ebook-text-sheet h1,.ebook-comic-chapter h1 { margin: 0 0 1.6em; font-size: 1.45em; line-height: 1.35; }
.ebook-text-sheet p { margin-bottom: var(--paragraph-gap,18px); overflow-wrap: anywhere; text-align: justify; }
.ebook-text-sheet mark { padding: .02em .03em; color: inherit; background: var(--highlight,#ffe18a); border-radius: 2px; }
.ebook-comic-chapter { width: min(100%,980px); margin: 0 auto; }
.ebook-comic-page { display: grid; place-items: center; width: 100%; min-height: 80px; margin: 0 auto 16px; }
.ebook-comic-page img { display: block; width: auto; max-width: 100%; height: auto; max-height: none; object-fit: contain; }
.ebook-mode-comic-page .ebook-comic-page { height: 100%; min-height: calc(100dvh - 150px); margin: 0; }
.ebook-mode-comic-page .ebook-comic-page img { max-height: calc(100dvh - 170px); }
.ebook-theme-white { color: #20252a; background: #fff; }
.ebook-theme-paper { color: #29271f; background: #f5f0e4; }
.ebook-theme-night { color: #e6e7e3; background: #151918; }
.ebook-footer { grid-template-columns: repeat(7,minmax(0,1fr)); min-height: calc(58px + env(safe-area-inset-bottom)); transition: transform .22s ease,opacity .22s ease; }
.ebook-footer button { display: grid; place-items: center; gap: 1px; min-height: 46px; padding: 3px 1px; }
.ebook-footer button span { font-size: 18px; }
.ebook-footer button small { font-size: 10px; white-space: nowrap; }
.ebook-footer { position: relative; }
.ebook-footer button:disabled { opacity:.35; }
.ebook-progress-label { position: absolute; top: -19px; left: 50%; min-width: 92px; padding: 2px 9px; border-radius: 9px 9px 0 0; color: #647269; background: rgba(247,243,232,.94); transform: translateX(-50%); }
.ebook-reader.controls-hidden .ebook-reader-header { opacity: 0; pointer-events: none; transform: translateY(-110%); }
.ebook-reader.controls-hidden .ebook-footer { opacity: 0; pointer-events: none; transform: translateY(110%); }
.ebook-reader.controls-hidden { grid-template-rows: 0 0 minmax(0,1fr) 0; }
.ebook-reader.controls-hidden .ebook-mode-panel { display: none; }
.ebook-reader.controls-hidden .ebook-page { padding-top: max(26px,env(safe-area-inset-top)); padding-bottom: max(28px,env(safe-area-inset-bottom)); }
.ebook-settings { top: calc(60px + env(safe-area-inset-top)); }
.ebook-capability-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.ebook-chapter-drawer,.ebook-bookmark-drawer { position: fixed; inset: 0; z-index: 70; background: rgba(20,28,34,.34); backdrop-filter: blur(4px); }
.ebook-chapter-drawer[hidden],.ebook-bookmark-drawer[hidden] { display: none; }
.ebook-chapter-drawer > div,.ebook-bookmark-drawer > div { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; max-height: min(82dvh,760px); padding: 16px max(16px,env(safe-area-inset-left)) calc(16px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #fff; box-shadow: 0 -20px 50px rgba(15,25,35,.16); }
.ebook-chapter-drawer header,.ebook-bookmark-drawer header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ebook-chapter-drawer header button,.ebook-bookmark-drawer header button { min-height: 40px; border: 0; color: #32659c; background: transparent; }
#ebook-chapter-list,#ebook-bookmark-list,#ebook-search-results { overflow: auto; }
#ebook-chapter-list button,#ebook-bookmark-list button,#ebook-search-results button { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 4px 12px; width: 100%; min-height: 52px; padding: 11px 6px; border: 0; border-bottom: 1px solid #edf0f2; color: #26313a; background: transparent; text-align: left; }
#ebook-bookmark-list button,#ebook-search-results button { grid-template-columns: 1fr; }
#ebook-chapter-list button > span { color: #8b98a2; }
#ebook-chapter-list button.current { color:#215f9f; background:#edf6ff; }
#ebook-chapter-list button.current > span { color:#215f9f; font-weight:850; }
#ebook-bookmark-list button > span,#ebook-search-results button > span { color: #71808c; font-size: 12px; line-height: 1.5; }
.ebook-search { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; margin-bottom: 10px; padding: 7px 10px; border-radius: 13px; background: #f2f5f7; }
.ebook-search input { min-width: 0; padding: 8px 0; border: 0; outline: none; background: transparent; }
.ebook-search button { min-height: 36px; border: 0; color: #2863a1; background: transparent; font-weight: 800; }
.ebook-selection-popover { position: fixed; inset: auto; z-index: 90; display: flex; align-items: center; gap: 2px; width: max-content; min-width: 0; max-width: calc(100vw - 16px); height: auto; min-height: 0; max-height: 52px; overflow-x: auto; overflow-y: hidden; padding: 5px; border: 0; border-radius: 12px; color: #fff; background: #20272d; box-shadow: 0 10px 28px rgba(0,0,0,.25); overscroll-behavior: contain; scrollbar-width: none; }
.ebook-selection-popover::-webkit-scrollbar { display: none; }
.ebook-selection-popover[hidden] { display: none; }
.ebook-selection-popover button { flex: 0 0 auto; min-width: 42px; min-height: 36px; padding: 6px 9px; border: 0; border-radius: 8px; color: inherit; background: transparent; font-size: 12px; white-space: nowrap; }
.ebook-selection-popover button:active { background: rgba(255,255,255,.14); }
.ebook-selection-popover button:disabled { opacity: .52; pointer-events: none; }
.ebook-selection-popover.mobile-docked { left: 10px; right: 10px; top: auto; bottom: calc(72px + env(safe-area-inset-bottom)); width: auto; max-width: none; justify-content: center; overflow: visible; }
@media (max-width:720px), (pointer:coarse) {
  .ebook-selection-popover.mobile-docked { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); min-height:48px; max-height:none; padding:6px; border-radius:15px; }
  .ebook-selection-popover.mobile-docked > button { min-width:0; min-height:38px; padding:6px 4px; }
}

@media (max-width:767px) {
  .reading-sync-options { grid-template-columns: 1fr; }
  .reading-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 10px; }
  .book-cover { padding: 10px 8px; border-radius: 7px 13px 13px 7px; }
  .book-cover strong { font-size: 13px; line-height: 1.35; }
  .book-cover small { font-size: 9px; line-height: 1.3; }
  .book-actions { grid-template-columns: 1fr; gap: 4px; }
  .book-actions button { min-height: 32px; font-size: 10px; }
  .ebook-reader-header { min-height: 52px; padding-right: 8px; padding-left: 8px; }
  .ebook-page { padding-right: 22px; padding-left: 22px; }
  .ebook-footer { padding-right: 4px; padding-left: 4px; }
}
@media (max-width:340px) {
  .reading-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ebook-page { padding-right: 16px; padding-left: 16px; }
}
@media (min-width:768px) and (max-width:1100px) {
  .reading-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

/* Phase 5 final precedence: the older mobile theme below must not collapse the
   real bookshelf back to two columns or override the adaptive reader footer. */
@media (min-width:341px) and (max-width:767px) {
  .reading-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 10px; }
  .book-cover strong { font-size: 13px; }
}
.inbox-delete { border: none; background: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 4px 6px; border-radius: 8px; align-self: flex-start; }
.inbox-delete:hover { color: var(--rose); background: var(--rose-soft); }

/* 全局播客播放器：切换资料页后仍可暂停、续播、拖动和倍速 */
.podcast-play-button { display: grid; grid-template-columns: 44px 1fr; gap: 2px 12px; align-items: center; width: 100%; margin-top: 10px; padding: 12px 14px; border: 1px solid #cbdced; border-radius: 15px; color: var(--navy); background: #f2f7fd; text-align: left; cursor: pointer; }
.podcast-play-button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: var(--blue); }
.podcast-play-button strong { font-size: 14px; }
.podcast-play-button small { color: var(--muted); font-size: 11.5px; }
.floating-player { position: fixed; left: 50%; bottom: 22px; z-index: 230; display: grid; grid-template-columns: 46px minmax(0,1fr) auto 28px; align-items: center; gap: 10px; width: min(680px, calc(100vw - 28px)); padding: 10px 12px; border: 1px solid rgba(190,208,226,.92); border-radius: 19px; color: var(--navy); background: rgba(255,255,255,.94); box-shadow: 0 14px 44px rgba(17,46,78,.22); backdrop-filter: blur(18px); transform: translateX(-50%); }
.floating-player[hidden] { display: none; }
.floating-player-cover { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #fff; background: var(--blue); font-size: 17px; cursor: pointer; }
.floating-player-main { min-width: 0; }
.floating-player-main > strong { display: block; overflow: hidden; margin-bottom: 5px; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.floating-player-progress-row { display: grid; grid-template-columns: 38px minmax(70px,1fr) 38px; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.floating-player-progress { width: 100%; accent-color: var(--blue); }
.floating-player-rate, .floating-player-close { border: 0; color: var(--ink-soft); background: transparent; font-weight: 850; cursor: pointer; }
.floating-player-rate { padding: 7px; border-radius: 9px; background: var(--blue-soft); font-size: 12px; }
.floating-player-close { font-size: 23px; font-weight: 500; }
@media (max-width: 430px) {
  .floating-player { bottom: calc(82px + env(safe-area-inset-bottom)); grid-template-columns: 42px minmax(0,1fr) auto 24px; gap: 7px; width: calc(100vw - 18px); padding: 9px; border-radius: 17px; }
  .floating-player-cover { width: 40px; height: 40px; }
  .floating-player-main > strong { font-size: 12.5px; }
  .floating-player-progress-row { grid-template-columns: 33px minmax(55px,1fr) 33px; gap: 4px; font-size: 9px; }
}

/* 访问密码大门 */
.access-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: var(--canvas); }
.access-gate[hidden] { display: none; }
.access-gate-card { display: grid; gap: 14px; width: min(92vw, 380px); padding: 30px 26px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.access-gate-card .brand-mark { justify-self: center; }
.access-gate-card h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.access-gate-card > p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.access-gate-card input { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font-size: 16px; text-align: center; }
.access-gate-message { min-height: 18px; margin: 0; color: var(--rose); font-size: 13px; }

/* ux51 手机端正式重构：原生工作台式信息层级 */
@media (max-width: 979px) {
  :root {
    --canvas: #f3f1e9;
    --surface: #fffefa;
    --ink: #26352a;
    --ink-soft: #4f5f53;
    --muted: #7d887f;
    --line: #dde2d8;
    --blue: #58775b;
    --blue-deep: #36513b;
    --blue-soft: #e8efe5;
    --shadow: 0 12px 30px rgba(54,81,59,.08);
  }
  html { background: #f3f1e9; }
  body { background: radial-gradient(circle at 100% 0, #e3eadf 0, transparent 34%), #f3f1e9; }
  .app-shell { display: block; min-height: 100vh; }
  .workspace-main { width: 100%; padding: max(14px, env(safe-area-inset-top)) 14px calc(110px + env(safe-area-inset-bottom)); }
  .mobile-header {
    position: sticky; top: 0; z-index: 9; display: flex; margin: -14px -14px 14px; padding: calc(11px + env(safe-area-inset-top)) 16px 11px;
    border-bottom: 1px solid rgba(72,99,75,.1); background: rgba(243,241,233,.88); backdrop-filter: blur(18px);
  }
  .mobile-header .brand { gap: 9px; }
  .mobile-header .brand-mark { width: 38px; height: 38px; border-radius: 13px; color: #f7f4e9; background: #405b45; box-shadow: 0 7px 18px rgba(64,91,69,.18); }
  .mobile-header .brand strong { color: #26352a; font-size: 15px; }
  .mobile-header .brand small { color: #7d887f; font-size: 10px; }
  .mobile-header .connection-state { width: auto; padding: 7px 10px; border-color: #cbd8c8; color: #466149; background: #edf3ea; font-size: 9.5px; }
  .view { padding: 0; }
  .mobile-command-hero { display: block; margin: 0 0 18px; padding: 22px 18px 17px; border: 1px solid rgba(62,88,65,.14); border-radius: 26px; color: #f8f5ea; background: linear-gradient(145deg,#405b45 0%,#5e785f 68%,#7d9274 100%); box-shadow: 0 18px 36px rgba(50,76,55,.18); }
  .mobile-command-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: rgba(255,255,255,.68); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
  .mobile-cloud-dot { display: flex; align-items: center; gap: 5px; letter-spacing: 0; }
  .mobile-cloud-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #cfe8b8; box-shadow: 0 0 0 4px rgba(207,232,184,.1); }
  .mobile-command-hero h1 { margin: 20px 0 7px; color: #fff; font-family: ui-serif, "Songti SC", serif; font-size: 31px; letter-spacing: -.04em; }
  .mobile-command-hero > p { margin: 0; color: rgba(255,255,255,.74); font-size: 12.5px; line-height: 1.7; }
  .mobile-command-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 20px; }
  .mobile-command-actions button { display: grid; justify-items: start; gap: 3px; min-width: 0; padding: 12px 9px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 17px; color: #fff; background: rgba(255,255,255,.1); text-align: left; }
  .mobile-command-actions button > span { display: grid; place-items: center; width: 29px; height: 29px; margin-bottom: 5px; border-radius: 10px; color: #405b45; background: #f4efd9; font-size: 15px; }
  .mobile-command-actions strong { overflow: hidden; width: 100%; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-command-actions small { overflow: hidden; width: 100%; color: rgba(255,255,255,.58); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
  #view-capture > .view-topbar { display: none; }
  .home-search { min-height: 48px; margin: 0 0 18px; border: 1px solid #dce1d7; border-radius: 17px; background: rgba(255,254,250,.92); box-shadow: 0 8px 22px rgba(54,81,59,.05); }
  .home-search input { font-size: 14px; }
  .library-dashboard { gap: 13px; }
  .library-group { padding: 15px; border: 1px solid #e0e3da; border-radius: 22px; background: rgba(255,254,250,.9); box-shadow: 0 10px 26px rgba(54,81,59,.055); }
  .library-group-heading { margin: 0 2px 11px; color: #6e7c70; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
  .round-add { color: #476049; background: #ebf0e8; }
  .library-row { min-height: 60px; padding: 9px 5px; border-top-color: #e7e8e1; border-radius: 12px; }
  .library-row strong { color: #2b3b2f; font-size: 14px; }
  .library-row small { color: #7c877f; }
  .row-icon { width: 34px; height: 34px; border-radius: 11px; background: #edf2ea; }
  .row-icon.pin { color: #bd5c62; background: #f8eaeb; }
  .row-icon.today { color: #617859; background: #edf2ea; }
  .row-icon.bulb { color: #a77d25; background: #f7f0d9; }
  .inbox-panel { margin-top: 17px; padding: 17px 15px; border-color: #e0e3da; border-radius: 22px; background: rgba(255,254,250,.9); box-shadow: 0 10px 26px rgba(54,81,59,.055); }
  .section-heading { align-items: flex-end; }
  .section-heading .eyebrow { color: #738572; font-size: 8px; letter-spacing: .17em; }
  .section-heading h1, .section-heading h2 { color: #29392d; font-family: ui-serif, "Songti SC", serif; }
  .inbox-list article { border-bottom-color: #e5e7df; }
  .mobile-nav { right: 10px; bottom: calc(9px + env(safe-area-inset-bottom)); left: 10px; min-height: 68px; padding: 7px 6px; border: 1px solid rgba(65,88,68,.15); border-radius: 23px; background: rgba(255,254,250,.96); box-shadow: 0 16px 38px rgba(45,66,49,.17); }
  .mobile-nav .tab { border-radius: 15px; color: #78847a; }
  .mobile-nav .tab span { font-size: 19px; }
  .mobile-nav .tab.active { color: #38513d; background: #e7eee4; }
  .add-fab { display: none; }
  .reading-hero, .business-hero { display: block; padding: 22px 18px; border-radius: 25px; color: #fff; background: linear-gradient(145deg,#4d624f,#78816c); }
  .reading-hero h1, .business-hero h1 { color: #fff; font-family: ui-serif,"Songti SC",serif; font-size: 30px; }
  .reading-hero p, .business-hero p { color: rgba(255,255,255,.72); font-size: 12px; }
  .reading-import-button, .business-hero .outline-button { display: inline-block; margin-top: 16px; border-color: rgba(255,255,255,.28); color: #fff; background: rgba(255,255,255,.12); }
  .reading-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 15px; padding: 4px 6px; }
  .book-cover strong { font-size: 17px; }
  .business-focus { padding: 15px; }
  .business-action-list { grid-template-columns: 1fr; }
  .business-summary { grid-template-columns: repeat(4,1fr); gap: 6px; }
  .business-summary article { padding: 11px 8px; border-radius: 13px; text-align: center; }
  .business-summary strong { font-size: 20px; }
  .business-module-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: visible; gap: 4px; }
  .business-module-tabs button { min-width: 0; padding: 10px 4px; font-size: 10px; white-space: nowrap; }
  .business-hero-actions { margin-top: 17px; }
  .business-hero-actions .primary-button, .business-hero-actions .outline-button { padding: 10px 11px; font-size: 12px; }
  .business-product-card { grid-template-columns: 52px minmax(0,1fr) 62px; gap: 10px; }
  .business-product-cover, .business-product-placeholder { width: 52px; height: 52px; border-radius: 13px; }
  .business-product-card .product-record-button { grid-column: 1/-1; width: 100%; }
  .review-guide .primary-button { width: 100%; }
  .daily-information-head { margin: 0 -2px 14px; padding: 22px 18px; border-radius: 25px; color: #f8f5ea; background: linear-gradient(145deg,#405b45,#71866a); box-shadow: 0 16px 34px rgba(50,76,55,.16); }
  .daily-information-head .eyebrow, .daily-information-head p:last-child { color: rgba(255,255,255,.7); }
  .daily-information-head h1 { color: #fff; font-family: ui-serif, "Songti SC", serif; font-size: 31px; }
  .daily-information-head .outline-button { border-color: rgba(255,255,255,.34); color: #fff; background: rgba(255,255,255,.1); }
  .information-source-strip button { border-color: #d7e0e9; color:#355777; background:#f2f7fb; }
  .information-source-strip button.active { border-color:#91b8dc; background:#e7f2fc; }
  .information-section { margin: 22px 0 28px; }
  .information-section-toggle { padding: 0 2px; }
  .information-section-title > i { color:#355777; background:#e8f1f9; }
  .information-section-title strong { color: #293f55; font-family: ui-serif, "Songti SC", serif; font-size: 20px; }
  .information-card-grid { gap: 11px; }
  .information-card { grid-template-columns: 32px minmax(0,1fr) 18px; padding: 15px 13px; border-color: #dee3da; border-radius: 19px; background: #fffefa; box-shadow: 0 9px 22px rgba(54,81,59,.06); }
  .information-rank { width: 29px; height: 29px; background: #59735b; font-size: 12px; }
  .information-card-title { color: #2c3b30; font-size: 15px; }
  .information-card-description { color: #69766c; }
  .inspiration-topbar { padding: 22px 18px; border-radius: 25px; color: #fff; background: linear-gradient(145deg,#5e4d64,#8b7086); box-shadow: 0 16px 34px rgba(83,59,83,.15); }
  .inspiration-topbar .eyebrow, .inspiration-topbar p { color: rgba(255,255,255,.72); }
  .inspiration-topbar h1 { color: #fff; font-family: ui-serif, "Songti SC", serif; }
  .inspiration-recorder { margin-top: 13px; border-color: #e1d9e1; border-radius: 23px; background: #fffdfa; }
  .memory-card, .library-link-card { border-color: #dee3da; background: #fffefa; box-shadow: 0 9px 23px rgba(54,81,59,.06); }
  .add-sheet { border-radius: 28px 28px 0 0; background: #fffefa; }
  .primary-button { background: #48634b; box-shadow: 0 8px 18px rgba(72,99,75,.18); }
  .floating-player { border-color: #ced9ca; background: rgba(255,254,250,.96); }
  .floating-player-cover { background: #48634b; }
}

/* UX55: 真目录、漫画页与独立课程折叠区 */
.information-maowo-section { margin-top:28px; padding:14px; border:1px solid rgba(71,91,73,.14); border-radius:20px; background:rgba(255,255,255,.5); }
.ebook-chapter-drawer { position:fixed; inset:0; z-index:90; background:rgba(24,34,27,.42); backdrop-filter:blur(5px); }
.ebook-chapter-drawer[hidden] { display:none; }
.ebook-chapter-drawer > div { position:absolute; inset:0 auto 0 0; width:min(86vw,420px); display:grid; grid-template-rows:auto 1fr; background:#fffdf6; box-shadow:18px 0 42px rgba(20,30,22,.24); }
.ebook-chapter-drawer header { display:flex; align-items:center; justify-content:space-between; padding:calc(18px + env(safe-area-inset-top)) 20px 16px; border-bottom:1px solid rgba(65,72,59,.12); }
.ebook-chapter-drawer header button { border:0; color:#48634b; background:transparent; font-weight:800; }
.ebook-chapter-drawer nav { overflow:auto; padding:8px 12px 24px; }
.ebook-chapter-drawer nav button { width:100%; display:grid; grid-template-columns:34px 1fr; gap:10px; align-items:center; padding:14px 8px; border:0; border-bottom:1px solid rgba(65,72,59,.09); color:#273629; background:transparent; text-align:left; }
.ebook-chapter-drawer nav button span { color:#879388; font-size:12px; }
.ebook-chapter-drawer nav button strong { line-height:1.45; }
.book-cloud-backup,.book-download,.book-delete { width:100%; margin-top:7px; padding:9px 7px; border:1px solid rgba(72,99,75,.2); border-radius:10px; color:#48634b; background:rgba(255,255,255,.72); font-weight:750; }
.book-delete { border-color:transparent; color:#8d7770; background:transparent; }
.ebook-comic-page { margin:0; width:100%; height:auto; max-width:100%; max-height:none; overflow:visible; box-sizing:border-box; }
.ebook-comic-page img { display:block; width:100%; height:auto; max-width:100%; max-height:none; object-fit:contain; }

.ebook-reader-diagnostics { display:flex; align-items:center; gap:10px; margin-top:10px; padding-top:10px; border-top:1px solid rgba(65,72,59,.12); }
.ebook-reader-diagnostics button { flex:0 0 auto; padding:8px 11px; border:1px solid rgba(72,99,75,.22); border-radius:10px; color:#405b45; background:rgba(255,255,255,.7); font-weight:800; }
.ebook-reader-diagnostics span { color:#718074; font-size:11px; line-height:1.45; }
.ebook-reader-diagnostics span.is-error { color:#b24f58; }

.reflection-chat-log { min-height:240px; max-height:48vh; margin:0 0 14px; padding:18px; border:1px solid rgba(72,99,75,.14); border-radius:22px; background:rgba(255,255,255,.72); overflow:auto; }
.reflection-chat-log .user-bubble { max-width:88%; margin:10px 0 10px auto; padding:12px 15px; border-radius:18px 18px 4px 18px; color:#fff; background:#4f7257; line-height:1.65; }
.reflection-chat-log .assistant-bubble { max-width:92%; margin:10px auto 10px 0; padding:12px 15px; border-radius:18px 18px 18px 4px; color:#263a2b; background:#edf2e9; line-height:1.65; }
.reflection-suggestions { display:grid; gap:8px; margin:12px 0; padding:12px; border:1px solid #e2d6b9; border-radius:14px; background:#fff9e9; }
.reflection-suggestions button { padding:10px; border:1px solid #c9b98e; border-radius:10px; color:#604f2d; background:#fff; text-align:left; }
.reflection-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:10px; }
@media (max-width:560px) { .reflection-actions { grid-template-columns:1fr; } }

.ebook-page.ebook-mode-scroll { padding-top:24px; scroll-behavior:smooth; }
.ebook-scroll-sheet { max-width:720px; margin:0 auto 28px; min-height:auto; }
.ebook-scroll-sheet + .ebook-scroll-sheet { padding-top:24px; border-top:1px solid rgba(65,83,66,.15); }
.ebook-scroll-sheet h2 { margin:0 0 1.2em; font-size:1.18em; color:#526b55; }
.ebook-text-sheet { min-height:100%; }
@media (max-width:640px) {
  .ebook-page.ebook-mode-comic-page { overflow:hidden; padding:clamp(18px,4dvh,32px) clamp(16px,5vw,28px) clamp(66px,10dvh,92px); }
  .ebook-page.ebook-mode-scroll { padding:clamp(18px,4dvh,28px) clamp(16px,5vw,28px) clamp(70px,11dvh,96px); }
}
@media (min-width:900px) {
  .ebook-reader-header, .ebook-footer { padding-inline:max(22px,calc((100vw - 1080px)/2)); }
  .ebook-page { padding-inline:max(48px,calc((100vw - 860px)/2)); }
}

/* Phase 1 / R2.4: unified mist-blue shell, responsive navigation and system states */
:root {
  --bg:#f5f7fa;
  --surface:#ffffff;
  --surface-subtle:#eef3f8;
  --text:#162033;
  --text-2:#5e6b7e;
  --text-3:#8b96a8;
  --line:#dfe5ec;
  --primary:#2f6bff;
  --primary-soft:#eaf0ff;
  --accent:#7d6bff;
  --success:#1d9b78;
  --warning:#d8891c;
  --danger:#d84d5f;
  --shadow:0 10px 28px rgba(33,52,79,.08);
  --canvas:var(--bg);
  --paper:var(--surface);
  --ink:var(--text);
  --muted:var(--text-2);
  --blue:var(--primary);
  --blue-soft:var(--primary-soft);
  --border:var(--line);
}

html { background:var(--bg); color:var(--text); }
body {
  min-width:0;
  color:var(--text);
  background:
    radial-gradient(circle at 8% 4%,rgba(102,176,255,.13),transparent 30rem),
    linear-gradient(180deg,#f9fbfd 0,var(--bg) 48%,#f2f6fa 100%);
}
button,input,textarea,select { font:inherit; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline:3px solid rgba(47,107,255,.28);
  outline-offset:2px;
}
.app-shell { background:transparent; }
.sidebar,.insight-rail .rail-card,.mobile-header,.memory-card,.library-link-card,.inbox-panel,.dashboard-list,.dashboard-recent,.dashboard-stats article {
  border-color:var(--line);
  background:rgba(255,255,255,.94);
  box-shadow:var(--shadow);
}
.sidebar { color:var(--text); }
.brand-mark { color:#fff; background:linear-gradient(145deg,var(--primary),var(--accent)); box-shadow:0 8px 18px rgba(47,107,255,.2); }
.brand strong,.desktop-nav button,.mobile-nav button,.section-heading h1,.view-topbar h1 { color:var(--text); }
.brand small,.side-caption,.muted { color:var(--text-2); }
.desktop-nav button.active { color:var(--primary); background:var(--primary-soft); }
.desktop-nav button:hover { background:#f3f6fa; }
.future-module { border-color:#d8e2ef; color:var(--text-2); background:#f7f9fc; }
.connection-state,.shell-status-button {
  border:1px solid #d9e4f2;
  color:#39516e;
  background:#f6f9fd;
}
.shell-status-button {
  min-height:38px;
  padding:8px 12px;
  border-radius:12px;
  font-weight:750;
  cursor:pointer;
}
.mobile-header .shell-status-button { min-height:36px; padding:7px 10px; }

.mobile-command-hero,.daily-information-head,.business-hero,.inspiration-topbar {
  color:var(--text);
  border:1px solid #dce7f5;
  background:
    radial-gradient(circle at 92% 12%,rgba(125,107,255,.12),transparent 13rem),
    linear-gradient(145deg,#f7fbff,#edf4ff 62%,#f5f1ff);
  box-shadow:var(--shadow);
}
.mobile-command-hero h1,.mobile-command-hero strong,.daily-information-head h1,.business-hero h1,.inspiration-topbar h1 { color:var(--text); }
.mobile-command-hero p,.mobile-command-date,.mobile-cloud-dot,.daily-information-head p:last-child,.daily-information-head .eyebrow,.inspiration-topbar .eyebrow,.inspiration-topbar p { color:var(--text-2); }
.mobile-cloud-dot::before { background:var(--success); }
.mobile-command-actions button {
  border:1px solid rgba(47,107,255,.13);
  color:var(--text);
  background:rgba(255,255,255,.78);
  box-shadow:none;
}
.mobile-command-actions button:hover { border-color:#b9ccfa; background:#fff; }
.primary-button,.floating-player-cover {
  color:#fff;
  border-color:var(--primary);
  background:linear-gradient(135deg,var(--primary),#5a82ff);
  box-shadow:0 9px 20px rgba(47,107,255,.2);
}
.outline-button,.text-button { color:var(--primary); }
.daily-information-head .outline-button { color:var(--primary); border-color:#c8d7f4; background:#fff; }
.information-source-strip button.active,.information-section-title > i,.library-folder.active,.library-tag-filter.active {
  color:var(--primary);
  border-color:#cfdbf4;
  background:var(--primary-soft);
}
.information-card,.business-product-card,.business-action-card,.inspiration-recorder {
  border-color:var(--line);
  background:var(--surface);
  box-shadow:var(--shadow);
}
.information-rank { background:linear-gradient(145deg,var(--primary),var(--accent)); }
.information-card-title,.information-section-title strong { color:var(--text); }
.information-card-description { color:var(--text-2); }

.mobile-nav {
  border:1px solid rgba(217,226,238,.96);
  background:rgba(255,255,255,.94);
  box-shadow:0 -10px 28px rgba(33,52,79,.09);
  backdrop-filter:blur(18px);
}
.mobile-nav button { color:var(--text-2); background:transparent; }
.mobile-nav button.active { color:var(--primary); background:var(--primary-soft); }
.add-fab { color:#fff; border-color:#fff; background:linear-gradient(145deg,var(--primary),var(--accent)); box-shadow:0 12px 28px rgba(47,107,255,.25); }

.connectivity-banner {
  position:fixed;
  z-index:180;
  top:max(8px,env(safe-area-inset-top));
  left:50%;
  width:min(calc(100% - 24px),620px);
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid #f0d29f;
  border-radius:14px;
  color:#68470f;
  background:#fff8e8;
  box-shadow:var(--shadow);
}
.connectivity-banner[hidden] { display:none; }
.connectivity-banner button { padding:7px 10px; border:0; border-radius:9px; color:#fff; background:var(--warning); font-weight:800; }

.library-load-more {
  display:block;
  width:min(100%,420px);
  min-height:46px;
  margin:18px auto 8px;
  border:1px solid #cbd8ee;
  border-radius:15px;
  color:var(--primary);
  background:#fff;
  font-weight:850;
}
.library-load-more[hidden] { display:none; }
.library-load-more:disabled { color:var(--text-3); background:#f2f5f8; }
.list-state {
  display:grid;
  justify-items:center;
  gap:8px;
  padding:28px 18px;
  border:1px dashed #cdd8e6;
  border-radius:18px;
  color:var(--text-2);
  background:rgba(255,255,255,.72);
  text-align:center;
}
.list-state strong { color:var(--text); }
.list-state p { max-width:38rem; margin:0; }
.list-state button { padding:9px 13px; border:1px solid #c7d6f2; border-radius:11px; color:var(--primary); background:#fff; font-weight:800; }
.state-spinner {
  width:24px;
  height:24px;
  border:3px solid #dae4f1;
  border-top-color:var(--primary);
  border-radius:50%;
  animation:phase1-spin .75s linear infinite;
}
@keyframes phase1-spin { to { transform:rotate(360deg); } }

.system-sheet { width:min(100%,620px); max-height:min(88dvh,760px); }
.system-version-card { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin:8px 0 14px; }
.system-version-card div { min-width:0; padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--surface-subtle); }
.system-version-card span { display:block; color:var(--text-2); font-size:12px; }
.system-version-card strong { display:block; margin-top:4px; overflow-wrap:anywhere; font-size:13px; }
.system-update-message { margin:0 0 14px; padding:12px; border-radius:12px; color:var(--text-2); background:#f6f8fb; line-height:1.55; }
.system-actions { display:flex; flex-wrap:wrap; gap:9px; }
.system-actions button { min-height:42px; }
.task-center { margin-top:22px; padding-top:18px; border-top:1px solid var(--line); }
.task-center > header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.task-center h2 { margin:2px 0 10px; font-size:19px; }
.task-list { display:grid; gap:8px; }
.task-row { display:grid; grid-template-columns:10px minmax(0,1fr) auto; align-items:start; gap:10px; padding:12px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.task-row p { margin:3px 0 0; color:var(--text-2); font-size:13px; }
.task-row small { color:var(--text-3); }
.task-state-dot { width:9px; height:9px; margin-top:5px; border-radius:50%; background:var(--text-3); }
.task-row[data-status="running"] .task-state-dot { background:var(--primary); }
.task-row[data-status="succeeded"] .task-state-dot { background:var(--success); }
.task-row[data-status="failed"] .task-state-dot { background:var(--danger); }
.task-row[data-status="cancelled"] .task-state-dot { background:var(--text-3); }
.task-row[data-status="pending"] .task-state-dot { background:var(--warning); }

@media (max-width:900px) {
  body { padding-bottom:calc(82px + env(safe-area-inset-bottom)); }
  .workspace-main { width:100%; min-width:0; padding:0 14px 24px; }
  .mobile-header {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto auto;
    gap:7px;
    margin:0 -14px 14px;
    padding:calc(10px + env(safe-area-inset-top)) 14px 10px;
    border-width:0 0 1px;
    border-radius:0;
    box-shadow:0 5px 18px rgba(33,52,79,.05);
  }
  .mobile-header .brand { min-width:0; }
  .mobile-header .brand span:last-child { min-width:0; }
  .mobile-header .brand-mark {
    color:#fff;
    background:linear-gradient(145deg,var(--primary),var(--accent));
    box-shadow:0 7px 18px rgba(47,107,255,.2);
  }
  .mobile-header .brand strong { color:var(--text); }
  .mobile-header .brand strong,.mobile-header .brand small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-header .connection-state {
    max-width:128px;
    overflow:hidden;
    border-color:#cbd9ee;
    color:#2f4b72;
    background:#f3f7ff;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .mobile-command-hero { margin:0 0 14px; padding:20px 17px; border-radius:23px; }
  .mobile-command-hero h1 { font-size:clamp(26px,8vw,36px); }
  .mobile-command-actions { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .mobile-command-actions button { min-width:0; min-height:94px; padding:12px 9px; }
  .section-heading,.view-topbar { gap:10px; }
  .section-heading h1,.view-topbar h1 { font-size:clamp(28px,8vw,38px); }
  .library-folder-strip,.library-tag-strip { padding-bottom:3px; }
  .memory-list { gap:12px; }
  .add-sheet { max-height:min(88dvh,820px); padding-inline:clamp(14px,4vw,22px); }
  .system-version-card { grid-template-columns:1fr; }
}

@media (max-width:360px) {
  .workspace-main { padding-inline:10px; }
  .mobile-header { margin-inline:-10px; padding-inline:10px; }
  .mobile-header .connection-state { display:none; }
  .mobile-header { grid-template-columns:minmax(0,1fr) auto; }
  .mobile-command-actions { grid-template-columns:1fr; }
  .mobile-command-actions button { min-height:70px; grid-template-columns:36px 1fr; text-align:left; }
  .mobile-nav { gap:2px; padding-inline:4px; }
  .mobile-nav button { min-width:0; padding-inline:3px; font-size:10px; }
}

@media (orientation:landscape) and (max-height:520px) {
  .mobile-command-hero { padding-block:14px; }
  .mobile-command-actions button { min-height:66px; }
  .add-sheet,.system-sheet { max-height:94dvh; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}

/* Phase 4 · compact, mobile-first thinking centre */
.thinking-view { padding-bottom:24px; }
.memo-capture-card { display:grid; gap:12px; min-width:0; overflow:hidden; margin-bottom:14px; padding:18px; border:1px solid #dce7f4; border-radius:20px; background:#fff; box-shadow:0 10px 28px rgba(40,75,116,.06); }
.memo-capture-card > label { color:#203754; font-weight:800; }
.memo-capture-card textarea,.memo-capture-card input[type="datetime-local"] { width:100%; border:1px solid #cfdae7; border-radius:13px; padding:12px 13px; color:#203754; background:#f8fafc; font:inherit; }
.memo-capture-card textarea { resize:vertical; line-height:1.65; }
.memo-capture-card .primary-button { min-height:46px; }
.memo-capture-clarification { display:grid; gap:10px; min-width:0; padding:14px; border:1px solid #cfe0f5; border-radius:15px; background:#f6f9ff; }
.memo-capture-clarification[hidden] { display:none; }
.memo-capture-clarification p { margin:0; color:#52677e; line-height:1.6; }
.memo-capture-clarification > small { color:#6b7d92; line-height:1.55; }
.memo-preview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:11px; border:1px solid #dbe6f3; border-radius:13px; background:#fff; }
.memo-preview p { display:grid; gap:3px; min-width:0; padding:0; }
.memo-preview p span,.memo-preview > div > span { color:#7a899b; font-size:11px; font-weight:800; }
.memo-preview p strong { overflow-wrap:anywhere; color:#203754; font-size:13px; }
.memo-preview-summary,.memo-preview > div { grid-column:1 / -1; }
.memo-preview > div ul { margin:6px 0 0; padding-left:20px; color:#425a75; font-size:12px; line-height:1.55; }
.memo-confirm-actions { display:grid; grid-template-columns:auto 1fr; gap:8px; }
.memo-confirm-actions button { min-height:42px; border-radius:11px; }
.memo-intent-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.memo-intent-options button { min-width:0; padding:10px 6px; border:1px solid #c8d8ec; border-radius:12px; background:#fff; color:#29415f; font-weight:750; }
.memo-intent-options button.active { border-color:#3977e8; color:#fff; background:#3977e8; }
.memo-capture-clarification label { display:grid; gap:6px; color:#52677e; font-size:13px; font-weight:750; }
.thinking-chat-panel { border:1px solid #dce5ef; border-radius:18px; background:rgba(255,255,255,.72); }
.thinking-chat-panel > summary { padding:14px 16px; color:#315c89; font-weight:800; cursor:pointer; }
.thinking-chat-panel > .inspiration-mode-row { margin:0 14px 12px; }
.thinking-chat-panel > .thinking-conversation { border-width:1px 0 0; border-radius:0 0 18px 18px; }
@media (max-width:720px) {
  .memo-capture-card { padding:14px; border-radius:16px; }
  .memo-capture-card textarea { min-height:150px; }
  .memo-intent-options { grid-template-columns:1fr; }
  .memo-preview { grid-template-columns:1fr; }
  .memo-preview-summary,.memo-preview > div { grid-column:auto; }
  .thinking-head { padding:17px; }
  .thinking-head .outline-button { display:none; }
}
.thinking-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
  margin-bottom:14px; padding:20px; border:1px solid #dce7f4; border-radius:22px;
  background:linear-gradient(145deg,#f8fbff,#eef6ff);
}
.thinking-head h1 { margin:3px 0 6px; font-size:clamp(27px,5vw,38px); color:#152943; }
.thinking-head p:last-child { margin:0; color:#62758e; line-height:1.55; }
.thinking-view .inspiration-mode-row { max-width:420px; margin:0 0 12px; }
.thinking-view .inspiration-mode.active { border-color:#2376d8; background:#2376d8; }
.thinking-session-strip {
  display:flex; gap:8px; margin:10px 0 0; padding:2px 0 5px; overflow-x:auto;
  scrollbar-width:thin;
}
.thinking-history-panel {
  margin-top:12px; padding:12px 14px; border:1px solid #dce5ef; border-radius:16px;
  background:rgba(255,255,255,.78);
}
.thinking-history-panel summary {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px;
  color:#263d58; cursor:pointer; list-style:none;
}
.thinking-history-panel summary::-webkit-details-marker { display:none; }
.thinking-history-panel summary::after { content:"⌄"; justify-self:end; color:#789; }
.thinking-history-panel[open] summary::after { content:"⌃"; }
.thinking-history-panel summary span { font-weight:850; }
.thinking-history-panel summary small { overflow:hidden; color:#789; text-overflow:ellipsis; white-space:nowrap; }
.thinking-session-chip {
  flex:0 0 auto; display:grid; gap:2px; min-width:130px; max-width:210px; padding:10px 12px;
  border:1px solid #dce5ef; border-radius:14px; color:#273d58; background:#fff; text-align:left;
}
.thinking-session-chip.active { border-color:#77aee9; background:#eef6ff; }
.thinking-session-chip strong,.thinking-session-chip small {
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.thinking-session-chip small { color:#789; font-size:11px; }
.thinking-conversation {
  display:grid; grid-template-rows:auto minmax(220px,1fr) auto auto auto; min-height:470px;
  border:1px solid #dce5ef; border-radius:22px; background:#fff; box-shadow:0 12px 30px rgba(40,75,116,.07);
  overflow:hidden;
}
.thinking-conversation-bar {
  display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:54px;
  padding:10px 14px; border-bottom:1px solid #e5ecf4; background:#fbfdff;
}
.thinking-conversation-bar div { min-width:0; display:grid; }
.thinking-conversation-bar strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#203754; }
.thinking-conversation-bar small { color:#8090a3; }
.thinking-view .reflection-chat-log {
  min-height:260px; max-height:min(52dvh,560px); margin:0; padding:14px;
  border:0; border-radius:0; background:#f8fafc;
}
.thinking-view .reflection-chat-log .assistant-bubble { color:var(--ink-soft); background:var(--blue-soft); }
.thinking-view .reflection-chat-log .user-bubble { background:var(--blue); }
.thinking-citations { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.thinking-citations button {
  padding:4px 8px; border:1px solid #cbdced; border-radius:999px; color:#326da8;
  background:#fff; font-size:11px;
}
.thinking-source-snapshots {
  display:grid; gap:8px; margin-top:10px; padding:11px; border:1px solid #dce6f0;
  border-radius:12px; background:#f8fbfe;
}
.thinking-source-snapshots>div { display:grid; gap:6px; }
.thinking-source-snapshots button {
  width:100%; padding:8px 10px; border:1px solid #d4e0ec; border-radius:9px;
  color:#2d628f; background:#fff; text-align:left;
}
.thinking-source-snapshots button:disabled { color:#78899a; background:#f1f4f7; }
.thinking-suggestion-summary {
  display:block; width:100%; margin:10px 0 0; padding:10px 12px; border:1px solid #f0cf84;
  border-radius:12px; color:#805a12; background:#fff9e8; text-align:left;
}
.thinking-audio-history {
  display:grid; gap:8px; padding:10px 12px; border-top:1px solid #e5ecf4;
  background:#fbfdff;
}
.thinking-audio-history[hidden] { display:none!important; }
.thinking-audio-history-head {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  color:#40536b; font-size:13px;
}
#thinking-audio-list { display:grid; gap:8px; }
.thinking-audio-card {
  display:grid; gap:7px; padding:10px 11px; border:1px solid #dce5ef;
  border-radius:12px; background:#fff;
}
.thinking-audio-card-head {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  color:#52677e; font-size:12px;
}
.thinking-audio-state {
  padding:3px 7px; border-radius:999px; color:#496077; background:#edf3f8;
  font-weight:700;
}
.thinking-audio-card[data-state="ready"] .thinking-audio-state { color:#256141; background:#e8f6ed; }
.thinking-audio-card[data-state="error"] .thinking-audio-state { color:#a02e4a; background:#fff0f4; }
.thinking-audio-card[data-state="transcribing"] .thinking-audio-state { color:#745711; background:#fff6dc; }
.thinking-audio-transcript {
  margin:0; color:#344b65; font-size:13px; line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.thinking-audio-error { margin:0; color:#a02e4a; font-size:12px; }
.thinking-audio-actions { display:flex; flex-wrap:wrap; gap:6px; }
.thinking-audio-actions button {
  min-height:34px; padding:6px 9px; border:1px solid #d6e0ea; border-radius:9px;
  color:#36516f; background:#fff; font-size:12px; font-weight:700;
}
.thinking-audio-actions button.danger { color:#aa2949; border-color:#f0cbd5; }
.thinking-recorder-bar {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:8px;
  padding:10px 12px; border-top:1px solid #f0d8dd; color:#8f2944; background:#fff7f9;
}
.thinking-recorder-bar[hidden] { display:none!important; }
.thinking-recorder-bar[data-state="paused"] { color:#835f16; background:#fff9e9; }
.thinking-rec-dot { width:10px; height:10px; border-radius:50%; background:#e54869; }
.thinking-recorder-bar[data-state="recording"] .thinking-rec-dot { animation:record-pulse 1.2s infinite; }
.thinking-record-actions { grid-column:1/-1; display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.thinking-record-actions button {
  min-height:38px; border:1px solid #d7dee8; border-radius:10px; color:#38506b; background:#fff;
}
.thinking-composer {
  display:grid; grid-template-columns:minmax(0,1fr) 44px 60px; align-items:end; gap:7px;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom)); border-top:1px solid #e5ecf4; background:#fff;
}
.thinking-composer textarea {
  width:100%; min-height:44px; max-height:140px; padding:10px 12px; border:1px solid #cfdbe8;
  border-radius:14px; color:#203754; background:#fff; font:inherit; resize:vertical;
}
.thinking-audio-recovery {
  display:grid; gap:7px; padding:11px 13px; border-top:1px solid #f0d8dd;
  color:#71324a; background:#fff7f9;
}
.thinking-audio-recovery[hidden] { display:none!important; }
.thinking-audio-recovery span { color:#855d6b; font-size:13px; }
.thinking-audio-recovery>div { display:flex; flex-wrap:wrap; gap:7px; }
.thinking-audio-recovery button {
  min-height:36px; padding:7px 11px; border:1px solid #e4c7d0; border-radius:10px;
  color:#8b2d4b; background:#fff; font-weight:700;
}
.thinking-mic-button,.thinking-send-button { min-width:0; min-height:44px; border-radius:13px; }
.thinking-mic-button { border:1px solid #cfdbe8; color:#c62f54; background:#fff; font-size:20px; }
.thinking-mic-button.recording { color:#fff; background:#df4868; }
.thinking-send-button { padding-inline:10px; }
.thinking-conversation>.form-message { margin:0; padding:0 12px 10px; color:#6f8298; background:#fff; }
.thinking-conversation>.form-message[data-tone="error"] { color:#b52f4e; }
.thinking-report-backdrop {
  position:fixed; z-index:1200; inset:0; display:grid; align-items:end; background:rgba(25,39,56,.44);
}
.thinking-report-backdrop[hidden] { display:none!important; }
.thinking-report-sheet {
  display:grid; grid-template-rows:auto minmax(0,1fr) auto; width:min(100%,620px); max-height:92dvh;
  margin:0 auto; border-radius:24px 24px 0 0; background:#fff; box-shadow:0 -16px 50px rgba(20,36,55,.22);
  overflow:hidden;
}
.thinking-report-sheet>header {
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; min-height:58px;
  padding:8px 14px; border-bottom:1px solid #e2e9f1;
}
.thinking-report-sheet>header h2 { grid-column:2; margin:0; text-align:center; font-size:19px; }
.thinking-report-body { display:grid; gap:13px; padding:15px; overflow:auto; }
.thinking-report-field { display:grid; gap:6px; color:#40536b; font-weight:700; }
.thinking-report-field input,.thinking-report-field textarea,
.thinking-suggestion-row input,.thinking-suggestion-row textarea {
  width:100%; padding:10px 11px; border:1px solid #cedae7; border-radius:11px; color:#203754;
  background:#fff; font:inherit; font-weight:400;
}
.thinking-suggestion-editor { display:grid; gap:9px; padding-top:8px; border-top:1px solid #e2e9f1; }
.thinking-suggestion-editor h3,.thinking-suggestion-editor p { margin:0; }
.thinking-suggestion-row {
  display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:9px; padding:11px;
  border:1px solid #e3eaf2; border-radius:14px; background:#f9fbfd;
}
.thinking-suggestion-row>span { display:grid; gap:7px; }
.thinking-report-sheet>footer {
  padding:10px 14px calc(10px + env(safe-area-inset-bottom)); border-top:1px solid #e2e9f1; background:#fff;
}
.thinking-report-sheet>footer button { width:100%; min-height:48px; }

@media (min-width:721px) {
  .thinking-report-backdrop { align-items:center; padding:24px; }
  .thinking-report-sheet { border-radius:24px; }
}
@media (max-width:560px) {
  .thinking-view { padding-bottom:calc(70px + env(safe-area-inset-bottom)); }
  .thinking-head { align-items:stretch; padding:16px; }
  .thinking-head .outline-button { flex:0 0 auto; align-self:flex-start; }
  .thinking-conversation { min-height:calc(100dvh - 290px); }
  .thinking-view .reflection-chat-log { max-height:46dvh; }
}
@media (max-width:360px) {
  .thinking-head { display:grid; }
  .thinking-composer { grid-template-columns:minmax(0,1fr) 42px; }
  .thinking-send-button { grid-column:1/-1; }
}

/* Phase 5 reader owns the final bookshelf breakpoints. This late rule is
   intentional because the legacy mobile skin above still has a two-column
   shelf rule. */
@media (min-width:341px) and (max-width:767px) {
  .reading-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 10px; }
  .book-cover strong { font-size:13px; line-height:1.35; }
}
@media (max-width:340px) {
  .reading-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (min-width:768px) and (max-width:1100px) {
  .reading-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
}

/* Phase 5 reader correctness overrides.  These intentionally live last so the
   older UX55 skin cannot clip a full text chapter or a tall comic page. */
.ebook-page.ebook-mode-scroll {
  overflow-x:hidden;
  overflow-y:auto;
  height:auto;
  scroll-behavior:smooth;
}
.ebook-page.ebook-mode-scroll .ebook-text-sheet {
  height:auto;
  min-height:100%;
  overflow:visible;
}
.ebook-page.ebook-mode-scroll .ebook-comic-chapter,
.ebook-page.ebook-mode-scroll .ebook-comic-page {
  width:100%;
  height:auto;
  max-height:none;
  overflow:visible;
}
.ebook-page.ebook-mode-scroll .ebook-comic-page img {
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  max-height:none;
  object-fit:contain;
}
.ebook-page.ebook-mode-comic-page {
  overflow:hidden;
}
.ebook-page.ebook-mode-comic-page .ebook-comic-page,
.ebook-page.ebook-mode-comic-page .ebook-comic-page img {
  width:100%;
  height:100%;
  max-height:100%;
  object-fit:contain;
}
.ebook-comic-mode-row { display:none; }
.ebook-reader.comic-book .ebook-comic-mode-row { display:flex; }
.ebook-text-mode-row { display:flex; }
.ebook-reader.comic-book .ebook-text-mode-row { display:none; }
.ebook-page.ebook-mode-paged {
  overflow:hidden;
  touch-action:pan-y;
}
.ebook-page.ebook-mode-paged .ebook-text-sheet {
  width:var(--ebook-page-width);
  height:var(--ebook-page-height);
  min-height:0;
  max-height:var(--ebook-page-height);
  column-width:var(--ebook-page-width);
  column-gap:var(--ebook-page-gap);
  column-fill:auto;
  overflow:visible;
  transition:transform .2s ease-out;
  will-change:transform;
}
.ebook-page.ebook-mode-paged .ebook-text-sheet h1 {
  break-after:avoid-column;
}
.ebook-reader.pdf-mode #ebook-settings-toggle,
.ebook-reader.pdf-mode #ebook-settings,
.ebook-reader.pdf-mode #ebook-chapters,
.ebook-reader.pdf-mode #ebook-listen,
.ebook-reader.pdf-mode #ebook-settings-bottom,
.ebook-reader.pdf-mode #ebook-bookmarks-open,
.ebook-reader.pdf-mode #ebook-prev-page,
.ebook-reader.pdf-mode #ebook-next-page,
.ebook-reader.pdf-mode #ebook-bookmark {
  display:none!important;
}
.ebook-annotation-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  padding:8px 0;
  border-bottom:1px solid rgba(65,72,59,.09);
}
.ebook-annotation-row > button {
  border-bottom:0!important;
}
.ebook-annotation-row > div {
  display:flex;
  align-items:center;
  gap:5px;
}
.ebook-annotation-row > div button {
  padding:7px 8px;
  border:1px solid #d9e0e8;
  border-radius:8px;
  color:#4d6075;
  background:#fff;
  font-size:11px;
}
.ebook-annotation-row > div button:last-child { color:#b54555; }
@media (max-width:640px) {
  .ebook-page.ebook-mode-scroll {
    overflow-y:auto;
    padding:clamp(18px,4dvh,28px) clamp(16px,5vw,28px) clamp(70px,11dvh,96px);
  }
  .ebook-page.ebook-mode-scroll .ebook-text-sheet {
    height:auto;
    overflow:visible;
  }
  #ebook-selection-actions.mobile-docked {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
.memo-actions { display:flex; align-items:center; justify-content:flex-end; gap:5px; flex-wrap:wrap; }
.memo-actions > button { padding:6px 8px; border:1px solid #dce5f3; border-radius:8px; color:#35537d; background:#f8fbff; font-size:10px; }
.memo-actions > [data-reminder-delete] { color:#b94152; background:#fff7f8; }
.business-section-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.business-section-toolbar h2 { margin:0; }
.business-section-toolbar p { margin:4px 0 0; color:#6f7a91; font-size:12px; }
.business-config-block { margin-bottom:18px; padding:14px; border:1px solid #e1e7f1; border-radius:15px; background:#f9fbff; }
.business-config-block h3 { margin:0; }
.business-config-block p { margin:4px 0 10px; color:#6f7a91; font-size:12px; }
.business-config-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px solid #e7ebf2; }
.business-config-row > span { display:flex; align-items:center; gap:8px; }
.business-config-row i { display:grid; place-items:center; width:23px; height:23px; border-radius:50%; color:var(--blue); background:var(--blue-soft); font-style:normal; font-size:10px; }
.business-config-row small { color:#7a8498; }
.business-config-row button,.business-inline-form button { padding:7px 9px; border:1px solid #d7e1f1; border-radius:8px; color:#36567f; background:#fff; }
.business-inline-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:7px; margin-top:10px; }
.business-inline-form input { min-width:0; padding:9px 10px; border:1px solid #d7e1f1; border-radius:9px; background:#fff; }
@media (max-width:640px) {
  .memo-item { grid-template-columns:58px minmax(0,1fr); }
  .memo-actions { grid-column:1/-1; }
  .business-section-toolbar { align-items:flex-end; }
  .business-inline-form { grid-template-columns:1fr; }
}
/* ===== ux93 清理：导航分组 / 思考页子切换 / 设置菜单 / 最近收录高亮 ===== */
.nav-group { display: grid; gap: 2px; padding: 9px 0 7px; border-top: 1px solid var(--line); }
.nav-group:first-of-type { border-top: 0; padding-top: 0; }
.nav-group-label { padding: 2px 12px 5px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.desktop-nav .nav-link { display: flex; align-items: center; gap: 10px; min-height: 40px; border: 0; border-radius: 12px; padding: 0 11px; color: var(--ink-soft); background: transparent; text-align: left; font-weight: 800; cursor: pointer; }
.desktop-nav .nav-link span { width: 18px; color: var(--muted); text-align: center; font-size: 16px; }
.desktop-nav .nav-link:hover { color: var(--blue-deep); background: #f2f7fd; }
.thinking-view-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 16px; padding: 4px; border-radius: 14px; background: #eef3ee; }
.thinking-view-switch button { border: 0; border-radius: 11px; padding: 9px 0; color: #6d7a6e; background: transparent; font-weight: 900; cursor: pointer; }
.thinking-view-switch button.active { color: #26352a; background: #fff; box-shadow: 0 2px 8px rgba(38,53,42,.10); }
.thinking-chat-pane .chat-log { margin-bottom: 14px; }
.settings-menu-list { display: grid; gap: 8px; padding: 6px 0 10px; }
.settings-menu-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; color: var(--text); background: #fff; text-align: left; cursor: pointer; }
.settings-menu-list button span { display: grid; gap: 3px; }
.settings-menu-list button strong { font-size: 15px; }
.settings-menu-list button small { color: var(--muted); font-size: 12px; }
.settings-menu-list button i { color: var(--muted); font-style: normal; }
.settings-menu-list button:active { background: #f4f8f4; }
.row-flash { animation: row-flash 1.4s ease; }
@keyframes row-flash { 0% { background: rgba(64,91,69,.16); } 100% { background: transparent; } }

.mobile-nav .smart-entry { color: var(--blue-deep); }
.mobile-nav .smart-entry span { font-size: 19px; }
.desktop-nav .smart-entry { color: var(--blue-deep); }
.desktop-nav .smart-entry span { color: var(--blue-deep); }

/* ============================================================

/* ============================================================
   Phase 9 · Apple 质感（科技公司风）
   浅灰画布 + 白色卡片 + 系统蓝点缀 + SF 风字体 + 细线分隔
   ============================================================ */
:root {
  --ink: #1d1d1f;
  --ink-soft: #3c3c43;
  --muted: #86868b;
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --line: rgba(0, 0, 0, .08);
  --blue: #0071e3;
  --blue-deep: #0058c9;
  --blue-soft: #e8f1fd;
  --navy: #1d1d1f;
  --rose: #ff3b30;
  --rose-soft: #ffe9e7;
  --amber: #c2410c;
  --amber-soft: #fff3e8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .05), 0 18px 44px rgba(0, 0, 0, .10);
  --radius-card: 18px;
  --radius-row: 14px;
  --radius-input: 12px;
  --radius-pill: 999px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro SC",
    "PingFang SC", "MiSans", "HarmonyOS Sans SC", "Microsoft YaHei UI",
    "Microsoft YaHei", system-ui, sans-serif;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--canvas);
}

html {
  background: var(--canvas);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(circle at 100% 0, #eaf2ff 0, rgba(234, 242, 255, 0) 36rem), var(--canvas);
}

h1, h2, h3 {
  color: var(--ink);
  letter-spacing: -.015em;
  text-wrap: balance;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
}

time,
.memo-time strong,
.business-summary strong,
.library-row small,
.today-action-strip strong,
.business-calendar-item time,
.business-due-badge,
.library-link-meta,
.inbox-item time,
.home-stat-card strong {
  font-variant-numeric: tabular-nums;
}

/* 展示标题统一 SF 风无衬线 */
.view-topbar h1,
.reading-hero h1,
.business-hero h1,
.brief-headline h2,
.mobile-command-hero h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -.022em;
}

/* 圆角体系 */
.quick-capture, .receipt-card, .inbox-panel, .brief-card, .chat-log,
.memory-card, .capture-form, .library-group, .today-action-strip button,
.business-calendar-shortcut, .business-calendar-item, .business-node,
.business-product-card, .business-action-card {
  border-radius: var(--radius-card);
}
.library-row, .business-form-more, .add-mode, .desktop-nav .tab,
.mobile-command-actions button, .home-search {
  border-radius: var(--radius-row);
}
input, textarea, select {
  border-radius: var(--radius-input);
}

/* 输入与聚焦 */
input, textarea {
  border: 1px solid rgba(0, 0, 0, .12);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
input::placeholder, textarea::placeholder {
  color: #a1a1a6;
  opacity: 1;
}
input:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, .16);
}
button:focus-visible, input:focus-visible, textarea:focus-visible,
summary:focus-visible, a:focus-visible, select:focus-visible {
  outline: 3px solid rgba(0, 113, 227, .3);
  outline-offset: 2px;
}

/* 交互反馈 */
button, a, .tab, .chip, .library-row, .memory-card, .book-card,
.brief-link, .library-link-card, .inbox-item, .round-add, .soft-action,
.record-button, .primary-button, .outline-button, .text-button {
  transition: background-color .18s ease, border-color .18s ease,
    color .18s ease, box-shadow .18s ease, transform .14s ease, opacity .18s ease;
}
button:active, .tab:active, .chip:active, .round-add:active,
.library-row:active, .memory-card:active, .book-card:active,
.brief-link:active, .library-link-card:active, .inbox-item:active,
.soft-action:active, .record-button:active, .primary-button:active,
.outline-button:active, .text-button:active, .assistant-cta:active {
  transform: scale(.97);
}

@media (hover: hover) and (pointer: fine) {
  .memory-card:hover, .library-link-card:hover, .inbox-item:hover,
  .brief-card:hover, .book-card:hover {
    box-shadow: var(--shadow-lift);
  }
  .primary-button:hover {
    background: var(--blue-deep);
    box-shadow: 0 4px 14px rgba(0, 113, 227, .3);
  }
  .desktop-nav .tab:hover {
    color: var(--blue);
    background: rgba(0, 113, 227, .06);
  }
}

/* 主按钮（iOS 蓝） */
.primary-button {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 2px 8px rgba(0, 113, 227, .25);
}
.primary-button:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}
.primary-button:disabled {
  opacity: .5;
  cursor: wait;
}
.outline-button {
  border-color: rgba(0, 0, 0, .14);
  color: var(--blue);
  background: var(--surface);
}
.outline-button:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}
.text-button {
  color: var(--blue);
}

/* 品牌标记 */
.brand-mark {
  background: linear-gradient(145deg, #2b2b2e, #1d1d1f);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 6px 16px rgba(0, 0, 0, .14);
}

.connection-state {
  border-color: rgba(0, 0, 0, .1);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .7);
}

/* 侧栏：毛玻璃白 */
.sidebar {
  border-color: var(--line);
  background: rgba(255, 255, 255, .76);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.desktop-nav .tab.active {
  color: var(--blue);
  background: rgba(0, 113, 227, .08);
}
.desktop-nav .tab.active span {
  color: var(--blue);
}
.desktop-nav .nav-link:hover {
  color: var(--blue);
  background: rgba(0, 113, 227, .06);
}
.nav-group-label,
.side-caption {
  color: var(--muted);
}

/* 移动端主 hero：白色毛玻璃卡片，蓝点缀 */
.mobile-command-hero {
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f6fd 100%);
  box-shadow: var(--shadow);
}
.mobile-command-top {
  color: var(--muted);
}
.mobile-cloud-dot::before {
  background: #34c759;
  box-shadow: 0 0 0 4px rgba(52, 199, 89, .14);
}
.mobile-command-hero h1 {
  color: var(--ink);
  font-size: 30px;
}
.mobile-command-hero > p {
  color: var(--muted);
}
.mobile-command-actions button {
  border-color: rgba(0, 0, 0, .06);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.mobile-command-actions button > span {
  color: var(--blue);
  background: var(--blue-soft);
}
.assistant-cta {
  border-color: rgba(0, 113, 227, .2);
  color: var(--blue);
  background: var(--blue-soft);
  box-shadow: none;
}
.assistant-cta:hover {
  background: #dcebfd;
}

/* 行动条与资料库小组 */
.today-action-strip button {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.today-action-strip strong {
  color: var(--blue);
}
.library-group {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.library-group-heading {
  color: var(--muted);
}
.round-add {
  color: var(--blue);
}
.round-add:hover {
  color: var(--blue);
  background: var(--blue-soft);
}
.library-row {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}
.library-row:hover {
  border-color: rgba(0, 113, 227, .35);
}
.library-row small {
  color: var(--muted);
}
.library-row i {
  color: #c7c7cc;
}
.row-icon {
  color: var(--blue);
}
.row-icon.pin {
  color: var(--blue);
}
.row-icon.today {
  color: #34c759;
}
.row-icon.bulb {
  color: #ff9f0a;
}
.row-icon.business {
  color: var(--blue);
}
@media (max-width: 720px) {
  .row-icon.pin {
    color: var(--blue);
    background: var(--blue-soft);
  }
  .row-icon.today {
    color: #248a3d;
    background: #e8f8ec;
  }
  .row-icon.bulb {
    color: #b25000;
    background: #fff3e2;
  }
}

/* 卡片面层 */
.quick-capture, .receipt-card, .inbox-panel, .brief-card, .chat-log,
.memory-card, .capture-form {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.receipt-card {
  border-color: rgba(0, 113, 227, .18);
  background: linear-gradient(180deg, #f7fbff, #ffffff);
}
.brief-headline {
  border-color: rgba(0, 113, 227, .16);
  background: linear-gradient(180deg, #f5faff, #ffffff);
}
.inbox-item p {
  color: var(--blue);
}

/* 搜索框 */
.home-search {
  border-color: var(--line);
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.home-search span {
  color: #aeaeb2;
}
.home-search input::placeholder {
  color: #aeaeb2;
}

/* 弹层：iOS 底部 Sheet */
.add-sheet-backdrop {
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.add-sheet {
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, .18);
}
.sheet-handle {
  background: #d1d1d6;
}
.sheet-cancel {
  color: var(--blue);
}
.add-mode {
  border-color: var(--line);
  color: var(--ink-soft);
  background: #f8f8fa;
}
.add-mode.active {
  border-color: rgba(0, 113, 227, .35);
  color: var(--blue);
  background: var(--blue-soft);
}
.add-mode span {
  background: var(--blue);
}
.add-mode .mode-note {
  background: #ff9f0a;
}
.add-mode .mode-voice {
  background: #ff3b30;
}
.add-mode .mode-video {
  background: #5856d6;
}
.add-mode .mode-pdd {
  background: #ff9f0a;
}
.paste-button {
  border-color: rgba(0, 113, 227, .3);
  color: var(--blue);
  background: var(--surface);
}

/* 经营模块：蓝 + 灰 */
#view-business .business-hero {
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff, #f2f6fd);
  box-shadow: var(--shadow);
}
#view-business .business-hero .eyebrow {
  color: var(--blue);
}
#view-business .primary-button {
  background: var(--blue);
}
#view-business .outline-button {
  border-color: rgba(0, 0, 0, .14);
  color: var(--blue);
  background: var(--surface);
}
#view-business .business-summary article {
  border-color: var(--line);
}
#view-business .business-module-tabs {
  background: rgba(0, 0, 0, .05);
}
#view-business .business-module-tabs button.active {
  color: var(--blue);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
#view-business .business-focus {
  border-color: var(--line);
  background: #fafafa;
}
#view-business .business-action-card,
#view-business .business-product-card,
#view-business .business-node,
#view-business .business-calendar-item {
  border-color: var(--line);
}
.business-card-head {
  color: var(--muted);
}
.business-due-badge {
  color: #b25000;
  background: var(--amber-soft);
}
.business-due-badge.danger {
  color: #c81e1e;
  background: var(--rose-soft);
}
.business-progress {
  background: #f2f2f7;
}
.business-progress > i {
  background: var(--blue);
}
.business-card-actions button {
  border-color: var(--line);
  color: var(--ink-soft);
  background: #f8f8fa;
}
.business-card-actions button.danger {
  color: var(--rose);
  background: var(--rose-soft);
}
.business-node > i {
  color: var(--blue);
  background: var(--blue-soft);
}
.business-node.done > i {
  border-color: rgba(0, 113, 227, .3);
  color: var(--blue);
  background: var(--blue-soft);
}
.business-node p {
  color: var(--muted);
}
.business-node > button {
  border-color: var(--line);
  color: var(--blue);
  background: var(--surface);
}
.business-calendar-item time {
  color: var(--blue);
}
.business-calendar-modes {
  background: rgba(0, 0, 0, .05);
}
.business-calendar-modes button.active {
  color: var(--blue);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.business-tags span {
  border-color: rgba(0, 113, 227, .25);
  color: var(--blue);
  background: var(--blue-soft);
}
.business-form-more {
  border-color: var(--line);
  background: #fafafa;
}
.business-form-more summary {
  color: var(--ink-soft);
}
.business-detail-overview {
  border-bottom-color: var(--line);
}
.business-sales-mini p {
  border-bottom-color: rgba(0, 0, 0, .05);
}
.business-calendar-shortcut {
  border-color: var(--line);
  background: var(--surface);
}

/* 空态 / 列表状态 */
.list-state {
  border: 1px dashed rgba(0, 0, 0, .14);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, .6);
}
.list-state strong {
  color: var(--ink-soft);
}
.list-state p {
  color: var(--muted);
}
.list-state button {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

/* 底部导航：iOS Tab Bar */
.mobile-nav {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-top-color: var(--line);
}
.mobile-nav .tab.active {
  color: var(--blue);
}

/* 阅读 */
.book-cover {
  box-shadow: -6px 0 0 #e5e5ea, 0 14px 25px rgba(0, 0, 0, .12);
}
.reading-import-button {
  background: var(--blue);
}

/* 引用 / 备忘 */
.reflection-chat-log .user-bubble {
  background: var(--blue);
}
.reflection-chat-log .assistant-bubble {
  color: var(--ink);
  background: #f2f2f7;
}

/* 集成状态格 */
.integration-status-grid span {
  background: #f2f2f7;
  color: var(--ink-soft);
}

/* 桌面布局 */
@media (min-width: 980px) {
  .app-shell {
    column-gap: 24px;
  }
  .sidebar {
    background: rgba(255, 255, 255, .76);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
}

/* 动效克制 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
/* Phase 9.2 · 豆包内嵌视图 */
#view-doubao {
  display: none;
  flex-direction: column;
  min-height: calc(100dvh - 130px);
}
#view-doubao.active {
  display: flex;
}
.doubao-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}
.doubao-topbar strong {
  font-size: 15px;
  color: var(--ink);
  font-weight: 700;
}
.doubao-frame-wrap {
  flex: 1;
  min-height: 64dvh;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
.doubao-frame-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 64dvh;
  border: 0;
  display: block;
}
@media (max-width: 720px) {
  .doubao-frame-wrap {
    min-height: 70dvh;
  }
}

/* Phase 9.3 · 设置页分组与状态卡片 */
.settings-group {
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
}
.settings-group:first-of-type {
  border-top: 0;
  padding-top: 2px;
}
.settings-group-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
}
.sheet-link-form {
  gap: 10px;
}
.sheet-link-form label {
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.sheet-link-form input {
  min-height: 44px;
  font-size: 14px;
}
.sheet-note {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.bark-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 2px 0 4px;
}
.bark-actions .outline-button {
  min-height: 40px;
}
#bark-setting-state {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.integration-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.integration-status-grid span {
  padding: 11px 10px;
  border-radius: 12px;
  background: #f2f2f7;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}
.integration-status-grid span[data-state="on"] {
  background: #e7f6ec;
  color: #1f7a3d;
}
.integration-status-grid span[data-state="off"] {
  background: #f2f2f7;
  color: #8e8e93;
}
.integration-status-grid span[data-state="warn"] {
  background: #fff3e2;
  color: #b25000;
}
.integration-status-grid span:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}


/* ===== AI 与解析服务：紧凑卡片布局（p9） ===== */
.integration-sheet { width: min(100%, 760px); max-height: min(88dvh, 840px); overflow-y: auto; }
.integration-form { display: grid; gap: 14px; }
.integration-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.integration-card { display: grid; gap: 10px; padding: 14px 14px 16px; border: 1px solid #e3e9f0; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(17, 30, 46, .04); }
.integration-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.integration-card-name { min-width: 0; }
.integration-card-name strong { display: block; font-size: 14px; color: var(--ink); }
.integration-card-name small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.45; }
.integration-pill { flex: none; margin-top: 1px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.integration-pill[data-state="on"] { background: #e5f6ec; color: #178a4e; }
.integration-pill[data-state="off"] { background: #eef2f6; color: #7d8a97; }
.integration-pill[data-state="warn"] { background: #fff2dc; color: #b26a00; }
.integration-pill:not([data-state]) { background: #eef2f6; color: #7d8a97; }
.integration-card label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 12.5px; font-weight: 700; }
.integration-card input { min-height: 42px; border: 1px solid #d9e1e9; border-radius: 12px; padding: 0 12px; color: var(--ink); background: #f5f7f9; font: inherit; }
.integration-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.integration-card-wide { grid-column: 1 / -1; }
.integration-bark-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.integration-bark-row .outline-button { flex: none; }
.integration-bark-note { color: var(--muted); font-size: 12px; font-weight: 600; }
.integration-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.integration-footer .primary-button { flex: none; width: auto; min-width: 180px; margin: 0; }
.integration-footer .quick-status { margin: 0; flex: 1 1 220px; font-size: 12.5px; }
@media (max-width: 640px) {
  .integration-cards { grid-template-columns: 1fr; }
  .integration-footer .primary-button { width: 100%; }
}


/* ===== AI 助手侧滑面板（p10） ===== */
.assistant-backdrop { position: fixed; inset: 0; z-index: 240; display: flex; justify-content: flex-end; background: rgba(17, 30, 46, .28); opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s; }
.assistant-backdrop.open { opacity: 1; visibility: visible; }
.assistant-drawer { display: flex; flex-direction: column; width: min(480px, 100vw); height: 100%; background: #fbfcfe; border-left: 1px solid rgba(17, 30, 46, .08); box-shadow: -14px 0 44px rgba(12, 30, 48, .22); transform: translateX(102%); transition: transform .34s cubic-bezier(.22, .8, .28, 1); }
.assistant-backdrop.open .assistant-drawer { transform: translateX(0); }
.assistant-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; }
.assistant-drawer-title strong { display: block; font-size: 17px; color: var(--ink); }
.assistant-drawer-title small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; }
.assistant-tabs { display: flex; gap: 6px; padding: 2px 18px 12px; }
.assistant-tab { flex: 1; min-height: 38px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); background: #fff; font-weight: 800; cursor: pointer; }
.assistant-tab.active { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 6px 14px rgba(23, 105, 214, .22); }
.assistant-pane { display: none; flex: 1; min-height: 0; flex-direction: column; padding: 0 18px 12px; }
.assistant-pane.active { display: flex; }
.assistant-chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.assistant-chat-hint { margin: auto; max-width: 30em; color: var(--muted); font-size: 13px; line-height: 1.7; text-align: center; }
.assistant-bubble-user, .assistant-bubble-ai { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.assistant-bubble-user { align-self: flex-end; color: #fff; background: var(--blue); border-bottom-right-radius: 6px; }
.assistant-bubble-ai { align-self: flex-start; color: var(--ink); background: #f0f4f9; border-bottom-left-radius: 6px; }
.assistant-chat-form { display: flex; gap: 10px; margin-top: 10px; }
.assistant-chat-form input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid #d9e1e9; border-radius: 12px; padding: 0 12px; color: var(--ink); background: #fff; font: inherit; }
.assistant-chat-form .primary-button { flex: none; }
.doubao-brief { display: grid; gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.doubao-brief-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.doubao-brief-head strong { font-size: 13.5px; color: var(--ink); }
.doubao-brief textarea, .doubao-brief input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink-soft); background: #f6f9fc; font: inherit; font-size: 12.5px; line-height: 1.6; }
.doubao-brief textarea[data-doubao-prompt] { min-height: 96px; resize: vertical; }
.doubao-brief textarea[data-doubao-body] { min-height: 120px; resize: vertical; color: var(--ink); }
.doubao-brief-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.doubao-brief-actions button, .doubao-brief-actions a { flex: 1 1 130px; min-height: 40px; }
.doubao-brief .muted { margin: 0; font-size: 12px; }
.doubao-brief-empty { margin: 0 0 12px; padding: 12px 14px; border: 1px dashed #c6d3e0; border-radius: 14px; color: var(--muted); font-size: 12.5px; line-height: 1.7; background: #fff; }
.doubao-open-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.assistant-pane[data-assistant-pane="doubao"] .doubao-frame-wrap { flex: 1; min-height: 0; }
.assistant-pane[data-assistant-pane="doubao"] .doubao-frame-wrap iframe { min-height: 0; }
.assistant-drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.assistant-drawer-foot a { color: var(--blue); font-weight: 700; text-decoration: none; }
.assistant-cta { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid rgba(0, 113, 227, .2); font: inherit; text-align: left; cursor: pointer; }
@media (max-width: 720px) {
  .assistant-drawer { width: 100vw; }
}

/* 博主日报 */
.blogger-card { background: #fff; border: 1px solid var(--line, #e3e6ea); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.blogger-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.blogger-card-head h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.blogger-meta { margin: 4px 0 0; color: var(--muted, #7a8494); font-size: 12px; }
.blogger-status { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #f2f4f7; color: #667085; white-space: nowrap; }
.blogger-status.good { background: #e7f6ee; color: #1a7f4b; }
.blogger-status.bad { background: #fdecec; color: #c03a2b; }
.blogger-video { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line, #eef0f3); }
.blogger-cover, .blogger-cover-placeholder { width: 86px; height: 116px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: #f2f4f7; display: flex; align-items: center; justify-content: center; color: #9aa4b2; font-size: 18px; }
.blogger-video-body { flex: 1; min-width: 0; }
.blogger-video-body a { color: inherit; text-decoration: none; }
.blogger-video-body a:hover { text-decoration: underline; }
.blogger-summary { margin-top: 8px; padding: 8px 10px; background: #f7f9fb; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.blogger-summary p { margin: 4px 0; }
.blogger-summary ul { margin: 4px 0 0; padding-left: 18px; }
.blogger-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.blogger-tags span { font-size: 11px; background: #eef2f7; color: #4a5a6e; padding: 2px 8px; border-radius: 999px; }
.blogger-video-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.blogger-distill-badge { font-size: 11px; color: #8a6d1a; background: #fdf3dc; padding: 2px 8px; border-radius: 999px; }
.blogger-distill-badge.done { color: #1a7f4b; background: #e7f6ee; }
.blogger-manage-card { margin-top: 18px; border: 1px solid var(--line, #e3e6ea); border-radius: 14px; padding: 14px; background: #fff; }
.blogger-manage-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.blogger-manage-head strong { font-size: 14px; }
.blogger-add-form { display: grid; gap: 8px; margin-bottom: 12px; }
.blogger-add-form input { padding: 8px 10px; border: 1px solid var(--line, #d8dce2); border-radius: 8px; font-size: 14px; min-width: 0; }
.blogger-manage-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line, #eef0f3); }
.blogger-manage-info { flex: 1; min-width: 0; }
.blogger-manage-info strong { display: block; font-size: 14px; }
.blogger-manage-info span { color: var(--muted, #7a8494); font-size: 12px; }
.blogger-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted, #7a8494); white-space: nowrap; }
.text-button.danger { color: #c03a2b; }
.blogger-empty { padding: 8px 2px; font-size: 13px; }

.blogger-agent-badge { font-size: 11px; color: #1a6db5; background: #e8f1fb; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

.assistant-inline-capture { flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.assistant-inline-capture .muted { flex-basis: 100%; }

@media (max-height: 1000px) {
  .sidebar { padding: 14px 14px; }
  .desktop-nav { gap: 2px; }
  .desktop-nav .tab, .desktop-nav .nav-link { min-height: 38px; }
  .nav-group-label { margin: 6px 0 2px; font-size: 10.5px; letter-spacing: .08em; }
}
