

:root {
  color-scheme: light;

  

  --brand-50: #f0fdf4;
  --brand-100: #dcfce7;
  --brand-200: #bbf7d0;
  --brand-500: #22c55e;
  --brand-600: #16a34a;
  --brand-700: #15803d;
  --brand-800: #166534;

  

  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --danger: #dc2626;
  --danger-600: #b91c1c;
  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --warning: #d97706;
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --info: #2563eb;
  --info-700: #1d4ed8;
  --info-50: #eff6ff;
  --info-100: #dbeafe;
  --success: #16a34a;

  

  --canvas: #f4f7f5;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --line: #e3e9e6;
  --line-strong: #d2dbd7;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --disabled: #98a2b3;

  

  --brand: var(--brand-600);
  --text: var(--ink);
  --bg: var(--canvas);
  --border: var(--line);

  

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  

  --r-1: 10px;
  --r-2: 14px;
  --r-3: 20px;
  --r-4: 26px;
  --r-5: 32px;
  --r-6: 40px;
  --r-pill: 999px;

  

  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-2: 0 4px 16px rgba(16, 24, 40, .07);
  --shadow-3: 0 16px 48px rgba(16, 24, 40, .14);

  

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-press: 120ms;
  --dur-hover: 150ms;
  --dur-pop: 180ms;
  --dur-modal: 240ms;
  --dur-drawer: 240ms;
  --focus-ring: 0 0 0 3px rgba(22, 163, 74, .16);

  

  --font-sans: "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  

  --sidebar-w: 216px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 64px;
  --content-max: 1680px;
  --page-pad: 28px;
  --table-max-h: min(74vh, 800px);

  

  --glass-bg: rgba(255, 255, 255, .72);
  --glass-blur: 20px;
  --glass-sat: 180%;
  --scrim: rgba(16, 24, 40, .4);
  --overlay: rgba(16, 24, 40, .52);
  --toast-bg: rgba(255, 255, 255, .94);

  

  --z-topbar: 50;
  --z-popover: 80;
  --z-scrim: 90;
  --z-sidebar: 100;
  --z-bulk: 120;
  --z-modal: 1000;
  --z-loading: 1100;
  --z-toast: 1200;
}

.card,
.panel,
.squircle,
.stat,
.btn,
.btn-icon,
.btn-spinner,
.input,
.select,
.textarea,
.search-field,
.dropzone,
.upload-area,
.tag,
.badge,
.alert,
.avatar,
.table-wrap,
.page-btn,
.tab,
.segmented,
.segmented > button,
.segmented .seg-btn,
.pagination,
.modal,
.modal-card,
.modal-panel,
.sheet,
.toast,
.menu,
.menu-item,
.user-chip,
.bulk-bar,
.chart-tip,
.select-trigger,
.select-pop,
.select-option,
.select-search,
.skeleton,
.empty-icon,
.progress,
.progress-bar,
.switch input[type="checkbox"],
.switch-track,
.switch-track::before,
input[type="checkbox"],
input[type="radio"],
.auth-card,
.auth-tabs,
.auth-tab,
.auth-logo,
.auth-submit,
.invite-sheet,
.nav-item,
.sidebar-logo,
.sidebar-scrim,
.dev-banner,
.dev-swatch,
.dev-swatch-color,
.dev-auth-preview,
.is-squircle,
.spinner,
.spinner-lg,
.step-num,
.status-dot,
.legend-dot,
.chart-tip .tip-dot,
.skeleton-text,
.skeleton-title,
.skeleton-circle,
.skip-link,
.auth-link,
.breadcrumb a {
  border-radius: var(--r-2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

body.app-body {
  overscroll-behavior-y: none;
}

body.is-ready {
  --app-ready: 1;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
}

h1 {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
}

h2 {
  font-size: 16px;
  line-height: 1.4;
}

h3 {
  font-size: 15px;
  line-height: 1.4;
}

h4,
h5,
h6 {
  font-size: 14px;
  line-height: 1.4;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd,
dt,
figure,
blockquote {
  margin: 0;
}

a {
  color: var(--brand-700);
  text-decoration: none;
  transition: color var(--dur-hover) ease;
}

a:active {
  color: var(--brand-800);
}

img,
video {
  max-width: 100%;
  height: auto;
}

svg {
  flex: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

a,
[role="button"] {
  touch-action: manipulation;
}

input,
select,
textarea {
  min-width: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

hr {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

strong,
b {
  font-weight: 650;
}

::selection {
  background: var(--brand-100);
  color: var(--brand-800);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--disabled);
  background-clip: content-box;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid rgba(22, 163, 74, .55);
  outline-offset: 2px;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: fixed;
  top: -64px;
  left: 16px;
  z-index: 2000;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--brand-200);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-2);
  transition: top 160ms var(--ease-out);
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}

.grid,
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--sp-5);
  min-width: 0;
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

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

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

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

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

.row > .progress {
  flex: 1 1 200px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-width: 0;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  min-width: 0;
}

.spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--line);
}

.divider-vertical {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.w-full {
  width: 100%;
}

.min-w-0 {
  min-width: 0;
}

.nowrap {
  white-space: nowrap;
}

.truncate {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.text-small {
  font-size: 13px;
  line-height: 1.5;
}

.text-caption {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
}

.text-brand {
  color: var(--brand-700);
}

.text-success {
  color: var(--brand-700);
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--amber-700);
}

.text-info {
  color: var(--info-700);
}

.text-amber {
  color: var(--amber-700);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.num,
.tabular,
.score,
.score-value,
.score-total,
.score-std {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.display {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: var(--z-sidebar);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  padding: var(--sp-5) var(--sp-3) calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 0;
  min-width: 0;
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--r-2);
  object-fit: contain;
  background: var(--brand-50);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.sidebar-brand-text strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand-text span {
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-close {
  display: none;
  margin-left: auto;
}

.app-sidebar .sidebar-close {
  display: none;
}

.sidebar-nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  padding: 2px 6px 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group-label {
  padding: 4px 10px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 10px;
  border-radius: 14px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.nav-item .icon {
  color: var(--muted);
  transition: color var(--dur-hover) ease;
}

.nav-item.is-active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
}

.nav-item.is-active .icon {
  color: var(--brand-600);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: var(--r-pill);
  background: var(--brand-600);
  transform: translateY(-50%);
}

.nav-item-quiet {
  color: var(--muted);
  font-weight: 500;
}

.nav-item-quiet .icon {
  color: var(--disabled);
}

@media (hover: hover) and (pointer: fine) {
  .nav-item:hover {
    background: var(--surface-2);
    color: var(--ink);
  }

  .nav-item:hover .icon {
    color: var(--brand-700);
  }

  .nav-item.is-active:hover {
    background: var(--brand-100);
  }
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 10px;
  min-width: 0;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--brand-100);
  border-radius: var(--r-pill);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}

.sidebar-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.sidebar-user-text strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-text span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-scrim);
  border-radius: 0;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: scrim-in var(--dur-pop) var(--ease-out);
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 var(--page-pad);
  border-bottom: 1px solid var(--line);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .app-topbar {
    background: var(--surface);
  }
}

.topbar-menu {
  display: none;
}

.app-topbar .topbar-menu {
  display: none;
}

.topbar-title-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1.25;
}

.topbar-school {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-title {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-left: auto;
}

.user-menu-wrap {
  position: relative;
  flex: none;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 3px 10px 3px 4px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  transition:
    background-color var(--dur-hover) ease,
    border-color var(--dur-hover) ease,
    transform var(--dur-press) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
}

.user-chip .chev {
  color: var(--muted);
  transition: transform var(--dur-pop) var(--ease-out);
}

.user-chip[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) {
  .user-chip:hover {
    border-color: var(--line);
    background: var(--surface-2);
  }
}

.user-chip:active {
  transform: scale(0.97);
}

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: var(--z-popover);
  width: 224px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  transform-origin: top right;
  animation: pop-in var(--dur-pop) var(--ease-out);
}

.menu-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  line-height: 1.3;
}

.user-menu {
  width: 224px;
}

.menu-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.menu-head span {
  color: var(--muted);
  font-size: 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
  -webkit-user-select: none;
  user-select: none;
}

.menu-item .icon {
  color: var(--muted);
}

.menu-item-danger {
  color: var(--danger);
}

.menu-item-danger .icon {
  color: var(--danger);
}

@media (hover: hover) and (pointer: fine) {
  .menu-item:hover {
    background: var(--brand-50);
    color: var(--brand-800);
  }

  .menu-item-danger:hover {
    background: var(--danger-50);
    color: var(--danger-600);
  }
}

.menu-sep {
  height: 1px;
  margin: 5px 4px;
  background: var(--line);
}

.page {
  width: 100%;
  flex: 1 0 auto;
  padding: var(--sp-6) var(--page-pad) 56px;
}

.page-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.page-wide .page-inner {
  max-width: none;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.page-head-main {
  min-width: 0;
}

.page-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.page-sub {
  max-width: 76ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.page-head-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.page-head-actions > .btn,
.page-head-actions > .model-pill {
  flex: 0 0 auto;
  white-space: nowrap;
}

.page-head-actions .hngk-select-wrap {
  width: auto;
  min-width: 170px;
  max-width: 240px;
  flex: 0 0 auto;
}

.page-head-actions .hngk-select-wrap .hngk-select-trigger {
  min-width: 170px;
}

@media (max-width: 860px) {
  .page-head-actions {
    flex-wrap: wrap;
  }
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  min-width: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .page-content > :nth-child(-n + 6) {
    animation: page-rise 320ms var(--ease-out) both;
  }

  .page-content > :nth-child(2) { animation-delay: 30ms; }
  .page-content > :nth-child(3) { animation-delay: 60ms; }
  .page-content > :nth-child(4) { animation-delay: 90ms; }
  .page-content > :nth-child(5) { animation-delay: 120ms; }
  .page-content > :nth-child(6) { animation-delay: 150ms; }
}

.card {
  position: relative;
  min-width: 0;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-5);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.card.is-flush,
.card-flush {
  padding: 0;
  overflow: hidden;
}

.card.is-flush > .card-head,
.card-flush > .card-head {
  padding: var(--sp-5) var(--sp-5) 0;
}

.card.is-flush > .card-body,
.card-flush > .card-body {
  padding: var(--sp-5);
}

.card.is-flush > .table-wrap,
.card-flush > .table-wrap,
.card.is-flush > .table,
.card-flush > .table {
  border: 0;
  border-radius: 0;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.card-head > .hint,
.card-head > .muted {
  flex: none;
  padding-top: 2px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.card-title .icon {
  color: var(--brand-600);
}

.card-body {
  min-width: 0;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

.card-foot.is-between {
  justify-content: space-between;
}

.panel {
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--r-6);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.stat-label .icon {
  color: var(--disabled);
}

.stat-value {
  color: var(--ink);
  font-size: clamp(26px, 2.2vw, 32px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.stat-value .unit {
  margin-left: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.stat-delta.is-down {
  color: var(--danger);
}

.stat-delta.is-flat {
  color: var(--muted);
}

.stat.is-accent .stat-value {
  color: var(--amber-600);
}

.stat-icon {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-2);
  background: var(--brand-50);
  color: var(--brand-600);
}

.stat:has(.stat-icon) .stat-label,
.stat:has(.stat-icon) .stat-value {
  padding-right: 40px;
}

.inner-radius {
  border-radius: max(6px, calc(var(--r-5) - var(--sp-5)));
}

.squircle {
  border-radius: var(--r-4);
}

.btn {
  --btn-h: 40px;
  --btn-px: 18px;
  --btn-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  min-width: 0;
  padding: 0 var(--btn-px);
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 550;
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  transition:
    background-color var(--dur-hover) ease,
    border-color var(--dur-hover) ease,
    color var(--dur-hover) ease,
    box-shadow var(--dur-hover) ease,
    transform var(--dur-press) var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn:disabled,
.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  border-color: transparent;
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

.btn-primary:active {
  background: var(--brand-800);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow-1);
}

.btn-secondary:active {
  background: var(--surface-2);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
}

.btn-ghost:active {
  background: var(--brand-50);
}

.btn-danger {
  border-color: transparent;
  background: var(--danger);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

.btn-danger:active {
  background: var(--danger-600);
}

.btn-warning {
  border-color: transparent;
  background: var(--warning);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

.btn-warning:active {
  background: var(--amber-700);
}

.btn-link {
  height: auto;
  padding: 2px 0;
  border: 0;
  border-radius: 4px;
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--brand-700);
    color: #fff;
  }

  .btn-secondary:hover {
    border-color: var(--brand-200);
    background: var(--brand-50);
    color: var(--brand-800);
  }

  .btn-ghost:hover {
    background: var(--brand-50);
    border-color: var(--brand-200);
    color: var(--brand-700);
  }

  .btn-danger:hover {
    background: var(--danger-600);
    color: #fff;
  }

  .btn-warning:hover {
    background: var(--amber-700);
    color: #fff;
  }

  .btn-link:hover {
    color: var(--brand-800);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.btn-sm {
  --btn-h: 32px;
  --btn-px: 12px;
  --btn-radius: 10px;
  gap: 6px;
  font-size: 13px;
}

.btn-sm .icon {
  width: 16px;
  height: 16px;
}

.btn-lg {
  --btn-h: 44px;
  --btn-px: 22px;
  --btn-radius: 14px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn-pill {
  --btn-radius: var(--r-pill);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition:
    background-color var(--dur-hover) ease,
    border-color var(--dur-hover) ease,
    color var(--dur-hover) ease,
    transform var(--dur-press) var(--ease-out);
}

.btn-icon:active {
  transform: scale(0.97);
}

.btn-icon:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-icon:disabled,
.btn-icon.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-icon .icon {
  color: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .btn-icon:hover {
    background: var(--surface-2);
    color: var(--brand-700);
  }
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--r-1);
}

.btn-icon.btn-lg {
  width: 44px;
  height: 44px;
  border-radius: var(--r-2);
}

.btn.btn-icon {
  width: var(--btn-h);
  padding: 0;
}

.btn.is-loading,
.btn[aria-busy="true"] {
  opacity: 0.9;
  pointer-events: none;
  cursor: progress;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  opacity: 0.9;
  animation: spin 0.72s linear infinite;
}

.btn-secondary .btn-spinner,
.btn-ghost .btn-spinner {
  color: var(--brand-600);
}

@media (hover: hover) and (pointer: fine) {
  .btn.is-loading:not(:disabled):hover {
    transform: none;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
}

.label .required,
.required {
  color: var(--danger);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  transition:
    border-color var(--dur-hover) ease,
    box-shadow var(--dur-hover) ease,
    background-color var(--dur-hover) ease;
  -webkit-appearance: none;
  appearance: none;
}

.textarea {
  min-height: 112px;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--disabled);
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .input:hover,
  .select:hover,
  .textarea:hover {
    border-color: var(--muted);
  }
}

.input:focus,
.select:focus,
.textarea:focus,
.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: var(--focus-ring);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  background: var(--surface-2);
  color: var(--disabled);
  cursor: not-allowed;
  opacity: 1;
}

.input[readonly] {
  background: var(--surface-2);
  color: var(--ink-2);
}

.input.is-error,
.field.is-error .input,
.field.has-error .input,
.input[aria-invalid="true"],
.select.is-error,
.textarea.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.field.is-error .label {
  color: var(--danger);
}

.input.is-success,
.field.is-success .input {
  border-color: var(--line-strong);
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.hint .link {
  color: var(--brand-700);
}

.error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.form-error {
  padding: 10px 12px;
  border: 1px solid var(--danger-100);
  border-radius: var(--r-1);
  background: var(--danger-50);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.5;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  -webkit-appearance: none;
  appearance: none;
}

.form-textarea {
  min-height: 112px;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
}

.form-select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  cursor: pointer;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: var(--focus-ring);
}

.card .form-input {
  border-radius: max(6px, calc(var(--r-5) - var(--sp-5)));
}

.select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  cursor: pointer;
}

.select::-ms-expand {
  display: none;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.search-field .input,
.search-field .select {
  padding-left: 38px;
}

.search-field > .icon,
.search-field .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  min-width: 0;
}

.form-row > .field {
  flex: 1 1 220px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  min-width: 0;
}

.form-grid .field-full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: var(--sp-2);
}

input[type="checkbox"],
input[type="radio"] {
  display: inline-grid;
  place-content: center;
  width: 18px;
  height: 18px;
  flex: none;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface) center / 12px 12px no-repeat;
  cursor: pointer;
  transition:
    background-color var(--dur-hover) ease,
    border-color var(--dur-hover) ease,
    box-shadow var(--dur-hover) ease;
  -webkit-appearance: none;
  appearance: none;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

input[type="checkbox"]:checked {
  border-color: var(--brand-600);
  background-color: var(--brand-600);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5 6.4 11.4 12.5 5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

input[type="checkbox"]:indeterminate {
  border-color: var(--brand-600);
  background-color: var(--brand-600);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

input[type="radio"]:checked {
  border-color: var(--brand-600);
  background-color: var(--surface);
  box-shadow: inset 0 0 0 5px var(--brand-600);
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (hover: hover) and (pointer: fine) {
  input[type="checkbox"]:not(:disabled):not(:checked):hover,
  input[type="radio"]:not(:disabled):not(:checked):hover {
    border-color: var(--brand-500);
  }
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.switch input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 44px;
  height: 26px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  transition: background-color 200ms var(--ease-out);
}

.switch-track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .22);
  transition: transform 200ms var(--ease-out);
}

.switch input[type="checkbox"]:checked + .switch-track {
  background: var(--brand-600);
}

.switch input[type="checkbox"]:checked + .switch-track::before {
  transform: translateX(18px);
}

.switch input[type="checkbox"]:focus-visible + .switch-track {
  outline: none;
  box-shadow: var(--focus-ring);
}

.switch:active .switch-track::before {
  transform: scale(0.96);
}

.switch input[type="checkbox"]:checked:active + .switch-track::before {
  transform: translateX(18px) scale(0.96);
}

.switch.is-disabled,
.switch:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.switch-label {
  font-size: 13px;
  color: var(--ink-2);
}

.dropzone,
.upload-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 30px 20px;
  border: 2px dashed var(--brand-200);
  border-radius: var(--r-4);
  background: var(--brand-50);
  color: var(--ink-2);
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--dur-hover) ease,
    background-color var(--dur-hover) ease;
}

.dropzone.is-dragover,
.upload-area.is-dragover {
  border-color: var(--brand-600);
  background: var(--brand-100);
}

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--brand-600);
  box-shadow: var(--shadow-1);
}

.dropzone-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.dropzone-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
  .dropzone.is-uploading .dropzone-icon,
  .upload-area.is-uploading .dropzone-icon {
    animation: file-float 1.6s ease-in-out infinite;
  }
}

@media (hover: hover) and (pointer: fine) {
  .dropzone:hover,
  .upload-area:hover {
    border-color: var(--brand-500);
    background: var(--brand-50);
  }
}

.toolbar,
.table-toolbar,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  min-width: 0;
  margin-bottom: var(--sp-4);
}

.toolbar .spacer,
.table-toolbar .spacer,
.filter-bar .spacer {
  flex: 1 1 auto;
}

.toolbar .search-field,
.table-toolbar .search-field {
  flex: 1 1 240px;
  max-width: 360px;
}

.toolbar .select {
  flex: 0 1 180px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.search-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--dur-hover) ease,
    box-shadow var(--dur-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
  .select-trigger:hover {
    border-color: var(--muted);
  }
}

.search-select.is-open .select-trigger,
.select-trigger:focus-visible {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: var(--focus-ring);
}

.select-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-value.is-placeholder,
.select-value .placeholder {
  color: var(--disabled);
}

.select-caret {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  pointer-events: none;
  transform: translateY(-50%);
  transition: transform var(--dur-pop) var(--ease-out);
}

.search-select.is-open .select-caret {
  transform: translateY(-50%) rotate(180deg);
}

.select-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: var(--z-popover);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  transform-origin: top center;
  animation: pop-in var(--dur-pop) var(--ease-out);
}

.select-search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.select-search .input {
  min-height: 36px;
  padding-left: 12px;
  font-size: 13px;
}

.select-search .input:focus {
  box-shadow: var(--focus-ring);
}

.select-list {
  max-height: 264px;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.select-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
}

.select-option .opt-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-option .opt-hint {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
}

.select-option.is-active:not(.is-selected) {
  background: var(--surface-2);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .select-option:hover:not(.is-selected) {
    background: var(--surface-2);
    color: var(--ink);
  }
}

.select-option.is-selected {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--brand-200);
}

.select-option.is-selected .opt-hint {
  color: var(--brand-700);
}

.select-empty {
  padding: 20px 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .select-option:not(.is-selected):hover {
    background: var(--surface-2);
    color: var(--ink);
  }
}

