/* ===== 可看番剧 —— 移动端优先，暗色主题 ===== */
:root {
  --bg: #12141c;
  --panel: #181b26;
  --panel2: #1e222f;
  --panel3: #262b3d;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .12);
  --text: #eceef8;
  --muted: #98a0b6;
  --accent: #7c8cff;
  --accent2: #ff7ea8;
  --ok: #6fd8a5;
  --warn: #ffc06e;
  --danger: #ff6b6b;
  --radius: 18px;
  --radius-sm: 13px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 2px 8px rgba(0, 0, 0, .16);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(1200px 620px at 86% -14%, rgba(124, 140, 255, .1), transparent 62%),
    radial-gradient(940px 560px at -12% 112%, rgba(255, 126, 168, .07), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}
::selection { background: rgba(124, 140, 255, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2f42; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
body.locked { overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ===== 顶栏 / 底部导航 ===== */
.topbar {
  display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 9px 14px;
  position: sticky; top: 0; z-index: 30;
  background: rgba(18, 20, 28, .86);
  backdrop-filter: blur(16px) saturate(1.15);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 140, 255, .34), rgba(255, 126, 168, .2), transparent);
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 16px; white-space: nowrap;
}
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 12px rgba(124, 140, 255, .85);
}
.brand-text {
  background: linear-gradient(90deg, #a7b2ff, #ffa8c8);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.desktop-tabs { display: none; }

.mode-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 13px; white-space: nowrap;
  color: #c6ceff; background: rgba(124, 140, 255, .12);
  border: 1px solid rgba(124, 140, 255, .3);
  transition: background .15s, border-color .15s, transform .06s;
}
.mode-toggle:hover { background: rgba(124, 140, 255, .2); border-color: rgba(124, 140, 255, .52); }
.mode-toggle:active { transform: scale(.96); }
.mode-ico { font-size: 14px; opacity: .75; }

.add-btn {
  border: 0; color: #fff; border-radius: 999px;
  padding: 8px 16px; font-size: 14px; font-weight: 600; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 4px 16px rgba(124, 140, 255, .32);
  transition: transform .06s, box-shadow .15s;
}
.add-btn:hover { box-shadow: 0 6px 22px rgba(124, 140, 255, .45); }
.add-btn:active { transform: scale(.97); }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(18, 20, 28, .94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 7px 0 calc(7px + env(safe-area-inset-bottom));
}
.bottom-nav button {
  background: none; border: 0; color: var(--muted); font-size: 11px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px;
  transition: color .15s;
}
.nav-ico { font-size: 20px; line-height: 1.1; filter: saturate(.9); }
.nav-txt { font-size: 11px; letter-spacing: .02em; }
.bottom-nav button.active { color: var(--accent); }
.bottom-nav button.active .nav-ico { filter: saturate(1.15) drop-shadow(0 0 6px rgba(124, 140, 255, .5)); }

main { padding: 16px 14px calc(88px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) {
  main { max-width: 1680px; margin: 0 auto; padding: 24px 22px 64px; }
  .bottom-nav { display: none; }
  .desktop-tabs { display: flex; gap: 4px; margin-left: 8px; }
  .desktop-tabs button {
    padding: 8px 16px; border-radius: 999px; background: none; border: 1px solid transparent;
    color: var(--muted); font-size: 14px; transition: color .15s, background .15s;
  }
  .desktop-tabs button:hover { color: var(--text); }
  .desktop-tabs button.active {
    background: linear-gradient(135deg, rgba(124, 140, 255, .26), rgba(255, 126, 168, .16));
    border-color: rgba(124, 140, 255, .38); color: var(--text);
  }
}

/* 顶栏内容与主内容区对齐（超宽屏） */
@media (min-width: 1712px) {
  .topbar { padding-inline: calc((100% - 1680px) / 2 + 22px); }
}

/* 大屏加料：字号 / 间距 / 卡片全面放大 */
@media (min-width: 1500px) {
  .topbar .brand { font-size: 18px; }
  .desktop-tabs button { font-size: 15px; padding: 9px 18px; }
  .add-btn { font-size: 15px; padding: 9px 20px; }
  .mode-toggle { font-size: 14px; padding: 8px 14px; }

  .day-head { font-size: 15px; height: 28px; }
  .day-col { padding: 14px; border-radius: 18px; }
  .week-grid { gap: 14px; }
  .day-cards { gap: 10px; min-height: 190px; }

  .card { padding: 13px 14px 13px 16px; border-radius: 15px; }
  .card-title { font-size: 15.5px; }
  .st-badge, .badge { font-size: 12px; }
  .card-acts .mini-btn { font-size: 13px; padding: 7px 14px; border-radius: 10px; }

  .archive-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .flow { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 1280px; margin: 0 auto; }
  .stat-n { font-size: 32px; }
  .stat-card { padding: 22px; }
  .overall-wrap { max-width: 900px; }
}

.view { display: none; }
.view.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } }

/* 悬浮添加按钮（手机端） */
.fab {
  position: fixed; right: 16px; z-index: 35;
  bottom: calc(76px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(124, 140, 255, .45);
  transition: transform .08s;
}
.fab:active { transform: scale(.93); }
@media (min-width: 760px) { .fab { display: none; } }

/* ===== 手机端专属翻新 ===== */
@media (max-width: 759px) {
  .add-btn { display: none; }

  .day-tabs {
    position: sticky; top: 56px; z-index: 20;
    background: rgba(15, 17, 24, .95);
    padding: 10px 0; margin: 0 -14px 10px; padding-left: 14px; padding-right: 14px;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }
  .day-tab { flex: 1 0 auto; min-width: 46px; padding: 9px 6px; border-radius: 14px; }

  .card {
    padding: 10px 11px 10px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--panel2), #1b1e2a);
    box-shadow: var(--shadow-card);
  }
  .card-title { font-size: 14px; white-space: normal; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .card-row { align-items: flex-start; gap: 6px; }
  .st-badge, .badge { margin-top: 1px; }
  .card-acts .mini-btn { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
  .day-cards .card, .flow .card { margin-bottom: 0; }

  .bottom-nav { padding-top: 8px; }
  .bottom-nav button { padding: 5px 0; }
  .nav-ico { font-size: 21px; }
  .nav-txt { font-size: 11.5px; }

  .stat-n { font-size: 30px; }
  .empty { line-height: 2; }
}

/* ===== 整体视图 ===== */
.overall-wrap { max-width: 840px; margin: 0 auto; }
.overall-hero { margin: 8px 2px 26px; }
.overall-hero h2 { font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.overall-hero p { margin-top: 7px; color: var(--muted); font-size: 13px; letter-spacing: .01em; }
.overall-hero b { color: var(--text); font-weight: 600; }

.o-sec { margin-bottom: 30px; }
.o-sec-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; }
.o-sec-head h3 { font-size: 14px; font-weight: 600; color: #aab2c8; letter-spacing: .06em; }
.o-sec-head .count {
  font-size: 11.5px; color: var(--muted); background: var(--panel2);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; font-weight: 500;
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-watching { background: var(--ok); box-shadow: 0 0 9px rgba(111, 216, 165, .55); }
.dot-want { background: var(--accent); box-shadow: 0 0 9px rgba(124, 140, 255, .55); }
.o-list { display: grid; gap: 10px; }

.card-overall { padding: 12px 16px 12px 18px; border-radius: 15px; }
.card-overall .overall-top { display: flex; align-items: center; gap: 14px; }
.card-main { flex: 1; min-width: 0; }
.card-overall .card-title { font-size: 15px; white-space: normal; line-height: 1.45; }
.card-overall .card-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.card-overall .card-acts { margin-top: 0; flex-shrink: 0; }
@media (min-width: 760px) {
  .card-overall .card-title { font-size: 15.5px; }
  .card-overall:hover { transform: translateY(-2px); }
}
@media (max-width: 520px) {
  .card-overall { padding: 12px 12px 12px 15px; }
  .card-overall .overall-top { gap: 10px; }
  .card-overall .card-title { font-size: 14.5px; }
  .card-overall .card-acts { justify-content: flex-end; }
}

.empty-hero {
  text-align: center; padding: 56px 22px 46px;
  border: 1px dashed rgba(255, 255, 255, .085); border-radius: 22px;
  background:
    radial-gradient(460px 220px at 50% -10%, rgba(124, 140, 255, .085), transparent 72%),
    rgba(255, 255, 255, .008);
}
.empty-ico {
  font-size: 42px; line-height: 1; margin-bottom: 16px; opacity: .92;
  filter: drop-shadow(0 6px 18px rgba(124, 140, 255, .3));
}
.empty-title { font-size: 17px; font-weight: 700; margin-bottom: 9px; }
.empty-desc { color: var(--muted); font-size: 13.5px; line-height: 1.95; margin-bottom: 22px; }
@media (max-width: 759px) {
  .empty-hero { padding: 44px 18px 38px; border-radius: 18px; }
  .overall-hero h2 { font-size: 22px; }
}

/* ===== 周视图 ===== */
.week-hero { margin: 4px 2px 16px; }
.week-hero h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.week-hero p { margin-top: 4px; color: var(--muted); font-size: 12.5px; }

.day-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px;
  scrollbar-width: none;
}
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  flex: 0 0 auto; min-width: 46px; padding: 8px 10px; border-radius: 13px;
  background: var(--panel2); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; text-align: center;
  transition: color .15s, border-color .15s, background .15s;
}
.day-tab:hover { color: var(--text); border-color: rgba(124, 140, 255, .35); }
.day-tab.active {
  background: linear-gradient(135deg, var(--accent), #9a7dff);
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(124, 140, 255, .35);
}
.day-tab b { font-weight: 600; }
.day-tab i { font-style: normal; font-size: 10px; opacity: .65; }

.week-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.day-col { display: none; }
.day-col.active { display: block; }
.day-head {
  display: flex; align-items: center; gap: 6px; height: 24px; margin-bottom: 8px;
  font-weight: 700; font-size: 13.5px;
}
.day-head .date { color: var(--muted); font-weight: 500; font-size: 12px; }
.day-head .count {
  margin-left: auto; color: var(--muted); font-size: 11px; line-height: 15px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px;
}
.day-head.weekend { color: #b8a6e8; }
.day-head.today { color: var(--accent2); }
.day-cards { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }

/* 七列只在够宽时启用：760~1299px 仍走"按天切换"，否则每列会被压到 100px 出头 */
@media (min-width: 1300px) {
  .day-tabs { display: none; }
  .week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; align-items: start; }
  .day-col {
    display: block !important; min-width: 0;
    background: rgba(255, 255, 255, .02);
    border: 1px solid var(--line);
    border-radius: 17px;
    padding: 11px;
    transition: border-color .15s, background .15s;
  }
  .day-col:hover { border-color: var(--line-strong); }
  .day-col.today {
    background: linear-gradient(180deg, rgba(124, 140, 255, .1), rgba(124, 140, 255, .015));
    border-color: rgba(124, 140, 255, .32);
  }
  .day-head.today::after {
    content: "今天"; font-size: 10px; font-weight: 600; color: #fff;
    background: var(--accent2); border-radius: 999px; padding: 1px 7px; margin-left: 2px;
  }
  .day-cards { min-height: 130px; }
}
@media (min-width: 760px) {
  .day-cards .empty.small, .flow .empty.small {
    border: 1.5px dashed rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .012);
    color: rgba(148, 156, 178, .55);
  }
}
/* 中等宽度（平板 / 小窗）：按天切换，但把单列收在舒适阅读宽度 */
@media (min-width: 760px) and (max-width: 1299px) {
  .day-tabs { gap: 8px; padding-bottom: 14px; }
  .day-tab { flex: 1 1 0; min-width: 0; padding: 10px 8px; border-radius: 14px; }
  .week-grid { max-width: 780px; }
}

.side-sec { margin-top: 24px; }
.side-sec h3 { font-size: 14.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.side-sec h3 .count {
  font-size: 11.5px; color: var(--muted); background: var(--panel2);
  border-radius: 999px; padding: 1px 8px; font-weight: 500;
}
.flow { display: grid; gap: 8px; }
@media (min-width: 760px) {
  .flow { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

/* ===== 卡片 ===== */
.card {
  position: relative; min-width: 0;  /* 允许在窄列里收缩，标题省略号兜底 */
  background: linear-gradient(180deg, var(--panel2), #1b1e2a);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 13px 11px 16px; cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform .12s ease, border-color .16s, box-shadow .16s, background .16s;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: transparent;
}
.card.stb-want::before     { background: var(--accent); }
.card.stb-watching::before { background: var(--ok); }
.card.stb-hold::before     { background: var(--warn); }
.card.stb-done::before     { background: #a078ff; }
.card:active { transform: scale(.988); }
@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .38);
    border-color: rgba(124, 140, 255, .42);
  }
}
.card-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-title {
  font-weight: 600; font-size: 14.5px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-acts { display: flex; gap: 6px; margin-top: 8px; }
.card-acts:empty { display: none; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.progress-note { font-size: 12.5px; color: var(--warn); margin-top: 6px; }
.thoughts { font-size: 13px; opacity: .88; margin-top: 6px; line-height: 1.55; white-space: pre-wrap; }

.st-badge, .badge {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; flex-shrink: 0;
}
.st-want     { background: rgba(124, 140, 255, .15); color: #9aa6ff; }
.st-watching { background: rgba(111, 216, 165, .15); color: var(--ok); }
.st-hold     { background: rgba(255, 192, 110, .15); color: var(--warn); }
.st-done     { background: rgba(160, 120, 255, .15); color: #c1a1ff; }
.badge.rewatch { background: rgba(255, 126, 168, .15); color: #ff9ec0; }

.day-quick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.day-pick {
  font-size: 12px; padding: 3px 9px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  transition: color .12s, border-color .12s;
}
.day-pick:hover { border-color: var(--accent); color: var(--text); }

.muted { color: var(--muted); font-size: 12px; }
.small-note { font-size: 12px; }

/* ===== 归档 ===== */
#archiveSearch { margin-bottom: 12px; }
.archive-list { display: grid; gap: 10px; }
.history-list { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.6; }

/* ===== 周目编辑器 ===== */
.hist-edit {
  margin-top: 8px; padding: 8px 10px;
  background: rgba(0, 0, 0, .18); border: 1px solid var(--line); border-radius: 10px;
}
.hist-title { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.hist-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 13px; padding: 3px 0;
}
.hist-row.empty { color: var(--muted); }
.hist-del {
  background: none; border: none; color: var(--danger);
  font-size: 13px; padding: 2px 8px; border-radius: 6px;
}
.hist-del:hover { background: rgba(255, 107, 107, .12); }
.hist-add { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.hist-date {
  background: var(--bg); border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 8px; color: var(--text);
  padding: 5px 8px; font-size: 13px; color-scheme: dark;
}
@media (min-width: 760px) {
  .archive-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
.stars-ro { margin-top: 6px; }

/* ===== 星星 ===== */
.stars { display: flex; align-items: center; gap: 2px; }
.star { font-size: 22px; color: #343a4f; line-height: 1; transition: color .12s, transform .12s; }
.star.on { color: #ffb84d; }
.stars .star[data-v] { cursor: pointer; padding: 2px; }
.stars .star[data-v]:hover { transform: scale(1.12); }
.stars-ro .star { font-size: 15px; }

/* ===== 统计 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--panel2), #1a1e2b);
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; text-align: center;
  box-shadow: var(--shadow-card);
}
.stat-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); opacity: .75;
}
.stat-n {
  font-size: 26px; font-weight: 700;
  background: linear-gradient(135deg, #b3bdff, #ffffff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-l { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.stat-sub { color: var(--muted); font-size: 12.5px; margin: 12px 2px 0; }
.export-hint {
  font-size: 12.5px; color: var(--muted); line-height: 1.6;
  max-width: 480px; margin-bottom: 10px;
}

/* ===== 按钮 ===== */
.btn {
  border: 0; border-radius: 12px; padding: 10px 18px; font-size: 14px;
  background: var(--panel2); color: var(--text);
  transition: filter .15s, transform .06s;
}
.btn:active { transform: scale(.98); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 600;
  box-shadow: 0 6px 18px rgba(124, 140, 255, .3);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--panel2); }
.btn.danger-text { background: rgba(255, 107, 107, .1); color: var(--danger); }
.btn.danger { background: var(--danger); color: #fff; font-weight: 600; }
.mini-btn {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .028); border: 1px solid var(--line); color: var(--muted);
  transition: color .12s, border-color .12s, background .12s;
}
.mini-btn.ok { color: var(--ok); border-color: rgba(111, 216, 165, .32); background: rgba(111, 216, 165, .07); }
.mini-btn.go { color: #cfd5ff; border-color: rgba(124, 140, 255, .4); background: rgba(124, 140, 255, .12); }
.mini-btn.danger { color: var(--danger); }
.icon-btn {
  background: none; border: 0; color: var(--muted); font-size: 16px; padding: 4px 8px;
  border-radius: 8px;
}

/* ===== 弹窗（手机底部抽屉 / 桌面居中） ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6, 7, 12, .68); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .16s ease;
}
.modal {
  width: 100%; max-width: 560px; max-height: 90dvh; overflow: auto;
  background: linear-gradient(180deg, #1b1f2c, var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: 20px 20px 0 0;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-pop);
  animation: sheetUp .24s cubic-bezier(.2, .8, .3, 1);
}
@keyframes sheetUp { from { transform: translateY(52px); opacity: .4; } }
@media (min-width: 760px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-radius: 18px; animation: popIn .18s cubic-bezier(.2, .8, .3, 1); }
  .modal.small { max-width: 420px; }
}
@keyframes popIn { from { transform: scale(.96); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { font-size: 16.5px; }
.modal-foot { display: flex; gap: 8px; margin-top: 16px; align-items: center; }

/* ===== 应用内删除确认（替代原生 confirm，APK WebView 不支持 JS 原生对话框） ===== */
#confirmBackdrop { z-index: 60; }
.confirm-modal { padding-top: 20px; }
.confirm-text { font-size: 14.5px; line-height: 1.7; }
.modal-foot .spacer { flex: 1; }

.fld { display: block; margin-bottom: 14px; }
.fld-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
input, textarea {
  width: 100%; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 11px; color: var(--text); padding: 9px 12px; font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 140, 255, .14); }
textarea { resize: vertical; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn {
  padding: 7px 13px; border-radius: 999px; background: var(--panel2);
  border: 1px solid var(--line); color: var(--muted); font-size: 13px;
  transition: color .12s, border-color .12s, background .12s;
}
.seg-btn:hover { color: var(--text); border-color: rgba(124, 140, 255, .35); }
.seg-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent; color: #fff;
}

/* ===== 空状态 / 提示 ===== */
.empty {
  padding: 26px; text-align: center; color: var(--muted); font-size: 13px;
  border: 1px dashed rgba(255, 255, 255, .08); border-radius: var(--radius); line-height: 1.7;
  background: rgba(255, 255, 255, .008);
}
.empty.small { padding: 13px; font-size: 12.5px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(84px + env(safe-area-inset-bottom));
  background: rgba(42, 47, 66, .96); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; box-shadow: 0 8px 26px rgba(0, 0, 0, .4);
  border: 1px solid rgba(124, 140, 255, .28);
  max-width: 86vw; text-align: center;
  animation: toastIn .18s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.toast.err { background: #5b2a35; border-color: rgba(255, 107, 107, .35); }
@media (min-width: 760px) { .toast { bottom: 32px; } }

/* ===== 2026-10-23 改版：整体视图为主 + 「看到哪了」 ===== */
/* 长片单筛选框 */
.o-search {
  margin: 0 2px 12px;
  background: rgba(255, 255, 255, .028);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13.5px;
}
.o-search::placeholder { color: rgba(148, 156, 178, .72); }

/* 在看 / 搁置 卡片上的「看到哪了」一行 */
.prog-row {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%; margin-top: 8px;
  padding: 4px 11px 4px 9px;
  border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .032);
  border: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; line-height: 1.5;
  transition: color .14s, border-color .14s, background .14s, transform .06s;
}
.prog-row:active { transform: scale(.985); }
.prog-row:hover {
  color: var(--text);
  border-color: rgba(255, 192, 110, .45);
  background: rgba(255, 192, 110, .075);
}
.prog-row.has {
  color: #ffd9a8; border-color: rgba(255, 192, 110, .3);
  background: rgba(255, 192, 110, .085);
}
.prog-row.none { border-style: dashed; color: rgba(148, 156, 178, .82); }
.prog-row b {
  color: #ffe7c8; font-weight: 600;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prog-row { white-space: nowrap; overflow: hidden; }
.prog-row.compact { font-size: 11.5px; padding: 3px 9px 3px 7px; margin-top: 7px; gap: 5px; }
.prog-row.compact b { max-width: 76px; }
.prog-row.compact .prog-pen { display: none; }
.prog-ico { font-size: 11.5px; opacity: .9; }
.prog-pen { font-size: 11px; opacity: .62; margin-left: 1px; }

/* 就地修改进度 */
.prog-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.prog-edit .prog-input {
  flex: 1 1 170px; min-width: 0; padding: 7px 11px; font-size: 13px;
  background: rgba(0, 0, 0, .26); border-radius: 10px;
}

/* 卡片收敛光效，让列表更安静 */
@media (hover: hover) {
  .card:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .32); }
}
.card-overall { padding: 13px 16px 13px 18px; }
.card-overall .prog-row { margin-top: 7px; }
@media (max-width: 520px) {
  .card-overall { padding: 12px 13px 12px 15px; }
  .prog-row b { max-width: 128px; }
}

/* ===== 2026-10-24 美术打磨第二轮：深夜氛围 + 入场动效 + 细节抛光 ===== */

/* 1) 深夜看番氛围：星点 + 顶部微光 + 暗角（纯装饰层，不挡交互、不抢内容） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, .5), transparent 100%),
    radial-gradient(1px 1px at 28% 64%, rgba(255, 255, 255, .3), transparent 100%),
    radial-gradient(1.6px 1.6px at 44% 9%, rgba(200, 210, 255, .5), transparent 100%),
    radial-gradient(1px 1px at 61% 38%, rgba(255, 255, 255, .26), transparent 100%),
    radial-gradient(1.4px 1.4px at 76% 14%, rgba(255, 214, 235, .45), transparent 100%),
    radial-gradient(1px 1px at 88% 55%, rgba(255, 255, 255, .3), transparent 100%),
    radial-gradient(1.2px 1.2px at 8% 82%, rgba(210, 220, 255, .38), transparent 100%),
    radial-gradient(1px 1px at 52% 88%, rgba(255, 255, 255, .24), transparent 100%),
    radial-gradient(1600px 700px at 50% -20%, rgba(124, 140, 255, .05), transparent 70%),
    radial-gradient(140% 100% at 50% 50%, transparent 58%, rgba(5, 6, 10, .45) 100%);
}

/* 2) 列表卡片入场：前 8 张阶梯浮现（只写 from，避免 fill 锁住 hover 位移） */
@keyframes cardIn { from { opacity: 0; transform: translateY(7px); } }
.o-list .card, .day-cards .card, .archive-list .card, .flow .card {
  animation: cardIn .26s cubic-bezier(.2, .7, .3, 1) both;
}
.o-list .card:nth-child(2), .day-cards .card:nth-child(2) { animation-delay: .035s; }
.o-list .card:nth-child(3), .day-cards .card:nth-child(3) { animation-delay: .07s; }
.o-list .card:nth-child(4), .day-cards .card:nth-child(4) { animation-delay: .105s; }
.o-list .card:nth-child(5), .day-cards .card:nth-child(5) { animation-delay: .14s; }
.o-list .card:nth-child(6), .day-cards .card:nth-child(6) { animation-delay: .175s; }
.o-list .card:nth-child(7), .day-cards .card:nth-child(7) { animation-delay: .21s; }
.o-list .card:nth-child(8), .day-cards .card:nth-child(8) { animation-delay: .245s; }

/* 3) 状态色条加同色微光，状态一眼可辨 */
.card.stb-want::before     { box-shadow: 0 0 8px rgba(124, 140, 255, .5); }
.card.stb-watching::before { box-shadow: 0 0 8px rgba(111, 216, 165, .5); }
.card.stb-hold::before     { box-shadow: 0 0 8px rgba(255, 192, 110, .42); }
.card.stb-done::before     { box-shadow: 0 0 8px rgba(160, 120, 255, .5); }

/* 4) 大标题渐变字 + hero 底部渐隐线；数字按语义着色 */
.overall-hero h2, .week-hero h2 {
  background: linear-gradient(92deg, #dfe4ff 0%, #a7b2ff 45%, #ffa8c8 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.overall-hero { position: relative; padding-bottom: 15px; }
.overall-hero::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(124, 140, 255, .42), rgba(255, 126, 168, .24), transparent);
}
.overall-hero p b:first-child { color: var(--ok); }
.overall-hero p b:last-of-type { color: #9aa6ff; }

/* 5) 周视图「今天」列顶部渐变高亮条 */
@media (min-width: 1300px) {
  .day-col.today { position: relative; }
  .day-col.today::after {
    content: ""; position: absolute; left: 12%; right: 12%; top: 0; height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--accent2), var(--accent));
    box-shadow: 0 0 10px rgba(255, 126, 168, .4);
  }
}

/* 6) 品牌点呼吸 */
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(124, 140, 255, .75); }
  50%      { box-shadow: 0 0 18px rgba(255, 126, 168, .85); }
}
.brand-dot { animation: dotPulse 3.4s ease-in-out infinite; }

/* 7) 空状态图标轻微悬浮 */
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.empty-ico { animation: floatY 4s ease-in-out infinite; }

/* 8) 数字等宽（计数不跳动） */
.stat-n, .day-head .count, .o-sec-head .count, .side-sec h3 .count, .day-tab i {
  font-variant-numeric: tabular-nums;
}

/* 9) 键盘焦点环（触屏 / 鼠标不出现） */
:focus-visible { outline: 2px solid rgba(124, 140, 255, .7); outline-offset: 2px; }

/* 10) 滚动条 hover 加深 */
::-webkit-scrollbar-thumb:hover { background: #383f5a; }

/* 11) 星星点亮微光 */
.star.on { text-shadow: 0 0 10px rgba(255, 184, 77, .4); }

/* 12) 弹窗顶部高光线 */
.modal { position: relative; }
.modal::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
}

/* 13) mini 按钮与统计卡 hover 抛光 */
.mini-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, .2); }
.mini-btn.ok:hover { border-color: rgba(111, 216, 165, .55); }
.mini-btn.go:hover { border-color: rgba(124, 140, 255, .6); }
@media (hover: hover) {
  .stat-card { transition: transform .15s ease, border-color .15s; }
  .stat-card:hover { transform: translateY(-2px); border-color: rgba(124, 140, 255, .35); }
  .card:hover .card-title { color: #fff; }
}

/* 14) 分段按钮选中态光晕 */
.seg-btn.active { box-shadow: 0 4px 14px rgba(124, 140, 255, .26); }

/* 15) 动效弱化：尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
