/* ============================================================
   收藏夹 · 移动优先
   ============================================================ */

:root {
  /* 蓝白：底色是很浅的天光蓝，卡片纯白，强调色用一支正蓝。
     所有界面颜色都从这里走，改主题不用翻后面的组件。 */
  --bg: #edf3fc;
  --bg-blur: rgba(237, 243, 252, 0.84);
  --surface: #ffffff;
  --surface-2: #f1f6fe;
  --surface-3: #e2ecfb;
  --text: #12203a;
  --muted: #5b6b86;
  --faint: #8b9ab1;
  --line: rgba(20, 56, 112, 0.10);
  --line-strong: rgba(20, 56, 112, 0.18);
  --accent: #1f6fe5;
  --accent-ink: #ffffff;
  --accent-soft: #e2edfe;
  --danger: #c0392f;
  --shadow-sm: 0 1px 2px rgba(23, 58, 112, 0.06);
  --shadow-md: 0 2px 8px rgba(23, 58, 112, 0.08), 0 14px 30px -20px rgba(23, 58, 112, 0.45);
  --shadow-lg: 0 26px 64px -24px rgba(23, 58, 112, 0.45);
  --r-card: 15px;
  --r-sheet: 20px;
  --tab-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* 夜间是同一条蓝色系的深水色，不是纯黑，书签和文字都还带一点蓝 */
    --bg: #070d18;
    --bg-blur: rgba(7, 13, 24, 0.82);
    --surface: #101a2b;
    --surface-2: #162338;
    --surface-3: #1d2d45;
    --text: #e8effa;
    --muted: #98a8c0;
    --faint: #6c7d96;
    --line: rgba(160, 195, 255, 0.10);
    --line-strong: rgba(160, 195, 255, 0.20);
    --accent: #6fa6ff;
    --accent-ink: #06152b;
    --accent-soft: #15294a;
    --danger: #f0908a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 14px 30px -18px rgba(0, 0, 0, 0.9);
    --shadow-lg: 0 26px 70px -24px rgba(0, 0, 0, 0.9);
  }
}

* { box-sizing: border-box; }

/* .overlay/.sheet 用了 display:flex，会盖掉 HTML hidden 自带的 display:none，
   不强制的话所有弹层会同时叠在页面上（这个坑踩过，别再删） */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overscroll-behavior-y: none;
  padding-bottom: calc(var(--tab-h) + var(--safe-b));
  /* 顶部一层很淡的蓝光，让白卡片浮起来；不铺满整屏，滚到下面还是干净的底色 */
  background:
    radial-gradient(1100px 520px at 50% -200px, color-mix(in srgb, var(--accent) 11%, transparent), transparent 72%),
    var(--bg);
  background-repeat: no-repeat;
}

button, input, textarea { font: inherit; color: inherit; }
button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
img { -webkit-user-drag: none; }

::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }

/* ============ 顶栏 ============ */

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 52px;
  padding: 0 12px;
  padding-top: var(--safe-t);
  box-sizing: content-box;
  background: var(--bg-blur);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.appbar.scrolled { border-bottom-color: var(--line); }

.appbar-lead {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden; /* 标题再长也只会被裁，不会顶到右边的按钮上 */
}
.mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}
.mark.big { width: 44px; height: 44px; border-radius: 13px; }

.appbar h1 {
  margin: 0;
  min-width: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-count {
  flex: none;
  font-size: 12.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.appbar-actions { display: flex; align-items: center; gap: 2px; flex: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
@media (hover: hover) {
  .icon-btn:hover { background: var(--surface-2); color: var(--text); }
}
.icon-btn.has-dot { position: relative; }
.icon-btn.has-dot::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--bg);
}

/* ============ 视图/排序 弹出层 ============ */

.pop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: transparent;
}

.popover {
  position: fixed;
  z-index: 40;
  top: calc(var(--safe-t) + 50px);
  right: 10px;
  width: 244px;
  padding: 12px 10px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  animation: popIn 0.15s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.pop-label {
  margin: 0 0 7px;
  padding: 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}
.seg button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 9px 0 7px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg button svg { opacity: 0.9; }
.seg button[aria-checked="true"] {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
  font-weight: 500;
}
.seg button:active { background: var(--surface-3); }

.pop-divider { height: 1px; background: var(--line); margin: 10px 6px; }

.pop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  text-align: left;
}
.pop-row:active { background: var(--surface-2); }
.pop-row .tick { opacity: 0; color: var(--accent); }
.pop-row[aria-checked="true"] .tick { opacity: 1; }

/* ============ 筛选条 ============ */

/* 顶部分类条：来源维度（全部 / 日常 / 浏览器），横向可滑，滚过顶栏后吸住 */
/* 顶栏分类按钮：来源（日常 / 浏览器）的入口，替代原来列表上方的横向 chip 条 */
.src-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  max-width: 104px;
  margin-right: 2px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.src-btn:active { background: var(--surface-3); }
.src-btn.on {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}
.src-btn-ico { flex: none; opacity: 0.9; }
.src-btn-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-btn-chev { flex: none; opacity: 0.6; }

/* 窄屏分级收敛：先把图标按钮收窄、间距压紧，让「浏览器」这种三字分类也放得下；
   再窄去掉分类按钮的图标；最窄才隐藏条数，保证标题不被省略号截掉 */
@media (max-width: 430px) {
  .appbar { padding: 0 10px; gap: 6px; }
  .icon-btn { width: 36px; }
  .src-btn { padding: 0 8px; }
}
@media (max-width: 380px) {
  .src-btn-ico { display: none; }
}
@media (max-width: 360px) {
  .appbar { padding: 0 10px; gap: 8px; }
  .appbar-lead { gap: 6px; }
  .icon-btn { width: 36px; }
  .page-count { display: none; }
}

