/* ═══════════════════════════════════════════════════════════════
   components.css — Design System Component Definitions
   Auto-extracted from preview/component-*.html
   DO NOT EDIT MANUALLY — regenerate via extract-components-css.mjs
   ═══════════════════════════════════════════════════════════════ */

/* ── Bottom Nav ────────────────────────────────────────────── */
/* @anatomy
   <span class="label">激活态</span> <nav class="bottom-nav" aria-label="主导航"> <a href="#" class="bottom-nav-item active" aria-current="page"> <span class="icon-wrap"><i data-lucide="message-square" class="nav-icon"></i></span> <span class="label-text">聊天</span> </a> <a href="#" class="bottom-nav-item"> <span class="icon-wrap"><i data-lucide="layout" class="nav-icon"></i></span> <span class="label-te...
*/
/* Bottom navigation — extracted to components.css */
    .bottom-nav { flex: 1; display: flex; align-items: center; height: 64px; padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--color-surface); border-top: 1px solid var(--color-border); }
    .bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); min-width: 0; height: 100%; padding: var(--space-2) var(--space-1) var(--space-1); color: var(--color-on-surface-variant); text-decoration: none; cursor: pointer; transition: color var(--duration-fast), background var(--duration-fast); }
    .bottom-nav-item:hover { background: var(--interactive-hover); }
    .bottom-nav-item.active { color: var(--accent); font-weight: var(--font-weight-h4); }
    .bottom-nav-item svg, .bottom-nav-item i { width: 24px; height: 24px; flex-shrink: 0; }
    .bottom-nav-item .label-text { font-size: var(--font-size-caption); line-height: var(--line-height-caption); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .bottom-nav-item.icon-only { padding: var(--space-2) var(--space-1); }
    .bottom-nav-item.icon-only .label-text { display: none; }
    .icon-wrap { position: relative; display: inline-flex; }
    .badge { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--color-error); }

/* ── Button ────────────────────────────────────────────────── */
/* @anatomy
   <button class="btn btn-primary" type="button">发送</button> <button class="btn btn-primary" type="button" disabled>发送</button>
*/
/* Component definitions — extracted to components.css by deterministic script */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; cursor: pointer; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; min-width: var(--size-button-height); height: var(--size-button-height); padding: 0 var(--space-3); border-radius: var(--radius-md); font-family: var(--font-body); font-size: var(--font-size-body); font-weight: var(--font-weight-h4); transition: background var(--duration-fast), border-color var(--duration-fast), opacity var(--duration-fast); flex-shrink: 0; }
  .btn-primary { background: var(--accent); color: var(--accent-foreground); }
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-primary:active { background: var(--accent); filter: brightness(0.96); }
  .btn-primary:disabled { background: var(--color-surface-container); color: var(--color-muted-foreground); cursor: not-allowed; opacity: 0.6; }
  .btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--color-outline); }
  .btn-secondary:hover { background: var(--interactive-hover); }
  .btn-secondary:disabled { background: transparent; color: var(--color-muted-foreground); border-color: var(--color-outline); cursor: not-allowed; opacity: 0.6; }
  .btn-ghost { background: transparent; color: var(--color-on-surface); width: var(--size-button-height); padding: 0; }
  .btn-ghost:hover { background: var(--interactive-hover); }
  .btn-ghost:disabled { background: transparent; color: var(--color-muted-foreground); cursor: not-allowed; opacity: 0.6; }
  .btn-icon { width: var(--size-button-height); min-width: var(--size-button-height); padding: 0; }
  .btn-icon img { display: block; width: var(--size-icon-md); height: var(--size-icon-md); pointer-events: none; }

