/*
 * aiNote Web —— 自适应手机浏览器。
 *
 * 设计令牌与 android/ui/theme/Theme.kt 逐项对齐（浅灰底 + 墨黑 + 柠檬黄强调），
 * 但去掉了原型里的手机外框，改成真正的移动端全屏布局。
 *
 * 设计原则（PRD 第 3 节）落到这里就是：
 *   主界面只有时间流和搜索框；不做底部 Tab；不要求用户整理。
 */

/*
 * accent 是**墨黑**、accent-soft 是**柠檬黄**，这个搭配不是写反了：
 * 强调色永远以「黄底 + 黑字」的色块出现，黄色自己从不当文字色
 * （#e4f94f 在浅底上对比度只有 1.3:1，当文字必瞎）。
 * 与 android/ui/theme/Theme.kt 的 Tokens 逐项对齐 —— 两端必须是同一个产品。
 */
:root {
  --canvas: #ededed;
  --page: #f9f9f9;
  --input: #f5f5f5;
  --subtle: #d9d9d9;
  --ink: #080808;
  --muted: #626262;
  --line: #d7d7d7;
  --accent: #0d0d0d;
  --accent-soft: #e4f94f;
  --amber: #6b4e00;
  --amber-soft: #f0e7cc;
  --red: #9b342c;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #1a1a1a;
    --page: #0d0d0d;
    --input: #222;
    --subtle: #262626;
    --ink: #f2f2f2;
    --muted: #9a9a9a;
    --line: #2e2e2e;
    --accent: #dff94f;
    --accent-soft: #33370f;
    --amber: #e0b44c;
    --amber-soft: #3b321e;
    --red: #ef857b;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page);
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: transparent; }
a { color: var(--accent); }
/* 发现页的卡片整体是 <a>，要把全局链接样式挡回去，否则卡片内文字全带下划线 */
a.note-card, a.note-card * { color: var(--ink); text-decoration: none; }
a.note-card .chip { color: var(--muted); }
a.note-card .saved-by { color: var(--accent); }
a.note-card .discover-reason { color: var(--muted); }

/* 桌面上收窄成手机宽度居中，避免超宽行长 */
#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  /* 屏幕底色用 page、卡片用 canvas —— 新配色里两者只差一档灰，
     这里再用 canvas 的话卡片会和背景糊成一片。 */
  background: var(--page);
  position: relative;
}

.screen { display: none; min-height: 100dvh; }
.screen.active { display: block; }

/* ---------- 通用件 ---------- */

.primary, .secondary, .danger-btn {
  border-radius: 999px; min-height: 50px; padding: 0 18px; font-weight: 700;
}
.primary { background: var(--ink); color: var(--canvas); }
.secondary { background: var(--subtle); color: var(--ink); border: 1px solid var(--line); }
.danger-btn { background: var(--red); color: #fff; }
.primary:disabled, .secondary:disabled { opacity: .45; }
.wide { width: 100%; }

.text-action { color: var(--accent); font-weight: 650; min-height: 44px; padding: 0 6px; }
.icon-btn { width: 44px; height: 44px; border-radius: 6px; font-size: 17px; color: var(--ink); }

.overline { font-size: 11px; font-weight: 650; color: var(--muted); margin: 0 0 8px; }
.support  { color: var(--muted); font-size: 13px; line-height: 1.6; }
.field-error { color: var(--red); font-size: 12px; min-height: 18px; margin: 6px 0 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---------- 登录 ---------- */

.auth-body { padding: 76px 24px 30px; }
.auth-body h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.04em; margin: 0 0 10px; }
.auth-body label { display: block; font-size: 12px; color: var(--muted); margin: 28px 0 4px; }
.line-field { height: 52px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.line-field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 16px; }
.auth-body .primary { margin-top: 22px; }
.legal { text-align: center; color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 16px; }

/* ---------- 输入（随手记）---------- */

.capture-body { padding: 18px 20px 20px; }
.capture-body h1 { font-size: 24px; letter-spacing: -.04em; margin: 6px 0 14px; }
#capture-input {
  width: 100%; min-height: 180px; resize: none; border: 0;
  border-left: 2px solid var(--line); padding: 2px 0 0 14px;
  background: transparent; font-size: 17px; line-height: 1.6; outline: 0;
}
#capture-input:focus { border-left-color: var(--accent); }
#capture-input::placeholder { color: var(--muted); opacity: .7; }
.capture-tools { display: flex; gap: 8px; margin-top: 18px; }
.capture-tools button {
  flex: 1; min-height: 46px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--canvas); color: var(--muted); font-size: 12px;
}
.capture-tools button.soon { opacity: .45; }
.capture-save {
  position: fixed; right: max(20px, calc(50% - 240px)); bottom: calc(20px + var(--safe-bottom));
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--ink); color: var(--canvas); font-weight: 700; font-size: 13px;
}
.capture-save:disabled { background: var(--line); color: var(--muted); }

