/* ============================================================================
   theme-aihot.css - v7.0
   借鉴 KKKKhazix/AIHOT 纸墨设计系统，专为 2027 河北中职单招互动刷题中心定制
   核心基因：暖米白纸底(#faf9f6) / 深石板纸墨(#13191c) · 单一青碧强调 · 发丝线框 · 零渐变
   ============================================================================ */

:root {
  /* Fonts */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Radius scale (严格梯度：5 / 8 / 10 / 12 / 14 / 16 / pill) */
  --radius-mark: 5px;
  --radius-control: 8px;
  --radius-tile: 10px;
  --radius-card: 12px;
  --radius-panel: 14px;
  --radius-sheet: 16px;
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* Shell geometry */
  --sidebar-w: 184px;
  --rail-w: 64px;
  --bar-h: 48px;
  --tabbar-h: 52px;
  --gutter-l: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));

  /* Light theme (AIHOT 招牌暖米白纸底 + 墨青字 + 单一青碧强调) */
  color-scheme: light;
  --bg: #faf9f6;
  --bg-sunk: #f3f3ef;
  --bg-muted: #e9ede9;
  --well: var(--bg-sunk);
  --surface: #ffffff;
  --surface-2: #fdfdfb;
  --raised: #ffffff;
  --sidebar: #fdfdfb;
  --ink: #202a30;
  --ink-2: #303c42;
  --ink-3: #59656b;
  --ink-4: #657176;
  --line: #dfe4e1;
  --line-strong: #cdd6d1;
  --line-soft: #e9ede9;
  --accent: #176b75;
  --accent-ink: #125860;
  --accent-soft: rgba(23, 107, 117, 0.09);
  --accent-softer: rgba(23, 107, 117, 0.05);
  --accent-contrast: #ffffff;
  --note: #526f72;
  --hot: #b3402a;
  --hot-soft: rgba(179, 64, 42, 0.09);
  --amber: #b8873a;
  --amber-ink: #7c5a24;
  --amber-soft: rgba(184, 135, 58, 0.11);
  --ok: #2f7d5c;
  --ok-soft: rgba(47, 125, 92, 0.1);
  --ok-ink: #246549;
  --rank-1: #b3402a;
  --rank-2: #a3642f;
  --rank-3: #96702e;
  --rank-rest: #6b7684;
  --shadow-card: 0 1px 2px rgba(32, 42, 48, 0.028);
  --shadow-card-hover: 0 4px 14px rgba(32, 42, 48, 0.06);
  --shadow-soft: 0 4px 12px rgba(28, 39, 51, 0.06);
  --shadow-thumb: 0 1px 2px rgba(28, 39, 51, 0.1), 0 1px 1px rgba(28, 39, 51, 0.04);
  --shadow-pop: 0 14px 36px rgba(28, 39, 51, 0.14);
  --selection: rgba(23, 107, 117, 0.16);
  --backdrop-scrim: rgba(20, 28, 32, 0.42);

  /* Backward-compatible legacy variable aliases (供所有现有页面无缝复用) */
  --bg-canvas: var(--bg);
  --bg-card: var(--surface);
  --bg-card-hover: var(--surface-2);
  --bg-elevated: var(--bg-sunk);
  --bg-input: var(--bg-sunk);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-3);
  --text-muted: var(--ink-4);
  --border-subtle: var(--line);
  --border-strong: var(--line-strong);
  --accent-blue: var(--accent);
  --accent-blue-hover: var(--accent-ink);
  --accent-blue-soft: var(--accent-soft);
  --accent-blue-text: var(--accent-ink);
  --subj-accent: var(--accent);
  --subj-soft: var(--accent-soft);
  --correct-bg: var(--ok-soft);
  --correct-border: var(--ok);
  --correct-text: var(--ok-ink);
  --wrong-bg: var(--hot-soft);
  --wrong-border: var(--hot);
  --wrong-text: var(--hot);
  --star-color: var(--amber);
  --pill-wrong-bg: var(--hot-soft);
  --pill-right-bg: var(--ok-soft);
  --pill-ink: var(--ink);
  --card-shadow: var(--shadow-card);
  --gold: var(--rank-1);
  --silver: var(--rank-2);
  --bronze: var(--rank-3);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13191c;
  --bg-sunk: #182024;
  --bg-muted: #202a2f;
  --well: rgba(32, 42, 47, 0.62);
  --surface: #1a2226;
  --surface-2: #1f2a2f;
  --raised: #222d33;
  --sidebar: #161e21;
  --ink: #e7eceb;
  --ink-2: #d2dada;
  --ink-3: #a5b0b3;
  --ink-4: #89979d;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.055);
  --accent: #12ccd8;
  --accent-ink: #38e5ec;
  --accent-soft: rgba(18, 204, 216, 0.12);
  --accent-softer: rgba(18, 204, 216, 0.06);
  --accent-contrast: #061417;
  --note: #8fb8a8;
  --hot: #e07259;
  --hot-soft: rgba(224, 114, 89, 0.14);
  --amber: #d8b86f;
  --amber-ink: #e0c482;
  --amber-soft: rgba(216, 184, 111, 0.13);
  --ok: #5fc79a;
  --ok-soft: rgba(95, 199, 154, 0.13);
  --ok-ink: #7fd4ae;
  --rank-1: #e07259;
  --rank-2: #d49063;
  --rank-3: #d8b86f;
  --rank-rest: #8390a2;
  --shadow-card: none;
  --shadow-card-hover: none;
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.36);
  --shadow-thumb: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 18px 44px rgba(0, 0, 0, 0.52);
  --selection: rgba(18, 204, 216, 0.22);
  --backdrop-scrim: rgba(6, 10, 12, 0.68);

  --bg-canvas: var(--bg);
  --bg-card: var(--surface);
  --bg-card-hover: var(--surface-2);
  --bg-elevated: var(--bg-muted);
  --bg-input: var(--bg-sunk);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-3);
  --text-muted: var(--ink-4);
  --border-subtle: var(--line);
  --border-strong: var(--line-strong);
  --accent-blue: var(--accent);
  --accent-blue-hover: var(--accent-ink);
  --accent-blue-soft: var(--accent-soft);
  --accent-blue-text: var(--accent-ink);
  --subj-accent: var(--accent);
  --subj-soft: var(--accent-soft);
  --correct-bg: var(--ok-soft);
  --correct-border: var(--ok);
  --correct-text: var(--ok-ink);
  --wrong-bg: var(--hot-soft);
  --wrong-border: var(--hot);
  --wrong-text: var(--hot);
  --star-color: var(--amber);
  --pill-wrong-bg: var(--hot-soft);
  --pill-right-bg: var(--ok-soft);
  --pill-ink: var(--ink);
  --card-shadow: none;
  --gold: var(--rank-1);
  --silver: var(--rank-2);
  --bronze: var(--rank-3);
}