.src-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1;
  white-space: nowrap;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.src-chip .n {
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.src-chip[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 46%, transparent);
  color: var(--accent);
  font-weight: 600;
}
.src-chip[aria-selected="true"] .n { color: var(--accent); opacity: 0.75; }
/* 分类面板 */
.src-sheet { max-height: 72dvh; }
.src-opts { display: flex; flex-direction: column; gap: 8px; }
.src-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.src-opt .o-ico { flex: none; display: grid; place-items: center; width: 24px; color: var(--muted); }
.src-opt .o-name { flex: 1; min-width: 0; font-weight: 600; letter-spacing: -0.01em; }
.src-opt .o-n { flex: none; font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.src-opt .o-tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.src-opt[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--accent) 46%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
}
.src-opt[aria-selected="true"] .o-ico,
.src-opt[aria-selected="true"] .o-n { color: var(--accent); opacity: 0.8; }
.src-opt[aria-selected="true"] .o-tick { opacity: 1; }

.src-sub-title { margin: 18px 2px 8px; font-size: 12.5px; color: var(--muted); }
.src-sub-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.src-tip { margin: 16px 2px 0; font-size: 11.5px; line-height: 1.6; color: var(--faint); }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 2px 0 12px;
}
.fchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 6px 0 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
}
.fchip button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

/* ============ 页面容器 ============ */

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 14px 28px;
}

.page-hint {
  margin: 4px 2px 14px;
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.6;
}

/* ============ 日期分组 ============ */

.day { margin-bottom: 20px; }
.day-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 9px;
  padding: 0 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.day-head .d-date {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--faint);
}
.day-head .d-n {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* ============ 卡片视图 ============ */

.cards { display: grid; gap: 10px; }

.cards.v-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.v-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 420px) {
  .cards.v-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
}
.cards.v-list { display: flex; flex-direction: column; gap: 8px; }

@media (min-width: 700px) {
  .cards.v-card { grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 14px; }
  .cards.v-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.card:active { transform: scale(0.985); }
@media (hover: hover) {
  .card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
}

/* 封面区：容器定比例，图片和素色底都绝对铺满，网格才齐 */
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.card.hero .card-media { aspect-ratio: 16 / 9; }

.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}
.cover-img.ok { animation: imgIn 0.4s ease both; }
@keyframes imgIn {
  from { opacity: 0.35; transform: scale(1.012); }
  to { opacity: 1; transform: none; }
}

