    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg:          #0d1117;
      --surface:     #161b22;
      --surface-2:   #1c2128;
      --surface-3:   #21262d;
      --border:      #30363d;
      --border-2:    #3d444d;
      --accent:      #58a6ff;
      --accent-dim:  rgba(88,166,255,0.12);
      --green:       #3fb950;
      --green-dim:   rgba(63,185,80,0.12);
      --orange:      #e3b341;
      --orange-dim:  rgba(227,179,65,0.12);
      --red:         #f85149;
      --red-dim:     rgba(248,81,73,0.12);
      --muted:       #8b949e;
      --muted-dim:   rgba(139,148,158,0.12);
      --purple:      #bc8cff;
      --purple-dim:  rgba(188,140,255,0.12);
      --pink:        #f778ba;
      --pink-dim:    rgba(247,120,186,0.12);
      --text:        #c9d1d9;
      --text-hi:     #f0f6fc;
      --radius:      6px;
      --font:        ui-monospace, 'SFMono-Regular', 'Cascadia Code', 'Fira Code', Consolas, monospace;
    }

    html, body { height: 100%; }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--font);
      font-size: 13px;
      line-height: 1.5;
      overflow: hidden;
    }

    /* ── Scrollbars ── */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--muted); }

    /* ── Auth Overlay ── */
    .auth-overlay {
      position: fixed; inset: 0; z-index: 200;
      background: var(--bg);
      display: flex; align-items: center; justify-content: center;
      padding: 1rem;
    }
    .auth-overlay.hidden { display: none; }

    .auth-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 2.5rem 3rem;
      width: 100%; max-width: 440px;
      text-align: center;
    }
    .auth-logo {
      font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase;
      color: var(--muted); margin-bottom: 2rem;
    }
    .auth-icon { font-size: 2.25rem; margin-bottom: 1.25rem; }
    .auth-card h2 {
      font-size: 1.25rem; font-weight: 600; color: var(--text-hi);
      margin-bottom: 0.4rem; letter-spacing: 0.02em;
    }
    .auth-subtitle { font-size: 0.8rem; color: var(--muted); margin-bottom: 2rem; }

    .auth-input-group { display: flex; gap: 0.5rem; }
    .auth-input-group input {
      flex: 1; min-width: 0;
      background: var(--bg); border: 1px solid var(--border);
      color: var(--text-hi); font-family: var(--font); font-size: 0.8rem;
      padding: 0.6rem 0.75rem; border-radius: var(--radius);
      outline: none; transition: border-color 0.15s; letter-spacing: 0.02em;
    }
    .auth-input-group input:focus { border-color: var(--accent); }
    .auth-input-group input::placeholder { color: var(--muted); }

    .auth-error {
      margin-top: 0.75rem; font-size: 0.75rem; color: var(--red); text-align: left;
    }
    .auth-error.hidden { display: none; }

    /* ── App Shell ── */
    .app { display: flex; flex-direction: column; height: 100vh; }
    .app.hidden { display: none; }

    /* ── Header ── */
    .header {
      display: flex; align-items: center; gap: 0.75rem;
      padding: 0 1rem; height: 52px; flex-shrink: 0;
      background: var(--surface); border-bottom: 1px solid var(--border);
      position: sticky; top: 0; z-index: 50;
    }
    .header-logo {
      display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0;
    }
    .logo-name {
      font-size: 0.65rem; font-weight: 600; letter-spacing: 0.2em;
      text-transform: uppercase; color: var(--text-hi); white-space: nowrap;
    }
    .conn-indicator {
      display: flex; align-items: center; gap: 0.35rem;
      font-size: 0.65rem; color: var(--muted); white-space: nowrap;
    }
    .conn-dot {
      width: 6px; height: 6px; border-radius: 50%;
      background: var(--muted); flex-shrink: 0; transition: background 0.3s;
    }
    .conn-indicator.connected .conn-dot { background: var(--green); }
    .conn-indicator.offline    .conn-dot { background: var(--red); animation: conn-pulse 1.5s ease-in-out infinite; }
    .conn-indicator.checking   .conn-dot { background: var(--orange); }
    @keyframes conn-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

    .search-wrap {
      flex: 1; position: relative; max-width: 400px; margin: 0 auto;
    }
    .search-icon {
      position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%);
      color: var(--muted); font-size: 1rem; pointer-events: none; line-height: 1;
    }
    #search-input {
      width: 100%;
      background: var(--bg); border: 1px solid var(--border);
      color: var(--text-hi); font-family: var(--font); font-size: 0.78rem;
      padding: 0.45rem 2rem 0.45rem 1.9rem;
      border-radius: var(--radius); outline: none; transition: border-color 0.15s;
    }
    #search-input:focus { border-color: var(--accent); }
    #search-input::placeholder { color: var(--muted); }
    .search-clear {
      position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
      background: none; border: none; color: var(--muted); cursor: pointer;
      font-size: 0.75rem; padding: 0.2rem 0.3rem; border-radius: 3px;
      transition: color 0.15s;
    }
    .search-clear:hover { color: var(--text); }
    .search-clear.hidden { display: none; }

    .header-actions {
      display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
    }

    /* ── Buttons ── */
    .btn {
      display: inline-flex; align-items: center; gap: 0.4rem;
      padding: 0.4rem 0.75rem; border-radius: var(--radius);
      font-family: var(--font); font-size: 0.75rem; font-weight: 500;
      cursor: pointer; border: 1px solid transparent;
      transition: background 0.15s, border-color 0.15s, opacity 0.15s;
      white-space: nowrap; outline: none;
    }
    .btn:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
    .btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .btn-primary {
      background: rgba(88,166,255,0.15); border-color: rgba(88,166,255,0.3); color: var(--accent);
    }
    .btn-primary:hover:not(:disabled) {
      background: rgba(88,166,255,0.25); border-color: var(--accent);
    }
    .btn-ghost {
      background: transparent; border-color: var(--border); color: var(--muted);
    }
    .btn-ghost:hover:not(:disabled) {
      background: var(--surface-2); color: var(--text); border-color: var(--border-2);
    }
    .btn-icon { display: inline-block; transition: transform 0.3s ease; }
    .btn-icon.spinning { animation: spin 0.8s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── Time Filter ── */
    .time-filter {
      display: flex; gap: 2px; background: var(--bg);
      border: 1px solid var(--border); border-radius: var(--radius); padding: 2px;
    }
    .time-filter button {
      padding: 0.3rem 0.6rem; border-radius: 4px;
      background: none; border: none; color: var(--muted);
      font-family: var(--font); font-size: 0.7rem; cursor: pointer;
      transition: background 0.15s, color 0.15s;
    }
    .time-filter button:hover { background: var(--surface-2); color: var(--text); }
    .time-filter button.active { background: var(--surface-2); color: var(--text-hi); }

    /* ── Auto-refresh Toggle ── */
    .auto-refresh-toggle {
      display: flex; align-items: center; gap: 0.4rem;
      cursor: pointer; user-select: none;
      font-size: 0.72rem; color: var(--muted);
    }
    .auto-refresh-toggle input { display: none; }
    .toggle-track {
      width: 28px; height: 16px; border-radius: 8px;
      background: var(--border); position: relative;
      transition: background 0.2s, border-color 0.2s; flex-shrink: 0;
      border: 1px solid transparent;
    }
    .toggle-track::after {
      content: ''; position: absolute;
      top: 1px; left: 1px; width: 12px; height: 12px;
      border-radius: 50%; background: var(--muted);
      transition: transform 0.2s, background 0.2s;
    }
    .auto-refresh-toggle input:checked + .toggle-track {
      background: var(--accent-dim); border-color: var(--accent);
    }
    .auto-refresh-toggle input:checked + .toggle-track::after {
      transform: translateX(12px); background: var(--accent);
    }
    .toggle-label { font-size: 0.7rem; }

    /* ── Sync Widget ── */
    .sync-widget {
      display: flex; align-items: center; gap: 0.4rem;
      font-size: 0.68rem; color: var(--muted); white-space: nowrap;
      padding: 0.25rem 0.5rem; border-radius: var(--radius);
      border: 1px solid transparent;
    }
    .sync-widget.syncing {
      border-color: rgba(88,166,255,0.2);
      background: rgba(88,166,255,0.06);
      color: var(--accent);
    }
    .sync-widget.complete { color: var(--green); }
    .sync-widget.error    { color: var(--red); }
    .sync-progress-bar {
      width: 60px; height: 4px; border-radius: 2px;
      background: var(--border); overflow: hidden; flex-shrink: 0;
    }
    .sync-progress-fill {
      height: 100%; border-radius: 2px;
      background: var(--accent);
      transition: width 0.6s ease;
    }

    /* ── Gmail Offline Banner ── */
    #gmail-banner {
      display: none;
      background: rgba(210, 153, 34, 0.12);
      border-bottom: 1px solid rgba(210, 153, 34, 0.35);
      color: #d4a017;
      font-size: 0.78rem;
      padding: 0.45rem 1rem;
      text-align: center;
    }
    #gmail-banner.visible { display: block; }
    .sync-widget.complete .sync-progress-fill { background: var(--green); }
    .sync-pulse { animation: conn-pulse 1.2s ease-in-out infinite; }

    /* ── Pagination ── */
    .pagination {
      display: flex; align-items: center; justify-content: center;
      gap: 0.4rem; padding: 0.75rem 1rem;
      border-top: 1px solid var(--border);
      background: var(--surface);
    }
    .pagination.hidden { display: none; }
    .page-btn {
      padding: 0.28rem 0.6rem; border-radius: var(--radius);
      background: transparent; border: 1px solid var(--border);
      color: var(--muted); font-family: var(--font); font-size: 0.7rem;
      cursor: pointer; transition: all 0.15s;
    }
    .page-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
    .page-btn:disabled { opacity: 0.35; cursor: default; }
    .page-btn.active { background: var(--accent-dim); border-color: rgba(88,166,255,0.3); color: var(--accent); }
    .page-info { font-size: 0.68rem; color: var(--muted); padding: 0 0.4rem; }

    /* ── Stats Panel ── */
    #stats-panel-overlay {
      position: fixed; inset: 0; z-index: 120;
      background: rgba(0,0,0,0.55); display: flex; align-items: flex-start; justify-content: center;
      padding-top: 5vh;
    }
    #stats-panel-overlay.hidden { display: none; }
    .stats-panel-inner {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 10px; width: 100%; max-width: 700px; max-height: 85vh;
      display: flex; flex-direction: column; overflow: hidden;
      box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    }
    .stats-panel-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border); flex-shrink: 0;
    }
    .stats-panel-title { font-size: 0.78rem; font-weight: 600; color: var(--text-hi); }
    .stats-panel-body { overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; }
    .stats-section-title {
      font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
      color: var(--muted); margin-bottom: 0.6rem;
    }
    .stats-section-header {
      display: flex; align-items: center; gap: 0.35rem; cursor: pointer; user-select: none;
      font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
      color: var(--muted); margin-bottom: 0.6rem;
    }
    .stats-section-header:hover { color: var(--text-hi); }
    .stats-section-header .s-arrow { font-style: normal; font-size: 0.65rem; }
    .stats-task-row {
      display: flex; flex-direction: column; gap: 0.3rem; padding: 0.4rem 0;
      font-size: 0.75rem;
    }
    .stats-task-bar-wrap { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
    .stats-task-bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.4s ease; }
    /* Pulsing dot on Stats button when task active */
    #stats-btn.has-active-task::after {
      content: ''; display: inline-block; width: 6px; height: 6px;
      background: var(--accent, #4f8ef7); border-radius: 50%; margin-left: 4px;
      vertical-align: middle;
      animation: statsPulse 1.2s ease-in-out infinite;
    }
    @keyframes statsPulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.4; transform: scale(0.7); }
    }
    .stats-domain-row {
      display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0;
      font-size: 0.75rem;
    }
    .stats-domain-row[data-domain] { cursor: pointer; border-radius: 4px; padding-left: 0.25rem; padding-right: 0.25rem; margin-left: -0.25rem; margin-right: -0.25rem; }
    .stats-domain-row[data-domain]:hover { background: var(--surface-2); }
    .stats-domain-bar-wrap { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
    .stats-domain-bar { height: 100%; background: var(--accent); border-radius: 2px; }
    .stats-domain-count { font-size: 0.68rem; color: var(--muted); min-width: 36px; text-align: right; }
    .stats-cat-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.5rem;
    }
    .stats-cat-card {
      background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 0.5rem 0.75rem;
    }
    .stats-cat-card-n { font-size: 1.1rem; font-weight: 700; color: var(--text-hi); line-height: 1; }
    .stats-cat-card-label { font-size: 0.62rem; color: var(--muted); margin-top: 0.1rem; }


    /* ── Stats Bar ── */
    .stats-bar {
      display: flex; align-items: stretch; flex-shrink: 0;
      background: var(--surface); border-bottom: 1px solid var(--border);
      overflow-x: auto; padding: 0;
    }
    .stats-bar::-webkit-scrollbar { height: 0; }

    .stat-card {
      display: flex; align-items: center; gap: 0.75rem;
      padding: 0.65rem 1.25rem; border-right: 1px solid var(--border);
      white-space: nowrap; flex-shrink: 0;
    }
    .stat-icon { font-size: 1rem; flex-shrink: 0; }
    .stat-info { display: flex; flex-direction: column; gap: 0.1rem; }
    .stat-value {
      font-size: 1.05rem; font-weight: 700; color: var(--text-hi);
      line-height: 1; letter-spacing: -0.02em;
    }
    .stat-label { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
    .stat-card.unread .stat-value { color: var(--accent); }
    .stat-card.today  .stat-value { color: var(--green); }

    .stats-categories {
      display: flex; align-items: center; gap: 0.4rem;
      padding: 0.5rem 0.75rem; flex: 1; overflow-x: auto; overflow-y: hidden;
      min-width: 0; flex-shrink: 1;
    }
    .stats-categories::-webkit-scrollbar { height: 0; }
    .stats-cat-label {
      font-size: 0.62rem; color: var(--muted); text-transform: uppercase;
      letter-spacing: 0.1em; margin-right: 0.25rem; flex-shrink: 0;
    }
    .tag-bar-pill {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.18rem 0.55rem; border-radius: 2rem;
      font-size: 0.68rem; font-weight: 500; white-space: nowrap; flex-shrink: 0;
      cursor: pointer; border: 1px solid var(--border);
      background: var(--surface-2); color: var(--text);
      transition: background 0.15s, border-color 0.15s, opacity 0.15s;
      user-select: none;
    }
    .tag-bar-pill:hover { background: var(--surface-3); border-color: var(--border-2); }
    .tag-bar-pill.pinned { border-color: var(--border-2); }
    .tag-bar-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
    .tag-bar-count { font-size: 0.62rem; color: var(--muted); }
    .tag-bar-pin-icon { font-size: 0.6rem; opacity: 0.5; transition: opacity 0.1s; }
    .tag-bar-pill:hover .tag-bar-pin-icon { opacity: 1; }

    /* ── Category Badges ── */
    .badge {
      display: inline-flex; align-items: center;
      padding: 0.15rem 0.5rem; border-radius: 2rem;
      font-size: 0.62rem; font-weight: 600; letter-spacing: 0.07em;
      text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
    }
    .badge-URGENT      { color: var(--red);    background: var(--red-dim);    border: 1px solid rgba(248,81,73,0.25); }
    .badge-SECURITY    { color: var(--orange); background: var(--orange-dim); border: 1px solid rgba(227,179,65,0.25); }
    .badge-FINANCIAL   { color: var(--green);  background: var(--green-dim);  border: 1px solid rgba(63,185,80,0.25); }
    .badge-NEWSLETTER  { color: var(--muted);   background: var(--muted-dim);   border: 1px solid rgba(139,148,158,0.2); }
    .badge-PERSONAL    { color: var(--accent);  background: var(--accent-dim);  border: 1px solid rgba(88,166,255,0.25); }
    .badge-ORDERS      { color: var(--purple);  background: var(--purple-dim);  border: 1px solid rgba(188,140,255,0.25); }
    .badge-SOCIAL      { color: var(--pink);    background: var(--pink-dim);    border: 1px solid rgba(247,120,186,0.25); }
    .badge-PROMOTIONS  { color: var(--orange);  background: var(--orange-dim);  border: 1px solid rgba(227,179,65,0.2); }
    .badge-AUTOMATED   { color: var(--muted);   background: var(--muted-dim);   border: 1px solid rgba(139,148,158,0.2); }
    .badge-unknown     { color: var(--muted);   background: var(--muted-dim);   border: 1px solid rgba(139,148,158,0.2); }

    /* ── Smart Mode Toggle ── */
    .mode-toggle {
      display: flex; gap: 2px; background: var(--bg);
      border: 1px solid var(--border); border-radius: var(--radius); padding: 2px;
    }
    .mode-btn {
      padding: 0.28rem 0.6rem; border-radius: 4px;
      background: none; border: none; color: var(--muted);
      font-family: var(--font); font-size: 0.7rem; cursor: pointer;
      transition: background 0.15s, color 0.15s;
    }
    .mode-btn:hover { background: var(--surface-2); color: var(--text); }
    .mode-btn.active { background: var(--accent-dim); color: var(--accent); }
    .mode-btn.smart-active { background: rgba(63,185,80,0.12); color: var(--green); }

    /* ── Priority Dots ── */
    .priority-dot {
      width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    }
    .priority-5 { background: var(--red);    animation: priority-pulse 1.5s ease-in-out infinite; }
    .priority-4 { background: var(--orange); }
    .priority-3 { background: var(--muted);  opacity: 0.55; }
    .priority-2 { background: var(--muted);  opacity: 0.25; }
    .priority-1 { background: var(--muted);  opacity: 0.1; }
    @keyframes priority-pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }

    /* ── Sender Type Badge ── */
    .sender-type {
      font-size: 0.57rem; padding: 0.05rem 0.32rem; border-radius: 2rem;
      font-weight: 500; letter-spacing: 0.04em; text-transform: lowercase; flex-shrink: 0;
    }
    .sender-person        { background: rgba(63,185,80,0.1);   color: var(--green); }
    .sender-newsletter    { background: rgba(139,148,158,0.1); color: var(--muted); }
    .sender-automated     { background: rgba(88,166,255,0.1);  color: var(--accent); }
    .sender-transactional { background: rgba(188,140,255,0.1); color: var(--purple); }

    /* ── AI Summary Row ── */
    .email-ai-row {
      display: flex; align-items: center; gap: 0.4rem;
      min-width: 0; grid-column: 2 / 4; grid-row: 3;
    }
    .email-ai-summary {
      font-size: 0.67rem; color: var(--muted); opacity: 0.7;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      flex: 1; min-width: 0; font-style: italic;
    }
    .action-badge {
      font-size: 0.57rem; padding: 0.05rem 0.35rem; border-radius: 2rem;
      background: rgba(248,81,73,0.12); color: var(--red);
      border: 1px solid rgba(248,81,73,0.25); white-space: nowrap; flex-shrink: 0;
      font-weight: 600; letter-spacing: 0.04em;
    }

    /* Email items in smart mode get a 3rd row for the AI summary */
    .email-item.smart-item {
      grid-template-rows: auto auto auto;
    }

    /* ── Smart Mode List Controls ── */
    .smart-controls {
      display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0;
    }
    .sort-toggle, .action-filter {
      display: inline-flex; align-items: center; gap: 0.25rem;
      padding: 0.2rem 0.5rem; border-radius: var(--radius);
      font-size: 0.67rem; cursor: pointer; white-space: nowrap;
      background: transparent; border: 1px solid var(--border);
      color: var(--muted); transition: background 0.15s, border-color 0.15s, color 0.15s;
      font-family: var(--font);
    }
    .sort-toggle:hover, .action-filter:hover { border-color: var(--border-2); color: var(--text); }
    .sort-toggle.active { background: var(--accent-dim); border-color: rgba(88,166,255,0.3); color: var(--accent); }
    .action-filter.active { background: var(--red-dim); border-color: rgba(248,81,73,0.3); color: var(--red); }

    /* ── AI Loading state ── */
    .ai-loading-msg {
      padding: 0.5rem 1rem; font-size: 0.7rem; color: var(--muted);
      border-bottom: 1px solid var(--border); background: rgba(63,185,80,0.04);
      display: flex; align-items: center; gap: 0.5rem;
    }
    .ai-spinner {
      width: 10px; height: 10px; border: 1.5px solid rgba(63,185,80,0.3);
      border-top-color: var(--green); border-radius: 50%;
      animation: spin 0.8s linear infinite; flex-shrink: 0;
    }

    /* ── Digest Panel ── */
    .digest-panel {
      border-bottom: 1px solid var(--border);
      background: linear-gradient(180deg, rgba(88,166,255,0.04) 0%, transparent 100%);
    }
    .digest-panel.hidden { display: none; }
    .digest-header {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.5rem 1rem; cursor: pointer;
      user-select: none;
    }
    .digest-header:hover { background: var(--surface-2); }
    .digest-title {
      font-size: 0.65rem; font-weight: 600; letter-spacing: 0.12em;
      text-transform: uppercase; color: var(--accent); flex: 1;
    }
    .digest-chevron { font-size: 0.65rem; color: var(--muted); transition: transform 0.2s; }
    .digest-panel.expanded .digest-chevron { transform: rotate(180deg); }
    .digest-refresh {
      font-size: 0.65rem; padding: 0.15rem 0.45rem; border-radius: 3px;
      background: transparent; border: 1px solid var(--border);
      color: var(--muted); cursor: pointer; font-family: var(--font);
      transition: background 0.15s, color 0.15s;
    }
    .digest-refresh:hover { background: var(--surface-2); color: var(--text); }
    .digest-body {
      padding: 0.5rem 0.75rem 0.9rem; border-top: 1px solid var(--border);
      display: flex; flex-direction: column; gap: 0.6rem;
    }
    .digest-panel:not(.expanded) .digest-body { display: none; }
    .digest-summary {
      font-size: 0.75rem; color: var(--text); line-height: 1.6;
      padding: 0.45rem 0.6rem; border-radius: var(--radius);
      background: var(--surface-2); border: 1px solid var(--border);
    }
    .digest-section {
      display: flex; flex-direction: column;
      border: 1px solid var(--border); border-radius: var(--radius);
      overflow: hidden;
    }
    .digest-section-header {
      display: flex; align-items: center; gap: 0.4rem;
      padding: 0.3rem 0.6rem;
      background: var(--surface-2); border-bottom: 1px solid var(--border);
    }
    .digest-section-badge {
      font-size: 0.58rem; font-weight: 700; letter-spacing: 0.08em;
      text-transform: uppercase; padding: 0.1rem 0.4rem; border-radius: 3px;
    }
    .digest-section-badge.action {
      background: rgba(248,81,73,0.15); color: var(--red);
      border: 1px solid rgba(248,81,73,0.3);
    }
    .digest-section-badge.priority {
      background: rgba(227,179,65,0.15); color: var(--orange);
      border: 1px solid rgba(227,179,65,0.3);
    }
    .digest-section-count {
      font-size: 0.63rem; color: var(--muted); margin-left: auto;
    }
    .digest-email-row {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.38rem 0.6rem; cursor: pointer; transition: background 0.1s;
      font-size: 0.73rem; border-bottom: 1px solid rgba(48,54,61,0.6);
    }
    .digest-email-row:last-child { border-bottom: none; }
    .digest-email-row:hover { background: var(--surface-3); }
    .dismiss-btn {
      background: none; border: 1px solid rgba(34,197,94,0.3); border-radius: 4px;
      cursor: pointer; padding: 2px 6px; font-size: 12px; opacity: 0.7;
      transition: opacity 0.2s; margin-left: auto; flex-shrink: 0;
    }
    .dismiss-btn:hover { opacity: 1; background: rgba(34,197,94,0.1); }
    .restore-btn {
      background: none; border: 1px solid rgba(59,130,246,0.3); border-radius: 4px;
      cursor: pointer; padding: 2px 6px; font-size: 12px; opacity: 0.7;
      transition: opacity 0.2s; margin-left: auto; flex-shrink: 0;
    }
    .restore-btn:hover { opacity: 1; background: rgba(59,130,246,0.1); }
    .dismissed-footer {
      display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.6rem;
      font-size: 0.68rem; color: var(--muted);
    }
    .dismissed-count { opacity: 0.7; }
    .dismissed-toggle {
      background: none; border: none; color: var(--accent); cursor: pointer;
      font-size: 0.68rem; padding: 0; text-decoration: underline;
    }
    .dismissed-toggle:hover { opacity: 0.8; }
    .dismissed-row { opacity: 0.6; }
    .dismissed-list { border-top: 1px solid rgba(48,54,61,0.4); }
    .digest-email-dot {
      width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
      background: var(--accent);
    }
    .digest-email-dot.priority { background: var(--orange); }
    .digest-email-from {
      font-weight: 600; color: var(--accent); white-space: nowrap;
      flex-shrink: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis;
    }
    .digest-email-from.priority { color: var(--orange); }
    .digest-email-sep { color: var(--border-2); flex-shrink: 0; font-size: 0.65rem; }
    .digest-email-summary {
      color: var(--text); overflow: hidden; text-overflow: ellipsis;
      white-space: nowrap; flex: 1; min-width: 0;
    }
    .digest-empty {
      font-size: 0.72rem; color: var(--muted); padding: 0.5rem 0.6rem;
      font-style: italic;
    }
    .digest-loading {
      font-size: 0.73rem; color: var(--muted);
      display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0;
    }
    /* .cat-count kept for legacy badge rendering compatibility — no longer used for filter pills */
    .cat-count-num { font-size: 0.68rem; color: var(--muted); }

    /* ── Unread-Only Toggle ── */
    .unread-toggle {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.2rem 0.5rem; border-radius: var(--radius);
      font-size: 0.68rem; cursor: pointer; white-space: nowrap;
      background: transparent; border: 1px solid var(--border);
      color: var(--muted); transition: background 0.15s, border-color 0.15s, color 0.15s;
      font-family: var(--font);
    }
    .unread-toggle:hover { border-color: var(--border-2); color: var(--text); }
    .unread-toggle.active { background: var(--accent-dim); border-color: rgba(88,166,255,0.3); color: var(--accent); }

    /* ── Needs Attention filter (same style as unread-toggle) ── */
    .attention-toggle {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.2rem 0.5rem; border-radius: var(--radius);
      font-size: 0.68rem; cursor: pointer; white-space: nowrap;
      background: transparent; border: 1px solid var(--border);
      color: var(--muted); transition: background 0.15s, border-color 0.15s, color 0.15s;
      font-family: var(--font);
    }
    .attention-toggle:hover { border-color: var(--border-2); color: var(--text); }
    .attention-toggle.active { background: var(--orange-dim); border-color: rgba(227,179,65,0.3); color: var(--orange); }

    /* ── Tier badges ── */
    .tier-badge {
      display: inline-flex; align-items: center;
      font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em;
      padding: 0.05rem 0.3rem; border-radius: 3px;
      border: 1px solid transparent; white-space: nowrap; flex-shrink: 0;
    }
    .tier-4 { background: var(--red-dim);    color: var(--red);    border-color: rgba(248,81,73,0.3); }
    .tier-3 { background: var(--orange-dim); color: var(--orange); border-color: rgba(227,179,65,0.3); }
    .tier-2 { /* no badge shown for background */ }
    .tier-1 { /* no badge shown for noise */ }

    /* Dim noise (tier 1) rows */
    .email-item.tier-noise { opacity: 0.45; }
    .email-item.tier-noise:hover, .email-item.tier-noise.active { opacity: 1; }
    /* Slightly dim background (tier 2) rows */
    .email-item.tier-bg { opacity: 0.75; }
    .email-item.tier-bg:hover, .email-item.tier-bg.active { opacity: 1; }

    /* ── Content Area ── */
    .content { display: flex; flex: 1; overflow: hidden; }

    /* ── Email List ── */
    .email-list-wrap { flex: 1; overflow-y: auto; min-width: 0; }

    .list-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 0.55rem 1rem; border-bottom: 1px solid var(--border);
      position: sticky; top: 0; background: var(--bg); z-index: 1;
    }
    .list-header-title { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.1em; font-weight: 600; }
    .list-header-count { font-size: 0.68rem; color: var(--muted); }

    .email-item {
      display: grid;
      grid-template-columns: 16px 1fr auto;
      grid-template-rows: auto auto;
      gap: 0.15rem 0.6rem;
      padding: 0.65rem 1rem;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      transition: background 0.1s;
    }
    .email-item:hover { background: var(--surface-2); }
    .email-item.active { background: var(--surface-3); }
    .email-item.unread { background: rgba(88,166,255,0.025); }
    .email-item.unread:hover { background: rgba(88,166,255,0.05); }
    .email-item.unread.active { background: rgba(88,166,255,0.07); }

    /* .unread-dot styles moved to Read/Unread Toggle section below */

    .email-top {
      display: flex; align-items: center; gap: 0.45rem;
      min-width: 0; grid-column: 2; grid-row: 1;
    }
    .email-from {
      font-size: 0.78rem; font-weight: 500; color: var(--text-hi);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
    }
    .email-item.unread .email-from { font-weight: 700; }

    .email-date {
      font-size: 0.68rem; color: var(--muted); white-space: nowrap; flex-shrink: 0;
      grid-column: 3; grid-row: 1; align-self: center;
    }
    .email-bottom {
      display: flex; align-items: center; gap: 0.45rem;
      min-width: 0; grid-column: 2 / 4; grid-row: 2;
    }
    .email-subject {
      font-size: 0.74rem; color: var(--muted);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
    }
    .email-item.unread .email-subject { color: var(--text); }

    /* ── Skeletons ── */
    .skeleton-item { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
    .skeleton-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
    .skeleton-row:last-child { margin-bottom: 0; }
    .skel {
      background: var(--surface-3); border-radius: 3px;
      animation: shimmer 1.6s ease-in-out infinite;
    }
    @keyframes shimmer { 0%,100%{opacity:0.4} 50%{opacity:0.85} }
    .skel-dot     { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
    .skel-badge   { width: 55px; height: 15px; border-radius: 2rem; flex-shrink: 0; }
    .skel-from    { height: 11px; flex: 0 0 30%; }
    .skel-date    { height: 10px; width: 36px; margin-left: auto; }
    .skel-subject { height: 10px; flex: 0 0 60%; }

    /* ── Empty / Error States ── */
    .empty-state, .error-state {
      display: flex; flex-direction: column; align-items: center;
      justify-content: center; padding: 4rem 2rem; gap: 0.6rem; text-align: center;
    }
    .state-icon { font-size: 2.25rem; margin-bottom: 0.25rem; }
    .state-title { font-size: 0.875rem; color: var(--text-hi); font-weight: 500; }
    .state-sub { font-size: 0.76rem; color: var(--muted); max-width: 260px; line-height: 1.6; }
    .error-state .state-title { color: var(--red); }

    /* ── Detail Panel ── */
    .detail-panel {
      width: 0; overflow: hidden; flex-shrink: 0;
      transition: width 0.28s ease, border-color 0.28s;
      border-left: 0px solid var(--border);
      position: relative;
    }
    .detail-panel.open { width: var(--detail-panel-width, 460px); border-left-width: 1px; }

    .detail-inner {
      width: var(--detail-panel-width, 460px); height: 100%;
      display: flex; flex-direction: column; overflow: hidden;
    }

    /* Resize handle — left edge of detail panel */
    .detail-resize-handle {
      position: absolute; left: 0; top: 0; height: 100%; width: 5px;
      cursor: col-resize; z-index: 10;
      background: transparent;
      transition: background 0.15s;
    }
    .detail-resize-handle::after {
      content: ''; position: absolute; left: 2px; top: 0; bottom: 0; width: 1px;
      background: var(--border); transition: background 0.15s, width 0.15s;
    }
    .detail-resize-handle:hover::after,
    .detail-resize-handle.dragging::after {
      background: var(--accent, #6c8ebf); width: 3px; left: 1px;
    }
    .detail-header {
      display: flex; align-items: center; gap: 0.65rem;
      padding: 0.65rem 1rem; border-bottom: 1px solid var(--border);
      flex-shrink: 0; background: var(--surface);
    }
    .detail-close {
      width: 24px; height: 24px; border-radius: var(--radius);
      background: none; border: 1px solid var(--border); color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 0.75rem; transition: background 0.15s, color 0.15s; flex-shrink: 0;
    }
    .detail-close:hover { background: var(--surface-2); color: var(--text); }
    .detail-subject-hdr {
      font-size: 0.78rem; font-weight: 600; color: var(--text-hi);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
    }
    .detail-scroll { flex: 1; overflow-y: auto; }
    .detail-meta {
      padding: 0.9rem 1rem; border-bottom: 1px solid var(--border);
      display: flex; flex-direction: column; gap: 0.45rem;
    }
    .meta-row {
      display: grid; grid-template-columns: 46px 1fr; gap: 0.5rem;
      align-items: baseline; font-size: 0.74rem;
    }
    .meta-key { color: var(--muted); text-align: right; font-size: 0.68rem; }
    .meta-val { color: var(--text-hi); word-break: break-all; }
    .detail-body-wrap { padding: 0; overflow: hidden; border-radius: 0 0 8px 8px; }
    .detail-body {
      font-size: 0.76rem; color: var(--text); line-height: 1.75;
      white-space: pre-wrap; word-break: break-word;
    }
    .detail-attachments {
      border-top: 1px solid var(--border);
      padding: 0.55rem 1rem 0.65rem;
    }
    .detail-attachments-label {
      font-size: 0.65rem; color: var(--muted); text-transform: uppercase;
      letter-spacing: 0.05em; margin-bottom: 0.4rem;
    }
    .attachment-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
    .attachment-chip {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.22rem 0.6rem;
      background: var(--surface-2); border: 1px solid var(--border-2);
      border-radius: 12px; font-size: 0.7rem; color: var(--text);
      cursor: pointer; text-decoration: none;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
      max-width: 260px;
    }
    .attachment-chip:hover {
      background: var(--surface-3); border-color: var(--accent); color: var(--text-hi);
    }
    .attachment-chip-name {
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .attachment-chip-size { color: var(--muted); font-size: 0.63rem; flex-shrink: 0; }

    /* Detail skeleton */
    .detail-skel { padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }

    /* ── Draft Editor Panel ── */
    .draft-panel {
      width: 0; overflow: hidden; flex-shrink: 0;
      transition: width 0.28s ease, border-color 0.28s;
      border-left: 0px solid var(--border);
    }
    .draft-panel.open { width: 460px; border-left-width: 1px; }

    .draft-inner {
      width: 460px; height: 100%;
      display: flex; flex-direction: column; overflow: hidden;
    }
    .draft-header {
      display: flex; align-items: center; gap: 0.65rem;
      padding: 0.65rem 1rem; border-bottom: 1px solid var(--border);
      flex-shrink: 0; background: var(--surface);
    }
    .draft-title {
      font-size: 0.78rem; font-weight: 600; color: var(--text-hi); flex: 1;
    }
    .draft-to-row {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.4rem 1rem; border-bottom: 1px solid var(--border);
      flex-shrink: 0; background: var(--surface-2);
      font-size: 0.73rem;
    }
    .draft-to-label { color: var(--muted); flex-shrink: 0; }
    .draft-to-val {
      color: var(--text-hi);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .draft-subject-row {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.35rem 1rem; border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }
    .draft-subject-label { font-size: 0.68rem; color: var(--muted); flex-shrink: 0; }
    #draft-subject {
      flex: 1; background: transparent; border: none; border-bottom: 1px solid transparent;
      color: var(--text-hi); font-family: var(--font); font-size: 0.74rem;
      padding: 0.1rem 0; outline: none; transition: border-color 0.15s;
    }
    #draft-subject:focus { border-bottom-color: var(--accent); }
    #draft-body {
      flex: 1; resize: none; background: var(--bg);
      border: none; border-bottom: 1px solid var(--border);
      color: var(--text); font-family: var(--font); font-size: 0.76rem;
      line-height: 1.75; padding: 0.9rem 1rem; outline: none; overflow-y: auto;
      transition: background 0.15s;
    }
    #draft-body:focus { background: var(--surface-2); }
    .draft-action-bar {
      display: flex; align-items: center; gap: 0.4rem;
      padding: 0.5rem 0.75rem; border-top: 1px solid var(--border);
      flex-shrink: 0; background: var(--surface); flex-wrap: wrap;
    }
    .btn-green {
      background: rgba(63,185,80,0.15); border-color: rgba(63,185,80,0.3); color: var(--green);
    }
    .btn-green:hover:not(:disabled) {
      background: rgba(63,185,80,0.25); border-color: var(--green);
    }
    .draft-status {
      font-size: 0.7rem; color: var(--green);
      display: flex; align-items: center; gap: 0.3rem; white-space: nowrap;
    }
    .draft-status.hidden { display: none; }

    @media (max-width: 768px) {
      .draft-panel {
        position: fixed; inset: 0; z-index: 171;
        width: 0 !important; overflow: hidden;
        border-left: none;
        opacity: 0; transition: opacity 0.25s ease, width 0s 0.25s;
      }
      .draft-panel.open {
        width: 100% !important;
        opacity: 1; transition: opacity 0.25s ease;
      }
      .draft-inner { width: 100%; }
    }

    /* ── Progress Bar ── */
    #refresh-bar {
      height: 2px; background: var(--accent);
      position: fixed; top: 0; left: 0; z-index: 100;
      transition: width 0.25s ease, opacity 0.3s;
      opacity: 0; pointer-events: none;
    }
    #refresh-bar.loading { opacity: 1; }

    /* ── Toasts ── */
    .toasts {
      position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 300;
      display: flex; flex-direction: column; gap: 0.4rem; pointer-events: none;
    }
    .toast {
      display: flex; align-items: center; gap: 0.55rem;
      padding: 0.55rem 0.9rem; border-radius: var(--radius);
      font-size: 0.76rem; color: var(--text-hi);
      background: var(--surface-2); border: 1px solid var(--border-2);
      box-shadow: 0 4px 16px rgba(0,0,0,0.5);
      animation: toast-in 0.2s ease;
      pointer-events: auto; max-width: 300px; cursor: pointer;
    }
    .toast.success { border-color: rgba(63,185,80,0.5); }
    .toast.error   { border-color: rgba(248,81,73,0.5); color: var(--red); }
    .toast.fade-out { animation: toast-out 0.2s ease forwards; }
    @keyframes toast-in  { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
    @keyframes toast-out { to{opacity:0;transform:translateY(6px)} }
    .toast-icon { font-size: 0.85rem; flex-shrink: 0; }

    /* ── Mobile ── */
    @media (max-width: 768px) {
      .header { height: auto; flex-wrap: wrap; padding: 0.5rem; gap: 0.5rem; }
      .header-logo { order: 1; }
      .search-wrap { order: 3; flex-basis: 100%; max-width: 100%; }
      .header-actions { order: 2; margin-left: auto; }
      .time-filter { display: none; }
      .logo-name { font-size: 0.6rem; }
      .toggle-label { display: none; }
      .stat-card { padding: 0.55rem 0.75rem; }

      /* BUG-051: Tag bar as scrollable row on mobile */
      .stats-bar { flex-wrap: wrap; }
      .stats-categories {
        display: flex;
        flex-basis: 100%;
        overflow-x: auto;
        padding: 0.4rem 0.75rem;
        border-top: 1px solid var(--border);
        flex-shrink: 0;
      }
      .stats-categories::-webkit-scrollbar { height: 0; }

      /* BUG-052: Sender-type and action-badge font sizes */
      .sender-type { font-size: 0.65rem; }
      .action-badge { font-size: 0.65rem; }

      /* BUG-053: AI summary readability */
      .email-ai-summary { font-size: 0.72rem; }

      /* BUG-054: Detail close button 44×44 */
      .detail-close { width: 44px; height: 44px; border-radius: var(--radius); }

      /* BUG-055: Ask Rob / Reply buttons */
      .ask-rob-btn { padding: 0.6rem 1rem; font-size: 0.78rem; flex: 1; }
      .detail-action-bar { padding: 0.6rem 1rem; }

      /* BUG-056: Draft action bar safe-area padding */
      .draft-action-bar { padding-bottom: max(0.5rem, env(safe-area-inset-bottom)); }

      /* BUG-057/064: All .btn touch targets */
      .btn { padding: 0.65rem 0.9rem; font-size: 0.78rem; }

      /* BUG-058: Draft body min-height with keyboard open */
      #draft-body { min-height: 80px; }

      /* BUG-059: Email list bottom padding so Rob toggle doesn't overlap */
      .email-list-wrap { padding-bottom: 5rem; }

      /* BUG-060: Rob close button 44×44 */
      .rob-close { width: 44px; height: 44px; }

      /* BUG-061: Rob send button 44×44 */
      .rob-send, .rob-attach { width: 44px; height: 44px; border-radius: var(--radius); }
      #rob-input { min-height: 44px; }

      /* BUG-062: Rob message bubble readability */
      .rob-bubble { font-size: 0.82rem; line-height: 1.6; }

      /* BUG-063: Sort/filter controls touch targets */
      .sort-toggle, .action-filter, .unread-toggle {
        padding: 0.55rem 0.7rem;
        font-size: 0.72rem;
      }

      /* BUG-065/075: Draft panel stacks above detail panel — z-index set in main mobile rule below */

      /* BUG-067: Small label font sizes */
      .stat-label { font-size: 0.68rem; }
      .badge { font-size: 0.65rem; }
      .digest-section-title { font-size: 0.68rem; }

      /* BUG-070: Overscroll behavior on fixed panels */
      .detail-panel.open,
      .draft-panel.open,
      .rob-panel.open { overscroll-behavior: none; }
      .detail-scroll, .rob-messages, #draft-body { overscroll-behavior: contain; }

      /* BUG-073: Visual scroll hint for stats bar */
      .stats-bar {
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
      }

      /* BUG-074: Mode toggle buttons 44px touch target */
      .mode-btn { padding: 0.55rem 0.75rem; font-size: 0.72rem; }

      /* BUG-076: Auto-refresh toggle touch target */
      .auto-refresh-toggle { min-height: 44px; min-width: 44px; justify-content: center; }

      /* BUG-077: Full-screen takeover — solid background, above all floating chrome */
      .detail-panel {
        position: fixed; inset: 0; z-index: 170;
        width: 0 !important; overflow: hidden;
        background: var(--bg);
        border-left: none;
        opacity: 0; transition: opacity 0.25s ease, width 0s 0.25s;
      }
      .detail-panel.open {
        width: 100% !important;
        opacity: 1; transition: opacity 0.25s ease;
      }
      .detail-inner { width: 100%; }

      /* BUG-089: Hide resize handle on mobile — dragging makes no sense */
      .detail-resize-handle { display: none; }
    }
    @media (max-width: 480px) {
      .stat-card { min-width: 80px; padding: 0.5rem 0.6rem; }
      .stat-value { font-size: 0.9rem; }

      /* BUG-050: Header-actions overflow on 320px */
      .header-actions { gap: 0.3rem; }

      /* BUG-066: Auth card padding on 320px */
      .auth-card { padding: 2rem 1.5rem; }

      /* BUG-068: List header flex-wrap in Smart mode */
      .list-header { flex-wrap: wrap; gap: 0.4rem; padding: 0.45rem 0.75rem; }
      .list-header > div { flex-wrap: wrap; gap: 0.3rem; }
    }

    /* ── Rob Chat Widget ─────────────────────────────────────────────── */

    /* Floating toggle button */
    .rob-toggle {
      position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 160;
      display: flex; align-items: center; gap: 0.45rem;
      padding: 0.55rem 1rem; border-radius: 2rem;
      background: var(--accent); color: #fff;
      border: none; cursor: pointer; font-family: var(--font);
      font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
      box-shadow: 0 4px 16px rgba(88,166,255,0.35);
      transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
      animation: rob-pulse 2.8s ease-in-out infinite;
    }
    .rob-toggle:hover:not(.panel-open) {
      background: #79b8ff; box-shadow: 0 6px 22px rgba(88,166,255,0.5);
      transform: translateY(-1px);
    }
    .rob-toggle.panel-open {
      animation: none; background: var(--surface-2);
      color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.3);
      border: 1px solid var(--border);
    }
    .rob-toggle.panel-open:hover { background: var(--surface-3); }
    @keyframes rob-pulse {
      0%,100% { opacity: 1; }
      50%      { opacity: 0.75; }
    }

    /* Unread badge on Rob toggle */
    .rob-badge {
      position: absolute; top: -6px; right: -6px;
      min-width: 18px; height: 18px; padding: 0 4px;
      background: var(--red); color: #fff;
      border-radius: 9px; font-size: 0.65rem; font-weight: 700;
      display: flex; align-items: center; justify-content: center;
      line-height: 1; pointer-events: none;
      border: 2px solid var(--bg);
    }
    .rob-badge.hidden { display: none; }

    /* Attention counter in header */
    .attention-counter {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.3rem 0.65rem; border-radius: var(--radius);
      background: var(--orange-dim); border: 1px solid rgba(227,179,65,0.3);
      color: var(--orange); font-size: 0.72rem; font-weight: 600;
      cursor: pointer; transition: background 0.15s, border-color 0.15s;
      white-space: nowrap;
    }
    .attention-counter:hover { background: rgba(227,179,65,0.2); border-color: var(--orange); }
    .attention-counter.hidden { display: none; }

    /* Chat panel */
    .rob-panel {
      position: fixed; top: 52px; right: 0; bottom: 0; z-index: 1000;
      width: 400px;
      background: var(--surface); border-left: 1px solid var(--border);
      border-radius: 0; display: flex; flex-direction: column;
      box-shadow: -4px 0 20px rgba(0,0,0,0.45);
      transform: translateX(100%); opacity: 0; pointer-events: none;
      transition: transform 0.22s cubic-bezier(0.16,1,0.3,1), opacity 0.2s ease;
    }
    .rob-panel.open {
      transform: translateX(0); opacity: 1; pointer-events: auto;
    }

    /* Panel header */
    .rob-header {
      display: flex; align-items: center; gap: 0.65rem;
      padding: 0.7rem 1rem; border-bottom: 1px solid var(--border);
      flex-shrink: 0; background: var(--surface-2);
      border-radius: 0;
    }
    .rob-avatar {
      width: 28px; height: 28px; border-radius: 50%;
      background: var(--accent-dim); border: 1px solid rgba(88,166,255,0.3);
      display: flex; align-items: center; justify-content: center;
      font-size: 0.8rem; flex-shrink: 0;
    }
    .rob-header-info { flex: 1; min-width: 0; }
    .rob-name { font-size: 0.8rem; font-weight: 600; color: var(--text-hi); line-height: 1.2; }
    .rob-status {
      display: flex; align-items: center; gap: 0.3rem;
      font-size: 0.6rem; color: var(--green); margin-top: 0.1rem;
    }
    .rob-status-dot {
      width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex-shrink: 0;
    }
    .rob-close {
      width: 22px; height: 22px; border-radius: var(--radius);
      background: none; border: 1px solid var(--border); color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 0.68rem; transition: background 0.15s, color 0.15s; flex-shrink: 0;
    }
    .rob-close:hover { background: var(--surface-3); color: var(--text); }
    .rob-memory-btn {
      width: 22px; height: 22px; border-radius: var(--radius);
      background: none; border: 1px solid var(--border); color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 0.7rem; transition: background 0.15s, color 0.15s; flex-shrink: 0;
    }
    .rob-memory-btn:hover { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

    /* Memory panel — overlays the rob-panel */
    .rob-memory-panel {
      position: fixed; top: 52px; right: 0; bottom: 0; z-index: 1001;
      width: 400px; max-height: unset;
      background: var(--surface); border-left: 1px solid var(--border);
      border-radius: 0; display: flex; flex-direction: column;
      box-shadow: -4px 0 20px rgba(0,0,0,0.45);
      transform: translateX(100%); opacity: 0; pointer-events: none;
      transition: transform 0.22s cubic-bezier(0.16,1,0.3,1), opacity 0.2s ease;
    }
    .rob-memory-panel.open {
      transform: translateX(0); opacity: 1; pointer-events: auto;
    }
    .rob-memory-header {
      display: flex; align-items: center; gap: 0.65rem;
      padding: 0.7rem 1rem; border-bottom: 1px solid var(--border);
      flex-shrink: 0; background: var(--surface-2);
      border-radius: 0;
    }
    .rob-memory-title { flex: 1; font-size: 0.8rem; font-weight: 600; color: var(--text-hi); }
    .rob-memory-close {
      width: 22px; height: 22px; border-radius: var(--radius);
      background: none; border: 1px solid var(--border); color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 0.68rem; transition: background 0.15s, color 0.15s; flex-shrink: 0;
    }
    .rob-memory-close:hover { background: var(--surface-3); color: var(--text); }
    .rob-memory-body {
      flex: 1; overflow-y: auto; padding: 0.75rem 1rem;
      display: flex; flex-direction: column; gap: 1rem; min-height: 0;
    }
    .rob-memory-section-title {
      font-size: 0.68rem; font-weight: 600; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem;
    }
    .rob-memory-list { display: flex; flex-direction: column; gap: 0.3rem; }
    .rob-memory-item {
      display: flex; align-items: flex-start; gap: 0.4rem;
      background: var(--surface-2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 0.35rem 0.5rem;
      font-size: 0.75rem; color: var(--text); line-height: 1.4;
    }
    .rob-memory-item-text { flex: 1; min-width: 0; }
    .rob-memory-delete {
      flex-shrink: 0; background: none; border: none; color: var(--muted);
      cursor: pointer; font-size: 0.65rem; padding: 0 0.2rem;
      line-height: 1; transition: color 0.15s;
    }
    .rob-memory-delete:hover { color: var(--red); }
    .rob-memory-empty { font-size: 0.72rem; color: var(--muted); font-style: italic; }
    .rob-memory-add-row {
      display: flex; gap: 0.4rem; margin-top: 0.4rem;
    }
    .rob-memory-add-input {
      flex: 1; min-width: 0;
      background: var(--bg); border: 1px solid var(--border);
      color: var(--text-hi); font-family: var(--font); font-size: 0.73rem;
      padding: 0.3rem 0.5rem; border-radius: var(--radius);
      outline: none; transition: border-color 0.15s;
    }
    .rob-memory-add-input:focus { border-color: var(--accent); }
    .rob-memory-add-input::placeholder { color: var(--muted); }
    .rob-memory-add-btn {
      background: var(--accent); border: none; border-radius: var(--radius);
      color: #fff; cursor: pointer; font-family: var(--font); font-size: 0.72rem;
      padding: 0.3rem 0.65rem; transition: background 0.15s; white-space: nowrap;
    }
    .rob-memory-add-btn:hover { background: #79b8ff; }
    .rob-memory-add-select {
      background: var(--bg); border: 1px solid var(--border);
      color: var(--text); font-family: var(--font); font-size: 0.73rem;
      padding: 0.3rem 0.4rem; border-radius: var(--radius);
      outline: none; cursor: pointer; transition: border-color 0.15s;
    }
    .rob-memory-add-select:focus { border-color: var(--accent); }
    .rob-memory-badge {
      display: inline-block; font-size: 0.6rem; font-weight: 600;
      padding: 0.1rem 0.35rem; border-radius: 3px;
      text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0;
      margin-top: 0.1rem;
    }
    .badge-correction { background: var(--orange-dim); color: var(--orange); }
    .badge-manual     { background: var(--accent-dim);  color: var(--accent); }
    .badge-company    { background: var(--purple-dim);  color: var(--purple); }
    .badge-personal   { background: var(--green-dim);   color: var(--green);  }
    .badge-contact    { background: var(--accent-dim);  color: var(--accent); }
    .badge-general    { background: var(--muted-dim);   color: var(--muted);  }
    .rob-memory-contact-item {
      background: var(--surface-2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 0.4rem 0.5rem;
      font-size: 0.75rem; color: var(--text); line-height: 1.4;
    }
    .rob-memory-contact-name { font-weight: 600; color: var(--text-hi); }
    .rob-memory-contact-email { font-size: 0.68rem; color: var(--muted); }
    .rob-memory-contact-meta { font-size: 0.68rem; color: var(--muted); margin-top: 0.15rem; }
    @media (max-width: 768px) {
      .rob-memory-panel {
        bottom: 0; right: 0; left: 0; top: 0;
        width: 100%; max-height: 100%;
        border-radius: 0; border: none;
      }
    }

    /* Message area */
    .rob-messages {
      flex: 1; overflow-y: auto; padding: 0.75rem;
      display: flex; flex-direction: column; gap: 0.55rem;
      min-height: 0;
    }

    /* Message bubbles */
    .rob-msg { display: flex; flex-direction: column; max-width: 86%; }
    .rob-msg-user  { align-self: flex-end;   align-items: flex-end; }
    .rob-msg-rob   { align-self: flex-start; align-items: flex-start; }

    .rob-bubble {
      padding: 0.5rem 0.75rem; font-size: 0.78rem;
      line-height: 1.55; word-break: break-word; border-radius: 10px;
    }
    .rob-msg-user .rob-bubble {
      background: rgba(88,166,255,0.18); border: 1px solid rgba(88,166,255,0.28);
      color: var(--text-hi); border-radius: 10px 10px 2px 10px;
    }
    .rob-msg-rob .rob-bubble {
      background: var(--surface-2); border: 1px solid var(--border);
      color: var(--text); border-radius: 10px 10px 10px 2px;
    }
    .rob-time {
      font-size: 0.58rem; color: var(--muted); margin-top: 0.18rem; opacity: 0.55;
    }

    /* Feature request card */
    .rob-fr-card {
      margin-top: 0.4rem;
      background: var(--surface-3); border: 1px solid var(--orange);
      border-radius: 8px; padding: 0.6rem 0.75rem;
      font-size: 0.75rem; line-height: 1.6; color: var(--text);
      word-break: break-word; max-width: 100%;
    }
    .rob-fr-header {
      font-size: 0.7rem; font-weight: 600; color: var(--orange);
      letter-spacing: 0.03em; margin-bottom: 0.35rem;
    }
    .rob-fr-body {
      white-space: pre-wrap; color: var(--text);
    }
    .rob-fr-copy {
      display: flex; align-items: center; gap: 0.3rem;
      margin-top: 0.5rem; padding: 0.3rem 0.6rem;
      background: transparent; border: 1px solid var(--border-2);
      border-radius: var(--radius); cursor: pointer;
      font-family: var(--font); font-size: 0.68rem; color: var(--muted);
      transition: background 0.15s, color 0.15s, border-color 0.15s;
      width: fit-content;
    }
    .rob-fr-copy:hover { background: var(--orange-dim); color: var(--orange); border-color: var(--orange); }
    .rob-fr-copy.copied { color: var(--green); border-color: var(--green); }

    /* Typing indicator (lives below messages, above input) */
    .rob-typing {
      flex-shrink: 0; display: flex; align-items: center; gap: 4px;
      padding: 0.45rem 0.85rem;
      background: var(--surface-2); border: 1px solid var(--border);
      border-radius: 10px 10px 10px 2px;
      margin: 0 0.75rem 0.3rem; align-self: flex-start; width: fit-content;
    }
    .rob-typing.hidden { display: none; }
    .rob-typing span {
      width: 5px; height: 5px; border-radius: 50%; background: var(--muted);
      animation: rob-dot 1.2s ease-in-out infinite;
    }
    .rob-typing span:nth-child(2) { animation-delay: 0.2s; }
    .rob-typing span:nth-child(3) { animation-delay: 0.4s; }
    @keyframes rob-dot {
      0%,60%,100% { transform: translateY(0);    opacity: 0.35; }
      30%          { transform: translateY(-4px); opacity: 1; }
    }

    /* Input area */
    .rob-input-area {
      display: flex; align-items: flex-end; gap: 0.5rem;
      padding: 0.55rem 0.75rem; border-top: 1px solid var(--border);
      flex-shrink: 0; background: var(--surface-2);
      border-radius: 0;
    }
    #rob-input {
      flex: 1; min-width: 0; min-height: 32px; max-height: 80px;
      background: var(--bg); border: 1px solid var(--border);
      color: var(--text-hi); font-family: var(--font); font-size: 0.77rem;
      padding: 0.42rem 0.65rem; border-radius: var(--radius);
      outline: none; resize: none; line-height: 1.45; overflow-y: auto;
      transition: border-color 0.15s;
    }
    #rob-input:focus { border-color: var(--accent); }
    #rob-input::placeholder { color: var(--muted); }
    #rob-input:disabled { opacity: 0.5; cursor: not-allowed; }
    .rob-send {
      width: 32px; height: 32px; flex-shrink: 0;
      background: var(--accent); border: none; border-radius: var(--radius);
      color: #fff; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.9rem; transition: background 0.15s;
    }
    .rob-send:hover:not(:disabled) { background: #79b8ff; }
    .rob-send:disabled { opacity: 0.45; cursor: not-allowed; }
    .rob-attach {
      width: 32px; height: 32px; flex-shrink: 0;
      background: transparent; border: 1px solid var(--border); border-radius: var(--radius);
      color: var(--text-hi); cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 1rem; transition: border-color 0.15s, opacity 0.15s;
    }
    .rob-attach:hover:not(:disabled) { border-color: var(--accent); }
    .rob-attach:disabled { opacity: 0.45; cursor: not-allowed; }
    .rob-img-preview {
      padding: 0.4rem 0.75rem 0.1rem; background: var(--surface-2);
      display: flex; align-items: flex-start; gap: 0.5rem; flex-wrap: wrap;
    }
    .rob-img-preview.hidden { display: none; }
    .rob-img-thumb {
      position: relative; display: inline-flex; flex-direction: column; align-items: flex-end; gap: 0.15rem;
    }
    .rob-img-thumb img {
      max-height: 72px; max-width: 100px; border-radius: 6px;
      border: 1px solid var(--border); object-fit: cover; display: block;
    }
    .rob-img-clear {
      background: none; border: none; cursor: pointer; color: var(--muted);
      font-size: 0.75rem; padding: 0; line-height: 1;
    }
    .rob-img-clear:hover { color: var(--text-hi); }
    .rob-img-clear-all {
      background: none; border: none; cursor: pointer; color: var(--muted);
      font-size: 0.7rem; padding: 0.1rem 0; align-self: center; white-space: nowrap;
      text-decoration: underline;
    }
    .rob-img-clear-all:hover { color: var(--text-hi); }
    .rob-attached-img {
      max-width: 100%; max-height: 200px; border-radius: 6px;
      border: 1px solid var(--border); display: block; margin-top: 0.35rem;
    }

    /* Detail panel "Ask Rob" action bar */
    .detail-action-bar {
      display: flex; gap: 0.5rem; flex-wrap: wrap;
      padding: 0.55rem 1rem; border-bottom: 1px solid var(--border);
    }
    .ask-rob-btn { font-size: 0.72rem; padding: 0.28rem 0.65rem; min-width: 120px; justify-content: center; }

    /* Toasts: push above Rob toggle button */
    .toasts { bottom: 5.5rem; }

    /* Mobile: Rob panel goes full-screen */
    @media (max-width: 768px) {
      .rob-panel {
        top: 0; bottom: 0; right: 0; left: 0;
        width: 100%; border: none;
      }
      .rob-memory-panel { top: 0; left: 0; width: 100%; border: none; }
      .rob-input-area  { padding-bottom: max(0.55rem, env(safe-area-inset-bottom)); }
      .rob-toggle      { bottom: 1rem; right: 1rem; }
      .toasts          { bottom: 5rem; right: 0.75rem; }
    }

    /* ── Subscriptions Panel ─────────────────────────────────────────── */
    .subs-panel {
      position: fixed; inset: 0; z-index: 180;
      background: rgba(13,17,23,0.75); backdrop-filter: blur(4px);
      display: flex; align-items: flex-start; justify-content: flex-end;
      opacity: 0; pointer-events: none;
      transition: opacity 0.22s ease;
    }
    .subs-panel.open { opacity: 1; pointer-events: auto; }

    .subs-inner {
      width: 480px; max-width: 100%; height: 100%;
      background: var(--surface); border-left: 1px solid var(--border);
      display: flex; flex-direction: column;
      transform: translateX(24px);
      transition: transform 0.22s cubic-bezier(0.16,1,0.3,1);
    }
    .subs-panel.open .subs-inner { transform: translateX(0); }

    .subs-header {
      display: flex; align-items: center; gap: 0.65rem;
      padding: 0.65rem 1rem; border-bottom: 1px solid var(--border);
      flex-shrink: 0; background: var(--surface-2);
    }
    .subs-title {
      font-size: 0.78rem; font-weight: 600; color: var(--text-hi); flex: 1;
    }
    .subs-close {
      width: 24px; height: 24px; border-radius: var(--radius);
      background: none; border: 1px solid var(--border); color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 0.75rem; transition: background 0.15s, color 0.15s; flex-shrink: 0;
    }
    .subs-close:hover { background: var(--surface-3); color: var(--text); }

    .subs-body { flex: 1; overflow-y: auto; }

    .subs-meta {
      padding: 0.55rem 1rem; border-bottom: 1px solid var(--border);
      font-size: 0.68rem; color: var(--muted);
      display: flex; align-items: center; justify-content: space-between;
    }
    .subs-refresh-btn {
      background: none; border: 1px solid var(--border); color: var(--muted);
      font-family: var(--font); font-size: 0.68rem; cursor: pointer;
      padding: 0.2rem 0.5rem; border-radius: var(--radius);
      transition: background 0.15s, color 0.15s;
    }
    .subs-refresh-btn:hover { background: var(--surface-2); color: var(--text); }

    .subs-item {
      display: grid; grid-template-columns: 1fr auto;
      gap: 0.3rem 0.75rem; align-items: center;
      padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
      transition: background 0.1s;
    }
    .subs-item:hover { background: var(--surface-2); }

    .subs-sender-name {
      font-size: 0.78rem; font-weight: 500; color: var(--text-hi);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .subs-sender-email {
      font-size: 0.67rem; color: var(--muted);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; grid-column: 1;
    }
    .subs-meta-row {
      font-size: 0.64rem; color: var(--muted); grid-column: 1;
      display: flex; align-items: center; gap: 0.5rem;
    }
    .subs-unsub-btn {
      grid-column: 2; grid-row: 1 / 4; align-self: center;
      padding: 0.35rem 0.7rem; border-radius: var(--radius);
      font-family: var(--font); font-size: 0.7rem; font-weight: 500;
      cursor: pointer; border: 1px solid transparent;
      transition: background 0.15s, border-color 0.15s, opacity 0.15s;
      white-space: nowrap; min-height: 44px;
    }
    .subs-unsub-btn.one-click {
      background: rgba(63,185,80,0.12); border-color: rgba(63,185,80,0.3); color: var(--green);
    }
    .subs-unsub-btn.one-click:hover { background: rgba(63,185,80,0.22); border-color: var(--green); }
    .subs-unsub-btn.link-btn {
      background: var(--muted-dim); border-color: rgba(139,148,158,0.25); color: var(--muted);
    }
    .subs-unsub-btn.link-btn:hover { background: rgba(139,148,158,0.2); color: var(--text); }
    .subs-unsub-btn.mailto-btn {
      background: var(--accent-dim); border-color: rgba(88,166,255,0.25); color: var(--accent);
    }
    .subs-unsub-btn.mailto-btn:hover { background: rgba(88,166,255,0.2); }
    .subs-unsub-btn:disabled { opacity: 0.45; cursor: not-allowed; }

    .subs-empty, .subs-loading {
      display: flex; flex-direction: column; align-items: center;
      justify-content: center; padding: 3rem 2rem; gap: 0.5rem; text-align: center;
    }
    .subs-loading { font-size: 0.78rem; color: var(--muted); gap: 0.75rem; }

    .subs-item-btns {
      grid-column: 2; grid-row: 1 / 4; align-self: center;
      display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-end;
    }
    .subs-keep-btn {
      padding: 0.25rem 0.55rem; border-radius: var(--radius);
      font-family: var(--font); font-size: 0.65rem; font-weight: 500;
      cursor: pointer; border: 1px solid rgba(139,148,158,0.25);
      background: var(--muted-dim); color: var(--muted);
      transition: background 0.15s, color 0.15s, border-color 0.15s;
      white-space: nowrap;
    }
    .subs-keep-btn:hover { background: rgba(63,185,80,0.12); border-color: rgba(63,185,80,0.3); color: var(--green); }
    .subs-remove-btn {
      padding: 0.25rem 0.5rem; border-radius: var(--radius);
      font-family: var(--font); font-size: 0.65rem; font-weight: 500;
      cursor: pointer; border: 1px solid rgba(139,148,158,0.2);
      background: none; color: var(--muted);
      transition: background 0.15s, color 0.15s;
      white-space: nowrap;
    }
    .subs-remove-btn:hover { background: rgba(248,81,73,0.12); border-color: rgba(248,81,73,0.3); color: var(--red); }
    .subs-section-heading {
      padding: 10px 16px 4px; font-size: 0.68rem; color: var(--muted);
      font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
      border-top: 1px solid var(--border); margin-top: 4px;
    }
    .subs-section-heading.kept { color: #3fb950; }
    .subs-section-heading.unsubscribed { color: #f85149; }
    .subs-item.kept-item { opacity: 0.8; background: rgba(63,185,80,0.03); }
    .subs-item.unsubscribed-item { opacity: 0.5; background: rgba(248,81,73,0.03); }
    .subs-item.unsubscribed-item .subs-sender-name { text-decoration: line-through; }
    .subs-undo-btn {
      padding: 0.25rem 0.5rem; border-radius: var(--radius);
      font-family: var(--font); font-size: 0.65rem; font-weight: 500;
      cursor: pointer; border: 1px solid rgba(139,148,158,0.2);
      background: none; color: var(--muted);
      transition: background 0.15s, color 0.15s;
      white-space: nowrap;
    }
    .subs-undo-btn:hover { background: rgba(88,166,255,0.12); border-color: rgba(88,166,255,0.3); color: var(--accent); }
    .subs-violation-count {
      font-size: 0.62rem; color: #f85149; white-space: nowrap;
      display: flex; align-items: center; gap: 0.25rem;
    }

    /* Violation badge on email list items */
    .violation-badge {
      font-size: 0.56rem; padding: 0.04rem 0.28rem; border-radius: 2rem;
      background: rgba(248,81,73,0.12); color: #f85149;
      border: 1px solid rgba(248,81,73,0.3); white-space: nowrap; flex-shrink: 0;
      font-weight: 500; letter-spacing: 0.03em; cursor: pointer;
    }
    .violation-badge:hover { background: rgba(248,81,73,0.22); }
    .subs-footer {
      padding: 0.5rem 1rem; border-top: 1px solid var(--border);
      font-size: 0.65rem; color: var(--muted); flex-shrink: 0;
      display: flex; align-items: center; gap: 0.5rem;
    }

    /* ── Tags Panel ────────────────────────────────────────────────────── */
    .tags-panel {
      position: fixed; inset: 0; z-index: 180;
      background: rgba(13,17,23,0.75); backdrop-filter: blur(4px);
      display: flex; align-items: flex-start; justify-content: flex-end;
      opacity: 0; pointer-events: none;
      transition: opacity 0.22s ease;
    }
    .tags-panel.open { opacity: 1; pointer-events: auto; }

    .tags-inner {
      width: 420px; max-width: 100%; height: 100%;
      background: var(--surface); border-left: 1px solid var(--border);
      display: flex; flex-direction: column;
      transform: translateX(24px);
      transition: transform 0.22s cubic-bezier(0.16,1,0.3,1);
    }
    .tags-panel.open .tags-inner { transform: translateX(0); }

    .tags-header {
      display: flex; align-items: center; gap: 0.65rem;
      padding: 0.65rem 1rem; border-bottom: 1px solid var(--border);
      flex-shrink: 0; background: var(--surface-2);
    }
    .tags-title { font-size: 0.78rem; font-weight: 600; color: var(--text-hi); flex: 1; }
    .tags-close {
      width: 24px; height: 24px; border-radius: var(--radius);
      background: none; border: 1px solid var(--border); color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 0.75rem; transition: background 0.15s, color 0.15s; flex-shrink: 0;
    }
    .tags-close:hover { background: var(--surface-3); color: var(--text); }

    .tags-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

    /* Create new tag form */
    .tag-create-form {
      padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
      display: flex; flex-direction: column; gap: 0.5rem; flex-shrink: 0;
    }
    .tag-create-title {
      font-size: 0.68rem; font-weight: 600; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.08em;
    }
    .tag-create-row { display: flex; gap: 0.5rem; align-items: center; }
    .tag-name-input {
      flex: 1; background: var(--bg); border: 1px solid var(--border);
      color: var(--text-hi); font-family: var(--font); font-size: 0.78rem;
      padding: 0.4rem 0.6rem; border-radius: var(--radius);
      outline: none; transition: border-color 0.15s;
    }
    .tag-name-input:focus { border-color: var(--accent); }
    .tag-name-input::placeholder { color: var(--muted); }
    .tag-icon-input {
      width: 36px; background: var(--bg); border: 1px solid var(--border);
      color: var(--text-hi); font-size: 0.85rem; text-align: center;
      padding: 0.35rem 0.3rem; border-radius: var(--radius);
      outline: none; transition: border-color 0.15s; flex-shrink: 0;
    }
    .tag-icon-input:focus { border-color: var(--accent); }
    .tag-create-btn {
      padding: 0.4rem 0.75rem; border-radius: var(--radius);
      background: var(--accent-dim); border: 1px solid rgba(88,166,255,0.3);
      color: var(--accent); font-family: var(--font); font-size: 0.72rem;
      font-weight: 500; cursor: pointer; white-space: nowrap;
      transition: background 0.15s, border-color 0.15s; flex-shrink: 0;
    }
    .tag-create-btn:hover { background: rgba(88,166,255,0.2); border-color: var(--accent); }
    .tag-create-btn:disabled { opacity: 0.5; cursor: not-allowed; }

    /* Color swatch picker */
    .tag-color-row {
      display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
    }
    .tag-color-label { font-size: 0.66rem; color: var(--muted); flex-shrink: 0; }
    .tag-swatch {
      width: 18px; height: 18px; border-radius: 3px;
      cursor: pointer; border: 2px solid transparent;
      transition: border-color 0.12s, transform 0.12s; flex-shrink: 0;
    }
    .tag-swatch:hover { transform: scale(1.2); }
    .tag-swatch.selected { border-color: var(--text-hi); transform: scale(1.15); }

    /* Tag list */
    .tags-list-meta {
      padding: 0.45rem 1rem; border-bottom: 1px solid var(--border);
      font-size: 0.67rem; color: var(--muted);
    }
    .tag-item {
      display: flex; align-items: center; gap: 0.6rem;
      padding: 0.6rem 1rem; border-bottom: 1px solid var(--border);
      transition: background 0.1s;
    }
    .tag-item:hover { background: var(--surface-2); }
    .tag-item-dot {
      width: 10px; height: 10px; border-radius: 50%;
      flex-shrink: 0; border: 1px solid var(--border-2);
    }
    .tag-item-icon { font-size: 0.85rem; flex-shrink: 0; }
    .tag-item-name {
      flex: 1; font-size: 0.78rem; color: var(--text);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .tag-item-name-input {
      flex: 1; background: var(--bg); border: 1px solid var(--accent);
      color: var(--text-hi); font-family: var(--font); font-size: 0.78rem;
      padding: 0.15rem 0.4rem; border-radius: var(--radius);
      outline: none;
    }
    .tag-item-count {
      font-size: 0.65rem; color: var(--muted); flex-shrink: 0;
    }
    .tag-item-filter-btn {
      padding: 0.2rem 0.45rem; border-radius: var(--radius);
      background: var(--surface-3); border: 1px solid var(--border);
      color: var(--muted); font-family: var(--font); font-size: 0.66rem;
      cursor: pointer; white-space: nowrap; flex-shrink: 0;
      transition: background 0.12s, color 0.12s;
      min-height: 28px;
    }
    .tag-item-filter-btn:hover { background: var(--accent-dim); color: var(--accent); }
    .tag-item-filter-btn.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(88,166,255,0.3); }
    .tag-item-edit {
      width: 24px; height: 24px; border-radius: var(--radius);
      background: none; border: 1px solid transparent; color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 0.7rem; transition: background 0.12s, color 0.12s;
      flex-shrink: 0; min-height: 28px; min-width: 28px;
    }
    .tag-item-edit:hover { background: var(--surface-3); color: var(--text); }
    .tag-item-delete {
      width: 24px; height: 24px; border-radius: var(--radius);
      background: none; border: 1px solid transparent; color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 0.7rem; transition: background 0.12s, color 0.12s, border-color 0.12s;
      flex-shrink: 0; min-height: 28px; min-width: 28px;
    }
    .tag-item-delete:hover { background: var(--red-dim); color: var(--red); border-color: rgba(248,81,73,0.3); }
    .tag-item-save {
      padding: 0.15rem 0.4rem; border-radius: var(--radius);
      background: var(--accent-dim); border: 1px solid rgba(88,166,255,0.3);
      color: var(--accent); font-family: var(--font); font-size: 0.66rem;
      cursor: pointer; flex-shrink: 0;
    }

    .tags-empty {
      display: flex; flex-direction: column; align-items: center;
      justify-content: center; padding: 2.5rem 2rem; gap: 0.5rem; text-align: center;
      flex: 1;
    }

    /* Saved filters section */
    .saved-filters-section {
      border-top: 1px solid var(--border); flex-shrink: 0;
    }
    .saved-filters-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 0.5rem 1rem; border-bottom: 1px solid var(--border);
    }
    .saved-filters-title {
      font-size: 0.68rem; font-weight: 600; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.08em;
    }
    .save-view-btn {
      padding: 0.15rem 0.45rem; border-radius: var(--radius);
      background: var(--surface-3); border: 1px solid var(--border);
      color: var(--muted); font-family: var(--font); font-size: 0.65rem;
      cursor: pointer; transition: background 0.12s, color 0.12s;
    }
    .save-view-btn:hover { background: var(--accent-dim); color: var(--accent); }
    .saved-filter-item {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.5rem 1rem; border-bottom: 1px solid var(--border);
      cursor: pointer; transition: background 0.1s;
    }
    .saved-filter-item:hover { background: var(--surface-2); }
    .saved-filter-name {
      flex: 1; font-size: 0.76rem; color: var(--text);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .saved-filter-del {
      width: 20px; height: 20px; border-radius: var(--radius);
      background: none; border: 1px solid transparent; color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 0.68rem; flex-shrink: 0; min-height: 28px; min-width: 28px;
      transition: background 0.12s, color 0.12s;
    }
    .saved-filter-del:hover { background: var(--red-dim); color: var(--red); }
    .saved-filters-empty {
      padding: 0.6rem 1rem; font-size: 0.7rem; color: var(--muted);
    }

    /* ── Tag Chips ────────────────────────────────────────────────────── */
    .tag-chip {
      display: inline-flex; align-items: center; gap: 0.25rem;
      padding: 0.1rem 0.45rem; border-radius: 10px;
      font-size: 0.6rem; font-weight: 500; white-space: nowrap;
      background: var(--surface-3); color: var(--muted);
      border: 1px solid var(--border); line-height: 1.4;
      vertical-align: middle; cursor: default; max-width: 90px;
      overflow: hidden; text-overflow: ellipsis;
    }
    .tag-chip-remove {
      background: none; border: none; padding: 0; margin: 0;
      cursor: pointer; color: inherit; opacity: 0.6; font-size: 0.6rem;
      line-height: 1; display: inline-flex; align-items: center;
      transition: opacity 0.12s; flex-shrink: 0; min-height: 16px; min-width: 12px;
    }
    .tag-chip-remove:hover { opacity: 1; }
    .tag-chip-more {
      background: var(--surface-3); color: var(--muted);
      border: 1px solid var(--border);
    }
    .email-tag-chips {
      display: flex; flex-wrap: nowrap; gap: 0.2rem;
      margin-top: 0.2rem; grid-column: 2; overflow: hidden;
    }
    /* Detail view chips — slightly larger */
    .detail-tag-chips {
      display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; align-items: center;
    }
    .detail-tag-chips .tag-chip {
      font-size: 0.68rem; padding: 0.15rem 0.55rem; max-width: 140px;
    }
    .tag-add-dropdown {
      position: relative; display: inline-block;
    }
    .tag-add-btn {
      padding: 0.2rem 0.5rem; border-radius: var(--radius);
      background: var(--surface-3); border: 1px dashed var(--border-2);
      color: var(--muted); font-family: var(--font); font-size: 0.68rem;
      cursor: pointer; transition: background 0.12s, color 0.12s;
      min-height: 28px;
    }
    .tag-add-btn:hover { background: var(--accent-dim); color: var(--accent); }
    .tag-add-menu {
      position: absolute; top: 100%; left: 0; z-index: 50;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); min-width: 160px; max-height: 200px;
      overflow-y: auto; box-shadow: 0 4px 16px rgba(0,0,0,0.4);
      margin-top: 2px;
    }
    .tag-add-menu.hidden { display: none; }
    .tag-add-option {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.45rem 0.75rem; cursor: pointer; font-size: 0.74rem;
      color: var(--text); transition: background 0.1s;
    }
    .tag-add-option:hover { background: var(--surface-2); }
    .tag-add-option-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
    .tag-add-empty { padding: 0.75rem; font-size: 0.72rem; color: var(--muted); text-align: center; }

    /* Tag suggest strip in detail view */
    .tag-suggest-strip {
      display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap;
      margin-top: 0.35rem;
    }
    .tag-suggest-label { font-size: 0.63rem; color: var(--muted); flex-shrink: 0; }
    .tag-suggest-chip {
      display: inline-flex; align-items: center; gap: 0.2rem;
      padding: 0.1rem 0.45rem; border-radius: 10px;
      font-size: 0.62rem; font-weight: 500; cursor: pointer;
      background: var(--surface-3); border: 1px dashed var(--border-2);
      color: var(--muted); transition: border-color 0.12s, color 0.12s;
      min-height: 28px;
    }
    .tag-suggest-chip:hover { border-color: var(--accent); color: var(--accent); }

    /* ── Tag Filter indicator in list header ──────────────────────────── */
    .tag-filter-clear {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.15rem 0.45rem; border-radius: var(--radius);
      background: var(--purple-dim); border: 1px solid rgba(188,140,255,0.3);
      color: var(--purple); font-family: var(--font); font-size: 0.67rem;
      cursor: pointer; transition: background 0.12s;
    }
    .tag-filter-clear:hover { background: rgba(188,140,255,0.2); }

    /* ── Search Tag Autocomplete ───────────────────────────────────────── */
    .search-wrap { position: relative; }
    .tag-autocomplete {
      position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 100;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); max-height: 180px; overflow-y: auto;
      box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    }
    .tag-autocomplete.hidden { display: none; }
    .tag-ac-option {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.4rem 0.75rem; cursor: pointer; font-size: 0.74rem;
      color: var(--text); transition: background 0.1s;
    }
    .tag-ac-option:hover, .tag-ac-option.focused { background: var(--surface-2); }
    .tag-ac-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

    /* ── Bulk Select ──────────────────────────────────────────────────── */
    .bulk-bar {
      padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--border);
      background: var(--surface-2);
      display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
    }
    .bulk-bar.hidden { display: none; }
    .bulk-count { font-size: 0.72rem; color: var(--text); flex: 1; }
    .bulk-cancel-btn {
      background: none; border: 1px solid var(--border); color: var(--muted);
      font-family: var(--font); font-size: 0.68rem; cursor: pointer;
      padding: 0.2rem 0.5rem; border-radius: var(--radius);
      transition: background 0.12s;
    }
    .bulk-cancel-btn:hover { background: var(--surface-3); color: var(--text); }
    .bulk-tag-btn {
      background: var(--accent-dim); border: 1px solid rgba(88,166,255,0.3);
      color: var(--accent); font-family: var(--font); font-size: 0.68rem;
      cursor: pointer; padding: 0.2rem 0.55rem; border-radius: var(--radius);
      transition: background 0.12s;
    }
    .bulk-tag-btn:hover { background: rgba(88,166,255,0.2); }
    .bulk-tag-btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .email-item.select-mode { cursor: pointer; }
    .email-select-cb {
      grid-row: 1 / 3; align-self: center;
      width: 14px; height: 14px; cursor: pointer; flex-shrink: 0;
      accent-color: var(--accent);
    }
    .select-mode-btn {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.2rem 0.5rem; border-radius: var(--radius);
      background: none; border: 1px solid var(--border); color: var(--muted);
      font-family: var(--font); font-size: 0.68rem; cursor: pointer;
      transition: background 0.12s, color 0.12s;
    }
    .select-mode-btn:hover { background: var(--surface-3); color: var(--text); }
    .select-mode-btn.active {
      background: var(--accent-dim); border-color: rgba(88,166,255,0.3); color: var(--accent);
    }

    /* ── Read/Unread Dot Toggle ── */
    .unread-dot {
      grid-row: 1 / 3; align-self: center;
      width: 16px; height: 100%; min-height: 28px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      border: none; background: none; padding: 0;
      cursor: pointer; opacity: 0;
      transition: opacity 0.15s;
    }
    .unread-dot::after {
      content: ''; display: block;
      width: 6px; height: 6px; border-radius: 50%;
      background: var(--accent);
      transition: background 0.15s, opacity 0.15s;
    }
    .email-item.unread .unread-dot { opacity: 1; }
    .email-item:not(.unread) .unread-dot:hover { opacity: 0.4; }
    .unread-dot:hover::after { background: var(--accent); }

    /* ── Mark All Read ── */
    .mark-all-read-btn {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.2rem 0.5rem; border-radius: var(--radius);
      font-size: 0.68rem; cursor: pointer; white-space: nowrap;
      background: transparent; border: 1px solid var(--border);
      color: var(--muted); transition: background 0.15s, border-color 0.15s, color 0.15s;
      font-family: var(--font);
    }
    .mark-all-read-btn:hover { background: var(--green-dim); border-color: rgba(63,185,80,0.3); color: var(--green); }
    .mark-all-read-btn.hidden { display: none; }

    /* ── Mark Unread button in detail header ── */
    .detail-mark-unread {
      width: 24px; height: 24px; border-radius: var(--radius);
      background: none; border: 1px solid var(--border); color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 0.75rem; transition: background 0.15s, color 0.15s; flex-shrink: 0;
    }
    .detail-mark-unread:hover { background: var(--surface-2); color: var(--text); }
    .detail-mark-unread.hidden { display: none; }
    @media (max-width: 768px) {
      .detail-mark-unread { width: 44px; height: 44px; }
    }

    /* Unsubscribe badge on email list items */
    .unsub-badge {
      font-size: 0.56rem; padding: 0.04rem 0.28rem; border-radius: 2rem;
      background: rgba(139,148,158,0.1); color: var(--muted);
      border: 1px solid rgba(139,148,158,0.18); white-space: nowrap; flex-shrink: 0;
      font-weight: 500; letter-spacing: 0.03em;
    }

    /* Mobile: full-screen */
    @media (max-width: 768px) {
      .subs-inner { width: 100%; border-left: none; }
      .subs-close { width: 44px; height: 44px; }
      .subs-unsub-btn { min-height: 44px; min-width: 80px; }
    }

    /* ── Tags Panel Mobile ─────────────────────────────────────────────── */
    @media (max-width: 768px) {
      .tags-inner { width: 100%; border-left: none; }
      .tags-close { width: 44px; height: 44px; }
      .tag-item-filter-btn, .tag-item-edit, .tag-item-delete, .tag-suggest-chip {
        min-height: 44px;
      }
      .tag-swatch { width: 26px; height: 26px; }
      .email-tag-chips { overflow-x: auto; }
    }

    /* ── Auto-Tag Section ──────────────────────────────────────────────── */
    .autotag-section {
      border-top: 1px solid var(--border); flex-shrink: 0;
    }
    .autotag-header {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.6rem 1rem; cursor: pointer; transition: background 0.12s;
    }
    .autotag-header:hover { background: var(--surface-2); }
    .autotag-title {
      font-size: 0.68rem; font-weight: 600; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.08em; flex: 1;
    }
    .autotag-chevron { font-size: 0.65rem; color: var(--muted); transition: transform 0.2s; }
    .autotag-section.open .autotag-chevron { transform: rotate(180deg); }
    .autotag-body { display: none; flex-direction: column; }
    .autotag-section.open .autotag-body { display: flex; }

    .autotag-status-row {
      display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
      padding: 0.5rem 1rem; border-bottom: 1px solid var(--border);
      font-size: 0.7rem; color: var(--muted);
    }
    .autotag-status-text { flex: 1; }
    .autotag-scan-btn {
      padding: 0.22rem 0.6rem; border-radius: var(--radius);
      background: var(--accent-dim); border: 1px solid rgba(88,166,255,0.3);
      color: var(--accent); font-family: var(--font); font-size: 0.68rem;
      cursor: pointer; white-space: nowrap; transition: background 0.12s;
    }
    .autotag-scan-btn:hover { background: rgba(88,166,255,0.2); }
    .autotag-scan-btn:disabled { opacity: 0.5; cursor: not-allowed; }

    .autotag-rules-meta {
      padding: 0.35rem 1rem; font-size: 0.66rem; color: var(--muted);
      border-bottom: 1px solid var(--border);
    }
    .autotag-rule-item {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.45rem 1rem; border-bottom: 1px solid var(--border);
      font-size: 0.72rem; transition: background 0.1s;
    }
    .autotag-rule-item:hover { background: var(--surface-2); }
    .autotag-rule-icon { font-size: 0.8rem; flex-shrink: 0; }
    .autotag-rule-pattern {
      flex: 1; color: var(--text); overflow: hidden;
      text-overflow: ellipsis; white-space: nowrap;
    }
    .autotag-rule-arrow { color: var(--muted); font-size: 0.65rem; flex-shrink: 0; }
    .autotag-rule-tag-chip {
      display: inline-flex; align-items: center; gap: 0.2rem;
      padding: 0.1rem 0.45rem; border-radius: 10px;
      font-size: 0.63rem; font-weight: 500; flex-shrink: 0; max-width: 90px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .autotag-rule-del {
      width: 20px; height: 20px; border-radius: var(--radius);
      background: none; border: 1px solid var(--border); color: var(--muted);
      cursor: pointer; font-size: 0.65rem; display: flex; align-items: center;
      justify-content: center; flex-shrink: 0; transition: background 0.12s, color 0.12s;
    }
    .autotag-rule-del:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: #ef4444; }

    /* Add rule form */
    .autotag-add-form {
      padding: 0.6rem 1rem; border-top: 1px solid var(--border);
      display: flex; flex-direction: column; gap: 0.45rem;
    }
    .autotag-add-title {
      font-size: 0.63rem; color: var(--muted); font-weight: 600;
      text-transform: uppercase; letter-spacing: 0.07em;
    }
    .autotag-add-row { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
    .autotag-add-select, .autotag-add-input {
      background: var(--bg); border: 1px solid var(--border);
      color: var(--text-hi); font-family: var(--font); font-size: 0.72rem;
      padding: 0.3rem 0.5rem; border-radius: var(--radius);
      outline: none; transition: border-color 0.15s;
    }
    .autotag-add-select:focus, .autotag-add-input:focus { border-color: var(--accent); }
    .autotag-add-input { flex: 1; min-width: 80px; }
    .autotag-add-input::placeholder { color: var(--muted); }
    .autotag-add-tag-select {
      background: var(--bg); border: 1px solid var(--border);
      color: var(--text-hi); font-family: var(--font); font-size: 0.72rem;
      padding: 0.3rem 0.5rem; border-radius: var(--radius);
      outline: none; flex: 1; transition: border-color 0.15s;
    }
    .autotag-add-tag-select:focus { border-color: var(--accent); }
    .autotag-add-btn {
      padding: 0.3rem 0.6rem; border-radius: var(--radius);
      background: var(--accent-dim); border: 1px solid rgba(88,166,255,0.3);
      color: var(--accent); font-family: var(--font); font-size: 0.7rem;
      cursor: pointer; white-space: nowrap; transition: background 0.12s;
    }
    .autotag-add-btn:hover { background: rgba(88,166,255,0.2); }

    /* ── Suggestions Banner ─────────────────────────────────────────────── */
    .suggestions-banner {
      margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0;
      flex-shrink: 0;
    }
    .suggestion-item {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--border);
      background: var(--surface-2); font-size: 0.72rem; color: var(--text);
    }
    .suggestion-text { flex: 1; }
    .suggestion-yes-btn {
      padding: 0.18rem 0.55rem; border-radius: var(--radius);
      background: var(--green-dim); border: 1px solid rgba(63,185,80,0.3);
      color: var(--green); font-family: var(--font); font-size: 0.67rem;
      cursor: pointer; white-space: nowrap; transition: background 0.12s;
    }
    .suggestion-yes-btn:hover { background: rgba(63,185,80,0.2); }
    .suggestion-dismiss-btn {
      padding: 0.18rem 0.45rem; border-radius: var(--radius);
      background: none; border: 1px solid var(--border);
      color: var(--muted); font-family: var(--font); font-size: 0.67rem;
      cursor: pointer; transition: background 0.12s;
    }
    .suggestion-dismiss-btn:hover { background: var(--surface-3); }