.table-wrap {
  position: relative;
  width: 100%;
  max-height: var(--table-max-h, min(74vh, 800px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.table-wrap.is-bordered {
  border: 1px solid var(--line);
}

.table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.5;
}

.table th,
.table td {
  padding: 0 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 42px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.table td {
  height: 48px;
  background: var(--surface);
}

.table tbody tr:last-child > td {
  border-bottom: 0;
}

.table tbody tr.is-selected > td {
  background: var(--brand-50);
}

.table tbody tr.is-selected > td:first-child {
  box-shadow: inset 3px 0 0 var(--brand-600);
}

.table th.num,
.table td.num,
.table .num,
.table th.numeric,
.table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.table .rank {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.table .score-total {
  color: var(--amber-700);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.table .score-std {
  color: var(--brand-700);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.table .col-check {
  width: 44px;
  padding-right: 0;
  text-align: center;
}

.table .col-actions {
  width: 1%;
  white-space: nowrap;
}

.table .sortable {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.table .is-sortable {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: color var(--dur-hover) ease, background-color var(--dur-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
  .table .sortable:hover {
    color: var(--brand-700);
  }

  .table .is-sortable:hover,
  .table th.is-sortable:hover {
    background: var(--brand-50);
    color: var(--brand-700);
  }
}

.table .is-sortable:focus-visible {
  outline: 2px solid rgba(22, 163, 74, .5);
  outline-offset: -2px;
}

.table th[aria-sort="ascending"],
.table th[aria-sort="descending"],
.table th.is-sorted {
  color: var(--brand-700);
}

.table .sort-arrow {
  display: inline-block;
  margin-left: 4px;
  color: var(--disabled);
  font-size: 10px;
  line-height: 1;
  vertical-align: 1px;
}

.table .sortable.is-sorted {
  color: var(--brand-700);
}

.table-empty-row > td {
  height: auto;
  padding: 0;
  background: var(--surface);
}

.table-empty-row + tr > td {
  border-top: 0;
}

.table .cell-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.table .cell-sub {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.table .cell-strong {
  color: var(--ink);
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .table tbody tr:not(.is-selected):hover > td {
    background: #f7fbf8;
  }
}

.table-scroll-hint {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 2px 0;
  color: var(--muted);
  font-size: 11.5px;
}

.table-scroll-hint.is-always {
  display: flex;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-top: var(--sp-4);
}

.pagination-info {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition:
    background-color var(--dur-hover) ease,
    color var(--dur-hover) ease,
    border-color var(--dur-hover) ease,
    transform var(--dur-press) var(--ease-out);
}

.page-btn:active {
  transform: scale(0.97);
}

.page-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.page-btn.is-active {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .1);
}

@media (hover: hover) and (pointer: fine) {
  .page-btn:not(.is-active):hover {
    background: var(--brand-50);
    color: var(--brand-700);
  }

  .page-btn.is-active:hover {
    background: var(--brand-700);
    color: #fff;
  }
}

.pagination-controls .btn-sm {
  height: 34px;
  border-radius: 10px;
}

.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: var(--z-bulk);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass-bg);
  box-shadow: var(--shadow-3);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  transform: translateX(-50%);
  animation: bulk-rise 220ms var(--ease-out);
}

.bulk-bar-text {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.bulk-bar [data-bulk-count] {
  color: var(--brand-700);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.tag .icon,
.tag svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.tag-brand,
.tag-success {
  border-color: var(--brand-200);
  background: var(--brand-50);
  color: var(--brand-700);
}

.tag-amber {
  border-color: var(--amber-100);
  background: var(--amber-50);
  color: var(--amber-700);
}

.tag-warning {
  border-color: var(--warning-100);
  background: var(--warning-50);
  color: var(--amber-700);
}

.tag-danger {
  border-color: var(--danger-100);
  background: var(--danger-50);
  color: var(--danger-600);
}

.tag-info {
  border-color: var(--info-100);
  background: var(--info-50);
  color: var(--info-700);
}

.tag-muted {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

.tag-draft {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

.tag-teacher {
  border-color: var(--brand-200);
  background: var(--brand-50);
  color: var(--brand-700);
}

.tag-student {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #fff;
}

.tag-student.is-outline {
  border-color: var(--brand-600);
  background: var(--surface);
  color: var(--brand-700);
}

.tag-pill {
  border-radius: var(--r-pill);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--brand-600);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.badge.is-muted {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

.badge.is-danger {
  background: var(--danger);
}

.badge.is-warning {
  background: var(--warning);
}

.badge-dot {
  width: 8px;
  height: 8px;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--brand-600);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--disabled);
  box-shadow: 0 0 0 3px rgba(152, 162, 179, .14);
}

.status-dot.is-active,
.status-dot.is-success {
  background: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
}

.status-dot.is-warning,
.status-dot.is-pending {
  background: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
}

.status-dot.is-danger,
.status-dot.is-error {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .14);
}

.status-dot.is-info {
  background: var(--info);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.status-dot.is-draft,
.status-dot.is-muted {
  background: var(--disabled);
  box-shadow: 0 0 0 3px rgba(152, 162, 179, .14);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.alert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
  color: var(--info);
}

.alert-body {
  flex: 1 1 auto;
  min-width: 0;
}

.alert-title {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
}

.alert-desc {
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.55;
}

.alert-close {
  width: 26px;
  height: 26px;
  margin: -3px -6px -3px 0;
  flex: none;
  border-radius: 8px;
  color: var(--muted);
}

@media (hover: hover) and (pointer: fine) {
  .alert-close:hover {
    background: rgba(16, 24, 40, .05);
    color: var(--ink);
  }
}

.alert-success {
  border-color: var(--brand-200);
  background: var(--brand-50);
  color: var(--brand-800);
}

.alert-success .alert-icon {
  color: var(--brand-600);
}

.alert-warning {
  border-color: var(--warning-100);
  background: var(--warning-50);
  color: var(--amber-700);
}

.alert-warning .alert-icon {
  color: var(--warning);
}

.alert-danger,
.alert-error {
  border-color: var(--danger-100);
  background: var(--danger-50);
  color: var(--danger-600);
}

.alert-danger .alert-icon,
.alert-error .alert-icon {
  color: var(--danger);
}

.alert-info {
  border-color: var(--info-100);
  background: var(--info-50);
  color: var(--info-700);
}

.alert-info .alert-icon {
  color: var(--info);
}

.alert .alert-title,
.alert-success .alert-title,
.alert-warning .alert-title,
.alert-danger .alert-title,
.alert-error .alert-title,
.alert-info .alert-title {
  color: inherit;
}

.alert .alert-desc {
  color: inherit;
  opacity: 0.82;
}

.tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur-hover) ease, background-color var(--dur-hover) ease;
  -webkit-user-select: none;
  user-select: none;
}

.tab .icon {
  width: 16px;
  height: 16px;
}

.tab::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background-color var(--dur-hover) ease;
}

.tab.is-active {
  color: var(--brand-700);
  font-weight: 600;
}

.tab.is-active::after {
  background: var(--brand-600);
}

.tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(22, 163, 74, .4);
}

@media (hover: hover) and (pointer: fine) {
  .tab:hover {
    background: var(--surface-2);
    color: var(--ink);
  }

  .tab.is-active:hover {
    background: var(--brand-50);
    color: var(--brand-700);
  }
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
  display: none;
}

.segmented > button,
.segmented .seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease, box-shadow var(--dur-hover) ease;
}

.segmented > button.is-active,
.segmented .seg-btn.is-active {
  background: var(--surface);
  color: var(--brand-700);
  box-shadow: var(--shadow-1);
}

.segmented > button:focus-visible,
.segmented .seg-btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(22, 163, 74, .4);
}

@media (hover: hover) and (pointer: fine) {
  .segmented > button:not(.is-active):hover,
  .segmented .seg-btn:not(.is-active):hover {
    background: rgba(255, 255, 255, .68);
    color: var(--ink);
  }
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.breadcrumb a {
  border-radius: 4px;
  color: var(--muted);
}

@media (hover: hover) and (pointer: fine) {
  .breadcrumb a:hover {
    color: var(--brand-700);
  }
}

.breadcrumb .sep,
.breadcrumb [aria-hidden="true"] {
  color: var(--line-strong);
  -webkit-user-select: none;
  user-select: none;
}

.breadcrumb [aria-current="page"] {
  color: var(--ink-2);
  font-weight: 550;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
  overscroll-behavior: contain;
}

.modal-mask.is-open {
  opacity: 1;
}

.modal-mask.is-sheet {
  overscroll-behavior: contain;
}

.modal-host {
  position: relative;
  z-index: var(--z-modal);
}

.modal-panel {
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 48px));
  max-width: 100%;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition:
    opacity 200ms var(--ease-out),
    transform var(--dur-modal) var(--ease-out);
}

.modal-mask.is-open .modal-panel {
  opacity: 1;
  transform: none;
}

.modal-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  border-radius: var(--r-6);
  background: var(--surface);
  box-shadow: var(--shadow-3);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 20px 22px 10px;
}

.modal-title {
  min-width: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.modal-head .btn-icon {
  width: 34px;
  height: 34px;
  margin: -4px -6px -4px 0;
  border-radius: 10px;
  color: var(--muted);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 22px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-body > .hint:first-child {
  margin-top: -2px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: none;
  padding: 14px 22px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.modal-foot.is-between {
  justify-content: space-between;
}

.confirm-message {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
}

.confirm-message strong {
  color: var(--ink);
}

.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-6);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  overscroll-behavior: contain;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-modal);
  max-height: 92dvh;
  overflow: auto;
  padding: 12px 22px calc(20px + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--r-5) var(--r-5) 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-3);
  overscroll-behavior: contain;
}

.sheet::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
}

.toast-host {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 480px);
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--toast-bg);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(20px) saturate(var(--glass-sat));
  backdrop-filter: blur(20px) saturate(var(--glass-sat));
  pointer-events: auto;
  cursor: pointer;
  animation: toast-in 200ms var(--ease-out);
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  color: var(--info);
}

.toast-icon svg {
  width: 18px;
  height: 18px;
}

.toast-text {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.toast-success {
  border-color: var(--brand-200);
  background: rgba(240, 253, 244, .95);
}

.toast-success .toast-icon {
  color: var(--brand-600);
}

.toast-error {
  border-color: var(--danger-100);
  background: rgba(254, 242, 242, .96);
}

.toast-error .toast-icon {
  color: var(--danger);
}

.toast-warning {
  border-color: var(--warning-100);
  background: rgba(255, 251, 235, .96);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info {
  border-color: var(--info-100);
  background: rgba(239, 246, 255, .96);
}

.toast-info .toast-icon {
  color: var(--info);
}

.toast.is-leaving {
  animation: toast-out 200ms var(--ease-out) forwards;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  border: 2px solid var(--brand-200);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-loading);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, .74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overscroll-behavior: contain;
}

.loading-dot-stage {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.loading-dot-stage canvas {
  display: block;
  width: 76px;
  height: 76px;
}

.loading-text {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.skeleton {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef2f0 25%, #f8faf9 37%, #eef2f0 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.skeleton-row:last-child {
  border-bottom: 0;
}

.skeleton-text {
  display: block;
  height: 12px;
  flex: none;
  border-radius: 6px;
}

.skeleton-title {
  width: 38%;
  height: 18px;
  border-radius: 7px;
}

.skeleton-circle {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
}

.skeleton-card {
  width: 100%;
  height: 128px;
  border-radius: var(--r-4);
}

.skeleton-block {
  width: 100%;
  height: 72px;
}

.skeleton-table {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
}

.empty,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: clamp(32px, 6vw, 56px) 20px;
  text-align: center;
}

.empty-icon,
.error-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
  color: var(--brand-500);
}

.empty-icon svg,
.error-icon svg {
  width: 56px;
  height: 56px;
  stroke-width: 1.2;
}

.error-icon {
  color: var(--danger);
}

.empty-title,
.error-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}

.empty-desc,
.error-desc {
  max-width: min(560px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-wrap: balance;
}

.empty .btn,
.error-state .btn {
  margin-top: 8px;
}

.empty-inline {
  padding: 20px;
}

.empty-inline .empty-icon {
  width: 40px;
  height: 40px;
}

.empty-inline .empty-icon svg {
  width: 36px;
  height: 36px;
}

.empty.is-success .empty-icon {
  color: var(--brand-600);
}

.empty.is-success .empty-title {
  color: var(--brand-800);
}

@media (prefers-reduced-motion: no-preference) {
  .empty.is-success .empty-icon {
    animation: success-pop 400ms var(--ease-out) both;
  }

  .empty.is-success .empty-icon svg {
    animation: success-draw 400ms var(--ease-out) both;
  }
}

.steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.step:not(:last-child)::after {
  content: "";
  width: 24px;
  height: 1px;
  margin-left: 2px;
  background: var(--line-strong);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-hover) ease, border-color var(--dur-hover) ease, color var(--dur-hover) ease;
}

.step-label {
  line-height: 1.4;
}

.step.is-active {
  color: var(--brand-700);
  font-weight: 600;
}

.step.is-active .step-num {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}

.step.is-done {
  color: var(--ink-2);
}

.step.is-done .step-num {
  border-color: var(--brand-200);
  background: var(--brand-50);
  color: var(--brand-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5 6.4 11.4 12.5 5' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  color: transparent;
}

.progress {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 20px;
  padding-right: 48px;
  border-radius: var(--r-pill);
}

.progress::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 48px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--brand-100);
  transform: translateY(-50%);
}

.progress-bar {
  position: relative;
  z-index: 1;
  width: 0;
  height: 8px;
  flex: none;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand-500), var(--brand-600));
  transition: width 240ms ease;
}

.progress [data-progress-text] {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 2;
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform: translateY(-50%);
}

.progress.is-simple {
  padding-right: 0;
}

.progress.is-simple::before {
  right: 0;
}

.progress-sm {
  min-height: 16px;
}

.progress-sm::before,
.progress-sm .progress-bar {
  height: 6px;
}

.progress-lg::before,
.progress-lg .progress-bar {
  height: 12px;
}

.progress.is-striped .progress-bar,
.progress-striped .progress-bar {
  background-color: var(--brand-600);
  background-image:
    linear-gradient(90deg, var(--brand-500), var(--brand-600)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .22) 0 8px, transparent 8px 16px);
  background-size: 100% 100%, 28px 28px;
  background-position: 0 0, 0 0;
  animation: progress-stripes 1.2s linear infinite;
}

.progress.is-success .progress-bar {
  background: var(--brand-600);
}

.progress.is-error .progress-bar {
  background: var(--danger);
}

.progress.is-error::before {
  background: var(--danger-100);
}

.progress {
  padding-right: 0;
}

.progress::before {
  right: 0;
}

.progress:has([data-progress-text]) {
  padding-right: 48px;
}

.progress:has([data-progress-text])::before {
  right: 48px;
}

.progress.is-simple,
.progress:has([data-progress-text]).is-simple {
  padding-right: 0;
}

.progress.is-simple::before,
.progress:has([data-progress-text]).is-simple::before {
  right: 0;
}

.progress-line {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.progress-line .progress {
  flex: 1 1 auto;
}

.progress-label,
.progress-line > [data-progress-text] {
  min-width: 40px;
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chart {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 300px;
  min-width: 0;
  contain: layout style;
}

.chart.chart-sm {
  height: 240px;
}

.chart.chart-lg {
  height: 340px;
}

.chart-box {
  position: relative;
  width: 100%;
  height: 300px;
  min-width: 0;
}

.chart-box.chart-sm {
  height: 240px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  flex: 1 1 0;
  min-height: 0;
  overflow: visible;
  font-family: var(--font-sans);
}

.chart-svg path[stroke]:not([stroke="none"]) {
  stroke-width: 1.75;
}

.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 6;
  shape-rendering: crispEdges;
}

.chart-axis {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.chart-axis-text {
  fill: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.chart-bar {
  rx: 6px;
  transition: opacity var(--dur-hover) ease;
}

.chart-point {
  cursor: pointer;
  transition: r 150ms var(--ease-out), stroke-width 150ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .chart-bar:hover {
    opacity: 0.86;
  }

  .chart-point:hover {
    r: 5;
    stroke-width: 3;
  }

  .donut-seg:hover {
    stroke-width: 26;
  }
}

.chart-point:focus-visible {
  r: 5;
  stroke-width: 3;
  outline: none;
}

.chart-tip {
  position: absolute;
  z-index: 5;
  min-width: 96px;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(16, 24, 40, .92);
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: var(--shadow-2);
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -100%);
}

.chart-tip .tip-title {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 500;
}

.chart-tip .tip-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.chart-tip .tip-row strong {
  margin-left: auto;
  padding-left: 10px;
  color: #fff;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.chart-tip .tip-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
}

.chart-legend {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
  padding: 10px 4px 2px;
}

.chart-legend-col {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 0 0;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.legend-item strong {
  margin-left: 4px;
  color: var(--ink-2);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.legend-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
}

.donut-seg {
  transition: stroke-width 150ms var(--ease-out), opacity 150ms ease;
}

.donut-value {
  fill: var(--ink);
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.donut-label {
  fill: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
}

.sparkline {
  display: block;
  width: 96px;
  height: 28px;
  overflow: visible;
}

body.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #0b1710;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0b1710;
}

.auth-bg-layer {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1200ms ease;
}

.auth-bg-layer:nth-child(1) {
  background-image: url("/assets/images/login-bg.jpg");
}

.auth-bg-layer:nth-child(2) {
  background-image: url("/assets/images/login-bg2.jpg");
}

.auth-bg-layer:nth-child(3) {
  background-image: url("/assets/images/login-bg3.jpg");
}

.auth-bg-layer.is-active {
  opacity: 1;
}

.auth-overlay {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(9, 20, 13, .64) 0%, rgba(9, 20, 13, .34) 46%, rgba(9, 20, 13, .56) 100%),
    radial-gradient(120% 80% at 80% 20%, rgba(22, 163, 74, .14), transparent 60%);
}

.auth-caption {
  position: fixed;
  top: clamp(20px, 3vw, 32px);
  left: clamp(20px, 4vw, 44px);
  z-index: 2;
  margin: 0;
  color: #fff;
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.auth-layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 48px clamp(24px, 8vw, 128px);
}

.auth-card {
  position: relative;
  width: min(420px, 100%);
  padding: clamp(24px, 3.4vw, 40px);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: var(--r-6);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  animation: auth-card-in 360ms var(--ease-out) both;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  text-align: center;
}

.auth-logo {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: var(--r-3);
  object-fit: contain;
  background: var(--brand-50);
  box-shadow: var(--shadow-1);
}

.auth-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: var(--r-2);
  background: rgba(242, 246, 244, .94);
}

.auth-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease, box-shadow var(--dur-hover) ease;
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--brand-700);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}

.auth-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(22, 163, 74, .42);
}

@media (hover: hover) and (pointer: fine) {
  .auth-tab:not(.is-active):hover {
    background: rgba(255, 255, 255, .68);
    color: var(--ink);
  }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-card .input {
  height: 44px;
  min-height: 44px;
}

.auth-card .select-trigger {
  min-height: 44px;
}

.auth-school {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-school[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  .auth-school:not([hidden]) {
    animation: page-rise 220ms var(--ease-out) both;
  }
}

.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}

.auth-agree input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 4px;
  background-size: 10px 10px;
}

.auth-agree span {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-link {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--brand-700);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .auth-link:hover {
    color: var(--brand-800);
  }
}

.auth-link:focus-visible {
  outline: 2px solid rgba(22, 163, 74, .5);
  outline-offset: 2px;
}

.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 2px;
  border-radius: 14px;
  font-size: 15px;
}

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-more {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}

.auth-more a {
  color: inherit;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .auth-more a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.auth-more-divider {
  color: rgba(255, 255, 255, .42);
}

.auth-more .auth-link {
  color: inherit;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .auth-more .auth-link:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.auth-agreement {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.8;
}

.auth-agreement h3 {
  margin: 18px 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.auth-agreement h3:first-child {
  margin-top: 0;
}

.auth-agreement p {
  margin: 6px 0;
}

.auth-agreement ul {
  margin: 6px 0;
  padding-left: 18px;
  list-style: disc;
}

.auth-agreement li {
  margin: 3px 0;
}

.invite-sheet {
  width: 210mm;
  max-width: 100%;
  min-height: 297mm;
  margin: 0 auto;
  padding: 18mm 16mm;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: #fff;
  box-shadow: var(--shadow-2);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.8;
}

.invite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--brand-600);
}

.invite-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.invite-brand img {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: var(--r-1);
  object-fit: contain;
}

.invite-brand strong {
  color: var(--brand-800);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.invite-brand span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.invite-title {
  margin: 28px 0 6px;
  color: var(--brand-800);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-align: center;
}

.invite-subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.invite-body {
  color: var(--ink-2);
}

.invite-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
}

.invite-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.invite-meta dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.invite-sign {
  margin-top: 36px;
  color: var(--ink);
  font-size: 14px;
  line-height: 2;
  text-align: right;
}

.invite-foot {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.dev-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 16px;
  border: 1px dashed var(--brand-200);
  border-radius: var(--r-2);
  background: var(--brand-50);
  color: var(--brand-800);
  font-size: 13px;
  line-height: 1.5;
}

.dev-banner code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .8);
  color: var(--brand-800);
  font-size: 12px;
}

.dev-banner .tag {
  background: var(--surface);
}

.dev-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.dev-swatch {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  font-size: 12px;
}

.dev-swatch-color {
  height: 56px;
  border-radius: 0;
}

.dev-swatch-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  line-height: 1.4;
}

.dev-swatch-name {
  color: var(--ink);
  font-weight: 600;
}

.dev-swatch-value {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.dev-typescale > * {
  margin-bottom: 8px;
}

.dev-auth-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: #0b1710;
}

.auth-demo {
  position: relative;
  min-height: 660px;
  overflow: hidden;
}

.auth-demo .auth-bg {
  position: absolute;
}

.auth-demo .auth-layout {
  position: relative;
  min-height: 660px;
  padding: 32px;
  align-items: center;
  justify-content: flex-end;
}

.auth-demo .auth-card {
  width: min(380px, 100%);
}

.auth-demo .auth-caption {
  position: absolute;
  top: 20px;
  left: 24px;
}

.auth-demo .auth-more {
  position: absolute;
  bottom: 14px;
}

.dev-print-preview {
  overflow-x: auto;
  padding: 16px;
  border-radius: var(--r-3);
  background: var(--surface-2);
}

.dev-print-preview .invite-sheet {
  box-shadow: none;
}

.dev-mode-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

[id] {
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

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

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

@keyframes page-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes scrim-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bulk-rise {
  from {
    opacity: 0;
    translate: 0 10px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    translate: 0 -8px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    translate: 0 0;
  }
  to {
    opacity: 0;
    translate: 0 -6px;
  }
}

@keyframes progress-stripes {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 0 0, 28px 0;
  }
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes success-pop {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes success-draw {
  from {
    opacity: 0;
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
  }
  to {
    opacity: 1;
    stroke-dasharray: 80;
    stroke-dashoffset: 0;
  }
}

@keyframes file-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@media (max-width: 1280px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  :root {
    --page-pad: 20px;
    --topbar-h: 60px;
  }

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

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-sidebar);
    width: min(84vw, 320px);
    height: 100vh;
    height: 100dvh;
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow-3);
    transform: translateX(-102%);
    transition: transform var(--dur-drawer) var(--ease-drawer);
    will-change: transform;
  }

  .sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar-close {
    display: inline-flex;
  }

  .app-sidebar .sidebar-close {
    display: inline-flex;
  }

  .topbar-menu {
    display: inline-flex;
  }

  .app-topbar .topbar-menu {
    display: inline-flex;
  }

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

  .page {
    padding-top: var(--sp-5);
  }
}