/* ---------- 时间流 ---------- */

/* 双列瀑布流，对齐设计稿的 card-grid。
   随手记没有封面，视觉重量天然比视频卡片轻 —— 这正是 PRD 要的效果：
   最高频的随手记不被视频卡片喧宾夺主。 */
.card-grid { padding: 12px 12px calc(96px + var(--safe-bottom)); columns: 2; column-gap: 10px; }
.card-grid .note-card { display: inline-block; width: 100%; break-inside: avoid; vertical-align: top; }

.top-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: color-mix(in srgb, var(--page) 94%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.search-entry {
  flex: 1; height: 42px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--input); color: var(--muted); text-align: left; padding: 0 14px; font-size: 14px;
}

/* 网络状态角标：常驻顶栏，正常时（hidden）不占位。一个圆点 + 短标签，一眼可读。 */
.net-dot {
  display: inline-flex; align-items: center; gap: 5px; height: 28px;
  padding: 0 10px 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); background: var(--canvas); color: var(--muted); white-space: nowrap;
}
.net-dot[hidden] { display: none; }
.net-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
/* 离线：琥珀色警示 */
.net-dot.is-offline { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.net-dot.is-offline i { background: var(--amber); }
/* 在线但有积压：中性 + 圆点呼吸，暗示"在传" */
.net-dot.is-pending i { background: var(--accent); animation: netpulse 1.4s ease-in-out infinite; }
@keyframes netpulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .net-dot.is-pending i { animation: none; } }

.note-card {
  display: block; width: 100%; text-align: left;
  background: var(--canvas); border: 1px solid var(--line); border-radius: 22px;
  padding: 14px; margin-bottom: 10px;
}
.note-card:active { background: var(--subtle); }
.note-card h2 { font-size: 14px; line-height: 1.4; letter-spacing: -.01em; margin: 0 0 8px; }
.note-card p, .note-card li { font-size: 11.5px; line-height: 1.6; color: var(--ink); }
.note-card ul, .note-card ol { padding-left: 15px; margin: 6px 0 0; }
.note-card li + li { margin-top: 4px; }

.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  font-size: 11px; color: var(--muted); background: var(--subtle);
  border-radius: 4px; padding: 3px 7px;
}
.source-chip { font-weight: 650; }

.cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px; margin-bottom: 10px; background: var(--subtle); }

/* 图文轮播：横向滑动 + snap，一屏一张。竖图居多，所以按 3/4 立幅给高度，
   object-fit: contain 保证图上的字不会被裁掉 —— 内容就在那些字里。 */
.gallery {
  /* 不留 gap：页码是按 scrollLeft / clientWidth 算的，有间距会逐张累积误差 */
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  border-radius: 14px; background: var(--subtle); scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img {
  flex: 0 0 100%; width: 100%; aspect-ratio: 3/4; object-fit: contain;
  scroll-snap-align: start;
}
.gallery-count {
  font-size: 11px; color: var(--muted); text-align: center; margin: 6px 0 10px;
  font-variant-numeric: tabular-nums;
}

/* 处理中：要传达「在处理，没丢」的安心感，不能像错误 */
.state-processing { color: var(--accent); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.state-processing i {
  width: 18px; height: 2px; background: var(--accent); border-radius: 2px;
  animation: work 1.5s infinite;
}
@keyframes work { 0%,100%{opacity:.35;transform:scaleX(.6)} 50%{opacity:1;transform:scaleX(1)} }

/* 失败：显得像「暂时没弄成」，而不是「坏了」，且要看出内容没丢 */
.state-failed, .state-auth {
  background: var(--amber-soft); color: var(--amber);
  padding: 8px 10px; border-radius: 6px; font-size: 12px; line-height: 1.5;
}

.fab {
  position: fixed; right: max(18px, calc(50% - 242px)); bottom: calc(18px + var(--safe-bottom));
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: var(--canvas); font-size: 24px;
  box-shadow: 0 8px 22px rgba(30,31,29,.22);
}

/* ---------- 空态 / 加载 ---------- */

.empty, .no-result { padding: 110px 28px 40px; text-align: center; }
.empty h1, .no-result h1 { font-size: 24px; line-height: 1.25; letter-spacing: -.04em; margin: 0 0 10px; }
.empty p, .no-result p { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 0 0 26px; }
.empty-plus {
  display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 22px;
  border: 1px dashed var(--accent); color: var(--accent); border-radius: 50%; font-size: 20px;
}
.skeleton { height: 96px; border-radius: 22px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--subtle), var(--canvas), var(--subtle));
  background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0 } }

