:root {
  --bg: #f4f0e8;
  --bg-accent: radial-gradient(circle at top left, rgba(var(--brand-rgb), 0.16), transparent 32%), radial-gradient(circle at bottom right, rgba(199, 107, 42, 0.16), transparent 28%), #f4f0e8;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-strong: #fffdf8;
  --panel-rgb: 255, 252, 247;
  --line: rgba(var(--text-rgb), 0.12);
  --text: #2d261f;
  --text-rgb: 45, 38, 31;
  --muted: #726556;
  --brand: #1f7a6c;
  --brand-rgb: 31, 122, 108;
  --brand-dark: #16594f;
  --brand-hover: #238878;
  --brand-dark-hover: #144f46;
  --accent: #c76b2a;
  --danger: #bf4b3d;
  --danger-rgb: 191, 75, 61;
  --shadow: 0 18px 45px rgba(69, 52, 34, 0.12);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --el-color-primary: var(--brand);
  --el-color-primary-light-3: #47998c;
  --el-color-primary-light-5: #7ab8ad;
  --el-color-primary-light-8: #d8ebe7;
  --el-color-primary-dark-2: var(--brand-dark);
  --el-color-danger: var(--danger);
  --el-border-radius-base: 14px;
  --el-border-radius-round: 999px;
  --el-border-color: rgba(var(--text-rgb), 0.12);
  --el-border-color-light: rgba(var(--text-rgb), 0.08);
  --el-fill-color-blank: rgba(255, 252, 247, 0.92);
  --el-fill-color-light: rgba(248, 244, 236, 0.88);
  --el-text-color-primary: var(--text);
  --el-text-color-regular: var(--muted);
  --el-mask-color: rgba(39, 31, 24, 0.32);
  --sidebar-expanded-width: 260px;
  --sidebar-collapsed-width: 76px;
}

:root[data-theme="sage-apricot"] {
  --bg: #f4f0e8;
  --bg-accent: radial-gradient(circle at top left, rgba(var(--brand-rgb), 0.16), transparent 32%), radial-gradient(circle at bottom right, rgba(199, 107, 42, 0.16), transparent 28%), #f4f0e8;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-strong: #fffdf8;
  --panel-rgb: 255, 252, 247;
  --text: #2d261f;
  --text-rgb: 45, 38, 31;
  --muted: #726556;
  --brand: #1f7a6c;
  --brand-rgb: 31, 122, 108;
  --brand-dark: #16594f;
  --brand-hover: #238878;
  --brand-dark-hover: #144f46;
  --accent: #c76b2a;
  --danger: #bf4b3d;
  --danger-rgb: 191, 75, 61;
  --shadow: 0 18px 45px rgba(69, 52, 34, 0.12);
  --el-color-primary-light-3: #47998c;
  --el-color-primary-light-5: #7ab8ad;
  --el-color-primary-light-8: #d8ebe7;
  --el-fill-color-blank: rgba(255, 252, 247, 0.92);
  --el-fill-color-light: rgba(248, 244, 236, 0.88);
  --el-mask-color: rgba(39, 31, 24, 0.32);
}

:root[data-theme="lake-sand"] {
  --bg: #eef4f5;
  --bg-accent: radial-gradient(circle at top left, rgba(54, 125, 153, 0.15), transparent 34%), radial-gradient(circle at bottom right, rgba(214, 151, 96, 0.15), transparent 28%), #eef4f5;
  --panel: rgba(251, 254, 255, 0.92);
  --panel-strong: #ffffff;
  --panel-rgb: 251, 254, 255;
  --text: #21303a;
  --text-rgb: 33, 48, 58;
  --muted: #5f717b;
  --brand: #367d99;
  --brand-rgb: 54, 125, 153;
  --brand-dark: #245a70;
  --brand-hover: #418cab;
  --brand-dark-hover: #1d4f63;
  --accent: #d69760;
  --danger: #c2615a;
  --danger-rgb: 194, 97, 90;
  --shadow: 0 18px 45px rgba(37, 56, 66, 0.12);
  --el-color-primary-light-3: #5a95ad;
  --el-color-primary-light-5: #83b2c4;
  --el-color-primary-light-8: #dceaf1;
  --el-fill-color-blank: rgba(251, 254, 255, 0.92);
  --el-fill-color-light: rgba(241, 247, 249, 0.88);
  --el-mask-color: rgba(28, 39, 47, 0.32);
}

:root[data-theme="olive-clay"] {
  --bg: #f3f1e8;
  --bg-accent: radial-gradient(circle at top left, rgba(101, 125, 76, 0.15), transparent 34%), radial-gradient(circle at bottom right, rgba(184, 128, 92, 0.16), transparent 28%), #f3f1e8;
  --panel: rgba(255, 253, 248, 0.92);
  --panel-strong: #fffdf9;
  --panel-rgb: 255, 253, 248;
  --text: #2e2a24;
  --text-rgb: 46, 42, 36;
  --muted: #74695e;
  --brand: #657d4c;
  --brand-rgb: 101, 125, 76;
  --brand-dark: #4c5f38;
  --brand-hover: #748d59;
  --brand-dark-hover: #435532;
  --accent: #b8805c;
  --danger: #b95b4f;
  --danger-rgb: 185, 91, 79;
  --shadow: 0 18px 45px rgba(71, 61, 50, 0.12);
  --el-color-primary-light-3: #839566;
  --el-color-primary-light-5: #a6b58b;
  --el-color-primary-light-8: #e2e8da;
  --el-fill-color-blank: rgba(255, 253, 248, 0.92);
  --el-fill-color-light: rgba(247, 244, 236, 0.88);
  --el-mask-color: rgba(35, 31, 27, 0.32);
}

:root[data-theme="dusk-rose"] {
  --bg: #f5eef0;
  --bg-accent: radial-gradient(circle at top left, rgba(99, 119, 140, 0.15), transparent 34%), radial-gradient(circle at bottom right, rgba(191, 123, 113, 0.14), transparent 28%), #f5eef0;
  --panel: rgba(255, 251, 252, 0.92);
  --panel-strong: #fffdfd;
  --panel-rgb: 255, 251, 252;
  --text: #342b30;
  --text-rgb: 52, 43, 48;
  --muted: #7b6770;
  --brand: #63778c;
  --brand-rgb: 99, 119, 140;
  --brand-dark: #49596a;
  --brand-hover: #74879a;
  --brand-dark-hover: #404f5e;
  --accent: #bf7b71;
  --danger: #b45458;
  --danger-rgb: 180, 84, 88;
  --shadow: 0 18px 45px rgba(77, 63, 70, 0.12);
  --el-color-primary-light-3: #7d8ea0;
  --el-color-primary-light-5: #a2aebb;
  --el-color-primary-light-8: #e4e9ee;
  --el-fill-color-blank: rgba(255, 251, 252, 0.92);
  --el-fill-color-light: rgba(248, 241, 243, 0.88);
  --el-mask-color: rgba(40, 31, 36, 0.32);
}