@media (max-width: 800px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .form-row > .field {
    flex-basis: 100%;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-head-actions {
    justify-content: flex-start;
  }

  .toolbar .search-field,
  .table-toolbar .search-field {
    flex-basis: 100%;
    max-width: none;
  }
}

@media (max-width: 640px) {
  :root {
    --page-pad: 16px;
    --topbar-h: 56px;
  }

  .page {
    padding-top: var(--sp-4);
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  }

  .page-content {
    gap: var(--sp-4);
  }

  .card {
    padding: var(--sp-4);
    border-radius: var(--r-4);
  }

  .card.is-flush > .card-head,
  .card-flush > .card-head {
    padding: var(--sp-4) var(--sp-4) 0;
  }

  .card.is-flush > .card-body,
  .card-flush > .card-body {
    padding: var(--sp-4);
  }

  .panel {
    padding: var(--sp-4);
    border-radius: var(--r-5);
  }

  .stat {
    padding: var(--sp-4);
  }

  .page-head-actions {
    width: 100%;
  }

  .page-head-actions .btn {
    flex: 1 1 auto;
  }

  .app-topbar {
    gap: 8px;
  }

  .topbar-school {
    display: none;
  }

  .topbar-title {
    font-size: 14px;
  }

  .user-chip-name,
  .user-chip .chev {
    display: none;
  }

  .user-chip {
    width: 40px;
    height: 40px;
    padding: 3px;
    justify-content: center;
  }

  .user-chip .avatar {
    width: 30px;
    height: 30px;
  }

  

  .modal-mask {
    align-items: flex-end;
    padding: 0;
  }

  .modal-mask .modal-panel {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    transform: translateY(100%);
    transition:
      transform 260ms var(--ease-out),
      opacity 200ms var(--ease-out);
  }

  .modal-mask.is-open .modal-panel {
    transform: translateY(0);
  }

  .modal-card {
    position: relative;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: var(--r-5) var(--r-5) 0 0;
  }

  .modal-card::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 3;
    width: 36px;
    height: 4px;
    margin-left: -18px;
    border-radius: var(--r-pill);
    background: var(--line-strong);
  }

  .modal-head {
    padding: 26px 18px 8px;
  }

  .modal-body {
    padding: 2px 18px 18px;
  }

  .modal-foot {
    justify-content: stretch;
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .modal-foot .btn {
    flex: 1 1 0;
  }

  .sheet {
    padding-left: 18px;
    padding-right: 18px;
  }

  .toast-host {
    top: calc(8px + env(safe-area-inset-top, 0px));
    width: calc(100vw - 24px);
  }

  .toast {
    font-size: 13px;
    border-radius: var(--r-2);
  }

  .bulk-bar {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    justify-content: space-between;
    width: auto;
    padding: 10px 12px;
    border-radius: var(--r-3);
    transform: none;
  }

  

  .table-wrap {
    max-height: var(--table-max-h, 68vh);
    border-radius: var(--r-3);
  }

  .table {
    min-width: 560px;
    font-size: 13px;
  }

  .table th,
  .table td {
    padding-left: 12px;
    padding-right: 12px;
    white-space: nowrap;
  }

  .table td {
    height: 52px;
  }

  .table th:first-child,
  .table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--surface);
    box-shadow: 8px 0 12px -10px rgba(16, 24, 40, .22), 1px 0 0 var(--line);
  }

  .table th:first-child {
    z-index: 4;
    background: var(--surface-2);
  }

  .table tbody tr.is-selected > td:first-child {
    background: var(--brand-50);
  }

  .table .col-check {
    width: 40px;
  }

  .table-scroll-hint {
    display: flex;
  }

  .table.is-compact,
  .table-compact {
    min-width: 0;
  }

  .pagination {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .pagination-controls {
    width: 100%;
  }

  .pagination-controls .btn-sm {
    height: 38px;
  }

  .page-btn {
    min-width: 38px;
    height: 38px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }

  

  .toolbar,
  .table-toolbar,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar .search-field,
  .table-toolbar .search-field,
  .filter-bar .search-field {
    width: 100%;
    max-width: none;
    flex-basis: auto;
  }

  .toolbar .select,
  .table-toolbar .select,
  .filter-bar .select {
    width: 100%;
    flex: 1 1 auto;
  }

  .toolbar .btn,
  .table-toolbar .btn,
  .filter-bar .btn {
    width: 100%;
  }

  .steps {
    flex-wrap: nowrap;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .steps::-webkit-scrollbar {
    display: none;
  }

  .step:not(:last-child)::after {
    width: 14px;
  }

  .tabs {
    padding-bottom: 1px;
  }

  .segmented {
    max-width: 100%;
  }

  .alert {
    font-size: 12.5px;
  }

  

  .auth-layout {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
  }

  .auth-overlay {
    background: linear-gradient(180deg, rgba(9, 20, 13, .34) 0%, rgba(9, 20, 13, .62) 58%, rgba(9, 20, 13, .76) 100%);
  }

  .auth-card {
    width: 100%;
    max-height: none;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: var(--r-5) var(--r-5) 0 0;
    overflow: visible;
  }

  .auth-tabs {
    margin-bottom: 16px;
  }

  .auth-caption {
    top: calc(14px + env(safe-area-inset-top, 0px));
    left: 18px;
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  .auth-more {
    position: static;
    padding: 10px 16px 0;
    font-size: 12px;
  }

  .auth-foot {
    margin-top: 14px;
  }

  .auth-demo {
    min-height: 760px;
  }

  .auth-demo .auth-layout {
    min-height: 760px;
    padding: 0;
    justify-content: flex-end;
  }

  .auth-demo .auth-card {
    width: 100%;
    max-height: none;
    border-radius: var(--r-5) var(--r-5) 0 0;
  }

  .auth-demo .auth-caption {
    top: 14px;
    left: 18px;
  }

  .auth-demo .auth-more {
    position: static;
    padding-bottom: 10px;
  }

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

  .dev-auth-preview {
    border-radius: var(--r-3);
  }

  .dev-print-preview {
    padding: 8px;
  }

  .invite-sheet {
    min-height: 0;
    padding: 16px;
    font-size: 13px;
  }

  .invite-title {
    margin-top: 20px;
    font-size: 21px;
  }

  .invite-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px 14px;
  }
}

@media (max-width: 480px) {
  .grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .page-sub {
    font-size: 12.5px;
  }

  .card {
    border-radius: var(--r-4);
  }

  .card-head {
    flex-direction: column;
    gap: 8px;
  }

  .card-title {
    font-size: 15px;
  }

  .auth-title {
    font-size: 20px;
  }

  .auth-logo {
    width: 48px;
    height: 48px;
  }

  .toolbar .btn,
  .table-toolbar .btn {
    flex: 1 1 auto;
  }

  .segmented > button,
  .segmented .seg-btn {
    flex: 1 1 auto;
    padding: 0 10px;
  }

  .dev-banner {
    padding: 10px 12px;
    font-size: 12px;
  }
}

@media (max-width: 640px), (pointer: coarse) {
  .btn {
    min-height: 44px;
  }

  .btn-sm {
    min-height: 44px;
  }

  .btn-icon {
    min-width: 44px;
    min-height: 44px;
  }

  .page-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .tab {
    height: 44px;
  }

  .auth-tab {
    height: 44px;
  }

  .select-trigger {
    min-height: 44px;
    font-size: 16px;
  }

  .nav-item {
    height: 48px;
  }

  .menu-item {
    min-height: 44px;
  }

  .select-option {
    min-height: 44px;
  }

  .select-search .input {
    min-height: 44px;
  }

  .switch {
    min-height: 44px;
  }

  .input,
  .select,
  .search-field .input,
  .select-search .input {
    min-height: 44px;
    font-size: 16px;
  }

  .textarea {
    font-size: 16px;
  }

  .input::placeholder,
  .textarea::placeholder {
    font-size: 16px;
  }

  .segmented > button,
  .segmented .seg-btn {
    min-height: 40px;
  }

  .dropzone {
    padding: 24px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }

  .skeleton {
    animation: none !important;
    background: var(--surface-2);
  }

  .progress.is-striped .progress-bar,
  .progress-striped .progress-bar {
    animation: none !important;
  }

  

  .spinner,
  .spinner-lg,
  .btn-spinner {
    animation: spin 1.6s linear infinite !important;
  }

  .auth-bg-layer {
    transition: opacity 120ms linear !important;
  }

  .btn:active,
  .btn-icon:active,
  .page-btn:active,
  .user-chip:active {
    transform: none;
  }

  .app-sidebar {
    transition: none !important;
  }

  .modal-panel {
    transform: none !important;
  }

  .page-content > *,
  .empty.is-success .empty-icon,
  .empty.is-success .empty-icon svg {
    animation: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .app-topbar,
  .toast,
  .bulk-bar,
  .auth-card,
  .modal-mask,
  .sidebar-scrim {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .app-topbar {
    background: var(--surface);
  }

  .toast {
    background: var(--surface);
  }

  .bulk-bar {
    background: var(--surface);
  }

  .auth-card {
    background: var(--surface);
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .app-topbar {
    background: var(--surface);
  }

  .auth-card {
    background: rgba(255, 255, 255, .98);
  }

  .toast,
  .bulk-bar {
    background: var(--surface);
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #c9d3cf;
    --line-strong: #98a2b3;
    --muted: #475467;
  }

  .btn-secondary {
    border-color: var(--line-strong);
  }

  .input,
  .select,
  .textarea {
    border-color: var(--line-strong);
  }
}

.print-only {
  display: none !important;
}

@page {
  size: A4;
  margin: 0;
}

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

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
  }

  .app-sidebar,
  .app-topbar,
  .sidebar-scrim,
  .toast-host,
  .modal-host,
  .loading-overlay,
  .skip-link,
  .page-head,
  .bulk-bar,
  .no-print,
  .dev-banner,
  .dev-auth-preview,
  .dev-mode-note {
    display: none !important;
  }

  .app {
    display: block;
    min-height: 0;
  }

  .app-main {
    display: block;
    min-height: 0;
  }

  .page {
    padding: 0;
  }

  .page-inner {
    max-width: none;
  }

  .page-content {
    display: block;
  }

  .page-content > * + * {
    margin-top: 12px;
  }

  .card,
  .panel,
  .stat,
  .table-wrap {
    border-color: #d9e0dd;
    break-inside: avoid;
  }

  .table-wrap {
    max-height: none;
    overflow: visible;
  }

  .table thead {
    display: table-header-group;
  }

  .table th {
    position: static;
  }

  .table tr {
    break-inside: avoid;
  }

  .invite-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 18mm 16mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    break-after: page;
  }

  .invite-sheet:last-child {
    break-after: auto;
  }

  

  .print-page {
    page-break-after: always;
    break-after: page;
  }

  .print-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .print-page .invite-sheet {
    break-after: auto;
    page-break-after: auto;
  }

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

  .print-only {
    display: block !important;
  }

  body.print-mode .page-content > :not(.print-area) {
    display: none !important;
  }

  body.print-mode .page-content > * + * {
    margin-top: 0;
  }

  body.print-mode .print-area {
    break-after: page;
  }

  body.print-mode .print-area,
  body.print-mode .print-area > .card-body,
  body.print-mode .dev-print-preview {
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
  }

  body.print-mode .print-area > .card-head {
    display: none;
  }
}

.auth-card-logo,
.affix-btn,
.legal-tab,
.stat-card,
.invite-cred,
.invite-terms,
.point-dot {
  border-radius: var(--r-1);
  corner-shape: superellipse(4);
}

body.auth-body {
  background: var(--canvas);
}

.auth {
  display: grid;
  grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--canvas);
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #0b1710;
  color: #fff;
}

.auth-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 0;
}

.auth-slide {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 2000ms ease;
}

.auth-slide.is-active {
  opacity: 1;
}

.auth-visual-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(9, 20, 13, .52) 0%, rgba(9, 20, 13, .12) 72%),
    linear-gradient(180deg, rgba(9, 20, 13, .16) 0%, rgba(9, 20, 13, .56) 60%, rgba(9, 20, 13, .84) 100%);
}

.auth-visual-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 660px;
  padding: clamp(32px, 6vh, 72px) clamp(24px, 5vw, 72px) 96px;
}

.auth-visual .auth-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin: 0 0 32px;
  text-align: left;
  color: #fff;
}

.auth-visual .auth-brand .auth-logo {
  width: 46px;
  height: 46px;
  border-radius: var(--r-2);
  background: rgba(255, 255, 255, .12);
  box-shadow: none;
  object-fit: contain;
}

.auth-visual .auth-brand strong {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.auth-visual .auth-brand span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, .62);
  font-size: 11.5px;
  letter-spacing: 0.03em;
}

.auth-headline {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .28);
}

.auth-desc {
  max-width: 46ch;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
  line-height: 1.85;
}

.auth-points {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, .86);
  font-size: 13px;
  line-height: 1.6;
}

.point-dot {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
}

.auth-visual-foot {
  position: absolute;
  left: clamp(24px, 5vw, 72px);
  right: clamp(24px, 5vw, 72px);
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  line-height: 1.5;
}

.auth-visual-foot a {
  color: inherit;
}

.auth-visual-foot .link-btn {
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .auth-visual-foot a:hover,
  .auth-visual-foot .link-btn:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.dot-sep {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(28px, 4vh, 56px) clamp(16px, 1.6vw, 40px);
  background:
    radial-gradient(120% 90% at 82% 6%, #eef7f1 0%, var(--canvas) 48%, #edf3ef 100%);
}

.auth-panel .auth-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--r-6);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 64px rgba(16, 24, 40, .12);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
}

.auth-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  min-width: 0;
}

.auth-card-logo {
  width: 46px;
  height: 46px;
  flex: none;
  padding: 2px;
  border-radius: var(--r-2);
  object-fit: contain;
  background: var(--brand-50);
}

.auth-card-head > div {
  min-width: 0;
}

.auth-card-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.auth-card-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-card .auth-tabs {
  margin-bottom: 20px;
}

.auth-card-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.auth-card-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.auth-card-foot .hint {
  font-size: 12px;
}

.auth-copyright {
  max-width: 440px;
  margin: 18px auto 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
  text-align: center;
}

.input-affix {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-affix .input {
  padding-right: 64px;
}

.affix-btn {
  position: absolute;
  top: 50%;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--brand-700);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
}

.affix-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (hover: hover) and (pointer: fine) {
  .affix-btn:hover {
    background: var(--brand-50);
    color: var(--brand-800);
  }
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
  border-radius: 4px;
  background-size: 10px 10px;
}

.check-row > span {
  flex: 1 1 auto;
  min-width: 0;
}

.link-btn {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--brand-700);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.link-btn:focus-visible {
  outline: 2px solid rgba(22, 163, 74, .5);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .link-btn:hover {
    color: var(--brand-800);
  }
}

.req {
  color: var(--danger);
  font-weight: 600;
}

.school-select {
  width: 100%;
  min-width: 0;
}

.grid-gap-sm {
  gap: var(--sp-3);
}

.shake {
  animation: shake 420ms var(--ease-standard);
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 60vh;
  padding: clamp(32px, 7vh, 72px) 20px;
  text-align: center;
}

body.auth-body > .error-page {
  min-height: 100vh;
  min-height: 100dvh;
}

