﻿/* ==========================================================================
   萌题岛 · 视觉皮肤（自定义层，GPL-3.0）
   只覆盖观感，不改任何结构与逻辑；upstream styles.css 不动。
   载入顺序：styles.css → branding.css → bank-library.css → polish.css（最后）
   ========================================================================== */

/* 1. 令牌 ---------------------------------------------------------------- */
:root {
  --bg: #fdf6fc;
  --card: #ffffff;
  --ink: #332c46;
  --muted: #6f6785;
  --line: #efe7f7;
  --blue: #b8469a;
  --blue2: #f8ebfa;
  --green: #3f9d7a;
  --green2: #e2f6ee;
  --red: #c4386b;
  --red2: #fde8f1;
  --amber: #b0741a;
  --shadow: 0 16px 36px -22px rgba(120, 86, 190, .45);
  --r: 20px;

  --pp-ink: #332c46;
  --pp-ink-soft: #4b4363;
  --pp-muted: #6f6785;
  --pp-faint: #7d7292;
  --pp-line: #efe7f7;
  --pp-line-strong: #e3d6f2;
  --pp-pink: #d464ae;
  --pp-pink-deep: #b8469a;
  --pp-purple: #9a7cf0;
  --pp-purple-deep: #7f56d9;
  --pp-lilac: #cbb8f8;
  --pp-cream: #fff8fd;
  --pp-denim: #7a63c9;
  --pp-rose: #c4386b;
  --pp-mint: #3f9d7a;
  --pp-grad: linear-gradient(135deg, #f8abdb 0%, #c9a2f6 52%, #a8b7ff 100%);
  --pp-grad-btn: linear-gradient(135deg, #b8469a 0%, #8a5ce0 100%);
  --pp-grad-soft: linear-gradient(135deg, #fdeef9 0%, #f4eefe 55%, #eef3ff 100%);
  --pp-shadow-1: 0 1px 2px rgba(90, 60, 140, .05);
  --pp-shadow-2: 0 18px 40px -24px rgba(120, 86, 190, .42);
  --pp-ring: 0 0 0 3px rgba(184, 70, 154, .18);
}

/* 2. 基础 --------------------------------------------------------------- */
body {
  background:
    radial-gradient(circle at 8% -8%, rgba(247, 160, 214, .62), transparent 46%),
    radial-gradient(circle at 96% -2%, rgba(160, 176, 255, .52), transparent 50%),
    linear-gradient(168deg, #fcecf9 0%, #f4ecff 48%, #eaf0ff 100%);
  background-attachment: fixed;
  color: var(--pp-ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "MiSans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: .004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(212, 100, 174, .22); color: var(--pp-ink); }

* { scrollbar-width: thin; scrollbar-color: #dcd0ee transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #ddd1ef;
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: #cbb8e6; background-clip: padding-box; }

:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--pp-pink-deep);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  letter-spacing: 0;
  color: var(--pp-ink);
  font-weight: 800;
}
h1 { font-size: 26px; line-height: 1.32; }
h2 { font-size: 20px; line-height: 1.4; }
h3 { font-size: 16.5px; line-height: 1.45; }

.kicker {
  color: var(--pp-pink-deep);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: none;
}

.muted, .empty { color: var(--pp-muted); }

a { color: var(--pp-purple-deep); text-decoration-color: rgba(127, 86, 217, .35); }
a:hover { color: var(--pp-pink-deep); }

/* 3. 侧栏 --------------------------------------------------------------- */
.side {
  background: linear-gradient(180deg, #fffbfe 0%, #f8f2ff 62%, #f4f2ff 100%);
  border-right-color: rgba(203, 184, 248, .5);
  box-shadow: 12px 0 40px -34px rgba(120, 86, 190, .7);
  backdrop-filter: blur(16px);
}

.brand { gap: 11px; margin-bottom: 20px; }
.brand img {
  width: 44px; height: 44px;
  border-radius: 15px;
  background: var(--pp-grad);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 8px 20px -8px rgba(160, 86, 200, .55);
  padding: 6px;
}
.brand b {
  color: var(--pp-ink);
  font-family: var(--study-brand-font);
  font-size: 21px;
  letter-spacing: .04em;
}
.brand span { color: var(--pp-faint); font-size: 11.5px; margin-top: 2px; letter-spacing: .02em; }

.nav {
  position: relative;
  color: #574d6c;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 14px;
  border-radius: 13px;
  margin: 2px 0;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.nav:hover {
  background: linear-gradient(135deg, #fdf1fa, #f6f0ff);
  color: var(--pp-pink-deep);
  box-shadow: inset 0 0 0 1px rgba(184, 70, 154, .10);
  font-weight: 500;
}
.nav.active {
  background: linear-gradient(135deg, #fbe6f6, #f2eaff);
  color: #8b2d78;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(184, 70, 154, .16);
}
.nav.active::before {
  content: "";
  position: absolute;
  left: 5px; top: 50%;
  width: 3px; height: 16px;
  margin-top: -8px;
  border-radius: 999px;
  background: var(--pp-grad-btn);
}
.nav:active { transform: scale(.985); }

/* 4. 顶栏 --------------------------------------------------------------- */
.main { padding: 22px 26px 34px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 0 18px;
  padding: 14px 4px;
  background: rgba(255, 250, 254, .82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--pp-line);
}
.topbar .kicker { margin-bottom: 4px; }
.topbar h1 { font-size: 24px; }
.top-actions select { min-width: 220px; }

/* 5. 卡片 --------------------------------------------------------------- */
.card, .hero-card {
  background: #ffffff;
  border: 1px solid var(--pp-line);
  border-radius: var(--r);
  box-shadow: var(--pp-shadow-1), var(--pp-shadow-2);
  padding: 22px;
  margin-bottom: 16px;
}

.section-head { gap: 14px; margin-bottom: 14px; }
.section-head h2 { font-size: 19px; }
.section-head h3 { font-size: 16px; }
.section-head .kicker { margin-bottom: 3px; }

.hero-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 16%, rgba(248, 171, 219, .30), transparent 44%),
    radial-gradient(circle at 96% 88%, rgba(168, 183, 255, .28), transparent 46%),
    linear-gradient(135deg, #ffffff 0%, #fdf7ff 52%, #f7f3ff 100%);
  border-color: rgba(203, 184, 248, .55);
}
.hero-card::before {
  content: "";
  position: absolute;
  right: -70px; top: -80px;
  width: 240px; height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(212, 100, 174, .16), transparent 68%);
  z-index: 0;
}
.hero-card::after {
  content: "";
  position: absolute;
  right: 18px; bottom: 12px;
  width: 44%; height: 44%;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(203, 184, 248, .22), rgba(255, 255, 255, 0));
  z-index: 0;
  pointer-events: none;
}
.hero-card > div { position: relative; z-index: 1; }

.hero-visual-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.hero-mascot-main {
  border-radius: 32px;
  filter: drop-shadow(0 16px 30px rgba(140, 90, 200, .22)) !important;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 60%, rgba(0, 0, 0, .88) 76%, transparent 97%);
  mask-image: radial-gradient(ellipse at center, #000 60%, rgba(0, 0, 0, .88) 76%, transparent 97%);
}

/* 6. 按钮 --------------------------------------------------------------- */
button { border-radius: 12px; transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease; }

.primary {
  background: var(--pp-grad-btn);
  color: #ffffff;
  border: 1px solid rgba(122, 60, 150, .28);
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 10px 22px -12px rgba(160, 70, 160, .75);
}
.primary:hover {
  background: linear-gradient(135deg, #a83e8c, #7b4fd6);
  box-shadow: 0 14px 26px -12px rgba(160, 70, 160, .85);
  transform: translateY(-1px);
}
.primary:active { transform: translateY(0) scale(.99); }

.ghost {
  background: #ffffff;
  border: 1px solid var(--pp-line-strong);
  color: #56496e;
  font-weight: 500;
}
.ghost:hover {
  background: linear-gradient(135deg, #fdf2fa, #f7f2ff);
  border-color: rgba(184, 70, 154, .32);
  color: var(--pp-pink-deep);
}

.danger {
  background: linear-gradient(135deg, #d4467c, #b83a68);
  color: #ffffff;
  border: 1px solid rgba(150, 40, 80, .3);
}
.ghost.danger { background: #fff5f8; color: var(--pp-rose); border-color: rgba(196, 56, 107, .28); }
.ghost.danger:hover { background: #ffe9f0; color: #a52b58; }

button:disabled { opacity: .48; box-shadow: none; transform: none; }

/* 7. 表单 --------------------------------------------------------------- */
input, select, textarea {
  background: #ffffff;
  border: 1px solid var(--pp-line-strong);
  border-radius: 12px;
  color: var(--pp-ink);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input::placeholder, textarea::placeholder { color: #a89bbd; }
input:hover, select:hover, textarea:hover { border-color: #d8c9ec; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--pp-pink-deep);
  box-shadow: var(--pp-ring);
}
label { color: var(--pp-ink-soft); }

/* 8. 首页 --------------------------------------------------------------- */
body #dashboard .dashboard-home-hero {
  border-radius: 24px !important;
  border-color: rgba(203, 184, 248, .62) !important;
}
body #dashboard .dashboard-home-main .kicker {
  color: var(--pp-pink-deep) !important;
  letter-spacing: .16em !important;
}
body #dashboard .dashboard-home-main h2 {
  font-family: var(--study-brand-font) !important;
  font-size: clamp(28px, 2.6vw, 36px) !important;
  font-weight: 400 !important;
  line-height: 1.34 !important;
  letter-spacing: .02em !important;
  background: linear-gradient(120deg, #8b2d78 0%, #7f56d9 58%, #6b73d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #7a4bb8;
}

body #dashboard .dashboard-action-card {
  position: relative;
  border-radius: 16px !important;
  background: #ffffff !important;
  border: 1px solid var(--pp-line) !important;
  box-shadow: var(--pp-shadow-1);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
body #dashboard .dashboard-action-card::before {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  height: 4px !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  filter: none !important;
}
body #dashboard .dashboard-action-card.blue::before { background: linear-gradient(135deg, #f8abdb, #d464ae) !important; }
body #dashboard .dashboard-action-card.green::before { background: linear-gradient(135deg, #9ee6cd, #3f9d7a) !important; }
body #dashboard .dashboard-action-card.violet::before { background: linear-gradient(135deg, #cbb8f8, #7f56d9) !important; }
body #dashboard .dashboard-action-card.amber::before { background: linear-gradient(135deg, #ffd9a8, #cf8a23) !important; }
body #dashboard .dashboard-action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 70, 154, .26) !important;
  box-shadow: 0 16px 30px -20px rgba(120, 86, 190, .55);
}
body #dashboard .dashboard-action-card:active { transform: translateY(0) scale(.99); }
body #dashboard .dashboard-action-card span {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--pp-ink) !important;
}
body #dashboard .dashboard-action-card small {
  font-size: 11.5px !important;
  color: var(--pp-faint) !important;
  letter-spacing: .02em;
}

body #dashboard .dashboard-stat-grid > div {
  background: rgba(255, 255, 255, .82) !important;
  border: 1px solid rgba(203, 184, 248, .5) !important;
  border-radius: 15px !important;
}
body #dashboard .dashboard-stat-grid b {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  color: #8b2d78 !important;
}
body #dashboard .dashboard-stat-grid span {
  color: var(--pp-faint) !important;
  letter-spacing: .02em;
}

body #dashboard .dashboard-panel { border-radius: 20px !important; }
body #dashboard .learning-stat-tile-v42 {
  background: linear-gradient(160deg, #fffafd, #f8f4ff) !important;
  border: 1px solid rgba(203, 184, 248, .45) !important;
  border-radius: 15px !important;
}
body #dashboard .learning-stat-tile-v42 span {
  color: var(--pp-faint) !important;
  font-size: 12px !important;
  letter-spacing: .02em;
}
body #dashboard .learning-stat-tile-v42 b {
  font-variant-numeric: tabular-nums;
  color: #6b3fa8 !important;
  letter-spacing: -.01em;
}

body #dashboard .study-daily-summary { color: #5b5175 !important; }
body #dashboard .dashboard-card-actions .ghost { border-radius: 11px; }

/* 9. 表格 --------------------------------------------------------------- */
.table-wrap, .list, .bank-list { border-color: var(--pp-line-strong); border-radius: 14px; }
table { border-collapse: separate; border-spacing: 0; }
th {
  background: linear-gradient(180deg, #fbf4fe, #f7f1ff);
  color: #63557c;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .03em;
}
th, td { border-color: var(--pp-line); }
tbody tr:hover td { background: #fdf8ff; }

/* 10. 提示条 / 徽标 / 弹窗 ---------------------------------------------- */
.notice {
  background: linear-gradient(135deg, #fdf4fb, #f7f3ff);
  border: 1px solid var(--pp-line-strong);
  border-radius: 14px;
  color: #5b5175;
}
.notice.ok { background: #eefaf4; border-color: #c6ecdb; color: #276b52; }
.notice.warn { background: #fff6e9; border-color: #f6dfbc; color: #8a5a12; }
.notice.danger { background: #fdf0f5; border-color: #f3ccdc; color: #a52b58; }

.pill, .study-local-badge, .ocr-badge, .stage-tag {
  border-radius: 999px;
  border: 1px solid rgba(184, 70, 154, .18);
  background: linear-gradient(135deg, #fdf1fa, #f6f1ff);
  color: #8b2d78;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .02em;
}

.app-toast {
  border-radius: 14px;
  background: rgba(51, 44, 70, .94);
  color: #ffffff;
  box-shadow: 0 18px 40px -18px rgba(51, 44, 70, .6);
}

dialog {
  border: 1px solid var(--pp-line);
  border-radius: 22px;
  box-shadow: 0 30px 80px -30px rgba(120, 86, 190, .55);
}
dialog::backdrop { background: rgba(51, 44, 70, .34); backdrop-filter: blur(3px); }

/* 11. 启动屏 ------------------------------------------------------------ */
.app-splash {
  background:
    radial-gradient(circle at 30% 18%, rgba(248, 171, 219, .34), transparent 46%),
    radial-gradient(circle at 72% 82%, rgba(168, 183, 255, .34), transparent 46%),
    linear-gradient(160deg, #fff8fd, #f8f4ff 55%, #f4f8ff);
}
.app-splash-card {
  border-radius: 26px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(203, 184, 248, .6);
  box-shadow: 0 26px 60px -30px rgba(120, 86, 190, .55);
}
.app-splash-logo {
  border-radius: 20px;
  box-shadow: 0 14px 30px -14px rgba(160, 86, 200, .6);
}
.app-splash-title { font-family: var(--study-brand-font); color: var(--pp-ink); letter-spacing: .06em; }
.app-splash-subtitle { color: var(--pp-faint); }
.app-splash-dots span { background: var(--pp-grad-btn); }

/* 12. 细节 -------------------------------------------------------------- */
.study-file-picker { border-radius: 12px; border-color: var(--pp-line-strong); background: #ffffff; }
.study-file-button { border-radius: 8px; background: linear-gradient(135deg, #fdf0f9, #f5efff); color: #8b2d78; }
.study-file-picker:focus-within { outline: 2px solid var(--pp-pink-deep); outline-offset: 2px; }
.study-origin-note { border-radius: 14px; border-color: var(--pp-line-strong); background: rgba(255, 255, 255, .8); }
.study-practice-memory { border-radius: 16px; border-color: rgba(203, 184, 248, .55); background: linear-gradient(135deg, #fdf7ff, #f6f4ff); color: #5b5175; }
.study-practice-reminder section { border-radius: 24px; }

/* 13. 响应式与动效 ------------------------------------------------------ */
@media (max-width: 900px) {
  .topbar { position: static; }
  .main { padding: 16px 14px 28px; }
  .card, .hero-card { padding: 18px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
  .primary:hover, body #dashboard .dashboard-action-card:hover { transform: none; }
}
/* 14. 布局修正 -----------------------------------------------------------
   上游在几处用了 !important，这里必须同级 + 后置。原则：
   只改视觉（边框/圆角/阴影/留白），不改 position 与 width，
   避免和上游自己的断点（≥1100 浮起、≤720 底部导航）打架。 */

/* 顶栏：恢复页面标题，玻璃质感 */
body .topbar {
  justify-content: space-between !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 13px 20px !important;
  margin: 0 0 14px !important;
  background: rgba(255, 251, 254, .86) !important;
  border: 1px solid var(--pp-line) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px -24px rgba(120, 86, 190, .6) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}
body .topbar > div:first-child { display: block !important; flex: 0 0 auto; white-space: nowrap; }
body .topbar #page-title { white-space: nowrap; }
body .topbar .kicker { display: block; margin-bottom: 2px; }
body .topbar h1 { font-size: 21px; line-height: 1.3; }
body .topbar .top-actions { margin-left: auto !important; flex: 0 1 auto; min-width: 0; }
body .topbar .bank-picker-v1 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 470px;
  height: 42px;
  padding: 0 12px 0 13px;
  border-radius: 14px;
  border: 1px solid rgba(203, 184, 248, .85);
  background: linear-gradient(180deg, #fff 0%, #fbf6ff 100%);
  box-shadow: 0 6px 16px rgba(122, 86, 180, .07);
  transition: border-color .18s ease, box-shadow .18s ease;
}
body .topbar .bank-picker-v1:hover { border-color: #cda8f0; box-shadow: 0 8px 20px rgba(122, 86, 180, .12); }
body .topbar .bank-picker-v1:focus-within { border-color: #b8469a; box-shadow: 0 0 0 3px rgba(184, 70, 154, .13); }
body .topbar .bank-picker-icon { flex: 0 0 auto; width: 17px; height: 17px; color: #a06bd8; }
/* 原生 select 退居幕后：透明、不可点，只当数据源（app.js 与测试仍然读写它） */
body.bank-picker-ready .topbar .bank-picker-native {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100% !important;
  height: 100%;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}
body:not(.bank-picker-ready) .bank-picker-trigger,
body:not(.bank-picker-ready) .bank-picker-menu { display: none !important; }

/* 触发器 */
body .topbar .bank-picker-trigger {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font: inherit;
  text-align: left;
  color: #3a3350;
  cursor: pointer;
}
body .topbar .bank-picker-trigger:disabled { cursor: default; }
body .bank-picker-value { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; }
body .bank-picker-value .bp-group { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 600; color: #6f6785; }
body .bank-picker-value .bp-sep { flex: 0 0 auto; font-size: 12px; color: #c3b3dd; }
body .bank-picker-value .bp-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; font-weight: 700; color: #3a3350; }
body .bank-picker-value .bp-count { flex: 0 0 auto; padding: 1px 7px; border-radius: 999px; background: #f3ebff; color: #7a5aa8; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
body .topbar .bank-picker-caret { flex: 0 0 auto; width: 14px; height: 14px; color: #a06bd8; transition: transform .18s ease; }
body .topbar .bank-picker-v1.is-open .bank-picker-caret { transform: rotate(180deg); }
body .topbar .bank-picker-v1.is-disabled { border-color: rgba(203, 184, 248, .5); box-shadow: none; background: #fcfaff; }
body .topbar .bank-picker-v1.is-disabled .bp-name { color: #6f6785; font-weight: 600; }
body .topbar .bank-picker-v1.is-disabled .bank-picker-caret { display: none; }

/* 面板 */
body .bank-picker-menu {
  position: fixed;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: min(60vh, 340px);
  overflow: auto;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(203, 184, 248, .9);
  background: #fffdfe;
  box-shadow: 0 18px 40px rgba(94, 58, 150, .18), 0 2px 6px rgba(94, 58, 150, .08);
  animation: bankPickerIn .14s ease both;
}
body .bank-picker-menu[hidden] { display: none !important; }
@keyframes bankPickerIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
body .bank-picker-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  box-shadow: none;
  font: inherit;
  text-align: left;
  color: #3a3350;
  cursor: pointer;
}
body .bank-picker-option:hover,
body .bank-picker-option.is-focus { background: #f9f0ff; }
body .bank-picker-option.is-active { background: linear-gradient(120deg, #fdeefb, #f3ecff); }
body .bank-picker-option .bp-group { flex: 0 0 auto; font-size: 12px; color: #6f6785; }
body .bank-picker-option .bp-sep { flex: 0 0 auto; font-size: 12px; color: #c3b3dd; }
body .bank-picker-option .bp-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
body .bank-picker-option.is-active .bp-name { font-weight: 800; color: #8b2d78; }
body .bank-picker-option .bp-count { flex: 0 0 auto; font-size: 11.5px; color: #6f6785; font-variant-numeric: tabular-nums; }
body .bank-picker-option .bp-check { flex: 0 0 auto; width: 14px; height: 14px; color: #b8469a; opacity: 0; }
body .bank-picker-option.is-active .bp-check { opacity: 1; }

/* 上游移动端把 .top-actions 里的 select/button 统一成 54px 高、18px 大圆角，
   这里用更高优先级把它盖回来，弹出的选项才是紧凑的小圆角行。 */
body .topbar .bank-picker-v1 .bank-picker-menu .bank-picker-option {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 9px 10px !important;
  border-radius: 10px !important;
}
body .topbar .bank-picker-v1 .bank-picker-trigger {
  width: auto !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
@media (max-width: 720px) {
  body .topbar .bank-picker-v1 .bank-picker-menu .bank-picker-option { min-height: 46px !important; padding: 8px 10px !important; }
}
body .topbar .top-actions button { flex: 0 0 auto; white-space: nowrap; }

/* 侧栏：在它本来就浮起的那一档里，把它做成一张卡片 */
@media (min-width: 1100px) {
  body .side {
    border: 1px solid rgba(203, 184, 248, .55) !important;
    border-radius: 22px !important;
    box-shadow: 0 26px 60px -38px rgba(120, 86, 190, .65) !important;
    background: linear-gradient(180deg, rgba(255, 253, 255, .97), rgba(250, 246, 255, .93)) !important;
    overflow-y: auto;
    scrollbar-width: none;
  }
  body .side::-webkit-scrollbar { display: none; }
  body .brand { margin-bottom: 16px; }
  body .brand img { width: 40px; height: 40px; border-radius: 13px; }
  body .brand b { font-size: 19px; }
  body .brand span { font-size: 10.5px; }
}

/* 导航：加大点击区，别再挤在一起 */
body .nav {
  min-height: 42px;
  display: flex;
  align-items: center;
  font-size: 13.5px;
  padding: 0 12px;
  margin: 3px 0;
}

/* 首页卡片底部按钮：并排，别叠成两条长条 */
body #dashboard .dashboard-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}
body #dashboard .dashboard-card-actions button { width: 100%; }

/* 中间宽度（≤1180，首页 hero 变成单列）：四宫格收成两列，统计不要被挤成竖排 */
@media (max-width: 1180px) {
  body #dashboard .dashboard-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body #dashboard .dashboard-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    justify-self: stretch !important;
    align-self: stretch !important;
  }
  body #dashboard .dashboard-home-side {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
  }
  body #dashboard .dashboard-character-card { align-self: stretch !important; width: 100% !important; }
}

/* 首页下栏：删掉数据备份卡后只剩两块，别再留第三列空位 */
@media (min-width: 1181px) {
  body #dashboard .dashboard-lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

/* 首页插画卡：给角色一个柔光台座 */
body #dashboard .dashboard-character-card {
  background:
    radial-gradient(circle at 50% 46%, #ffffff 0%, #fdf4ff 52%, #f3eeff 100%) !important;
  border: 1px solid rgba(203, 184, 248, .45) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}

/* 手机：顶栏与首页插画收一收 */
@media (max-width: 720px) {
  body .topbar {
    border-radius: 20px !important;
    border: 1px solid var(--pp-line) !important;
    background: rgba(255, 251, 254, .92) !important;
    padding: 12px 16px !important;
    margin: 0 4px 16px !important;
  }
  body .topbar h1 { font-size: 18px; }
  body .topbar .kicker { font-size: 10.5px; }
  body #dashboard .dashboard-character-card { max-height: 150px !important; min-height: 140px !important; }
  body #dashboard .dashboard-character-card .hero-mascot-main { max-height: 128px !important; }
  /* 顶栏一行放下：题库选择器伸缩，保存按钮不变形 */
  body .topbar { flex-wrap: wrap !important; row-gap: 10px !important; }
  body .topbar .top-actions {
    display: block !important;
    width: 100% !important;
    margin-left: 0 !important;
  }
  body .topbar .bank-picker-v1 { width: 100%; max-width: none; }
  body .topbar .top-actions button { width: auto !important; white-space: nowrap; }

  /* 首页快捷入口两列，不要一行一个 */
  body #dashboard .dashboard-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  /* 底部导航：一行横滑，实底不透明，别再让内容从背后透出来 */
  body .side {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 9px 12px !important;
    border: 1px solid rgba(203, 184, 248, .62) !important;
    border-radius: 20px !important;
    background: rgba(255, 251, 254, .97) !important;
    box-shadow: 0 -12px 34px -20px rgba(120, 86, 190, .55) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    scrollbar-width: none;
  }
  body .side::-webkit-scrollbar { display: none; }
  body .side .brand { display: none !important; }
  body .side .nav { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; margin: 0 !important; white-space: nowrap; padding: 0 14px !important; }
  body .side .nav.active::before { display: none; }
  body .main { padding-bottom: 104px !important; }
}


/* 15. 今日练习卡：上次同步 / 日期徽标 / 空态 --------------------------- */
body #dashboard .dashboard-panel > .section-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body #dashboard .study-daily-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 2px 0 14px;
  padding: 12px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(203, 184, 248, .8);
  background: linear-gradient(120deg, #fdf5ff 0%, #f7f2ff 58%, #f1f5ff 100%);
}
body #dashboard .study-daily-empty[hidden] { display: none !important; }
body #dashboard .study-daily-empty-art {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
body #dashboard .study-daily-empty-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
body #dashboard .study-daily-empty-copy b { font-size: 16px; font-weight: 800; color: #6b3fa8; letter-spacing: .02em; }
body #dashboard .study-daily-empty-copy small { font-size: 12.5px; line-height: 1.62; color: #6f6785; }

@media (max-width: 560px) {
  body #dashboard .study-daily-empty { gap: 8px; padding: 8px 12px 8px 2px; }
  body #dashboard .study-daily-empty-art { width: 72px; height: 72px; }
  body #dashboard .study-daily-empty-copy b { font-size: 15px; }
  body #dashboard .study-daily-empty-copy small { font-size: 12px; }
}
body #dashboard #daily-activity-summary-v1 {
  margin: 2px 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #6f6785;
}
body #dashboard #daily-activity-summary-v1:empty { display: none; }

/* 旧记录无法计入时的提示：只在真的有问题时出现，平时不占版面 */
body #dashboard .study-daily-caution {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid #f2dfbc;
  background: #fff8ec;
  color: #8a5a12;
  font-size: 12px;
  line-height: 1.6;
}

/* 下排两张卡等高（去掉 kicker 后左卡变矮，避免底边参差） */
body #dashboard .dashboard-lower-grid { align-items: stretch !important; }

/* 16. 未完成练习条（首页 / 练习设置页） -------------------------------- */
body #personal-practice-setup-v1 {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  padding: 14px 18px 14px 14px;
  border-radius: 20px;
  border: 1px solid rgba(203, 184, 248, .85);
  background: linear-gradient(115deg, #fff4fb 0%, #f8f1ff 55%, #eef3ff 100%);
  box-shadow: 0 10px 24px rgba(122, 86, 180, .09);
}
body #personal-practice-setup-v1[hidden] { display: none !important; }

body #personal-practice-setup-v1::before {
  content: "";
  flex: 0 0 auto;
  width: 76px;
  height: 84px;
  background: url("../media/quiz_in_progress_study.webp") center / contain no-repeat;
  mix-blend-mode: multiply;
}

body #personal-practice-setup-v1 .pm-info-v1 { display: flex; flex-direction: column; gap: 3px; flex: 1 1 260px; min-width: 0; }
body #personal-practice-setup-v1 .pm-info-v1 > b { font-size: 15px; font-weight: 800; color: #7a2f8f; letter-spacing: .01em; }
body #personal-practice-setup-v1 .pm-info-v1 > p { margin: 0; overflow-wrap: anywhere; }
body #personal-practice-setup-v1 .pm-summary-v1 { font-size: 13.5px; line-height: 1.55; color: #4b4360; font-variant-numeric: tabular-nums; }
body #personal-practice-setup-v1 .pm-status-v1 { font-size: 12px; line-height: 1.55; color: #6f6785; }

body #personal-practice-setup-v1 .pm-actions-v1 { display: flex; flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 0 auto; }
body #personal-practice-setup-v1 .pm-actions-v1 > button { flex: 0 0 auto; border-radius: 999px; white-space: nowrap; }

body .study-practice-memory.is-error { border-color: #f0cfae; background: linear-gradient(115deg, #fff8f1, #fff2f4); box-shadow: 0 10px 24px rgba(190, 120, 60, .1); }
body .study-practice-memory.is-error .pm-info-v1 > b { color: #a4532c; }
body .study-practice-memory.is-error .pm-summary-v1 { color: #8f4b30; }

@media (max-width: 720px) {
  body #personal-practice-setup-v1 { gap: 10px 12px; padding: 12px 14px; }
  body #personal-practice-setup-v1::before { width: 54px; height: 60px; }
  body #personal-practice-setup-v1 .pm-info-v1 { flex: 1 1 150px; }
  body #personal-practice-setup-v1 .pm-actions-v1 { width: 100%; margin: 2px 0 0; }
  body #personal-practice-setup-v1 .pm-actions-v1 > button { flex: 1 1 0; }
}

/* ==================== 十、导入题库页 ==================== */

body #import.active { display: flex; flex-direction: column; gap: 18px; }
body #import > .card {
  margin: 0 !important;
  padding: 22px 24px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(203, 184, 248, .55) !important;
  background: #fff !important;
  box-shadow: 0 14px 34px rgba(122, 86, 180, .08) !important;
}

/* —— 标题行 —— */
body #import .section-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin: 0 0 18px !important;
}
body #import .section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #332c46;
}
body #import .section-head h2::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 19px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f38ac8, #8a5ce0);
}
body #import .section-head > .ghost {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(203, 184, 248, .9) !important;
  background: #fff !important;
  font-size: 12.5px;
  font-weight: 700;
  color: #6b3fa8;
}
body #import .section-head > .ghost:hover { background: #faf4ff !important; border-color: #c9a6ef !important; }

/* —— 引导条：说明 + 步骤 + 插画 —— */
body #import .import-stage-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 132px !important;
  align-items: center !important;
  gap: 16px !important;
  margin: 0 0 18px !important;
  padding: 16px 18px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(216, 199, 246, .8) !important;
  background: linear-gradient(120deg, #fff5fb, #f8f1ff 58%, #eef3ff) !important;
  overflow: hidden;
}
body #import .import-stage-panel::after {
  right: -30px !important;
  top: -40px !important;
  width: 160px !important;
  height: 160px !important;
  background: rgba(197, 160, 240, .18) !important;
  filter: blur(16px) !important;
}
body #import .import-stage-copy b {
  font-size: 14.5px !important;
  font-weight: 800;
  color: #5c2c86 !important;
  margin-bottom: 6px !important;
}
body #import .import-stage-copy p { font-size: 12.5px !important; line-height: 1.75 !important; color: #6f6785 !important; }
body #import .import-stage-tags { gap: 7px !important; margin-top: 12px !important; }
body #import .stage-tag {
  padding: 5px 11px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(203, 184, 248, .8) !important;
  background: rgba(255, 255, 255, .85) !important;
  font-size: 11.5px !important;
  font-weight: 700;
  color: #6f6785 !important;
}
body #import .stage-tag.active {
  background: linear-gradient(120deg, #fdeefb, #f1e6ff) !important;
  border-color: #e8c8f2 !important;
  color: #8b2d78 !important;
}
body #import .import-stage-art { display: flex; justify-content: center; align-items: center; }
body #import .import-stage-art img { width: 100%; max-width: 118px; height: auto; }

/* —— 表单 —— */
body #import .form-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 14px 16px !important;
  margin: 0 !important;
}
body #import .form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: #6f6785;
  letter-spacing: .1px;
}
body #import .form-grid input:not([type="file"]),
body #import .form-grid select {
  width: 100% !important;
  height: 42px !important;
  min-height: 0 !important;
  padding: 0 13px !important;
  border-radius: 12px !important;
  border: 1px solid #e8ddf8 !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(122, 86, 180, .05);
  font-size: 13.5px !important;
  font-weight: 600;
  color: #3a3350;
}
body #import .form-grid input:not([type="file"]):focus,
body #import .form-grid select:focus {
  border-color: #c9a6ef !important;
  box-shadow: 0 0 0 3px rgba(184, 70, 154, .12) !important;
  outline: none !important;
}
body #import .form-grid input::placeholder { color: #a79cc0; font-weight: 500; }

/* 文件选择 */
body #import .study-file-picker {
  display: flex !important;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 6px !important;
  border-radius: 12px !important;
  border: 1px dashed #d9c6f2 !important;
  background: #fdfaff !important;
  overflow: hidden;
}
body #import .study-file-button {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f9d9ee, #ece0ff);
  color: #7a2f8f;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}
body #import .study-file-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: #6f6785;
}

/* —— 粘贴框 —— */
body #import #import-text {
  width: 100% !important;
  min-height: 236px !important;
  margin: 16px 0 0 !important;
  padding: 16px 18px !important;
  border-radius: 18px !important;
  border: 1px solid #e8ddf8 !important;
  background: #fffdfe !important;
  box-shadow: inset 0 1px 3px rgba(122, 86, 180, .04);
  font-size: 13.5px !important;
  line-height: 1.85 !important;
  color: #3a3350;
  resize: vertical;
}
body #import #import-text:focus { border-color: #c9a6ef !important; box-shadow: 0 0 0 3px rgba(184, 70, 154, .12) !important; outline: none !important; }
body #import #import-text::placeholder { color: #a297ba; line-height: 1.9; }

/* —— 底部动作条 —— */
body #import .import-actions-v51 {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px !important;
  margin: 16px 0 0 !important;
  padding-top: 16px !important;
  border-top: 1px dashed rgba(203, 184, 248, .8) !important;
}
body #import .import-actions-v51 button,
body #import .actions > button { border-radius: 999px !important; }
body #import .import-actions-v51 button {
  height: 40px;
  padding: 0 18px !important;
  font-size: 13.5px;
  font-weight: 700;
}
body #import .import-actions-spacer-v51 { flex: 1 1 auto; }

/* —— 双文件导入 —— */
body #import > .card > p.muted {
  margin: 0 0 16px !important;
  padding: 12px 16px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(203, 184, 248, .45) !important;
  border-left: 3px solid #e7c9f4 !important;
  background: #fcf8ff !important;
  font-size: 12.5px !important;
  line-height: 1.75 !important;
  color: #6f6785 !important;
}
body #import .split-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 14px !important;
  margin: 16px 0 0 !important;
}
body #import .split-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; font-weight: 700; color: #6f6785; }
body #import .split-grid textarea {
  width: 100% !important;
  min-height: 190px !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  border-radius: 16px !important;
  border: 1px solid #e8ddf8 !important;
  background: #fffdfe !important;
  font-size: 13px !important;
  line-height: 1.8 !important;
  color: #3a3350;
  resize: vertical;
}
body #import .split-grid textarea:focus { border-color: #c9a6ef !important; box-shadow: 0 0 0 3px rgba(184, 70, 154, .12) !important; outline: none !important; }
body #import .split-grid textarea::placeholder { color: #a297ba; }

/* —— 格式说明 —— */
body #import > .card.import-help-details { padding: 0 !important; overflow: hidden; }
body #import .import-help-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 24px !important;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 800;
  color: #4b3a6b;
}
body #import .import-help-details > summary::-webkit-details-marker { display: none; }
body #import .import-help-details > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-right: 2px solid #a06bd8;
  border-bottom: 2px solid #a06bd8;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
body #import .import-help-details[open] > summary { border-bottom: 1px dashed rgba(203, 184, 248, .7); }
body #import .import-help-details[open] > summary::after { transform: rotate(-135deg); }
body #import .import-help-details > h2 { margin: 18px 24px 8px !important; padding: 0 !important; font-size: 14px; font-weight: 800; color: #332c46; }
body #import .import-help-details > p { margin: 0 24px 16px !important; padding: 0 !important; font-size: 12.5px; line-height: 1.8; color: #6f6785; }
body #import .import-help-details > p code { padding: 1px 6px; border-radius: 6px; background: #f4ecff; color: #7a2f8f; font-size: 11.5px; }
body #import .import-help-details > .help-grid { padding: 0 24px 22px !important; }
body #import .help-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
  gap: 12px !important;
}
body #import .help-grid > div {
  padding: 12px 14px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(203, 184, 248, .5) !important;
  background: #fcf9ff !important;
}
body #import .help-grid b { display: block; margin-bottom: 6px; font-size: 12.5px; color: #7a2f8f; }
body #import .help-grid code {
  display: block;
  font-size: 11.5px;
  line-height: 1.75;
  color: #5b5370;
  white-space: pre-wrap;
  word-break: break-word;
}

/* —— 识别结果预览 —— */
body #import .import-preview-head-v5981 { align-items: flex-start !important; }
body #import .import-preview-title-v5981 h2 { font-size: 19px; }
body #import .import-preview-title-v5981 .muted { margin: 6px 0 0; font-size: 12.5px; line-height: 1.7; color: #6f6785; }
body #import #import-summary.notice {
  margin: 0 0 14px !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(203, 184, 248, .55) !important;
  background: #fbf7ff !important;
  font-size: 12.5px;
  color: #6f6785 !important;
}
body #import .table-wrap {
  border-radius: 16px !important;
  border: 1px solid rgba(203, 184, 248, .6) !important;
  overflow: auto;
  background: #fff;
}
body #import #import-preview { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
body #import #import-preview thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 12px;
  background: #faf5ff;
  border-bottom: 1px solid rgba(216, 199, 246, .85);
  font-size: 12px;
  font-weight: 800;
  color: #6f6785;
  white-space: nowrap;
}
body #import #import-preview tbody td { padding: 10px 12px; border-bottom: 1px solid #f4eefc; color: #3a3350; vertical-align: top; }
body #import #import-preview tbody tr:hover td { background: #fdf7ff; }
body #import #import-preview tbody tr:last-child td { border-bottom: 0; }

/* —— 宽屏两栏：左边干活，右边常驻说明 —— */
@media (min-width: 1240px) {
  body #import > .card:not(.import-help-details):first-of-type {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas:
      "head head"
      "form guide"
      "text guide"
      "actions actions";
    column-gap: 22px;
    row-gap: 0;
    align-items: start;
  }
  body #import > .card:first-of-type > .section-head { grid-area: head; }
  body #import > .card:first-of-type > .form-grid { grid-area: form; }
  body #import > .card:first-of-type > #import-text { grid-area: text; }
  body #import > .card:first-of-type > .import-stage-panel { grid-area: guide; margin: 0 !important; position: sticky; top: 18px; }
  body #import > .card:first-of-type > .import-actions-v51 { grid-area: actions; }
  body #import > .card:first-of-type > .import-stage-panel + .form-grid { margin-top: 0 !important; }
  body #import .import-stage-panel {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 18px !important;
    align-self: start;
  }
  body #import .import-stage-art { order: -1; }
  body #import .import-stage-art img { max-width: 132px; }
  body #import .import-stage-tags { flex-direction: column; align-items: stretch; }
  body #import .stage-tag { display: flex; justify-content: center; }
  body #import .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* —— 窄屏 —— */
@media (max-width: 720px) {
  body #import.active { gap: 14px; }
  body #import > .card { padding: 18px 16px !important; border-radius: 18px !important; }
  body #import .section-head { flex-wrap: wrap; align-items: flex-start !important; }
  body #import .section-head h2 { font-size: 17px; }
  body #import .import-stage-panel { grid-template-columns: minmax(0, 1fr) !important; text-align: left; }
  body #import .import-stage-art { order: -1; }
  body #import .import-stage-art img { max-width: 108px; }
  body #import .import-actions-v51 button { flex: 1 1 auto; }
  body #import .import-actions-spacer-v51 { display: none; }
  body #import .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
}


/* 导入页微调：步骤改成左对齐小胶囊、插画融进底色、预览工具条统一成胶囊 */
body #import .import-stage-art { background: none !important; border: 0 !important; box-shadow: none !important; }
body #import .import-stage-art img { mix-blend-mode: multiply; }
body #import .stage-tag {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start !important;
  width: auto !important;
  text-align: left;
}
body #import .import-stage-tags { align-items: flex-start !important; }
@media (min-width: 1240px) {
  body #import .import-stage-tags { align-items: stretch !important; }
  body #import .stage-tag { justify-content: center !important; }
}
@media (max-width: 1239px) {
  body #import .import-stage-tags { flex-direction: row !important; flex-wrap: wrap; }
}
body #import .import-preview-head-v5981 .row-actions,
body #import .import-preview-head-v5981 .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
body #import .import-preview-head-v5981 .row-actions button,
body #import .import-preview-head-v5981 .actions button {
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 700;
}
body #import .import-preview-head-v5981 select {
  height: 34px !important;
  min-height: 0 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(203, 184, 248, .85) !important;
  background: #fff !important;
  font-size: 12.5px !important;
  padding: 0 12px !important;
}
@media (min-width: 900px) {
  body #import > .card:nth-of-type(2) > .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* 上游给导入插画套了「白卡片 + isolation + mix-blend:normal !important」，这里整块拆掉，让素材融进渐变底色 */
body #import .import-stage-art { isolation: auto !important; }
body #import .import-stage-art::before,
body #import .import-stage-art::after { content: none !important; display: none !important; }
body #import .import-stage-art img { mix-blend-mode: multiply !important; }
@media (min-width: 1240px) {
  body #import .import-stage-tags { align-items: flex-start !important; }
  body #import .stage-tag { width: auto !important; justify-content: flex-start !important; }
}

@media (max-width: 720px) {
  body #import .import-stage-art {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    justify-content: center !important;
    margin: 0 0 2px !important;
    overflow: visible !important;
  }
  body #import .import-art-main {
    position: static !important;
    width: 96px !important;
    max-width: 96px !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
  }
  body #import .import-stage-panel { padding: 14px 14px 16px !important; text-align: left; }
  body #import .import-stage-copy b { font-size: 13.5px !important; }
  body #import .import-stage-copy p { font-size: 12px !important; line-height: 1.7 !important; }
}