:root[data-theme="teal-citrus"] {
  --bg: #edf4ef;
  --bg-accent: radial-gradient(circle at top left, rgba(43, 119, 110, 0.15), transparent 34%), radial-gradient(circle at bottom right, rgba(208, 161, 83, 0.15), transparent 28%), #edf4ef;
  --panel: rgba(251, 255, 252, 0.92);
  --panel-strong: #fdfffe;
  --panel-rgb: 251, 255, 252;
  --text: #24312d;
  --text-rgb: 36, 49, 45;
  --muted: #62736b;
  --brand: #2b776e;
  --brand-rgb: 43, 119, 110;
  --brand-dark: #1f5952;
  --brand-hover: #33877d;
  --brand-dark-hover: #1a4d47;
  --accent: #d0a153;
  --danger: #b85a52;
  --danger-rgb: 184, 90, 82;
  --shadow: 0 18px 45px rgba(48, 66, 60, 0.12);
  --el-color-primary-light-3: #4f938b;
  --el-color-primary-light-5: #7fb0a9;
  --el-color-primary-light-8: #d9ebe8;
  --el-fill-color-blank: rgba(251, 255, 252, 0.92);
  --el-fill-color-light: rgba(241, 248, 243, 0.88);
  --el-mask-color: rgba(29, 39, 36, 0.32);
}

:root[data-theme="ink-saffron"] {
  --bg: #f2f3f0;
  --bg-accent: radial-gradient(circle at top left, rgba(64, 96, 117, 0.15), transparent 34%), radial-gradient(circle at bottom right, rgba(194, 145, 74, 0.16), transparent 28%), #f2f3f0;
  --panel: rgba(253, 254, 251, 0.92);
  --panel-strong: #fefffd;
  --panel-rgb: 253, 254, 251;
  --text: #283036;
  --text-rgb: 40, 48, 54;
  --muted: #677179;
  --brand: #406075;
  --brand-rgb: 64, 96, 117;
  --brand-dark: #2d4657;
  --brand-hover: #4f738a;
  --brand-dark-hover: #263d4c;
  --accent: #c2914a;
  --danger: #b05c55;
  --danger-rgb: 176, 92, 85;
  --shadow: 0 18px 45px rgba(49, 57, 63, 0.12);
  --el-color-primary-light-3: #668096;
  --el-color-primary-light-5: #91a3b2;
  --el-color-primary-light-8: #dee5ea;
  --el-fill-color-blank: rgba(253, 254, 251, 0.92);
  --el-fill-color-light: rgba(245, 247, 242, 0.88);
  --el-mask-color: rgba(33, 37, 40, 0.32);
}

:root[data-theme="cedar-peach"] {
  --bg: #f6efe9;
  --bg-accent: radial-gradient(circle at top left, rgba(122, 102, 80, 0.15), transparent 34%), radial-gradient(circle at bottom right, rgba(212, 136, 97, 0.15), transparent 28%), #f6efe9;
  --panel: rgba(255, 252, 248, 0.92);
  --panel-strong: #fffdf9;
  --panel-rgb: 255, 252, 248;
  --text: #342b25;
  --text-rgb: 52, 43, 37;
  --muted: #7a685b;
  --brand: #7a6650;
  --brand-rgb: 122, 102, 80;
  --brand-dark: #5c4b3a;
  --brand-hover: #8a755e;
  --brand-dark-hover: #514133;
  --accent: #d48861;
  --danger: #b55a4f;
  --danger-rgb: 181, 90, 79;
  --shadow: 0 18px 45px rgba(82, 66, 54, 0.12);
  --el-color-primary-light-3: #947f6a;
  --el-color-primary-light-5: #b39f8d;
  --el-color-primary-light-8: #e7e0d9;
  --el-fill-color-blank: rgba(255, 252, 248, 0.92);
  --el-fill-color-light: rgba(249, 243, 239, 0.88);
  --el-mask-color: rgba(41, 33, 29, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg-accent);
  transition: background 0.45s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

[v-cloak] {
  display: none;
}

.bubei-app-content {
  min-height: 100vh;
}

.page-loader {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.page-loader__content {
  display: grid;
  justify-items: center;
  gap: 14px;
  color: var(--brand-dark);
}

.page-loader__logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(var(--brand-rgb), 0.2);
  animation: loader-logo-pulse 1.6s ease-in-out infinite;
}

.page-loader__spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(var(--brand-rgb), 0.17);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: loader-spin 0.8s linear infinite;
}

.page-loader__label {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.bubei-ready .page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 入场动画一律用 backwards：结束后不残留 transform，
   否则容器会成为 fixed 后代（移动端抽屉/评分栏）的包含块 */
.bubei-ready .bubei-app-content {
  visibility: visible;
  animation: page-reveal 0.36s cubic-bezier(0.2, 0.75, 0.3, 1) backwards;
}

.bubei-leaving .bubei-app-content {
  visibility: visible;
  animation: page-exit 0.18s ease both;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes loader-logo-pulse {
  50% { transform: translateY(-3px) scale(1.03); }
}

/* 终帧必须是 transform: none：fill both 会保留终帧值，
   残留 transform 会让容器变成 fixed 后代（移动端抽屉/评分栏）的包含块 */
@keyframes page-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes page-exit {
  to { opacity: 0; transform: translateY(-5px); }
}

.shell-layout {
  min-height: 100vh;
  min-height: 100dvh;
}

.mobile-topbar,
.mobile-nav-backdrop {
  display: none;
}

.bubei-ready .brand-pane {
  animation: sidebar-reveal 0.42s cubic-bezier(0.2, 0.75, 0.3, 1) backwards;
}

.bubei-ready .main-pane {
  animation: content-reveal 0.44s 0.05s cubic-bezier(0.2, 0.75, 0.3, 1) backwards;
}

@keyframes sidebar-reveal {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}

@keyframes content-reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.shell-layout > .el-container {
  align-items: flex-start;
}

.brand-pane {
  position: sticky;
  top: 0;
  align-self: flex-start;
  flex: 0 0 var(--sidebar-expanded-width);
  width: var(--sidebar-expanded-width);
  height: 100vh;
  min-height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(var(--panel-rgb), 0.74);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: flex-basis 0.24s ease, width 0.24s ease, padding 0.24s ease;
}

.brand-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: calc(100vh - 48px);
  padding: 22px 18px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(var(--panel-rgb), 0.82));
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.brand-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.14), rgba(var(--brand-rgb), 0.24));
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-title {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sidebar-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(var(--text-rgb), 0.12);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  color: var(--brand-dark);
  border-color: rgba(var(--brand-rgb), 0.3);
  background: rgba(var(--brand-rgb), 0.1);
}

