/* ============================================================
   病历判读系统 — 基础样式
   克制、浅色、细边框；不使用渐变/光晕/装饰动画。
   ============================================================ */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --bg: #f4f5f4;
  --surface: #ffffff;
  --surface-2: #f7f8f7;
  --ink: #1f2933;
  --ink-2: #374151;
  --muted: #6b7280;
  --faint: #9aa3ad;
  --line: #e3e6e4;
  --line-strong: #cfd4d1;

  --accent: #0f766e;
  --accent-2: #115e59;
  --accent-soft: #edf7f5;
  --red: #b42318;
  --red-soft: #fef3f2;
  --amber: #b45309;
  --amber-soft: #fffaeb;
  --blue: #175cd3;
  --blue-soft: #eff6ff;
  --green: #15803d;
  --green-soft: #f0f9f2;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 10px 30px -16px rgba(16, 24, 40, .22);
  --topbar-h: 56px;
  --maxw: 1280px;
  --ease: cubic-bezier(.2, .6, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: #d7ebe7; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9cecb; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid #6aa8a0; outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- boot */
.boot-screen {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; color: var(--muted);
}
.boot-mark { display: flex; gap: 6px; }
.boot-mark span {
  width: 7px; height: 7px; border-radius: 50%; background: #9bb7b2;
  animation: bootPulse 1.2s ease infinite;
}
.boot-mark span:nth-child(2) { animation-delay: .15s; }
.boot-mark span:nth-child(3) { animation-delay: .3s; }
@keyframes bootPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.noscript { padding: 40px; text-align: center; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%; display: inline-block;
  border: 2px solid currentColor; border-right-color: transparent; opacity: .8;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- type */
.eyebrow { display: none; }
.display { font-weight: 600; }
.h1 { font-size: 24px; line-height: 1.3; font-weight: 600; }
.h2 { font-size: 18px; line-height: 1.4; font-weight: 600; }
.h3 { font-size: 15px; line-height: 1.4; font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- layout */
.page { width: min(100% - 40px, var(--maxw)); margin: 0 auto; }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); border: 0; margin: 14px 0; }
.hide { display: none !important; }
.show-mobile { display: none !important; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink-2);
  --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); font-size: 13.5px; font-weight: 500;
  text-decoration: none; white-space: nowrap; user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { background: #eef0ef; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { --btn-bg: var(--accent); --btn-fg: #fff; --btn-bd: var(--accent); }
.btn-primary:hover { --btn-bg: var(--accent-2); --btn-bd: var(--accent-2); }
.btn-dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }
.btn-dark:hover { --btn-bg: #111827; }
.btn-ghost { --btn-bg: transparent; --btn-bd: var(--line-strong); }
.btn-ghost:hover { --btn-bg: #f2f4f3; }
.btn-soft { --btn-bg: var(--accent-soft); --btn-fg: var(--accent-2); --btn-bd: transparent; }
.btn-soft:hover { --btn-bg: #e2f1ee; }
.btn-danger { --btn-bg: #fff; --btn-fg: var(--red); --btn-bd: #e7c9c6; }
.btn-danger:hover { --btn-bg: var(--red-soft); }
.btn-danger-solid { --btn-bg: var(--red); --btn-fg: #fff; --btn-bd: var(--red); }
.btn-danger-solid:hover { --btn-bg: #96190f; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; height: 30px; }
.btn-link {
  border: 0; background: none; padding: 0; height: auto; color: var(--accent);
  font-weight: 500; display: inline-flex; align-items: center; gap: 5px;
}
.btn-link:hover { text-decoration: underline; background: none; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--faint); line-height: 1.55; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 8px; padding: 9px 12px; font-size: 14px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: #b3b9be; }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: #7fb3ac; box-shadow: 0 0 0 3px rgba(15, 118, 110, .08);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.select {
  appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5l5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input-group { position: relative; }
.input-group .input { padding-right: 42px; }
.input-group .input-action {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px;
  border-radius: 6px; display: grid; place-items: center;
}
.input-group .input-action:hover { background: var(--surface-2); }
.field-error { color: var(--red); font-size: 12px; }
.field.is-invalid .input, .field.is-invalid .textarea { border-color: var(--red); }

.check { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--accent); }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #d5d9d6; transition: background .15s; }
.switch span::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform .15s; border: 1px solid #d5d9d6;
}
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid #6aa8a0; outline-offset: 2px; }

.segmented {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line); width: 100%;
}
.segmented button {
  flex: 1; height: 32px; border: 0; border-radius: 6px; background: transparent;
  font-size: 12.5px; font-weight: 500; color: var(--muted); transition: background .15s, color .15s;
  white-space: nowrap;
}
.segmented button:hover { color: var(--ink); }
.segmented button.active { background: #fff; color: var(--accent-2); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }

/* ---------------------------------------------------------------- surfaces */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head .h2 { display: flex; align-items: center; gap: 8px; }
.section-head .h2 svg { width: 18px; height: 18px; color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  border-radius: 4px; font-size: 11.5px; font-weight: 500;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.badge-ai { background: #eff4ff; color: #1e40af; border-color: #dbe4f8; }
.badge-plain { background: var(--surface-2); color: var(--muted); }
.badge-done { background: var(--green-soft); color: #166534; border-color: #d5e9da; }
.badge-draft { background: var(--amber-soft); color: #92400e; border-color: #f0e0bf; }
.badge-pending { background: var(--surface-2); color: var(--muted); }
.badge-pos { background: var(--red-soft); color: var(--red); border-color: #f0d4d1; }
.badge-neg { background: var(--blue-soft); color: var(--blue); border-color: #d9e4f7; }
.badge-flag { background: #fff7ed; color: #9a3412; border-color: #f3ddc8; }
.badge-live { background: var(--green-soft); color: #166534; border-color: #d5e9da; }
.badge-live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #15803d; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; }
.dot-teal { background: var(--accent); }
.dot-amber { background: var(--amber); }
.dot-rose { background: var(--red); }
.dot-faint { background: var(--faint); }

/* ---------------------------------------------------------------- toast */
.toast-root {
  position: fixed; z-index: 200; right: 20px; top: 70px; display: flex;
  flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto; min-width: 220px; max-width: min(380px, calc(100vw - 40px));
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 13px; font-size: 13px; box-shadow: var(--shadow-md);
  display: flex; align-items: flex-start; gap: 8px;
}
.toast svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.toast-success svg { color: var(--green); }
.toast-error svg { color: var(--red); }
.toast-info svg { color: var(--blue); }
.toast-msg { flex: 1; min-width: 0; line-height: 1.55; }
.toast-close { margin-left: auto; border: 0; background: none; color: var(--faint); padding: 0 0 0 6px; }
.confirm-msg { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); white-space: pre-wrap; }

/* ---------------------------------------------------------------- modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 150; background: rgba(15, 23, 42, .35);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  width: min(560px, 100%); max-height: min(86dvh, 900px); display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; box-shadow: 0 24px 60px -24px rgba(16, 24, 40, .35);
  overflow: hidden; border: 1px solid var(--line);
}
.modal.modal-wide { width: min(860px, 100%); }
.modal.modal-full { width: min(1040px, 100%); }
.modal-head { padding: 20px 22px 0; display: flex; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 17px; font-weight: 600; line-height: 1.35; }
.modal-head p { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.modal-close {
  margin-left: auto; border: 1px solid var(--line); background: #fff; width: 30px; height: 30px;
  border-radius: 6px; display: grid; place-items: center; color: var(--muted); flex: none;
}
.modal-close:hover { background: var(--surface-2); }
.modal-body { padding: 18px 22px; overflow: auto; }
.modal-foot {
  padding: 14px 22px 18px; display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; border-top: 1px solid var(--line); background: #fff;
}
.modal-foot .left { margin-right: auto; }

/* ---------------------------------------------------------------- tooltip */
.tooltip-root {
  position: fixed; z-index: 300; pointer-events: none; max-width: 280px;
  background: #111827; color: #f9fafb; font-size: 12px; line-height: 1.5;
  padding: 6px 9px; border-radius: 5px;
  opacity: 0; transition: opacity .12s;
}
.tooltip-root.show { opacity: 1; }

/* ---------------------------------------------------------------- login */
.login-page {
  min-height: 100dvh; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #edf3f1;
}
.login-visual {
  position: relative; display: flex; align-items: center; overflow: hidden;
  padding: clamp(48px, 6vw, 120px);
  background-color: #eef4f2;
  background-image:
    linear-gradient(rgba(19, 74, 66, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 74, 66, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  border-right: 1px solid #d6e2de;
}
.login-visual-main { width: 100%; max-width: none; }
.login-label { font-size: 12px; letter-spacing: .18em; color: #6d8a84; }
.login-visual h1 {
  margin: 28px 0 0; font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  font-size: clamp(84px, 9.2vw, 240px); font-weight: 600; line-height: 1;
  letter-spacing: .02em; color: #0e2b27;
}
.login-rule { width: 74px; height: 2px; background: #145c52; margin: 32px 0 24px; }
.login-lead { font-size: 19px; line-height: 1.8; color: #415a54; max-width: 620px; }
.login-meta {
  display: flex; gap: 46px; margin-top: 52px; padding-top: 24px;
  border-top: 1px solid #c9d9d4; max-width: 640px;
}
.login-meta span { display: block; font-size: 11px; letter-spacing: .14em; color: #7f9993; }
.login-meta b { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; color: #163a34; }
.login-ecg { margin-top: 36px; width: min(460px, 56%); color: #8fb5ae; opacity: .9; }
.login-ecg svg { width: 100%; height: 48px; display: block; }
.login-visual-foot {
  position: absolute; left: clamp(48px, 6vw, 120px); bottom: 34px;
  font-size: 11px; color: #89a09a; letter-spacing: .04em;
}
.login-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px clamp(32px, 4vw, 72px); background: #fff; position: relative;
}
.login-form-wrap { width: min(820px, 100%); }
.login-form-head { margin-bottom: 34px; padding-left: 20px; border-left: 3px solid #145c52; }
.login-form-kicker { font-size: 12px; letter-spacing: .18em; color: #7a948e; margin-bottom: 8px; }
.login-form-head h2 { font-size: 44px; font-weight: 600; line-height: 1.2; color: #102723; letter-spacing: .01em; }
.login-form-head p { margin-top: 8px; font-size: 15px; color: #6c817b; }
.login-form { display: flex; flex-direction: column; gap: 22px; }
.login-form .field > label { font-size: 14px; letter-spacing: .03em; color: #3f5550; }
.login-form .input {
  height: 56px; font-size: 16px; border-radius: 6px; border-color: #cbdad5; padding: 0 16px;
}
.login-form .input:focus { border-color: #2e7b70; box-shadow: 0 0 0 3px rgba(20, 92, 82, .08); }
.login-form .btn {
  margin-top: 2px; height: 58px; font-size: 16px; border-radius: 6px;
  background: #104f47; border-color: #104f47; letter-spacing: .1em;
}
.login-form .btn:hover { background: #0b3d37; border-color: #0b3d37; }
.login-foot {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid #e5ece9;
  font-size: 12.5px; color: #83958f; line-height: 1.8;
}
.login-panel-foot {
  position: absolute; bottom: 24px; font-size: 10.5px; color: #a9b7b2; letter-spacing: .08em;
}
.login-error {
  display: none; align-items: flex-start; gap: 7px; padding: 11px 12px; border-radius: 6px;
  background: var(--red-soft); color: var(--red); font-size: 13px; border: 1px solid #f0d4d1;
}
.login-error.show { display: flex; }
.login-error svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.login-card .mobile-brand { display: none; }
@media (max-width: 1080px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual {
    display: block; padding: 38px 24px 28px; border-right: 0;
    border-bottom: 1px solid #d6e2de; background-size: 40px 40px;
  }
  .login-visual h1 { font-size: 56px; margin-top: 18px; }
  .login-rule { margin: 18px 0 14px; width: 44px; }
  .login-lead { font-size: 14px; max-width: none; }
  .login-meta, .login-ecg, .login-visual-foot { display: none; }
  .login-panel { padding: 30px 20px 44px; justify-content: flex-start; }
  .login-form-head { margin-bottom: 26px; }
  .login-form-head h2 { font-size: 30px; }
  .login-panel-foot { position: static; margin-top: 30px; }
}
@media (max-width: 520px) {
  .login-visual { padding-top: 30px; }
  .login-visual h1 { font-size: 48px; }
  .login-form { gap: 18px; }
  .login-form .input { height: 50px; }
  .login-form .btn { height: 52px; }
}

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 60; height: var(--topbar-h);
  background: #fff; border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: min(100% - 40px, var(--maxw)); margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: none; }
.brand-name { font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.brand-sub { display: none; }
.topbar-sep { width: 1px; height: 18px; background: var(--line); }
.topbar-title { font-size: 13px; color: var(--muted); }
.topbar-progress {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px;
  border-radius: 6px; background: var(--surface-2); color: var(--ink-2);
  font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: #e6eeec;
  color: var(--accent-2); display: grid; place-items: center; font-size: 12px; font-weight: 600;
  border: 1px solid #d5e2de;
}
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 6px 3px 3px; border-radius: 6px; border: 1px solid transparent; background: transparent; }
.user-chip:hover { background: var(--surface-2); border-color: var(--line); }
.user-chip .who { text-align: left; line-height: 1.25; }
.user-chip .who b { display: block; font-size: 12.5px; font-weight: 600; }
.user-chip .who span { display: block; font-size: 10.5px; color: var(--faint); }
.menu {
  position: absolute; right: 20px; top: calc(var(--topbar-h) - 4px); z-index: 80;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow-md); padding: 5px; min-width: 180px;
}
.menu button, .menu a {
  display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px;
  border: 0; border-radius: 5px; background: none; font-size: 13px; color: var(--ink);
  text-decoration: none; text-align: left;
}
.menu button:hover, .menu a:hover { background: var(--surface-2); text-decoration: none; }
.menu svg { width: 15px; height: 15px; color: var(--muted); }
.menu .danger { color: var(--red); }
.menu .danger svg { color: var(--red); }
.menu-head { padding: 8px 10px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head b { display: block; font-size: 12.5px; }
.menu-head span { font-size: 11px; color: var(--faint); }

/* ---------------------------------------------------------------- skeleton / empty */
.skeleton {
  border-radius: 8px; background: #eceeed;
  background-image: linear-gradient(90deg, #eceeed 25%, #f5f6f5 37%, #eceeed 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 52px 24px; color: var(--muted);
}
.empty .icon {
  width: 46px; height: 46px; border-radius: 10px; background: var(--surface-2);
  display: grid; place-items: center; color: var(--faint); margin-bottom: 2px;
}
.empty .icon svg { width: 22px; height: 22px; }
.empty h3 { font-size: 15px; color: var(--ink); font-weight: 600; }
.empty p { font-size: 12.5px; max-width: 360px; line-height: 1.7; }

/* ---------------------------------------------------------------- helpers */
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.meta-item .k { font-size: 11px; color: var(--faint); }
.meta-item .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); font-size: 12.5px; }
.kv .v { font-weight: 500; font-size: 13px; text-align: right; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .page { width: min(100% - 28px, var(--maxw)); }
  .topbar-inner { width: min(100% - 24px, var(--maxw)); }
  .show-mobile { display: initial !important; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 620px) {
  :root { --topbar-h: 52px; }
  .page { width: min(100% - 20px, var(--maxw)); }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 92dvh; border-radius: 12px 12px 0 0; }
  .modal-head { padding: 18px 18px 0; }
  .modal-body { padding: 14px 18px; }
  .modal-foot { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
  .toast-root { left: 10px; right: 10px; top: 10px; }
  .toast { min-width: 0; max-width: none; width: 100%; }
  .login-card { padding: 26px 22px; }
  .brand-sub { display: none; }
  .user-chip .who { display: none; }
  .topbar-title { display: none; }
  .topbar-sep { display: none; }
}
