  :root {
    --bg:       #0f1117;
    --surface:  #1a1d27;
    --border:   #2a2d3a;
    --text:     #e2e4ed;
    --muted:    #6b7280;
    --accent:   #6366f1;
    --accent-h: #818cf8;
    --green:    #22c55e;
    --yellow:   #f59e0b;
    --red:      #ef4444;
    --blue:     #3b82f6;
    --col-w:    300px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
  }

  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 100;
  }

  header h1 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
  }

  header .hint {
    font-size: 12px;
    color: var(--muted);
  }

  kbd {
    background: var(--border);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 11px;
    font-family: monospace;
  }

  /* ── Desktop: horizontal columns ── */
  .board-scroll {
    overflow-x: auto;
    overflow-y: auto;
    flex: 1; /* fills remaining height inside kanban-module */
    min-height: 0; /* required for flex children to shrink below content size */
  }

  .board {
    display: flex;
    gap: 16px;
    padding: 16px;
    align-items: flex-start;
    width: max-content;
    min-height: 100%;
  }

  .column {
    width: var(--col-w);
    min-width: var(--col-w);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
  }

  .col-header {
    padding: 14px 16px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    /* Sticky within the board-scroll viewport */
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--surface);
    border-radius: 10px 10px 0 0;
  }

  .col-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .col-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .col-count {
    font-size: 11px;
    background: var(--border);
    color: var(--muted);
    border-radius: 10px;
    padding: 1px 7px;
    font-weight: 600;
  }

  /* Desktop: vertical card stack */
  .cards {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
  }

  .cards.drag-over {
    background: rgba(99, 102, 241, 0.06);
    border-radius: 6px;
  }

  .card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    cursor: grab;
    transition: box-shadow 0.15s, border-color 0.15s;
    position: relative;
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  .card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3);
  }

  .card.dragging {
    opacity: 0.4;
    cursor: grabbing;
  }

  .card-header {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 8px;
  }

  .card-num {
    font-size: 10px;
    font-weight: 700;
    font-family: monospace;
    background: var(--border);
    color: var(--muted);
    border-radius: 4px;
    padding: 1px 5px;
    flex-shrink: 0;
    letter-spacing: 0.03em;
  }

  .card-title {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text);
  }

  .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
  }

  .tag {
    font-size: 11px;
    border-radius: 4px;
    padding: 2px 6px;
    font-weight: 500;
  }

  .tag-project { background: rgba(99,102,241,0.15); color: var(--accent-h); }
  .tag-person  { background: rgba(59,130,246,0.15); color: #60a5fa; }
  .tag-due-ok  { background: rgba(34,197,94,0.13);  color: var(--green); }
  .tag-due-soon{ background: rgba(245,158,11,0.15); color: var(--yellow); }
  .tag-due-over{ background: rgba(239,68,68,0.15);  color: var(--red); }
  .tag-source  { background: rgba(107,114,128,0.15); color: var(--muted); }
  .tag-new     { background: rgba(239,68,68,0.18);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); font-weight: 600; font-size: 9px; letter-spacing: 0.05em; padding: 1px 4px; border-radius: 4px; text-transform: uppercase; }

  .card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
    gap: 4px;
  }

  .card:hover .card-actions { display: flex; }

  .card-btn {
    background: var(--border);
    border: none;
    border-radius: 4px;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    line-height: 1.4;
    transition: background 0.1s, color 0.1s;
  }

  .card-btn:hover { background: var(--accent); color: #fff; }
  .card-btn.del:hover { background: var(--red); color: #fff; }

  /* add button in column header */
  .col-add-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.15s;
  }

  .col-add-btn:hover { color: var(--accent-h); }

  .empty-state { display: none; }

  /* ── Modal ── */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    align-items: center;
    justify-content: center;
  }

  .modal-overlay.open { display: flex; }

  .modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 480px;
    max-width: 95vw;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px;
  }

  .modal h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
  }

  .form-group { margin-bottom: 14px; }

  .form-group label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    padding: 8px 10px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
  }

  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus { border-color: var(--accent); }

  .form-group textarea { resize: vertical; min-height: 70px; }

  .form-row { display: flex; gap: 12px; }
  .form-row .form-group { flex: 1; }

  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
  }

  .btn {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    font-family: inherit;
    transition: opacity 0.15s;
  }

  .btn:hover { opacity: 0.85; }
  .btn-primary { background: var(--accent); color: #fff; }
  .btn-ghost   { background: var(--border); color: var(--text); }

  /* ── Scan Progress Modal & Metrics ── */
  .scan-pulse-icon {
    display: inline-block;
    font-size: 32px;
    animation: scan-pulse 1.8s ease-in-out infinite;
  }
  @keyframes scan-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
  }
  .scan-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .scan-metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
  }
  .scan-metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-h);
  }
  .scan-metric-label {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  /* ── Swipe Review Mode ── */
  #review-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 300;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
  }

  #review-overlay.open { display: flex; }

  #review-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
  }

  #review-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  #review-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
  }

  #review-counter {
    font-size: 12px;
    color: var(--muted);
  }

  #review-card-wrap {
    width: 100%;
    max-width: 340px;
    position: relative;
    margin-top: 20px;
  }

  .review-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    touch-action: none;
    user-select: none;
    will-change: transform;
    transition: transform 0.08s ease-out, opacity 0.08s ease-out;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }

  .review-card .rc-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    flex: 1;
  }

  .review-card .rc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .review-card .rc-notes {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
  }

  /* Swipe hints — above the card */
  #review-swipe-hints {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 340px;
    margin-bottom: 12px;
    height: 32px;
  }

  .swipe-hint-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 6px;
    padding: 4px 10px;
    border: 2px solid;
    opacity: 0;
    transition: opacity 0.12s;
    pointer-events: none;
    white-space: nowrap;
  }

  #hint-skip  { color: var(--red);    border-color: var(--red); }
  #hint-today { color: var(--yellow); border-color: var(--yellow); }
  #hint-done  { color: var(--green);  border-color: var(--green); }

  #review-hint-bar {
    margin-top: 32px;
    display: flex;
    gap: 24px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  #review-hint-bar span { display: flex; align-items: center; gap: 6px; }

  #review-done-msg {
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    display: none;
  }

  #review-done-msg .big { font-size: 40px; display: block; margin-bottom: 8px; }

  /* ── Chat Tab ── */
  #chat-panel {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 98px; /* Offset to clear the bottom border of the top nav tabs */
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 760px;
    margin: 0 auto;
    z-index: 80;
    background: var(--bg);
  }

  #chat-panel.active { display: flex; }

  #chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
  }
  #chat-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
  }
  #chat-close-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    display: block;
  }

  #chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .chat-msg {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 85%;
  }

  .chat-msg.user { align-self: flex-end; align-items: flex-end; }
  .chat-msg.assistant { align-self: flex-start; }

  .chat-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
  }

  .chat-msg.user .chat-bubble {
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 4px;
  }

  .chat-msg.assistant .chat-bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 4px;
  }

  .chat-bubble.thinking {
    color: var(--muted);
    font-style: italic;
  }

  #chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 12px;
  }

  .chat-suggestion {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    white-space: nowrap;
  }

  .chat-suggestion:hover { border-color: var(--accent); color: var(--accent-h); }

  #chat-input-wrap {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: flex-end;
    background: var(--bg);
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    /* Extra bottom padding on mobile to clear the bottom nav */
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }



  #chat-input {
    flex: 1;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 16px; /* 16px prevents iOS zoom */
    padding: 10px 12px;
    outline: none;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    min-height: 42px;
    box-sizing: border-box;
    line-height: 1.4;
    transition: border-color 0.15s;
  }

  #chat-input:focus { border-color: var(--accent); }

  #chat-send {
    background: var(--accent);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    width: 42px;
    min-width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.15s;
  }

  #chat-send:hover { opacity: 0.85; }
  #chat-send:disabled { opacity: 0.4; cursor: default; }

  /* Desktop: top nav tabs for kanban/chat */
  #desktop-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    padding: 0 24px;
    position: sticky;
    top: 57px;
    z-index: 95;
  }

  .desktop-tab {
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
    transition: all 0.15s;
  }

  .desktop-tab.active { color: var(--text); border-bottom-color: var(--accent); }
  .desktop-tab:hover { color: var(--text); }

  /* ── Modules layout wrapper ── */
  #page-modules {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 20px 0;
    /* Height = full page minus the sticky nav area */
    min-height: calc(100vh - 100px - 14px);
  }

  /* Shared module panel style */
  .module-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden; /* clips to rounded corners */
  }

  /* ── Calendar Module — scrolls away normally, not sticky ── */
  #cal-module {
    flex-shrink: 0;
    /* overflow: hidden already from .module-panel */
  }

  /* ── Calendar Strip ── */
  #cal-strip-wrap {
    background: transparent;
    padding: 10px 16px 12px;
  }

  /* ── Kanban Module — sticky, fills rest of viewport ── */
  #kanban-module {
    position: sticky;
    top: 100px; /* height of header + desktop-tabs */
    /* Fill from sticky position to bottom of viewport */
    height: calc(100vh - 100px - 14px); /* 14px = page-modules top padding */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* clip rounded corners; board-scroll handles internal overflow */
    border-radius: 12px;
    flex-shrink: 0;
  }
  #kanban-module > #kanban-search-wrap {
    flex-shrink: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
  }
  #kanban-module > #mobile-tab-bar {
    flex-shrink: 0;
  }
  #kanban-module > .board-scroll {
    background: var(--bg);
    border-radius: 0 0 12px 12px;
  }

  #cal-strip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }

  #cal-date-pills::-webkit-scrollbar { display: none; }

  .cal-date-pill {
    padding: 3px 10px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: none;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    flex-shrink: 0;
  }

  .cal-date-pill:hover { border-color: var(--accent); color: var(--accent-h); }
  .cal-date-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .cal-date-pill.today { font-weight: 700; }

  #cal-strip-date {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
  }

  #cal-strip-refresh {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 15px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
  }
  #cal-strip-refresh:hover { color: var(--accent-h); }
  #cal-strip-refresh.spinning { animation: spin 0.6s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  #cal-strip {
    position: relative;
    height: 144px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    cursor: grab;
  }
  #cal-strip::-webkit-scrollbar { display: none; }

  #cal-strip-inner {
    position: relative;
    height: 100%;
    /* width set dynamically by JS */
  }

  .cal-now-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--red);
    border-radius: 1px;
    z-index: 3;
  }

  .cal-now-dot {
    position: absolute;
    top: -3px;
    left: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
  }

  .cal-hour-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
  }

  .cal-hour-label {
    position: absolute;
    bottom: 2px;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .cal-event {
    position: absolute;
    border-radius: 5px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    z-index: 2;
    opacity: 0.92;
    border: 1px solid rgba(255,255,255,0.08);
  }

  .cal-event:hover { opacity: 1 !important; z-index: 4; }

  #cal-tooltip {
    position: fixed;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text);
    pointer-events: none;
    z-index: 500;
    max-width: 240px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    display: none;
    line-height: 1.5;
  }

  #cal-tooltip .tt-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
  #cal-tooltip .tt-time  { color: var(--muted); font-size: 11px; }

  /* Calendar event context menu */
  #cal-context-menu {
    display: none;
    position: fixed;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 0;
    z-index: 600;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }

  #cal-context-menu.open { display: block; }

  .ctx-menu-header {
    font-size: 11px;
    color: var(--muted);
    padding: 4px 14px 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
  }

  .ctx-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background 0.1s;
  }

  .ctx-menu-item:hover { background: var(--border); }

  .ctx-menu-item.disabled {
    color: var(--muted);
    cursor: default;
  }

  .ctx-menu-item.disabled:hover { background: none; }

  .ctx-menu-item .ctx-badge {
    font-size: 9px;
    background: var(--border);
    color: var(--muted);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: auto;
  }

  #cal-strip-empty {
    display: none;
    font-size: 11px;
    color: var(--muted);
    padding: 4px 0;
    font-style: italic;
  }

  /* ── Mobile layout: tab-based vertical cards ── */
  @media (max-width: 700px) {
    body { overflow-x: hidden; }

    header { padding: 12px 16px; }
    header h1 { font-size: 14px; }
    header .hint { display: none; }

    /* Hide Review button — double-tap activates review */
    #review-btn { display: none !important; }

    #page-modules { padding: 8px 10px 0; gap: 8px; }
    #cal-module { top: 49px; }
    #cal-strip-wrap { padding: 8px 12px 10px; }
    #chat-panel { top: 0; z-index: 1000; }

    #chat-messages { padding: 12px 14px; gap: 12px; }
    .chat-bubble { font-size: 13px; padding: 8px 12px; line-height: 1.4; }
    .chat-msg { max-width: 90%; }
    #cal-strip { height: 144px; }

    /* ── Bottom nav (always visible) ── */
    #mobile-bottom-nav {
      display: none;
      position: fixed;
      bottom: 0; left: 0; right: 0;
      background: var(--surface);
      border-top: 1px solid var(--border);
      z-index: 200;
      padding: 8px 0 env(safe-area-inset-bottom, 8px);
      display: none;
    }

    .bottom-nav-items {
      display: flex;
      justify-content: space-around;
      align-items: center;
      max-width: 480px;
      margin: 0 auto;
      height: 52px;
    }

    .bottom-nav-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      background: none;
      border: none;
      color: var(--muted);
      cursor: pointer;
      font-family: inherit;
      padding: 8px 24px;
      transition: all 0.15s;
      border-radius: 50%;
    }

    .bottom-nav-btn .nav-icon { font-size: 22px; line-height: 1; }
    .bottom-nav-btn.active { color: var(--accent); }

    /* Premium main center home button (Brain) */
    .bottom-nav-btn.main-home-btn {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
    }
    .bottom-nav-btn.main-home-btn .nav-icon {
      font-size: 25px;
      line-height: 1;
    }
    .bottom-nav-btn.main-home-btn.active {
      background: rgba(99, 102, 241, 0.12); /* Subtle indigo highlight */
      color: var(--accent);
      box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
    }

    /* ── Column tab bar (board view only) ── */
    #mobile-tab-bar {
      display: flex;
      gap: 6px;
      padding: 10px 12px 6px;
      overflow-x: auto;
      scrollbar-width: none;
      background: var(--bg);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 93px; /* 49px header + ~44px search bar */
      z-index: 88;
    }
    #mobile-tab-bar::-webkit-scrollbar { display: none; }

    .mobile-tab {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 6px 12px;
      border-radius: 20px;
      border: 1.5px solid var(--border);
      background: none;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.15s;
      flex-shrink: 0;
    }

    .mobile-tab .tab-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .mobile-tab .tab-count {
      font-size: 10px;
      opacity: 0.7;
    }

    .mobile-tab.active {
      color: var(--text);
      border-color: currentColor;
      background: rgba(255,255,255,0.05);
    }

    /* ── Mobile board: show only active column's cards ── */
    .board-scroll { overflow-x: hidden; }

    .board {
      flex-direction: column;
      padding: 12px 12px 100px;
      gap: 10px;
      min-height: unset;
      width: 100%;
    }

    /* Hide all columns on mobile — shown via JS */
    .column { display: none; width: 100%; min-width: unset; border-radius: 10px; }
    .column.mobile-active { display: block; }
    .col-header { display: none; } /* tabs replace headers */

    /* Full-width vertical cards */
    .cards {
      flex-direction: column;
      padding: 0;
      gap: 10px;
    }

    .card {
      min-width: unset;
      max-width: unset;
      width: 100%;
      padding: 16px;
      cursor: pointer;
      font-size: 14px;
    }

    .card-title { font-size: 15px; margin-bottom: 10px; }
    .card-num   { font-size: 11px; padding: 2px 7px; }
    .tag        { font-size: 12px; padding: 3px 8px; }

    /* Always show delete on mobile */
    .card-actions { display: flex; }
    .card-actions .edit { display: none; }
    .card-actions .del  { display: none; } /* swipe down in review */

    .col-add-btn { display: none; }
    .col-chevron { display: none; }

    /* FAB */
    #fab {
      display: flex;
      align-items: center;
      justify-content: center;
      position: fixed;
      bottom: calc(70px + env(safe-area-inset-bottom, 0px));
      left: 20px;
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      font-size: 26px;
      border: none;
      cursor: pointer;
      z-index: 150;
      box-shadow: 0 4px 16px rgba(99,102,241,0.5);
    }

    /* Long-press highlight */
    .card.pressing { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,0.4); }

    /* Modal full-screen on mobile */
    .modal {
      width: 100%;
      max-width: 100%;
      max-height: 100vh;
      border-radius: 16px 16px 0 0;
      position: fixed;
      bottom: 0; left: 0; right: 0;
      padding: 20px 16px;
    }
    .modal-overlay.open { align-items: flex-end; }
    .form-row { flex-direction: column; gap: 0; }

    /* Refresh button in header */
    #refresh-btn {
      background: none;
      border: none;
      color: var(--muted);
      font-size: 18px;
      cursor: pointer;
      padding: 0 4px;
      line-height: 1;
    }
  }

  /* Short ID badge — desktop too, subtler */
  .card-id {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    color: var(--border);
    font-family: monospace;
  }

  .card:hover .card-id { color: var(--muted); }

  /* Swipe down delete confirm in review */
  #review-delete-confirm {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 2px solid var(--red);
    border-radius: 20px 20px 0 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    z-index: 410;
    padding: 28px 20px 44px;
  }

  #review-card-wrap { position: relative; }

  #review-delete-confirm.show { display: flex; }
  #review-delete-confirm p { color: var(--red); font-weight: 600; font-size: 15px; text-align: center; padding: 0 20px; }
  #review-delete-confirm .confirm-btns { display: flex; gap: 12px; }

  /* Status picker bottom sheet */
  #status-picker-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 399;
  }
  #status-picker-backdrop.open { display: block; }

  #status-picker {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    padding: 12px 0 36px;
    z-index: 400;
    transform: translateY(100%);
    transition: transform 0.25s ease;
  }
  #status-picker.open { display: block; transform: translateY(0); }

  #status-picker-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    font-weight: 600;
    padding: 8px 20px 12px;
  }

  .sp-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background 0.1s;
  }
  .sp-option:active { background: var(--border); }
  .sp-option.current { color: var(--accent-h); }
  .sp-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

  .mango-menu-item {
    display: block;
    width: 100%;
    padding: 15px 24px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.1s;
  }
  .mango-menu-item:active { background: var(--border); }

  /* Inbox */
  .suggestion-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .suggestion-desc { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; }
  .suggestion-ctx  { font-size: 12px; color: var(--muted); line-height: 1.4; font-style: italic; }
  .suggestion-meta { font-size: 11px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

  .suggestion-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
  }

  .sug-btn {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    font-family: inherit;
    transition: opacity 0.15s;
  }
  .sug-btn:hover { opacity: 0.85; }
  .sug-btn.promote  { background: var(--accent); color: #fff; }
  .sug-btn.dismiss  { background: var(--border); color: var(--muted); }
  .sug-btn.reply    { background: none; border: 1px solid var(--border); color: var(--muted); }

  /* --- CRM/Contact Styles --- */
  .crm-panel-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px 24px 80px;
    min-height: calc(100vh - 120px);
    width: 100%;
    box-sizing: border-box;
  }
  @media (max-width: 600px) {
    .crm-panel-root {
      padding-left: 8px !important;
      padding-right: 8px !important;
    }
  }
  .crm-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }
  .crm-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .crm-actions {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .crm-search-row {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-bottom: 8px;
    flex-wrap: wrap;
  }
  .crm-search-input {
    flex: 1;
    min-width: 250px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
  }
  .crm-search-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
  }
  .crm-filter-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .crm-filter-pills::-webkit-scrollbar {
    display: none;
  }
  .crm-pill {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
  }
  .crm-pill:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
  }
  .crm-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  .crm-directory {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
  }
  .crm-org-card {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(20px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  }
  .crm-org-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    border-color: rgba(255, 255, 255, 0.12);
  }
  .crm-org-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    margin-bottom: 16px;
    gap: 12px;
  }
  .crm-org-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .crm-org-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
  }
  .crm-org-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
  }
  .crm-badge {
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .crm-badge.work      { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.2); }
  .crm-badge.school    { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
  .crm-badge.sports    { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
  .crm-badge.community { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.2); }
  .crm-badge.vendor    { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.2); }
  .crm-org-actions {
    display: flex;
    gap: 8px;
  }
  .crm-icon-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
  }
  .crm-icon-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
  }
  .crm-icon-btn.delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
  }
  .crm-org-notes {
    font-size: 13px;
    color: var(--muted);
    margin: 8px 0 16px;
    line-height: 1.4;
    font-style: italic;
  }
  /* --- Chip strip (org list view) --- */
  .crm-chip-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
  }
  .crm-contact-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 4px 10px 4px 6px;
    font-size: 12px;
    color: var(--text);
    cursor: default;
  }
  .crm-contact-chip .chip-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
  }
  .crm-overflow-pill {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: #818cf8;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s ease;
  }
  .crm-overflow-pill:hover {
    background: rgba(99, 102, 241, 0.2);
  }
  .crm-org-card {
    cursor: pointer;
  }
  .crm-org-count {
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 2px 8px;
    color: var(--muted);
    margin-left: 4px;
  }

  /* --- Drill-down view --- */
  #crm-drilldown {
    display: none;
    flex-direction: column;
    gap: 0;
  }
  .crm-drilldown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }
  .crm-back-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    padding: 6px 12px;
    transition: all 0.15s ease;
  }
  .crm-back-btn:hover {
    background: rgba(255,255,255,0.07);
  }
  .crm-drilldown-sort {
    display: flex;
    gap: 6px;
    margin-left: auto;
  }
  .crm-sort-btn {
    background: rgba(30,41,59,0.5);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    padding: 4px 10px;
    transition: all 0.15s ease;
  }
  .crm-sort-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  .crm-drilldown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }
  .crm-person-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.15s ease;
  }
  .crm-person-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
  }
  .crm-person-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  .crm-person-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
  }
  .crm-person-role {
    font-size: 12px;
    color: var(--muted);
    margin: 2px 0 0 0;
  }
  .crm-person-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
  }
  .crm-person-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .crm-person-notes {
    font-size: 12px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 4px;
    line-height: 1.3;
    max-height: 60px;
    overflow-y: auto;
  }

  /* Intake split columns and grouping styling */
  .intake-columns-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
    margin-top: 8px;
  }
  .intake-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 250px;
    transition: min-height 0.2s ease, padding 0.2s ease;
  }
  .intake-column.collapsed {
    min-height: 0 !important;
    padding-bottom: 12px !important;
  }
  .intake-column.collapsed > *:not(.intake-column-title) {
    display: none !important;
  }
  .intake-column-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    cursor: pointer;
    user-select: none;
  }
  .intake-column.collapsed .intake-column-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .intake-column-title .collapse-chevron {
    margin-left: auto;
    font-size: 10px;
    color: var(--muted);
    transition: transform 0.2s ease;
  }
  .intake-column.collapsed .collapse-chevron {
    transform: rotate(-90deg);
  }
  .intake-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
  }
  .intake-column-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 32px 16px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
  }
  .intake-org-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    padding: 12px;
  }
  .intake-org-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  @media (max-width: 768px) {
    .intake-columns-container {
      grid-template-columns: 1fr;
      gap: 16px;
    }
  }

  /* ── Kanban Module wrapper ── */
  #kanban-module {
    position: sticky;
    z-index: 85;
    /* top set dynamically via updateTabBarTop */
  }

  /* ── Search Bar & Card Highlighting ── */
  #kanban-search-wrap {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
  .search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    width: 320px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .search-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
    width: 420px;
  }
  .search-icon {
    font-size: 13px;
    color: var(--muted);
    margin-right: 8px;
    user-select: none;
  }
  #board-search {
    background: none;
    border: none;
    color: var(--text);
    font-size: 13px;
    outline: none;
    width: 100%;
    font-family: inherit;
  }
  #board-search::placeholder {
    color: var(--muted);
    opacity: 0.7;
  }
  #search-clear-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
  }
  #search-clear-btn:hover {
    color: var(--text);
  }
  .card.search-match {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.45);
  }
  .card.search-dim {
    opacity: 0.35;
  }
  @media (max-width: 700px) {
    /* On mobile: everything flows naturally, no fixed-height viewport */
    #page-modules { padding: 0; gap: 0; min-height: unset; }
    #cal-module { border-radius: 0; border-left: none; border-right: none; border-top: none; }
    #kanban-module {
      position: static;
      height: auto;
      overflow: visible;
      border-radius: 0;
      border-left: none;
      border-right: none;
    }
    .board-scroll { overflow-x: hidden; overflow-y: visible; flex: unset; min-height: unset; }
    .col-header { position: static; border-radius: 10px 10px 0 0; }
    /* Search bar sticks just below the mobile header */
    #kanban-search-wrap {
      position: sticky;
      top: 49px;
      z-index: 89;
      padding: 6px 12px;
      border-radius: 0;
      background: var(--bg);
      border-bottom: 1px solid var(--border);
    }
    .search-container { width: 100%; }
    .search-container:focus-within { width: 100%; }
  }

  /* ── Home Page / Dashboard Tiles and Layout ── */
  .home-tile {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  .home-tile:hover {
    transform: translateY(-2px);
    border-color: var(--accent) !important;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.18);
  }
  .home-tile:active {
    transform: translateY(1px) scale(0.97);
  }
  .home-tile-badge {
    animation: badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  @keyframes badge-pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
  }

  /* ── Floating Chat Bubble ── */
  #floating-chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 10px rgba(99, 102, 241, 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
  #floating-chat-bubble:hover {
    transform: scale(1.08);
    background: var(--accent-h);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 15px rgba(99, 102, 241, 0.6);
  }
  #floating-chat-bubble:active {
    transform: scale(0.95);
  }
  @media (max-width: 700px) {
    #floating-chat-bubble {
      bottom: calc(71px + env(safe-area-inset-bottom, 0px)); /* Symmetrical with left-aligned FAB */
      right: 20px;
      width: 50px;
      height: 50px;
      font-size: 22px;
    }
  }