.sidebar-toggle:focus-visible {
  outline: 2px solid rgba(var(--brand-rgb), 0.5);
  outline-offset: 2px;
}

.sidebar-toggle__icon {
  width: 18px;
  height: 18px;
  background-color: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  transition: transform 0.24s ease;
}

html.bubei-sidebar-collapsed .sidebar-toggle__icon {
  transform: rotate(180deg);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  flex-shrink: 0;
  background-color: currentColor;
  opacity: 0.82;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.nav-link--home .nav-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E");
}

.nav-link--learn .nav-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H20v17H6.5A2.5 2.5 0 0 0 4 22z'/%3E%3Cpath d='M8 7h8'/%3E%3Cpath d='M8 11h8'/%3E%3Cpath d='M8 15h5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H20v17H6.5A2.5 2.5 0 0 0 4 22z'/%3E%3Cpath d='M8 7h8'/%3E%3Cpath d='M8 11h8'/%3E%3Cpath d='M8 15h5'/%3E%3C/svg%3E");
}

.nav-link--review .nav-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.nav-link--library .nav-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6a2 2 0 0 1 2-2h11l3 3v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z'/%3E%3Cpath d='M14 4v4h4'/%3E%3Cpath d='M8 12h8'/%3E%3Cpath d='M8 16h5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6a2 2 0 0 1 2-2h11l3 3v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z'/%3E%3Cpath d='M14 4v4h4'/%3E%3Cpath d='M8 12h8'/%3E%3Cpath d='M8 16h5'/%3E%3C/svg%3E");
}

.nav-link--import .nav-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E");
}

.nav-link--export .nav-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21V6'/%3E%3Cpath d='m7 11 5-5 5 5'/%3E%3Cpath d='M5 3h14'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21V6'/%3E%3Cpath d='m7 11 5-5 5 5'/%3E%3Cpath d='M5 3h14'/%3E%3C/svg%3E");
}

.nav-link--stats .nav-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10'/%3E%3Cpath d='M10 20V4'/%3E%3Cpath d='M16 20v-7'/%3E%3Cpath d='M22 20v-12'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10'/%3E%3Cpath d='M10 20V4'/%3E%3Cpath d='M16 20v-7'/%3E%3Cpath d='M22 20v-12'/%3E%3C/svg%3E");
}

.nav-link--rules .nav-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M7 8h10'/%3E%3Cpath d='M7 16h10'/%3E%3Ccircle cx='12' cy='3' r='1.5'/%3E%3Ccircle cx='12' cy='21' r='1.5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M7 8h10'/%3E%3Cpath d='M7 16h10'/%3E%3Ccircle cx='12' cy='3' r='1.5'/%3E%3Ccircle cx='12' cy='21' r='1.5'/%3E%3C/svg%3E");
}

.nav-link--settings .nav-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.87l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06A1.7 1.7 0 0 0 15 19.4a1.7 1.7 0 0 0-1 .6 1.7 1.7 0 0 0-.4 1.1V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-.4-1.1 1.7 1.7 0 0 0-1-.6 1.7 1.7 0 0 0-1.87.34l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.7 1.7 0 0 0 4.6 15a1.7 1.7 0 0 0-.6-1 1.7 1.7 0 0 0-1.1-.4H2.8a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.1-.4 1.7 1.7 0 0 0 .6-1 1.7 1.7 0 0 0-.34-1.87l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.7 1.7 0 0 0 9 4.6a1.7 1.7 0 0 0 1-.6 1.7 1.7 0 0 0 .4-1.1V2.8a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 .4 1.1 1.7 1.7 0 0 0 1 .6 1.7 1.7 0 0 0 1.87-.34l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.7 1.7 0 0 0 19.4 9c.2.37.5.67.87.87.34.18.72.28 1.1.27h.1a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.1.4c-.37.2-.67.5-.87.87Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.87l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06A1.7 1.7 0 0 0 15 19.4a1.7 1.7 0 0 0-1 .6 1.7 1.7 0 0 0-.4 1.1V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-.4-1.1 1.7 1.7 0 0 0-1-.6 1.7 1.7 0 0 0-1.87.34l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.7 1.7 0 0 0 4.6 15a1.7 1.7 0 0 0-.6-1 1.7 1.7 0 0 0-1.1-.4H2.8a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.1-.4 1.7 1.7 0 0 0 .6-1 1.7 1.7 0 0 0-.34-1.87l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.7 1.7 0 0 0 9 4.6a1.7 1.7 0 0 0 1-.6 1.7 1.7 0 0 0 .4-1.1V2.8a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 .4 1.1 1.7 1.7 0 0 0 1 .6 1.7 1.7 0 0 0 1.87-.34l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.7 1.7 0 0 0 19.4 9c.2.37.5.67.87.87.34.18.72.28 1.1.27h.1a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.1.4c-.37.2-.67.5-.87.87Z'/%3E%3C/svg%3E");
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-dark);
  border-color: rgba(var(--brand-rgb), 0.14);
  background: rgba(var(--brand-rgb), 0.12);
}

.nav-link:hover {
  transform: translateX(3px);
}

.nav-link:hover .nav-icon,
.nav-link.is-active .nav-icon {
  opacity: 1;
}

.main-pane {
  min-width: 0;
  padding: 26px;
}