/* 确实没有封面时：素色底 + 域名，不画假封面 */
.ph-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--p, #5f5e5a) 11%, var(--surface-2)),
    var(--surface-2) 64%
  );
}
.ph-host {
  max-width: 78%;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 压在图上的平台+域名小胶囊 */
.media-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 16px);
  padding: 3px 9px 3px 3px;
  border-radius: 999px;
  background: color-mix(in srgb, #0b0d0f 52%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.92);
}
.media-badge .plat {
  background: color-mix(in srgb, var(--p, #7e8a93) 34%, transparent);
  color: #fff;
}
.mb-host {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 11px 11px;
  flex: 1;
  min-width: 0;
}

/* 每天的头一条做通栏大卡，节奏不至于从头到尾一个尺寸 */
.cards.v-card > .card.hero { grid-column: 1 / -1; }
.card.hero .card-body { padding: 12px 14px 14px; }
.card.hero .card-title { font-size: 16.5px; -webkit-line-clamp: 2; }

/* 平台徽标：底色由平台色混合，浅色/深色都成立 */
.plat {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  background: color-mix(in srgb, var(--p, #5f5e5a) 15%, transparent);
  color: var(--p, #5f5e5a);
}
.plat.lg { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }

.domain {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--faint);
}

.card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.card-title.pending { color: var(--faint); font-weight: 400; }

.card-note {
  margin: 0;
  padding-left: 7px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 2px;
  font-size: 11px;
  color: var(--faint);
  min-width: 0;
}
.card-foot .dotsep { opacity: 0.5; }
.card-foot .tag-mini {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
}
.pin-mark {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: blur(6px);
  font-size: 10px;
  color: var(--text);
}

/* ============ 网格视图：纯图片墙，标题压在图底 ============ */

.tile {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  min-width: 0;
}
.tile:active .tile-thumb { transform: scale(0.975); }

.tile-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: transform 0.16s ease;
}
.tile-thumb .cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile-thumb .ph-cover { position: absolute; inset: 0; }
.tile-thumb .ph-host { font-size: 10px; }
.tile-plat {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(11, 13, 15, 0.46);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* 无封面：文字卡，不画假封面，也不留一整块空图框 */
.tile.no-cover .tile-thumb::after { display: none; }
.tile.no-cover .tile-thumb { background: var(--surface); }
.tile.no-cover .tile-plat { background: var(--accent-soft); color: var(--accent); backdrop-filter: none; -webkit-backdrop-filter: none; }
.tile-text {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 46px 12px 14px;
  pointer-events: none;
}
.tile-domain { font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-headline {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
  color: var(--text);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-headline.pending { color: var(--muted); font-weight: 400; }

.tile-plat .tile-ico { width: 18px; height: 18px; }
/* 渐变和文字分开：文字层不背 padding，line-clamp 才截得住 */
.tile-thumb::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.32) 54%, transparent);
  pointer-events: none;
}
.tile-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0 9px 8px;
  font-size: 11.5px;
  line-height: 1.38;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  /* 图上标题只留一行，长标题省略号收尾，压在图底永远不越界 */
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ 列表视图 ============ */

.row-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.row-item:active { background: var(--surface-2); }
@media (hover: hover) {
  .row-item:hover { border-color: var(--line-strong); }
}

.row-media {
  position: relative;
  flex: none;
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.row-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.row-media .ph-cover { width: 100%; height: 100%; }
.row-media .ph-host { display: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-title.pending { color: var(--faint); font-weight: 400; }
.row-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--faint);
  min-width: 0;
}
.row-sub .domain { flex: 0 1 auto; }
.row-note {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-chev { flex: none; color: var(--faint); opacity: 0.55; }

@media (min-width: 1000px) {
  .cards.v-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ============ 标签页 ============ */

.tag-list { display: flex; flex-direction: column; gap: 7px; }
.tag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tag-item:active { background: var(--surface-2); }
.tag-item .hash {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.tag-item .t-name { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-item .t-n { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* 文件夹：整包导入的书签分组，备注可就地编辑 */
.folder-sec { margin-bottom: 22px; }
.folder-sec[hidden] { display: none !important; }
.sec-title { margin: 0 0 4px; font-size: 15px; font-weight: 650; color: var(--text); }
.sec-hint { margin: 0 0 12px; font-size: 12px; line-height: 1.6; color: var(--faint); }
.folder-list { display: flex; flex-direction: column; gap: 9px; }
.folder-item { display: flex; align-items: center; gap: 4px; padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.folder-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 9px 6px; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.folder-open:active { opacity: 0.7; }
.folder-ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.folder-ico svg { width: 21px; height: 21px; }
.folder-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.folder-name { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-note { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-n { padding-right: 2px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.folder-edit { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 9px; background: transparent; color: var(--faint); cursor: pointer; }
.folder-edit:active { background: var(--surface-2); }
.folder-note-input { width: 100%; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface-2); color: var(--text); font-size: 12px; outline: none; }

/* ============ 灵感 ============ */

.idea-composer {
  margin-bottom: 14px;
  padding: 12px 13px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.idea-composer:focus-within {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent), var(--shadow-sm);
}
.idea-composer.editing {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, var(--surface)), var(--surface) 60%);
}

#idea-text {
  display: block;
  width: 100%;
  min-height: 82px;
  max-height: 42vh;
  padding: 2px 1px 4px;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 1.72;
}
#idea-text::placeholder { color: var(--faint); }

.idea-composer-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
#idea-tags {
  flex: 1 1 130px;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
}
#idea-tags:focus { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--surface); }
#idea-tags::placeholder { color: var(--faint); }

.idea-kbd { flex: none; font-size: 11px; color: var(--faint); white-space: nowrap; }
.idea-composer.editing .idea-kbd { color: var(--accent); }
.idea-composer-foot .btn { flex: none; height: 34px; padding: 0 13px; }

.idea-tools { margin-bottom: 4px; }
.idea-search {
  position: static;
  height: 40px;
  margin-bottom: 9px;
}

.idea-tagbar {
  display: flex;
  gap: 7px;
  margin: 0 -14px 4px;
  padding: 1px 14px 3px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.idea-tagbar::-webkit-scrollbar { display: none; }
.idea-tagbar[hidden] { display: none !important; }

.idea-summary {
  margin: 10px 2px 9px;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.6;
}
.idea-summary:empty { display: none; }

.idea-list { display: flex; flex-direction: column; gap: 9px; }

.idea-card {
  position: relative;
  padding: 12px 14px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.idea-card.pinned {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  box-shadow: inset 3px 0 0 0 var(--accent), var(--shadow-sm);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 3.5%, var(--surface)), var(--surface) 55%);
}

.idea-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  margin-bottom: 5px;
}
.idea-time { font-size: 11.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.idea-pin-flag {
  flex: none;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
}

.idea-acts { display: flex; align-items: center; gap: 1px; margin-left: auto; }
.idea-act {
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1;
}
.idea-act[data-idea-pin] { font-size: 14px; color: var(--faint); }
.idea-act.on { color: var(--accent); }
.idea-act:active { background: var(--surface-2); }
.idea-act.danger:active { color: var(--danger); }
@media (hover: hover) {
  .idea-act:hover { background: var(--surface-2); color: var(--text); }
  .idea-act.danger:hover { color: var(--danger); }
}

.idea-body {
  margin: 0;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.76;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.idea-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.idea-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.idea-tag {
  padding: 3px 9px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  line-height: 1.5;
}
button.idea-tag:active { transform: scale(0.96); }

/* 搜索结果里的灵感只读一小段，别把书签挤到看不见 */
.idea-hit-sec { margin-bottom: 18px; }
.idea-hit-sec .idea-card { box-shadow: none; }
.idea-hit-sec .idea-body {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 480px) {
  /* 手机上没有物理键盘，快捷键提示只会挤占标签输入框 */
  .idea-kbd { display: none; }
}
@media (max-width: 360px) {
  .idea-composer-foot .btn { padding: 0 11px; }
}

/* ============ 搜索页 ============ */

.search-field {
  position: sticky;
  top: calc(52px + var(--safe-t));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  margin-bottom: 14px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--faint);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-field:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px; /* 小于 16px 时 iOS 会在聚焦时放大整页 */
}
.search-field input::-webkit-search-cancel-button { display: none; }
.clear {
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 19px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 8px;
}

/* ============ 空态 / 加载 ============ */

.empty { padding: 56px 18px; text-align: center; }
.empty-art {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: var(--surface-2);
  color: var(--faint);
}
.empty-title { margin: 0 0 7px; font-size: 15px; font-weight: 600; }
.empty-sub { margin: 0; font-size: 13px; line-height: 1.75; color: var(--muted); }

.loading-row { display: flex; justify-content: center; gap: 5px; padding: 26px 0; }
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--faint);
  animation: bob 1s infinite ease-in-out;
}
.dot:nth-child(2) { animation-delay: 0.15s; }
.dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes bob {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}
.sentinel { height: 1px; }

/* ============ 底部导航 ============ */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  /* 底部导航用不透明底色：backdrop-filter 在部分移动端/内嵌浏览器会把
     固定层后面采成白底，暗色模式整条会发亮。这里是常驻控件，稳比透更重要。 */
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--tab-h);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}
.tab svg { transition: transform 0.18s ease; }
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"] svg { transform: translateY(-1px); }
.tab:active svg { transform: scale(0.9); }

.tab-add { justify-content: center; }
.add-disc {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-top: -2px;
  border-radius: 15px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform 0.15s ease;
}
.tab-add:active .add-disc { transform: scale(0.93); }

/* 六个入口在 320px 上也得站得下：字和图标各收一点，不换行不滚动 */
@media (max-width: 360px) {
  .tab { gap: 2px; font-size: 9.5px; }
  .tab svg { width: 20px; height: 20px; }
  .add-disc { width: 42px; height: 42px; border-radius: 13px; }
}

/* 桌面端：底部导航收成居中的浮动胶囊 */
@media (min-width: 760px) {
  body { padding-bottom: 104px; }
  .tabbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 18px;
    display: flex;
    width: auto;
    height: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-md);
  }
  .tab {
    flex-direction: row;
    gap: 7px;
    width: auto;
    height: 42px;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
  }
  .tab:hover { color: var(--text); background: var(--surface-2); }
  .tab[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }
  .tab[aria-current="page"] svg { transform: none; }
  .tab-add .add-disc { width: 42px; height: 42px; margin: 0; border-radius: 999px; }
  /* 顶栏内容与列表对齐，宽屏下不再贴到屏幕边缘 */
  .appbar {
    padding-left: max(20px, calc((100vw - 1080px) / 2));
    padding-right: max(20px, calc((100vw - 1080px) / 2));
  }
  .page { padding-left: 20px; padding-right: 20px; }
  .search-field { top: calc(52px + var(--safe-t)); }
}

@media (min-width: 760px) {
  /* 灵感是长文本，宽屏下收一栏，读起来才不累 */
  .idea-composer,
  .idea-tools,
  .idea-summary,
  .idea-list { width: 100%; max-width: 780px; margin-left: auto; margin-right: auto; }
}

/* ============ 弹层 ============ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* 深蓝的遮罩，而不是灰黑：和蓝白底色叠在一起不会发灰 */
  background: rgba(10, 28, 56, 0.44);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade 0.16s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 540px;
  max-height: calc(100dvh - 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--shadow-lg);
  animation: rise 0.24s cubic-bezier(0.2, 0.85, 0.25, 1) both;
  overscroll-behavior: contain;
}
@keyframes rise {
  from { transform: translateY(18px); opacity: 0.7; }
  to { transform: none; opacity: 1; }
}