.error-code {
  color: var(--brand-600);
  font-size: clamp(72px, 12vw, 128px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .error-code {
    background: linear-gradient(160deg, var(--brand-500) 10%, var(--brand-700) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.error-page .error-title {
  margin-top: 4px;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.error-page .error-desc {
  max-width: 46ch;
  font-size: 13.5px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.legal-modal {
  overflow: hidden;
}

.legal-tabs {
  display: flex;
  gap: 4px;
  flex: none;
  padding: 0 22px 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.legal-tabs::-webkit-scrollbar {
  display: none;
}

.legal-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  flex: none;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
}

.legal-tab.is-active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
}

.legal-tab:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (hover: hover) and (pointer: fine) {
  .legal-tab:not(.is-active):hover {
    background: var(--surface-2);
    color: var(--ink);
  }
}

.legal-body {
  max-height: 60vh;
  padding: 16px 22px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.8;
}

.legal-body h2 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.legal-body h3 {
  margin: 18px 0 6px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.45;
}

.legal-body p {
  margin: 8px 0;
  color: var(--ink-2);
}

.legal-body ul {
  margin: 8px 0;
  padding-left: 20px;
  list-style: disc;
}

.legal-body ol {
  margin: 8px 0;
  padding-left: 20px;
  list-style: decimal;
}

.legal-body li {
  margin: 4px 0;
}

.legal-body strong {
  color: var(--ink);
  font-weight: 650;
}

.legal-body .section-intro {
  color: var(--muted);
  font-size: 12.5px;
}

.modal-mask:has(.legal-modal) .modal-panel {
  width: min(680px, calc(100vw - 48px));
}

.log-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}

.log-panel .table-toolbar,
.log-panel .toolbar {
  margin-bottom: 0;
}

.log-panel .pagination {
  padding-top: 0;
}

.log-panel .table-wrap {
  max-height: var(--table-max-h, min(64vh, 720px));
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.stat-card .label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.stat-card .value {
  color: var(--ink);
  font-size: clamp(26px, 2.2vw, 32px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-card .desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.stat-card.is-accent .value {
  color: var(--amber-600);
}

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

@media (hover: hover) and (pointer: fine) {
  a.stat:hover {
    border-color: var(--brand-200);
    box-shadow: var(--shadow-2);
  }
}

.is-accent {
  color: var(--amber-600);
}

.cell-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cell-sub {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.cell-strong {
  color: var(--ink);
  font-weight: 600;
}

.invite-no {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.invite-cred {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 40px;
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px dashed var(--brand-500);
  border-radius: var(--r-2);
  background: var(--brand-50);
}

.invite-cred-item {
  min-width: 190px;
}

.invite-cred-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.invite-cred-value {
  display: block;
  margin-top: 2px;
  color: var(--brand-800);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.06em;
  word-break: break-all;
}

.invite-cred-value.is-muted {
  color: var(--amber-700);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.invite-section-title {
  margin: 20px 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.invite-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.8;
  list-style: decimal;
}

.invite-steps li {
  margin: 4px 0;
}

.invite-terms {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.invite-terms p {
  margin: 2px 0;
}

.invite-selected-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.invite-selected-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.invite-selected-main {
  min-width: 0;
}

@media (max-width: 1024px) {
  .auth {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    flex: 1 0 auto;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 40px 20px;
    background:
      radial-gradient(120% 90% at 82% 6%, #eef7f1 0%, var(--canvas) 48%, #edf3ef 100%);
  }

  .auth-panel .auth-card {
    max-width: 480px;
  }

  .auth-copyright {
    margin-top: 16px;
  }
}

@media (max-width: 640px) {
  .auth {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    background: #0b1710;
  }  .auth-visual {
    position: fixed;
    inset: 0;
    display: block;
    width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 0;
  }

  .auth-visual-content,
  .auth-visual-foot {
    display: none;
  }

  .auth-visual-shade {
    background: linear-gradient(180deg, rgba(9, 20, 13, .52) 0%, rgba(9, 20, 13, .74) 48%, rgba(9, 20, 13, .92) 100%);
  }

  .auth-panel {
    position: relative;
    z-index: 1;
    flex: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 12px 0 0;
    background: transparent;
  }

  .auth-panel .auth-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: var(--r-5) var(--r-5) 0 0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -18px 48px rgba(0, 0, 0, .28);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .auth-copyright {
    margin: 10px auto 0;
    padding: 0 16px calc(12px + env(safe-area-inset-bottom, 0px));
    color: rgba(255, 255, 255, .82);
    text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
  }

  .error-page {
    min-height: 70vh;
  }

  .legal-tabs {
    padding-left: 18px;
    padding-right: 18px;
  }

  .legal-body {
    max-height: 58vh;
    padding: 14px 18px 18px;
  }

  .modal-mask:has(.legal-modal) .modal-panel {
    width: 100%;
  }

  .invite-cred {
    gap: 10px 20px;
    padding: 12px 14px;
  }

  .invite-cred-item {
    min-width: 140px;
  }
}

@media print {
  body:has(.print-page) .page-content > :not(.print-area) {
    display: none !important;
  }

  body:has(.print-page) .page-head,
  body:has(.print-page) .no-print {
    display: none !important;
  }

  #invitePreviewCard,
  #invitePreviewCard > .card-body {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  #invitePreview {
    display: block !important;
    gap: 0 !important;
  }

  body:has(.print-page) .dev-print-preview,
  body:has(.print-page) .print-area,
  body:has(.print-page) .print-area > .card-body {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
  }

  .print-page,
  .invite-sheet {
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .print-page {
    page-break-after: always;
    break-after: page;
  }

  .print-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .invite-cred,
  .invite-terms {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.dev-auth-preview .auth {
  grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
  min-height: 680px;
  border-radius: inherit;
  overflow: hidden;
}

.dev-auth-preview .auth-visual {
  min-height: 680px;
  height: auto;
}

.dev-auth-preview .auth-visual-content {
  max-width: 460px;
  padding: 32px;
}

.dev-auth-preview .auth-headline {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 34px);
}

.dev-auth-preview .auth-desc {
  margin-bottom: 16px;
  font-size: 12.5px;
  line-height: 1.75;
}

.dev-auth-preview .auth-points li {
  font-size: 12px;
}

.dev-auth-preview .auth-visual-foot {
  left: 32px;
  right: 32px;
  bottom: 16px;
}

.dev-auth-preview .auth-panel {
  min-height: 680px;
  padding: 24px 20px;
}

.dev-auth-preview .auth-panel .auth-card {
  max-width: 380px;
  padding: 24px;
}

.dev-auth-preview .auth-card-foot {
  margin-top: 14px;
  padding-top: 12px;
}

.dev-auth-preview .auth-copyright {
  margin-top: 12px;
  font-size: 11px;
}

@media (max-width: 1024px) {
  .dev-auth-preview .auth {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .dev-auth-preview .auth-visual {
    height: 170px;
    min-height: 0;
    flex: none;
  }

  .dev-auth-preview .auth-visual-content {
    padding: 16px 20px;
  }

  .dev-auth-preview .auth-desc,
  .dev-auth-preview .auth-points,
  .dev-auth-preview .auth-visual-foot {
    display: none;
  }

  .dev-auth-preview .auth-panel {
    min-height: 0;
    padding: 24px 20px 28px;
  }
}

@media (max-width: 640px) {
  .dev-auth-preview .auth {
    display: block;
    min-height: 0;
  }

  .dev-auth-preview .auth-visual {
    position: relative;
    inset: auto;
    display: block;
    height: 150px;
    min-height: 0;
  }

  .dev-auth-preview .auth-visual-content {
    display: none;
  }

  .dev-auth-preview .auth-panel {
    position: relative;
    min-height: 0;
    padding: 16px;
    background: var(--canvas);
  }

  .dev-auth-preview .auth-panel .auth-card {
    max-width: none;
    border-radius: var(--r-5);
  }

  .dev-auth-preview .auth-copyright {
    margin-top: 10px;
    padding: 0;
    color: var(--muted);
    text-shadow: none;
  }
}

@media (max-width: 640px), (pointer: coarse) {
  .legal-tab {
    min-height: 44px;
  }

  .affix-btn {
    height: 38px;
    min-height: 38px;
    padding: 0 8px;
  }
}

.table th,
.table td,
table.data-table th,
table.data-table td {
  white-space: nowrap;
}

.table td .cell-wrap,
.table td .wrap,
.table td.cell-wrap,
.table td.wrap,
table.data-table td .cell-wrap,
table.data-table td.cell-wrap {
  white-space: normal;
  overflow-wrap: anywhere;
}

.topbar-title {
  font-size: 16px;
}

.field > .select,
.field > .input {
  flex: 0 0 auto;
  height: 42px;
  min-height: 42px;
}

.toolbar .field,
.table-toolbar .field,
.filter-bar .field {
  flex: 0 1 auto;
}

@media (max-width: 640px) {
  .auth-panel {
    padding: 0;
  }

  .auth-panel .auth-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .auth-card form {
    min-width: 0;
  }

  .auth-tabs {
    gap: 2px;
    padding: 3px;
  }

  .auth-tab {
    padding: 0 2px;
    font-size: 13px;
  }

  .auth-card .input,
  .auth-card .select-trigger {
    font-size: 16px;
  }

  .auth-card-foot p {
    overflow-wrap: anywhere;
  }

  .auth-copyright {
    padding-left: 20px;
    padding-right: 20px;
    text-align: center;
  }
}

:root {
  --r-1: 10px;
  --r-2: 14px;
  --r-3: 20px;
  --r-4: 26px;
  --r-5: 32px;
  --r-6: 40px;
  --sidebar-w: 216px;
  --sidebar-w-collapsed: 76px;
  --content-max: 1680px;
}

.app {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  transition: grid-template-columns 220ms cubic-bezier(.23, 1, .32, 1);
}

.app-sidebar {
  width: var(--sidebar-w);
  transition: width 220ms cubic-bezier(.23, 1, .32, 1), padding 220ms cubic-bezier(.23, 1, .32, 1);
}

.card { border-radius: var(--r-5); }
.panel { border-radius: var(--r-6); }
.stat { border-radius: var(--r-4); }
.btn { --btn-radius: 18px; border-radius: var(--btn-radius); }
.btn-sm { --btn-radius: 14px; }
.btn-lg { --btn-radius: 22px; }
.btn-icon { border-radius: 14px; }
.input,
.select,
.textarea { border-radius: 16px; min-height: 44px; }
.select-trigger { border-radius: 16px; min-height: 44px; }
.select-pop { border-radius: 22px; }
.select-option { border-radius: 14px; }
.menu { border-radius: 22px; }
.menu-item { border-radius: 14px; }
.nav-item { border-radius: 18px; height: 44px; }
.tag,
.badge { border-radius: 999px; }
.table-wrap { border-radius: 24px; }
.modal,
.modal-card,
.modal-panel { border-radius: 36px; }
.toast { border-radius: 20px; }
.alert { border-radius: 20px; }
.dropzone,
.upload-area { border-radius: 28px; }
.page-btn { border-radius: 14px; }
.tab { border-radius: 14px 14px 0 0; }
.pagination { border-radius: 999px; }
.user-chip { border-radius: 999px; }
.avatar { border-radius: 50%; }
.chart-tip { border-radius: 16px; }
.auth .auth-card { border-radius: 36px; }
.auth-tabs { border-radius: 18px; }
.auth-tab { border-radius: 14px; }
.affix-btn { border-radius: 12px; }
.legal-tab { border-radius: 12px; }
.empty-icon { border-radius: 20px; }
.toast { border-radius: 20px; }
.pagination .page-btn { border-radius: 14px; }

.topbar-collapse { display: none; }
.topbar-collapse .icon { transition: transform 220ms cubic-bezier(.23, 1, .32, 1); }
html[data-sidebar="collapsed"] .topbar-collapse .icon { transform: rotate(180deg); }

@media (min-width: 1025px) {
  .topbar-collapse { display: inline-flex; }

  html[data-sidebar="collapsed"] .app { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }

  html[data-sidebar="collapsed"] .app-sidebar {
    width: var(--sidebar-w-collapsed);
    padding-left: 10px;
    padding-right: 10px;
  }

  html[data-sidebar="collapsed"] .sidebar-brand {
    justify-content: center;
    padding: 2px 0 0;
  }

  html[data-sidebar="collapsed"] .sidebar-brand-text,
  html[data-sidebar="collapsed"] .nav-group-label,
  html[data-sidebar="collapsed"] .sidebar-user-text,
  html[data-sidebar="collapsed"] .nav-item > span {
    display: none;
  }

  html[data-sidebar="collapsed"] .sidebar-nav {
    padding: 2px 4px 8px;
  }

  html[data-sidebar="collapsed"] .nav-group {
    gap: 4px;
  }

  html[data-sidebar="collapsed"] .nav-item {
    justify-content: center;
    gap: 0;
    height: 46px;
    padding: 0;
  }

  html[data-sidebar="collapsed"] .nav-item .icon {
    width: 21px;
    height: 21px;
  }

  html[data-sidebar="collapsed"] .sidebar-user {
    justify-content: center;
    padding: 0;
  }

  html[data-sidebar="collapsed"] .sidebar-foot {
    gap: 6px;
  }

  html[data-sidebar="collapsed"] .sidebar-foot .nav-item {
    height: 42px;
  }
}

.table th,
.table td,
.table.data-table th,
.table.data-table td,
.data-table th,
.data-table td {
  text-align: center;
}

.table th.num,
.table td.num,
.table th.numeric,
.table td.numeric,
.table .num,
.table .numeric {
  text-align: center;
}

.table .cell-main {
  align-items: center;
  text-align: center;
}

.table .cell-sub {
  text-align: center;
}

.table .col-check,
.table .col-actions {
  text-align: center;
}

.table th .sort-arrow,
.table th .sort {
  margin-left: 4px;
}

.auth {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(20px, 4vw, 64px) clamp(20px, 7vw, 120px);
  background: #0b1710;
  overflow: hidden;
}

.auth .auth-slides {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.auth .auth-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1600ms ease;
  will-change: opacity;
}

.auth .auth-slide.is-active {
  opacity: 1;
}

.auth .auth-shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 17, 11, .62) 0%, rgba(7, 17, 11, .22) 48%, rgba(7, 17, 11, .6) 100%),
    linear-gradient(0deg, rgba(7, 17, 11, .55) 0%, rgba(7, 17, 11, 0) 48%);
}

.auth .auth-caption {
  position: fixed;
  left: clamp(20px, 4vw, 48px);
  bottom: calc(clamp(16px, 3vh, 30px) + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: .14em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}

.auth .auth-panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background: none;
}

.auth .auth-card {
  width: min(430px, 100%);
  max-width: 430px;
  margin: 0;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 36px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
}

.auth .auth-card-head {
  margin-bottom: 22px;
}

.auth .auth-card-head h2 {
  font-size: 20px;
  line-height: 1.3;
}

.auth .auth-card form {
  gap: 16px;
}

.auth .auth-card .btn-block {
  margin-top: 4px;
}

.auth.auth--plain {
  justify-content: center;
  background: radial-gradient(120% 90% at 20% 0%, #dcfce7 0%, #f4f7f5 45%, #edf3ef 100%);
}

.auth.auth--plain .auth-panel {
  justify-content: center;
}

.auth.auth--plain .auth-card {
  margin: 0 auto;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(16, 24, 40, .12);
}

@media (max-width: 1024px) {
  .auth {
    justify-content: center;
    padding: 24px;
  }

  .auth .auth-panel {
    justify-content: center;
  }

  .auth .auth-caption {
    top: calc(16px + env(safe-area-inset-top, 0px));
    bottom: auto;
    left: 20px;
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .auth {
    align-items: flex-end;
    padding: 0;
  }

  .auth .auth-panel {
    align-items: flex-end;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .auth .auth-card {
    width: 100%;
    max-width: none;
    padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 32px 32px 0 0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -18px 48px rgba(0, 0, 0, .28);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .auth .auth-card-head {
    margin-bottom: 16px;
  }

  .auth .auth-caption {
    top: calc(14px + env(safe-area-inset-top, 0px));
    left: 16px;
    font-size: 12px;
    letter-spacing: .1em;
  }
}

.dev-auth-preview .auth {
  display: flex;
  grid-template-columns: none;
  min-height: 640px;
  height: 640px;
  padding: 24px;
  border-radius: 24px;
  overflow: hidden;
}

.dev-auth-preview .auth .auth-slides {
  position: absolute;
}

.dev-auth-preview .auth .auth-panel {
  min-height: 0;
  height: 100%;
}

.dev-auth-preview .auth-panel .auth-card {
  width: min(350px, 100%);
  max-width: 350px;
  padding: 22px;
  border-radius: 28px;
}

.dev-auth-preview .auth .auth-caption {
  position: absolute;
  bottom: 18px;
}

.auth .auth-panel {
  flex-direction: row;
}

.auth .auth-caption {
  top: auto;
}

@media (max-width: 1024px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-sidebar {
    width: min(84vw, 320px);
  }
}

@media (max-width: 640px) {
  .dev-auth-preview .auth {
    height: 560px;
    min-height: 0;
    padding: 0;
  }

  .dev-auth-preview .auth .auth-caption {
    top: 14px;
    bottom: auto;
    left: 16px;
  }
}

:root {
  --r-1: 14px;
  --r-2: 18px;
  --r-3: 24px;
  --r-4: 30px;
  --r-5: 38px;
  --r-6: 48px;
}

.card { border-radius: var(--r-5); }
.panel { border-radius: var(--r-6); }
.stat { border-radius: 34px; }
.btn { --btn-radius: 22px; border-radius: var(--btn-radius); }
.btn-sm { --btn-radius: 18px; }
.btn-lg { --btn-radius: 26px; }
.btn-icon { border-radius: 16px; }
.input,
.select,
.textarea { border-radius: 20px; min-height: 44px; }
.select-trigger { border-radius: 20px; }
.select-pop { border-radius: 28px; }
.select-option { border-radius: 18px; }
.menu { border-radius: 28px; }
.menu-item { border-radius: 18px; }
.nav-item { border-radius: 22px; }
.table-wrap { border-radius: 30px; }
.modal,
.modal-card,
.modal-panel { border-radius: 48px; }
.toast { border-radius: 24px; }
.alert { border-radius: 24px; }
.dropzone,
.upload-area { border-radius: 34px; }
.page-btn { border-radius: 18px; }
.tab { border-radius: 18px 18px 0 0; }
.pagination { border-radius: 999px; }
.user-chip { border-radius: 999px; }
.avatar { border-radius: 50%; }
.chart-tip { border-radius: 20px; }
.auth .auth-card { border-radius: 44px; }
.auth-tabs { border-radius: 22px; }
.auth-tab { border-radius: 18px; }
.empty-icon { border-radius: 24px; }
.segmented { border-radius: 22px; }
.segmented > button,
.segmented .seg-btn { border-radius: 18px; }
.skeleton { border-radius: 18px; }

.app-topbar {
  gap: 6px;
}

.topbar-back {
  flex: none;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 4px;
}

.topbar-nav::-webkit-scrollbar { display: none; }

.topbar-nav-item {
  position: relative;
  flex: none;
  padding: 8px 14px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-hover) ease, background-color var(--dur-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
  .topbar-nav-item:hover {
    color: var(--ink);
    background: var(--surface-2);
  }
}

.topbar-nav-item.is-active {
  color: var(--brand-700);
  background: var(--brand-50);
  font-weight: 650;
}

.topbar-nav-item.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-600);
}

.topbar-actions {
  margin-left: auto;
  flex: none;
  gap: 10px;
}

.topbar-context {
  max-width: 34vw;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-sep {
  color: var(--line-strong);
  font-size: 13px;
  font-weight: 400;
}

.sidebar-collapse .icon {
  transition: transform 220ms cubic-bezier(.23, 1, .32, 1);
}

html[data-sidebar="collapsed"] .sidebar-collapse .icon {
  transform: rotate(180deg);
}

@media (max-width: 1024px) {
  .topbar-nav { display: none; }
  .sidebar-collapse { display: none !important; }
  .topbar-context { max-width: 42vw; }
}

@media (max-width: 640px) {
  .topbar-back { width: 36px; height: 36px; }
  .topbar-context { max-width: 34vw; font-size: 13px; }
  .topbar-actions { gap: 6px; }
}

.page-sub,
.card-head .hint {
  display: none;
}

:root {
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 16px;
  --r-4: 20px;
  --r-5: 24px;
  --r-6: 28px;
}

.card { border-radius: var(--r-4); }
.panel { border-radius: var(--r-5); }
.stat { border-radius: var(--r-3); }
.btn { --btn-radius: 12px; border-radius: var(--btn-radius); }
.btn-sm { --btn-radius: 10px; }
.btn-lg { --btn-radius: 14px; }
.btn-icon { border-radius: 10px; }
.input,
.select,
.textarea { border-radius: 12px; min-height: 40px; }
.select-trigger { border-radius: 12px; }
.select-pop { border-radius: 16px; }
.select-option { border-radius: 10px; }
.menu { border-radius: 16px; }
.menu-item { border-radius: 10px; }
.nav-item { border-radius: 12px; }
.table-wrap { border-radius: 16px; }
.modal,
.modal-card,
.modal-panel { border-radius: 24px; }
.toast { border-radius: 14px; }
.alert { border-radius: 14px; }
.dropzone,
.upload-area { border-radius: 18px; }
.page-btn { border-radius: 10px; }
.tab { border-radius: 12px 12px 0 0; }
.pagination { border-radius: 999px; }
.user-chip { border-radius: 999px; }
.avatar { border-radius: 50%; }
.chart-tip { border-radius: 12px; }
.auth .auth-card { border-radius: 28px; }
.auth-tabs { border-radius: 14px; }
.auth-tab { border-radius: 10px; }
.empty-icon { border-radius: 18px; }
.segmented { border-radius: 12px; }
.segmented > button,
.segmented .seg-btn { border-radius: 9px; }
.skeleton { border-radius: 10px; }

.topbar-nav-item {
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

/* 知识点库 */
.knowledge-subject {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
@media (hover: hover) and (pointer: fine) {
  .knowledge-subject:hover {
      border-color: var(--brand-200);
      transform: translateY(-1px);
  }
}
.knowledge-subject.is-active {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-100);
}
.knowledge-subject-count {
    font-size: 30px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--ink);
}
.knowledge-subject-count span {
    margin-left: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}
.knowledge-desc {
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* 圆角统一（PC 适中偏大，手机端收敛） */
:root {
  --r-1: 12px;
  --r-2: 16px;
  --r-3: 22px;
  --r-4: 28px;
  --r-5: 34px;
  --r-6: 40px;
}
.card { border-radius: 34px; }
.panel { border-radius: 40px; }
.stat { border-radius: 28px; }
.btn { --btn-radius: 22px; border-radius: var(--btn-radius); }
.btn-sm { --btn-radius: 16px; }
.btn-lg { --btn-radius: 26px; }
.btn-icon { border-radius: 16px; }
.input,
.select,
.textarea,
.select-trigger { border-radius: 18px; }
.select-pop { border-radius: 24px; }
.select-option { border-radius: 16px; }
.menu { border-radius: 24px; }
.menu-item { border-radius: 16px; }
.nav-item { border-radius: 18px; }
.table-wrap { border-radius: 24px; }
.modal,
.modal-card,
.modal-panel { border-radius: 36px; }
.toast,
.alert { border-radius: 20px; }

@media (max-width: 640px) {
  :root {
    --r-1: 10px;
    --r-2: 12px;
    --r-3: 16px;
    --r-4: 18px;
    --r-5: 20px;
    --r-6: 24px;
  }
  .card { border-radius: 20px; }
  .panel { border-radius: 24px; }
  .stat { border-radius: 18px; }
  .btn { --btn-radius: 14px; border-radius: var(--btn-radius); }
  .btn-sm { --btn-radius: 12px; }
  .btn-lg { --btn-radius: 16px; }
  .btn-icon { border-radius: 12px; }
  .input,
  .select,
  .textarea,
  .select-trigger { border-radius: 14px; }
  .select-pop { border-radius: 18px; }
  .select-option { border-radius: 12px; }
  .menu { border-radius: 18px; }
  .menu-item { border-radius: 12px; }
  .nav-item { border-radius: 14px; }
  .table-wrap { border-radius: 18px; }
  .modal,
  .modal-card,
  .modal-panel { border-radius: 24px; }
  .toast,
  .alert { border-radius: 14px; }
}

/* ==========================================================================
   Beta 胶囊 · 预测模型
   ========================================================================== */

.beta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, #166534 0%, #15803d 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(22, 163, 74, .24), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.beta-pill-lg {
  height: 22px;
  padding: 0 9px;
  font-size: 10.5px;
}

.beta-pill-head {
  margin-right: 2px;
}

.nav-item .beta-pill {
  margin-left: auto;
  flex: none;
  height: 16px;
  padding: 0 5px;
  font-size: 9px;
}

.nav-item > span:not(.beta-pill) {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-sidebar="collapsed"] .nav-item .beta-pill {
  display: none;
}

.switch-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  flex: 0 0 auto;
  align-self: flex-start;
  transition: border-color var(--dur-hover) ease, background-color var(--dur-hover) ease, opacity var(--dur-hover) ease;
}

.switch-badge .switch {
  min-height: 24px;
}

.switch-badge .switch-label {
  font-weight: 550;
}

.switch-badge.is-active {
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.switch-badge.is-disabled {
  opacity: .6;
}

.switch-badge .beta-pill {
  height: 17px;
  padding: 0 6px;
}

/* ==========================================================================
   历年学生成绩（Beta）
   ========================================================================== */

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

.history-metric,
.history-overview-side,
.history-cohort-item,
.history-stat,
.history-level-chart,
.history-subject-item,
.history-model-stat,
.history-model-note,
.history-dropzone,
.history-file-chip,
.history-map-chip,
.history-preview-stat,
.history-year-preview,
.history-side-note {
  corner-shape: superellipse(4);
}

.history-overview {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 150% at 100% 0%, rgba(220, 252, 231, .85) 0%, rgba(255, 255, 255, 0) 48%),
    var(--surface);
}

.history-overview::after {
  content: "";
  position: absolute;
  right: -74px;
  bottom: -116px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(22, 163, 74, .10);
  pointer-events: none;
}

.history-overview-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 28px;
  align-items: stretch;
}

.history-overview-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.history-overview-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-700);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .04em;
}

.history-overview-kicker .icon {
  width: 16px;
  height: 16px;
}

.history-overview-title {
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.025em;
}

.history-overview-title-note {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: middle;
}

.history-overview-sub {
  max-width: 720px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.history-status-tag {
  gap: 6px;
}

.history-status-tag .status-dot {
  width: 6px;
  height: 6px;
}

.history-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.history-metric {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .68);
}

.history-metric-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.history-metric-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 4px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.history-metric-value > span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.history-metric-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-overview-side {
  display: flex;
  flex-direction: column;
  min-height: 188px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .76);
  backdrop-filter: blur(10px);
}

.history-overview-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}

.history-mini-chart {
  min-height: 158px;
  margin-top: 4px;
}

.history-overview-side-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.history-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.history-dot.is-brand { background: var(--brand-600); }

.history-overview-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.history-overview-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.history-overview-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-700);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.history-overview-step p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.history-warning-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.history-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.history-sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  max-height: calc(100vh - var(--topbar-h) - 32px);
  padding: 18px;
  overflow: auto;
  scrollbar-width: thin;
}

.history-sidebar-head {
  align-items: flex-start;
  gap: 10px;
}

.history-sidebar-sub {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.4;
}

.history-add {
  flex: none;
  padding-inline: 10px;
}

.history-add-text {
  display: none;
}

.history-timeline {
  margin-top: 14px;
}

.history-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-cohort-item {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-hover) ease, border-color var(--dur-hover) ease, box-shadow var(--dur-hover) ease, transform 120ms var(--ease-out);
  animation: history-rise 360ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 32ms);
}

@media (hover: hover) and (pointer: fine) {
  .history-cohort-item:hover {
    border-color: var(--line);
    background: var(--surface-2);
  }
}

.history-cohort-item:active {
  transform: scale(.988);
}

.history-cohort-item.is-selected {
  border-color: var(--brand-200);
  background: var(--brand-50);
  box-shadow: 0 1px 2px rgba(22, 163, 74, .08);
}

.history-cohort-year {
  display: flex;
  align-items: baseline;
  gap: 1px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.history-cohort-year strong {
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -.03em;
}

.history-cohort-year em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.history-cohort-item.is-selected .history-cohort-year strong {
  color: var(--brand-700);
}

.history-cohort-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.history-cohort-name {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.history-cohort-check {
  display: inline-flex;
  color: var(--brand-600);
}

.history-cohort-check .icon {
  width: 13px;
  height: 13px;
}

.history-cohort-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-cohort-state {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.history-cohort-state.is-ready {
  background: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

.history-side-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 12px;
  text-align: center;
}

.history-side-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-600);
}

.history-side-empty strong { font-size: 13px; }

.history-side-empty p {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.history-side-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.history-side-note {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-2);
}

.history-side-note-icon {
  display: inline-flex;
  flex: none;
  color: var(--brand-600);
}

.history-side-note p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.history-empty {
  padding: 34px 20px;
}

.history-cohort-card {
  padding: 22px;
}

.history-cohort-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.history-cohort-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-700);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .03em;
}

.history-cohort-kicker .icon { width: 15px; height: 15px; }

.history-cohort-title-row {
  margin-top: 7px;
  flex-wrap: wrap;
}

.history-cohort-title {
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.history-cohort-head .hint { margin-top: 6px; }

.history-cohort-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.history-upload-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 28px;
  border: 1px solid var(--brand-100);
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(240, 253, 244, .95) 0%, rgba(255, 255, 255, 0) 55%),
    var(--surface);
}

.history-upload-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: var(--brand-100);
  color: var(--brand-700);
}

.history-upload-visual .icon { width: 26px; height: 26px; }

.history-upload-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-700);
  font-size: 11.5px;
  font-weight: 650;
}

.history-upload-copy h3 {
  margin-top: 7px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 680;
  line-height: 1.3;
  letter-spacing: -.015em;
}

.history-upload-copy > p {
  max-width: 760px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.history-format-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}

.history-format-chips span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--brand-100);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--brand-800);
  font-size: 11px;
  font-weight: 550;
}

.history-format-chips span.is-optional {
  border-style: dashed;
  color: var(--muted);
}

.history-upload-actions {
  gap: 8px;
  margin-top: 16px;
}

.history-upload-card .hint { margin-top: 12px; }

.history-level-card,
.history-subject-card,
.history-batches-card,
.history-model-card {
  padding: 20px;
}

.history-card-head {
  align-items: flex-start;
  gap: 12px;
}

.history-card-head .card-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.history-level-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 18px;
  margin-top: 16px;
}

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

.history-stat {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
}

.history-stat-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.history-stat-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 3px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 680;
  line-height: 1.12;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.history-stat-value span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.history-stat-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.history-level-chart {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.history-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.history-chart {
  min-height: 220px;
  margin-top: 2px;
}

.history-level-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.history-level-foot-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.history-level-foot-item span {
  color: var(--muted);
  font-size: 11px;
}

.history-level-foot-item strong {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.history-subject-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.history-subject-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  transition: border-color var(--dur-hover) ease, background-color var(--dur-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
  .history-subject-item:hover {
    border-color: var(--brand-200);
    background: var(--brand-50);
  }
}

.history-subject-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-subject-item-head strong {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
}

.history-subject-item-head .hint {
  font-size: 10.5px;
}

.history-subject-mean {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-top: 5px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.history-subject-mean span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.history-subject-bar {
  height: 3px;
  margin-top: 7px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}

.history-subject-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-600));
}

.history-subject-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.history-subject-shape {
  display: inline-flex;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 9.5px;
  font-weight: 600;
}

.history-batch-file {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.history-batch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}

.history-batch-icon .icon { width: 16px; height: 16px; }

.history-batch-file > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.history-batch-file strong {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}

.history-danger-ghost {
  color: var(--danger);
}

.history-danger-ghost:hover {
  background: var(--danger-50);
  color: var(--danger-600);
}

.history-model-card {
  border: 1px solid var(--brand-100);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(240, 253, 244, .8) 0%, rgba(255, 255, 255, 0) 50%),
    var(--surface);
}

.history-model-grid {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
}

.history-model-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-model-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.history-model-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.history-model-stat span {
  color: var(--muted);
  font-size: 10px;
}

.history-model-stat strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
}

.history-model-stat strong em {
  margin-left: 2px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
}

.history-model-note {
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--surface-2);
}

.history-model-note-title {
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 650;
}

.history-model-note p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.history-model-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.history-model-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  width: 100%;
  max-width: 100%;
  margin: 9px 0 2px;
  padding: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.history-model-tabs::-webkit-scrollbar { display: none; }

.history-model-tabs .seg-btn {
  height: 30px;
  padding: 0 10px;
  font-size: 11.5px;
  border-radius: 9px;
}

.history-model-chart {
  min-height: 260px;
}