@media (min-width: 700px) {
  :root { --bar-h: 0px; }
}

/* Base typography & script spacing (W3C CLREQ text-autospace) */
html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-autospace: normal;
}
input, textarea, code, pre, kbd, samp {
  text-autospace: no-autospace;
}
body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
}
::selection { background: var(--selection); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-mark);
}

/* View Transition cross-fade for theme switching */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 200ms;
  animation-timing-function: var(--ease-out-quart);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* Smooth <details> disclosure animation where supported */
@supports (interpolate-size: allow-keywords) {
  details.ai-disclosure { interpolate-size: allow-keywords; }
  details.ai-disclosure::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 220ms var(--ease-out-quart), content-visibility 220ms allow-discrete;
  }
  details.ai-disclosure[open]::details-content { block-size: auto; }
}

/* ============================================================================
   Core AIHOT Surfaces & Primitives
   ============================================================================ */
.ai-card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.ai-card-hover {
  transition: box-shadow 200ms var(--ease-out-quart), border-color 180ms ease, transform 200ms var(--ease-out-quart), background-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .ai-card-hover:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--line-strong);
    transform: translateY(-1px);
  }
}
.ai-well {
  background-color: var(--well);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  border-radius: var(--radius-panel);
}
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  height: 26px;
  padding: 0 0.625rem;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  background-color: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  white-space: nowrap;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}
a.ai-chip:hover, button.ai-chip:hover {
  color: var(--accent-ink);
  border-color: var(--line-strong);
}