/* ── Card ──────────────────────────────────────────────────── */
/* @anatomy
   <div class="card card-default"> <div class="card-content"> <div class="card-row"> <div class="card-avatar">二
*/
/* Component definitions — extracted to components.css by deterministic script */
  .card { background: var(--glass-card); color: var(--color-on-surface); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); overflow: hidden; width: 100%; backdrop-filter: blur(var(--backdrop-blur-md)); -webkit-backdrop-filter: blur(var(--backdrop-blur-md)); box-shadow: var(--shadow-2), inset 0 1px 0 var(--glass-border); transition: background var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast); }
  .card:hover { background: rgba(255,255,255,0.88); box-shadow: var(--shadow-3), inset 0 1px 0 var(--glass-border); }
  .card-elevated { box-shadow: var(--shadow-3), inset 0 1px 0 var(--glass-border); }
  .card-selected { border-color: var(--accent); background: rgba(255,237,213,0.78); }
  .card-compact .card-content { padding: var(--space-2); }
  .card-default .card-content { padding: var(--space-3); }
  .card-row { display: flex; align-items: center; gap: var(--space-3); }
  .card-avatar { width: var(--size-avatar); height: var(--size-avatar); border-radius: var(--radius-full); background: var(--color-secondary); color: var(--color-on-secondary-container); display: flex; align-items: center; justify-content: center; font-size: var(--font-size-caption); font-weight: var(--font-weight-h4); flex-shrink: 0; }
  .card-body { flex: 1; min-width: 0; }
  .card-title { font-size: var(--font-size-body); font-weight: var(--font-weight-h4); line-height: var(--line-height-h4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card-subtitle { font-size: var(--font-size-caption); color: var(--color-on-surface-variant); line-height: var(--line-height-caption); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .card-meta { font-size: var(--font-size-caption); color: var(--color-muted-foreground); line-height: var(--line-height-caption); white-space: nowrap; flex-shrink: 0; margin-left: auto; }
  .card-check { width: 20px; height: 20px; border-radius: var(--radius-full); background: var(--accent); color: var(--accent-foreground); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .card-media { width: 100%; height: 120px; background: var(--color-surface-variant); }

/* ── Chip ──────────────────────────────────────────────────── */
/* @anatomy
   <button class="chip chip-outlined chip-md" type="button">数学</button><button class="chip chip-outlined chip-md" type="button">函数</button><button class="chip chip-outlined chip-md" type="button">几何</button>
*/
/* Component definitions — extracted to components.css by deterministic script */
  .chip { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); border: 1px solid transparent; cursor: pointer; font-family: var(--font-body); font-weight: var(--font-weight-body); line-height: 1; white-space: nowrap; flex-shrink: 0; transition: background .15s, border-color .15s, filter .15s; }
  .chip-md { height: 32px; min-width: 32px; padding: 0 var(--space-3); font-size: var(--font-size-caption); border-radius: var(--radius-full); }
  .chip-sm { height: 28px; min-width: 28px; padding: 0 10px; font-size: var(--font-size-caption); border-radius: var(--radius-full); }
  .chip-outlined { background: transparent; border-color: var(--color-outline); color: var(--color-on-surface); }
  .chip-outlined:hover { background: var(--interactive-hover); }
  .chip-filled { background: var(--color-surface-container); border-color: transparent; color: var(--color-on-surface); }
  .chip-filled:hover { filter: brightness(0.92); }
  .chip-selected { background: var(--accent); border-color: var(--accent); color: var(--accent-foreground); }
  .chip-selected:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .chip-close { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 2px; padding: 0; border: none; background: transparent; cursor: pointer; border-radius: var(--radius-full); }
  .chip-close img { display: block; width: 12px; height: 12px; }
  .chip-close:hover { background: rgba(255,255,255,0.2); }

/* ── Input ─────────────────────────────────────────────────── */
/* @anatomy
   <span class="label">尺寸</span> <input class="input input-sm" placeholder="输入问题..."> <input class="input" placeholder="请输入你的姓名"> <input class="input input-lg" placeholder="这里写题目">
*/
/* Component definitions — extracted to components.css by deterministic script */
    .input { display: inline-flex; align-items: center; gap: var(--space-2); width: 140px; min-width: 120px; flex-shrink: 0; height: var(--size-input-height); padding: 0 var(--space-3); background: var(--color-surface); border: 1px solid var(--color-outline); border-radius: var(--radius-md); color: var(--color-on-surface); font-family: inherit; font-size: var(--font-size-body); line-height: var(--line-height-body); transition: background .15s, border-color .15s, outline .15s; box-sizing: border-box; }
    .input::placeholder { color: var(--color-muted-foreground); }
    .input input { flex: 1; min-width: 0; height: 100%; border: none; background: transparent; color: inherit; font: inherit; font-size: inherit; line-height: inherit; outline: none; padding: 0; }
    .input input::placeholder { color: var(--color-muted-foreground); }
    .input:hover:not(:disabled):not(.disabled):not(.error) { background: var(--interactive-hover); border-color: var(--color-primary); }
    .input:focus, .input:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; border-color: var(--color-primary); }
    .input.error { border-color: var(--color-error); }
    .input:disabled, .input.disabled { background: var(--color-surface-container); color: var(--color-muted-foreground); cursor: not-allowed; opacity: 0.65; }
    .input:disabled input, .input.disabled input { cursor: not-allowed; }
    .input-sm { height: 40px; font-size: var(--font-size-caption); }
    .input-lg { width: 280px; height: var(--size-button-height); border-radius: var(--radius-full); }
    .input img { width: var(--size-icon-sm); height: var(--size-icon-sm); flex-shrink: 0; }
    .input button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: none; border-radius: var(--radius-full); background: var(--color-primary); color: var(--color-on-primary); cursor: pointer; transition: background .15s; flex-shrink: 0; }
    .input button:hover { background: var(--color-primary-hover); }
    .helper { font-size: var(--font-size-caption); color: var(--color-error); }

/* ── Modal ─────────────────────────────────────────────────── */
/* @anatomy
   <span class="label">Confirm</span><div class="scene" data-evidence-sample="Confirm dialog"><div class="modal modal-sm"><h2 class="modal-title">确认删除？</h2><p class="modal-desc">离开后将丢失未保存内容</p><div class="modal-actions"><button class="btn btn-secondary" type="button">取消</button><button class="btn btn-danger" type="button">确认</button>
*/
/* Component definitions — extracted to components.css by deterministic script */
  .modal { width: 100%; background: var(--glass-modal); color: var(--color-on-surface); padding: var(--space-4); border-radius: var(--radius-xl); border: 1px solid var(--glass-border); box-shadow: var(--shadow-4), inset 0 1px 0 var(--glass-border); backdrop-filter: blur(var(--backdrop-blur-lg)); -webkit-backdrop-filter: blur(var(--backdrop-blur-lg)); }
  .modal-sm { padding: var(--space-3) var(--space-4); }
  .modal-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: var(--space-3); border-radius: var(--radius-full); background: var(--color-primary-container); color: var(--color-on-primary-container); flex-shrink: 0; }
  .modal-icon.warning { background: var(--color-error-container); color: var(--color-on-error-container); }
  .modal-title { margin: 0 0 var(--space-2) 0; font-size: var(--font-size-h4); font-weight: var(--font-weight-h4); line-height: var(--line-height-h4); color: var(--color-primary); }
  .modal-title.warning { color: var(--color-error); }
  .modal-desc { margin: 0 0 var(--space-4) 0; font-size: var(--font-size-body); font-weight: var(--font-weight-body); line-height: var(--line-height-body); color: var(--color-on-surface-variant); }
  .modal-actions { display: flex; gap: var(--space-3); align-items: center; justify-content: flex-end; flex-wrap: wrap; }
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); height: var(--size-button-height); min-width: var(--size-button-height); padding: 0 var(--space-4); border: none; border-radius: var(--radius-md); font-family: var(--font-body); font-size: var(--font-size-body); font-weight: var(--font-weight-h4); line-height: 1; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s; flex-shrink: 0; }
  .btn-primary { background: var(--accent); color: var(--accent-foreground); }
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-secondary { background: var(--color-surface-container); color: var(--color-on-surface); }
  .btn-secondary:hover { background: var(--color-surface-container-high); }
  .btn-danger { background: var(--color-error); color: var(--color-on-error); }
  .btn-danger:hover { filter: brightness(0.92); }