.history-model-chart-hint {
  margin-top: 2px;
  font-size: 10.5px;
}

.history-model-empty {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed var(--brand-200);
  border-radius: 16px;
  background: var(--brand-50);
}

.history-model-empty-icon {
  display: inline-flex;
  flex: none;
  color: var(--brand-600);
}

.history-model-empty strong {
  color: var(--ink-2);
  font-size: 13px;
}

.history-model-empty p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.history-detail-head-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-skeleton-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

/* 上传弹窗 */

.modal-panel:has(.history-upload-modal) {
  width: min(800px, calc(100vw - 48px));
}

.history-upload-modal {
  width: 100%;
}

.history-form-modal {
  width: min(440px, 100%);
}

.history-preview-table-wrap .table {
  min-width: 0;
}

.history-preview-table-wrap .table th,
.history-preview-table-wrap .table td {
  padding: 7px 6px;
  font-size: 11px;
}

@media (max-width: 640px) {
  .modal-panel:has(.history-upload-modal) {
    width: 100%;
  }
}

.history-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 32px 18px;
  border: 1.5px dashed var(--brand-200);
  border-radius: 22px;
  background: var(--brand-50);
  color: var(--ink-2);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-hover) ease, background-color var(--dur-hover) ease, transform 160ms var(--ease-out);
}

.history-dropzone:hover,
.history-dropzone.is-dragover {
  border-color: var(--brand-500);
  background: var(--brand-100);
}

.history-dropzone:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.history-dropzone:active { transform: scale(.995); }

.history-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 2px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--brand-700);
  box-shadow: var(--shadow-1);
}

.history-dropzone-icon .icon { width: 22px; height: 22px; }

.history-dropzone strong {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.history-dropzone > span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.history-file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
}

.history-file-chip-icon {
  display: inline-flex;
  color: var(--brand-600);
}

.history-file-chip > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.history-file-chip .btn-icon {
  width: 24px;
  height: 24px;
}

.history-upload-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.history-upload-tips span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
}

.history-progress {
  padding: 8px 2px;
}

.history-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 550;
}

.history-progress-label strong {
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
}

.history-preview {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.history-preview-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.history-preview-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
}

.history-preview-state.is-valid {
  background: var(--brand-50);
  color: var(--brand-700);
}

.history-preview-state.is-invalid {
  background: var(--danger-50);
  color: var(--danger);
}

.history-preview-head strong {
  color: var(--ink);
  font-size: 13.5px;
}

.history-preview-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.history-preview-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: .02em;
}

.history-map-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.history-map-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.2;
}

.history-map-chip em {
  color: var(--muted);
  font-style: normal;
  font-size: 9.5px;
}

.history-map-arrow { color: var(--disabled); }

.history-map-chip strong {
  color: var(--brand-700);
  font-weight: 650;
}

.history-preview-ignored {
  font-size: 10.5px;
}

.history-preview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.history-preview-stat {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.history-preview-stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.history-preview-stat strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.history-error-list {
  padding: 10px 12px;
  border: 1px solid var(--danger-100);
  border-radius: 14px;
  background: var(--danger-50);
}

.history-error-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
  border-top: 1px solid rgba(220, 38, 38, .1);
}

.history-error-row:first-of-type { border-top: 0; }

.history-error-row span {
  color: var(--danger-600);
  font-size: 10.5px;
  font-weight: 600;
}

.history-error-row p {
  color: var(--danger-600);
  font-size: 11px;
  line-height: 1.4;
}

.history-preview-table-wrap .table-wrap {
  max-height: 260px;
  margin-top: 6px;
}

.history-year-preview {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 600;
}

.history-year-preview span {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

@keyframes history-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  .history-overview-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 20px;
  }
  .history-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .history-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .history-subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .history-level-grid,
  .history-model-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-model-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr);
    align-items: start;
  }
  .history-model-note { margin-top: 0; }
}

@media (max-width: 1024px) {
  .history-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .history-timeline-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 1fr);
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }
  .history-cohort-item {
    scroll-snap-align: start;
  }
  .history-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-overview-side {
    min-height: 170px;
  }
  .history-mini-chart { min-height: 150px; }
}

@media (max-width: 760px) {
  .history-overview {
    padding: 18px;
  }
  .history-overview-title {
    font-size: 23px;
  }
  .history-overview-side {
    padding: 13px;
  }
  .history-upload-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
  }
  .history-upload-visual {
    width: 52px;
    height: 52px;
    border-radius: 17px;
  }
  .history-stat-grid,
  .history-preview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .history-cohort-card,
  .history-level-card,
  .history-subject-card,
  .history-batches-card,
  .history-model-card {
    padding: 16px;
  }
  .history-cohort-actions {
    width: 100%;
  }
  .history-cohort-actions .btn {
    flex: 1;
  }
  .history-upload-actions .btn {
    flex: 1;
  }
  .history-model-side {
    display: flex;
  }
  .history-model-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .beta-pill-head {
    display: none;
  }
  .history-add-text {
    display: none;
  }
  .history-sidebar-head .history-add {
    display: none;
  }
  .history-warning-row .tag,
  .history-model-warnings .tag {
    white-space: normal;
    height: auto;
    padding: 4px 8px;
    line-height: 1.35;
    text-align: left;
  }
}

@media (max-width: 540px) {
  .history-metrics,
  .history-subject-grid,
  .history-model-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .history-metric-value {
    font-size: 21px;
  }
  .history-overview-title-note {
    display: none;
  }
  .history-dropzone {
    padding: 24px 12px;
  }
  .history-preview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .history-cohort-title {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-cohort-item {
    animation: none;
  }
  .history-cohort-item,
  .history-dropzone,
  .history-subject-item {
    transition: none;
  }
}

/* 预测模型 · 点展开动画与双视图 */
.prediction-dot-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 100%;
  min-height: 210px;
  cursor: pointer;
  user-select: none;
}

.prediction-dot-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 230px;
}

.history-overview-grid {
  grid-template-columns: 220px minmax(0, 1fr) minmax(300px, 360px);
  gap: 20px;
}

.history-view-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 2px 16px;
}

.history-view-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
}

.history-view-title {
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 720;
  letter-spacing: -.035em;
}

.history-view-intro .hint {
  margin: 0;
}

.prediction-footer {
  padding: 22px 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .14em;
  text-align: center;
}

.history-model-overview {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (max-width: 1180px) {
  .history-overview-grid {
    grid-template-columns: 170px minmax(0, 1fr) minmax(270px, 320px);
    gap: 16px;
  }
  .prediction-dot-stage { min-height: 170px; }
}

@media (max-width: 980px) {
  .history-overview-grid {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .history-overview-side {
    grid-column: 2;
  }
  .prediction-dot-stage { min-height: 150px; }
}

@media (max-width: 760px) {
  .history-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .prediction-dot-stage {
    min-height: 150px;
    max-width: 180px;
    margin: 0 auto;
  }
  .history-overview-side { grid-column: auto; }
}

/* 预测模型 · 算法选择 */
.history-algorithm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.history-algorithm-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 120ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .history-algorithm-option:hover {
    border-color: var(--brand-200);
    background: var(--brand-50);
  }
}

.history-algorithm-option.is-active,
.history-algorithm-option:has(input:checked) {
  border-color: var(--brand-500);
  background: var(--brand-50);
  box-shadow: inset 0 0 0 1px var(--brand-500);
}

.history-algorithm-option.is-disabled {
  opacity: .58;
  cursor: not-allowed;
}

.history-algorithm-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.history-algorithm-radio {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.history-algorithm-option.is-active .history-algorithm-radio,
.history-algorithm-option:has(input:checked) .history-algorithm-radio {
  border-color: var(--brand-600);
  box-shadow: inset 0 0 0 4px var(--brand-600);
}

.history-algorithm-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.history-algorithm-copy strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.history-algorithm-copy strong .beta-pill,
.history-algorithm-option .beta-pill {
  color: #fff !important;
}

.history-algorithm-copy span {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.history-algorithm-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

@media (max-width: 760px) {
  .history-algorithm-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }
}

/* 预测模型 · 超管学校选择 */
.prediction-school-select {
  width: 220px;
  min-width: 180px;
}

@media (max-width: 760px) {
  .prediction-school-select {
    width: 100%;
  }
}

/* 成绩上传：先选单校 / 联考模式 */
.upload-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.upload-mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 210px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 140ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .upload-mode-card:hover {
    border-color: var(--brand-500);
    background: var(--brand-50);
    transform: translateY(-2px);
  }
}

.upload-mode-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--brand-50);
  color: var(--brand-700);
}

.upload-mode-card strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
}

@media (max-width: 640px) {
  .upload-mode-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .upload-mode-card {
    min-height: 150px;
  }
}

/* 多校上传：未选参考学校前禁用文件区 */
.dropzone.is-disabled {
  opacity: .5;
  filter: grayscale(.35);
  cursor: not-allowed;
}

.dropzone.is-disabled input {
  pointer-events: none;
}

.participant-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.participant-row:last-child {
  border-bottom: 0;
}

.participant-row > label {
  min-width: 0;
  justify-content: flex-start;
}

.participant-row > label strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.participant-row > .select {
  width: 190px;
  min-width: 190px;
  justify-self: end;
}

.participant-school {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.participant-school strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.participant-row-home {
  padding-bottom: 12px;
}

.participant-school-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 240px;
}

.participant-school-side .select {
  width: 190px;
  min-width: 190px;
}

.participant-grade-auto {
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.participant-grade-auto.is-missing {
  color: var(--danger);
}

.add-school-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  margin-top: 12px;
  overflow-y: auto;
}

.add-school-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .add-school-row:hover {
    background: var(--brand-50);
  }
}

.add-school-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
}

@media (max-width: 640px) {
  .participant-row {
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 10px;
  }
  .participant-row > .select,
  .participant-school-side .select {
    width: 110px;
    min-width: 110px;
  }
  .participant-school-side {
    min-width: 150px;
    gap: 4px;
  }
}

/* 预测模型 · 最终布局覆盖：标题靠最左，动画在左，四个指标竖排 */
.history-overview-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  grid-template-columns: none !important;
}

.history-overview-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
  text-align: left;
}

.history-overview-head .history-overview-title {
  margin: 8px 0 0;
}

.history-overview-body {
  display: grid;
  grid-template-columns: 220px minmax(260px, 340px) minmax(300px, 1fr);
  gap: 20px;
  align-items: stretch;
  min-width: 0;
}

.history-overview-body .prediction-dot-stage {
  align-self: center;
  min-height: 220px;
}

.history-metrics-vertical {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: center;
  gap: 10px !important;
  margin-top: 0 !important;
  min-width: 0;
}

.history-metrics-vertical .history-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 10px 14px;
}

.history-metrics-vertical .history-metric-label {
  min-width: 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.history-metrics-vertical .history-metric-value {
  color: var(--ink);
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -.025em;
  white-space: nowrap;
}

.history-metrics-vertical .history-metric-value span {
  margin-left: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.history-overview-body .history-overview-side {
  min-height: 220px;
}

@media (max-width: 1180px) {
  .history-overview-body {
    grid-template-columns: 170px minmax(240px, 300px) minmax(280px, 1fr);
    gap: 16px;
  }
}

@media (max-width: 980px) {
  .history-overview-body {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .history-overview-body .history-overview-side {
    grid-column: 1 / -1;
    min-height: 190px;
  }
}

@media (max-width: 760px) {
  .history-overview-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-overview-body .prediction-dot-stage {
    min-height: 150px;
    max-width: 180px;
    margin: 0 auto;
  }
  .history-overview-body .history-overview-side {
    grid-column: auto;
  }
}


/* ==========================================================================
 * v3.18 视觉审美升级 · Mobile-Native 多端适配 · v1-ultra & 重名消歧组件体系
 * ======================================================================= */

/* 1. 半透明微描边阴影与按钮精致层次（Emil Kowalski Craft） */
.card {
  border: 1px solid rgba(16, 24, 40, .065);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035), 0 4px 14px -4px rgba(16, 24, 40, .045);
}

.stat {
  border: 1px solid rgba(16, 24, 40, .06);
  background: linear-gradient(180deg, #ffffff 0%, #fafcfb 100%);
}

.btn,
.btn-icon,
.nav-item,
.topbar-nav-item,
.mobile-section-item,
.seg-btn,
.page-btn,
.select-trigger,
.history-cohort-item {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22),
              0 1px 2px rgba(22, 163, 74, .22),
              0 4px 12px -2px rgba(22, 163, 74, .18);
}

.btn-secondary {
  border-color: rgba(16, 24, 40, .10);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.btn:active:not(:disabled),
.btn-icon:active:not(:disabled) {
  transform: scale(0.97);
}

/* 2. 100dvh 视口高度修正与安全区适配 */
select.select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding-right: 36px;
}

select.select::-ms-expand {
  display: none;
}

.alert > strong {
  flex: none;
}

.app,
.auth {
  min-height: 100vh;
  min-height: 100dvh;
}

.app-sidebar {
  height: 100vh;
  height: 100dvh;
}

/* 3. 平板与手机端二级子导航条（解决 <=1024px 顶栏分区被隐藏无法切换的问题） */
.mobile-section-nav {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-section-nav {
    display: block;
    position: sticky;
    top: var(--topbar-h, 64px);
    z-index: calc(var(--z-topbar, 50) - 1);
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(16, 24, 40, .06);
    padding: 8px 16px;
  }

  .mobile-section-track {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-section-track::-webkit-scrollbar {
    display: none;
  }

  .mobile-section-item {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-2);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 560;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  }

  .mobile-section-item.is-active {
    background: var(--brand-50);
    border-color: var(--brand-200);
    color: var(--brand-700);
    font-weight: 660;
  }
}

/* 4. 手机端（<=640px）防自动缩放、底部抽屉圆角修复与紧凑排版 */
@media (max-width: 640px) {
  .input,
  .select,
  .textarea,
  .select-search input {
    font-size: 16px !important;
    min-height: 44px;
  }

  .page {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .page-head {
    flex-wrap: wrap;
    gap: 10px;
  }

  .page-head-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-mask.is-sheet .modal-panel,
  .modal-mask.is-sheet .modal-card {
    border-radius: 24px 24px 0 0 !important;
  }

  .modal-foot {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-section-nav {
    padding: 7px 12px;
  }
}

/* 5. Auria 四档谷歌系高级渐变等级胶囊（BASE 蓝 / PRO 绿 / ULTRA 琥珀金 / MAX 绯红） */
.model-pill,
.ultra-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px !important;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex: none;
  color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .14);
  border: 1px solid rgba(255, 255, 255, .24);
}

.model-pill.is-base {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 42%, #1d4ed8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 2px 7px rgba(29, 78, 216, .30);
}

.model-pill.is-pro {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 42%, #15803d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 2px 7px rgba(21, 128, 61, .30);
}

.model-pill.is-ultra,
.ultra-pill {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 46%, #d96500 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .44), 0 2px 7px rgba(217, 101, 0, .32);
}

.model-pill.is-max {
  background: linear-gradient(135deg, #fb7185 0%, #ef4444 46%, #b91c1c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .36), 0 2px 8px rgba(185, 28, 28, .34);
}

.model-pill.is-oxygen {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 45%, #0284c7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), 0 2px 8px rgba(2, 132, 199, .32);
}

.history-algorithm-grid.is-four {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 20px 20px;
}

.history-algorithm-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.history-algorithm-option.tone-base.is-active,
.history-algorithm-option.tone-base:has(input:checked) {
  border-color: #1a73e8;
  background: linear-gradient(180deg, #f4f8ff 0%, #e8f0fe 100%);
  box-shadow: inset 0 0 0 1px #1a73e8;
}
.history-algorithm-option.tone-base.is-active .history-algorithm-radio,
.history-algorithm-option.tone-base:has(input:checked) .history-algorithm-radio {
  border-color: #1a73e8;
  box-shadow: inset 0 0 0 4px #1a73e8;
}

.history-algorithm-option.tone-pro.is-active,
.history-algorithm-option.tone-pro:has(input:checked) {
  border-color: #1e8e3e;
  background: linear-gradient(180deg, #f0faf3 0%, #e6f4ea 100%);
  box-shadow: inset 0 0 0 1px #1e8e3e;
}
.history-algorithm-option.tone-pro.is-active .history-algorithm-radio,
.history-algorithm-option.tone-pro:has(input:checked) .history-algorithm-radio {
  border-color: #1e8e3e;
  box-shadow: inset 0 0 0 4px #1e8e3e;
}

.history-algorithm-option.tone-ultra.is-active,
.history-algorithm-option.tone-ultra:has(input:checked) {
  border-color: #e37400;
  background: linear-gradient(180deg, #fffdf4 0%, #fef7e0 100%);
  box-shadow: inset 0 0 0 1px #e37400;
}
.history-algorithm-option.tone-ultra.is-active .history-algorithm-radio,
.history-algorithm-option.tone-ultra:has(input:checked) .history-algorithm-radio {
  border-color: #e37400;
  box-shadow: inset 0 0 0 4px #e37400;
}

.history-algorithm-option.tone-max.is-active,
.history-algorithm-option.tone-max:has(input:checked) {
  border-color: #d93025;
  background: linear-gradient(180deg, #fff6f5 0%, #fce8e6 100%);
  box-shadow: inset 0 0 0 1px #d93025;
}
.history-algorithm-option.tone-max.is-active .history-algorithm-radio,
.history-algorithm-option.tone-max:has(input:checked) .history-algorithm-radio {
  border-color: #d93025;
  box-shadow: inset 0 0 0 4px #d93025;
}

.admin-curve-card .chart {
  height: 360px;
}

.admin-curve-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 12px;
}

.admin-curve-sub-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}

.admin-curve-sub-btn:hover {
  border-color: #1a73e8;
  color: #1a73e8;
}

.admin-curve-sub-btn.is-active {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #ffffff;
  font-weight: 600;
}

.admin-schools-table tbody tr {
  cursor: pointer;
}

.admin-schools-table tbody tr.is-current {
  background: #f4f8ff;
}

.model-dot-strip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.model-mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}

.model-mini-chip.is-ready.tone-base { background: #e8f0fe; color: #1967d2; border-color: #aecbfa; }
.model-mini-chip.is-ready.tone-pro { background: #e6f4ea; color: #137333; border-color: #a8dab5; }
.model-mini-chip.is-ready.tone-ultra { background: #fef7e0; color: #b06000; border-color: #fdd663; }
.model-mini-chip.is-ready.tone-max { background: #fce8e6; color: #c5221f; border-color: #f6aea9; }
.model-mini-chip.is-off { background: var(--surface-2); color: var(--muted); border-color: var(--line); opacity: .72; }

@media (max-width: 900px) {
  .history-algorithm-grid.is-four {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 16px 18px;
  }
  .admin-curve-card .chart {
    height: 300px;
  }
}

/* 7. 超管端 AI 接口配置预设网格与海南历年高考试卷覆盖矩阵 */
.ai-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}

.ai-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
}

.ai-preset-btn:hover {
  border-color: #4285f4;
  background: #f4f8ff;
}

.ai-preset-btn.is-active {
  border-color: #1a73e8;
  background: #e8f0fe;
  box-shadow: inset 0 0 0 1px #1a73e8;
}

.ai-preset-btn strong {
  font-size: 13px;
  color: var(--ink);
}

.ai-preset-btn span {
  font-size: 11.5px;
  color: var(--muted);
}

.gk-matrix-table th,
.gk-matrix-table td {
  text-align: center;
  padding: 6px;
}

.gk-matrix-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-width: 68px;
  min-height: 44px;
  padding: 5px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 12px;
  transition: all .15s ease;
}

.gk-matrix-cell.is-filled {
  background: #e6f4ea;
  border-color: #a8dab5;
  color: #137333;
}

.gk-matrix-cell.is-filled strong {
  font-size: 13.5px;
  font-weight: 700;
}

.gk-matrix-cell.is-filled span {
  font-size: 10.5px;
  color: #188038;
}

.gk-matrix-cell.is-empty {
  color: var(--muted);
  border-style: dashed;
}

.gk-matrix-cell:hover {
  border-color: #1a73e8;
  transform: translateY(-1px);
}

/* 6. Auria-Halcyon 同届准入核验面板与样本覆盖条 */
.halcyon-gate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 20px 20px;
}

.halcyon-gate-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-3);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.halcyon-gate-item.is-done {
  border-color: rgba(22, 163, 74, .28);
  background: linear-gradient(180deg, #f7fcf9 0%, #f0fdf4 100%);
}

.halcyon-gate-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e4e7ec;
  color: #475467;
  font-weight: 700;
  flex: none;
  margin-top: 1px;
}

.halcyon-gate-item.is-done .halcyon-gate-check {
  background: var(--brand-600);
  color: #ffffff;
}

.halcyon-gate-item strong {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
}

.halcyon-gate-item span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.history-coverage-body {
  padding: 14px 20px 20px;
}

.history-coverage-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.history-coverage-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 6px;
  border-radius: var(--r-2);
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-align: center;
}

.history-coverage-pill span {
  color: var(--muted);
  font-size: 12px;
}

.history-coverage-pill strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 960px) {
  .halcyon-gate-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 16px 18px;
  }
  .history-coverage-body {
    padding: 12px 16px 18px;
  }
  .history-coverage-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 7. 同名考生徽章与交互式重名消歧面板 */
.homonym-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(217, 119, 6, .28);
  background: var(--amber-50);
  color: var(--amber-700);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.homonym-resolve-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-3);
  border: 1px solid rgba(217, 119, 6, .34);
  background: #fffdf7;
}

.homonym-resolve-box.is-notice {
  border-color: rgba(37, 99, 235, .24);
  background: #f8fbff;
}

.homonym-resolve-head,
.homonym-resolve-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
}

.homonym-resolve-title {
  justify-content: flex-start;
  align-items: center;
}

.homonym-resolve-head p {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 450;
}

.homonym-resolve-list,
.homonym-conflict-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.homonym-resolve-row,
.homonym-conflict-item {
  padding: 10px 12px;
  border-radius: var(--r-2);
  border: 1px solid rgba(16, 24, 40, .08);
  background: #ffffff;
}

.homonym-resolve-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.homonym-resolve-meta,
.homonym-conflict-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.homonym-select {
  min-width: 240px;
  max-width: 100%;
}

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

.homonym-cand-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.homonym-cand-option.is-selected {
  border-color: var(--brand-500);
  background: var(--brand-50);
}

.homonym-cand-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

/* 8. 上传开关栏、双向届级提示与辅助布局类 */
.upload-option-bar {
  padding: 12px 14px;
  border-radius: var(--r-3);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.switch-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand-600);
  flex: none;
}

.switch-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.switch-copy strong {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
}

.switch-copy span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.cohort-dual-tip {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--r-2);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.5;
}

.history-year-preview em {
  margin-left: 6px;
  color: var(--brand-700);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
}