/* Primary / Secondary Pill Buttons (AIHOT Controls) */
.ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 9999px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 120ms ease, opacity 150ms ease;
}
.ai-btn:active:not(:disabled) { transform: scale(0.98); }
.ai-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ai-btn-primary {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border: 1px solid transparent;
}
@media (hover: hover) and (pointer: fine) {
  .ai-btn-primary:hover:not(:disabled) { background-color: var(--accent-ink); }
}
.ai-btn-secondary {
  background-color: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
}
@media (hover: hover) and (pointer: fine) {
  .ai-btn-secondary:hover:not(:disabled) { border-color: var(--ink-4); color: var(--ink); }
}
.ai-btn-ghost {
  background-color: var(--bg-sunk);
  color: var(--ink-2);
  border: 1px solid var(--line-soft);
}
.ai-btn-danger {
  background-color: var(--hot);
  color: #ffffff;
  border: 1px solid transparent;
}
.ai-btn-ok {
  background-color: var(--ok);
  color: #ffffff;
  border: 1px solid transparent;
}

/* AIHOT ScoreLabel 双段胶囊评分牌 (标签 | 数值) */
:where(.ai-score-pill) {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 22px;
  padding: 0 0.55rem;
  border-radius: 9999px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line-soft);
  color: var(--ink-3);
  background-color: var(--bg-sunk);
}
.ai-score-pill.tone-ok {
  background-color: var(--ok-soft);
  color: var(--ok-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 25%, transparent);
}
.ai-score-pill.tone-accent {
  background-color: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}
.ai-score-pill.tone-hot {
  background-color: var(--hot-soft);
  color: var(--hot);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot) 25%, transparent);
}
.ai-score-pill.tone-amber {
  background-color: var(--amber-soft);
  color: var(--amber-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 28%, transparent);
}
.ai-score-sep {
  width: 1px;
  height: 9px;
  background-color: currentColor;
  opacity: 0.28;
}
.ai-score-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12px;
}

/* AIHOT Badge */
:where(.ai-badge) {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  height: 20px;
  padding: 0 0.5rem;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background-color: var(--bg-sunk);
  color: var(--ink-3);
  border: 1px solid var(--line-soft);
}
.ai-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background-color: currentColor;
}
.ai-badge.tone-accent { background-color: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.ai-badge.tone-ok     { background-color: var(--ok-soft);     color: var(--ok-ink);     border-color: transparent; }
.ai-badge.tone-amber  { background-color: var(--amber-soft);  color: var(--amber-ink);  border-color: transparent; }
.ai-badge.tone-hot    { background-color: var(--hot-soft);    color: var(--hot);        border-color: transparent; }

/* AIHOT PillTabs (凹陷轨道 + 纯白浮起滑块) */
.ai-pill-track {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 3px;
  border-radius: 9999px;
  background-color: var(--well);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.ai-pill-track.is-inline {
  display: inline-flex;
  width: max-content;
}
.ai-pill-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  border-radius: 9999px;
  background-color: var(--surface);
  box-shadow: var(--shadow-thumb), inset 0 0 0 1px var(--line);
  pointer-events: none;
  z-index: 0;
  transition: transform 280ms var(--ease-out-quart), width 280ms var(--ease-out-quart);
}
:root[data-theme="dark"] .ai-pill-thumb {
  background-color: var(--raised);
  box-shadow: var(--shadow-thumb), inset 0 0 0 1px var(--line-strong);
}
.ai-pill-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 36px;
  padding: 0 0.9rem;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
  user-select: none;
  transition: color 150ms ease, transform 120ms ease;
}
.ai-pill-tab:active { transform: scale(0.98); }
.ai-pill-tab.active {
  color: var(--ink);
  font-weight: 600;
}
@media (hover: none) {
  .ai-pill-tab { height: 40px; }
}
.ai-pill-tab .ai-pill-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-4);
}
.ai-pill-tab.active .ai-pill-count { color: var(--accent-ink); }

/* AIHOT 三态外观开关 (深色 / 跟随系统 / 浅色) */
.ai-theme-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 34px;
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background-color: var(--bg-sunk);
  width: 100%;
}
.ai-theme-switch.is-compact {
  height: 30px;
  width: 104px;
}
.ai-theme-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 9999px;
  border: 1px solid var(--line);
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform 220ms var(--ease-out-quart);
  pointer-events: none;
}
:root[data-theme="dark"] .ai-theme-thumb {
  background-color: var(--raised);
  border-color: var(--line-strong);
}
.ai-theme-opt {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: var(--ink-4);
  transition: color 150ms ease;
}
.ai-theme-opt[aria-checked="true"] { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .ai-theme-opt:hover { color: var(--ink-2); }
}