@media (min-width: 901px) {
  .brand-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 32px;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 2px;
    align-items: center;
  }

  .brand-head .brand-mark {
    grid-row: 1 / span 2;
  }

  .brand-head .brand-copy {
    display: contents;
  }

  .brand-head .brand-kicker {
    grid-column: 2;
    grid-row: 1;
  }

  .brand-head .brand-title {
    grid-column: 2 / 4;
    grid-row: 2;
    margin-top: 0;
    font-size: 24px;
    white-space: nowrap;
  }

  .brand-head .sidebar-toggle {
    grid-column: 3;
    grid-row: 1;
    margin-left: 0;
  }

  html.bubei-sidebar-collapsed .brand-pane {
    flex-basis: var(--sidebar-collapsed-width);
    width: var(--sidebar-collapsed-width);
    padding-inline: 10px;
  }

  html.bubei-sidebar-collapsed .brand-card {
    gap: 18px;
    padding-inline: 10px;
  }

  html.bubei-sidebar-collapsed .brand-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-inline: 0;
  }

  html.bubei-sidebar-collapsed .brand-copy,
  html.bubei-sidebar-collapsed .nav-label {
    display: none;
  }

  html.bubei-sidebar-collapsed .sidebar-toggle {
    margin-left: 0;
  }

  html.bubei-sidebar-collapsed .nav-link {
    justify-content: center;
    gap: 0;
    padding-inline: 13px;
  }

  html.bubei-sidebar-collapsed .nav-link:hover {
    transform: none;
  }
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.surface {
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.surface-pad {
  padding: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-title {
  font-size: 22px;
}

.page-copy {
  margin: 6px 0 0;
  color: var(--muted);
}

.rules-journey {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.rules-journey__step {
  min-height: 94px;
  padding: 16px;
  border-left: 3px solid rgba(var(--brand-rgb), 0.48);
  background: rgba(var(--brand-rgb), 0.06);
}

.rules-journey__label,
.rules-item__label {
  color: var(--muted);
  font-size: 13px;
}

.rules-journey__value {
  margin-top: 8px;
  color: var(--brand-dark);
  font-size: 20px;
  font-weight: 700;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rules-section {
  display: grid;
  gap: 18px;
}

.rules-section__header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.rules-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.rules-item {
  padding: 14px 16px;
  border-left: 3px solid rgba(var(--brand-rgb), 0.4);
  background: rgba(var(--panel-rgb), 0.45);
}

.rules-table-wrap {
  overflow-x: auto;
}

.rules-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
}

.rules-table th,
.rules-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.rules-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.rules-table td:first-child {
  color: var(--brand-dark);
  font-weight: 700;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(var(--panel-rgb), 0.82));
  border: 1px solid rgba(var(--brand-rgb), 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(var(--text-rgb), 0.09);
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
}

.stat-value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
}

.quote-panel {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(var(--brand-rgb), 0.12), rgba(255, 255, 255, 0.94));
}

.today-answer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(var(--text-rgb), 0.1);
}

.today-answer-text {
  margin-top: 8px;
}

.quote-text {
  font-size: 28px;
  line-height: 1.55;
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.action-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(var(--text-rgb), 0.1);
  border-color: rgba(var(--brand-rgb), 0.18);
}

.study-shell {
  min-height: calc(100vh - 52px);
  min-height: calc(100dvh - 52px);
  display: grid;
  place-items: center;
}

.detail-shell {
  display: flex;
  justify-content: center;
}

.study-card {
  width: min(900px, 100%);
  padding: 26px;
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(var(--panel-rgb), 0.84));
  box-shadow: 0 20px 60px rgba(var(--text-rgb), 0.14);
}

.study-face {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.question-box,
.answer-box {
  padding: 28px;
  border-radius: 24px;
  background: rgba(var(--panel-rgb), 0.78);
  border: 1px solid var(--line);
}

.question-text,
.answer-text {
  font-size: 18px;
  line-height: 1.68;
}

.card-detail-insights {
  gap: 14px;
}

.card-detail-insight {
  min-width: 0;
}

.study-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-item {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(var(--panel-rgb), 0.78);
  border: 1px solid var(--line);
}

.detail-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-value {
  margin-top: 8px;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.render-preview {
  padding: 22px;
  min-height: 220px;
}

.preview-label {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.preview-rich {
  min-height: 120px;
  font-size: 18px;
  line-height: 1.7;
}

.rich-text {
  color: inherit;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.rich-text > :first-child {
  margin-top: 0;
}

.rich-text > :last-child {
  margin-bottom: 0;
}

.rich-text--compact {
  font-size: 16px;
  line-height: 1.75;
}

.rich-text p,
.rich-text ul,
.rich-text ol,
.rich-text blockquote,
.rich-text pre,
.rich-text table,
.rich-text .table-wrap,
.rich-text .katex-display {
  margin: 0 0 1em;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
  margin: 0 0 0.7em;
  line-height: 1.3;
  font-weight: 700;
}

.rich-text h1 {
  font-size: 1.25em;
}

.rich-text h2 {
  font-size: 1.15em;
}

.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
  font-size: 1.05em;
}

.rich-text ul,
.rich-text ol {
  padding-left: 1.4em;
}

.rich-text li + li {
  margin-top: 0.32em;
}

.rich-text li > p {
  margin-bottom: 0;
}

.point-list {
  margin: 10px 0 0;
  padding-left: 1.35em;
}

.point-list li + li {
  margin-top: 0.45em;
}

.rich-text blockquote {
  padding: 0.9em 1em;
  border-left: 4px solid rgba(var(--brand-rgb), 0.24);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(var(--brand-rgb), 0.06);
  color: var(--muted);
}

.rich-text hr {
  margin: 1.2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.rich-text a {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.rich-text code {
  padding: 0.18em 0.45em;
  border-radius: 0.5em;
  background: rgba(var(--brand-rgb), 0.1);
  font-family: "Cascadia Code", "JetBrains Mono", "Consolas", monospace;
  font-size: 0.88em;
}

.rich-text pre {
  overflow-x: auto;
  padding: 1em 1.1em;
  border-radius: var(--radius-md);
  background: rgba(var(--panel-rgb), 0.9);
  border: 1px solid rgba(var(--text-rgb), 0.08);
}

.rich-text pre code {
  padding: 0;
  background: transparent;
  font-size: 0.82em;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(var(--text-rgb), 0.12);
  background: rgba(var(--panel-rgb), 0.96);
}

.rich-text table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
}

.rich-text th,
.rich-text td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.1);
  text-align: left;
  vertical-align: top;
  font-size: 0.9em;
}

.rich-text th {
  color: var(--brand-dark);
  font-weight: 700;
  background: rgba(var(--brand-rgb), 0.08);
}

.rich-text tr:last-child td {
  border-bottom: none;
}

.rich-text img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(58vh, 480px);
  height: auto;
  margin: 1em auto;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.rich-text td img,
.rich-text th img {
  margin: 0.5em auto;
  max-height: 280px;
}

.rich-text .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.1em 0;
}

.quote-text.rich-text {
  font-size: 22px;
  line-height: 1.65;
}

.quote-text.rich-text table {
  font-size: 16px;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), 0.1);
  color: var(--brand-dark);
  font-size: 13px;
}