.past-source-seg {
  width: 100%;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-xs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-3 {
  gap: 12px;
}

/* ==========================================================================
 * v3.21 视觉精修：同心圆角体系 · 丝滑圆润开关 · 统一自定义下拉框 · 美化上传区 · 数理化公式
 * 同心圆角铁律：内圆半径 R_inner = 外圆半径 R_outer - 内外圆间距 d
 * ======================================================================= */
:root {
  --r-outer-card: 28px;
  --pad-card: 16px;
  --r-inner-card: calc(var(--r-outer-card) - 12px); /* 16px 同心内圆 */
}

/* 1. 全系统外/内同心圆角统一 */
.card {
  border-radius: var(--r-outer-card);
  padding: 20px;
}

.panel {
  border-radius: 30px;
}

/* 顶层独立 stat 卡片与下方 card 保持一致圆润度 */
.stat {
  border-radius: 22px;
}

/* 卡片内部嵌套的表格、统计卡、指标块、模型项、提示框均严格遵循同心内圆 */
.card .table-wrap,
.card .stat,
.card .history-metric,
.card .history-stat,
.card .history-level-chart,
.card .history-algorithm-option,
.card .history-cohort-item,
.card .alert,
.card .exam-metric-group {
  border-radius: 16px;
}

.card.is-flush > .table-wrap,
.card-flush > .table-wrap {
  border-radius: 0;
}

.btn {
  border-radius: 14px;
}

.btn-sm {
  border-radius: 11px;
}

.btn-lg {
  border-radius: 16px;
}

.btn-icon {
  border-radius: 12px;
}

.tag,
.badge {
  border-radius: 999px;
}

.input,
.select,
.textarea,
.select-trigger {
  border-radius: 14px;
}

.modal,
.modal-card,
.modal-panel {
  border-radius: 28px;
}

/* 2. 彻底圆润的胶囊开关（外径 28px -> 半径 14px，内边距 3px -> 圆钮半径 11px，100% 同心圆） */
.switch-track {
  width: 48px;
  height: 28px;
  border-radius: 999px !important;
  background: #cbd5d0;
  transition: background-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

.switch-track::before {
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50% !important;
  box-shadow: 0 2px 5px rgba(16, 24, 40, .20), 0 0 1px rgba(16, 24, 40, .08);
  transition: transform 240ms cubic-bezier(.34, 1.56, .64, 1);
}

.switch input[type="checkbox"]:checked + .switch-track {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.switch input[type="checkbox"]:checked + .switch-track::before {
  transform: translateX(20px);
}

.switch input[type="checkbox"]:checked:active + .switch-track::before {
  transform: translateX(20px) scale(0.95);
}

/* 3. 统一自定义下拉选择框（消除原生双箭头与文字上飘，全站同款丝滑体验） */
select.select,
select.form-select {
  height: 42px;
  padding: 0 36px 0 14px;
  line-height: 40px;
}

.hngk-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  vertical-align: middle;
}

.toolbar .hngk-select-wrap,
.cluster .hngk-select-wrap,
.page-head-actions .hngk-select-wrap,
.review-control-group .hngk-select-wrap,
.exam-scope-class .hngk-select-wrap,
.exam-scope-filter-row .hngk-select-wrap,
.field-inline .hngk-select-wrap {
  width: auto;
  min-width: 136px;
}

.hngk-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.hngk-select-trigger {
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.hngk-select-wrap.is-sm .hngk-select-trigger {
  height: 34px;
  min-height: 34px;
  padding: 0 32px 0 12px;
  border-radius: 11px;
  font-size: 13px;
}

.hngk-select-wrap.is-open .hngk-select-trigger {
  border-color: var(--brand-600);
  box-shadow: var(--focus-ring);
}

.hngk-select-wrap.is-open .select-caret {
  transform: translateY(-50%) rotate(180deg);
}

.hngk-select-wrap.is-disabled .hngk-select-trigger {
  background: var(--surface-2);
  color: var(--disabled);
  cursor: not-allowed;
}

.hngk-select-wrap.is-error .hngk-select-trigger {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.hngk-select-pop {
  position: fixed !important;
  z-index: 1600 !important;
  border-radius: 18px !important;
  border: 1px solid rgba(16, 24, 40, .09);
  background: rgba(255, 255, 255, .98);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 38px -8px rgba(16, 24, 40, .18), 0 2px 8px rgba(16, 24, 40, .06);
  overflow: hidden;
  transform-origin: top center;
  animation: pop-in 160ms var(--ease-out);
}

.hngk-select-pop.is-up {
  transform-origin: bottom center;
}

.hngk-select-pop .select-list {
  padding: 6px;
  max-height: 268px;
}

.hngk-select-pop .select-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 12px !important; /* 同心内圆：18px - 6px = 12px */
  font-size: 13.5px;
}

.hngk-select-pop .select-option .opt-check {
  color: var(--brand-600);
  font-weight: 700;
  font-size: 13px;
  flex: none;
}

/* 4. 美化文件上传拖拽区组件（彻底替代原生粗糙 file 控件） */
.hngk-file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 26px 20px;
  border: 2px dashed #b9dec6;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fdf9 0%, #f0faf4 100%);
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .16s ease, box-shadow .18s ease;
}

.hngk-file-drop:hover,
.hngk-file-drop.is-dragover {
  border-color: var(--brand-600);
  background: linear-gradient(180deg, #ecfdf3 0%, #dcfce7 100%);
  box-shadow: 0 6px 20px -6px rgba(22, 163, 74, .22);
}

.hngk-file-drop.has-file {
  border-style: solid;
  border-color: var(--brand-500);
  background: linear-gradient(180deg, #f3fcf6 0%, #e8f8ee 100%);
}

.hngk-file-drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  color: var(--brand-600);
  box-shadow: 0 3px 10px rgba(22, 163, 74, .14);
}

.hngk-file-drop-title {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
}

.hngk-file-drop-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.hngk-file-drop-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}

.hngk-file-drop-badges span {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid #ccebd7;
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
}

.hngk-file-drop-picked {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--brand-200);
  color: var(--brand-800);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .06);
}

/* 5. 数理化公式排版引擎样式（Math / Physics / Chemistry） */
.hngk-math {
  display: inline;
  font-family: "Cambria Math", "STIX Two Math", "Latin Modern Math", "Times New Roman", Georgia, serif;
  font-size: 1.06em;
  line-height: 1.35;
  color: inherit;
  white-space: nowrap;
}

.hngk-math-block {
  display: block;
  margin: 10px 0;
  text-align: center;
  font-family: "Cambria Math", "STIX Two Math", "Latin Modern Math", "Times New Roman", Georgia, serif;
  font-size: 1.18em;
  line-height: 1.5;
  overflow-x: auto;
}

.hngk-math .m-var { font-style: italic; font-weight: 400; padding-right: 0.04em; }
.hngk-math .m-rm { font-style: normal; font-family: var(--font-sans); font-size: 0.94em; }
.hngk-math .m-bf { font-weight: 700; font-style: normal; }
.hngk-math .m-fn { font-style: normal; margin: 0 0.14em 0 0.06em; }
.hngk-math .m-op { margin: 0 0.16em; }
.hngk-math .m-rel { margin: 0 0.22em; }
.hngk-math .m-punct { margin-right: 0.18em; }
.hngk-math .m-deg { font-style: normal; }
.hngk-math .m-sup { font-size: 0.72em; vertical-align: 0.44em; line-height: 0; }
.hngk-math .m-sub { font-size: 0.72em; vertical-align: -0.24em; line-height: 0; }

.hngk-math .m-subsup {
  display: inline-flex;
  flex-direction: column;
  vertical-align: -0.22em;
  font-size: 0.68em;
  line-height: 1.05;
  margin-left: 0.04em;
  text-align: left;
}

.hngk-math .m-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: -0.45em;
  margin: 0 0.14em;
  font-size: 0.86em;
  line-height: 1.15;
}

.hngk-math .m-frac > .m-num {
  padding: 0 0.24em 0.1em;
  border-bottom: 1.15px solid currentColor;
  text-align: center;
}

.hngk-math .m-frac > .m-den {
  padding: 0.1em 0.24em 0;
  text-align: center;
}

.hngk-math .m-sqrt {
  display: inline-flex;
  align-items: baseline;
  margin: 0 0.08em;
}

.hngk-math .m-root-idx {
  font-size: 0.62em;
  margin-right: -0.22em;
  vertical-align: 0.55em;
}

.hngk-math .m-rad {
  font-size: 1.06em;
  line-height: 1;
}

.hngk-math .m-radicand {
  border-top: 1.15px solid currentColor;
  padding: 0.05em 0.16em 0 0.1em;
  line-height: 1.15;
}

.hngk-math .m-overline {
  border-top: 1.1px solid currentColor;
  padding-top: 0.04em;
}

.hngk-math .m-over {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.hngk-math .m-over > .m-accent {
  font-size: 0.68em;
  line-height: 0.7;
  margin-bottom: -0.05em;
}

.hngk-math .m-bigop-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 0 0.14em;
  line-height: 1;
}

.hngk-math .m-bigop { font-size: 1.3em; }
.hngk-math .m-bigop-sup,
.hngk-math .m-bigop-sub { font-size: 0.66em; }

.hngk-math .m-xarrow {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 0 0.28em;
  line-height: 1;
}

.hngk-math .m-xarrow-top,
.hngk-math .m-xarrow-bot {
  font-size: 0.66em;
  font-family: var(--font-sans);
}

.hngk-math .m-xarrow-sym {
  font-size: 1.08em;
  line-height: 0.85;
}

.hngk-math .m-cases,
.hngk-math .m-matrix {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 0.16em;
  margin: 0 0.12em;
}

.hngk-math .m-cases-brace,
.hngk-math .m-mat-delim {
  font-size: 2.1em;
  font-weight: 300;
  line-height: 0.9;
}

.hngk-math .m-mat-body {
  display: inline-flex;
  flex-direction: column;
  gap: 0.18em;
  text-align: left;
}

.hngk-math .m-mat-row {
  display: flex;
  gap: 0.65em;
}

.hngk-math .m-chem {
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}

@media (max-width: 640px) {
  :root {
    --r-outer-card: 22px;
  }
  .card {
    border-radius: 22px;
    padding: 16px;
  }
  .stat {
    border-radius: 18px;
  }
  .card .table-wrap,
  .card .stat,
  .card .history-metric,
  .card .history-stat,
  .card .history-level-chart,
  .card .history-algorithm-option,
  .card .alert {
    border-radius: 14px;
  }
}

/* ==========================================================================
 * v3.22 登录页高级美学重构 · 丝滑输入框错误滑出 · 学生端真列表与双分并列报告
 * ======================================================================= */

.hngk-native-select {
  visibility: hidden !important;
}

/* 1. 登录页：DeepSeek 风格通透顶栏 + 左中垂直居中沉浸排版 + 右上展开液态玻璃登录弹窗 */
.auth.auth-editorial {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(76px, 10vh, 98px) clamp(24px, 5.2vw, 76px) clamp(48px, 6vh, 68px);
  overflow-x: hidden;
  overflow-y: auto;
}

/* 极轻羽化暗角：保留背景摄影主体的明澈通透，仅在顶部导航与左侧文字区轻柔托字 */
.auth.auth-editorial .auth-shade {
  background:
    linear-gradient(180deg, rgba(6, 12, 10, .38) 0%, rgba(6, 12, 10, .06) 20%, rgba(6, 12, 10, .06) 66%, rgba(6, 12, 10, .66) 100%),
    linear-gradient(90deg, rgba(6, 12, 10, .48) 0%, rgba(6, 12, 10, .18) 48%, rgba(6, 12, 10, .04) 100%);
}

/* DeepSeek 风格通透顶栏 */
.auth-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: calc(14px + env(safe-area-inset-top, 0px)) clamp(20px, 4.8vw, 68px) 12px;
  pointer-events: none;
}

.auth-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  pointer-events: auto;
}

.auth-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.auth-topbar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .20), inset 0 1px 0 #ffffff;
  flex: none;
  overflow: hidden;
  transition: transform 180ms ease;
}

.auth-topbar-logo:hover {
  transform: translateY(-1px);
}

.auth-topbar-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.auth-topbar-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, .42);
  flex: none;
}

.auth-caption-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.auth.auth-editorial .auth-caption {
  position: static !important;
  margin: 0;
  color: #ffffff;
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .52), 0 1px 3px rgba(0, 0, 0, .42);
  transition: opacity 240ms ease, transform 240ms ease;
}

.auth.auth-editorial .auth-caption.is-switching {
  opacity: 0;
  transform: translateY(-3px);
}

.auth-caption-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.auth-caption-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  transition: width 280ms var(--ease-out), background-color 260ms ease;
}

.auth-caption-dot.is-active {
  width: 16px;
  background: #ffffff;
}

.auth-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* ==========================================================================
 * Liquid Glass Surface (Zero Blur + Real Optical Edge Refraction)
 * 高通透水滴玻璃：极薄微弱定向高光 + 清晰中心 + 边缘 Snell 折射（含 iPhone Canvas 折射层）
 * ======================================================================= */
.lg-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  -webkit-backdrop-filter: saturate(1.16) brightness(1.02);
  backdrop-filter: saturate(1.16) brightness(1.02);
}

.lg-webkit-layer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.lg-webkit-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity 1500ms ease;
}

.lg-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    110px circle at var(--lg-mx, 26%) var(--lg-my, 16%),
    rgba(255, 255, 255, .16) 0%,
    rgba(255, 255, 255, .03) 48%,
    transparent 74%
  );
  opacity: .18;
  transition: opacity 220ms ease;
}

.lg-surface:hover::before {
  opacity: .60;
}

.lg-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, .30),
    inset 0 -0.75px 1px rgba(255, 255, 255, .09),
    inset 0.75px 0 0.75px rgba(255, 255, 255, .13),
    inset -0.75px 0 0.75px rgba(255, 255, 255, .11);
}

.lg-surface > *:not(.lg-webkit-layer) {
  position: relative;
  z-index: 2;
}

/* 浅色页面上的液态玻璃（用于 /features、/updates、/open-model 悬浮顶栏） */
.lg-surface.is-light-glass::after {
  box-shadow:
    inset 0 1px 0.75px rgba(255, 255, 255, .72),
    inset 0 -1px 1px rgba(15, 23, 42, .05),
    inset 0.75px 0 0.75px rgba(255, 255, 255, .38),
    inset -0.75px 0 0.75px rgba(255, 255, 255, .34);
}

.auth-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .20);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms cubic-bezier(.22, 1, .36, 1), box-shadow 180ms ease;
}

.auth-nav-btn.is-ghost {
  background: linear-gradient(165deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, .06) 100%);
  border-color: rgba(255, 255, 255, .20);
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .56);
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .42);
}

.auth-nav-btn.is-ghost:hover {
  background: linear-gradient(165deg, rgba(255, 255, 255, .17) 0%, rgba(255, 255, 255, .05) 55%, rgba(255, 255, 255, .12) 100%);
  border-color: rgba(255, 255, 255, .38);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .48);
}

.auth-nav-btn.is-primary {
  background: linear-gradient(165deg, rgba(255, 255, 255, .20) 0%, rgba(255, 255, 255, .07) 55%, rgba(255, 255, 255, .14) 100%);
  border-color: rgba(255, 255, 255, .36);
  color: #ffffff;
  font-weight: 700;
  padding: 0 20px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .52);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .44);
}

.auth-nav-btn.is-primary:hover {
  background: linear-gradient(165deg, rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, .12) 55%, rgba(255, 255, 255, .22) 100%);
  border-color: rgba(255, 255, 255, .58);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px -10px rgba(0, 0, 0, .50);
}

/* 主舞台：登录框收起后，主体内容靠左垂直居中 */
.auth-stage {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 1440px;
  margin: auto;
  flex: 1 1 auto;
}

.auth-showcase-float {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 820px;
  min-width: 0;
  color: #ffffff;
}

.auth-hero-dot {
  width: 136px;
  height: 136px;
  margin-bottom: 2px;
  margin-left: -16px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 24px rgba(217, 119, 87, .46));
}

.auth-float-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: #ffffff;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-shadow: 0 6px 32px rgba(0, 0, 0, .48), 0 2px 6px rgba(0, 0, 0, .34);
}

.auth-float-series {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  letter-spacing: .01em;
  color: rgba(255, 255, 255, .94);
}

.auth-float-name {
  font-size: clamp(36px, 4.4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.auth-float-metrics {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, .94);
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 450;
  letter-spacing: .02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .55);
}

.auth-float-metrics strong {
  color: #ffffff;
  font-weight: 750;
}

.auth-float-sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, .48);
}

/* 官方左图右名品牌徽标液态玻璃丝带（零模糊 + 极弱白边高通透 + 边缘 Snell 光学折射） */
.auth-brand-ribbon {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(9px, 1.2vw, 14px);
  max-width: 100%;
  min-height: 48px;
  margin-top: 4px;
  padding: 10px clamp(14px, 1.8vw, 20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: linear-gradient(160deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .02) 52%, rgba(255, 255, 255, .06) 100%);
  box-shadow: 0 16px 38px -14px rgba(0, 0, 0, .40);
  white-space: nowrap;
  box-sizing: border-box;
  overflow: hidden;
}

.auth-brand-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  line-height: 1;
  flex: 0 1 auto;
  min-width: 0;
}

.auth-brand-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.auth-brand-lockup-img {
  display: block;
  height: 19px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.42) contrast(1.06) drop-shadow(0 1px 5px rgba(0, 0, 0, .48));
}

.auth-brand-mark {
  display: block;
  height: 19px;
  width: 19px;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .42));
}

.auth-brand-wordmark {
  font-size: 16.5px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .52);
}

.auth-brand-wordmark.is-claude-word {
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.015em;
}

.auth-brand-wordmark.is-gemini-word {
  font-family: "Inter var", "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.auth-brand-models {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  margin-left: 2px;
  height: 22px;
  color: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .52);
}

.auth-brand-models.is-stacked {
  justify-content: space-between;
  font-size: 10.5px;
  line-height: 1;
  height: 22px;
  margin-left: 0;
}

/* Gemini 合并居中的 4 + 上下 Carbon / Neon */
.auth-gemini-ver {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
  height: 22px;
}

.auth-gemini-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .52);
}

.auth-brand-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, .32);
  flex: none;
}

/* 底部左下角固定免责声明（与居中主内容区独立） */
.auth-bg-disclaimer {
  position: fixed;
  left: clamp(20px, 4.8vw, 68px);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .04em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .58);
}

/* 居中展开的登录 / 申请试用弹窗遮罩（纯 GPU opacity 过渡零卡顿，点击遮罩不关闭） */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(10, 18, 14, .54);
  opacity: 0;
  transition: opacity 240ms cubic-bezier(.22, 1, .36, 1);
  will-change: opacity;
  overflow-y: auto;
}

.auth-modal-overlay[hidden] {
  display: none !important;
}

.auth-modal-overlay.is-open {
  opacity: 1;
}

.auth.auth-editorial .auth-modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  border-radius: 26px;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid rgba(15, 23, 42, .08);
  background: #ffffff;
  color: #0f172a;
  box-shadow:
    0 28px 68px -14px rgba(15, 23, 42, .32),
    0 8px 22px -6px rgba(15, 23, 42, .14);
  will-change: transform, opacity;
  transform-origin: center center;
}

.auth.auth-editorial .auth-modal-card.auth-trial-card {
  max-width: 520px;
}

.auth.auth-editorial .auth-modal-card > .auth-modal-close {
  position: absolute !important;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .10);
  background: #f8fafc;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.auth.auth-editorial .auth-modal-card > .auth-modal-close:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, .18);
  color: #0f172a;
}

.auth.auth-editorial .auth-modal-card .auth-card-head {
  padding-right: 44px;
}

.auth.auth-editorial .auth-modal-white .auth-card-head h2,
.auth.auth-editorial .auth-modal-white .label {
  color: #0f172a;
}

.auth.auth-editorial .auth-modal-white .auth-card-sub,
.auth.auth-editorial .auth-modal-white .check-row,
.auth.auth-editorial .auth-modal-white .auth-card-foot {
  color: #475569;
}

.auth.auth-editorial .auth-modal-white .auth-tabs {
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: none;
}

.auth.auth-editorial .auth-modal-white .auth-tab {
  color: #475569;
}

.auth.auth-editorial .auth-modal-white .auth-tab.is-active {
  background: #ffffff;
  color: var(--brand-700);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
}

.auth.auth-editorial .auth-modal-white .input,
.auth.auth-editorial .auth-modal-white .select-trigger {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, .14);
  box-shadow: none;
}

.auth.auth-editorial .auth-modal-white .input:focus,
.auth.auth-editorial .auth-modal-white .select-trigger:focus-visible {
  background: #ffffff;
  border-color: var(--brand-600);
}

.auth.auth-editorial .auth-modal-white .auth-card-foot {
  border-top-color: rgba(15, 23, 42, .08);
}

.auth-trial-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, .08);
}

.auth-card-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.auth-agree-wrap {
  display: flex;
  flex-direction: column;
}

.field-slide-err {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-4px);
  margin-top: 0;
  pointer-events: none;
  transition:
    grid-template-rows 240ms cubic-bezier(.22, 1, .36, 1),
    opacity 190ms ease,
    transform 240ms cubic-bezier(.22, 1, .36, 1),
    margin-top 240ms cubic-bezier(.22, 1, .36, 1);
}

.field-slide-err.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  margin-top: 6px;
  pointer-events: auto;
}

.field-slide-err-inner {
  overflow: hidden;
  min-height: 0;
}

.field-err-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 11px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.45;
}

.field-slide-err.is-banner .form-error {
  margin: 0;
}

/* 2. 学生端「我的成绩」：单行 3 指标卡 + 纯黑标题 + 真考试列表 */
.student-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.student-kpi-label {
  color: #000000 !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
}

.student-exam-list-card {
  padding: 14px;
}

.student-exam-table tbody tr {
  transition: background-color 140ms ease;
}

.student-exam-table tbody tr:hover {
  background: #f5fbf7;
}

.student-exam-name a {
  color: var(--ink);
  font-weight: 650;
  font-size: 14.5px;
}

.student-exam-name a:hover {
  color: var(--brand-700);
}

/* 3. 学生端「学情报告」：精简头部 · 双分并列与对应排名 · 三等分成绩表 · 单科双线趋势 */
.student-report-top.is-clean {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2px 2px 4px;
}

.student-report-top.is-clean .student-report-title {
  margin: 0;
  font-size: clamp(21px, 2.2vw, 26px);
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.02em;
}