.sheet-handle {
  flex: none;
  width: 36px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 999px;
  background: var(--line-strong);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 12px 18px 8px;
}
.sheet-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

.close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}

.sheet-body {
  padding: 4px 18px calc(14px + var(--safe-b));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.sheet-foot {
  flex: none;
  padding: 10px 18px calc(16px + var(--safe-b));
  border-top: 1px solid var(--line);
}

@media (min-width: 640px) {
  .overlay { align-items: center; }
  .sheet {
    border-radius: var(--r-sheet);
    border-bottom: 1px solid var(--line);
    max-height: 86vh;
  }
  .sheet-handle { display: none; }
  .sheet-foot { padding-bottom: 16px; }
  .sheet.detail .detail-bar { padding-bottom: 16px; }
}

/* ============ 表单 ============ */

.field { display: block; margin-bottom: 14px; }
.label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.hint { margin-left: 6px; font-size: 11.5px; font-weight: 400; color: var(--faint); }

.field input,
.field textarea,
.login-card input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  outline: 0;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
/* 移动端必须 ≥16px，否则 iOS Safari 聚焦时会把整页放大 */
.field input,
.field textarea,
.login-card input { font-size: 16px; }
@media (min-width: 640px) {
  .field input, .field textarea, .login-card input { font-size: 15px; padding: 9px 11px; }
}
.field input:focus,
.field textarea:focus,
.login-card input:focus {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent);
}
.field textarea { line-height: 1.6; }

.row { display: flex; gap: 8px; margin: -6px 0 14px; }

/* ============ 按钮 ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 600;
}
.btn.ghost { background: var(--surface-2); color: var(--muted); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 28%, transparent); background: transparent; }
.btn.wide { width: 100%; }
.btn.tiny { height: 34px; padding: 0 12px; font-size: 12.5px; background: transparent; border-color: var(--line); color: var(--muted); }
.btn.grow { flex: 1; }
.btn:disabled { opacity: 0.55; }

.list-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  color: var(--text);
  /* button 默认 text-align:center，标题会被副标题撑出来的宽度居中 */
  text-align: left;
}
.list-btn > span:first-child { flex: 1; min-width: 0; }
.list-btn:last-of-type { border-bottom: 0; }
.list-btn svg { color: var(--faint); }
.list-btn:active { background: var(--surface-2); }
a.list-btn { text-decoration: none; }
.list-btn-sub {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.5;
}
.foot-note { margin: 14px 2px 4px; font-size: 11.5px; color: var(--faint); line-height: 1.6; }

/* ============ 筛选选项 ============ */