.library-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}

/* 允许列收缩到容器宽度以内，宽表格改走 el-table 自身的横向滚动 */
.library-layout > * {
  min-width: 0;
}

.toolbar-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.library-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
}

.library-category-selection {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.library-category-selection__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.library-category-selection__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.library-category-selection__path {
  min-width: 0;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-category-selection__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.library-category-selection__actions .el-button {
  width: 100%;
  margin: 0;
  padding-right: 8px;
  padding-left: 8px;
}

.library-category-selection__clear {
  width: 100%;
  margin: 0;
}

.toolbar-row--filters > * {
  flex-shrink: 0;
}

.csv-data-page {
  gap: 18px;
}

.csv-data-panel {
  gap: 26px;
}

.csv-data-panel__header,
.csv-data-panel__footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.csv-data-panel__header {
  align-items: flex-start;
}

.csv-data-panel__footer {
  align-items: flex-end;
}

.csv-data-panel__eyebrow,
.csv-data-note__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.csv-data-panel__header .section-title {
  margin-top: 6px;
}

.csv-data-panel__status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(var(--brand-rgb), 0.14);
  border-radius: 10px;
  background: rgba(var(--brand-rgb), 0.07);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.csv-data-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
  gap: 24px;
}

.csv-data-field {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.csv-data-field--wide {
  grid-column: 1 / -1;
}

.csv-data-field__label,
.csv-result-item__label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.csv-data-field__body {
  display: grid;
  gap: 0;
  min-width: 0;
}

.csv-data-field__body > .el-tree-select {
  min-width: 0;
}

.csv-data-field__body > .file-input-shell {
  display: block;
  width: 100%;
}

.csv-data-field__body > .el-radio-group {
  display: flex;
  flex-wrap: wrap;
}

.csv-data-field__hint {
  display: block;
  max-width: 72ch;
  margin: 10px 0 0;
  line-height: 1.5;
}

.csv-data-panel__footer {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.csv-data-note {
  min-width: 0;
}

.csv-data-note strong {
  display: block;
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: var(--brand-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csv-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.csv-result-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(var(--brand-rgb), 0.1);
  border-radius: var(--radius-md);
  background: rgba(var(--panel-rgb), 0.58);
}

.csv-result-item--wide {
  grid-column: 1 / -1;
}

.csv-result-item__value {
  margin-top: 8px;
  color: var(--brand-dark);
  font-size: 26px;
  font-weight: 700;
}

.csv-result-item ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--danger);
}

.export-page {
  min-height: 100vh;
  padding: 26px 24px 52px;
  background: #e7e8e5;
  color: #202725;
  page: category-export-standard;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
  --export-paper-margin: 12mm;
  --export-leading: 1.38;
  --export-card-gap: 7px;
}

.export-page.is-leading-tight {
  --export-leading: 1.18;
  --export-card-gap: 3px;
}

.export-page.is-leading-standard {
  --export-leading: 1.38;
  --export-card-gap: 7px;
}

.export-page.is-leading-loose {
  --export-leading: 1.62;
  --export-card-gap: 12px;
}

.export-page.is-margin-narrow {
  page: category-export-narrow;
  --export-paper-margin: 8mm;
}

.export-page.is-margin-standard {
  page: category-export-standard;
  --export-paper-margin: 12mm;
}

.export-page.is-margin-wide {
  page: category-export-wide;
  --export-paper-margin: 18mm;
}

.export-toolbar,
.export-controls,
.export-stage {
  width: min(1120px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.export-stage.is-paginating {
  visibility: hidden;
}

.export-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.export-toolbar__copy {
  min-width: 0;
}

.export-kicker,
.export-control__label {
  color: #68716f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.export-toolbar__title {
  max-width: 760px;
  margin: 4px 0 0;
  color: #202725;
  font-size: 26px;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.export-toolbar__summary {
  margin-top: 5px;
  color: #68716f;
  font-size: 13px;
}

.export-toolbar__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.export-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid #cfd4d1;
  background: #f7f8f6;
}

.export-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.export-segmented {
  display: inline-flex;
  border: 1px solid #c4cbc7;
  background: #fff;
}

.export-segmented__item {
  min-width: 54px;
  padding: 6px 10px;
  border: 0;
  border-right: 1px solid #c4cbc7;
  background: transparent;
  color: #52605b;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.export-segmented__item:last-child {
  border-right: 0;
}

.export-segmented__item:hover,
.export-segmented__item:focus-visible {
  background: #edf3f0;
  color: #1f5e53;
  outline: none;
}

.export-segmented__item.is-active {
  background: #dfece7;
  color: #1f5e53;
  font-weight: 700;
}

.export-paper {
  width: 210mm;
  height: 297mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: var(--export-paper-margin);
  border: 1px solid #cfd2cf;
  background: #fff;
  box-shadow: 0 16px 40px rgba(34, 42, 39, 0.16);
  overflow: visible;
}

.export-paper + .export-paper {
  margin-top: 24px;
}

.export-paper__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1.5px solid #1f2926;
}

.export-paper__header h1 {
  min-width: 0;
  margin: 0;
  font-size: 15pt;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.export-paper__header span {
  flex: 0 0 auto;
  color: #68716f;
  font-size: 8.5pt;
  white-space: nowrap;
}

.export-paper__body {
  min-height: 0;
}

.export-category__heading {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  margin: 0 0 4px;
  padding-top: 3px;
  padding-bottom: 3px;
  border-bottom: 1px solid #aeb8b3;
  break-after: avoid;
  page-break-after: avoid;
}

.export-category__number {
  flex: 0 0 auto;
  min-width: 2.8em;
  color: #68716f;
  font-size: 8.8pt;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.3;
  text-align: right;
}

.export-category__name {
  min-width: 0;
  margin: 0;
  color: #202725;
  font-size: 10.5pt;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.export-category__count {
  flex: 0 0 auto;
  color: #68716f;
  font-size: 8pt;
}

.export-unit {
  min-width: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.export-unit--oversized,
.export-unit--oversized .export-card {
  break-inside: auto;
  page-break-inside: auto;
}

.export-unit--category-start {
  padding-top: 10px;
}

.export-unit--first {
  padding-top: 0;
}

.export-card {
  min-width: 0;
  padding: var(--export-card-gap) 0;
  border-top: 1px solid #d5dad7;
  border-bottom: 1px solid #d5dad7;
  break-inside: avoid;
  page-break-inside: avoid;
}

.export-card__row {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  gap: 1ch;
  align-items: baseline;
}

.export-card__row + .export-card__row {
  margin-top: 3px;
}

.export-card__label {
  color: #1f5e53;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 8.5pt;
  font-weight: 800;
  line-height: var(--export-leading);
  text-align: right;
}

.export-card__content {
  min-width: 0;
  font-size: 9.6pt;
  line-height: var(--export-leading);
}

.export-card__insights {
  margin: 5px 0 0 2.4em;
  padding-top: 5px;
  border-top: 1px dotted #cbd2ce;
  color: #65736d;
  font-size: 8.8pt;
  line-height: var(--export-leading);
  overflow-wrap: anywhere;
}

.export-card .rich-text p,
.export-card .rich-text ul,
.export-card .rich-text ol,
.export-card .rich-text blockquote,
.export-card .rich-text pre,
.export-card .rich-text table,
.export-card .rich-text .table-wrap,
.export-card .rich-text .katex-display {
  margin-bottom: 0.42em;
}

.export-card .export-card__insights.rich-text p {
  margin: 0;
}

.export-card .rich-text h1,
.export-card .rich-text h2,
.export-card .rich-text h3,
.export-card .rich-text h4,
.export-card .rich-text h5,
.export-card .rich-text h6 {
  margin-bottom: 0.35em;
}

.export-card .rich-text ul,
.export-card .rich-text ol {
  padding-left: 1.15em;
}

.export-card .rich-text li + li {
  margin-top: 0.12em;
}

.export-card .rich-text blockquote {
  padding: 0.25em 0.55em;
  border-radius: 0;
}

.export-card .rich-text pre {
  padding: 0.45em 0.6em;
  border-radius: 0;
}

.export-card .rich-text table {
  min-width: 0;
}

.export-card .rich-text th,
.export-card .rich-text td {
  padding: 3px 5px;
}

.export-card .rich-text img {
  max-height: 80mm;
  margin: 0.35em auto;
  border-radius: 0;
}

.export-empty {
  padding: 32px 20px;
  border: 1px dashed #b9c1bd;
  color: #68716f;
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.full-span {
  grid-column: 1 / -1;
}

.screenshot-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.attachment-editor {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(var(--panel-rgb), 0.58);
}

.attachment-editor.is-dragging {
  border-color: var(--brand);
  background: rgba(var(--brand-rgb), 0.1);
}

.attachment-dropzone {
  display: grid;
  place-items: center;
  min-height: 88px;
  gap: 6px;
  padding: 16px;
  border: 1px dashed rgba(var(--brand-rgb), 0.42);
  border-radius: 8px;
  background: rgba(var(--panel-rgb), 0.72);
  color: var(--text);
  cursor: pointer;
  text-align: center;
}

.attachment-dropzone:hover {
  border-color: var(--brand);
  background: rgba(var(--brand-rgb), 0.07);
}

.attachment-editor__header,
.attachment-item,
.attachment-download-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.attachment-editor__header {
  justify-content: space-between;
  flex-wrap: wrap;
}

.attachment-list,
.attachment-study-list {
  display: grid;
  gap: 10px;
}

.attachment-item {
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.attachment-item__meta {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.attachment-thumb,
.attachment-file-mark {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}

.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-display {
  display: grid;
  gap: 10px;
}

.attachment-display__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.attachment-display__item {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.attachment-display__item .screenshot-preview {
  max-height: 300px;
}

.attachment-download-card {
  min-height: 120px;
  padding: 14px;
  align-items: flex-start;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.attachment-study-item .screenshot-preview {
  margin-top: 16px;
}

@media (max-width: 640px) {
  .attachment-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .attachment-item .toolbar-row {
    width: 100%;
  }

  /* 覆盖 el-dialog 的内联宽度（如 width="420px"），避免超出小屏 */
  .el-dialog {
    width: min(92vw, 440px) !important;
  }

  .el-message-box {
    width: min(92vw, 420px);
  }

  .el-message {
    max-width: calc(100vw - 24px);
  }

  /* 覆盖筛选控件的内联 max-width/width，窄屏下整列堆叠 */
  .toolbar-row--filters > * {
    flex-shrink: 1;
    width: 100% !important;
    max-width: none !important;
  }

  .weekly-table th,
  .weekly-table td {
    padding: 10px 6px;
    font-size: 13px;
  }
}

.weekly-table {
  width: 100%;
  border-collapse: collapse;
}

.weekly-table th,
.weekly-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.weekly-table th {
  color: var(--muted);
  font-weight: 600;
}

.file-input-shell {
  display: inline-flex;
  align-items: center;
}

input[type="file"] {
  width: 100%;
  color: var(--muted);
  font: inherit;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--brand-rgb), 0.16);
  border-radius: 14px;
  background: rgba(var(--brand-rgb), 0.09);
  color: var(--brand-dark);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

input[type="file"]::file-selector-button:hover {
  background: rgba(var(--brand-rgb), 0.16);
  border-color: rgba(var(--brand-rgb), 0.24);
}

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(480px, 100%);
  padding: 30px;
}

.el-button {
  border-radius: 14px;
  min-height: 42px;
  padding: 0 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.el-button + .el-button {
  margin-left: 0;
}

.el-button--default,
.el-button.is-plain {
  background: rgba(var(--panel-rgb), 0.94);
  border-color: rgba(var(--text-rgb), 0.12);
  color: var(--text);
}

.el-button--default:hover,
.el-button.is-plain:hover {
  border-color: rgba(var(--brand-rgb), 0.25);
  color: var(--brand-dark);
  background: rgba(var(--brand-rgb), 0.08);
}

.el-button--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  color: #fff;
}

.el-button--primary.is-plain {
  background: rgba(var(--brand-rgb), 0.08);
  border: 1px solid rgba(var(--brand-rgb), 0.26);
  color: var(--brand-dark);
}

.el-button--primary:hover,
.el-button--primary:focus {
  background: linear-gradient(135deg, var(--brand-hover), var(--brand-dark-hover));
  color: #fff;
}

.el-button--primary.is-plain:hover,
.el-button--primary.is-plain:focus {
  background: rgba(var(--brand-rgb), 0.14);
  border-color: rgba(var(--brand-rgb), 0.42);
  color: var(--brand-dark-hover);
}

.el-button--danger.is-plain {
  color: var(--danger);
  background: rgba(var(--danger-rgb), 0.08);
  border-color: rgba(var(--danger-rgb), 0.18);
}

.el-button--text {
  min-height: auto;
  padding: 0;
}

.el-input__wrapper,
.el-select__wrapper,
.el-textarea__inner,
.el-input-number,
.el-autocomplete-suggestion,
.el-input-number__decrease,
.el-input-number__increase {
  border-radius: 16px !important;
}

.el-input__wrapper,
.el-select__wrapper,
.el-textarea__inner,
.el-input-number {
  background: rgba(var(--panel-rgb), 0.92) !important;
  border: 1px solid rgba(var(--text-rgb), 0.12);
  box-shadow: none !important;
}

.el-input__wrapper.is-focus,
.el-select__wrapper.is-focused,
.el-textarea__inner:focus,
.el-input-number:focus-within {
  border-color: rgba(var(--brand-rgb), 0.28);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.08) !important;
}

.el-textarea__inner {
  min-height: 120px;
  padding: 12px 14px;
}

.el-form-item {
  margin-bottom: 14px;
}

.el-form-item__label {
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.el-input-number {
  width: 100%;
  justify-content: space-between;
}

.el-input-number .el-input__wrapper {
  border: none;
  background: transparent !important;
}

.el-tree {
  background: transparent;
  color: var(--text);
}

.library-category-tree {
  min-width: 0;
  overflow: hidden;
}

.library-category-tree .el-tree-node__content {
  min-width: 0;
}

.category-tree-node {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.category-tree-node__label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-tree-node__count {
  flex: 0 0 auto;
}

.el-tree-node__content {
  height: 42px;
  padding-right: 12px;
  border-radius: 12px;
}

.el-tree-node__content:hover,
.el-tree-node.is-current > .el-tree-node__content {
  background: rgba(var(--brand-rgb), 0.08);
}

.el-tree-node:focus > .el-tree-node__content {
  background: rgba(var(--brand-rgb), 0.08);
}

.el-table {
  --el-table-border-color: rgba(var(--text-rgb), 0.08);
  --el-table-header-bg-color: rgba(248, 244, 236, 0.9);
  --el-table-row-hover-bg-color: rgba(var(--brand-rgb), 0.05);
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
}

.bubei-table-tooltip {
  position: fixed;
  z-index: 3000;
  box-sizing: border-box;
  width: max-content;
  max-width: min(420px, calc(100vw - 24px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(45, 38, 31, 0.96);
  color: #fff;
  box-shadow: 0 10px 24px rgba(39, 31, 24, 0.22);
  font-size: 13px;
  line-height: 1.45;
  overflow: visible;
  pointer-events: none;
}

.bubei-table-tooltip__content {
  display: block;
  box-sizing: border-box;
  max-width: min(420px, calc(100vw - 24px));
  max-height: min(320px, calc(100vh - 24px));
  padding: 9px 12px;
  overflow: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
  scrollbar-width: thin;
}

.bubei-table-tooltip__content::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.bubei-table-tooltip__content::-webkit-scrollbar-track,
.bubei-table-tooltip__content::-webkit-scrollbar-corner {
  background: transparent;
}

.bubei-table-tooltip__content::-webkit-scrollbar-thumb {
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  background-clip: padding-box;
}

.bubei-table-tooltip__content::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.el-table td.bubei-overflow-cell .cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bubei-table-tooltip[hidden] {
  display: none;
}

.bubei-table-tooltip::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: inherit;
  transform: rotate(45deg);
}

.bubei-table-tooltip[data-placement="top"]::after {
  left: 50%;
  bottom: -5px;
  margin-left: -4px;
}

.bubei-table-tooltip[data-placement="bottom"]::after {
  top: -5px;
  left: 50%;
  margin-left: -4px;
}

.bubei-table-tooltip[data-placement="right"]::after {
  top: 50%;
  left: -5px;
  margin-top: -4px;
}

.bubei-table-tooltip[data-placement="left"]::after {
  top: 50%;
  right: -5px;
  margin-top: -4px;
}

.el-table th.el-table__cell {
  color: var(--muted);
  font-weight: 600;
}

.el-table tr {
  background: rgba(var(--panel-rgb), 0.72);
}

.el-table td.el-table__cell,
.el-table th.el-table__cell {
  background: transparent;
}

.el-table__fixed,
.el-table__fixed-right,
.el-table__fixed-right-patch {
  background: rgba(var(--panel-rgb), 0.98) !important;
}

.el-table__fixed .el-table__cell,
.el-table__fixed-right .el-table__cell,
.el-table__fixed-right-patch {
  background: rgba(var(--panel-rgb), 0.98) !important;
}

.el-table__fixed-right {
  z-index: 3;
  box-shadow: -14px 0 24px rgba(var(--text-rgb), 0.08);
}

.weak-table .el-table__cell.el-table-fixed-column--right,
.weak-table .el-table__cell.is-right,
.weak-table .el-table-fixed-column--right,
.weak-table .el-table-fixed-column--left {
  background: rgb(var(--panel-rgb)) !important;
}

.weak-table .el-table__body .el-table__cell.el-table-fixed-column--right,
.weak-table .el-table__body .el-table__cell.is-right {
  position: relative;
  z-index: 2;
  background: rgb(var(--panel-rgb)) !important;
}

.weak-table .el-table__header .el-table__cell.el-table-fixed-column--right,
.weak-table .el-table__header .el-table__cell.is-right {
  z-index: 3;
  background: rgb(var(--panel-rgb)) !important;
}

.weak-table .el-table__body .el-table__cell.el-table-fixed-column--right::before,
.weak-table .el-table__body .el-table__cell.is-right::before,
.weak-table .el-table__header .el-table__cell.el-table-fixed-column--right::before,
.weak-table .el-table__header .el-table__cell.is-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(var(--panel-rgb));
  z-index: -1;
}

.weak-table .weak-table__action-cell .cell {
  padding-left: 20px;
  padding-right: 10px;
}

.el-dialog {
  border-radius: 24px;
  background: rgba(var(--panel-rgb), 0.98);
  overflow: hidden;
}

.el-dialog__header {
  margin-right: 0;
  padding: 22px 24px 8px;
}

.el-dialog__body {
  padding: 12px 24px 20px;
}

.el-dialog__footer {
  padding: 0 24px 24px;
}

.el-tag {
  border-radius: 999px;
  padding-inline: 12px;
}

.el-radio-group {
  gap: 8px;
  flex-wrap: wrap;
}

.el-radio-button__inner {
  border-radius: 999px !important;
  border-left: 1px solid var(--el-border-color) !important;
  padding-inline: 16px;
  box-shadow: none !important;
  background: rgba(var(--panel-rgb), 0.92);
}

.el-radio-button__original-radio:checked + .el-radio-button__inner {
  background: rgba(var(--brand-rgb), 0.12);
  color: var(--brand-dark);
  border-color: rgba(var(--brand-rgb), 0.16);
}

.el-rate {
  gap: 4px;
}

.el-skeleton {
  padding: 8px 0;
}

@page category-export-narrow {
  size: A4;
  margin: 8mm;
}

@page category-export-standard {
  size: A4;
  margin: 12mm;
}

@page category-export-wide {
  size: A4;
  margin: 18mm;
}

@media print {
  html,
  body {
    min-height: 0;
    background: #fff;
    color: #202725;
  }

  body.export-preview-page .bubei-app-content {
    animation: none !important;
  }

  .export-page {
    min-height: 0;
    padding: 0;
    background: #fff;
  }

  .export-page .no-print {
    display: none !important;
  }

  .export-stage,
  .export-paper {
    width: auto;
    min-height: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .export-paper {
    height: auto;
    padding: 0;
    overflow: visible;
  }

  .export-paper + .export-paper {
    margin-top: 0;
  }

  .export-paper--break-after {
    break-after: page;
    page-break-after: always;
  }

  .export-paper__body {
    overflow: visible;
  }

  .export-page a {
    color: inherit;
  }
}

@media (max-width: 1100px) {
  .hero-grid,
  .detail-grid,
  .library-layout,
  .stat-grid,
  .form-grid,
  .preview-grid,
  .csv-data-fields,
  .csv-result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .csv-data-panel__header,
  .csv-data-panel__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .csv-data-panel__footer .el-button {
    width: 100%;
  }

  .csv-data-panel__status {
    align-self: flex-start;
  }
}

@media (max-width: 900px) {
  .export-page {
    padding: 14px 10px 30px;
  }

  .export-toolbar__title {
    font-size: 22px;
  }

  .export-toolbar__actions {
    width: 100%;
  }

  .export-toolbar__actions .el-button {
    flex: 1 1 0;
  }

  .export-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .export-control {
    justify-content: space-between;
  }

  .export-segmented {
    flex: 0 1 auto;
  }

  .export-paper {
    width: 100%;
  }

  .export-paper__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .export-paper__header span {
    white-space: normal;
  }

  .export-card__insights {
    margin-left: 0;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    padding-top: calc(10px + env(safe-area-inset-top));
    border-bottom: 1px solid var(--line);
    background: rgba(var(--panel-rgb), 0.9);
    backdrop-filter: blur(14px);
  }

  .mobile-topbar__menu {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(var(--text-rgb), 0.14);
    border-radius: 13px;
    background: rgba(var(--panel-rgb), 0.96);
    color: var(--brand-dark);
    cursor: pointer;
  }

  .mobile-topbar__menu-icon {
    width: 20px;
    height: 20px;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 18h16'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 18h16'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
  }

  .mobile-topbar__logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.18);
  }

  .mobile-topbar__title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  .brand-pane {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    align-self: auto;
    width: min(320px, 86vw);
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 12px;
    padding-top: calc(12px + env(safe-area-inset-top));
    background: var(--panel-strong);
    transform: translateX(-105%);
    transition: transform 0.24s ease;
  }

  .sidebar-toggle {
    display: none;
  }

  .bubei-ready .brand-pane {
    animation: none;
  }

  body.bubei-nav-open .brand-pane {
    transform: translateX(0);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  }

  .brand-card {
    height: 100%;
    min-height: 0;
    padding: 16px 14px 14px;
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(24, 19, 14, 0.42);
  }

  body.bubei-nav-open .mobile-nav-backdrop {
    display: block;
  }

  body.bubei-nav-open {
    overflow: hidden;
  }

  .main-pane {
    padding: 14px 14px calc(26px + env(safe-area-inset-bottom));
  }

  .study-card {
    padding: 18px;
  }

  .surface-pad {
    padding: 18px;
  }

  .question-box,
  .answer-box {
    padding: 18px;
  }

  .question-text,
  .answer-text,
  .quote-text {
    font-size: 17px;
  }

  .page-title {
    font-size: 24px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rules-journey,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .action-grid > .el-button {
    height: auto;
    min-height: 48px;
    padding: 10px;
    white-space: normal;
    line-height: 1.35;
  }

  /* 评分栏钉在视口底部；:has 不可用时保持文档流原位 */
  @supports selector(:has(*)) {
    .rating-grid {
      position: fixed;
      left: max(10px, env(safe-area-inset-left));
      right: max(10px, env(safe-area-inset-right));
      bottom: max(10px, env(safe-area-inset-bottom));
      z-index: 800;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 20px;
      background: rgba(var(--panel-rgb), 0.92);
      backdrop-filter: blur(12px);
      box-shadow: 0 14px 34px rgba(var(--text-rgb), 0.16);
    }

    .study-card:has(.rating-grid) {
      padding-bottom: 158px;
    }
  }

  /* 16px 以下的输入框字号会触发 iOS Safari 聚焦自动放大 */
  .el-input__inner,
  .el-textarea__inner,
  .el-select__input,
  .el-select__selected-item {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .export-page .export-paper {
    width: auto;
  }

  .export-page .export-paper__header {
    align-items: baseline;
    flex-direction: row;
  }

}