.student-report-date {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.student-dual-hero {
  padding: 22px 24px;
  border-radius: var(--r-outer-card, 28px);
  border: 1px solid rgba(16, 24, 40, .07);
  background: linear-gradient(180deg, #ffffff 0%, #f9fcfa 100%);
  box-shadow: 0 2px 14px -4px rgba(16, 24, 40, .06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.student-dual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.student-hero-subject {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

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

.student-score-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 16px; /* 同心内圆 */
  border: 1px solid rgba(16, 24, 40, .07);
}

.student-score-box.is-raw {
  background: linear-gradient(155deg, #f3fcf6 0%, #e9f9ef 100%);
  border-color: #c6ebd3;
}

.student-score-box.is-std {
  background: linear-gradient(155deg, #f3f8ff 0%, #eaf2ff 100%);
  border-color: #c8ddfc;
}

.student-score-label {
  font-size: 15px;
  font-weight: 750;
  color: #000000;
  line-height: 1.3;
}

.student-score-val {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.student-score-val strong {
  font-size: clamp(32px, 3.6vw, 42px);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.student-score-box.is-raw .student-score-val strong { color: #14532d; }
.student-score-box.is-std .student-score-val strong { color: #1e3a8a; }

.student-score-val em {
  font-style: normal;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.student-dual-interval {
  font-size: 12.5px;
  color: #1d4ed8;
  font-weight: 600;
}

.student-dual-ranks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.student-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(16, 24, 40, .09);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.student-rank-pill strong {
  color: #000000;
  font-weight: 800;
}

/* 三等分各科成绩表（科目 | 原始分 | 标准分） */
.student-tri-table {
  width: 100%;
  table-layout: fixed;
}

.student-tri-col {
  width: 33.3333%;
}

.student-tri-num {
  text-align: center !important;
  font-variant-numeric: tabular-nums;
}

.student-tri-table th.student-tri-col {
  color: #000000;
  font-weight: 700;
  font-size: 14px;
}

.student-subject-row {
  cursor: pointer;
  transition: background-color 140ms ease;
}

.student-subject-row:hover {
  background: #f5fbf7;
}

.student-report-cell-score.is-std {
  color: #1d4ed8;
  font-weight: 750;
}

.student-trend-legend {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.student-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.student-trend-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.student-trend-legend i.is-raw { background: #16a34a; }
.student-trend-legend i.is-std { background: #1a73e8; }

.student-question-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 平板端精准防溢出缩放：确保三家模型徽标在一行内绝不超出胶囊 */
@media (max-width: 960px) {
  .auth-brand-ribbon {
    gap: 8px;
    padding: 8px 12px;
  }
  .auth-brand-lockup-img {
    height: 16px;
  }
  .auth-brand-mark {
    height: 16px;
    width: 16px;
  }
  .auth-brand-wordmark {
    font-size: 14.5px;
  }
  .auth-brand-models {
    font-size: 11px;
  }
  .auth-brand-models.is-stacked {
    font-size: 10px;
  }
  .auth-gemini-num {
    font-size: 12.5px;
  }
}

/* 窄平板 / 手机端：AI 模型丝带改为整洁的等宽三行卡片列表，彻底消除第一行右侧空白与换行溢出 */
@media (max-width: 720px) {
  .auth.auth-editorial {
    padding: 84px 18px 54px;
  }
  .auth-topbar {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  }
  .auth-topbar-inner {
    gap: 8px;
  }
  .auth-topbar-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .auth-topbar-logo img {
    width: 24px;
    height: 24px;
  }
  .auth-topbar-sep,
  .auth-caption-dots {
    display: none;
  }
  .auth.auth-editorial .auth-caption {
    font-size: 12.5px;
    letter-spacing: .02em;
  }
  .auth-topbar-actions {
    gap: 6px;
  }
  .auth-nav-btn {
    height: 32px;
    padding: 0 11px;
    font-size: 12.5px;
  }
  .auth-nav-btn.is-primary {
    padding: 0 14px;
  }
  .auth-hero-dot {
    width: 102px;
    height: 102px;
    margin-left: -10px;
  }
  .auth-float-series {
    font-size: 18px;
  }
  .auth-float-name {
    font-size: 28px;
    line-height: 1.22;
  }
  .auth-float-metrics {
    font-size: 14px;
    gap: 8px 10px;
  }
  .auth-brand-ribbon {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
    gap: 0;
    padding: 4px 14px;
    border-radius: 18px;
  }
  .auth-brand-item {
    width: 100%;
    justify-content: space-between;
    padding: 9px 0;
    height: auto;
  }
  .auth-brand-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, .24);
  }
  .auth-brand-lockup-img {
    height: 18px;
  }
  .auth-brand-mark {
    height: 18px;
    width: 18px;
  }
  .auth-brand-wordmark {
    font-size: 15.5px;
  }
  .auth-brand-models {
    font-size: 12px;
    align-items: flex-end;
  }
  .auth-brand-models.is-stacked {
    font-size: 10.5px;
    align-items: flex-start;
  }
  .auth-bg-disclaimer {
    left: 18px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .auth.auth-editorial .auth-card {
    border-radius: 24px;
    padding: 22px 18px;
  }
  .student-dual-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .student-kpi-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

/* ==========================================================================
 * v3.23 Auria-Oxygen 大众成绩管理与移动优先估分预览（六边形雷达图）
 * ======================================================================= */

.oxy-preview-layout {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.oxy-top-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.oxy-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  background: var(--surface-2, #f1f5f9);
  border: 1px solid var(--border);
  min-height: 44px;
}

.oxy-mode-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  min-height: 36px;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.oxy-mode-btn.is-active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.oxy-sel-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.oxy-sel-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  min-height: 40px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 150ms ease;
}

.oxy-sel-chip:hover {
  border-color: #38bdf8;
  color: #0284c7;
}

.oxy-sel-chip.is-active {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #0284c7;
  color: #0369a1;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, .14);
}

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

.oxy-score-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .07);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.oxy-score-field:focus-within {
  background: #ffffff;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .12);
}

.oxy-score-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.oxy-score-head strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.oxy-score-range {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.oxy-score-input {
  height: 40px;
  min-height: 40px;
  font-size: 17px !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0 10px !important;
  background: #ffffff;
  border-radius: 10px !important;
}

/* 结果卡：右上角大字号综合标准分 + 六边形雷达图 */
.oxy-result-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 55%, #f5fbf7 100%);
  border: 1px solid rgba(2, 132, 199, .14);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.oxy-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, .07);
}

.oxy-result-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.oxy-result-brand {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.oxy-result-sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.oxy-result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.oxy-total-box {
  text-align: left;
  flex: 0 0 auto;
  padding: 8px 16px 10px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(14, 165, 233, .08) 0%, rgba(22, 163, 74, .10) 100%);
  border: 1px solid rgba(14, 165, 233, .18);
  min-width: 138px;
}

.oxy-total-label {
  display: block;
  text-align: left;
  font-size: 11.5px;
  font-weight: 650;
  color: #0369a1;
  letter-spacing: 0.02em;
}

.oxy-total-num {
  font-size: clamp(40px, 4.4vw, 54px);
  font-weight: 850;
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #0369a1 0%, #0f766e 52%, #15803d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 2px;
}

.oxy-total-unit {
  font-size: 15px;
  font-weight: 700;
  margin-left: 3px;
  color: #334155;
  -webkit-text-fill-color: #334155;
}

.oxy-radar-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.oxy-radar-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  z-index: 3;
}

.oxy-center-loading {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.oxy-subtab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.oxy-subtab-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
}

.oxy-subtab-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.oxy-subtab-btn.is-active {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #0369a1;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, .18);
}

.oxy-subtab-note {
  font-size: 12.5px;
  color: var(--muted);
}

.oxy-subtab-note strong {
  color: #0f172a;
}

.oxy-year-pill-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.oxy-year-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px !important;
  font-weight: 650;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b !important;
}

.oxy-year-status.is-on {
  background: #dcfce7;
  color: #15803d !important;
}

.oxy-year-pill.is-disabled-year {
  opacity: 0.82;
}

.oxy-enable-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.oxy-enable-toggle input[type="checkbox"] {
  width: 36px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
  transition: background-color 180ms ease;
  flex: none;
  vertical-align: middle;
}

.oxy-enable-toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .22);
  transform: translate(0, -50%);
  transition: transform 180ms ease;
}

.oxy-enable-toggle input[type="checkbox"]:checked {
  background: #16a34a;
}

.oxy-enable-toggle input[type="checkbox"]:checked::after {
  transform: translate(16px, -50%);
}

.oxy-radar-svg {
  width: 100%;
  max-width: 410px;
  height: auto;
  overflow: visible;
  display: block;
}

.oxy-radar-ring {
  fill: none;
  stroke: rgba(15, 23, 42, .10);
  stroke-width: 1;
}

.oxy-radar-ring.is-avg {
  stroke: rgba(2, 132, 199, .34);
  stroke-dasharray: 4 3;
  stroke-width: 1.25;
}

.oxy-radar-ring.is-outer {
  stroke: rgba(15, 23, 42, .18);
  stroke-width: 1.3;
}

.oxy-radar-axis {
  stroke: rgba(15, 23, 42, .11);
  stroke-width: 1;
}

.oxy-radar-tick {
  fill: #94a3b8;
  font-size: 9.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.oxy-radar-area {
  fill: url(#oxyRadarFill);
  stroke: url(#oxyRadarStroke);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.oxy-radar-dot-halo {
  fill: rgba(14, 165, 233, .18);
}

.oxy-radar-dot {
  fill: #0284c7;
  stroke: #ffffff;
  stroke-width: 2;
}

.oxy-radar-sub {
  fill: #0f172a;
  font-size: 13px;
  font-weight: 750;
}

.oxy-radar-score {
  fill: #0369a1;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.oxy-radar-score.is-muted {
  fill: #94a3b8;
}

.oxy-res-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.oxy-res-sub-card {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .90);
  border: 1px solid rgba(15, 23, 42, .07);
}

.oxy-res-sub-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.oxy-res-sub-top span {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
}

.oxy-res-sub-top strong {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.oxy-res-sub-meta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

/* 数据管理端样式 */
.oxy-year-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.oxy-year-pill {
  appearance: none;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  transition: all 150ms ease;
}

.oxy-year-pill strong {
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.oxy-year-pill span {
  font-size: 11.5px;
  color: var(--muted);
}

.oxy-year-pill.is-active {
  background: linear-gradient(135deg, #f0f9ff 0%, #ecfdf5 100%);
  border-color: #0284c7;
  box-shadow: 0 3px 10px rgba(2, 132, 199, .14);
}

.oxy-year-pill.is-active strong {
  color: #0369a1;
}

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

.oxy-batch-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.oxy-batch-chip,
.oxy-anchor-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, .08);
}

.oxy-anchor-chip {
  background: #f0f9ff;
  border-color: rgba(2, 132, 199, .20);
  color: #0369a1;
}

.oxy-chip-x {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.oxy-chip-x:hover {
  color: var(--danger);
}

.oxy-sub-anchor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.oxy-sub-anchor-card {
  padding: 14px;
  border-radius: 16px;
  background: #fafcfd;
  border: 1px solid rgba(15, 23, 42, .07);
}

.oxy-anchor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.oxy-anchor-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

@media (max-width: 959px) {
  .oxy-preview-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .oxy-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .oxy-sub-anchor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .oxy-top-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .oxy-sel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .oxy-res-sub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .oxy-sub-anchor-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .oxy-result-head {
    gap: 10px;
  }
  .oxy-total-box {
    min-width: 112px;
    padding: 6px 10px 7px;
  }
  .oxy-total-num {
    font-size: 38px;
  }
  .oxy-radar-svg {
    max-width: 100%;
  }
}

/* ==========================================================================
 * v3.24 开放模型公开页（/open-model）DeepSeek 风格滚动吸顶胶囊变形 Header
 * ======================================================================= */
body.open-model-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 14% -6%, rgba(14, 165, 233, .08), transparent 62%),
    radial-gradient(760px 380px at 88% 0%, rgba(22, 163, 74, .07), transparent 60%),
    #f5f7f9;
  color: var(--ink);
}

.open-header-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 0;
  pointer-events: none;
  transition: padding 300ms cubic-bezier(.22, 1, .36, 1);
}

.open-header-wrap.is-scrolled {
  padding: 12px 18px 0;
}

.open-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  height: 64px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
  border-radius: 0;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  transition:
    max-width 340ms cubic-bezier(.22, 1, .36, 1),
    height 300ms cubic-bezier(.22, 1, .36, 1),
    padding 300ms cubic-bezier(.22, 1, .36, 1),
    border-radius 320ms cubic-bezier(.22, 1, .36, 1),
    background-color 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease,
    backdrop-filter 260ms ease;
}

.open-header.lg-surface {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.open-header.lg-surface::before,
.open-header.lg-surface::after {
  opacity: 0;
  transition: opacity 240ms ease;
}

.open-header-wrap.is-scrolled .open-header {
  max-width: 1080px;
  height: 56px;
  padding: 0 18px 0 20px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, .58);
  background: linear-gradient(175deg, rgba(255, 255, 255, .44) 0%, rgba(255, 255, 255, .22) 54%, rgba(255, 255, 255, .34) 100%);
  -webkit-backdrop-filter: saturate(1.26) brightness(1.02);
  backdrop-filter: saturate(1.26) brightness(1.02);
  box-shadow:
    0 14px 36px -12px rgba(15, 23, 42, .16),
    0 2px 8px rgba(15, 23, 42, .05),
    0 0 0 0.5px rgba(15, 23, 42, .08);
}

.open-header-wrap.is-scrolled .open-header.lg-surface::before {
  opacity: .16;
}

.open-header-wrap.is-scrolled .open-header.lg-surface:hover::before {
  opacity: .42;
}

.open-header-wrap.is-scrolled .open-header.lg-surface::after {
  opacity: 1;
}

.open-header-wrap.is-scrolled .open-header.is-lg-webkit-dom {
  background: linear-gradient(175deg, rgba(255, 255, 255, .64) 0%, rgba(255, 255, 255, .42) 54%, rgba(255, 255, 255, .54) 100%);
}

.open-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #0f172a;
  min-width: 0;
}

.open-header-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 8px;
  flex: none;
}

.open-header-sep {
  width: 1px;
  height: 16px;
  background: rgba(15, 23, 42, .20);
  flex: none;
}

.open-header-brand strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
  white-space: nowrap;
}

.open-header-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .10);
  background: rgba(255, 255, 255, .56);
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 150ms ease, box-shadow 160ms ease;
}

.open-header-back:hover {
  background: rgba(255, 255, 255, .90);
  border-color: var(--brand-600);
  color: var(--brand-700);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -8px rgba(15, 23, 42, .22), inset 0 1px 0 #ffffff;
}

.open-main {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 88px clamp(16px, 3vw, 28px) 64px;
  min-height: calc(100vh + 60px);
}

.open-footer {
  margin-top: 36px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* AI 分步解析进度条卡片与预览配图样式 */
.ai-progress-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 8px 10px;
}

.ai-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.ai-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #16a34a 0%, #0ea5e9 100%);
  transition: width 360ms cubic-bezier(.22, 1, .36, 1);
}

.ai-progress-meta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.ai-progress-pct {
  font-variant-numeric: tabular-nums;
  color: var(--brand-700);
}

.ai-progress-steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.ai-progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-progress-step.is-active {
  color: #0369a1;
  font-weight: 650;
}

.ai-progress-step.is-done {
  color: #15803d;
}

.ai-q-img-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ai-q-img-thumb {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #f8fafc;
}

.ai-q-img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ai-q-img-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 0;
  background: rgba(15, 23, 42, .72);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ai-q-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.ai-q-gallery-item {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ai-q-gallery-item:hover {
  border-color: var(--brand-600);
  box-shadow: 0 4px 12px rgba(22, 163, 74, .14);
}

.ai-q-gallery-item img {
  width: 100%;
  height: 82px;
  object-fit: contain;
  border-radius: 6px;
  background: #f8fafc;
}

@media (max-width: 640px) {
  .open-header-wrap.is-scrolled {
    padding: 8px 10px 0;
  }
  .open-header {
    height: 56px;
    padding: 0 14px;
  }
  .open-header-wrap.is-scrolled .open-header {
    height: 50px;
    padding: 0 12px 0 14px;
  }
  .open-main {
    padding: 72px 12px 48px;
  }
}

/* ==========================================================================
 * v3.26: DeepSeek 风格主舞台功能胶囊 · 居中安全/公告弹窗 · 大号分布环图
 * ======================================================================= */

.auth-cta-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  max-width: 100%;
}

.auth-cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .21);
  background: linear-gradient(165deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .02) 54%, rgba(255, 255, 255, .06) 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 1px 9px rgba(0, 0, 0, .58);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .42);
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), background-color 180ms ease, border-color 180ms ease, box-shadow 200ms ease, color 180ms ease;
}

.auth-cta-pill:hover {
  background: linear-gradient(165deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .06) 54%, rgba(255, 255, 255, .13) 100%);
  border-color: rgba(255, 255, 255, .42);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px rgba(0, 0, 0, .50);
}

.auth-cta-pill:active {
  transform: translateY(0) scale(.98);
}

.auth-cta-icon {
  color: rgba(255, 255, 255, .94);
  flex: none;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .44));
  transition: transform 180ms ease, color 180ms ease;
}

.auth-cta-pill:hover .auth-cta-icon {
  color: #ffffff;
  transform: scale(1.06);
}

@media (max-width: 640px) {
  .auth-cta-pills {
    gap: 8px;
    margin-top: 14px;
  }
  .auth-cta-pill {
    height: 36px;
    padding: 0 14px;
    font-size: 12.5px;
    gap: 6px;
  }
}

/* 居中提示/安全/公告弹窗（桌面端与手机端均严格屏幕正中，不退化为贴底抽屉或左偏） */
.modal-mask.is-alert-center {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}

.modal-mask.is-alert-center .modal-panel {
  width: min(400px, calc(100vw - 40px)) !important;
  max-width: calc(100vw - 40px) !important;
  margin: 0 auto !important;
  max-height: calc(100dvh - 48px) !important;
  transform: scale(0.95) !important;
  opacity: 0;
  transition: opacity 200ms var(--ease-out), transform 220ms cubic-bezier(.22, 1, .36, 1) !important;
}

.modal-mask.is-alert-center.is-open .modal-panel {
  opacity: 1 !important;
  transform: scale(1) !important;
}

.modal-mask.is-alert-center .modal-card,
.modal-card.is-alert-modal {
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .28), 0 4px 16px -4px rgba(15, 23, 42, .12) !important;
}

.modal-mask.is-alert-center .modal-card::before {
  display: none !important;
}

.modal-card.is-alert-modal .is-alert-head {
  padding: 22px 22px 8px !important;
  border-bottom: 0 !important;
  justify-content: center;
  text-align: center;
}

.modal-card.is-alert-modal .is-alert-head .modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.modal-card.is-alert-modal .is-alert-body {
  padding: 6px 24px 20px !important;
  font-size: 15px;
  line-height: 1.65;
  color: #334155;
  text-align: center;
}

.modal-card.is-alert-modal .is-alert-foot {
  padding: 12px 20px 20px !important;
  border-top: 1px solid rgba(15, 23, 42, .08) !important;
}

/* 大号清晰日志分布环图 */
.chart-box.chart-donut {
  height: auto !important;
  min-height: 290px;
}

.chart-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 6px 0 4px;
}

.donut-stage {
  position: relative;
  width: 210px;
  height: 210px;
  max-width: 100%;
  flex: none;
}

.donut-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.donut-stage .donut-value {
  font-size: 32px;
  font-weight: 750;
  fill: var(--ink);
}

.donut-stage .donut-label {
  font-size: 13.5px;
  font-weight: 500;
  fill: var(--muted);
}

.chart-legend-donut {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.legend-item-donut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.legend-item-donut .legend-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.legend-item-donut .legend-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-item-donut .legend-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-variant-numeric: tabular-nums;
}

.legend-item-donut .legend-right strong {
  color: var(--ink);
  font-weight: 700;
}

.legend-item-donut .legend-right em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

/* 化学元素周期表风格预测模型卡片与右侧元素方格（不含原子序数） */
.history-algorithm-option {
  align-items: center !important;
  gap: 12px;
}

.history-algorithm-option .history-algorithm-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.element-tile {
  flex: none;
  margin-left: auto;
  width: 74px;
  min-height: 78px;
  padding: 7px 6px 6px;
  border-radius: 14px;
  border: 1.5px solid rgba(15, 23, 42, .14);
  background: rgba(255, 255, 255, .92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-align: center;
  line-height: 1.15;
  box-shadow: 0 4px 12px -6px rgba(15, 23, 42, .14), inset 0 1px 0 rgba(255, 255, 255, .95);
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), border-color 180ms ease, box-shadow 180ms ease;
}

.history-algorithm-option:hover .element-tile,
.history-algorithm-option.is-active .element-tile {
  transform: translateY(-1px);
}

.element-tile-sym {
  font-family: "Inter var", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #0f172a;
}

.element-tile-zh {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2px;
}

.element-tile-en {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 4px;
  letter-spacing: .005em;
}

.element-tile-mass {
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  margin-top: 2px;
}

.element-tile.tone-base {
  border-color: rgba(26, 115, 232, .34);
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}
.element-tile.tone-base .element-tile-sym { color: #1a73e8; }

.element-tile.tone-pro {
  border-color: rgba(30, 142, 62, .34);
  background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
}
.element-tile.tone-pro .element-tile-sym { color: #15803d; }

.element-tile.tone-ultra {
  border-color: rgba(227, 116, 0, .38);
  background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}
.element-tile.tone-ultra .element-tile-sym { color: #d97706; }

.element-tile.tone-max {
  border-color: rgba(217, 48, 37, .36);
  background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
}
.element-tile.tone-max .element-tile-sym { color: #dc2626; }

@media (max-width: 520px) {
  .element-tile {
    width: 64px;
    min-height: 68px;
    padding: 5px 4px;
    border-radius: 12px;
  }
  .element-tile-sym { font-size: 20px; }
  .element-tile-zh { font-size: 11px; }
}

/* 更新日志与公告公开页 & 首页居中公告弹窗 */
.public-updates-main {
  max-width: 880px;
}

.pub-hero {
  text-align: center;
  padding: 20px 0 32px;
}

.pub-eyebrow {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(22, 163, 74, .10);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.pub-title {
  margin: 14px 0 10px;
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a;
}

.pub-sub {
  margin: 0 auto;
  max-width: 540px;
  font-size: 16px;
  line-height: 1.65;
  color: #475569;
}

.pub-filter-pills {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 6px 20px -10px rgba(15, 23, 42, .12);
}

.pub-filter-pill {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.pub-filter-pill.is-active {
  background: #0f172a;
  color: #ffffff;
}

.updates-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.update-card {
  padding: clamp(20px, 3vw, 28px);
  border-radius: 24px;
}

.update-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.update-card-time {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.update-card-title {
  margin: 12px 0 10px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.35;
}

.update-card-content {
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
  word-break: break-word;
}

.update-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.update-gallery-item {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  background: #f8fafc;
  cursor: zoom-in;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.update-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(15, 23, 42, .20);
}

.update-gallery-item img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

/* 首页居中公告弹窗 */
.modal-mask.is-alert-center:has(.ann-popup-card) .modal-panel {
  width: min(520px, calc(100vw - 36px)) !important;
  max-width: calc(100vw - 36px) !important;
}

.ann-popup-head {
  padding: 24px 24px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.ann-popup-title {
  margin: 10px 0 4px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.35;
}

.ann-popup-date {
  font-size: 12px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.ann-popup-body {
  padding: 16px 24px 20px !important;
  max-height: 56vh;
  overflow-y: auto;
  text-align: left !important;
}

.ann-popup-text {
  font-size: 14.5px;
  line-height: 1.78;
  color: #334155;
  word-break: break-word;
}

.ann-popup-imgs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.ann-popup-imgs img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .08);
}

/* ==========================================================================
 * Apple 风格「了解系统功能」宣传展示页 (/features)
 * ======================================================================= */

.features-body {
  background: #ffffff;
  color: #1d1d1f;
}

.open-header-back.is-primary-pill {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.open-header-back.is-primary-pill:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: #ffffff;
}

.features-main {
  padding-top: 64px;
}

.feat-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.feat-hero {
  padding: clamp(56px, 9vw, 108px) 0 clamp(44px, 7vw, 76px);
  text-align: center;
  background: radial-gradient(ellipse 80% 55% at 50% -10%, rgba(22, 163, 74, .11), transparent 72%);
}

.feat-eyebrow {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(22, 163, 74, .10);
  color: #15803d;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

.feat-hero-title {
  margin: 18px auto 16px;
  max-width: 820px;
  font-size: clamp(34px, 5.4vw, 60px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #1d1d1f;
}

.feat-hero-sub {
  margin: 0 auto;
  max-width: 860px;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.7;
  color: #52525b;
  font-weight: 450;
  text-wrap: balance;
}

.feat-hero-actions {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.feat-cta-btn {
  border-radius: 999px !important;
  padding-left: 26px !important;
  padding-right: 26px !important;
}

.feat-pillars {
  padding: 12px 0 clamp(44px, 6vw, 72px);
}

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

.feat-pillar {
  padding: 24px 22px;
  border-radius: 22px;
  background: #f5f5f7;
  border: 1px solid rgba(15, 23, 42, .05);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feat-pillar-num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-600);
  line-height: 1.1;
}

.feat-pillar strong {
  font-size: 16px;
  font-weight: 700;
  color: #1d1d1f;
  margin-top: 2px;
}

.feat-pillar p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #52525b;
}

.feat-section {
  padding: clamp(56px, 7.5vw, 96px) 0;
}

.feat-section.is-tinted {
  background: #f5f5f7;
}

.feat-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.24fr);
  align-items: center;
  gap: clamp(28px, 4.8vw, 60px);
}

.feat-split.is-reverse .feat-copy {
  order: 2;
}

.feat-split.is-reverse .feat-visual {
  order: 1;
}

.feat-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .04em;
  color: var(--brand-700);
  margin-bottom: 10px;
}

.feat-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: #1d1d1f;
}

.feat-copy p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.8;
  color: #52525b;
}

.feat-highlights {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feat-highlights li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #27272a;
}

.feat-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand-600);
}

.feat-browser-frame {
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .10);
  box-shadow: 0 28px 64px -22px rgba(15, 23, 42, .22), 0 8px 20px -8px rgba(15, 23, 42, .10);
}

