/* ============================================================
   创想工作台 · 移动端 App 化设计系统
   ============================================================ */
:root {
  --bg: #eef0f8;
  --card: rgba(255, 255, 255, .78);
  --card-solid: #ffffff;
  --text: #151830;
  --text-2: #63698a;
  --text-3: #9aa0bf;
  --line: rgba(21, 24, 48, .07);
  --indigo: #5b5ff2;
  --indigo-2: #8b8ff8;
  --amber: #f5a524;
  --red: #f5485f;
  --emerald: #10b981;
  --violet: #8b5cf6;
  --cyan: #06b6d4;
  --radius: 20px;
  --shadow: 0 10px 34px rgba(31, 38, 82, .10);
  --shadow-sm: 0 4px 14px rgba(31, 38, 82, .07);
  --ring: 113.1px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 62px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 组件使用 HTMLElement.hidden 控制显示时，确保不会被组件自己的 display 覆盖。 */
[hidden] { display: none !important; }
html, body { height: 100%; touch-action: pan-x pan-y; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; color: var(--text); }

/* ---------- 背景氛围 ---------- */
.app-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.b1 { width: 340px; height: 340px; left: -90px; top: -70px; background: linear-gradient(135deg, #c7d2fe, #a5b4fc); }
.b2 { width: 300px; height: 300px; right: -80px; top: 28%; background: linear-gradient(135deg, #fbcfe8, #fde68a); opacity: .45; }
.b3 { width: 340px; height: 340px; left: 10%; bottom: -120px; background: linear-gradient(135deg, #a7f3d0, #bae6fd); opacity: .5; }
.grain { position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1px); background-size: 22px 22px; }

/* ---------- 外壳 ---------- */
.app-shell {
  position: relative; z-index: 1;
  max-width: 520px; margin: 0 auto;
  height: 100dvh; height: 100vh;
  display: flex; flex-direction: column;
  background: transparent;
}

/* ---------- 头部 ---------- */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 12px;
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.h-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.h-logo {
  width: 40px; height: 40px; border-radius: 13px;
  display: block; object-fit: cover; flex: 0 0 auto;
  box-shadow: 0 6px 16px rgba(91, 95, 242, .38);
}
.h-txt { min-width: 0; }
.h-title { font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.h-subtitle { max-width: 215px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: var(--text-2); margin-top: 2px; }
.h-date { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.h-right { display: flex; align-items: center; gap: 9px; }
.time-chip {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  padding: 6px 11px; border-radius: 999px;
  background: rgba(255,255,255,.6); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.h-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--indigo);
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(224,227,255,.94));
  border: 1px solid rgba(91,95,242,.13);
  box-shadow: 0 6px 16px rgba(91,95,242,.18), inset 0 1px 0 rgba(255,255,255,.85);
}
.h-settings { border: 1px solid rgba(91,95,242,.13); cursor: pointer; transition: transform .18s, filter .18s, box-shadow .18s; }
.h-settings svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease; }
.h-settings:active { transform: scale(.9); }
.h-settings:hover { filter: brightness(1.03); box-shadow: 0 8px 20px rgba(91,95,242,.25), inset 0 1px 0 rgba(255,255,255,.9); }
.h-settings:hover svg { transform: rotate(28deg); }

/* ---------- 主内容 ---------- */
.app-main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 16px calc(var(--tab-h) + 26px + var(--safe-b)); scroll-behavior: smooth; }
.app-main::-webkit-scrollbar { width: 0; }
html.keyboard-open .tabbar {
  display: none !important;
  width: 0; height: 0; min-height: 0;
  padding: 0; border: 0; box-shadow: none; background: transparent;
  overflow: hidden; pointer-events: none;
}
html.keyboard-open .app-main { padding-bottom: 0; }

.panel { display: none; }
.panel.active { display: block; animation: panelIn .38s cubic-bezier(.22, .8, .3, 1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  padding: 16px;
  margin-bottom: 14px;
}
.sec-title { font-size: 14.5px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.badge {
  font-size: 11px; font-weight: 700; color: var(--indigo);
  background: rgba(91,95,242,.12); padding: 2px 8px; border-radius: 999px;
}

/* ---------- 输入 ---------- */
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,.82);
  border: 1.5px solid var(--line); border-radius: 13px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 3.5px rgba(91,95,242,.14); }
textarea { resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px; border-radius: 13px;
  font-size: 14.5px; font-weight: 700;
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn:active { transform: scale(.965); }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: 11px; }
.btn.primary { color: #fff; box-shadow: 0 6px 18px rgba(31,38,82,.22); }
.btn.primary.indigo { background: linear-gradient(135deg, var(--indigo), var(--indigo-2)); box-shadow: 0 8px 20px rgba(91,95,242,.35); }
.btn.primary.amber { background: linear-gradient(135deg, #f5a524, #fbbf24); box-shadow: 0 8px 20px rgba(245,165,36,.35); }
.btn.primary.red { background: linear-gradient(135deg, #f5485f, #fb7185); box-shadow: 0 8px 20px rgba(245,72,95,.32); }
.btn.primary.emerald { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 8px 20px rgba(16,185,129,.32); }
.btn.primary.violet { background: linear-gradient(135deg, #8b5cf6, #a78bfa); box-shadow: 0 8px 20px rgba(139,92,246,.32); }
.btn.primary.cyan { background: linear-gradient(135deg, #06b6d4, #22d3ee); box-shadow: 0 8px 20px rgba(6,182,212,.3); }
.btn.ghost { background: rgba(255,255,255,.75); border: 1.5px solid var(--line); color: var(--text-2); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--text-3); font-size: 13.5px; padding: 38px 0 26px; }
.empty-ico { font-size: 40px; margin-bottom: 10px; filter: saturate(.9); }

/* ---------- 分段控件 ---------- */
.seg { display: flex; padding: 5px; border-radius: 15px; }
.seg-btn {
  flex: 1; padding: 10px 0; border-radius: 11px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  transition: all .25s;
}
.seg-btn.active {
  color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  box-shadow: 0 5px 14px rgba(91,95,242,.32);
}

/* ---------- ① 每日计划 ---------- */
.date-card { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.d-arrow {
  width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0;
  font-size: 22px; color: var(--text-2); font-weight: 600;
  background: rgba(255,255,255,.85); border: 1.5px solid var(--line);
  transition: transform .15s, background .2s;
}
.d-arrow:active { transform: scale(.92); background: rgba(91,95,242,.1); }
.d-mid { flex: 1; min-width: 0; }
.d-main { font-size: 17px; font-weight: 700; }
.d-sub { font-size: 12px; color: var(--indigo); font-weight: 600; margin-top: 2px; }
.d-today {
  font-size: 12px; font-weight: 700; color: #fff; padding: 8px 13px; border-radius: 999px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  box-shadow: 0 4px 12px rgba(91,95,242,.3); flex-shrink: 0;
}
.d-ring { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.d-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(21,24,48,.08); stroke-width: 5; }
.ring-fg {
  fill: none; stroke: url(#none); stroke: var(--indigo); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: var(--ring); stroke-dashoffset: var(--ring);
  transition: stroke-dashoffset .7s cubic-bezier(.4, 0, .2, 1);
}
.ring-txt { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; color: var(--indigo); font-variant-numeric: tabular-nums; }

.plan-progress-line { margin: -6px 0 14px; padding: 0 4px; }
.progress-bar { height: 7px; border-radius: 999px; background: rgba(21,24,48,.08); overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
}
.progress-fill.cyan { background: linear-gradient(90deg, #06b6d4, #22d3ee); }

.plan-input .pi-row input { font-size: 15.5px; }
.pi-actions { display: flex; gap: 10px; margin-top: 11px; }
.pi-actions .pri-select { flex: 0 0 118px; }
.pi-actions .btn { flex: 1; }

.remind {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #b45309;
  background: linear-gradient(135deg, rgba(251,191,36,.16), rgba(251,191,36,.07));
  border: 1px solid rgba(245,165,36,.3);
  border-radius: 14px; padding: 11px 14px; margin-bottom: 14px;
}

.plan-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plan-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid rgba(255,255,255,.65);
  border-radius: 16px; padding: 13px 14px;
  box-shadow: var(--shadow-sm);
  animation: itemIn .35s cubic-bezier(.22, .8, .3, 1) both;
  transition: transform .15s;
}
.plan-item:active { transform: scale(.985); }
@keyframes itemIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.plan-check {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #d3d7ea; display: grid; place-items: center;
  font-size: 14px; color: transparent; transition: all .25s;
}
.plan-item.done .plan-check { background: linear-gradient(135deg, var(--emerald), #34d399); border-color: transparent; color: #fff; }
.priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.priority-dot.high { background: #f5485f; box-shadow: 0 0 0 4px rgba(245,72,95,.15); }
.priority-dot.mid { background: #f5a524; box-shadow: 0 0 0 4px rgba(245,165,36,.18); }
.priority-dot.low { background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.15); }
.plan-text { flex: 1; font-size: 15px; line-height: 1.4; min-width: 0; word-break: break-all; }
.plan-item.done .plan-text { text-decoration: line-through; color: var(--text-3); }
.plan-tag { font-size: 11px; font-weight: 600; color: var(--text-3); background: rgba(21,24,48,.05); padding: 4px 9px; border-radius: 999px; flex-shrink: 0; }
.plan-del { width: 32px; height: 32px; border-radius: 10px; color: var(--text-3); font-size: 16px; flex-shrink: 0; }
.plan-del:active { background: rgba(245,72,95,.1); color: var(--red); }

/* ---------- ② 选题灵感 ---------- */
.topics-input .ti-row { display: flex; gap: 10px; margin: 11px 0; }
.ti-row select { flex: 1; }
.topics-input .btn { width: 100%; }

.filters { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 8px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--card); border: 1px solid rgba(255,255,255,.65);
  box-shadow: var(--shadow-sm); transition: all .22s;
}
.chip.active { color: #fff; background: linear-gradient(135deg, var(--indigo), var(--violet)); border-color: transparent; box-shadow: 0 5px 14px rgba(91,95,242,.3); }
.search-box { position: relative; display: flex; align-items: center; }
.search-box .s-ico { position: absolute; left: 14px; font-size: 16px; color: var(--text-3); }
.search-box input { padding-left: 38px; }

.topic-list { display: flex; flex-direction: column; gap: 12px; }
.topic-card {
  background: var(--card); border: 1px solid rgba(255,255,255,.65);
  border-radius: 18px; padding: 15px 16px; box-shadow: var(--shadow-sm);
  animation: itemIn .35s cubic-bezier(.22, .8, .3, 1) both;
  transition: transform .15s;
}
.topic-card:active { transform: scale(.985); }
.topic-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.th-right { display: flex; align-items: center; gap: 9px; }
.topic-cat {
  font-size: 11.5px; font-weight: 700; color: var(--indigo);
  background: rgba(91,95,242,.1); padding: 3px 10px; border-radius: 999px;
}
.topic-date { font-size: 11.5px; color: var(--text-3); }
.topic-del { width: 30px; height: 30px; border-radius: 9px; color: var(--text-3); font-size: 14px; }
.topic-del:active { background: rgba(245,72,95,.1); color: var(--red); transform: scale(.9); }
.topic-title { font-size: 15.5px; font-weight: 700; line-height: 1.45; margin-bottom: 7px; }
.topic-meta { font-size: 12.5px; color: var(--text-3); margin-bottom: 12px; }
.topic-actions { display: flex; gap: 8px; }
.st-btn {
  flex: 1; padding: 8px 0; border-radius: 11px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: rgba(21,24,48,.04); transition: all .2s;
}
.st-btn.active-idea { color: #7c3aed; background: rgba(139,92,246,.13); }
.st-btn.active-adopt { color: #047857; background: rgba(16,185,129,.13); }
.st-btn.active-pub { color: #b45309; background: rgba(245,165,36,.15); }
.st-btn:active { transform: scale(.94); }

/* ---------- ③ 爆款热点 ---------- */
.hot-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 12px; }
.hh-left { display: flex; align-items: center; gap: 9px; }
.hh-badge {
  font-size: 11.5px; font-weight: 800; color: #fff; padding: 4px 11px; border-radius: 999px;
  background: linear-gradient(135deg, #f5485f, #fb923c);
  box-shadow: 0 4px 12px rgba(245,72,95,.32);
}
.hh-src { font-size: 12px; color: var(--text-3); font-weight: 600; }
.hh-right { display: flex; align-items: center; gap: 8px; }
.hh-time { font-size: 11.5px; color: var(--text-3); }

.hot-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hot-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid rgba(255,255,255,.65);
  border-radius: 16px; padding: 12px 13px; box-shadow: var(--shadow-sm);
  animation: itemIn .35s cubic-bezier(.22, .8, .3, 1) both;
}
.hot-rank {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 14.5px; font-weight: 800;
  color: var(--text-3); background: rgba(21,24,48,.05);
}
.hot-item.top1 .hot-rank { background: linear-gradient(135deg, #f5485f, #fb7185); color: #fff; box-shadow: 0 4px 12px rgba(245,72,95,.35); }
.hot-item.top2 .hot-rank { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; box-shadow: 0 4px 12px rgba(245,159,11,.32); }
.hot-item.top3 .hot-rank { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff; box-shadow: 0 4px 12px rgba(139,92,246,.32); }
.hot-main { flex: 1; min-width: 0; }
.hot-title-line { font-size: 14.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hot-meta { font-size: 11.5px; color: var(--text-3); margin-top: 4px; display: flex; gap: 8px; }
.hot-val { color: #f5485f; font-weight: 700; }
.hot-ops { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.hot-btn {
  width: 34px; height: 34px; border-radius: 11px; font-size: 14px;
  display: grid; place-items: center;
  background: rgba(21,24,48,.05); transition: all .2s;
}
.hot-btn.collect { color: var(--indigo); }
.hot-btn.collect:active { background: rgba(91,95,242,.15); transform: scale(.9); }
.hot-btn.open { color: var(--text-2); }
.hot-btn.open:active { background: rgba(21,24,48,.1); transform: scale(.9); }

.hot-loading { margin-bottom: 14px; }
.skeleton-list { display: flex; flex-direction: column; gap: 10px; }
.sk-item { height: 66px; border-radius: 16px; background: linear-gradient(100deg, rgba(255,255,255,.55) 40%, rgba(255,255,255,.9) 50%, rgba(255,255,255,.55) 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.hot-import { margin-top: 14px; }
.hot-import-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.hot-import-toggle .sec-title { margin: 0; }
.hot-import-chevron { color: var(--text-3); font-size: 22px; line-height: 1; transform: rotate(90deg); transition: transform .2s ease; }
.hot-import.is-collapsed .hot-import-chevron { transform: rotate(0deg); }
.hot-import.is-collapsed .hot-import-body { display: none; }
.hot-import-copy { color: var(--text-3); font-size: 12.5px; line-height: 1.55; margin: -4px 0 12px; }
.hot-upload {
  display: flex; align-items: center; gap: 11px; min-height: 56px; padding: 10px 12px;
  border: 1.5px dashed rgba(91,95,242,.4); border-radius: 14px; cursor: pointer;
  background: rgba(91,95,242,.05); transition: background .2s, border-color .2s;
}
.hot-upload:active { background: rgba(91,95,242,.1); border-color: var(--indigo); }
.hot-upload-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: var(--indigo); background: rgba(91,95,242,.12); font-size: 20px; }
.hot-upload b, .hot-upload small { display: block; }
.hot-upload b { font-size: 13px; color: var(--text-2); }
.hot-upload small { margin-top: 2px; color: var(--text-3); font-size: 11px; }
.hot-image-preview { width: 100%; max-height: 260px; object-fit: contain; margin-top: 12px; border-radius: 12px; background: rgba(21,24,48,.05); }
.hot-ocr-actions { display: flex; gap: 8px; margin-top: 11px; }
.hot-ocr-actions .btn { flex: 1; }
.hot-ocr-status { min-height: 19px; margin-top: 9px; color: var(--text-3); font-size: 12px; line-height: 1.5; }
.hot-ocr-status.success { color: #047857; }
.hot-ocr-status.error { color: var(--red); }
.hot-ocr-text { min-height: 112px; margin-top: 4px; font-size: 12.5px; line-height: 1.55; }

.card-input .hint { font-size: 12px; color: var(--text-3); margin-top: 10px; line-height: 1.55; }
.card-input .btn { width: 100%; margin-top: 11px; }

.card-results { display: flex; flex-direction: column; gap: 14px; }
.vcard-loading {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid rgba(255,255,255,.65);
  border-radius: 16px; padding: 15px 16px; box-shadow: var(--shadow-sm);
  font-size: 13px; color: var(--text-2); overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid rgba(91,95,242,.2); border-top-color: var(--indigo);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.vcard {
  background: var(--card-solid); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,.65);
  animation: itemIn .35s cubic-bezier(.22, .8, .3, 1) both;
}
.vcard-cover { position: relative; display: block; aspect-ratio: 16/9; background: linear-gradient(135deg, #e0e4f5, #f2eefb); overflow: hidden; }
.vcard-cover img { width: 100%; height: 100%; object-fit: cover; }
.vcard-cover .vf {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: #fff;
}
.vcard-cover .vf-ico { font-size: 38px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.vcard-cover .vf-name { font-size: 14px; font-weight: 800; letter-spacing: 1px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.vcard-cover .vf-play {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.22); border: 2px solid rgba(255,255,255,.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.vcard-cover .vf-play svg { width: 22px; height: 22px; fill: #fff; margin-left: 2px; }
.vcard-platform {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 800; color: #fff; padding: 4px 10px; border-radius: 999px;
  background: rgba(15,18,40,.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.vcard-body { padding: 13px 14px 14px; }
.vcard-title { font-size: 14.5px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard-author { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.vcard-actions { display: flex; gap: 8px; margin-top: 12px; }
.vcard-open {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 0; border-radius: 12px; font-size: 13px; font-weight: 700; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  box-shadow: 0 5px 14px rgba(91,95,242,.3);
}
.vcard-save {
  width: 42px; border-radius: 12px; font-size: 15px;
  background: rgba(21,24,48,.05); transition: transform .15s;
}
.vcard-save:active { transform: scale(.9); }
.vcard-error { font-size: 13px; color: var(--red); background: rgba(245,72,95,.07); border: 1px solid rgba(245,72,95,.22); border-radius: 14px; padding: 13px 15px; line-height: 1.5; }

/* ---------- ④ 内容复盘 ---------- */
.review-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.rstat {
  border-radius: 18px; padding: 16px; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm); animation: itemIn .4s cubic-bezier(.22, .8, .3, 1) both;
}
.rstat::after { content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,.16); }
.rstat.c1 { background: linear-gradient(135deg, #5b5ff2, #8b8ff8); }
.rstat.c2 { background: linear-gradient(135deg, #f5485f, #fb7185); }
.rstat.c3 { background: linear-gradient(135deg, #10b981, #34d399); }
.rstat.c4 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.r-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.r-label { font-size: 12px; opacity: .85; margin-top: 3px; line-height: 1.4; }

.review-form input { margin-bottom: 10px; }
.rf-row { display: flex; gap: 10px; margin-bottom: 10px; }
.rf-row select, .rf-row input { flex: 1; margin-bottom: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.metric-grid label { font-size: 11px; color: var(--text-3); display: flex; flex-direction: column; gap: 5px; }
.metric-grid input { padding: 10px 11px; font-size: 14px; }
.review-form textarea { margin-bottom: 12px; }
.rf-actions { display: flex; gap: 10px; }
.rf-actions .btn { flex: 1; }

.records-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 12px; }
#review-list { display: flex; flex-direction: column; gap: 11px; }
.rv-card {
  background: var(--card); border: 1px solid rgba(255,255,255,.65);
  border-radius: 17px; padding: 14px 15px; box-shadow: var(--shadow-sm);
  animation: itemIn .35s cubic-bezier(.22, .8, .3, 1) both;
}
.rv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rv-title { font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.rv-del { width: 32px; height: 32px; border-radius: 10px; color: var(--text-3); flex-shrink: 0; }
.rv-del:active { background: rgba(245,72,95,.1); color: var(--red); }
.rv-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.rv-chip {
  font-size: 11.5px; font-weight: 600; color: var(--text-2);
  background: rgba(21,24,48,.045); padding: 4px 10px; border-radius: 999px;
}
.rv-chip.plat { color: #fff; background: linear-gradient(135deg, var(--indigo), var(--violet)); }
.rv-note { font-size: 12.5px; color: var(--text-2); margin-top: 9px; line-height: 1.5; }

/* ---------- ⑤ 备忘录 ---------- */
.memo-input input, .memo-input textarea { margin-bottom: 10px; }
.mi-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.color-row { display: flex; gap: 9px; }
.color-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(31,38,82,.18);
  transition: transform .18s; cursor: pointer;
}
.color-dot.active { transform: scale(1.18); box-shadow: 0 0 0 3px var(--text), 0 3px 10px rgba(31,38,82,.2); }
.memo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.memo-card {
  border-radius: 17px; padding: 13px; min-height: 110px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  animation: itemIn .35s cubic-bezier(.22, .8, .3, 1) both;
  transition: transform .15s, filter .25s;
}
.memo-card:active { transform: scale(.97); }
.memo-card.done { filter: saturate(.4) opacity(.72); }
.memo-card::after { content: ""; position: absolute; right: -18px; top: -18px; width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.4); }
.memo-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.memo-check {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(21,24,48,.22); display: grid; place-items: center; font-size: 12px; color: transparent;
}
.memo-card.done .memo-check { background: var(--emerald); border-color: transparent; color: #fff; }
.memo-title { flex: 1; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memo-star { font-size: 15px; color: rgba(21,24,48,.25); flex-shrink: 0; }
.memo-star.on { color: #f5a524; text-shadow: 0 2px 8px rgba(245,165,36,.4); }
.memo-body { flex: 1; font-size: 12.5px; line-height: 1.55; color: rgba(21,24,48,.78); word-break: break-all; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.memo-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.memo-date { font-size: 10.5px; opacity: .55; }
.memo-ops { display: flex; gap: 2px; }
.memo-ops button { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; opacity: .65; }
.memo-ops button:active { background: rgba(21,24,48,.12); }

/* ---------- ⑥ 学习进步 ---------- */
.study-head { text-align: left; }
.study-head select { margin-bottom: 10px; font-weight: 700; }
.vocab-desc { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }
.vocab-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.vstat {
  text-align: center; padding: 10px 2px; border-radius: 13px;
  background: rgba(21,24,48,.04);
}
.vstat b { display: block; font-size: 17px; font-weight: 800; color: var(--indigo); font-variant-numeric: tabular-nums; }
.vstat span { font-size: 10.5px; color: var(--text-3); }

.fc-wrap { text-align: center; }
.fc-progress { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.fc-progress span { font-weight: 800; color: var(--indigo); font-size: 16px; }
.flashcard { perspective: 1200px; height: 218px; margin-bottom: 16px; cursor: pointer; }
.fc-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform .55s cubic-bezier(.4, .1, .2, 1);
}
.flashcard.revealed .fc-inner { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 22px; padding: 24px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid rgba(255,255,255,.75);
  background: linear-gradient(150deg, #fdfdff, #eef0fb);
  box-shadow: var(--shadow);
}
.fc-front { background: linear-gradient(150deg, #ffffff, #eef0fb); }
.fc-back { transform: rotateY(180deg); background: linear-gradient(150deg, #f2f0ff, #fdeff6); }
.fc-word { font-size: 32px; font-weight: 800; letter-spacing: .3px; }
.fc-phonetic {
  font-family: "Arial Unicode MS", Arial, "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: var(--text-2);
  font-style: normal;
  font-variant-ligatures: none;
  min-height: 20px;
}
.fc-zh { font-size: 20px; font-weight: 700; color: #6d28d9; line-height: 1.5; word-break: break-all; }
.fc-tap { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.fc-actions { display: flex; gap: 10px; margin-bottom: 12px; }
.fc-btn {
  flex: 1; padding: 14px 0; border-radius: 15px;
  font-size: 14.5px; font-weight: 700; color: #fff;
  transition: transform .15s, box-shadow .2s;
}
.fc-btn:active { transform: scale(.94); }
.fc-btn.unknown { background: linear-gradient(135deg, #f5485f, #fb7185); box-shadow: 0 6px 16px rgba(245,72,95,.3); }
.fc-btn.fuzzy { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 6px 16px rgba(245,159,11,.3); }
.fc-btn.know { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 6px 16px rgba(16,185,129,.3); }
.fc-foot { font-size: 12.5px; color: var(--text-3); }
.fc-foot b { color: var(--indigo); font-size: 14px; }
.fc-done { padding: 26px 0 8px; }
.fc-done-emoji { font-size: 46px; margin-bottom: 8px; }
.fc-done div { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

.study-side { display: flex; flex-direction: column; gap: 14px; }
.mini-chart { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; }
.bar-val { font-size: 10.5px; font-weight: 700; color: var(--indigo); font-variant-numeric: tabular-nums; }
.bar {
  width: 100%; max-width: 26px; border-radius: 8px 8px 4px 4px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--indigo), var(--violet));
  box-shadow: 0 4px 10px rgba(91,95,242,.25);
  transition: height .6s cubic-bezier(.4, 0, .2, 1);
}
.bar.zero { background: rgba(21,24,48,.08); box-shadow: none; }
.bar-label { font-size: 10px; color: var(--text-3); }

.wrong-list { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.wrong-item {
  display: flex; align-items: center; gap: 9px;
  background: rgba(245,72,95,.06); border: 1px solid rgba(245,72,95,.14);
  border-radius: 12px; padding: 9px 12px;
}
.w-word { font-size: 13.5px; font-weight: 700; min-width: 80px; }
.w-zh { flex: 1; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrong-item button {
  flex-shrink: 0; font-size: 11.5px; font-weight: 700; color: #047857;
  background: rgba(16,185,129,.12); padding: 6px 10px; border-radius: 9px;
}
.wrong-empty { font-size: 12.5px; color: var(--text-3); text-align: center; padding: 10px 0; }

.reading-goal .goal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.goal-label { font-size: 15px; font-weight: 700; }
.goal-nums { font-size: 12.5px; color: var(--text-2); }
.goal-nums b { color: var(--cyan); font-size: 15px; }
.reading-goal .progress-bar { margin-bottom: 13px; }
.goal-input-row { display: flex; gap: 10px; }
.goal-input-row input { flex: 1; }

.reading-input input { margin-bottom: 10px; }
.reading-input .btn { width: 100%; }

.reading-list { display: flex; flex-direction: column; gap: 11px; }
.rd-card {
  background: var(--card); border: 1px solid rgba(255,255,255,.65);
  border-radius: 17px; padding: 14px 15px; box-shadow: var(--shadow-sm);
  animation: itemIn .35s cubic-bezier(.22, .8, .3, 1) both;
}
.rd-title { font-size: 15px; font-weight: 700; }
.rd-author { font-size: 12px; color: var(--text-3); margin: 3px 0 8px; }
.rd-body { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-2); align-items: center; }
.rd-status { font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.rd-status.st-reading { color: #0369a1; background: rgba(6,182,212,.12); }
.rd-status.st-done { color: #047857; background: rgba(16,185,129,.12); }
.rd-status.st-wish { color: #b45309; background: rgba(245,165,36,.14); }
.rd-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.rd-foot .rd-date { font-size: 11px; color: var(--text-3); }
.rd-ops { display: flex; gap: 6px; }
.rd-ops button {
  width: 34px; height: 34px; border-radius: 11px; font-size: 14px;
  background: rgba(21,24,48,.05);
}
.rd-ops button:active { transform: scale(.9); background: rgba(21,24,48,.12); }

/* ---------- 底部 Tab 栏 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 40;
  display: flex;
  padding: 7px 8px calc(7px + var(--safe-b));
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 -8px 30px rgba(31,38,82,.08);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; border-radius: 13px;
  color: var(--text-3); font-size: 10.5px; font-weight: 600;
  transition: color .25s, transform .15s;
}
.tab-item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.tab-item:active { transform: scale(.92); }
.tab-item.active { color: var(--indigo); }
.tab-item[aria-current="page"] { background: rgba(91,95,242,.08); }
.tab-item.active svg { transform: translateY(-1px) scale(1.08); filter: drop-shadow(0 3px 6px rgba(91,95,242,.35)); }
.tab-item.active span { font-weight: 800; }
.long-pressable { touch-action: manipulation; }

/* ---------- 设置 ---------- */
.settings-mask {
  position: fixed; inset: 0; z-index: 85;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 18px;
  background: rgba(15, 18, 40, .45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.settings-mask[hidden] { display: none !important; }
.settings-panel {
  width: 100%; max-width: 520px; max-height: min(88vh, 720px); overflow: auto;
  padding: 22px 18px calc(20px + var(--safe-b));
  border: 1px solid rgba(255,255,255,.72); border-radius: 26px;
  background: rgba(250, 251, 255, .96);
  box-shadow: 0 22px 60px rgba(15, 18, 40, .26);
}
.settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.settings-kicker { color: var(--indigo); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.settings-head h2 { margin-top: 3px; font-size: 23px; letter-spacing: .2px; }
.settings-head p { margin-top: 5px; color: var(--text-2); font-size: 12.5px; }
.settings-close { width: 34px; height: 34px; border-radius: 11px; color: var(--text-2); font-size: 16px; background: rgba(21,24,48,.06); }
.settings-close:active { transform: scale(.92); }
.settings-block { padding: 16px; border-radius: 19px; background: rgba(255,255,255,.72); border: 1px solid rgba(21,24,48,.06); }
.settings-block-title { font-size: 15px; font-weight: 800; }
.settings-block-desc { margin-top: 6px; color: var(--text-2); font-size: 12.5px; line-height: 1.55; }
.settings-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 15px; }
.settings-action { width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px; text-align: left; border-radius: 15px; background: rgba(238,240,248,.72); border: 1px solid rgba(21,24,48,.055); color: var(--text); transition: transform .15s, background .18s; }
.settings-action:active { transform: scale(.985); background: rgba(224,228,245,.9); }
.settings-action-icon { width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0; border-radius: 11px; color: #fff; font-size: 19px; font-weight: 800; background: linear-gradient(135deg, #686cf5, #a38bf8); box-shadow: 0 5px 12px rgba(91,95,242,.2); }
.settings-action-icon.import-icon { background: linear-gradient(135deg, #4f9cf7, #6d73f4); box-shadow: 0 5px 12px rgba(79,156,247,.2); }
.settings-action-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.settings-action-text b { font-size: 13.5px; }
.settings-action-text small { color: var(--text-3); font-size: 11.5px; }
.settings-action-arrow { margin-left: auto; color: var(--text-3); font-size: 23px; line-height: 1; }
.settings-note { margin-top: 13px; color: var(--text-3); font-size: 11.5px; line-height: 1.55; }

/* ---------- 自定义弹层 Bottom Sheet ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 18, 40, .45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .3s;
}
/* hidden 属性会被上面的 display:flex 覆盖；否则初始弹层会变成透明的全屏点击拦截层。 */
.sheet-mask[hidden] { display: none !important; }
.sheet-mask.show { opacity: 1; }
.sheet {
  width: 100%; max-width: 520px;
  background: rgba(250, 251, 255, .96);
  border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(22px + var(--safe-b));
  box-shadow: 0 -18px 50px rgba(15, 18, 40, .25);
  transform: translateY(100%); transition: transform .38s cubic-bezier(.22, .8, .3, 1);
}
.sheet-mask.show .sheet { transform: translateY(0); }
.sheet-grab { width: 42px; height: 5px; border-radius: 999px; background: rgba(21, 24, 48, .16); margin: 4px auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-title { font-size: 17px; font-weight: 800; }
.sheet-close { width: 32px; height: 32px; border-radius: 10px; color: var(--text-3); font-size: 15px; }
.sheet-close:active { background: rgba(21, 24, 48, .08); }
.sheet-msg { font-size: 14px; color: var(--text-2); line-height: 1.6; margin-bottom: 14px; }
.sheet-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.sheet-field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 7px; }
.sheet-field textarea { resize: none; min-height: 72px; }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .btn { flex: 1; padding: 13px 0; }
.sheet-actions .btn.is-loading { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: wait; }
.sheet-actions .btn:disabled { opacity: .82; cursor: wait; }
.sheet-btn-spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.sheet-actions .btn.danger-ok { background: linear-gradient(135deg, #f5485f, #fb7185); box-shadow: 0 8px 20px rgba(245,72,95,.32); color: #fff; }


#toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 34px + var(--safe-b)); transform: translateX(-50%) translateY(14px);
  background: rgba(21,24,48,.88); color: #fff;
  font-size: 13.5px; font-weight: 600; padding: 11px 20px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  opacity: 0; pointer-events: none; z-index: 99;
  transition: opacity .3s, transform .3s; max-width: 86%; text-align: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 桌面端呈现：模拟手机壳 ---------- */
@media (min-width: 680px) {
  .app-shell {
    height: min(880px, 94vh);
    margin: 3vh auto;
    border-radius: 46px;
    background: rgba(255,255,255,.05);
    box-shadow: 0 30px 90px rgba(31,38,82,.24), 0 0 0 1px rgba(255,255,255,.5) inset;
    overflow: hidden;
    border: 10px solid rgba(21,24,48,.92);
  }
  .tabbar { position: absolute; bottom: 0; transform: none; left: 0; border-radius: 0; }
  .app-main { height: 100%; }
  .app-header { position: sticky; }
  body { background: #dde0ee; }
  .memo-grid { grid-template-columns: 1fr 1fr; }
  .settings-mask { align-items: center; }
}
