/* 使用系统字体栈，避免外部字体加载 */
  :root {
    --sidebar: 320px; --topbar: 48px;
    --panel-drawer: 320px; /* 抽屉模式宽度 */
    --radius: 12px; --shadow: 0 2px 8px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,.15);
    /* iOS / macOS 系统配色 */
    --color-primary: #007AFF;
    --color-secondary: #8E8E93;
    --color-accent: #AF52DE;
    --color-background: #F2F2F7;
    --color-surface: #FFFFFF;
    --color-text: #1C1C1E;
    --color-muted: #8E8E93;
    --color-border: #E5E5EA;
    --color-success: #34C759;
    --color-warning: #FF9500;
    --color-error: #FF3B30;
    /* iOS 分组背景 */
    --color-grouped: #F2F2F7;
    --color-card: #FFFFFF;
    /* 选中态填充 */
    --color-blue-tint: rgba(0,122,255,0.12);
    /* Path color alternatives: scheme 3 = #32ADE6/#007AFF/#5856D6; scheme 4 = #6E8FAF/#4F7EA8/#6F6BB3 */
    --path-a-color: #007AFF;
    --path-b-color: #5856D6;
    --path-c-color: #AF52DE;
    --content-rule: rgba(28,28,30,0.72);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  .hidden { display: none !important; }
  body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif; overflow: hidden; height: 100vh; height: 100dvh; background: var(--color-background); color: var(--color-text); }
  .app-shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
  .topbar { height: var(--topbar); min-height: var(--topbar); background: rgba(255,255,255,0.72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--color-border); display: flex; align-items: center; padding: 0 16px; gap: 12px; flex-shrink: 0; }
  .chat-container { flex: 1; overflow-y: auto; padding: 24px; min-height: 0; }
  .input-bar { padding: 16px 24px; background: rgba(255,255,255,0.72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--color-border); flex-shrink: 0; }
  .auth-card { width: 360px; height: 500px; padding: 40px; overflow-y: auto; background: rgba(255,255,255,0.72); border: 1px solid rgba(255,255,255,0.7); border-radius: 18px; box-shadow: 0 8px 28px rgba(0,0,0,.08); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .input-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; min-height: 28px; }
  .input-action-group { display: grid; grid-template-columns: repeat(3, 76px); gap: 8px; align-items: center; }
  .input-action-btn { width: 76px; justify-content: center; }
  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-thumb { background: #C7C7CC; border-radius: 4px; }
  ::-webkit-scrollbar-thumb:hover { background: #AEAEB2; }

  /* === 统一基础：sidebar fixed + transform === */
  .sidebar { background: rgba(242,242,247,0.86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-right: 1px solid rgba(60,60,67,0.12); display: flex; flex-direction: column; position: fixed; left: 0; top: 0; width: var(--panel-drawer); height: 100vh; height: 100dvh; z-index: 100; overflow: hidden; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 16px rgba(0,0,0,0.3); }
  .main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: visible; height: 100vh; height: 100dvh; margin-left: 0; }

  /* === 桌面布局（UA=desktop）：三栏展开 === */
  body.desktop-layout .sidebar { width: var(--sidebar); transform: translateX(0); box-shadow: none; }
  body.desktop-layout .sidebar.collapsed { transform: translateX(-100%); }
  body.desktop-layout .main-area { margin-left: var(--sidebar); transition: margin-left 0.2s ease; }
  body.desktop-layout .main-area.sidebar-closed { margin-left: 0; }
  body.desktop-layout #sidebarToggleBtn { display: none !important; }
  body.desktop-layout #sidebarCloseBtn { display: inline-flex !important; }
  body.desktop-layout.sidebar-closed #sidebarToggleBtn { display: inline-flex !important; }
  body.desktop-layout.sidebar-closed #sidebarCloseBtn { display: none !important; }
  body.desktop-layout .drawer-overlay { display: none !important; }

  /* === 移动布局（UA=mobile）：drawer 模式 === */
  body.mobile-layout #sidebarToggleBtn { display: inline-flex !important; }
  body.mobile-layout #sidebarCloseBtn { display: inline-flex !important; }

  /* no-transition 保护：防止首次加载闪动 */
  .no-transition * { transition: none !important; animation: none !important; }

  /* 移动端体验优化 */
  body.mobile-layout .chat-container { padding: 12px 12px 10px; -webkit-overflow-scrolling: touch; }
  body.mobile-layout .topbar { padding: 0 8px; font-size: 12px; }
  body.mobile-layout .msg { max-width: 100%;; }
  body.mobile-layout .input-bar { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  body.mobile-layout #userInput { font-size: 16px; line-height: 1.45; min-height: calc(16px * 1.45 * 3 + 24px + 2px); max-height: 150px; overflow-y: auto; }
  body.mobile-layout .input-controls { align-items: stretch; min-height: 34px; }
  body.mobile-layout .input-action-group { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  body.mobile-layout .input-action-btn { width: 100%; min-width: 0; padding-left: 8px; padding-right: 8px; }
  body.mobile-layout .control-pill { min-height: 34px; }
  body.mobile-layout #authScreen .auth-card { width: 90%; max-width: 340px; height: auto; min-height: 500px; max-height: min(90vh, 90dvh); padding: 24px 16px; }
  body.mobile-layout #sendBtn { display: inline-flex !important; }
  body.mobile-layout .input-bar button { min-width: 60px; }
  body.mobile-layout #pathBadge { display: none; }
  body.mobile-layout .modal-overlay { align-items: flex-end; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
  body.mobile-layout .modal { width: 100%; max-height: min(92vh, 92dvh); padding: 18px 14px; border-radius: 18px; }
  body.mobile-layout #wizardInput { font-size: 16px; line-height: 1.45; min-height: 132px; max-height: 260px; overflow-y: auto; }
  body.mobile-layout #pathCards { grid-template-columns: 1fr !important; gap: 8px !important; margin-bottom: 12px !important; }
  body.mobile-layout .path-card { text-align: left; padding: 12px 14px; }
  body.mobile-layout .path-card .path-badge { margin-bottom: 4px !important; }
  /* 移动端抽屉模式：面板背景改为不透明，避免透过半透明看到底层内容 */
  body.mobile-layout .sidebar { background: var(--color-grouped); backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.mobile-layout .sidebar-titlebar { background: var(--color-grouped); backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.mobile-layout .sidebar-footer { background: var(--color-grouped); backdrop-filter: none; -webkit-backdrop-filter: none; padding: 8px; }
  body.mobile-layout .input-bar { background: var(--color-grouped); backdrop-filter: none; -webkit-backdrop-filter: none; }

  .path-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,0.72); border: 1px solid currentColor; }
  .path-a { color: var(--path-a-color); }
  .path-b { color: var(--path-b-color); }
  .path-c { color: var(--path-c-color); }
  .path-badge-mini { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; font-size: 10px; line-height: 1; vertical-align: middle; margin-right: 4px; }

  .brand-mark { width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 15px; background: url('./icons/icon-192.png?v=20260628-brand2') center / cover no-repeat; box-shadow: 0 12px 30px rgba(8,22,70,0.18); }

  .msg { max-width: min(90%, 900px); width: fit-content; margin-bottom: 20px; animation: fadeUp .25s ease; }
  .msg.user { margin-left: auto; }
  .msg .bubble { padding: 14px 18px; border-radius: 16px; line-height: 1.7; font-size: 14px; min-width: 60px; }
  .msg.user .bubble { background: var(--color-blue-tint); border: 1px solid rgba(0,122,255,0.18); color: var(--color-primary); border-bottom-right-radius: 4px; }
  .msg.system .bubble { background: rgba(255,255,255,0.72); border: 1px solid rgba(255,255,255,0.7); box-shadow: none; color: var(--color-text); border-bottom-left-radius: 4px; }
  .md-rendered { font-size: 14px; line-height: 1.8; }
  .md-rendered h2 { font-size: 18px; font-weight: 700; margin: 32px 0 20px; color: var(--color-text); border-bottom: 1px solid var(--content-rule); padding-bottom: 8px; }
  .md-rendered h3 { font-size: 15px; font-weight: 600; margin: 24px 0 10px; color: var(--color-text); border-left: 3px solid var(--content-rule); padding-left: 10px; }
  .md-rendered h4 { font-size: 14px; font-weight: 600; margin: 18px 0 8px; color: var(--color-muted); text-transform: uppercase; letter-spacing: .03em; }
  .md-rendered h5 { font-size: 13px; font-weight: 650; margin: 16px 0 8px; color: var(--color-text); }
  .md-rendered p { margin: 8px 0; line-height: 1.8; }
  .md-rendered ul, .md-rendered ol { margin: 12px 0; padding-left: 24px; color: var(--color-text); }
  .md-rendered h3 + ul, .md-rendered h3 + ol { margin-left: 13px; }
  .md-rendered li { margin: 6px 0; line-height: 1.7; }
  .md-rendered li ul { margin: 4px 0; }
  .md-rendered blockquote { border-left: 3px solid var(--content-rule); color: var(--color-muted); margin: 12px 0; font-style: italic; background: var(--color-grouped); padding: 10px 14px; border-radius: 8px; }
  .md-rendered hr { border: none; border-top: 1px solid var(--color-border); margin: 24px 0; }
  .md-rendered table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; color: var(--color-text); border-radius: 6px; overflow: hidden; }
  .md-rendered th, .md-rendered td { border: 1px solid var(--color-border); padding: 8px 12px; text-align: left; }
  .md-rendered th { background: var(--color-background); font-weight: 600; font-size: 12px; }
  .md-rendered tbody tr:nth-child(even) { background: var(--color-background); }
  .md-rendered code { background: var(--color-border); padding: 2px 6px; border-radius: 4px; font-family: 'SF Mono', 'Menlo', 'Consolas', monospace; font-size: 12px; color: var(--color-accent); }
  .md-rendered pre { background: rgba(255,255,255,0.72); color: var(--color-text); border: 1px solid rgba(60,60,67,0.12); padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 12px; margin: 12px 0; white-space: pre-wrap; }
  .md-rendered strong { font-weight: 600; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

  .input-bar textarea { width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; font-family: inherit; resize: none; outline: none; background: var(--color-surface); color: var(--color-text); transition: border-color .15s, box-shadow .15s; }
  #userInput { line-height: 1.45; min-height: calc(14px * 1.45 * 3 + 24px + 2px); }
  .input-bar textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0,122,255,0.15); }

  .sidebar-header { padding: 0; flex-shrink: 0; }
  .sidebar-titlebar { height: var(--topbar); min-height: var(--topbar); padding: 0 14px; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,0.72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .sidebar-brand-title { display: inline-flex; align-items: center; gap: 0; font-size: 16px; font-weight: 700; line-height: 1.2; }
  .brand-path-a { color: var(--path-a-color); }
  .brand-path-b { color: var(--path-b-color); }
  .brand-path-c { color: var(--path-c-color); }
  .sidebar-header-actions { display: flex; align-items: center; gap: 4px; }
  .sidebar-new-btn { width: calc(100% - 20px); margin: 12px 10px 10px; display: flex; align-items: center; justify-content: center; gap: 6px; }
  .session-search-wrap { padding: 0 10px 10px; }
  .session-search { width: 100%; height: 34px; border: 1px solid rgba(60,60,67,0.12); border-radius: 12px; background: rgba(255,255,255,0.58); color: var(--color-text); font: inherit; font-size: 13px; outline: none; padding: 0 12px; transition: border-color .15s, background .15s, box-shadow .15s; }
  .session-search::placeholder { color: var(--color-muted); }
  .session-search:focus { background: rgba(255,255,255,0.82); border-color: rgba(0,122,255,0.30); box-shadow: 0 0 0 3px rgba(0,122,255,0.12); }
  .sidebar-header + .session-list { padding-top: 10px; }
  .sidebar-footer { padding: 16px 14px; border-top: 1px solid var(--color-border); font-size: 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; min-height: 61px; background: rgba(255,255,255,0.72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .sidebar-footer #modelStatus { display: inline-flex; align-items: center; min-height: 28px; cursor: pointer; border-radius: 8px; padding: 0 4px; transition: background .15s, color .15s; }
  .sidebar-footer #modelStatus:hover { background: rgba(118,118,128,0.10); color: var(--color-text) !important; }
  [data-tooltip] { position: relative; }
  [data-tooltip]::after { content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px); max-width: 260px; width: max-content; white-space: pre-line; pointer-events: none; opacity: 0; z-index: 500; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,0.90); color: var(--color-text); border: 1px solid rgba(60,60,67,0.12); box-shadow: 0 8px 24px rgba(0,0,0,0.12); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-size: 11px; line-height: 1.45; font-weight: 500; text-align: left; transition: opacity .15s, transform .15s; }
  [data-tooltip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
  #modelStatus[data-tooltip]::after { left: 0; transform: translateY(4px); }
  #modelStatus[data-tooltip]:hover::after { transform: translateY(0); }
  .sidebar-footer-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  #sidebarCloseBtn { display: none; }
  .sidebar-header h1 { font-size: 16px; font-weight: 700; color: var(--color-text); }
  .session-list { flex: 1; overflow-y: auto; padding: 10px; }
  .session-item { padding: 11px 12px; border-radius: 14px; cursor: pointer; font-size: 13px; margin-bottom: 6px; transition: background .15s, border-color .15s; position: relative; color: var(--color-text); background: rgba(255,255,255,0.58); border: 1px solid rgba(255,255,255,0.7); }
  .session-item:hover { background: rgba(255,255,255,0.82); border-color: rgba(0,122,255,0.18); }
  .session-item.active { background: var(--color-blue-tint); border: 1px solid rgba(0,122,255,0.25); color: var(--color-primary); }
  .session-item .meta { font-size: 11px; line-height: 16px; color: var(--color-muted); margin-top: 2px; }
  .session-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 24px; min-height: 16px; }
  .session-inline-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; height: 16px; }
  .session-item .meta .session-flag { font-weight: 500; color: inherit; }
  .session-item .meta .session-flag-storm { color: inherit; }
  .session-item.active .meta { color: var(--color-primary); opacity: 0.7; }
  .session-item .star-btn, .session-item .rename-btn { width: 16px; height: 16px; border-radius: 50%; border: none; background: transparent; color: var(--color-muted); cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; transform: translateY(1px); }
  .session-item .delete-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; border: none; background: transparent; color: var(--color-muted); cursor: pointer; padding: 0; display: none; align-items: center; justify-content: center; }
  .session-item .star-btn { font-size: 12px; line-height: 16px; opacity: 0.7; }
  .session-item .star-btn.starred { display: flex; color: #FF9F0A; }
  .session-item .rename-btn { font-size: 11px; font-weight: 700; line-height: 16px; opacity: 0.7; }
  .session-item .delete-btn { right: 8px; font-size: 0; line-height: 0; }
  .session-item .delete-btn::before, .session-item .delete-btn::after { content: ''; position: absolute; left: 50%; top: 50%; width: 9px; height: 1.5px; border-radius: 2px; background: currentColor; transform-origin: center; }
  .session-item .delete-btn::before { transform: translate(-50%, -50%) rotate(45deg); }
  .session-item .delete-btn::after { transform: translate(-50%, -50%) rotate(-45deg); }
  .session-item:hover .star-btn, .session-item:hover .rename-btn { opacity: 1; }
  .session-item:hover .delete-btn { display: flex; }
  /* 触摸设备（手机/平板）：始终显示删除按钮 */
  @media (hover: none) {
    .session-item .star-btn, .session-item .rename-btn, .session-item .delete-btn { display: flex; opacity: 0.5; }
    .session-item .star-btn.starred { opacity: 1; }
    .session-item .star-btn:hover { opacity: 1; }
    .session-item .rename-btn:hover { opacity: 1; }
    .session-item .delete-btn:hover { opacity: 1; }
    .session-item.active .star-btn { display: flex; opacity: 1; background: rgba(0,122,255,0.15); }
    .session-item.active .rename-btn { display: flex; opacity: 1; background: rgba(0,122,255,0.15); color: var(--color-primary); }
    .session-item.active .delete-btn { display: flex; opacity: 1; background: rgba(0,122,255,0.15); color: var(--color-primary); }
  }
  .session-item .star-btn:hover { background: rgba(255,159,10,0.14); color: #FF9F0A; }
  .session-item .rename-btn:hover { background: rgba(118,118,128,0.14); color: var(--color-text); }
  .session-item .delete-btn:hover { background: var(--color-error); color: #fff; }

  .tabs { display: flex; align-items: stretch; gap: 4px; margin: 10px; padding: 0; min-height: calc(1.2em + 12px); background: rgba(118,118,128,0.12); border-radius: 10px; font-size: 12px; }
  .tab { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 12px; font-size: 12px; font-weight: 500; color: var(--color-text); cursor: pointer; border-radius: 10px; transition: all .2s; border-bottom: none; }
  .tab.active { color: var(--color-text); font-weight: 600; background: rgba(255,255,255,0.82); box-shadow: none; }

  .btn { padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all .15s; }
  .btn-primary { background: var(--color-primary); color: #fff; }
  .btn-primary:hover { background: #0066D6; }
  .btn-primary:disabled { background: var(--color-border); cursor: not-allowed; }
  .btn-secondary { background: var(--color-border); color: var(--color-text); }
  .btn-secondary:hover { background: #D1D1D6; color: var(--color-text); }
  .btn-ghost { background: transparent; color: var(--color-primary); }
  .btn-ghost:hover { background: var(--color-blue-tint); color: var(--color-primary); }
  .btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
  .btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 8px; }
  .btn-sm, .btn-xs { display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; }
  .control-pill { min-height: 28px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-danger { background: var(--color-error); color: #fff; }
  .btn-danger:hover { background: #D70015; }

  .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 100; display: flex; align-items: center; justify-content: center; }
  .modal { background: var(--color-surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 520px; max-height: 90vh; overflow-y: auto; padding: 32px; }
  .modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; color: var(--color-text); }
  .modal input, .modal textarea, .modal select { width: 100%; border: 1px solid var(--color-border); border-radius: 10px; padding: 7px 10px; font-size: 13px; outline: none; margin-bottom: 0; background: var(--color-surface); color: var(--color-text); transition: border-color .15s, box-shadow .15s; }
  .modal input:focus, .modal textarea:focus, .modal select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0,122,255,0.15); }
  .modal label { font-size: 12px; font-weight: 600; display: block; margin-bottom: 3px; color: var(--color-text); }
  .settings-section { margin-top: 18px; }
  .settings-section:first-child { margin-top: 0; }
  .settings-section-title { margin: 0 0 6px 0; color: var(--color-muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
  .settings-group { background: rgba(255,255,255,0.72); border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,0.7); }
  .settings-row { padding: 12px 14px; border-bottom: 1px solid rgba(60,60,67,0.12); }
  .settings-group input, .settings-group select { background: rgba(255,255,255,0.58); }
  .settings-row:last-child { border-bottom: none; }
  .settings-row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .settings-row-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .diagnostics-summary { margin: 0; white-space: pre-wrap; word-break: break-word; color: var(--color-text); font-family: inherit; font-size: 12px; line-height: 1.6; background: transparent; border: none; padding: 0; }
  .focus-pulse { border-color: var(--color-primary) !important; box-shadow: 0 0 0 3px rgba(0,122,255,0.18) !important; }
  .ready-page { max-width: 820px; margin: 0 auto; padding: 56px 20px; color: var(--color-text); }
  .ready-hero { text-align: center; margin-bottom: 22px; }
  .ready-hero-icon { font-size: 32px; margin-bottom: 10px; }
  .ready-hero-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
  .ready-hero-subtitle { font-size: 12px; color: var(--color-muted); line-height: 1.6; }
  .ready-toggle-row { display: flex; justify-content: center; margin: -8px 0 18px; }
  .ready-toggle-btn { border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.72); color: var(--color-muted); border-radius: 14px; padding: 5px 12px; font-size: 11px; font-weight: 600; font-family: inherit; cursor: pointer; }
  .ready-toggle-btn:hover { background: rgba(255,255,255,0.88); color: var(--color-text); }
  .ready-page.ready-collapsed .ready-section:not(.ready-essential) { display: none; }
  .ready-section { margin-top: 18px; }
  .ready-section-title { margin: 0 0 6px 0; color: var(--color-muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
  .ready-group { background: rgba(255,255,255,0.72); border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,0.7); }
  .ready-row { padding: 11px 14px; border-bottom: 1px solid rgba(60,60,67,0.12); font-size: 13px; line-height: 1.7; }
  .ready-row:last-child { border-bottom: none; }
  .ready-row b { font-weight: 650; }

  .thinking-indicator { display: flex; align-items: center; gap: 10px; color: var(--color-muted); padding: 0; line-height: 1.7; }
  .thinking-dots { display: inline-flex; gap: 5px; }
  .thinking-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--color-primary); opacity: 0.4; animation: pulse 1.2s infinite; }
  .thinking-dots span:nth-child(2) { animation-delay: .2s; }
  .thinking-dots span:nth-child(3) { animation-delay: .4s; }
  .progress-timeline { display: grid; gap: 6px; color: var(--color-text); }
  .progress-step { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.5; }
  .progress-step::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgba(60,60,67,0.24); flex-shrink: 0; margin-top: 6px; }
  .progress-step.done::before { background: var(--color-success); }
  .progress-step.active::before { background: var(--color-primary); box-shadow: 0 0 0 4px rgba(0,122,255,0.12); }
  .progress-step span { font-weight: 600; white-space: nowrap; }
  .progress-step small { color: var(--color-muted); font-size: 12px; }
  .route-explain-card { display: grid; gap: 10px; }
  .route-explain-head { font-size: 13px; font-weight: 700; color: var(--color-primary); padding-bottom: 8px; border-bottom: 1px solid rgba(60,60,67,0.12); }
  .route-explain-row { display: grid; gap: 4px; }
  .route-explain-label { width: fit-content; border-radius: 999px; padding: 2px 8px; background: rgba(0,122,255,0.10); color: var(--color-primary); font-size: 11px; font-weight: 700; }
  .route-explain-label.storm { background: rgba(175,82,222,0.12); color: #AF52DE; }
  .route-explain-row p { margin: 0; color: var(--color-text); font-size: 13px; line-height: 1.7; }

  .drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 90; display: none; opacity: 0; transition: opacity 0.2s ease; }
  .drawer-overlay.show { display: block; opacity: 1; }

  /* Strategy-proposal card overrides */


  .toast { position: fixed; bottom: 20px; right: 20px; padding: 12px 16px; border-radius: 14px; font-size: 13px; z-index: 200; animation: fadeUp .3s; background: rgba(255,255,255,0.86); color: var(--color-text); border: 1px solid rgba(255,255,255,0.7); box-shadow: 0 8px 28px rgba(0,0,0,.08); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .toast.success { border-left: 3px solid var(--color-success); }
  .toast.error { border-left: 3px solid var(--color-error); }
  .toast.info { border-left: 3px solid var(--color-primary); }

  .routing-card { background: rgba(255,255,255,0.72); border: 1px solid rgba(255,255,255,0.7); border-radius: 14px; padding: 16px; margin: 12px 0; }
  .routing-card.routing-status { padding: 10px 12px; }
  .routing-card .tag { font-size: 11px; padding: 3px 8px; border-radius: 12px; background: var(--color-success); color: #fff; display: inline-block; margin: 2px; }

.path-card { border:1px solid rgba(255,255,255,0.7); background:rgba(255,255,255,0.72); border-radius:14px; padding:14px; cursor:pointer; text-align:center; transition:all .15s; }
  .wizard-helper-text { margin: 0 2px 12px; color: var(--color-muted); font-size: 12px; line-height: 1.6; }
  .wizard-path-title { margin-bottom: 0; }
  .path-card:hover { border-color:rgba(0,122,255,0.24); background:rgba(255,255,255,0.88); }
  .path-card.selected { background:rgba(255,255,255,0.88); }
  .path-card.selected#wcA { border-color:var(--path-a-color); box-shadow: inset 0 0 0 1px var(--path-a-color); }
  .path-card.selected#wcB { border-color:var(--path-b-color); box-shadow: inset 0 0 0 1px var(--path-b-color); }
  .path-card.selected#wcC { border-color:var(--path-c-color); box-shadow: inset 0 0 0 1px var(--path-c-color); }

#confirmOverlay { transition: opacity .15s; }
#confirmOverlay.show { display: flex !important; }