.opt-list { display: flex; flex-direction: column; gap: 4px; padding-bottom: 6px; }
.opt {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  font-size: 14px;
}
.opt:active { background: var(--surface-2); }
.opt[aria-checked="true"] {
  background: var(--surface-2);
  border-color: var(--line);
  font-weight: 500;
}
.opt .o-name { flex: 1; min-width: 0; }
.opt .o-n { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.opt .tick { color: var(--accent); opacity: 0; }
.opt[aria-checked="true"] .tick { opacity: 1; }

/* ============ 详情 ============ */

.sheet.detail { position: relative; max-height: calc(100dvh - 24px); overflow: hidden; }
.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.detail-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 6px 18px 16px;
}

.d-hero {
  position: relative;
  margin: -6px -18px 14px;
  overflow: hidden;
  background: var(--surface-2);
}
.d-hero { aspect-ratio: 16 / 10; }
.d-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.d-hero .ph-host { font-size: 12px; }

.d-platrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 9px;
}
.d-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.d-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--faint);
}
.d-meta .warn { color: var(--danger); }
.d-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 6px 10px;
  margin-bottom: 14px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  min-width: 0;
}
.d-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.d-excerpt {
  margin: 0 0 16px;
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 200px;
  overflow-y: auto;
}

.detail-bar {
  flex: none;
  padding: 10px 18px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.detail-bar-main { display: flex; gap: 8px; margin-bottom: 8px; }
.detail-bar-sub { display: flex; gap: 8px; }
.detail-bar-sub .btn { flex: 1; }

/* ============ 登录 ============ */

.overlay.login { align-items: center; z-index: 60; }
.login-card {
  width: calc(100% - 36px);
  max-width: 340px;
  padding: 26px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}
.login-brand { display: flex; justify-content: center; margin-bottom: 12px; }
.login-title { margin: 0; font-size: 18px; font-weight: 600; text-align: center; letter-spacing: -0.01em; }
.login-sub { margin: 6px 0 20px; font-size: 12.5px; color: var(--muted); text-align: center; }
.login-card input { margin-bottom: 11px; }
.login-card .btn { margin-top: 3px; }
.login-err { margin: 12px 0 0; font-size: 12.5px; color: var(--danger); text-align: center; }

/* ============ 设置杂项 ============ */

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14px;
}
.kv .label { margin: 0; }
.sub-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.form-err { margin: -4px 0 10px; font-size: 12.5px; color: var(--danger); }
.sheet-divider { height: 1px; margin: 18px 0 4px; background: var(--line); }

/* ============ 提示条 / toast ============ */

.notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 12.5px;
  color: #7a4a12;
  background: #faeeda;
  border-bottom: 1px solid rgba(163, 75, 20, 0.14);
}
.notice button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #a34b14;
  font-weight: 600;
  text-decoration: underline;
}
@media (prefers-color-scheme: dark) {
  .notice { color: #f0c98a; background: #2f2b1c; border-bottom-color: rgba(240, 201, 138, 0.16); }
  .notice button { color: #f0c98a; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
  transform: translateX(-50%);
  z-index: 90;
  max-width: 82vw;
  padding: 10px 17px;
  border-radius: 999px;
  background: rgba(22, 25, 27, 0.94);
  color: #fff;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.6);
  animation: rise 0.2s ease both;
}
@media (prefers-color-scheme: dark) {
  .toast { background: rgba(238, 242, 244, 0.94); color: #16191b; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================================================================
   已下载
   ================================================================== */

#down-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  padding-bottom: 8px;
}

.down-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  min-width: 0;
  cursor: pointer;
}

.down-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.down-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 长图从上往下裁：顶部通常是标题，比截中间那段密文字更容易认 */
  object-position: top center;
  display: block;
  transition: transform 0.25s ease;
}
.down-card:active .down-thumb img { transform: scale(0.985); }

.down-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  color: color-mix(in srgb, var(--p, #7e8a93) 70%, var(--text));
  background: linear-gradient(160deg, color-mix(in srgb, var(--p, #7e8a93) 14%, var(--surface-2)), var(--surface-2) 70%);
}

.down-ph.fail span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--faint);
}

.down-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(12, 14, 16, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.down-mark.vid { font-size: 10px; padding-left: 7px; }
.down-mark.cm { top: auto; bottom: 8px; right: 8px; background: rgba(29, 130, 200, 0.86); }

.down-ph.txt span { font-size: 22px; }
.down-ph.txt em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.down-spin {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 14, 0.42);
  backdrop-filter: blur(1px);
}
.down-spin::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.down-title {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.42;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.down-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: var(--faint);
  min-width: 0;
}
.down-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.down-time { flex: none; }
.down-state {
  color: var(--accent);
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.down-state.bad { color: var(--danger); }

/* ==================================================================
   帖子阅读（X 风格）
   ================================================================== */

.reader {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: readerIn 0.24s cubic-bezier(0.22, 0.7, 0.3, 1) both;
}
@keyframes readerIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}
body.reader-open, body.lb-open { overflow: hidden; }

.reader-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: calc(50px + var(--safe-t));
  padding: var(--safe-t) 10px 0;
  background: var(--bg-blur);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.reader-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.reader-btn {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.reader-btn:active { background: var(--surface-2); }

.reader-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 16px calc(28px + var(--safe-b));
}

.rd {
  max-width: 600px;
  margin: 0 auto;
}

.rd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.rd-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.rd-avatar.ph {
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: color-mix(in srgb, var(--p, #7e8a93) 72%, var(--text));
  background: color-mix(in srgb, var(--p, #7e8a93) 16%, var(--surface-2));
}
.rd-who { min-width: 0; }
.rd-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.rd-verify { color: #1d9bf0; flex: none; }
.rd-handle {
  font-size: 13.5px;
  color: var(--faint);
  line-height: 1.3;
}

.rd-text {
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--text);
  overflow-wrap: anywhere;
  margin-bottom: 14px;
}
.rd-text a { color: var(--accent); text-decoration: none; }

.rd-media {
  margin: 0 0 14px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.rd-media.grid {
  display: grid;
  gap: 2px;
}
.rd-media.grid.two { grid-template-columns: 1fr 1fr; }
.rd-media.grid.four { grid-template-columns: 1fr 1fr; }
.rd-media.grid.one { grid-template-columns: 1fr; }
/* 6 张 / 9 张：小红书那种九宫格 */
.rd-media.grid.six,
.rd-media.grid.nine { grid-template-columns: repeat(3, 1fr); }
.rd-media.grid.six .rd-cell,
.rd-media.grid.nine .rd-cell { aspect-ratio: 1 / 1; }
/* 三张：上面两张并排，第三张横跨底部。
   不用「左大右二」是因为左侧跨行时高度来自右侧，竖图会被拉变形。 */
.rd-media.grid.three { grid-template-columns: 1fr 1fr; }
.rd-media.grid.three .rd-cell { aspect-ratio: 1 / 1; }
.rd-media.grid.three .rd-cell:nth-child(3) {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

.rd-cell {
  display: block;
  padding: 0;
  border: 0;
  background: var(--surface-2);
  cursor: zoom-in;
  overflow: hidden;
}
.rd-media.grid.one .rd-cell { aspect-ratio: auto; }
.rd-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rd-media.grid.two .rd-cell,
.rd-media.grid.four .rd-cell { aspect-ratio: 1 / 1; }
.rd-media.grid.one .rd-cell img {
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  background: #0b0d0f;
}

.rd-video {
  position: relative;
  padding: 0;
  background: #0b0d0f;
}
.rd-video video {
  display: block;
  width: 100%;
  max-height: 78vh;
  background: #0b0d0f;
}

.rd-quote {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.rd-quote-who {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}
.rd-quote-who span { color: var(--faint); font-weight: 500; margin-left: 5px; }
.rd-quote-text { font-size: 14.5px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.rd-quote-text a { color: var(--accent); text-decoration: none; }

.rd-plat {
  margin-left: auto;
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--p, #7e8a93) 74%, var(--text));
  background: color-mix(in srgb, var(--p, #7e8a93) 14%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--p, #7e8a93) 26%, transparent);
}

.rd-title {
  margin: 2px 0 8px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 720;
  letter-spacing: -0.01em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.rd-warn {
  margin: 0 0 12px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  background: color-mix(in srgb, #d9a441 14%, var(--surface));
  border: 1px solid color-mix(in srgb, #d9a441 28%, transparent);
}

.rd-meta {
  font-size: 13.5px;
  color: var(--faint);
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
}

.rd-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0;
  font-size: 13.5px;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
}
.rd-nums b { color: var(--text); font-weight: 650; margin-right: 3px; }

/* 底部操作条：图标 + 数字，和 X 的帖子页一个样子 */
.rd-tools {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--line);
}
.rd-tools button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--faint);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rd-tools button:active { background: var(--surface-2); color: var(--text); }

/* ---------------- 评论区 ---------------- */

.rd-cm { padding-top: 4px; }
.rd-cm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 0 4px;
}
.rd-cm-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.rd-cm-head span { font-size: 12.5px; color: var(--faint); }

.rd-cm-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rd-cm-list:not(.open) > li:nth-child(n + 9) { display: none; }

.rd-c {
  display: flex;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}
.rd-c-ava {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}
.rd-c-ava.ph {
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: color-mix(in srgb, var(--p, #7e8a93) 72%, var(--text));
  background: color-mix(in srgb, var(--p, #7e8a93) 16%, var(--surface-2));
}
.rd-c-main { flex: 1; min-width: 0; }
.rd-c-top {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--faint);
  line-height: 1.3;
}
.rd-c-top b { font-weight: 650; color: var(--text); }
.rd-c-handle,
.rd-c-time { color: var(--faint); font-size: 12.8px; }
.rd-c-pin {
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-2);
}
.rd-c-text {
  margin: 4px 0 6px;
  font-size: 15px;
  line-height: 1.58;
  color: var(--text);
  overflow-wrap: anywhere;
}
.rd-c-text a { color: var(--accent); text-decoration: none; }
.rd-c-foot {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: var(--faint);
}
.rd-c-like { display: inline-flex; align-items: center; gap: 4px; }

.rd-cm-more {
  display: block;
  width: 100%;
  margin: 14px 0 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.rd-cm-more:active { background: var(--surface-2); }
.rd-cm-empty {
  margin: 4px 0 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--faint);
}
.rd-cm-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--faint);
}

.rd-dur {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
}

.rd-empty {
  max-width: 420px;
  margin: 60px auto;
  text-align: center;
}

.rd-loading {
  display: flex;
  gap: 5px;
  justify-content: center;
  padding: 60px 0;
}

/* ==================================================================
   大图查看
   ================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 8, 9, 0.96);
  display: flex;
  align-items: center;
}
.lb-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lb-track::-webkit-scrollbar { display: none; }
.lb-item {
  flex: none;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  display: grid;
  place-items: center;
  padding: 12px;
}
.lb-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.lb-close {
  position: absolute;
  top: calc(10px + var(--safe-t));
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.lb-count {
  position: absolute;
  bottom: calc(18px + var(--safe-b));
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(6px);
}

/* ==================================================================
   设置 · 平台登录（Cookie）
   ================================================================== */

.sub-hint {
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0;
}

.ck-list { display: flex; flex-direction: column; gap: 10px; }

.ck-row {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.ck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ck-name { font-size: 14px; font-weight: 650; color: var(--text); }
.ck-state {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--faint);
  background: var(--surface-2);
}
.ck-state.on { color: #1f7a4d; background: color-mix(in srgb, #1f7a4d 14%, var(--surface-2)); }
@media (prefers-color-scheme: dark) {
  .ck-state.on { color: #6bd3a0; }
}
.ck-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  resize: vertical;
}
.ck-input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.ck-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.ck-hint { flex: 1; min-width: 140px; font-size: 11px; line-height: 1.45; color: var(--faint); }
.ck-loading { font-size: 12.5px; color: var(--faint); padding: 6px 0; }

/* ==================================================================
   卡片流（一条一张，左右滑）
   ================================================================== */

.flow-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 7px 13px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.flow-entry:active { transform: scale(0.97); background: var(--surface-2); }

.pop-sub {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--faint);
  letter-spacing: 0;
}
.pop-row .chev { flex: none; color: var(--faint); }

.flow {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding: calc(var(--safe-t) + 6px) 0 calc(var(--safe-b) + 8px);
}

.flow-bar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 2px;
}
.flow-num {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13.5px;
  font-weight: 650;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.flow-acts { display: flex; align-items: center; gap: 2px; }
.flow-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
}
.flow-btn:active { background: var(--surface-2); }

.flow-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px 22px;
  overflow: hidden;
}

/* 背后两层卡片，做出堆叠的厚度 */
.flow-under {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: -8px;
  height: 50px;
  border-radius: 22px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.flow-under.u2 {
  left: 19px;
  right: 19px;
  bottom: -15px;
  opacity: 0.55;
}

.flow-deck {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100%;
  max-height: 640px;
  will-change: transform, opacity;
}

.flow-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.fc-media {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 9px 9px 0;
  border-radius: 15px;
  overflow: hidden;
  background: var(--surface-2);
}
.fc-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.fc-media img.bad { display: none; }

.fc-blank {
  height: 100%;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 20px;
  background: linear-gradient(158deg, color-mix(in srgb, var(--p) 15%, var(--surface)) 0%, var(--surface-2) 68%);
  color: var(--muted);
}
.fc-blank span { font-size: 14.5px; font-weight: 650; word-break: break-all; text-align: center; }
.fc-blank em { font-style: normal; font-size: 12px; color: var(--faint); }

.fc-plat {
  position: absolute;
  left: 11px;
  top: 11px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.fc-plat .plat-ico { width: 18px; height: 18px; }

.fc-badge {
  position: absolute;
  right: 11px;
  top: 11px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-variant-numeric: tabular-nums;
}

.fc-body {
  flex: none;
  max-height: 54%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 15px 17px 12px;
  background: var(--surface);
}
.fc-title {
  margin: 0 0 7px;
  font-size: 21px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.012em;
  word-break: break-word;
}
.fc-text {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
  font-size: 14.5px;
  line-height: 1.58;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}
.fc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}
.fc-time { font-size: 12.5px; color: var(--faint); }
.fc-more {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: -4px -6px -4px 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
}
.fc-more:active { background: var(--surface-2); color: var(--text); }

.flow-hint {
  flex: none;
  margin: 0;
  padding: 10px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--faint);
  transition: opacity 0.6s ease;
}
.flow-hint.gone { opacity: 0; }

/* ==================================================================
   新增面板 · 粘贴条
   ================================================================== */

.paste-box {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: -2px 0 14px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--surface-2);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.paste-box.ready {
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  background: var(--accent-soft);
}
.paste-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 650;
}
.paste-btn:active { transform: scale(0.97); }
.paste-tip {
  min-width: 0;
  flex: 1;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.paste-box.ready .paste-tip { color: var(--accent); font-weight: 600; }

/* ==================================================================
   多选 / 批量管理
   ================================================================== */

.icon-btn.on { color: var(--accent); background: var(--accent-soft); }

.sel-text {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.sel-text:active { background: var(--surface-2); }
.sel-text.strong { background: var(--accent); color: var(--accent-ink); }
.sel-text.strong:active { opacity: 0.86; }

/* 选择态：底部导航让位给操作条 */
body.picking .tabbar { display: none; }
body.picking .page { padding-bottom: 108px; }

.sel-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--safe-b) + 12px);
  z-index: 40;
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: rise 0.2s cubic-bezier(0.2, 0.85, 0.25, 1) both;
}

.sel-act {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.sel-act:active { background: var(--surface-2); }
.sel-act.danger { color: var(--danger); }

/* 勾选圈：贴在每张卡的右上角 */
body.picking [data-id] {
  position: relative;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
body.picking [data-id]:active { transform: none; }
body.picking [data-id]::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  background: rgba(12, 16, 18, 0.4);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.14s ease, transform 0.14s ease;
}
body.picking [data-id].picked::after {
  content: '✓';
  display: grid;
  place-items: center;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  transform: scale(1.04);
}

body.picking .card.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); }
body.picking .tile.picked .tile-thumb { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
body.picking .row-item.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
body.picking .pin-mark { display: none; }

/* ==================================================================
   设置 · 账号卡与分组
   ================================================================== */

.acct-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin: 4px 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.acct-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.acct-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acct-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-sub { font-size: 11.5px; color: var(--faint); }

.set-group {
  margin-bottom: 14px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.set-group .list-btn { padding: 12px 0; font-size: 13.5px; }
.set-group .list-btn:active { background: var(--surface-2); border-radius: 10px; }
.list-btn.danger { color: var(--danger); }

.set-tail { display: inline-flex; align-items: center; gap: 8px; color: var(--faint); }
.set-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.set-tag.on { color: #1f7a4d; background: color-mix(in srgb, #1f7a4d 14%, var(--surface-2)); }
@media (prefers-color-scheme: dark) {
  .set-tag.on { color: #6bd3a0; }
}

/* 二级页的返回箭头 */
.sheet-head.with-back { justify-content: flex-start; gap: 10px; }
.sheet-head.with-back h2 { flex: 1; }

/* ==================================================================
   v18 · 列表视图 = 时间线（日期大标题 / 头像 / 正文 / 原图宫格）
   ================================================================== */

.cards.v-list { display: flex; flex-direction: column; gap: 0; }
.day-list { margin-bottom: 8px; }
.day-list .day-head {
  align-items: baseline;
  margin: 4px 0 0;
  padding: 6px 2px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.day-list .day-head .d-date {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}
.day-list .day-head .d-n { display: none; }

.tl-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 2px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  border-radius: 0;
  transition: background 0.15s ease;
}
.tl-item:last-child { border-bottom: 0; }
.tl-item:active { background: var(--surface-2); }
@media (hover: hover) {
  .tl-item:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
}
body.picking .tl-item.picked { background: var(--accent-soft); border-radius: 12px; }

.tl-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.tl-av-ico { display: grid; place-items: center; width: 100%; height: 100%; color: var(--p, var(--muted)); }
.tl-av-ico .plat-ico { width: 23px; height: 23px; }
.tl-av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.tl-main { min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 13.5px; line-height: 1.45; }
.tl-author {
  max-width: 52%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}
.tl-handle, .tl-time, .tl-dot { font-size: 12.5px; color: var(--faint); }
.tl-handle { max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-dot { opacity: 0.75; }
.tl-title {
  margin: 5px 0 0;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.tl-text {
  margin: 6px 0 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.tl-text.pending { color: var(--faint); font-weight: 400; }
.tl-hash { color: var(--accent); }
.tl-note {
  margin: 8px 0 0;
  padding-left: 8px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 48%, transparent);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.tl-media { display: grid; gap: 6px; margin-top: 11px; }
.tl-media.g1 { grid-template-columns: minmax(0, 72%); }
.tl-media.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tl-media.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tl-shot {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.tl-media.g1 .tl-shot { aspect-ratio: 4 / 3; }
.tl-media.g2 .tl-shot { aspect-ratio: 3 / 4; }
.tl-media.g3 .tl-shot { aspect-ratio: 1 / 1; }
.tl-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tl-shot.broken img { display: none; }
.tl-play, .tl-more {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(10, 12, 14, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tl-play { top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; padding-left: 2px; }
.tl-more { right: 6px; bottom: 6px; padding: 3px 7px; }

.tl-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.tl-tag { font-size: 12px; color: var(--accent); }
.tl-dl {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--faint);
}

/* ==================================================================
   v18 · 平台筛选图标网格
   ================================================================== */

.plat-sheet { max-height: 70dvh; }
/* 从卡片流里点开时，面板要压在全屏卡片之上（参考图二就是这层关系） */
#filter-overlay.over-flow { z-index: 95; }
.plat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  padding: 6px 0 2px;
}
.ptile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.ptile:active { transform: scale(0.94); }
.ptile .plat-ico { width: 27px; height: 27px; opacity: 0.92; }
.ptile.on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
}
.ptile.on .plat-ico { color: var(--accent); opacity: 1; }
.ptile.empty { opacity: 0.42; cursor: default; }
.ptile.empty:active { transform: none; }
.pt-n {
  position: absolute;
  right: 5px;
  bottom: 3px;
  font-size: 9.5px;
  line-height: 1;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.ptile.on .pt-n { color: var(--accent); }
.plat-tip { margin: 12px 0 2px; text-align: center; font-size: 11.5px; color: var(--faint); }

.fchip.with-ico { padding-left: 8px; gap: 4px; }
.fchip .fchip-ico { width: 15px; height: 15px; }

/* ---- 快捷指令令牌（设置二级页） ---- */
.tk-intro {
  display: block;
  margin: 0 0 16px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 13px;
  background: var(--accent-soft);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
}
.tk-intro > b { display: block; margin-bottom: 5px; font-size: 13.5px; color: var(--accent); }
.tk-intro p { margin: 0; color: var(--muted); }
.tk-intro p b { color: var(--accent); }

.tk-secret-box {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--accent);
  border-radius: 13px;
  background: var(--surface-2);
}
.tk-secret-h { margin-bottom: 9px; font-size: 12px; font-weight: 650; color: var(--accent); }
.tk-secret-box > code {
  display: block;
  margin-bottom: 10px;
  padding: 11px 10px;
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}
.tk-secret-note { margin: 9px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.tk-secret-note a { color: var(--accent); }

.tk-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 10px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
}
.tk-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.tk-row { padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.tk-row.off { opacity: 0.55; }
.tk-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tk-name { font-size: 13.5px; font-weight: 650; color: var(--text); }
.tk-state { padding: 2px 7px; border-radius: 99px; background: var(--surface-3); color: var(--faint); font-size: 10.5px; }
.tk-state.on { color: var(--accent); background: var(--accent-soft); }
.tk-meta { margin-top: 5px; font-size: 11px; line-height: 1.5; color: var(--faint); }
.tk-meta code { font-size: 11px; color: var(--muted); }
.tk-revoke { margin-top: 9px; color: var(--danger); border-color: var(--line-strong); }

@media (min-width: 1000px) {
  .cards.v-list { display: flex; flex-direction: column; gap: 0; }
  .plat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