.banner { padding: 9px 14px; text-align: center; font-size: 12px; background: var(--amber-soft); color: var(--amber); }
/* 待同步：比"离线"更轻，不报警只提示，用中性灰 */
.banner-sync { background: var(--canvas); color: var(--muted); }
/* 本地未同步的临时笔记：整卡略降透明度，暗示"在路上、还没落地" */
.note-card.is-local { opacity: .72; }
.note-card.is-local .source-tag { color: var(--muted); }

/* ---------- 搜索 ---------- */

.search-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  position: sticky; top: 0; background: var(--canvas); border-bottom: 1px solid var(--line); z-index: 5; }
.search-bar input {
  flex: 1; min-width: 0; height: 42px; border: 0; border-bottom: 1px solid var(--ink);
  background: transparent; outline: 0; font-size: 15px;
}
.result-head { padding: 18px 18px 4px; }
.result-head h1 { font-size: 17px; margin: 0; }
.result-head p { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

/* ---------- 详情 ---------- */

.detail-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between;
  padding: 8px 10px; background: var(--canvas); border-bottom: 1px solid var(--line); }
.detail-body { padding: 16px 20px calc(50px + var(--safe-bottom)); }
.detail-body > h1 { font-size: 26px; line-height: 1.25; letter-spacing: -.04em; margin: 6px 0 18px; }
.detail-section { border-top: 1px solid var(--line); padding: 20px 0 0; margin-top: 20px; }
.detail-section h2 { font-size: 14px; margin: 0 0 12px; color: var(--muted); font-weight: 650; }
/* 标题下的来源 + 收藏日期，一行淡色元信息（每篇都有） */
.detail-meta { font-size: 13px; color: var(--muted); margin: -4px 0 18px; }
.points { list-style: none; padding: 12px 14px; margin: 0; background: var(--canvas); border-radius: 16px; }
.points li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.points li:first-child { border-top: 0; }
.points b { color: var(--accent); font-size: 11px; }
.points li.point-video b { font-size: 14px; }
.points li.point-video span { color: var(--muted); }
.fulltext { font-size: 15px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.fulltext p { margin: 0 0 14px; }
.fulltext p:last-child { margin-bottom: 0; }
.fulltext.clamped { max-height: 260px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }

/* 有序块「快照式」阅读版式（粗版） */
/* Obsidian 阅读视图那样的极简 Markdown 观感：清晰的标题层级、舒适行距与留白 */
.blocks { font-size: 16px; line-height: 1.7; word-break: break-word; color: var(--ink); }
.blocks .blk-h { font-weight: 650; line-height: 1.35; letter-spacing: -.01em; margin: 1.6em 0 .5em; }
.blocks .blk-h:first-child { margin-top: .2em; }
.blocks .blk-h1 { font-size: 1.7em; }
.blocks .blk-h2 { font-size: 1.4em; }
.blocks .blk-h3 { font-size: 1.2em; }
.blocks .blk-h4 { font-size: 1.05em; color: var(--muted); }
.blocks .blk-p { margin: 0 0 1.1em; }
.blocks .blk-img { display: block; max-width: 100%; height: auto; border-radius: 6px; margin: 1.2em 0; }
.blk-ai { font-size: 10px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; margin-left: 8px; vertical-align: middle; white-space: nowrap; }
.blk-video { border: 1px solid var(--line); border-radius: 14px; margin: 16px 0; background: var(--canvas); font-size: 14px; overflow: hidden; }
.blk-video small { color: var(--muted); }
/* 视频封面（任何情况都显示） */
.blk-video-cover { position: relative; }
.blk-video-cover img { display: block; width: 100%; height: auto; }
.blk-video-badge { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.62); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
/* 有逐字稿：可展开 */
.blk-video-ts { padding: 12px 14px; }
.blk-video-ts summary { cursor: pointer; font-weight: 650; color: var(--accent); }
.blk-video-text { margin-top: 10px; line-height: 1.85; color: var(--ink); }
/* 提取不到：原因 + 原文链接 */
.blk-video-fail { padding: 12px 14px; }
.blk-video-fail p { margin: 0 0 8px; color: var(--muted); }
.blk-video-link { font-weight: 650; }

/* 详情页的「全屏阅读」入口 */
.read-entry {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--canvas);
}
.read-entry:active { background: var(--subtle); }
.read-entry p { margin: 0 0 10px; font-size: 14px; line-height: 1.7; color: var(--ink); }
.read-entry-go { font-size: 13px; font-weight: 650; color: var(--accent); }