/* ============================================================================
   AIHOT 3-Breakpoint Adaptive App Shell (Desktop Sidebar / Tablet Rail / Phone Bar + TabBar)
   ============================================================================ */
body.has-ai-shell {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  min-height: 100dvh;
}

.ai-shell-frame {
  display: flex;
  min-height: 100dvh;
  width: 100%;
}

/* Desktop Sidebar (>= 941px) */
.ai-sidebar {
  display: none;
}
.ai-rail {
  display: none;
}

@media (min-width: 700px) and (max-width: 940px) {
  .ai-rail {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--rail-w);
    height: 100dvh;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    background-color: var(--sidebar);
    padding: 18px 6px max(14px, env(safe-area-inset-bottom));
  }
}

@media (min-width: 941px) {
  .ai-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    height: 100dvh;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    background-color: var(--sidebar);
    padding: 20px 12px max(14px, env(safe-area-inset-bottom));
  }
}

.ai-brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 8px;
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.ai-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--accent);
  flex-shrink: 0;
}
.ai-nav-section-title {
  padding: 12px 10px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-4);
}
.ai-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  transition: background-color 150ms ease, color 150ms ease;
}
.ai-nav-item:hover {
  background-color: var(--bg-sunk);
  color: var(--ink);
}
.ai-nav-item.active {
  background-color: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}
.ai-nav-item .ai-nav-ico {
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-nav-item.active .ai-nav-ico { color: var(--accent); }

.ai-rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 52px;
  border-radius: var(--radius-control);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  transition: background-color 150ms ease, color 150ms ease;
}
.ai-rail-item:hover { background-color: var(--bg-sunk); color: var(--ink); }
.ai-rail-item.active {
  background-color: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}
.ai-rail-item.active .ai-nav-ico { color: var(--accent); }

.ai-sidebar-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Main Content Stage inside Shell */
.ai-shell-main {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tabbar-h) + max(16px, env(safe-area-inset-bottom)));
}
@media (min-width: 700px) {
  .ai-shell-main {
    padding-bottom: 28px;
  }
}
.ai-page-container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 12px var(--gutter-r) 24px var(--gutter-l);
}
@media (min-width: 700px) {
  .ai-page-container {
    padding: 26px 32px 32px;
  }
}

/* Mobile Top PhoneBar (< 700px) */
.ai-phone-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter-r) 0 var(--gutter-l);
  background-color: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: box-shadow 180ms ease;
}
.ai-phone-bar.is-scrolled {
  box-shadow: 0 1px 0 var(--line);
}
@media (min-width: 700px) {
  .ai-phone-bar { display: none; }
}

/* Mobile Bottom TabBar (< 700px) */
.ai-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background-color: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 -1px 0 var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.ai-tabbar-grid {
  max-width: 640px;
  margin: 0 auto;
  height: var(--tabbar-h);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ai-tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
  transition: color 140ms ease;
}
.ai-tabbar-item.active {
  color: var(--accent-ink);
  font-weight: 600;
}
@media (min-width: 700px) {
  .ai-tabbar { display: none; }
}

/* Page Heading (Editorial AIHOT Rhythm) */
.ai-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.ai-page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}
@media (min-width: 700px) {
  .ai-page-title { font-size: 26px; }
}
.ai-page-sub {
  font-size: 12.5px;
  color: var(--ink-4);
  margin-top: 4px;
}

/* Native <dialog> AIHOT Sheet Style */
dialog.app-dialog,
dialog.zen-dialog {
  background: transparent;
  border: none;
  padding: 0;
  margin: auto;
  max-width: calc(100vw - 1.5rem);
  max-height: 90dvh;
  color: var(--ink);
  overflow: visible;
}
dialog.app-dialog::backdrop,
dialog.zen-dialog::backdrop {
  background-color: var(--backdrop-scrim);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dialog-card,
.modal-card {
  background-color: var(--surface) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius-sheet) !important;
  box-shadow: var(--shadow-pop) !important;
}