.feat-browser-bar {
  height: 28px;
  padding: 0 12px;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  display: flex;
  align-items: center;
  gap: 6px;
}

.feat-browser-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #cbd5e1;
}

.feat-browser-bar span:nth-child(1) { background: #fca5a5; }
.feat-browser-bar span:nth-child(2) { background: #fcd34d; }
.feat-browser-bar span:nth-child(3) { background: #86efac; }

.feat-browser-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.feat-elements-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.feat-elem-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .08);
}

.feat-elem-chip strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  flex: none;
}

.feat-elem-chip span {
  font-size: 13px;
  font-weight: 650;
  color: #1e293b;
}

.feat-elem-chip.is-base strong { background: #eff6ff; color: #1a73e8; }
.feat-elem-chip.is-pro strong { background: #ecfdf5; color: #15803d; }
.feat-elem-chip.is-ultra strong { background: #fffbeb; color: #d97706; }
.feat-elem-chip.is-max strong { background: #fef2f2; color: #dc2626; }

.feat-bottom-cta {
  padding: clamp(48px, 7vw, 84px) 0 24px;
}

.feat-cta-card {
  padding: clamp(36px, 6vw, 60px) clamp(24px, 4vw, 48px);
  border-radius: 28px;
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 55%, #eff6ff 100%);
  border: 1px solid rgba(22, 163, 74, .14);
  text-align: center;
}

.feat-cta-card h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #1d1d1f;
}

.feat-cta-card p {
  margin: 0 auto;
  max-width: 520px;
  font-size: 15.5px;
  line-height: 1.7;
  color: #52525b;
}

@media (max-width: 960px) {
  .feat-pillar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feat-split,
  .feat-split.is-reverse {
    grid-template-columns: minmax(0, 1fr);
  }
  .feat-split.is-reverse .feat-copy,
  .feat-split.is-reverse .feat-visual {
    order: initial;
  }
}

@media (max-width: 520px) {
  .feat-pillar-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
 * v3.29: 侧边栏零错位展开/收起、跨页零闪跳 View Transition &
 *        Apple Liquid Glass 可拖动悬浮导航胶囊（按压中心撑大 / 静息微缩）
 * ======================================================================= */

@media (min-width: 1025px) {
  @view-transition {
    navigation: auto;
  }

  html:not(.exam-m-landscape) #appSidebar {
    view-transition-name: app-sidebar;
  }

  ::view-transition-group(app-sidebar) {
    animation: none;
    z-index: 20;
  }

  ::view-transition-old(app-sidebar),
  ::view-transition-new(app-sidebar) {
    animation: none;
    mix-blend-mode: normal;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 140ms;
    animation-timing-function: ease-out;
  }
}

.app {
  transition: none;
}

.app-sidebar {
  padding-left: 10px;
  padding-right: 10px;
  overflow: hidden;
  transition: none;
}

/* 展开与折叠共用完全一致的左对齐垂直轴（图标 x=27.5px，文字 x=57.5px），杜绝任何横向偏移/省略号闪跳 */
.app-sidebar .sidebar-brand {
  flex: none;
  justify-content: flex-start;
  gap: 10px;
  padding: 2px 8.5px 4px;
  overflow: hidden;
}

.app-sidebar .sidebar-user {
  justify-content: flex-start;
  gap: 10px;
  padding: 6px 11.5px 10px;
  overflow: hidden;
}

.app-sidebar .sidebar-brand-text,
.app-sidebar .sidebar-user-text {
  flex: 0 0 auto;
  width: 126px;
  max-width: none;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  white-space: nowrap;
}

.app-sidebar .nav-group-label {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 12.5px;
  line-height: 18px;
  overflow: hidden;
  white-space: nowrap;
  opacity: 1;
}

.app-sidebar .nav-item {
  position: relative;
  justify-content: flex-start;
  height: 44px;
  padding: 0 12px 0 12.5px;
  gap: 10px;
  border-radius: 22px;
  font-weight: 500;
  letter-spacing: 0.005em;
  overflow: hidden;
  transition: background-color 140ms ease, color 140ms ease;
}

.app-sidebar .sidebar-foot .nav-item {
  height: 42px;
  padding: 0 12px 0 17.5px;
  border-radius: 21px;
}

.app-sidebar .nav-item .icon {
  flex: none;
  width: 20px;
  height: 20px;
}

/* 文字与图标绑定同一 20px 垂直居中盒，保持自然宽度不挤压、不出省略号 */
.app-sidebar .nav-item > span:not(.beta-pill) {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 20px;
  line-height: 20px;
  max-width: none;
  opacity: 1;
  visibility: visible;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.app-sidebar .nav-item .beta-pill {
  position: absolute;
  right: 10px;
  top: 50%;
  margin-left: 0;
  transform: translateY(-50%);
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

/* 仅在用户主动切换收起/展开时启用顺滑过渡，首屏零闪跳 */
html.sidebar-animating .app {
  transition: grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.sidebar-animating .app-sidebar {
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.sidebar-animating .sidebar-nav-base,
html.sidebar-animating .sidebar-nav-green,
html.sidebar-animating .nav-group,
html.sidebar-animating .sidebar-foot {
  transition: gap 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.sidebar-animating .nav-group-label {
  transition:
    height 300ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 160ms ease;
}

/* 展开方向：等侧边栏拉开后再温和淡入文字，绝不先露半截再弹开 */
html.sidebar-animating[data-sidebar="expanded"] .sidebar-brand-text,
html.sidebar-animating[data-sidebar="expanded"] .sidebar-user-text,
html.sidebar-animating[data-sidebar="expanded"] .nav-item > span:not(.beta-pill) {
  transition: opacity 190ms ease 105ms, visibility 0s linear 0s;
}

html.sidebar-animating[data-sidebar="expanded"] .nav-item .beta-pill {
  transition: opacity 160ms ease 175ms, visibility 0s linear 0s;
}

html.sidebar-animating[data-sidebar="expanded"] .nav-group-label {
  transition:
    height 300ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease 95ms;
}

/* 收起方向：文字第一时间干净淡出，再由宽到窄平滑收拢 */
html.sidebar-animating[data-sidebar="collapsed"] .sidebar-brand-text,
html.sidebar-animating[data-sidebar="collapsed"] .sidebar-user-text,
html.sidebar-animating[data-sidebar="collapsed"] .nav-item > span:not(.beta-pill) {
  transition: opacity 95ms ease 0s, visibility 0s linear 95ms;
}

html.sidebar-animating[data-sidebar="collapsed"] .nav-item .beta-pill {
  transition: opacity 75ms ease 0s, visibility 0s linear 75ms;
}

html.sidebar-animating[data-sidebar="collapsed"] .nav-group-label {
  transition:
    height 300ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 95ms ease 0s;
}

.sidebar-collapse .icon,
.topbar-collapse .icon {
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* 细窄滚动条：左右 padding=0，由内部 stage 留出 5px 呼吸区供按压撑大不裁切 */
#appSidebar .sidebar-nav {
  display: block;
  position: relative;
  padding: 2px 0 8px;
}

@supports not selector(::-webkit-scrollbar) {
  #appSidebar .sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.24) transparent;
  }
}

#appSidebar .sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

#appSidebar .sidebar-nav::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

#appSidebar .sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

#appSidebar .sidebar-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.18);
}

#appSidebar .sidebar-nav:hover::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.34);
}

/* 去除浅绿底与左侧绿条 */
#appSidebar .sidebar-nav .nav-item.is-active {
  background: transparent;
  color: #15803d;
  font-weight: 500;
}

#appSidebar .sidebar-nav .nav-item.is-active .icon {
  color: #16a34a;
}

#appSidebar .sidebar-nav .nav-item.is-active::before {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  #appSidebar .sidebar-nav .nav-item:hover {
    background: rgba(15, 23, 42, 0.035);
    color: var(--ink);
  }

  #appSidebar .sidebar-nav .nav-item:hover .icon {
    color: var(--ink-2);
  }

  #appSidebar .sidebar-nav .nav-item.is-active:hover {
    background: transparent;
  }
}

/* 液态玻璃舞台：左右留足 5px，按压中心撑大与投影不被裁切 */
.sidebar-nav-stage {
  position: relative;
  min-height: 100%;
  padding: 8px 5px 22px;
  background: var(--surface);
  isolation: isolate;
}

.sidebar-nav-base,
.sidebar-nav-green {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-nav-base {
  position: relative;
  z-index: 1;
}

#appSidebar .sidebar-nav.has-sidebar-glass .sidebar-nav-base .nav-item.is-active {
  color: var(--ink-2);
  background: transparent;
}

#appSidebar .sidebar-nav.has-sidebar-glass .sidebar-nav-base .nav-item.is-active .icon {
  color: var(--muted);
}

#appSidebar .sidebar-nav.has-sidebar-glass .sidebar-nav-base .nav-item {
  cursor: grab;
  -webkit-user-drag: none;
}

#appSidebar .sidebar-nav.has-sidebar-glass .sidebar-nav-base .nav-item.is-active {
  touch-action: none;
}

#appSidebar .sidebar-nav.is-glass-dragging,
#appSidebar .sidebar-nav.is-glass-dragging .sidebar-nav-base .nav-item {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

#appSidebar .sidebar-nav.is-glass-dragging .sidebar-nav-base .nav-item,
#appSidebar .sidebar-nav.is-glass-dragging .sidebar-nav-base .nav-item:hover {
  background: transparent !important;
  color: var(--ink-2) !important;
  transition: none !important;
}

#appSidebar .sidebar-nav.is-glass-dragging .sidebar-nav-base .nav-item:hover .icon {
  color: var(--muted) !important;
}

/* 绿色分色覆盖层：与基础层字号/字重/行高/间距 1:1 亚像素重合 */
.sidebar-nav-green {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 8px 5px 22px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  clip-path: inset(100% 0 0 0 round 22px);
  -webkit-clip-path: inset(100% 0 0 0 round 22px);
  will-change: clip-path;
}

.sidebar-nav-green .nav-item {
  color: #15803d !important;
  background: transparent !important;
  font-weight: 500;
  text-shadow: 0 0 0.01px rgba(21, 128, 61, 0.45);
  pointer-events: none;
  transition: none;
}

.sidebar-nav-green .nav-item .icon {
  color: #16a34a !important;
  stroke-width: 2.02;
  transition: none;
}

.sidebar-nav-green .nav-group-label {
  color: #4b7a5e;
}

.sidebar-nav-green .beta-pill {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* Apple Liquid Glass 悬浮折射胶囊（首帧无 opacity 渐显闪烁） */
.sidebar-glass-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  box-sizing: border-box;
  border-radius: 22px;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  will-change: transform;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(241, 245, 249, 0.12) 50%,
    rgba(255, 255, 255, 0.28) 100%
  );
  border: 1px solid rgba(15, 23, 42, 0.078);
  box-shadow:
    inset 0 1px 0.8px rgba(255, 255, 255, 0.88),
    inset 0 -1.3px 1.8px rgba(15, 23, 42, 0.052),
    inset 1px 0 1.2px rgba(255, 255, 255, 0.42),
    inset -1px 0 1.2px rgba(15, 23, 42, 0.03),
    0 4px 13px -6px rgba(15, 23, 42, 0.14),
    0 1px 3.5px -1px rgba(15, 23, 42, 0.06);
  -webkit-backdrop-filter: saturate(1.36) brightness(1.02);
  backdrop-filter: saturate(1.36) brightness(1.02);
  transition:
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    background 220ms ease;
}

.sidebar-glass-pill.is-visible {
  opacity: 1;
}

.sidebar-glass-pill.is-lg-svg,
.sidebar-glass-pill.is-lg-wk {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(248, 250, 252, 0.02) 52%,
    rgba(255, 255, 255, 0.10) 100%
  );
}

.sidebar-glass-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  pointer-events: none;
}

.sidebar-glass-pill.is-lifted {
  border-color: rgba(22, 163, 74, 0.18);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.17) 0%,
    rgba(240, 253, 244, 0.035) 52%,
    rgba(255, 255, 255, 0.12) 100%
  );
  box-shadow:
    inset 0 1.2px 1px rgba(255, 255, 255, 0.90),
    inset 0 -1.6px 2.2px rgba(15, 23, 42, 0.072),
    inset 1px 0 1.5px rgba(255, 255, 255, 0.48),
    inset -1px 0 1.5px rgba(15, 23, 42, 0.038),
    0 14px 30px -7px rgba(15, 23, 42, 0.22),
    0 4px 12px -2px rgba(22, 163, 74, 0.10);
}

.sidebar-glass-sheen {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(
      84px 36px at var(--lg-gx, 32%) var(--lg-gy, 18%),
      rgba(255, 255, 255, 0.24) 0%,
      rgba(255, 255, 255, 0.06) 48%,
      rgba(255, 255, 255, 0) 100%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0) 24%,
      rgba(255, 255, 255, 0) 78%,
      rgba(22, 163, 74, 0.04) 100%
    );
}

/* 桌面端收起态：所有图标与文字锚点不变，仅收拢宽度与淡出文字 */
@media (min-width: 1025px) {
  html[data-sidebar="collapsed"] .app {
    grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr);
  }

  html[data-sidebar="collapsed"] .app-sidebar {
    width: var(--sidebar-w-collapsed);
    padding-left: 10px;
    padding-right: 10px;
  }

  html[data-sidebar="collapsed"] .sidebar-brand {
    justify-content: flex-start;
    gap: 10px;
    padding: 2px 8.5px 4px;
  }

  html[data-sidebar="collapsed"] .sidebar-brand-text,
  html[data-sidebar="collapsed"] .sidebar-user-text {
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  html[data-sidebar="collapsed"] .nav-group-label {
    display: flex;
    height: 0;
    padding: 0 12.5px;
    opacity: 0;
    pointer-events: none;
  }

  html[data-sidebar="collapsed"] .nav-item > span:not(.beta-pill) {
    display: inline-flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  html[data-sidebar="collapsed"] .nav-item .beta-pill {
    display: inline-flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  html[data-sidebar="collapsed"] #appSidebar .sidebar-nav,
  html.sidebar-animating #appSidebar .sidebar-nav {
    padding: 2px 0 8px;
    scrollbar-width: none;
  }

  html[data-sidebar="collapsed"] #appSidebar .sidebar-nav::-webkit-scrollbar,
  html.sidebar-animating #appSidebar .sidebar-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  html[data-sidebar="collapsed"] .sidebar-nav-base,
  html[data-sidebar="collapsed"] .sidebar-nav-green {
    gap: 10px;
  }

  html[data-sidebar="collapsed"] .nav-group {
    gap: 4px;
  }

  html[data-sidebar="collapsed"] .app-sidebar .nav-item {
    justify-content: flex-start;
    gap: 10px;
    height: 44px;
    padding: 0 0 0 12.5px;
    border-radius: 22px;
  }

  html[data-sidebar="collapsed"] .app-sidebar .nav-item .icon {
    width: 20px;
    height: 20px;
  }

  html[data-sidebar="collapsed"] .sidebar-user {
    justify-content: flex-start;
    gap: 10px;
    padding: 6px 11.5px 10px;
  }

  html[data-sidebar="collapsed"] .sidebar-foot {
    gap: 4px;
  }

  html[data-sidebar="collapsed"] .sidebar-foot .nav-item {
    height: 42px;
    padding: 0 0 0 17.5px;
    border-radius: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.sidebar-animating .app,
  html.sidebar-animating .app-sidebar,
  html.sidebar-animating .sidebar-nav-base,
  html.sidebar-animating .sidebar-nav-green,
  html.sidebar-animating .nav-group,
  html.sidebar-animating .sidebar-foot,
  html.sidebar-animating .sidebar-brand-text,
  html.sidebar-animating .sidebar-user-text,
  html.sidebar-animating .nav-group-label,
  html.sidebar-animating .nav-item > span:not(.beta-pill),
  html.sidebar-animating .nav-item .beta-pill,
  html.sidebar-animating .app-sidebar .nav-item {
    transition: none !important;
  }
}

/* ==========================================================================
 * v3.30: 手机端工具栏双列紧凑网格（修复 flex-direction:column 下 inline flex-basis
 *        变垂直空白的适配问题）& 考试管理 (/super/exams) 手机端卡片化列表
 * ======================================================================= */
@media (max-width: 640px) {
  html:not(.exam-m-landscape) .toolbar,
  html:not(.exam-m-landscape) .table-toolbar,
  html:not(.exam-m-landscape) .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }

  html:not(.exam-m-landscape) .toolbar > *,
  html:not(.exam-m-landscape) .table-toolbar > *,
  html:not(.exam-m-landscape) .filter-bar > * {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
  }

  html:not(.exam-m-landscape) .toolbar > .spacer,
  html:not(.exam-m-landscape) .table-toolbar > .spacer,
  html:not(.exam-m-landscape) .filter-bar > .spacer {
    display: none;
  }

  html:not(.exam-m-landscape) .toolbar > .search-field,
  html:not(.exam-m-landscape) .table-toolbar > .search-field,
  html:not(.exam-m-landscape) .filter-bar > .search-field,
  html:not(.exam-m-landscape) .toolbar > .btn:last-child,
  html:not(.exam-m-landscape) .toolbar > .segmented,
  html:not(.exam-m-landscape) .toolbar > .switch-badge {
    grid-column: 1 / -1;
  }

  html:not(.exam-m-landscape) .toolbar .hngk-select-wrap,
  html:not(.exam-m-landscape) .toolbar .select-box,
  html:not(.exam-m-landscape) .toolbar .select-trigger,
  html:not(.exam-m-landscape) .toolbar .hngk-select-trigger,
  html:not(.exam-m-landscape) .toolbar .select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    font-size: 13.5px;
  }

  html:not(.exam-m-landscape) .toolbar .search-field .input {
    height: 40px;
    min-height: 40px;
    font-size: 13.5px;
  }

  html:not(.exam-m-landscape) .toolbar .btn {
    height: 38px;
    min-height: 38px;
    font-size: 13.5px;
  }

  /* /super/exams 手机端考试卡片列表 */
  body[data-page="super-exams"] .card .hint {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
  }

  body[data-page="super-exams"] #examTableCard .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body[data-page="super-exams"] #examTable {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  body[data-page="super-exams"] #examTable thead {
    display: none;
  }

  body[data-page="super-exams"] #examTable tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 12px 12px;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 6px 8px;
    align-items: start;
    padding: 12px 12px 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row).is-selected {
    border-color: rgba(22, 163, 74, 0.45);
    background: #f0fdf4;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td {
    position: static !important;
    display: block;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left !important;
    font-size: 12.5px;
    line-height: 1.4;
    white-space: normal !important;
  }

  /* 1: checkbox */
  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    padding-top: 2px !important;
  }

  /* 2: 考试名称 */
  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(2) .cell-main {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
    text-align: left;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(2) .cell-sub {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
    text-align: left;
  }

  /* 10: 发布状态 badge 放右上角 */
  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(10) {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  /* 3: 学校 | 4: 年级 | 5: 学期 | 8: 日期 | 9: 人数 -> 紧凑信息行 */
  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(3) {
    grid-column: 1 / 3;
    grid-row: 2;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 6px;
    color: var(--ink-2);
    font-weight: 550;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(3) .cell-main {
    display: inline;
    text-align: left;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(3) .cell-sub {
    display: inline;
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    color: var(--muted);
    font-weight: 600;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(5) {
    grid-column: 1 / 3;
    grid-row: 3;
    color: var(--muted);
    font-size: 12px;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(8) {
    grid-column: 3;
    grid-row: 3;
    justify-self: end;
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(6) {
    grid-column: 1 / 2;
    grid-row: 4;
    width: max-content !important;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(7) {
    grid-column: 2 / 3;
    grid-row: 4;
    padding-left: 24px !important;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(9) {
    grid-column: 3;
    grid-row: 4;
    justify-self: end;
    font-size: 12px;
    font-weight: 650;
    color: var(--ink-2);
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(9)::before {
    content: "人数 ";
    font-weight: 400;
    color: var(--muted);
  }

  /* 11: 创建者 */
  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(11) {
    display: none;
  }

  /* 12: 操作栏满宽三等分 */
  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) td:nth-child(12) {
    grid-column: 1 / -1;
    grid-row: 5;
    justify-self: stretch;
    width: 100% !important;
    margin-top: 4px;
    padding-top: 8px !important;
    border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) .table-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100% !important;
    justify-content: stretch;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) .table-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 0 !important;
    height: 34px;
    min-height: 34px;
    padding: 0 6px;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 10px;
    background: #f8fafc;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
  }

  body[data-page="super-exams"] #examTable tbody tr:not(.table-empty-row) .table-actions a:first-child {
    border-color: rgba(22, 163, 74, 0.25);
    background: #f0fdf4;
    color: #15803d;
  }

  body[data-page="super-exams"] #examTable tbody tr.table-empty-row,
  body[data-page="super-exams"] #examTable tbody tr.table-empty-row td {
    display: block;
    width: 100%;
  }
}