/* ---- 全屏阅读器：从右侧推入 ---- */
.reader {
  position: fixed; inset: 0; z-index: 60; background: var(--page);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
.reader.open { transform: none; }
@media (prefers-reduced-motion: reduce) { .reader { transition: none; } }
.reader-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 94%, transparent); backdrop-filter: blur(12px);
}
.reader-title { flex: 1; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-searchbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.reader-searchbar input {
  flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--input); padding: 0 14px; font-size: 14px; color: var(--ink);
}
.reader-search-count { font-size: 12px; color: var(--muted); min-width: 46px; text-align: center; }
.reader-body { flex: 1; overflow-y: auto; padding: 18px 18px 90px; -webkit-overflow-scrolling: touch; }
/* 阅读器里像 Obsidian 阅读视图：正文再大一号、舒适阅读宽度居中 */
.reader-body .blocks { font-size: 17px; max-width: 720px; margin: 0 auto; }

/* 关键词命中高亮 + 当前项 */
mark.hit { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
mark.hit.active { background: var(--accent); color: var(--page); }
/* 用户标记的重点 */
.reader-body .hl { background: var(--accent-soft); border-radius: 3px; box-decoration-break: clone; cursor: pointer; }
/* 带评论的高亮：加一条下划虚线区分「只是重点」和「有评论」 */
.reader-body .hl.has-comment { border-bottom: 1.5px dashed var(--accent); }

/* 选中文字浮出的操作菜单 */
.sel-menu {
  position: fixed; z-index: 70; display: flex; gap: 2px;
  background: var(--ink); border-radius: 10px; padding: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
}
.sel-menu[hidden] { display: none; }
.sel-menu button { color: var(--page); background: transparent; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 7px; }
.sel-menu button:active { background: rgba(127, 127, 127, .3); }
.props { display: grid; gap: 10px; margin: 0 0 18px; }
.props div { display: grid; grid-template-columns: 68px 1fr; font-size: 13px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; }

/* ---------- 设置 ---------- */

.setting-row {
  width: 100%; min-height: 56px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  text-align: left; padding: 12px 0; gap: 12px;
}
.setting-row span { display: flex; flex-direction: column; gap: 3px; }
.setting-row small { color: var(--muted); font-size: 11px; }
.setting-row.danger b { color: var(--red); }
.settings-foot { text-align: center; color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 40px; }

/* ---------- 弹层 ---------- */

.sheet-mask { position: fixed; inset: 0; background: rgba(25,25,25,.4); z-index: 20; display: none; }
.sheet-mask.open { display: block; }
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 520px;
  background: var(--canvas); border-radius: 16px 16px 0 0; padding: 10px 20px calc(26px + var(--safe-bottom));
  z-index: 21; max-height: 86dvh; overflow: auto; display: none;
}
.sheet.open { display: block; }
.sheet .handle { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 16px; }
.sheet h2 { font-size: 19px; margin: 0 0 6px; }
.qr-box { text-align: center; padding: 10px 0 4px; }
.qr-box img { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 8px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.tag-list button, .tag-list span {
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 13px;
  background: var(--canvas); display: inline-flex; align-items: center; gap: 6px;
}
.tag-list .selected { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.box-input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: var(--input); outline: 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--canvas); padding: 11px 18px; border-radius: 8px;
  font-size: 14px; z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s;
  max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }


/* ---------- 分类 / 发现 ---------- */

.ai-note { padding: 4px 16px 0; margin: 0; color: var(--muted); font-size: 12px; }

.tab-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tab-row::-webkit-scrollbar { display: none; }
.tab-row button {
  flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; background: var(--canvas); color: var(--ink);
}
.tab-row button.selected { background: var(--ink); color: var(--canvas); border-color: var(--ink); }