/* 手机上导入引导条横向排：左文右图，别让图占一整行 */
@media (max-width: 720px) {
  body #import .import-stage-panel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 92px !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 13px 14px !important;
  }
  body #import .import-stage-art { order: 2; margin: 0 !important; }
  body #import .import-stage-copy { order: 1; }
  body #import .import-art-main { width: 84px !important; max-width: 84px !important; }
  body #import .import-stage-copy b { font-size: 13px !important; }
  body #import .import-stage-copy p { display: none !important; }
  body #import .import-stage-tags { gap: 6px !important; margin-top: 8px !important; }
  body #import .stage-tag { padding: 4px 9px !important; font-size: 10.5px !important; }
}
/* 首页标题栏：使用本地日期和时间，让顶部保持简洁。 */
body[data-active-view="dashboard"] .topbar { display: flex !important; flex-wrap: nowrap !important; }
body .topbar .home-header-clock { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: min(50%, 420px); min-width: 0; margin-left: auto; font-variant-numeric: tabular-nums; }
body .topbar .home-header-clock[hidden] { display: none !important; }
body .topbar .home-header-date { display: grid; gap: 3px; color: #756586; font-size: 12px; line-height: 1.2; white-space: nowrap; }
body .topbar .home-header-date span:last-child { color: #a174b1; }
body .topbar .home-header-divider { flex: 1; height: 1px; background: linear-gradient(90deg, #eadcf3, #d4c2ed); }
body .topbar .home-header-time { color: #7644ac; font-family: ui-monospace, Consolas, monospace; font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: .03em; white-space: nowrap; }
body .topbar .home-header-time small { color: #ac86c0; font-size: .62em; font-weight: 600; }
@media (max-width: 720px) {
  body .topbar .home-header-clock { width: auto; gap: 10px; }
  body .topbar .home-header-divider { flex: none; width: 1px; height: 28px; }
}
@media (max-width: 420px) {
  body .topbar .home-header-clock { gap: 8px; }
  body .topbar .home-header-date { font-size: 10px; }
  body .topbar .home-header-time { font-size: 19px; }
}
