@charset "UTF-8";
:root {
  --navy-950: #071625;
  --navy-900: #0b1f33;
  --navy-850: #102940;
  --navy-800: #15344f;
  --navy-700: #1d496b;
  --blue-600: #23658e;
  --blue-100: #e8f1f6;
  --gold-600: #a98445;
  --gold-500: #c3a166;
  --gold-300: #dfca9e;
  --gold-100: #f5efe3;
  --ink-900: #162633;
  --ink-700: #405363;
  --ink-500: #71818e;
  --ink-400: #95a1ab;
  --line: #e3e9ed;
  --surface: #ffffff;
  --background: #f3f6f8;
  --green: #288369;
  --green-bg: #eaf5f0;
  --red: #b95555;
  --red-bg: #fbefef;
  --shadow-sm: 0 3px 14px rgba(17, 39, 56, .04);
  --shadow-md: 0 14px 40px rgba(17, 39, 56, .08);
  --shadow-lg: 0 28px 80px rgba(5, 24, 39, .18);
  --radius: 16px;
  --sidebar: 248px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink-900); background: var(--background); font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(35, 101, 142, .18); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hidden { display: none !important; }
.muted { color: var(--ink-500); }
.text-green { color: var(--green) !important; }
.text-red { color: var(--red) !important; }
.text-gold { color: var(--gold-600) !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icon-button { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 10px; color: var(--ink-500); transition: .2s ease; }
.icon-button:hover { background: rgba(113, 129, 142, .1); color: var(--ink-900); }
.primary-button, .secondary-button, .ghost-button, .danger-button { min-height: 44px; border-radius: 10px; padding: 0 20px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 600; white-space: nowrap; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; }
.primary-button { background: var(--navy-900); color: #fff; box-shadow: 0 7px 16px rgba(11, 31, 51, .14); }
.primary-button:hover { background: var(--navy-800); transform: translateY(-1px); box-shadow: 0 9px 20px rgba(11, 31, 51, .2); }
.primary-button.gold { background: var(--gold-500); color: var(--navy-950); box-shadow: none; }
.primary-button.gold:hover { background: #d1b47c; }
.primary-button:disabled, .secondary-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.secondary-button { background: #fff; border-color: var(--line); color: var(--ink-700); }
.secondary-button:hover { border-color: #b7c5cf; background: #fafcfd; }
.ghost-button { background: transparent; color: var(--ink-700); }
.ghost-button:hover { background: #edf1f4; }
.danger-button { background: var(--red-bg); color: var(--red); }
.small-button { min-height: 34px; padding: 0 13px; font-size: 12px; border-radius: 8px; }
.text-button { border: 0; background: transparent; color: var(--blue-600); padding: 4px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.text-button svg { width: 16px; height: 16px; }
.text-button:hover { color: var(--navy-900); }
.panel { background: var(--surface); border: 1px solid rgba(222, 230, 235, .9); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h3 { margin: 0; font-size: 17px; letter-spacing: -.2px; }
.section-head p { margin: 5px 0 0; color: var(--ink-500); font-size: 12px; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--blue-600); background: var(--blue-100); white-space: nowrap; }
.tag.gold { background: var(--gold-100); color: var(--gold-600); }
.tag.green { background: var(--green-bg); color: var(--green); }
.tag.red { background: var(--red-bg); color: var(--red); }
.tag.gray { background: #eff2f4; color: var(--ink-500); }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--gold-600); letter-spacing: 2px; font-size: 11px; font-weight: 600; }
.eyebrow span { display: block; width: 28px; height: 1px; background: currentColor; }
.eyebrow.light { color: var(--gold-300); }

/* Login */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(480px, 1.08fr) minmax(460px, .92fr); background: #fff; }
.login-brand { position: relative; overflow: hidden; padding: 46px 58px 34px; background: var(--navy-900); color: #fff; display: flex; flex-direction: column; min-height: 680px; }
.login-brand::before { content: ""; position: absolute; width: 580px; height: 580px; border: 1px solid rgba(195, 161, 102, .11); border-radius: 50%; right: -260px; top: 12%; box-shadow: 0 0 0 70px rgba(195, 161, 102, .025), 0 0 0 140px rgba(195, 161, 102, .018); }
.login-brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(0deg, rgba(4, 16, 28, .4), transparent); pointer-events: none; }
.brand-pattern { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to bottom right, #000, transparent 72%); }
.login-brand-top, .sidebar-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.brand-mark { width: 43px; height: 43px; border: 1px solid rgba(195, 161, 102, .45); color: var(--gold-300); background: rgba(195, 161, 102, .08); display: flex; align-items: center; justify-content: center; transform: rotate(45deg); border-radius: 9px; flex: none; }
.brand-mark svg { transform: rotate(-45deg); width: 24px; height: 24px; }
.brand-mark-large { width: 49px; height: 49px; }
.login-brand-top strong { display: block; font-size: 21px; letter-spacing: 5px; font-family: "Songti SC", "STSong", serif; }
.login-brand-top span { display: block; color: rgba(255,255,255,.43); font-size: 8px; letter-spacing: 1.8px; margin-top: 5px; }
.login-hero-copy { margin: auto 0; position: relative; z-index: 1; padding: 50px 0; }
.login-hero-copy h1 { font-family: "Songti SC", "STSong", "SimSun", serif; font-weight: 500; font-size: clamp(45px, 4.5vw, 68px); line-height: 1.42; letter-spacing: 5px; margin: 26px 0 24px; }
.login-hero-copy > p { color: rgba(255,255,255,.59); line-height: 2; font-size: 15px; letter-spacing: 1px; }
.login-feature-row { display: flex; align-items: center; gap: 28px; margin-top: 56px; }
.login-feature-row div { display: flex; flex-direction: column; gap: 6px; }
.login-feature-row b { font-family: Georgia, serif; font-size: 26px; font-weight: 400; color: var(--gold-300); }
.login-feature-row span { color: rgba(255,255,255,.5); font-size: 11px; }
.login-feature-row i { width: 1px; height: 32px; background: rgba(255,255,255,.13); }
.login-brand-foot { display: flex; justify-content: space-between; position: relative; z-index: 1; font-size: 10px; color: rgba(255,255,255,.32); letter-spacing: 2px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 50px; background: #fbfcfd; }
.login-form-wrap { width: 100%; max-width: 390px; }
.login-kicker { font-size: 10px; letter-spacing: 3px; color: var(--gold-600); font-weight: 700; margin-bottom: 13px; }
.login-form-wrap h2 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 34px; font-weight: 600; letter-spacing: 2px; }
.login-subtitle { margin: 12px 0 35px; color: var(--ink-500); line-height: 1.8; }
.field-label { display: block; margin: 20px 0 9px; font-size: 12px; font-weight: 600; color: var(--ink-700); }
.input-shell { min-height: 51px; border: 1px solid #dbe3e8; background: #fff; border-radius: 10px; display: flex; align-items: center; padding: 0 14px; gap: 11px; transition: .2s; }
.input-shell:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(35,101,142,.08); }
.input-shell > svg { width: 18px; color: var(--ink-400); }
.input-shell input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0 !important; background: transparent; color: var(--ink-900); box-shadow: none !important; }
.input-shell input::placeholder { color: #a6b1ba; }
.password-toggle { width: 30px; height: 30px; margin-right: -6px; }
.password-toggle svg { width: 17px; }
.login-options { display: flex; align-items: center; justify-content: space-between; margin: 18px 0; font-size: 11px; color: var(--ink-500); }
.check-label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.check-label input { accent-color: var(--navy-800); }
.local-safe { color: var(--green); }
.form-error { min-height: 19px; color: var(--red); font-size: 12px; }
.login-button { width: 100%; min-height: 51px; justify-content: space-between; padding: 0 22px; margin-top: 4px; }
.login-button svg { width: 18px; }
.preset-note { display: flex; gap: 10px; margin-top: 24px; padding: 14px; border: 1px solid #e7e0d2; border-radius: 10px; background: #faf7f0; color: var(--gold-600); }
.preset-note svg { width: 17px; margin-top: 2px; }
.preset-note b, .preset-note span { display: block; }
.preset-note b { font-size: 11px; margin-bottom: 4px; }
.preset-note span { color: #938771; font-size: 10px; }
.login-copyright { text-align: center; color: var(--ink-400); font-size: 10px; margin-top: 42px; letter-spacing: .5px; }
.mobile-login-logo { display: none; }

/* Application shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--navy-900); color: #fff; padding: 28px 18px 18px; display: flex; flex-direction: column; z-index: 30; }
.sidebar-brand { padding: 0 10px 28px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 24px; gap: 13px; }
.sidebar-brand .brand-mark { width: 37px; height: 37px; border-radius: 8px; }
.sidebar-brand .brand-mark svg { width: 21px; }
.sidebar-brand strong { display: block; font-family: "Songti SC", "STSong", serif; font-size: 18px; letter-spacing: 3px; }
.sidebar-brand span { display: block; margin-top: 4px; color: rgba(255,255,255,.38); font-size: 9px; letter-spacing: 2px; }
.nav-caption { color: rgba(255,255,255,.28); font-size: 9px; letter-spacing: 2px; padding: 0 14px; margin: 10px 0 9px; }
.main-nav { display: grid; gap: 5px; margin-bottom: 15px; }
.nav-item { position: relative; width: 100%; height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; border-radius: 9px; color: rgba(255,255,255,.57); background: transparent; font-size: 13px; text-align: left; transition: .2s; }
.nav-item svg { width: 18px; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active { background: rgba(195,161,102,.14); color: var(--gold-300); }
.nav-item.active::before { content: ""; position: absolute; left: -18px; height: 23px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-500); }
.nav-item span { flex: 1; }
.nav-dot { width: 5px; height: 5px; background: var(--gold-500); border-radius: 50%; }
.nav-badge { min-width: 20px; height: 19px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.1); font-size: 9px; font-weight: 500; }
.sidebar-quote { margin: auto 8px 20px; padding: 18px; border: 1px solid rgba(195,161,102,.13); background: rgba(195,161,102,.04); border-radius: 10px; }
.sidebar-quote svg { width: 16px; color: var(--gold-500); margin-bottom: 10px; }
.sidebar-quote p { font-family: "Songti SC", "STSong", serif; color: rgba(255,255,255,.72); margin: 0 0 7px; letter-spacing: 1px; }
.sidebar-quote span { color: rgba(255,255,255,.28); font-size: 9px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 17px 7px 0; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--gold-500); color: var(--navy-900); font-family: "Songti SC", serif; font-weight: 700; }
.user-meta { min-width: 0; flex: 1; }
.user-meta b, .user-meta span { display: block; }
.user-meta b { font-size: 12px; font-weight: 500; }
.user-meta span { color: rgba(255,255,255,.3); font-size: 9px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .icon-button { color: rgba(255,255,255,.35); width: 30px; }
.sidebar-user .icon-button:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar-user svg { width: 16px; }
.app-body { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 83px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255,255,255,.93); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.topbar-left { display: flex; align-items: center; gap: 10px; }
.breadcrumb { color: var(--ink-400); font-size: 9px; letter-spacing: .5px; margin-bottom: 5px; }
.breadcrumb span { margin: 0 5px; }
.topbar h2 { margin: 0; font-size: 18px; font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.global-search { width: 250px; height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; color: var(--ink-400); font-size: 11px; }
.global-search svg { width: 16px; }
.global-search span { flex: 1; text-align: left; }
.global-search kbd { padding: 2px 5px; border: 1px solid #dce3e7; border-radius: 4px; background: #fff; font-family: inherit; font-size: 8px; }
.goal-chip { display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; text-align: left; }
.goal-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--gold-100); color: var(--gold-600); }
.goal-icon svg { width: 18px; }
.goal-chip small, .goal-chip b { display: block; }
.goal-chip small { color: var(--ink-400); font-size: 9px; margin-bottom: 3px; }
.goal-chip b { font-size: 11px; }
.mobile-menu { display: none; }
.main-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 28px 34px 35px; flex: 1; }
.app-footer { display: flex; justify-content: space-between; padding: 16px 34px 22px; color: var(--ink-400); font-size: 9px; }
.mobile-nav { display: none; }
.sidebar-backdrop { display: none; }

/* Dashboard */
.welcome-card { position: relative; overflow: hidden; min-height: 214px; padding: 33px 38px; border-radius: 18px; background: var(--navy-900); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 30px; box-shadow: 0 12px 30px rgba(11,31,51,.12); }
.welcome-card::before { content: ""; position: absolute; width: 380px; height: 380px; border: 1px solid rgba(195,161,102,.14); border-radius: 50%; right: -70px; top: -180px; box-shadow: 0 0 0 50px rgba(195,161,102,.025), 0 0 0 100px rgba(195,161,102,.02); }
.welcome-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 65%, rgba(195,161,102,.05)); pointer-events: none; }
.welcome-copy { position: relative; z-index: 1; }
.welcome-copy .date-line { color: var(--gold-300); font-size: 10px; letter-spacing: 1.4px; margin-bottom: 13px; }
.welcome-copy h1 { font-family: "Songti SC", "STSong", serif; font-size: 29px; font-weight: 500; letter-spacing: 1px; margin: 0 0 13px; }
.welcome-copy p { color: rgba(255,255,255,.5); font-size: 12px; line-height: 1.8; margin: 0; }
.welcome-actions { display: flex; gap: 12px; margin-top: 24px; }
.welcome-actions .secondary-button { color: rgba(255,255,255,.75); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.13); }
.welcome-progress { width: 155px; text-align: center; position: relative; z-index: 1; flex: none; }
.progress-ring { --value: 0; width: 118px; height: 118px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold-500) calc(var(--value) * 1%), rgba(255,255,255,.1) 0); position: relative; }
.progress-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--navy-900); }
.progress-ring > div { position: relative; z-index: 1; }
.progress-ring b { display: block; font-family: Georgia, serif; font-size: 27px; font-weight: 400; color: var(--gold-300); }
.progress-ring span { color: rgba(255,255,255,.4); font-size: 9px; }
.welcome-progress > span { display: block; margin-top: 10px; color: rgba(255,255,255,.48); font-size: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.metric-card { padding: 20px; display: flex; align-items: center; gap: 15px; }
.metric-icon { width: 43px; height: 43px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--blue-100); color: var(--blue-600); }
.metric-icon.gold { color: var(--gold-600); background: var(--gold-100); }
.metric-icon.green { color: var(--green); background: var(--green-bg); }
.metric-icon.red { color: var(--red); background: var(--red-bg); }
.metric-icon svg { width: 20px; }
.metric-card small { display: block; color: var(--ink-500); font-size: 10px; margin-bottom: 6px; }
.metric-card b { font-family: Georgia, "PingFang SC", sans-serif; font-size: 25px; font-weight: 500; }
.metric-card em { font-style: normal; font-size: 11px; color: var(--ink-400); margin-left: 4px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 20px; }
.dashboard-stack { display: grid; gap: 20px; }
.dashboard-panel { padding: 23px; }
.weekly-chart { height: 190px; display: flex; align-items: flex-end; gap: 12px; padding: 18px 4px 0; border-bottom: 1px solid var(--line); }
.day-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.day-bar b { font-size: 9px; font-weight: 500; color: var(--ink-500); opacity: 0; transition: .2s; }
.day-bar:hover b { opacity: 1; }
.bar-track { width: min(28px, 70%); height: 130px; display: flex; align-items: flex-end; border-radius: 5px 5px 0 0; background: #f0f3f5; overflow: hidden; }
.bar-fill { width: 100%; min-height: 3px; border-radius: 5px 5px 0 0; background: #b8cbd7; transition: height .5s; }
.day-bar.today .bar-fill { background: var(--gold-500); }
.day-bar > span { color: var(--ink-400); font-size: 9px; padding-bottom: 10px; }
.day-bar.today > span { color: var(--gold-600); font-weight: 700; }
.chart-legend { display: flex; justify-content: space-between; margin-top: 12px; color: var(--ink-400); font-size: 9px; }
.chart-legend span:first-child { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }
.category-list { display: grid; gap: 18px; }
.category-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 11px; }
.category-row-head span { color: var(--ink-700); }
.category-row-head b { font-family: Georgia, serif; font-weight: 400; color: var(--ink-500); }
.progress-track { height: 5px; background: #edf1f3; border-radius: 4px; overflow: hidden; }
.progress-track > i { display: block; height: 100%; background: var(--blue-600); border-radius: 4px; }
.category-row:nth-child(2n) .progress-track > i { background: var(--gold-500); }
.source-panel { margin-top: 20px; padding: 23px; }
.source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.source-card { border: 1px solid var(--line); border-radius: 11px; padding: 16px; display: flex; align-items: center; gap: 13px; background: #fcfdfd; transition: .2s; cursor: pointer; min-width: 0; }
.source-card:hover { border-color: #bdcbd4; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.source-year { width: 45px; height: 49px; display: grid; place-items: center; background: var(--navy-900); color: var(--gold-300); font-family: Georgia, serif; font-size: 14px; border-radius: 7px; flex: none; }
.source-info { flex: 1; min-width: 0; }
.source-info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; margin-bottom: 6px; }
.source-info span { color: var(--ink-400); font-size: 9px; }
.source-card > svg { width: 15px; color: var(--ink-400); }

/* Configuration and exam */
.config-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; }
.config-main { padding: 28px; }
.config-side { display: grid; gap: 18px; align-content: start; }
.config-side .panel { padding: 22px; }
.config-section { padding-bottom: 26px; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.config-section:last-child { border: 0; margin: 0; padding: 0; }
.config-section > label, .config-label { display: block; font-weight: 650; font-size: 12px; margin-bottom: 13px; }
.mode-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.mode-card { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 18px; text-align: left; transition: .2s; }
.mode-card:hover { border-color: #b6c7d1; }
.mode-card.active { border-color: var(--blue-600); background: #f5f9fb; box-shadow: inset 0 0 0 1px var(--blue-600); }
.mode-card .mode-icon { width: 37px; height: 37px; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: #edf3f6; color: var(--blue-600); margin-bottom: 13px; }
.mode-card.active .mode-icon { background: var(--navy-900); color: var(--gold-300); }
.mode-card b { display: block; margin-bottom: 6px; font-size: 13px; }
.mode-card p { margin: 0; color: var(--ink-500); font-size: 10px; line-height: 1.6; }
.mode-check { position: absolute; top: 14px; right: 14px; width: 17px; height: 17px; border: 1px solid #d5dfe5; border-radius: 50%; }
.mode-card.active .mode-check { background: var(--blue-600); border-color: var(--blue-600); }
.mode-card.active .mode-check::after { content: ""; position: absolute; width: 6px; height: 3px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg); left: 4px; top: 5px; }
.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-field label { display: block; color: var(--ink-500); font-size: 10px; margin-bottom: 7px; }
.form-select, .form-input, .form-textarea { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-700); padding: 0 12px; outline: 0; }
.form-select:focus, .form-input:focus, .form-textarea:focus { border-color: var(--blue-600); }
.count-options { display: flex; gap: 9px; flex-wrap: wrap; }
.count-option { min-width: 64px; height: 39px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: var(--ink-500); }
.count-option.active { border-color: var(--blue-600); background: var(--blue-100); color: var(--blue-600); font-weight: 650; }
.start-summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; background: #f7f9fa; border-radius: 11px; padding: 16px 18px; }
.start-summary span { color: var(--ink-500); font-size: 11px; }
.start-summary b { color: var(--navy-800); }
.start-summary .primary-button { min-width: 145px; }
.tip-card { background: var(--navy-900) !important; color: #fff; border: 0 !important; }
.tip-card > svg { color: var(--gold-500); margin-bottom: 15px; }
.tip-card h4 { font-family: "Songti SC", serif; font-size: 16px; margin: 0 0 9px; }
.tip-card p { color: rgba(255,255,255,.47); font-size: 10px; line-height: 1.8; margin: 0; }
.mini-stat-list { display: grid; gap: 14px; }
.mini-stat { display: flex; justify-content: space-between; font-size: 11px; }
.mini-stat span { color: var(--ink-500); }
.mini-stat b { font-family: Georgia, serif; font-weight: 400; }
.exam-banner { position: relative; overflow: hidden; background: var(--navy-900); color: #fff; border-radius: 17px; padding: 32px 35px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; }
.exam-banner::after { content: "EXAM"; position: absolute; right: 25px; top: -20px; color: rgba(255,255,255,.025); font-family: Georgia, serif; font-size: 110px; letter-spacing: 5px; }
.exam-banner h2 { font-family: "Songti SC", serif; font-weight: 500; font-size: 25px; margin: 0 0 10px; }
.exam-banner p { margin: 0; color: rgba(255,255,255,.47); font-size: 11px; }
.exam-seal { width: 70px; height: 70px; border: 1px solid rgba(195,161,102,.4); border-radius: 50%; display: grid; place-items: center; color: var(--gold-300); position: relative; z-index: 1; }
.exam-seal svg { width: 32px; height: 32px; }
.exam-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.rule-item { padding: 16px; border: 1px solid var(--line); border-radius: 10px; display: flex; gap: 12px; align-items: center; }
.rule-item svg { width: 20px; color: var(--gold-600); }
.rule-item b, .rule-item span { display: block; }
.rule-item b { font-size: 12px; margin-bottom: 4px; }
.rule-item span { color: var(--ink-500); font-size: 9px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { text-align: left; color: var(--ink-400); font-weight: 500; padding: 11px 13px; background: #f7f9fa; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 14px 13px; border-bottom: 1px solid #edf1f3; color: var(--ink-700); }
.data-table tr:last-child td { border: 0; }
.score-badge { font-family: Georgia, serif; font-size: 18px; color: var(--blue-600); }

/* Question bank and collections */
.filter-panel { padding: 17px 19px; margin-bottom: 18px; }
.filter-bar { display: flex; align-items: center; gap: 11px; }
.search-control { height: 42px; min-width: 220px; flex: 1; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.search-control svg { width: 17px; color: var(--ink-400); }
.search-control input { width: 100%; border: 0; outline: 0; background: transparent; }
.filter-bar .form-select { width: 150px; }
.result-count { color: var(--ink-500); font-size: 11px; margin: 17px 2px 12px; }
.result-count b { color: var(--navy-800); }
.question-list { display: grid; gap: 12px; }
.bank-question { padding: 20px 22px; cursor: pointer; transition: .2s; }
.bank-question:hover { border-color: #c4d0d7; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.question-list-head { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.question-list-head .spacer { flex: 1; }
.favorite-button { width: 30px; height: 30px; border: 0; background: transparent; color: var(--ink-400); display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; }
.favorite-button:hover { background: var(--gold-100); color: var(--gold-600); }
.favorite-button.active { color: var(--gold-600); }
.favorite-button.active svg { fill: currentColor; }
.favorite-button svg { width: 17px; }
.bank-stem { font-size: 14px; line-height: 1.8; margin: 0 0 12px; color: var(--ink-900); }
.bank-answer-preview { display: flex; align-items: center; gap: 8px; color: var(--ink-400); font-size: 10px; }
.bank-answer-preview span { margin-left: auto; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 24px; }
.page-button { min-width: 35px; height: 35px; padding: 0 8px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: var(--ink-500); }
.page-button.active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.page-button:disabled { opacity: .35; cursor: not-allowed; }
.empty-state { padding: 65px 25px; text-align: center; }
.empty-icon { width: 65px; height: 65px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: #edf2f5; color: #92a6b3; }
.empty-icon svg { width: 27px; height: 27px; }
.empty-state h3 { margin: 0 0 9px; font-family: "Songti SC", serif; font-size: 19px; }
.empty-state p { color: var(--ink-500); font-size: 11px; line-height: 1.8; margin: 0 auto 20px; }

/* Practice and exam session */
.session-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.session-title { display: flex; align-items: center; gap: 12px; }
.session-title .back-session { border: 1px solid var(--line); background: #fff; }
.session-title h3 { margin: 0 0 5px; font-size: 16px; }
.session-title p { margin: 0; color: var(--ink-500); font-size: 10px; }
.session-timer { height: 42px; padding: 0 15px; display: flex; align-items: center; gap: 8px; border-radius: 9px; background: var(--navy-900); color: #fff; font-family: Consolas, monospace; font-size: 15px; }
.session-timer svg { width: 17px; color: var(--gold-300); }
.session-timer.warning { background: #8f4040; }
.session-layout { display: grid; grid-template-columns: minmax(0, 1fr) 278px; gap: 20px; align-items: start; }
.question-card { padding: 29px 32px; min-height: 480px; }
.question-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.question-number { color: var(--gold-600); font-family: Georgia, serif; font-size: 13px; margin-right: 4px; }
.question-meta .spacer { flex: 1; }
.question-stem { font-size: 17px; line-height: 1.95; font-weight: 550; margin: 0 0 25px; white-space: pre-wrap; }
.multi-hint { color: var(--ink-400); font-weight: 400; font-size: 11px; margin-left: 8px; }
.option-list { display: grid; gap: 11px; }
.option-item { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px 15px; text-align: left; line-height: 1.65; transition: .16s; }
.option-item:hover:not(:disabled) { border-color: #a9bdc9; background: #fafcfd; }
.option-key { width: 29px; height: 29px; display: flex; align-items: center; justify-content: center; border: 1px solid #dce4e9; border-radius: 7px; color: var(--ink-500); font-family: Georgia, serif; font-size: 12px; flex: none; }
.option-item.selected { border-color: var(--blue-600); background: #f2f7fa; color: var(--navy-800); }
.option-item.selected .option-key { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.option-item.correct { border-color: #80b5a2; background: var(--green-bg); color: #216c57; }
.option-item.correct .option-key { background: var(--green); border-color: var(--green); color: #fff; }
.option-item.wrong { border-color: #d9a0a0; background: var(--red-bg); color: #9f4646; }
.option-item.wrong .option-key { background: var(--red); border-color: var(--red); color: #fff; }
.option-item:disabled { cursor: default; }
.option-status { margin-left: auto; }
.option-status svg { width: 18px; }
.fill-answer { width: 100%; min-height: 55px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; outline: 0; font-size: 15px; }
.fill-answer:focus { border-color: var(--blue-600); }
.essay-answer-input { width: 100%; min-height: 150px; resize: vertical; padding: 15px; border: 1px solid var(--line); border-radius: 10px; outline: 0; line-height: 1.8; }
.explanation-box { margin-top: 22px; border-radius: 11px; overflow: hidden; border: 1px solid #dbe7e1; }
.explanation-result { display: flex; align-items: center; gap: 8px; padding: 13px 16px; background: var(--green-bg); color: var(--green); font-weight: 650; font-size: 12px; }
.explanation-result.wrong { background: var(--red-bg); color: var(--red); }
.explanation-result svg { width: 17px; }
.explanation-content { padding: 16px; background: #fbfdfc; font-size: 12px; line-height: 1.85; }
.answer-line { margin-bottom: 9px; color: var(--ink-700); }
.answer-line b { color: var(--green); }
.explanation-content p { margin: 7px 0 0; color: var(--ink-500); white-space: pre-wrap; }
.reference-answer { padding: 18px; background: #f7f9fa; border: 1px solid var(--line); border-radius: 10px; margin-top: 18px; white-space: pre-wrap; line-height: 1.9; color: var(--ink-700); font-size: 12px; }
.question-actions { display: flex; align-items: center; gap: 10px; margin-top: 27px; padding-top: 20px; border-top: 1px solid var(--line); }
.question-actions .spacer { flex: 1; }
.answer-sheet { padding: 20px; position: sticky; top: 102px; }
.sheet-progress { margin-bottom: 17px; }
.sheet-progress-head { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-500); margin-bottom: 8px; }
.sheet-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; max-height: 290px; overflow-y: auto; padding: 2px; }
.sheet-cell { aspect-ratio: 1; border: 1px solid var(--line); background: #fff; color: var(--ink-500); border-radius: 6px; font-size: 10px; }
.sheet-cell:hover { border-color: var(--blue-600); }
.sheet-cell.current { border-color: var(--blue-600); box-shadow: inset 0 0 0 1px var(--blue-600); color: var(--blue-600); }
.sheet-cell.answered { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.sheet-cell.correct { background: var(--green-bg); border-color: #a8cfc0; color: var(--green); }
.sheet-cell.wrong { background: var(--red-bg); border-color: #e1b4b4; color: var(--red); }
.sheet-cell.current.answered, .sheet-cell.current.correct, .sheet-cell.current.wrong { box-shadow: 0 0 0 2px var(--gold-500); }
.sheet-legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; color: var(--ink-400); font-size: 9px; }
.sheet-legend span { display: flex; align-items: center; gap: 5px; }
.sheet-legend i { width: 8px; height: 8px; border: 1px solid var(--line); border-radius: 2px; }
.sheet-legend .done { background: var(--navy-800); border-color: var(--navy-800); }
.sheet-legend .now { border-color: var(--blue-600); }
.submit-session { width: 100%; }
.session-note { margin-top: 14px; color: var(--ink-400); font-size: 9px; line-height: 1.6; text-align: center; }
.self-review { display: flex; gap: 10px; margin-top: 15px; }

/* Statistics */
.stats-hero { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.accuracy-card { padding: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.accuracy-donut { --value: 0; width: 135px; height: 135px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue-600) calc(var(--value) * 1%), #eaf0f3 0); position: relative; }
.accuracy-donut::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; }
.accuracy-donut div { position: relative; z-index: 1; text-align: center; }
.accuracy-donut b { display: block; font-family: Georgia, serif; font-size: 30px; font-weight: 400; }
.accuracy-donut span { color: var(--ink-400); font-size: 9px; }
.accuracy-card > p { margin: 15px 0 0; color: var(--ink-500); font-size: 10px; }
.stats-overview { padding: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.overview-item { padding: 12px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.overview-item:last-child { border: 0; }
.overview-item span { color: var(--ink-500); font-size: 10px; }
.overview-item b { font-family: Georgia, serif; font-size: 28px; font-weight: 400; margin: 8px 0; }
.overview-item small { color: var(--ink-400); font-size: 9px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.stats-grid .panel { padding: 23px; }
.settings-list { display: grid; gap: 10px; }
.setting-button { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; }
.setting-button:hover { background: #fafcfd; }
.setting-button > svg { color: var(--blue-600); }
.setting-button div { flex: 1; }
.setting-button b, .setting-button span { display: block; }
.setting-button b { font-size: 12px; margin-bottom: 4px; }
.setting-button span { color: var(--ink-500); font-size: 9px; }
.setting-button > svg:last-child { width: 15px; color: var(--ink-400); }

/* Modal, detail and feedback */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 25px; background: rgba(5,20,33,.58); backdrop-filter: blur(5px); animation: fadeIn .18s; }
.modal { width: min(490px, 100%); max-height: calc(100vh - 50px); display: flex; flex-direction: column; background: #fff; border-radius: 17px; box-shadow: var(--shadow-lg); animation: slideUp .22s; overflow: hidden; }
.modal.large { width: min(760px, 100%); }
.modal-header { display: flex; align-items: center; gap: 12px; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; font-size: 17px; flex: 1; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: #fafcfd; }
.modal-body > p { color: var(--ink-500); line-height: 1.8; margin: 0; }
.modal-icon { width: 47px; height: 47px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-100); color: var(--gold-600); margin-bottom: 17px; }
.modal-icon.danger { color: var(--red); background: var(--red-bg); }
.result-modal { text-align: center; }
.result-score { width: 128px; height: 128px; margin: 5px auto 20px; border-radius: 50%; border: 7px solid var(--gold-100); display: grid; place-items: center; background: #fdfaf4; }
.result-score b { font-family: Georgia, serif; font-size: 39px; font-weight: 400; color: var(--gold-600); }
.result-score small { font-size: 11px; color: var(--ink-400); }
.result-modal h3 { font-family: "Songti SC", serif; font-size: 24px; margin: 0 0 10px; }
.result-modal > p { color: var(--ink-500); font-size: 11px; }
.result-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0 4px; border: 1px solid var(--line); border-radius: 11px; }
.result-metrics div { padding: 15px 8px; border-right: 1px solid var(--line); }
.result-metrics div:last-child { border: 0; }
.result-metrics b, .result-metrics span { display: block; }
.result-metrics b { font-family: Georgia, serif; font-size: 20px; font-weight: 400; margin-bottom: 5px; }
.result-metrics span { color: var(--ink-400); font-size: 9px; }
.detail-stem { font-size: 16px; line-height: 1.9; font-weight: 600; white-space: pre-wrap; margin: 15px 0 20px; }
.detail-options { display: grid; gap: 9px; }
.detail-option { display: flex; gap: 10px; padding: 11px 13px; background: #f8fafb; border-radius: 8px; line-height: 1.7; font-size: 12px; }
.detail-option b { color: var(--blue-600); }
.detail-option.correct { background: var(--green-bg); color: #246c58; }
.detail-answer { margin-top: 18px; padding: 16px; border-radius: 10px; background: var(--gold-100); color: #79623d; line-height: 1.8; font-size: 12px; white-space: pre-wrap; }
.detail-answer b { color: var(--gold-600); }
.detail-source { margin-top: 16px; color: var(--ink-400); font-size: 9px; line-height: 1.7; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 32px; transform: translate(-50%, 20px); min-width: 220px; max-width: calc(100vw - 40px); padding: 12px 20px; border-radius: 10px; background: var(--navy-900); color: #fff; text-align: center; font-size: 12px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.goal-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 17px; }
.goal-option { height: 45px; border: 1px solid var(--line); background: #fff; border-radius: 8px; }
.goal-option.active { border-color: var(--blue-600); background: var(--blue-100); color: var(--blue-600); font-weight: 700; }
.loading-screen { min-height: 400px; display: grid; place-items: center; color: var(--ink-500); }

/* AI learning assistant */
.assistant-root { position: fixed; z-index: 108; width: 76px; height: 88px; pointer-events: none; }
.assistant-root.hidden { display: none; }
.assistant-root.panel-open .police-fab, .assistant-root.panel-open .assistant-hint { display: none; }
.police-fab { position: relative; width: 76px; height: 76px; padding: 0; border: 0; background: transparent; pointer-events: auto; touch-action: none; cursor: grab; filter: drop-shadow(0 10px 17px rgba(7, 24, 39, .22)); }
.police-fab:hover .police-avatar-wrap { animation-play-state: paused; transform: translateY(-3px) scale(1.03); box-shadow: 0 15px 30px rgba(7, 24, 39, .22); }
.police-fab:active { cursor: grabbing; }
.assistant-root.dragging .police-fab { cursor: grabbing; }
.assistant-root.dragging .police-avatar-wrap { animation: none; transform: scale(1.04); }
.police-avatar-wrap { position: relative; width: 72px; height: 72px; display: block; border-radius: 50%; background: linear-gradient(145deg, #fffdf7, #f2ead9); border: 2px solid rgba(195, 161, 102, .65); box-shadow: 0 10px 24px rgba(7, 24, 39, .18), inset 0 0 0 3px rgba(255,255,255,.7); transition: transform .25s ease, box-shadow .25s ease; overflow: hidden; animation: policeFloat 4.8s ease-in-out infinite; }
.police-avatar-wrap img { width: 100%; height: 100%; display: block; object-fit: cover; }
.police-online { position: absolute; right: 3px; bottom: 5px; width: 11px; height: 11px; border-radius: 50%; background: #31a984; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(49, 169, 132, .12); }
.police-drag-tip { position: absolute; left: 50%; top: calc(100% + 1px); transform: translateX(-50%) translateY(-5px); padding: 3px 7px; border-radius: 5px; background: rgba(11, 31, 51, .88); color: rgba(255,255,255,.8); font-size: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: .2s; }
.police-fab:hover .police-drag-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.assistant-hint { position: absolute; right: 5px; bottom: 87px; width: 158px; padding: 13px 33px 13px 15px; border: 1px solid #e7dece; border-radius: 12px 12px 3px 12px; background: #fffdf9; box-shadow: 0 13px 30px rgba(7, 24, 39, .13); pointer-events: auto; animation: assistantHintIn .45s 1.2s both; }
.assistant-hint::after { content: ""; position: absolute; right: 13px; bottom: -7px; width: 13px; height: 13px; background: #fffdf9; border-right: 1px solid #e7dece; border-bottom: 1px solid #e7dece; transform: rotate(45deg); }
.assistant-hint span, .assistant-hint b { display: block; }
.assistant-hint span { color: var(--ink-500); font-size: 9px; margin-bottom: 4px; }
.assistant-hint b { color: var(--navy-800); font-size: 12px; letter-spacing: .2px; }
.assistant-hint-close { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: 0; background: transparent; color: var(--ink-400); display: grid; place-items: center; border-radius: 5px; }
.assistant-hint-close:hover { background: #f1ece2; color: var(--ink-700); }
.assistant-hint-close svg { width: 12px; height: 12px; }
.assistant-root.hint-dismissed .assistant-hint { display: none; }
.assistant-root.dragging .assistant-hint { display: none; }
.assistant-root.login-mode .assistant-hint { display: none; }
.ai-panel { position: fixed; z-index: 109; right: 24px; bottom: 108px; width: 390px; height: min(610px, calc(100vh - 140px)); pointer-events: auto; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(208, 217, 223, .9); border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(5, 24, 39, .24); transform-origin: right bottom; animation: aiPanelIn .23s ease both; }
.ai-panel[aria-hidden="true"] { display: none; }
.ai-panel-head { flex: none; min-height: 67px; padding: 11px 12px 11px 16px; display: flex; align-items: center; gap: 11px; background: var(--navy-900); color: #fff; position: relative; overflow: hidden; }
.ai-panel-head::after { content: ""; position: absolute; width: 110px; height: 110px; border: 1px solid rgba(195,161,102,.12); border-radius: 50%; right: 60px; top: -70px; pointer-events: none; }
.ai-head-avatar { width: 43px; height: 43px; border: 1px solid rgba(223,202,158,.5); border-radius: 50%; background: #f5efe3; position: relative; overflow: hidden; flex: none; }
.ai-head-avatar img { width: 100%; height: 100%; display: block; }
.ai-head-avatar .police-online { right: 0; bottom: 2px; width: 10px; height: 10px; }
.ai-head-copy { flex: 1; min-width: 0; position: relative; z-index: 1; }
.ai-head-copy b { display: block; font-family: "Songti SC", "STSong", serif; font-size: 16px; letter-spacing: 1px; margin-bottom: 4px; }
.ai-head-copy span { display: flex; align-items: center; gap: 5px; color: rgba(255,255,255,.46); font-size: 9px; }
.ai-head-copy span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #49b795; }
.ai-head-copy span.checking::before { background: var(--gold-500); animation: statusPulse 1s infinite; }
.ai-head-copy span.offline::before { background: #c77878; }
.ai-head-actions { display: flex; gap: 2px; position: relative; z-index: 1; }
.ai-head-button { width: 31px; height: 31px; border: 0; background: transparent; border-radius: 7px; color: rgba(255,255,255,.5); display: grid; place-items: center; }
.ai-head-button:hover { color: #fff; background: rgba(255,255,255,.09); }
.ai-head-button svg { width: 16px; height: 16px; }
.ai-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 16px 16px; background: #f5f7f8; scroll-behavior: smooth; }
.ai-messages::-webkit-scrollbar { width: 4px; }
.ai-messages::-webkit-scrollbar-thumb { background: #cfd8dd; border-radius: 4px; }
.ai-welcome { padding: 7px 8px 10px; text-align: center; }
.ai-welcome-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 13px; background: #f5efe3; border: 1px solid #e5d8bd; overflow: hidden; box-shadow: 0 7px 20px rgba(12,40,58,.08); }
.ai-welcome-avatar img { width: 100%; height: 100%; display: block; }
.ai-welcome h3 { font-family: "Songti SC", "STSong", serif; font-size: 19px; margin: 0 0 8px; color: var(--navy-800); letter-spacing: .5px; }
.ai-welcome p { font-size: 11px; line-height: 1.8; color: var(--ink-500); margin: 0 auto 18px; max-width: 285px; }
.ai-welcome-prompts { display: grid; gap: 8px; text-align: left; }
.ai-suggest { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 11px; border: 1px solid #e2e8eb; border-radius: 9px; background: #fff; color: var(--ink-700); font-size: 11px; text-align: left; transition: .18s; }
.ai-suggest:hover { border-color: #b8c9d3; color: var(--navy-800); background: #fbfdfe; transform: translateY(-1px); }
.ai-suggest svg { width: 15px; height: 15px; color: var(--gold-600); flex: none; }
.ai-suggest span { flex: 1; }
.ai-suggest svg:last-child { width: 13px; color: var(--ink-400); }
.ai-message { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 15px; animation: messageIn .2s ease; }
.ai-message-avatar { width: 27px; height: 27px; flex: none; border-radius: 50%; overflow: hidden; background: #f5efe3; border: 1px solid #e5dac4; }
.ai-message-avatar img { width: 100%; height: 100%; display: block; }
.ai-message-content { max-width: calc(100% - 38px); }
.ai-message-name { color: var(--ink-400); font-size: 8px; margin: 0 0 5px 3px; }
.ai-bubble { padding: 11px 13px; border: 1px solid #e5eaed; border-radius: 3px 12px 12px 12px; background: #fff; color: var(--ink-700); font-size: 12px; line-height: 1.82; box-shadow: 0 3px 12px rgba(12,40,58,.035); overflow-wrap: anywhere; }
.ai-message.user { flex-direction: row-reverse; }
.ai-message.user .ai-message-content { max-width: 82%; }
.ai-message.user .ai-message-name { text-align: right; margin: 0 3px 5px 0; }
.ai-message.user .ai-bubble { background: var(--navy-800); border-color: var(--navy-800); color: rgba(255,255,255,.92); border-radius: 12px 3px 12px 12px; box-shadow: 0 5px 14px rgba(11,31,51,.11); }
.ai-bubble p { margin: 0 0 9px; }
.ai-bubble p:last-child { margin-bottom: 0; }
.ai-bubble strong { color: var(--navy-900); font-weight: 700; }
.ai-message.user .ai-bubble strong { color: #fff; }
.ai-bubble h1, .ai-bubble h2, .ai-bubble h3, .ai-bubble h4 { font-size: 13px; margin: 12px 0 7px; color: var(--navy-800); }
.ai-bubble h1:first-child, .ai-bubble h2:first-child, .ai-bubble h3:first-child { margin-top: 0; }
.ai-bubble ul, .ai-bubble ol { margin: 5px 0 9px; padding-left: 19px; }
.ai-bubble li { margin: 4px 0; }
.ai-bubble li::marker { color: var(--gold-600); }
.ai-bubble code { padding: 2px 5px; border-radius: 4px; background: #f0f3f5; color: #9b5a46; font-size: 11px; }
.ai-bubble blockquote { margin: 9px 0; padding: 7px 10px; border-left: 2px solid var(--gold-500); background: #fbf8f1; color: #766b56; }
.ai-message.user .ai-bubble code { background: rgba(255,255,255,.13); color: #fff; }
.ai-typing { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 4px; }
.ai-typing i { width: 5px; height: 5px; border-radius: 50%; background: #9cabb5; animation: typingDot 1.2s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .16s; }
.ai-typing i:nth-child(3) { animation-delay: .32s; }
.ai-loading-copy { display: block; color: var(--ink-400); font-size: 9px; margin-top: 7px; }
.ai-error-card { padding: 11px 12px; border: 1px solid #edd2d2; border-radius: 9px; background: #fff8f8; color: var(--red); font-size: 11px; line-height: 1.7; }
.ai-error-card p { margin: 0 0 8px; }
.ai-retry { min-height: 30px; padding: 0 10px; border: 1px solid #e2b5b5; border-radius: 6px; background: #fff; color: var(--red); font-size: 10px; display: inline-flex; align-items: center; gap: 5px; }
.ai-retry:hover { background: var(--red-bg); }
.ai-retry svg { width: 13px; height: 13px; }
.ai-context-note { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 4px 7px; border-radius: 5px; background: var(--gold-100); color: var(--gold-600); font-size: 8px; }
.ai-context-note svg { width: 11px; height: 11px; }
.ai-composer { flex: none; padding: 10px 13px 12px; border-top: 1px solid #e7ecef; background: #fff; }
.ai-quick-prompts { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.ai-quick-prompts:empty { display: none; }
.ai-quick-prompts::-webkit-scrollbar { display: none; }
.ai-quick-prompts button { flex: none; height: 27px; padding: 0 9px; border: 1px solid #e7e2d8; border-radius: 14px; background: #fdfbf7; color: #83745b; white-space: nowrap; font-size: 9px; }
.ai-quick-prompts button:hover { border-color: var(--gold-500); color: var(--gold-600); }
.ai-input-row { min-height: 48px; display: flex; align-items: flex-end; gap: 8px; padding: 7px 7px 7px 12px; border: 1px solid #dce5ea; border-radius: 12px; background: #f9fbfc; transition: .2s; }
.ai-input-row:focus-within { border-color: #8aa8bb; box-shadow: 0 0 0 3px rgba(35,101,142,.07); background: #fff; }
.ai-input-row textarea { flex: 1; min-width: 0; max-height: 112px; min-height: 30px; padding: 5px 0; border: 0; outline: 0 !important; resize: none; background: transparent; color: var(--ink-900); line-height: 1.55; font-size: 12px; box-shadow: none !important; }
.ai-input-row textarea::placeholder { color: #9ba8b2; }
.ai-send { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--navy-900); color: #fff; display: grid; place-items: center; transition: .18s; flex: none; }
.ai-send:hover:not(:disabled) { background: var(--navy-800); transform: translateY(-1px); }
.ai-send:disabled { background: #d9e0e4; color: #a9b4bb; cursor: not-allowed; }
.ai-send svg { width: 16px; height: 16px; }
.ai-composer-hint { display: flex; justify-content: space-between; gap: 8px; padding: 7px 2px 0; color: #a2adb5; font-size: 7px; line-height: 1.5; }
.ai-panel.collapsed { height: 67px; width: 330px; border-radius: 14px; }
.ai-panel.collapsed .ai-messages, .ai-panel.collapsed .ai-composer { display: none; }
.ai-panel.collapsed .ai-head-copy span::before { background: var(--gold-500); }
.explain-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 14px 16px; border: 1px solid #e4dac8; border-radius: 11px; background: linear-gradient(120deg, #fdfaf4, #f8f4eb); }
.explain-cta > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.explain-cta img { width: 37px; height: 37px; border-radius: 50%; border: 1px solid #dfd0b4; background: #fffdf8; flex: none; }
.explain-cta b, .explain-cta span { display: block; }
.explain-cta b { font-size: 12px; color: var(--navy-800); margin-bottom: 3px; }
.explain-cta span { color: #8b7b60; font-size: 9px; }
.explain-cta button { min-height: 34px; padding: 0 12px; border: 1px solid var(--gold-500); border-radius: 8px; background: #fff; color: var(--gold-600); font-size: 10px; font-weight: 650; display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.explain-cta button:hover { background: var(--gold-500); color: var(--navy-900); }
.explain-cta button svg { width: 14px; height: 14px; }
.ai-inline-explain { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--blue-600); font-size: 10px; font-weight: 600; padding: 4px 0; }
.ai-inline-explain:hover { color: var(--navy-900); }
.ai-inline-explain img { width: 19px; height: 19px; border-radius: 50%; border: 1px solid #e1d7c4; background: #fff; }
.ai-inline-explain svg { width: 13px; height: 13px; }
@keyframes policeFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes assistantHintIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes aiPanelIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes messageIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes typingDot { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes statusPulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (min-width: 1500px) {
  .main-content { padding-left: 42px; padding-right: 42px; }
  .welcome-card { min-height: 230px; }
  .source-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .source-card { padding: 13px; }
  .source-card > svg { display: none; }
}
@media (max-width: 1180px) {
  :root { --sidebar: 220px; }
  .main-content { padding: 24px; }
  .topbar { padding: 0 24px; }
  .global-search { width: 200px; }
  .source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .session-layout { grid-template-columns: minmax(0, 1fr) 245px; }
  .question-card { padding: 25px; }
}
@media (max-width: 960px) {
  :root { --sidebar: 212px; }
  .login-shell { grid-template-columns: 1fr 1fr; }
  .login-brand { padding: 38px; }
  .login-feature-row { gap: 17px; }
  .login-hero-copy h1 { font-size: 44px; }
  .login-panel { padding: 35px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config-layout, .session-layout { grid-template-columns: 1fr; }
  .config-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .answer-sheet { position: static; order: -1; }
  .sheet-grid { grid-template-columns: repeat(12, 1fr); max-height: none; }
  .answer-sheet .section-head { margin-bottom: 12px; }
  .sheet-progress { display: none; }
  .sheet-legend { margin: 10px 0; }
  .submit-session { width: auto; }
  .session-note { display: none; }
  .stats-hero { grid-template-columns: 220px minmax(0, 1fr); }
  .filter-bar { flex-wrap: wrap; }
  .search-control { flex-basis: 100%; }
  .filter-bar .form-select { flex: 1; }
}
@media (max-width: 900px) {
  .login-shell { display: block; background: #f7f9fa; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 30px 24px; }
  .mobile-login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 50px; }
  .mobile-login-logo strong { font-family: "Songti SC", serif; font-size: 20px; letter-spacing: 3px; }
  .mobile-login-logo .brand-mark { background: var(--navy-900); }
  .sidebar { transform: translateX(-100%); transition: transform .25s; width: 248px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(5,20,33,.45); }
  .app-body { margin-left: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { height: 72px; padding: 0 16px; }
  .breadcrumb { display: none; }
  .topbar h2 { font-size: 16px; }
  .global-search { width: 38px; padding: 0; justify-content: center; border: 0; background: #f1f4f6; }
  .global-search span, .global-search kbd { display: none; }
  .goal-chip { display: none; }
  .main-content { padding: 20px 22px 96px; }
  .app-footer { display: none; }
  .mobile-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: 67px; display: flex; align-items: center; justify-content: space-around; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(12px); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav button { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; color: var(--ink-400); font-size: 9px; }
  .mobile-nav button svg { width: 19px; height: 19px; }
  .mobile-nav button.active { color: var(--navy-800); }
  .welcome-card { padding: 28px 26px; min-height: 232px; }
  .welcome-copy h1 { font-size: 24px; }
  .welcome-copy p { max-width: min(400px, 100%); }
  .welcome-progress { display: none; }
  .welcome-actions { flex-wrap: wrap; }
  .metric-grid { gap: 11px; margin: 14px 0; }
  .metric-card { padding: 16px; gap: 10px; }
  .metric-icon { width: 36px; height: 36px; }
  .metric-card b { font-size: 21px; }
  .dashboard-stack { grid-template-columns: 1fr; }
  .dashboard-panel, .source-panel { padding: 19px; }
  .source-grid { grid-template-columns: 1fr; }
  .config-main { padding: 21px; }
  .mode-cards, .filter-grid, .config-side { grid-template-columns: 1fr; }
  .start-summary { align-items: stretch; flex-direction: column; }
  .exam-banner { padding: 25px; }
  .exam-seal { width: 55px; height: 55px; }
  .exam-rules { grid-template-columns: 1fr; }
  .session-top { align-items: flex-start; }
  .session-title p { display: none; }
  .session-title h3 { font-size: 14px; }
  .session-timer { height: 38px; font-size: 13px; padding: 0 11px; }
  .question-card { padding: 21px 18px; min-height: 0; }
  .question-stem { font-size: 15px; }
  .sheet-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .answer-sheet { padding: 16px; }
  .question-actions { flex-wrap: wrap; }
  .question-actions .spacer { display: none; }
  .question-actions .primary-button { flex: 1; }
  .stats-hero, .stats-grid { grid-template-columns: 1fr; }
  .stats-overview { padding: 15px; }
  .overview-item { padding: 10px; }
  .overview-item b { font-size: 23px; }
  .modal-backdrop { padding: 12px; }
  .modal { max-height: calc(100vh - 24px); }
  .modal-header, .modal-body { padding: 19px; }
  .modal-footer { padding: 14px 19px; }
  .filter-panel { padding: 13px; }
  .filter-bar .form-select { width: calc(50% - 6px); flex: none; }
  .bank-question { padding: 17px; }
  .bank-stem { font-size: 13px; }
}
@media (max-width: 420px) {
  .metric-card { display: block; }
  .metric-icon { margin-bottom: 10px; }
  .weekly-chart { gap: 5px; }
  .sheet-grid { grid-template-columns: repeat(8, 1fr); }
  .question-actions .secondary-button { padding: 0 13px; }
  .login-form-wrap h2 { font-size: 30px; }
  .mobile-login-logo { margin-bottom: 38px; }
}
@media (max-width: 760px) {
  .assistant-root { width: 66px; height: 76px; }
  .police-fab { width: 66px; height: 66px; }
  .police-avatar-wrap { width: 62px; height: 62px; }
  .police-drag-tip { display: none; }
  .assistant-hint { display: none !important; }
  .ai-panel { z-index: 96; left: 10px; right: 10px; bottom: 10px; width: auto; height: calc(100dvh - 20px); max-height: none; border-radius: 18px; }
  .ai-panel-head { min-height: 63px; padding: 9px 8px 9px 13px; }
  .ai-head-avatar { width: 40px; height: 40px; }
  .ai-head-button { width: 33px; height: 33px; }
  .ai-messages { padding: 18px 13px 14px; }
  .ai-composer { padding: 9px 11px 10px; }
  .ai-composer-hint span:last-child { display: none; }
  .ai-panel.collapsed { left: auto; right: 10px; bottom: 10px; width: min(330px, calc(100vw - 20px)); height: 63px; }
  .explain-cta { align-items: flex-start; flex-direction: column; }
  .explain-cta button { width: 100%; justify-content: center; }
}

/* ───────── 三端适配补充：竖屏平板 ───────── */
@media (max-width: 1024px) {
  /* 悬浮提示气泡会压住卡片内容，平板及以下一律隐藏，仅保留悬浮球 */
  .assistant-hint { display: none !important; }
  .welcome-copy h1 { font-size: 27px; }
  .exam-rules { gap: 10px; }
}

/* ───────── 三端适配补充：手机 ───────── */
@media (max-width: 560px) {
  .topbar { height: 64px; }
  .main-content { padding: 16px 14px 94px; }
  .welcome-card { padding: 24px 20px; min-height: 0; gap: 0; }
  .welcome-copy .date-line { margin-bottom: 11px; }
  .welcome-copy h1 { font-size: 23px; letter-spacing: .5px; margin-bottom: 11px; }
  .welcome-copy p { max-width: 100%; font-size: 11.5px; line-height: 1.7; }
  .welcome-actions { gap: 9px; margin-top: 19px; }
  .welcome-actions .primary-button, .welcome-actions .secondary-button { padding: 0 15px; font-size: 12.5px; }
  .metric-grid { gap: 10px; margin: 12px 0; }
  .metric-card { padding: 14px 13px; gap: 9px; }
  .metric-card b { font-size: 20px; }
  .dashboard-panel, .source-panel { padding: 17px 15px; }
  .panel-head h3 { font-size: 15px; }
  .stats-overview { padding: 12px 6px; gap: 0; }
  .overview-item { padding: 9px 7px; }
  .overview-item b { font-size: 21px; margin: 5px 0; }
  .overview-item small { font-size: 8.5px; line-height: 1.45; }
  .weekly-chart { height: 158px; gap: 6px; padding: 12px 2px 0; }
  .bar-track { height: 104px; }
  .answer-sheet { padding: 14px; }
  .sheet-grid { gap: 6px; }
  .sheet-legend { font-size: 8.5px; gap: 10px; }
  .question-card { padding: 18px 15px; }
  .question-actions { gap: 8px; }
  .question-actions .secondary-button, .question-actions .primary-button { min-height: 42px; padding: 0 14px; font-size: 12.5px; }
  .login-panel { padding: 26px 20px 34px; }
  .mobile-login-logo { margin-bottom: 32px; }
  .modal-header, .modal-body { padding: 16px; }
  .modal-footer { padding: 12px 16px; }
  .modal-footer .primary-button, .modal-footer .secondary-button { flex: 1; padding: 0 12px; }
}

/* ───────── 三端适配补充：答题卡折叠（手机） ───────── */
.sheet-toggle { display: none; }
@media (max-width: 560px) {
  .sheet-toggle { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-500); flex: none; }
  .sheet-toggle svg { width: 16px; height: 16px; }
  .sheet-toggle:hover { border-color: var(--blue-600); color: var(--blue-600); }
  .answer-sheet.collapsed .sheet-grid, .answer-sheet.collapsed .sheet-legend, .answer-sheet.collapsed .sheet-progress { display: none; }
  .answer-sheet.collapsed .section-head { margin-bottom: 12px; }
}

/* ───────── 三端适配补充：竖屏平板保留完整信息 ───────── */
@media (min-width: 561px) and (max-width: 900px) {
  .welcome-progress { display: block; }
  .goal-chip { display: flex; }
  .start-summary { flex-direction: row; align-items: center; }
  .start-summary .primary-button { width: auto; }
  /* 平板上练习方式两列更紧凑，信息密度更合理 */
  .mode-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 竖屏平板缩小悬浮球，减少对操作按钮的遮挡 */
  .assistant-root { width: 66px; height: 66px; }
  .police-fab { width: 66px; height: 66px; }
  .police-avatar-wrap { width: 62px; height: 62px; }
  .sheet-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .welcome-copy h1 { font-size: 28px; }
  .welcome-copy p { max-width: 400px; }
  .main-content { padding: 22px 26px 100px; }
}

/* 抽屉打开时隐藏悬浮球，避免浮在遮罩之上 */
body.drawer-open .assistant-root { display: none; }

/* 小屏手机：缩小悬浮球，减少对正文的遮挡 */
@media (max-width: 560px) {
  .assistant-root { width: 58px; height: 58px; }
  .police-fab { width: 58px; height: 58px; }
  .police-avatar-wrap { width: 54px; height: 54px; }
  .police-online { width: 9px; height: 9px; right: 2px; bottom: 4px; }
}

/* 矮屏手机登录页：隐藏悬浮球避免压住表单，并压缩纵向间距 */
@media (max-width: 560px) and (max-height: 720px) {
  .assistant-root.login-mode { display: none; }
  .login-panel { padding: 22px 20px 26px; }
  .mobile-login-logo { margin-bottom: 20px; }
  .login-kicker { margin-bottom: 8px; }
  .login-form-wrap h2 { font-size: 27px; }
  .login-subtitle { margin: 8px 0 18px; font-size: 12.5px; }
  .field-label { margin: 13px 0 7px; }
  .input-shell { min-height: 46px; }
  .input-shell input { height: 44px; }
  .login-options { margin: 13px 0; }
  .preset-note { margin-top: 16px; padding: 11px; }
  .login-copyright { margin-top: 22px; }
}