.discover-head { padding: 20px 18px 4px; }
.discover-head h1 { font-size: 23px; line-height: 1.3; letter-spacing: -.04em; margin: 0 0 8px; }
.discover-head p { color: var(--muted); font-size: 12px; margin: 0; }

.saved-by {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 4px; padding: 4px 7px; font-size: 11px; margin-top: 8px;
}
.discover-reason { color: var(--muted); font-size: 11px; margin-top: 6px; line-height: 1.5; }

/* ---------- 弹层内的表单件 ---------- */

.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; }
.sheet fieldset { border: 0; padding: 0; margin: 18px 0; }
.sheet legend, .section-label { font-size: 12px; color: var(--muted); margin-bottom: 9px; padding: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.chip-row button, .chip-row span {
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 11px; font-size: 13px;
  background: var(--canvas); display: inline-flex; align-items: center; gap: 6px; color: var(--ink);
}
.chip-row button.selected { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.chip-row .remove { border: 0; padding: 0 0 0 2px; background: none; color: inherit; font-size: 15px; }

.manage-list { margin-top: 6px; }
.manage-list > div {
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--line); padding: 13px 0;
}
.manage-list span { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.manage-list small { color: var(--muted); font-size: 11px; }
.manage-list b { outline: 0; }
.manage-list b[contenteditable="true"] { border-bottom: 1px solid var(--accent); }
.manage-list .del { color: var(--red); font-size: 13px; padding: 6px; }
/* 已分享清单：和管理列表同一套行样式，右侧停止按钮红色 */
.shared-list { margin-top: 6px; }
.shared-item { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 13px 0; }
.shared-item span { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.shared-item b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shared-item small { color: var(--muted); font-size: 11px; }
.shared-item .stop-share { color: var(--red); font-size: 13px; flex: none; }

.group-label { font-size: 12px; color: var(--muted); font-weight: 600; margin: 26px 0 2px; }
.soon-row { opacity: .45; }

.capture-tools button em { display: block; font-style: normal; font-size: 10px; margin-top: 3px; }
.capture-tools button span { display: block; font-size: 15px; color: var(--ink); margin-bottom: 2px; }
.capture-tools button.soon span { color: var(--muted); }

.sheet.destructive label { display: block; font-size: 12px; color: var(--muted); margin: 18px 0 6px; }
.danger-btn:disabled { background: color-mix(in srgb, var(--red) 22%, var(--subtle)); color: var(--muted); }

.share-box { margin-top: 28px; }
.share-opt { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 10px; color: var(--ink); }
.share-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.share-takedown {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.6;
  background: var(--amber-soft); color: var(--amber);
}
.share-live {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: var(--muted); font-size: 12px; line-height: 1.5; margin: 10px 0 0;
}
.share-live .text-action { flex: none; font-size: 12px; min-height: 32px; }

.delete-note {
  display: block; width: 100%; margin-top: 34px; padding: 14px;
  color: var(--red); font-size: 14px; border-top: 1px solid var(--line);
}

/* 卡片高度控制：双列布局下卡片太高会导致一屏放不下几张 */
.card-points li {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-excerpt {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
/*
 * 图文行：40px 圆形识别点 + 标题并排（对齐 android 的 CompactMedia）。
 * 图片刻意压到最小可辨认尺寸并降透明度 —— 它只回答「这是哪条」，
 * 卡片的主角是下面 AI 整理出的要点。
 */
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card-head > h2 { margin: 0; min-width: 0; flex: 1; }
.card-media {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  overflow: hidden; background: var(--subtle);
  display: grid; place-items: center;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.card-media.is-glyph { font-size: 12px; font-weight: 650; color: var(--ink); }

/* 来源标签：浮在右上角，不占卡片高度 */
.note-card { position: relative; }
.source-tag {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 10px; line-height: 1; padding: 4px 6px; border-radius: 4px;
  background: var(--subtle); color: var(--muted); border: 1px solid var(--line);
}
/* 封面下沉成识别点后右上角不再压图，只有顶到标签的那个元素需要让位。
   双列卡片本来就窄，让下面的要点也缩进 46px 太吃字宽。 */
.note-card > .source-tag + * { padding-right: 46px; }

/* 卡片里的要点和标题左对齐：双列卡片本来就窄，项目符号的缩进很吃字宽。
   去掉符号后靠行距区分条目，可读性反而更好。 */
.note-card .card-points {
  list-style: none; padding-left: 0; margin: 8px 0 0;
}
.note-card .card-points li { margin-top: 6px; }
.note-card .card-points li:first-child { margin-top: 0; }
