  :root {
    --bg: #1a1d23; --surface: #22262e; --surface-hover: #2a2f38;
    --card: #2a2f38; --card-hover: #323842;
    --border: #363b44; --border-light: #444a55;
    --text: #e8eaed; --text-muted: #9aa0a9; --text-dim: #6b7280;
    --accent: #60a5fa; --accent-hover: #3b82f6;
    --danger: #ef4444; --success: #34d399; --warning: #fbbf24;
    --purple: #a78bfa; --pink: #f472b6; --orange: #fb923c;
    /* Накладки: в тёмной теме подсвечивают, в светлой — притеняют */
    --overlay-1: rgba(255,255,255,0.04);
    --overlay-2: rgba(255,255,255,0.07);
    --overlay-3: rgba(255,255,255,0.12);
    --overlay-thin: rgba(255,255,255,0.02);
    --overlay-thinner: rgba(255,255,255,0.01);
    --knob: #fff;
    --toast-bg: rgba(34,38,46,0.96);
    --scrim: rgba(14,18,24,0.9);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.24);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 14px 34px rgba(0,0,0,0.35);
  }

  /* ── Светлая тема ─────────────────────────────────────────────────────
     Включается классом на <body>; выбор запоминается в браузере.        */
  body.light {
    --bg: #eceef1; --surface: #f7f8fa; --surface-hover: #eef0f3;
    --card: #ffffff; --card-hover: #ffffff;
    --border: #dfe2e7; --border-light: #c9ced6;
    --text: #1a1d23; --text-muted: #5b6270; --text-dim: #8b929e;
    --accent: #2563eb; --accent-hover: #1d4ed8;
    --danger: #dc2626; --success: #059669; --warning: #d97706;
    --purple: #7c3aed; --pink: #db2777; --orange: #ea580c;
    --overlay-1: rgba(15,23,42,0.05);
    --overlay-2: rgba(15,23,42,0.07);
    --overlay-3: rgba(15,23,42,0.14);
    --overlay-thin: rgba(15,23,42,0.02);
    --overlay-thinner: rgba(15,23,42,0.01);
    --knob: #fff;
    --toast-bg: rgba(255,255,255,0.98);
    --scrim: rgba(30,38,50,0.72);
    --shadow-sm: 0 4px 12px rgba(15,23,42,0.08);
    --shadow-md: 0 8px 24px rgba(15,23,42,0.14);
    --shadow-lg: 0 14px 34px rgba(15,23,42,0.12);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { overflow-x: hidden; max-width: 100%; }
  body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  .col-cards::-webkit-scrollbar { width: 3px; }
  .col-cards::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

  /* Login screen */
  .login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
  .login-box { text-align: center; padding: 48px; background: var(--surface); border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 24px 48px rgba(0,0,0,0.3); max-width: 400px; width: 90%; }
  .login-box h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
  .login-box p { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }
  .login-box .logo { width: 56px; height: 56px; border-radius: 14px; background: var(--bg); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; border: 1px solid var(--border); }
  .google-btn { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 28px; background: #fff; color: #333; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; width: 100%; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
  .google-btn:hover { background: #f0f0f0; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
  .google-btn:disabled { opacity: 0.7; cursor: wait; transform: none; box-shadow: none; }
  .google-btn svg { width: 20px; height: 20px; }
  .login-error { margin-top: 14px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(239,68,68,0.28); background: rgba(239,68,68,0.08); color: #fecaca; font-size: 12px; line-height: 1.45; text-align: left; }
  .login-note { margin-top: 12px; color: var(--text-dim); font-size: 12px; line-height: 1.45; }
  .login-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: var(--text-dim); font-size: 12px; }
  .login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
  .login-email-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
  .login-email-form .field-input { background: var(--bg); font-size: 14px; }
  .login-submit-btn { width: 100%; padding: 13px; background: var(--accent); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
  .login-submit-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
  .login-submit-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
  .login-forgot { background: none; border: none; color: var(--text-dim); font-size: 12px; cursor: pointer; padding: 0; font-family: 'DM Sans', sans-serif; text-decoration: underline; text-align: center; width: 100%; margin-top: 4px; }
  .login-forgot:hover { color: var(--text); }
  .knock-btn { width: 100%; padding: 11px; background: transparent; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
  .knock-btn:hover { border-color: var(--accent); color: var(--accent); }
  .knock-modal { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
  .knock-hint { font-size: 12px; color: var(--text-dim); line-height: 1.4; text-align: center; }
  .toast-actions { display: flex; gap: 6px; margin-top: 8px; }
  .toast-action-btn { padding: 5px 12px; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
  .toast-action-btn.primary { background: var(--accent); color: #fff; }
  .toast-action-btn.primary:hover { background: var(--accent-hover); }
  .toast-action-btn.secondary { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
  .toast-action-btn.secondary:hover { color: var(--text); }

  /* Header */
  .header { padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: var(--surface); }
  .header-left { display: flex; align-items: center; gap: 14px; }
  .header-logo { width: 32px; height: 32px; border-radius: 8px; background: var(--bg); display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
  .header h1 { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
  .header .stats { color: var(--text-dim); font-size: 11px; }
  .header-right { display: flex; align-items: center; gap: 10px; }
  .board-search-wrap { position: relative; }
  .board-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-dim); pointer-events: none; display: inline-flex; align-items: center; justify-content: center; }
  .board-search-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .board-search-input { border-radius: 16px; background: linear-gradient(180deg, var(--overlay-thin), var(--overlay-thinner)); }
  .board-search-input:focus { box-shadow: 0 0 0 3px rgba(96,165,250,0.12); }
  .user-avatar { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; }
  .btn { padding: 8px 16px; border-radius: 8px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
  .btn-accent { background: var(--accent); color: #fff; }
  .btn-accent:hover { background: var(--accent-hover); }
  .btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
  .btn-ghost:hover { border-color: var(--border-light); color: var(--text); }
  .btn-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
  .btn-danger:hover { background: rgba(239,68,68,0.25); }
  .btn-small { padding: 6px 12px; font-size: 12px; }

  /* Tab bar */
  .tab-bar { background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 16px; min-height: 44px; gap: 2px; }
  .tab-scroll { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
  .tab-scroll::-webkit-scrollbar { display: none; }
  .tab { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px 8px 0 0; cursor: grab; white-space: nowrap; border-bottom: 2px solid transparent; transition: all 0.15s; user-select: none; }
  .tab:hover { background: var(--surface-hover); }
  .tab.active { background: var(--bg); }
  .tab.dragging { opacity: 0.35; transform: scale(0.98); }
  .tab-drop-indicator { width: 110px; min-width: 110px; align-self: stretch; border-radius: 8px 8px 0 0; border: 2px dashed rgba(96,165,250,0.55); background: rgba(96,165,250,0.1); box-shadow: inset 0 0 0 1px rgba(96,165,250,0.12); animation: dropPulse 0.9s ease-in-out infinite alternate; pointer-events: none; }
  .tab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .tab-icon { width: 14px; height: 14px; color: var(--text-dim); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
  .tab-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
  .tab-name { font-size: 13px; font-weight: 500; color: var(--text-muted); }
  .tab.active .tab-name { font-weight: 700; color: var(--text); }
  .tab-badge { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; line-height: 1; flex-shrink: 0; }
  .tab-add { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-dim); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: 4px; }
  .tab-add:hover { border-color: var(--accent); color: var(--accent); }
  .tab-chat-btn { display: none; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; position: relative; }
  .tab-chat-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .tab-chat-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .chat-mobile-close { display: none; width: 34px; height: 34px; align-items: center; justify-content: center; border: none; background: transparent; color: var(--text-muted); font-size: 22px; cursor: pointer; border-radius: 8px; flex-shrink: 0; }
  .chat-mobile-close:hover { color: var(--text); background: var(--surface-hover); }
  .user-menu-push { display: none; flex-direction: column; gap: 2px; padding: 6px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 4px 0; }
  .tab-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; flex-shrink: 0; }
  .tab-switch { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 11px; font-weight: 700; }
  .tab-switch-label { white-space: nowrap; }
  .tab-switch-btn { width: 26px; height: 15px; border: none; border-radius: 999px; background: var(--overlay-3); position: relative; cursor: pointer; transition: background 0.18s ease; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
  .tab-switch-btn::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #111827; transition: transform 0.18s ease; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
  .tab-switch-btn.active { background: #d946ef; }
  .tab-switch-btn.active::after { transform: translateX(11px); }
  .tab-switch-btn.inactive { background: var(--overlay-3); }
  .tab-input { background: var(--bg); border: 1px solid var(--accent); border-radius: 4px; color: var(--text); font-size: 13px; font-weight: 600; padding: 4px 8px; outline: none; width: 140px; font-family: 'DM Sans', sans-serif; }

  /* Board area */
  .board { display: flex; gap: 16px; padding: 20px; overflow-x: auto; align-items: flex-start; min-height: calc(100vh - 120px); }
  .board-layout { display: flex; gap: 18px; align-items: stretch; min-height: calc(100vh - 120px); height: calc(100vh - 120px); padding: 20px; min-width: 0; overflow: hidden; }
  .board-wrap { flex: 1; min-width: 0; overflow: hidden; }
  .board-chat { width: 320px; min-width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 160px); flex: 0 0 320px; transition: width 0.2s ease, min-width 0.2s ease, flex-basis 0.2s ease; overflow: hidden; }
  .board-chat.collapsed { width: 54px; min-width: 54px; flex-basis: 54px; }
  .chat-head { padding: 10px 16px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 0; }
  .chat-head-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; }
  .board-chat.collapsed .chat-head { padding: 12px 10px; justify-content: center; border-bottom: none; flex-direction: row; }
  .chat-tabs { display: flex; gap: 0; border-bottom: none; }
  .chat-tab-btn { padding: 6px 12px; font-size: 12px; font-weight: 600; border: none; background: none; color: var(--text-dim); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; font-family: inherit; }
  .chat-tab-btn:hover { color: var(--text); }
  .chat-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
  .files-body { display: flex; flex-direction: column; gap: 4px; padding: 12px; overflow-y: auto; flex: 1; }
  .files-empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 32px 16px; line-height: 1.6; }
  .files-card-group { margin-bottom: 8px; }
  .files-card-label { font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 4px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .files-item { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); min-width: 0; }
  .files-item:hover { border-color: var(--border-light); }
  .files-ext { font-size: 9px; font-weight: 700; background: rgba(96,165,250,0.18); color: var(--accent); border-radius: 3px; padding: 1px 4px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.03em; }
  .files-name { flex: 1; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .files-dl { width: 20px; height: 20px; flex-shrink: 0; color: var(--text-dim); display: flex; align-items: center; justify-content: center; border-radius: 3px; background: none; border: none; cursor: pointer; padding: 0; }
  .files-dl:hover { color: var(--accent); }
  .chat-title { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
  .chat-head-main { min-width: 0; }
  .chat-toggle-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; transition: all 0.15s; }
  .chat-toggle-btn:hover { color: var(--text); border-color: var(--border-light); background: var(--overlay-1); }
  .chat-toggle-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .board-chat.collapsed .chat-head-main,
  .board-chat.collapsed .chat-body,
  .board-chat.collapsed .chat-form,
  .board-chat.collapsed .chat-tabs,
  .board-chat.collapsed .chat-card-draft { display: none; }
  .board-chat.collapsed .chat-toggle-btn { margin: 0; }
  .board-chat.collapsed .chat-head-top { padding-bottom: 0; }
  .chat-unread-badge { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; line-height: 1; }
  .chat-sub { color: var(--text-dim); font-size: 11px; margin-top: 2px; }
  .history-entry { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); }
  .history-entry:last-child { border-bottom: none; }
  .history-icon { width: 26px; height: 26px; min-width: 26px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .history-icon svg { width: 12px; height: 12px; fill: none; stroke: var(--text-dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .history-body { min-width: 0; flex: 1; }
  .history-line { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
  .history-line b { color: var(--text); font-weight: 600; }
  .history-time { font-size: 10px; color: var(--text-dim); }
  .history-entry-link { cursor: pointer; border-radius: 8px; margin: 0 -8px; padding: 7px 8px; transition: background 0.12s; }
  .history-entry-link:hover { background: var(--surface-hover); }
  .history-entry-link:hover .history-link-hint { opacity: 1; }
  .history-link-hint { font-size: 10px; color: var(--accent); opacity: 0; transition: opacity 0.15s; }
  .chat-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
  .chat-empty { color: var(--text-dim); font-size: 13px; line-height: 1.5; padding: 12px; text-align: center; }
  .chat-msg { display: flex; gap: 6px; align-items: flex-start; }
  .chat-msg.own { justify-content: flex-end; }
  .chat-msg.own .chat-avatar,
  .chat-msg.own .chat-avatar-fallback { order: 3; }
  .chat-avatar { width: 22px; height: 22px; min-width: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--bg); }
  .chat-avatar-fallback { width: 22px; height: 22px; min-width: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--text); background: var(--border); border: 1px solid var(--border-light); }
  .chat-msg-main { flex: 0 1 auto; min-width: 0; max-width: min(100%, 440px); width: fit-content; padding: 7px 9px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; column-gap: 10px; position: relative; overflow: visible; }
  .chat-msg.own .chat-msg-main { background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.24); }
  .chat-msg-main.copyable { cursor: copy; }
  .chat-msg-top { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 0; grid-column: 2; justify-self: end; align-self: end; }
  .chat-time { font-size: 10px; color: var(--text-dim); white-space: nowrap; letter-spacing: 0.01em; }
  .chat-msg-meta { display: flex; align-items: center; gap: 4px; }
  .chat-read-status { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 0; line-height: 0; }
  .chat-read-status.read { color: #34d399; }
  .chat-read-status svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .chat-del { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 0; font-size: 0; line-height: 0; position: relative; }
  .chat-del::before { content: ""; width: 14px; height: 14px; display: block; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
  .chat-del:hover { color: var(--danger); }
  .chat-text { font-size: 12px; color: #c4cad3; line-height: 1.32; white-space: pre-wrap; word-break: break-word; grid-column: 1; min-width: 0; }
  .chat-image { width: min(100%, 220px); border-radius: 10px; display: block; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.22); grid-column: 1; min-width: 0; }
  .chat-image-preview-strip { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px 0; }
  .chat-image-preview-thumb { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
  .chat-image-preview-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
  .chat-image-preview-remove { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; border: none; cursor: pointer; font-size: 10px; line-height: 18px; text-align: center; padding: 0; }
  .chat-file-link { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(148,163,184,0.22); background: rgba(148,163,184,0.08); cursor: pointer; grid-column: 1; }
  .chat-file-link:hover { border-color: rgba(96,165,250,0.42); background: rgba(96,165,250,0.1); }
  .chat-file-icon { width: 28px; height: 28px; min-width: 28px; border-radius: 8px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-muted); background: rgba(255,255,255,0.03); }
  .chat-file-meta { min-width: 0; }
  .chat-file-name { color: var(--text); font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-file-size { margin-top: 2px; color: var(--text-dim); font-size: 10px; }
  .chat-audio-card { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.18); border-radius: 8px; grid-column: 1 / -1; min-width: min(100%, 280px); }
  .chat-audio-play { width: 22px; height: 22px; border: none; border-radius: 50%; background: rgba(96,165,250,0.2); color: #60a5fa; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
  .chat-audio-play:hover { background: rgba(96,165,250,0.35); }
  .chat-audio-play svg { width: 10px; height: 10px; fill: currentColor; stroke: none; }
  .chat-audio-wave { display: flex; align-items: center; gap: 1.5px; flex: 1; height: 20px; cursor: pointer; }
  .chat-audio-wave:hover .chat-audio-bar { background: rgba(96,165,250,0.6); }
  .chat-audio-wave:hover .chat-audio-bar.active { background: #93c5fd; }
  .chat-audio-bar { width: 2px; border-radius: 1px; background: rgba(96,165,250,0.4); flex-shrink: 0; }
  .chat-audio-bar.active { background: #60a5fa; }
  .chat-audio-time { font-size: 10px; color: var(--text-dim); flex-shrink: 0; min-width: 28px; text-align: right; }
  .chat-msg { margin-bottom: 0; }
  .chat-msg-main { position: relative; max-width: 100%; }
  .chat-card-link { padding: 9px 10px; border-radius: 10px; border: 1px solid rgba(96,165,250,0.24); background: rgba(96,165,250,0.1); cursor: pointer; transition: all 0.15s; grid-column: 1 / -1; min-width: 0; }
  .chat-forwarded { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-dim); margin-bottom: 4px; grid-column: 1 / -1; }
  .chat-forwarded svg { width: 11px; height: 11px; flex-shrink: 0; }
  .chat-card-link + .chat-text { margin-top: 6px; }
  .chat-card-link:hover { background: rgba(96,165,250,0.16); border-color: rgba(96,165,250,0.45); transform: translateY(-1px); }
  .chat-card-link-title { color: var(--text); font-size: 11px; font-weight: 700; line-height: 1.35; }
  .chat-card-link-meta { margin-top: 3px; color: var(--text-dim); font-size: 10px; }
  .chat-form { border-top: 1px solid var(--border); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
  .chat-reply-draft { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; border-left: 3px solid #a78bfa; background: rgba(167,139,250,0.08); margin-bottom: 4px; }
  .chat-reply-draft-main { min-width: 0; flex: 1; }
  .chat-reply-draft-label { color: #a78bfa; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
  .chat-reply-draft-text { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
  .chat-reply-draft-remove { width: 18px; height: 18px; min-width: 18px; border: none; background: none; color: var(--text-dim); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
  .chat-reply-draft-remove:hover { color: var(--text); }
  .chat-msg-reply { display: flex; flex-direction: column; padding: 5px 8px; border-radius: 6px; border-left: 3px solid #a78bfa; background: rgba(167,139,250,0.08); margin-bottom: 5px; cursor: pointer; grid-column: 1 / -1; min-width: 0; transition: background 0.15s; }
  .chat-msg-reply:hover { background: rgba(167,139,250,0.15); }
  .chat-msg-reply-author { font-size: 10px; font-weight: 700; color: #a78bfa; margin-bottom: 1px; }
  .chat-msg-reply-text { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-card-draft { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid rgba(96,165,250,0.26); background: rgba(96,165,250,0.1); }
  .chat-card-draft-main { min-width: 0; }
  .chat-card-draft-label { color: var(--accent); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
  .chat-card-draft-remove { width: 18px; height: 18px; min-width: 18px; border: none; background: none; color: var(--text-dim); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
  .chat-card-draft-remove:hover { color: var(--text); }
  .chat-input-wrap { position: relative; }
  .chat-form.drag-over .chat-textarea { border-color: rgba(96,165,250,0.78); background: rgba(96,165,250,0.08); box-shadow: 0 0 0 2px rgba(96,165,250,0.14); }
  .chat-textarea { min-height: 82px; resize: vertical; }
  .chat-input-dropzone { position: absolute; inset: 0; border: 2px dashed rgba(96,165,250,0.72); border-radius: 8px; background: var(--bg); color: var(--accent); display: none; align-items: center; justify-content: center; text-align: center; padding: 12px; font-size: 12px; font-weight: 600; z-index: 2; pointer-events: none; }
  .chat-form.card-drag-active .chat-input-dropzone { display: flex; pointer-events: auto; }
  .chat-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .chat-tools { display: flex; align-items: center; gap: 8px; }
  .chat-upload-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s; }
  .chat-upload-btn::before { content: ""; width: 16px; height: 16px; display: block; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 12.5l6.5-6.5a3.5 3.5 0 115 5L11 20a5 5 0 11-7-7l8.5-8.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 12.5l6.5-6.5a3.5 3.5 0 115 5L11 20a5 5 0 11-7-7l8.5-8.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
  .chat-upload-btn:hover { border-color: var(--accent); color: var(--accent); }
  .chat-record-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s; }
  .chat-record-btn:hover { border-color: var(--accent); color: var(--accent); }
  .chat-record-btn.recording { color: #f87171; border-color: rgba(248,113,113,0.45); background: rgba(248,113,113,0.08); animation: chatRecordPulse 1s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(248,113,113,0.35); }
  .chat-record-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  @keyframes chatRecordPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(248,113,113,0.35); }
    35% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(248,113,113,0.08); }
    70% { transform: scale(0.98); box-shadow: 0 0 0 2px rgba(248,113,113,0.14); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(248,113,113,0); }
  }
.toast-stack { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; z-index: 5000; pointer-events: none; }
.toast { width: min(360px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-light); background: var(--toast-bg); box-shadow: var(--shadow-lg); pointer-events: auto; animation: toastLifecycle 5s ease forwards; backdrop-filter: blur(8px); opacity: 0; will-change: opacity, transform; position: relative; }
.toast.task { border-color: rgba(96,165,250,0.32); }
.toast.chat { border-color: rgba(52,211,153,0.32); }
.toast.error { border-color: rgba(248,113,113,0.45); }
.toast.error .toast-title { color: #f87171; }
.toast-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.toast-title { font-size: 12px; font-weight: 800; color: var(--text); line-height: 1.25; }
.toast-body { margin-top: 4px; color: var(--text-muted); font-size: 12px; line-height: 1.4; word-break: break-word; }
.toast-meta { margin-top: 6px; color: var(--text-dim); font-size: 11px; line-height: 1.3; }
.toast-close { width: 20px; height: 20px; border: none; background: transparent; color: var(--text-dim); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; flex: 0 0 auto; font-size: 14px; line-height: 1; margin: -2px -4px 0 0; }
.toast-close:hover { color: var(--text); background: var(--overlay-2); }
  @keyframes toastLifecycle {
    0% { opacity: 0; transform: translateY(10px) scale(0.98); }
    10% { opacity: 1; transform: translateY(0) scale(1); }
    90% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(6px) scale(0.985); }
  }

  /* Column */
  .column { background: var(--surface); border-radius: 12px; width: 280px; min-width: 280px; display: flex; flex-direction: column; border: 1px solid var(--border); transition: all 0.2s; max-height: calc(100vh - 195px); overflow: hidden; }
  .column.linked-col { outline: 1px solid var(--linked-col-color, #60a5fa); outline-offset: -1px; }
  .col-link-badge { display: flex; align-items: center; gap: 4px; padding: 3px 10px 5px; font-size: 10px; font-weight: 600; color: var(--text-dim); border-bottom: 1px solid var(--border); letter-spacing: 0.02em; flex-wrap: wrap; }
  .col-link-badge svg { flex-shrink: 0; }
  .col-group-divider { display: flex; align-items: center; gap: 6px; padding: 6px 10px 4px; font-size: 10px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.04em; text-transform: uppercase; border-top: 1px solid var(--border); margin-top: 4px; }
  .col-group-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
  .column.dragging { opacity: 0.35; transform: scale(0.98); }
  .column-drop-indicator { width: 38px; min-width: 38px; align-self: stretch; min-height: 220px; border: 2px dashed rgba(96,165,250,0.9); border-radius: 14px; background: linear-gradient(180deg, rgba(96,165,250,0.16), rgba(96,165,250,0.08)); box-shadow: inset 0 0 0 1px rgba(96,165,250,0.14), 0 0 0 1px rgba(96,165,250,0.06); animation: none; pointer-events: none; margin: 0 6px; position: relative; }
  .column-drop-indicator::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 50%; width: 2px; transform: translateX(-50%); background: repeating-linear-gradient(to bottom, rgba(96,165,250,0.95) 0 8px, transparent 8px 14px); border-radius: 999px; }
  .column-drop-indicator::after { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(96,165,250,0.95); box-shadow: 0 0 0 4px rgba(96,165,250,0.16); }
  .col-header { padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between; cursor: grab; }
  .col-grip { display: flex; flex-direction: column; gap: 2px; opacity: 0.35; flex-shrink: 0; margin-right: 8px; }
  .col-grip-row { display: flex; gap: 2px; }
  .col-grip-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); }
  .col-title { font-size: 14px; font-weight: 700; cursor: default; letter-spacing: 0.3px; user-select: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .col-count { color: var(--text-dim); font-weight: 500; margin-left: 8px; font-size: 12px; }
  .col-delete { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 16px; padding: 2px 6px; border-radius: 4px; line-height: 1; }
  .col-delete:hover { color: var(--danger); }
  .col-cards { padding: 4px 10px 10px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 295px); }
  .column.merged-col { max-height: calc(100vh - 210px); }
  .column.merged-col .col-cards, .column.linked-col .col-cards { max-height: calc(100vh - 320px); }
  .col-title-input { background: var(--bg); border: 1px solid var(--accent); border-radius: 6px; color: var(--text); font-size: 14px; font-weight: 700; padding: 4px 8px; outline: none; flex: 1; min-width: 0; font-family: 'DM Sans', sans-serif; }
.col-add-wrap { padding: 6px 10px 10px; flex-shrink: 0; border-top: 1px solid var(--border); }

  /* Card */
  .card { background: var(--card); border-radius: 8px; cursor: grab; overflow: hidden; border: 1px solid var(--border); transition: all 0.15s; flex-shrink: 0; position: relative; }
  @keyframes card-highlight-fade { 0%,65% { box-shadow: 0 0 0 2px var(--accent), 0 0 14px rgba(96,165,250,0.35); background: rgba(96,165,250,0.07); } 100% { box-shadow: none; background: var(--card); } }
  .card-highlight { animation: card-highlight-fade 2.3s ease-out forwards; }
  @keyframes card-slide-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
  .card-slide-in { animation: card-slide-in 0.18s ease-out forwards; }
  .card-upload-overlay { position: absolute; inset: 0; background: var(--scrim); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; z-index: 20; padding: 14px; }
  .card-upload-name { font-size: 11px; color: var(--text-muted); width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card-upload-bar { width: 100%; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
  .card-upload-fill { height: 100%; background: var(--accent); border-radius: 2px; width: 0%; transition: width 0.1s; }
  .card-upload-pct { font-size: 12px; font-weight: 700; color: var(--accent); }
  .card-upload-cancel { background: var(--overlay-2); border: 1px solid var(--border); color: var(--text-dim); border-radius: 50%; width: 22px; height: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; padding: 0; margin-top: 2px; }
  .card-upload-cancel:hover { color: #ef4444; border-color: #ef4444; background: rgba(239,68,68,0.1); }
  .card:hover { background: var(--card-hover); border-color: var(--border-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
  .card.dragging { opacity: 0.35; transform: scale(0.98); }
  .card.flash-highlight { animation: cardFlashPulse 1.8s ease; border-color: rgba(96,165,250,0.9); box-shadow: 0 0 0 2px rgba(96,165,250,0.28), 0 12px 28px rgba(0,0,0,0.24); }
  .card-drop-indicator { height: 78px; border: 2px dashed rgba(96,165,250,0.55); border-radius: 10px; background: rgba(96,165,250,0.1); box-shadow: inset 0 0 0 1px rgba(96,165,250,0.12); animation: dropPulse 0.9s ease-in-out infinite alternate; pointer-events: none; flex-shrink: 0; }
  .card-cover { width: 100%; height: 160px; object-fit: cover; display: block; border-radius: 0; }
  .card-cover-badge { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,0.7); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
  .card-cover-delete { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s; z-index: 2; }
  .card:hover .card-cover-delete { opacity: 1; }
  .card-cover-delete:hover { background: rgba(220,38,38,0.85); }
  .card-body { padding: 12px 14px 10px; }
  .card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
  .card-top-left { flex: 1; min-width: 0; }
  .card-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; opacity: 0; pointer-events: none; transition: opacity 0.15s ease; }
  .card:hover .card-actions, .card:focus-within .card-actions { opacity: 1; pointer-events: auto; }
  .card-action-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.06); background: rgba(20,24,31,0.82); color: var(--text-dim); cursor: pointer; transition: all 0.15s; }
  .card-action-btn:hover { color: var(--text); border-color: var(--border-light); background: var(--surface-hover); }
  .card-action-btn.delete:hover { color: var(--danger); }
  .card-action-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .card-title-wrap { display: flex; align-items: flex-start; gap: 5px; }
  .card-title { color: var(--text); font-size: 14px; font-weight: 400; line-height: 1.4; cursor: default; flex: 1; min-width: 0; overflow-wrap: break-word; word-break: break-word; }
  .card-link { color: var(--accent); text-decoration: none; word-break: break-all; }
  .card-link:hover { text-decoration: underline; }
  .card-title-edit-btn { width: 18px; height: 18px; min-width: 18px; border: none; border-radius: 999px; background: rgba(96,165,250,0.14); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; margin-top: 2px; }
  .card-title-edit-btn:hover { background: rgba(96,165,250,0.26); }
  .card-title-edit-btn svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .card-title-mic-btn { width: 18px; height: 18px; min-width: 18px; border: none; border-radius: 999px; background: rgba(167,139,250,0.14); color: #a78bfa; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; margin-top: 2px; transition: background 0.15s; }
  .card-title-mic-btn:hover { background: rgba(167,139,250,0.28); }
  .card-title-mic-btn.recording { background: rgba(239,68,68,0.2); color: #ef4444; animation: micPulse 0.9s ease-in-out infinite alternate; }
  .card-title-mic-btn svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  @keyframes micPulse { from { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } to { box-shadow: 0 0 0 5px rgba(239,68,68,0); } }
  @keyframes chatMsgFlash { 0%,100% { background: var(--bg); } 30% { background: rgba(167,139,250,0.22); } }
  .chat-msg.own .chat-msg-main.chat-msg-flash { animation: chatMsgFlashOwn 1s ease-out; }
  @keyframes chatMsgFlashOwn { 0%,100% { background: rgba(96,165,250,0.12); } 30% { background: rgba(167,139,250,0.28); } }
  .chat-msg-main.chat-msg-flash { animation: chatMsgFlash 1s ease-out; }
  .card-voice-recording { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.2); border-radius: 8px; cursor: pointer; }
  .screen-rec-panel { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.28); border-radius: 10px; margin-top: 6px; }
  .screen-rec-dot { width: 10px; height: 10px; min-width: 10px; border-radius: 50%; background: #ef4444; animation: recPulse 0.9s ease-in-out infinite alternate; flex-shrink: 0; }
  .screen-rec-dot.paused { animation: none; background: rgba(239,68,68,0.45); }
  @keyframes recPulse { from { opacity: 1; } to { opacity: 0.3; } }
  .screen-rec-timer { font-size: 12px; font-weight: 600; color: #ef4444; flex: 1; white-space: nowrap; }
  .screen-rec-countdown-num { font-size: 22px; font-weight: 700; color: #ef4444; line-height: 1; min-width: 20px; text-align: center; }
  .screen-rec-countdown-label { font-size: 11px; color: rgba(239,68,68,0.75); flex: 1; }
  .screen-rec-btn { border: none; border-radius: 6px; width: 24px; height: 24px; min-width: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; transition: background 0.15s; flex-shrink: 0; }
  .screen-rec-pause-btn { background: rgba(239,68,68,0.15); color: #ef4444; }
  .screen-rec-pause-btn:hover { background: rgba(239,68,68,0.3); }
  .screen-rec-stop { background: rgba(239,68,68,0.15); color: #ef4444; }
  .screen-rec-stop:hover { background: rgba(239,68,68,0.3); }
  .screen-rec-cancel { background: rgba(120,120,120,0.15); color: #aaa; font-size: 13px; }
  .screen-rec-cancel:hover { background: rgba(120,120,120,0.3); color: #ddd; }
  .screen-rec-processing { display: flex; flex-direction: column; gap: 5px; padding: 8px 10px; background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.22); border-radius: 10px; margin-top: 6px; }
  .screen-rec-processing span { font-size: 11px; color: rgba(139,148,255,0.85); }
  .screen-rec-processing-bar { height: 3px; border-radius: 2px; background: rgba(99,102,241,0.2); overflow: hidden; position: relative; }
  .screen-rec-processing-bar::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: rgba(139,148,255,0.9); border-radius: 2px; animation: procSlide 1.2s ease-in-out infinite; }
  @keyframes procSlide { 0% { left: -40%; } 100% { left: 110%; } }

  /* ── Video preview (card) ───────────────────────────── */
  .video-preview { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #0a0b0e; cursor: pointer; }
  .video-preview video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
  .video-preview-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.28); transition: background 0.18s; }
  .video-preview:hover .video-preview-overlay { background: rgba(0,0,0,0.46); }
  .video-preview-play { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.18); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; color: #fff; transition: transform 0.15s, background 0.15s; }
  .video-preview:hover .video-preview-play { transform: scale(1.1); background: rgba(255,255,255,0.28); }
  .video-preview-dur { position: absolute; bottom: 6px; right: 8px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(0,0,0,0.55); border-radius: 4px; padding: 1px 5px; letter-spacing: 0.02em; }

  /* ── Video modal player ─────────────────────────────── */
  .video-modal-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,0.88); display: flex; align-items: center; justify-content: center; animation: fadeIn 0.15s; }
  .video-modal-container { position: relative; max-width: min(92vw, 1100px); width: 100%; display: flex; flex-direction: column; gap: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 32px 80px rgba(0,0,0,0.7); background: #0d0e12; }
  .video-modal-container video { width: 100%; max-height: 72vh; display: block; background: #000; outline: none; }
  .video-modal-close { position: absolute; top: 12px; right: 12px; z-index: 10; width: 32px; height: 32px; border: none; border-radius: 50%; background: rgba(0,0,0,0.5); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(6px); transition: background 0.15s; }
  .video-modal-close:hover { background: rgba(255,255,255,0.18); }
  .video-modal-controls { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%); padding: 20px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
  .vmc-progress { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.15); cursor: pointer; flex-shrink: 0; }
  .vmc-progress:hover { height: 6px; margin-top: -1px; }
  .vmc-progress-buf { position: absolute; top: 0; left: 0; height: 100%; border-radius: 2px; background: rgba(255,255,255,0.2); pointer-events: none; }
  .vmc-progress-fill { position: absolute; top: 0; left: 0; height: 100%; border-radius: 2px; background: #fff; pointer-events: none; transition: width 0.1s linear; }
  .vmc-progress-thumb { position: absolute; top: 50%; transform: translate(-50%, -50%) scale(0); width: 12px; height: 12px; border-radius: 50%; background: #fff; pointer-events: none; transition: transform 0.15s; }
  .vmc-progress:hover .vmc-progress-thumb { transform: translate(-50%, -50%) scale(1); }
  .vmc-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
  .vmc-btn { border: none; background: transparent; color: rgba(255,255,255,0.85); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 6px; padding: 4px; transition: color 0.12s, background 0.12s; }
  .vmc-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
  .vmc-play { width: 36px; height: 36px; }
  .vmc-time { font-size: 12px; color: rgba(255,255,255,0.7); white-space: nowrap; flex: 1; padding-left: 2px; }
  .vmc-vol, .vmc-fs { width: 30px; height: 30px; }
  .card-voice-rec-btn { width: 22px; height: 22px; min-width: 22px; border: none; border-radius: 50%; background: rgba(239,68,68,0.18); color: #ef4444; display: flex; align-items: center; justify-content: center; cursor: pointer; animation: micPulse 0.9s ease-in-out infinite alternate; }
  .card-voice-rec-btn svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .card-voice-rec-label { font-size: 11px; color: #ef4444; opacity: 0.8; }
  .card-voice-notes { display: flex; flex-direction: column; gap: 4px; padding: 6px 0 8px; }
  .card-attachments { display: flex; flex-direction: column; gap: 3px; margin: 6px 0 2px; }
  .card-att-item { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 5px; background: var(--bg); border: 1px solid var(--border); cursor: pointer; min-width: 0; }
  .card-att-item:hover { border-color: var(--border-light); }
  .card-att-ext { font-size: 9px; font-weight: 700; background: rgba(96,165,250,0.18); color: var(--accent); border-radius: 3px; padding: 1px 4px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.03em; }
  .card-att-name { flex: 1; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .card-att-dl { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-dim); display: flex; align-items: center; justify-content: center; border-radius: 3px; background: none; border: none; cursor: pointer; padding: 0; }
  .card-att-dl:hover { color: var(--accent); }
  .card-att-del { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-dim); display: flex; align-items: center; justify-content: center; border-radius: 3px; background: none; border: none; cursor: pointer; padding: 0; }
  .card-att-del:hover { color: #ef4444; }
  .card-voice-author { width: 16px; height: 16px; border-radius: 50%; background: rgba(167,139,250,0.3); color: #a78bfa; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; text-transform: uppercase; }
  .card-voice-note { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: rgba(167,139,250,0.08); border: 1px solid rgba(167,139,250,0.18); border-radius: 8px; transition: border-color 0.2s, background 0.2s; }
  @keyframes voiceNoteFlash { 0%,100% { background: rgba(167,139,250,0.08); border-color: rgba(167,139,250,0.18); } 35% { background: rgba(167,139,250,0.3); border-color: #a78bfa; } }
  .card-voice-note.flash { animation: voiceNoteFlash 1.4s ease; }
  .card-voice-play { width: 22px; height: 22px; border: none; border-radius: 50%; background: rgba(167,139,250,0.2); color: #a78bfa; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
  .card-voice-play:hover { background: rgba(167,139,250,0.35); }
  .card-voice-play svg { width: 10px; height: 10px; fill: currentColor; stroke: none; }
  .card-voice-wave { display: flex; align-items: center; gap: 1.5px; flex: 1; height: 20px; cursor: pointer; }
  .card-voice-wave:hover .card-voice-bar { background: rgba(167,139,250,0.6); }
  .card-voice-wave:hover .card-voice-bar.active { background: #c4b5fd; }
  .card-voice-bar { width: 2px; border-radius: 1px; background: rgba(167,139,250,0.4); flex-shrink: 0; }
  .card-voice-bar.active { background: #a78bfa; }
  .card-voice-time { font-size: 10px; color: var(--text-dim); flex-shrink: 0; min-width: 28px; text-align: right; }
  .card-voice-del { width: 16px; height: 16px; border: none; background: none; color: var(--text-dim); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; border-radius: 50%; padding: 0; }
  .card-voice-del:hover { color: var(--danger); background: rgba(239,68,68,0.1); }
  .card-desc { color: var(--text-muted); font-size: 12.5px; margin-top: 6px; line-height: 1.3; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  @keyframes dropPulse { from { background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.38); } to { background: rgba(96,165,250,0.16); border-color: rgba(96,165,250,0.7); } }
  @keyframes cardFlashPulse {
    0% { box-shadow: 0 0 0 0 rgba(96,165,250,0); border-color: var(--border-light); }
    20% { box-shadow: 0 0 0 2px rgba(96,165,250,0.28), 0 12px 28px rgba(0,0,0,0.24); border-color: rgba(96,165,250,0.9); }
    100% { box-shadow: 0 0 0 0 rgba(96,165,250,0), 0 4px 12px rgba(0,0,0,0.18); border-color: var(--border); }
  }

  /* Labels */
  .label { padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.3px; white-space: nowrap; color: #12202d; }
  .labels-row { display: flex; flex-wrap: wrap; gap: 4px; }
  .reminder-badge { min-width: 22px; padding: 2px 6px; background: rgba(239,68,68,0.18); color: #fecaca; border: 1px solid rgba(239,68,68,0.35); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
  .reminder-badge:hover { background: rgba(239,68,68,0.26); border-color: rgba(239,68,68,0.5); }
  .reminder-badge svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .label-bars { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px 0; }
  .label-bar { height: 8px; min-width: 36px; border-radius: 4px; flex-grow: 1; max-width: 60px; transition: all 0.15s; }
  .reminder-section { margin-bottom: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,0.02); }
  .reminder-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .reminder-mode-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .reminder-mode-btn { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
  .reminder-mode-btn.active { background: rgba(239,68,68,0.16); border-color: rgba(239,68,68,0.45); color: #fecaca; }
  .reminder-section .tab-switch-btn.active { background: #ef4444; }
  .reminder-fields { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
  .reminder-time-picker { position: relative; width: 140px; }
  .reminder-time-trigger { width: 100%; min-height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.15s; }
  .reminder-time-trigger:hover,
  .reminder-time-picker.open .reminder-time-trigger { border-color: rgba(239,68,68,0.45); box-shadow: 0 0 0 1px rgba(239,68,68,0.16); }
  .reminder-time-trigger-icon { width: 18px; height: 18px; color: var(--text-dim); flex: 0 0 auto; }
  .reminder-time-trigger-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }
  .reminder-time-popover { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: 210px; padding: 8px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 18px 42px rgba(0,0,0,0.38); display: flex; gap: 8px; }
  .reminder-time-column { flex: 1; min-width: 0; }
  .reminder-time-column-label { padding: 4px 6px 8px; color: var(--text-dim); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
  .reminder-time-list { max-height: 176px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 2px; }
  .reminder-time-option { width: 100%; min-height: 30px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--text-muted); font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.15s; }
  .reminder-time-option:hover { background: rgba(255,255,255,0.04); color: var(--text); }
  .reminder-time-option.active { background: rgba(239,68,68,0.16); border-color: rgba(239,68,68,0.42); color: #fecaca; }
  .reminder-summary { margin-top: 12px; color: var(--text-dim); font-size: 12px; line-height: 1.45; }
  .reminder-delete { margin-top: 12px; }

  /* Comments */
  .comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .comment:last-child { border-bottom: none; }
  .comment-avatar { width: 28px; height: 28px; min-width: 28px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text); }
  .comment-body { flex: 1; }
  .comment-author { font-size: 12px; font-weight: 700; color: var(--text); }
  .comment-time { font-size: 10px; color: var(--text-dim); margin-left: 8px; font-weight: 400; }
  .comment-text { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
  .comment-delete { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 12px; opacity: 0; transition: opacity 0.15s; }
  .comment:hover .comment-delete { opacity: 1; }
  .comment-delete:hover { color: var(--danger); }
  .comment-input-row { display: flex; gap: 8px; margin-top: 10px; }

  /* Checklist inline */
  .cl-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  .cl-bar { flex: 1; height: 3px; background: var(--bg); border-radius: 2px; overflow: hidden; }
  .cl-bar-fill { height: 100%; border-radius: 2px; transition: width 0.3s; }
  .cl-count { font-size: 10px; font-weight: 700; white-space: nowrap; }
  .cl-item { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 3px 4px; border-radius: 4px; transition: background 0.1s; }
  .cl-item:hover { background: var(--bg); }
  .cl-item-del { width: 16px; height: 16px; min-width: 16px; border: none; background: none; color: var(--text-dim); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 3px; flex-shrink: 0; margin-left: auto; visibility: hidden; }
  .cl-item:hover .cl-item-del { visibility: visible; }
  .cl-item-del:hover { color: var(--danger); }
  .cl-item-del svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .cl-quick-add { margin-top: -24px; height: 24px; display: flex; justify-content: flex-end; align-items: center; pointer-events: none; position: relative; z-index: 1; }
  .cl-check { width: 16px; height: 16px; min-width: 16px; border-radius: 3px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
  .cl-check.unchecked { border: 1.5px solid rgba(174,182,194,0.55); }
  .cl-check.checked { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; }
  .cl-text { font-size: 13px; line-height: 1.3; color: #c8d0db; }
  .cl-text.done { color: var(--text-dim); text-decoration: line-through; }
  .cl-text.pending { color: #c8d0db; }
  .cl-quick-add { margin-top: -24px; height: 24px; display: flex; justify-content: flex-end; align-items: center; pointer-events: none; }
  .cl-quick-btn { width: 18px; height: 18px; border: none; border-radius: 999px; background: rgba(96,165,250,0.14); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
  .cl-quick-btn:hover { background: rgba(96,165,250,0.22); }
  .cl-tg-btn { height: 18px; padding: 0 6px; border: none; border-radius: 999px; background: rgba(39,174,239,0.15); color: #29b6f6; display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; line-height: 1; cursor: pointer; flex: 0 0 auto; white-space: nowrap; font-family: 'DM Sans', sans-serif; transition: background 0.15s; }
  .cl-tg-btn:hover { background: rgba(39,174,239,0.28); }
  .cl-tg-btn.sent { background: rgba(34,197,94,0.2); color: var(--success); }
  .cl-quick-editor { margin-top: 6px; display: flex; align-items: center; gap: 6px; }
  .cl-quick-input { flex: 1; min-width: 0; border: 1px solid var(--border-light); border-radius: 8px; background: rgba(15,23,42,0.45); color: var(--text); padding: 5px 8px; font-size: 12px; font-family: 'DM Sans', sans-serif; outline: none; }
  .cl-quick-input::placeholder { color: var(--text-dim); }
  .cl-quick-add .cl-quick-btn { pointer-events: auto; }
  .recheck-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px; border: 1px solid var(--border); background: none; cursor: pointer; font-size: 11px; color: var(--text-dim); font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
  .recheck-toggle:hover { border-color: var(--accent); color: var(--accent); }
  .recheck-toggle.active { background: rgba(96,165,250,0.15); border-color: var(--accent); color: var(--accent); }
  .recheck-toggle svg { width: 11px; height: 11px; flex-shrink: 0; }

  /* Add card button */
  .add-card-btn { padding: 8px 12px; border-radius: 8px; border: 1px dashed var(--border); background: transparent; color: var(--text-dim); font-size: 13px; cursor: pointer; text-align: left; transition: all 0.15s; font-family: 'DM Sans', sans-serif; width: 100%; flex-shrink: 0; }
  .add-card-btn:hover { border-color: var(--accent); color: var(--accent); }
  .add-card-row { display: flex; gap: 6px; }
  .add-card-row .add-card-btn { width: auto; flex: 1; flex-shrink: 1; }
  .add-checklist-btn { padding: 0; width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; border: 1px dashed var(--border); background: transparent; color: var(--text-dim); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s; }
  .add-checklist-btn:hover { border-color: var(--accent); color: var(--accent); }
  .add-checklist-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .add-card-input { padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; outline: none; font-family: 'DM Sans', sans-serif; width: 100%; }
  .add-card-input:focus { border-color: var(--accent); }

  /* Add column */
  .add-col-btn { min-width: 280px; width: 280px; padding: 40px; border-radius: 12px; border: 2px dashed var(--border); background: transparent; color: var(--text-dim); font-size: 14px; cursor: pointer; text-align: center; transition: all 0.2s; font-family: 'DM Sans', sans-serif; font-weight: 600; }
  .add-col-btn:hover { border-color: var(--accent); color: var(--accent); }
  .add-col-form { min-width: 280px; width: 280px; background: var(--surface); border-radius: 12px; border: 1px solid var(--accent); padding: 16px; }

  /* Modal overlay */
  .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
  .modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 560px; border: 1px solid var(--border); box-shadow: 0 24px 48px rgba(0,0,0,0.4); max-height: 90vh; overflow-y: auto; }
  .modal-content { padding: 24px; }
  .modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
  .modal-header h3 { font-size: 18px; font-weight: 700; }
  .modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 20px; padding: 0 4px; }
  .field-label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
  .field-input { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 14px; outline: none; font-family: 'DM Sans', sans-serif; }
  .field-input:focus { border-color: var(--accent); }
  .field-textarea { resize: vertical; }

  /* Checklist editor */
  .cle-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; background: var(--bg); transition: opacity 0.15s; }
  .cle-item.cle-dragging { opacity: 0.3; }
  .cle-drop-indicator { height: 32px; border: 2px dashed var(--accent); border-radius: 6px; background: rgba(96,165,250,0.07); pointer-events: none; flex-shrink: 0; }
  .cle-drag-handle { display: flex; align-items: center; cursor: grab; color: var(--text-dim); opacity: 0.4; flex-shrink: 0; }
  .cle-drag-handle:hover { opacity: 0.8; }
  .cle-drag-handle svg { width: 14px; height: 14px; }
  .cle-check { width: 18px; height: 18px; min-width: 18px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
  .cle-check.unchecked { border: 2px solid var(--border-light); }
  .cle-check.checked { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
  .cle-input { flex: 1; background: transparent; border: none; color: var(--text); font-size: 13px; outline: none; font-family: 'DM Sans', sans-serif; }
  .cle-input.done { color: var(--text-dim); text-decoration: line-through; }
  .cle-del { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; padding: 0 2px; opacity: 0.5; }
  .cle-del:hover { opacity: 1; color: var(--danger); }

  /* Image grid */
  .img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-bottom: 10px; }
  .img-thumb { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--bg); }
  .img-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
  .img-thumb-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,0.7); border: none; color: #fff; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .upload-zone { border: 2px dashed var(--border); border-radius: 8px; padding: 16px 12px; text-align: center; cursor: pointer; transition: all 0.2s; background: var(--bg); }
  .upload-zone:hover { border-color: var(--accent); }
  .attach-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
  .attach-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--bg); }
  .attach-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
  .attach-icon { width: 28px; height: 28px; min-width: 28px; border-radius: 8px; background: rgba(96,165,250,0.16); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 14px; }
  .attach-meta { min-width: 0; }
  .attach-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .attach-size { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
  .attach-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .attach-btn { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 12px; cursor: pointer; font-family: 'DM Sans', sans-serif; }
  .attach-btn:hover { color: var(--text); border-color: var(--border-light); }

  /* Label toggle */
  .label-toggle { padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; border: 2px solid transparent; }
  .chat-typing-msg { align-items: center; opacity: 0.75; }
  .chat-typing-text { font-size: 12px; color: var(--text-dim); font-style: italic; padding: 3px 8px; }
  .chat-msg { align-items: flex-start; }
  .chat-msg-col { display: flex; flex-direction: column; max-width: min(100%, 440px); position: relative; }
  .chat-msg.own .chat-msg-col { order: 2; align-items: flex-end; }
  .chat-msg-main { max-width: 100%; }
  .chat-reaction-picker { display: none; flex-direction: row; gap: 2px; padding: 3px 6px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 3px 10px rgba(0,0,0,0.3); position: absolute; top: 100%; left: 0; z-index: 10; margin-top: 0; padding-top: 8px; width: max-content; }
  .chat-msg.own .chat-reaction-picker { left: auto; right: 0; }
  .chat-msg-col:hover .chat-reaction-picker { display: flex; }
  .chat-msg-col::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 40px; }
  .chat-reaction-btn { font-size: 15px; cursor: pointer; padding: 1px 3px; border: none; background: transparent; border-radius: 6px; line-height: 1.4; transition: transform 0.1s; }
  .chat-reaction-btn:hover { transform: scale(1.3); }
  .chat-reactions-inner { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
  .chat-reaction-badge { display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px 2px 4px; border-radius: 10px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); background: var(--bg); transition: background 0.15s, border-color 0.15s; user-select: none; }
  .chat-reaction-badge:hover { border-color: var(--accent); background: rgba(96,165,250,0.1); }
  .chat-reaction-badge.mine { border-color: rgba(96,165,250,0.5); background: rgba(96,165,250,0.12); }
  .chat-reaction-count { font-size: 11px; color: var(--text-dim); }
  .attach-ext { font-size: 8px; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: var(--accent); line-height: 1; }
  .chat-file-icon .attach-ext { color: var(--text-muted); }
  .col-chip { padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; border: 2px solid var(--border); background: transparent; color: var(--text-dim); font-family: 'DM Sans', sans-serif; }
  .col-chip:hover { border-color: var(--accent); color: var(--accent); background: rgba(96,165,250,0.10); }

  /* Share modal */
  .share-section { margin-top: 16px; padding: 16px; background: var(--bg); border-radius: 8px; }
  .share-input-row { display: flex; gap: 8px; margin-top: 0; }
  .share-input { flex: 1; min-width: 0; width: auto; }
  .shared-user { display: flex; align-items: center; justify-content: space-between; padding: 8px; border-radius: 6px; margin-top: 6px; }
  .shared-user:hover { background: var(--surface-hover); }
  .shared-user-info { display: flex; align-items: center; gap: 8px; }
  .shared-user-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text); }
  .shared-user-email { font-size: 12px; color: var(--text-muted); }
  .shared-user-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .shared-user-remove:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

  /* Context menu */
  .ctx-menu { position: fixed; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px; z-index: 3000; box-shadow: 0 8px 24px rgba(0,0,0,0.4); min-width: 160px; }
  .ctx-item { width: 100%; padding: 8px 12px; background: none; border: none; color: var(--text); font-size: 13px; cursor: pointer; text-align: left; border-radius: 4px; font-family: 'DM Sans', sans-serif; display: block; }
  .ctx-item:hover { background: var(--surface-hover); }
  .ctx-item.danger { color: var(--danger); }
  .ctx-item-inner { display: inline-flex; align-items: center; gap: 10px; }
  .ctx-item-icon { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: currentColor; flex-shrink: 0; }
  .ctx-item-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
  .ctx-linked-info { display: flex; align-items: center; gap: 8px; padding: 8px 12px 6px; }
  .ctx-linked-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
  .ctx-linked-board-name { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
  .ctx-linked-owner { display: block; font-size: 11px; color: var(--text-dim); }
  .ctx-separator { height: 1px; background: var(--border); margin: 4px 0; }

  /* Lightbox */
  .lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2000; gap: 10px; }
  .lightbox img { max-width: 88vw; max-height: 82vh; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); cursor: zoom-out; flex-shrink: 0; }
  .lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255,255,255,0.12); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2001; transition: background 0.15s; }
  .lb-arrow:hover { background: rgba(255,255,255,0.26); }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
  .lb-arrow svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
  .lb-title { color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 500; text-align: center; max-width: 70vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; flex-shrink: 0; }

  /* Loading */
  .loading { display: flex; align-items: center; justify-content: center; height: 100vh; color: var(--text-muted); font-size: 16px; }
  .spinner { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 12px; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* User menu */
  .user-menu { position: absolute; top: 52px; right: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px; z-index: 500; box-shadow: 0 8px 24px rgba(0,0,0,0.3); min-width: 200px; }
  .user-menu-info { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
  .user-menu-name { font-size: 14px; font-weight: 700; }
  .user-menu-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
  .user-menu-item { width: 100%; padding: 9px 12px; background: none; border: none; color: var(--text); font-size: 13px; cursor: pointer; text-align: left; border-radius: 6px; font-family: 'DM Sans', sans-serif; display: flex; align-items: center; gap: 10px; }
  .user-menu-item:hover { background: var(--surface-hover); }
  .user-menu-item.danger { color: var(--danger); }
  .user-menu-item .ctx-item-inner { display: inline-flex; align-items: center; gap: 10px; }

  .footer-icons { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; color: var(--text-dim); font-size: 12px; }
  .footer-icons-left { display: flex; align-items: center; gap: 12px; min-height: 16px; }
  .footer-icons .fi { display: flex; align-items: center; gap: 5px; }
  .footer-icons .fi svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .flat-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .board-empty { padding: 28px 18px; text-align: center; color: var(--text-dim); }

  /* Reflection board */
  .reflection-layout { display: flex; flex-direction: row; flex: 1; height: calc(100vh - 120px); overflow: hidden; background: var(--bg); }
  .reflection-sidebar { width: 220px; min-width: 220px; flex-shrink: 0; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; overflow-y: auto; }
  .reflection-sidebar-title { padding: 16px 16px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .refl-folder-add { border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 4px; font-family: 'DM Sans', sans-serif; }
  .refl-folder-add:hover { color: var(--accent); background: rgba(96,165,250,0.08); }
  .refl-folder-head { display: flex; align-items: center; gap: 6px; padding: 9px 8px 9px 14px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-muted); user-select: none; }
  .refl-folder-head:hover { background: var(--overlay-1); }
  .refl-folder-arrow { width: 12px; flex-shrink: 0; color: var(--text-dim); font-size: 10px; }
  .refl-folder-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .refl-folder-count { font-size: 10px; color: var(--text-dim); background: var(--overlay-2); border-radius: 8px; padding: 1px 6px; flex-shrink: 0; }
  .refl-folder-btn { opacity: 0; border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 4px; line-height: 1; flex-shrink: 0; transition: opacity 0.12s; }
  .refl-folder-head:hover .refl-folder-btn { opacity: 1; }
  .refl-folder-btn:hover { color: var(--danger); background: rgba(239,68,68,0.1); }
  .refl-folder-rename { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-size: 12px; padding: 2px 6px; outline: none; font-family: 'DM Sans', sans-serif; }
  .refl-folder-items .reflection-item { padding-left: 26px; }

  /* ── Экспорт размышлений в PDF (печать) ── */
  .reflection-print { display: none; }
  @page { margin: 18mm; }
  @media print {
    body.printing-reflection #app,
    body.printing-reflection .toast-stack { display: none !important; }
    body.printing-reflection { background: #fff !important; }
    body.printing-reflection .reflection-print { display: block !important; }
  }
  .reflection-print { color: #111; font-family: 'DM Sans', Arial, sans-serif; font-size: 12pt; line-height: 1.65; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .reflection-print .refl-print-title { font-size: 22pt; font-weight: 800; margin: 0 0 14pt; color: #111; }
  .reflection-print h1 { font-size: 19pt; font-weight: 800; margin: 14pt 0 8pt; color: #111; }
  .reflection-print h2 { font-size: 15pt; font-weight: 700; margin: 12pt 0 6pt; color: #111; }
  .reflection-print p { margin: 0 0 6pt; }
  .reflection-print ul { padding-left: 18pt; margin: 6pt 0; }
  .reflection-print li { margin: 3pt 0; }
  .reflection-print hr { border: none; border-top: 1pt solid #999; margin: 12pt 0; }
  .reflection-print blockquote { border-left: 3pt solid #60a5fa; padding: 6pt 12pt; margin: 10pt 0; font-style: italic; color: #333; background: rgba(96,165,250,0.08); border-radius: 0 6pt 6pt 0; }
  .reflection-print a { color: #1d4ed8; }
  .reflection-print b, .reflection-print strong { color: #111; }
  .reflection-print .reflection-ref { display: block; border: 2pt solid rgba(34,197,94,0.9); background: rgba(34,197,94,0.12); border-radius: 6pt; padding: 6pt 10pt; margin: 8pt 0; page-break-inside: avoid; }
  .reflection-print .reflection-quote { display: block; border: 2pt solid rgba(249,115,22,0.9); background: rgba(249,115,22,0.12); border-radius: 6pt; padding: 6pt 10pt; margin: 8pt 0; page-break-inside: avoid; }
  .reflection-print .reflection-quote-bracket { color: rgba(234,88,12,0.95); font-weight: 800; }
  .reflection-print .refl-print-label { display: block; margin-top: 5pt; font-size: 10pt; font-weight: 800; }
  .reflection-sidebar-empty { padding: 12px 16px; font-size: 12px; color: var(--text-dim); line-height: 1.6; }
  .reflection-item { position: relative; padding: 10px 32px 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.45; transition: background 0.12s; }
  .reflection-item:hover { background: var(--surface-hover); }
  .reflection-item-text { color: var(--text); word-break: break-word; }
  .reflection-item-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 5px; border-radius: 4px; opacity: 0; transition: opacity 0.12s; }
  .reflection-item:hover .reflection-item-del { opacity: 1; }
  .reflection-item-del:hover { color: var(--danger); background: rgba(239,68,68,0.1); }
  .reflection-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
  .reflection-toolbar { display: flex; align-items: center; gap: 4px; padding: 10px 24px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; flex-shrink: 0; }
  .reflection-tool-btn { padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; white-space: nowrap; }
  .reflection-tool-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(96,165,250,0.08); }
  .reflection-tool-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(96,165,250,0.15); }
  .reflection-toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; flex-shrink: 0; }
  .reflection-color-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 3px; border: 1px solid rgba(255,255,255,0.2); }
  .reflection-editor { flex: 1; overflow-y: auto; padding: 48px 60px; font-size: 17px; line-height: 1.75; color: var(--text); outline: none; font-family: 'DM Sans', sans-serif; caret-color: var(--accent); max-width: 860px; width: 100%; margin: 0 auto; box-sizing: border-box; }
  .reflection-editor:empty::before { content: attr(data-placeholder); color: var(--text-dim); pointer-events: none; }
  .reflection-editor h1 { font-size: 32px; font-weight: 800; line-height: 1.25; margin: 24px 0 12px; color: var(--text); }
  .reflection-editor h2 { font-size: 22px; font-weight: 700; line-height: 1.35; margin: 20px 0 10px; color: var(--text); }
  .reflection-editor p { margin: 0 0 8px; }
  .reflection-editor > p { min-height: 1.75em; }
  .reflection-editor > .reflection-ref + p, .reflection-editor > p:last-child { min-height: 2.5em; }
  .reflection-editor ul { padding-left: 24px; margin: 8px 0; }
  .reflection-editor li { margin: 4px 0; }
  .reflection-editor hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
  .reflection-editor blockquote { border-left: 4px solid var(--accent); margin: 20px 0; padding: 10px 20px; color: var(--text-muted); font-style: italic; background: var(--surface); border-radius: 0 8px 8px 0; }
  .reflection-editor b, .reflection-editor strong { font-weight: 700; color: var(--text); }
  .reflection-editor i, .reflection-editor em { font-style: italic; color: var(--text-muted); }
  .reflection-ref { display: block; width: 100%; box-sizing: border-box; background: rgba(34,197,94,0.08); border: 2px solid rgba(34,197,94,0.7); border-radius: 8px; padding: 8px 12px 6px; margin: 4px 0; cursor: text; user-select: text; box-shadow: 0 0 0 3px rgba(34,197,94,0.07); }
  .reflection-ref-pulse { background: rgba(34,197,94,0.22); border-color: rgba(34,197,94,1); box-shadow: 0 0 0 4px rgba(34,197,94,0.15); transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; }
  .reflection-quote { display: block; width: 100%; box-sizing: border-box; background: rgba(249,115,22,0.08); border: 2px solid rgba(249,115,22,0.7); border-radius: 8px; padding: 8px 12px 6px; margin: 4px 0; cursor: text; user-select: text; box-shadow: 0 0 0 3px rgba(249,115,22,0.07); }
  .reflection-quote-bracket { color: rgba(249,115,22,0.9); font-weight: 800; font-size: 1.15em; line-height: 1; }
  .reflection-card-label { display: block; margin-top: 8px; }
  .reflection-card-label-input { display: block; width: 100%; border: none; border-bottom: 1px dashed rgba(96,165,250,0.35); background: transparent; font-size: 14px; font-style: normal; font-weight: 700; color: var(--accent); padding: 2px 0; outline: none; font-family: 'DM Sans', sans-serif; box-sizing: border-box; cursor: text; }
  .reflection-card-label-input:focus { border-bottom-color: var(--accent); }
  .reflection-card-label-input::placeholder { color: var(--text-dim); }
  @media (max-width: 900px) {
    .reflection-layout { height: calc(100vh - 110px); }
    .reflection-sidebar { width: 160px; min-width: 160px; }
    .reflection-editor { padding: 28px 20px; font-size: 18px; }
    .reflection-toolbar { padding: 10px 16px; }
    .reflection-tool-btn { font-size: 13px; padding: 8px 12px; }
  }

  @media (max-width: 1100px) {
    .board-chat { width: 280px; min-width: 280px; flex-basis: 280px; max-height: calc(100vh - 160px); }
    .board-chat.collapsed { width: 54px; min-width: 54px; flex-basis: 54px; }
  }
  @media (max-width: 900px) {
    .header { padding: 10px 14px; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
    .header-left, .header-right { width: 100%; }
    .header-right { justify-content: flex-start; flex-wrap: wrap; }
    .header .stats { display: none; }
    .tab-bar { padding: 0 10px; min-height: 52px; }
    .tab { height: 46px; padding: 0 14px; }
    .tab-name { font-size: 15px; }
    .board-layout { flex-direction: column; gap: 0; padding: 0; min-height: auto; height: auto; overflow: visible; }
    .board-wrap { overflow: visible; }
    .board { padding: 12px 6vw 20px; gap: 4vw; min-height: auto; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scroll-padding-left: 6vw; width: 100%; }
    .column { width: 88vw; min-width: 88vw; max-width: 88vw; scroll-snap-align: start; border-radius: 16px; }
    .add-col-btn, .add-col-form { width: 88vw; min-width: 0; }
    .col-header { padding: 20px 20px 14px; }
    .col-title { font-size: 20px; letter-spacing: 0; }
    .col-count { font-size: 14px; }
    .col-cards { padding: 8px 14px 16px; gap: 14px; max-height: none; }
    .card { border-radius: 14px; }
    .card-body { padding: 18px 20px 14px; }
    .card-title { font-size: 18px; line-height: 1.4; }
    .card-actions { opacity: 1; pointer-events: auto; }
    .card-action-btn { width: 32px; height: 32px; border-radius: 8px; }
    .card-action-btn svg { width: 16px; height: 16px; }
    .card-label { font-size: 12px; padding: 4px 10px; border-radius: 6px; }
    .footer-icons { font-size: 15px; gap: 16px; margin-top: 10px; }
    .footer-icons .fi svg { width: 20px; height: 20px; }
    .footer-icons-left { gap: 16px; }
    .cl-item { padding: 6px 4px; gap: 10px; font-size: 15px; }
    .cl-item-del { display: flex; width: 22px; height: 22px; min-width: 22px; }
    .cl-item-del svg { width: 14px; height: 14px; }
    .add-card-btn { padding: 14px 16px; font-size: 16px; border-radius: 12px; }
    .add-card-input { padding: 14px 16px; font-size: 16px; border-radius: 12px; }
    .add-card-row { gap: 10px; }
    .add-checklist-btn { width: 48px; height: 48px; border-radius: 12px; }
    .col-add-wrap { padding: 4px 14px 16px; }
    .card-drop-indicator { height: 100px; border-radius: 14px; }
    .board-chat { display: none; }
    .board-chat.mobile-open { display: flex; position: fixed; inset: 0; z-index: 300; width: 100%; max-height: 100dvh; border-radius: 0; border: none; }
    .chat-msg-main { max-width: min(100%, 80vw); }
    .modal { width: min(calc(100vw - 16px), 760px); max-height: calc(100vh - 16px); }
    .toast-stack { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
    .toast { width: auto; }
    .tab-switch { display: none; }
    .tab-chat-btn { display: inline-flex; font-size: 15px; padding: 8px 14px; }
    .tab-chat-btn svg { width: 20px; height: 20px; }
    .user-menu-push { display: flex; }
    .btn { padding: 10px 18px; font-size: 15px; }
    .btn-small { padding: 10px 16px; font-size: 14px; }
    /* Tab bar */
    .tab-dot { width: 12px; height: 12px; }
    .tab-icon { width: 18px; height: 18px; }
    .tab-icon svg { width: 18px; height: 18px; }
    .tab-badge { min-width: 22px; height: 22px; font-size: 12px; padding: 0 7px; }
    .tab-add { width: 42px; height: 42px; font-size: 22px; border-radius: 10px; }
    /* Chat (mobile-open modal) */
    .chat-head { padding: 16px 20px 0; }
    .chat-head-top { padding-bottom: 14px; }
    .chat-title { font-size: 18px; }
    .chat-tab-btn { font-size: 15px; padding: 8px 16px; }
    .chat-body { padding: 16px; gap: 12px; }
    .chat-avatar { width: 36px; height: 36px; min-width: 36px; }
    .chat-avatar-fallback { width: 36px; height: 36px; min-width: 36px; font-size: 14px; }
    .chat-msg { gap: 10px; }
    .chat-msg-main { padding: 12px 14px; border-radius: 16px; }
    .chat-text { font-size: 16px; line-height: 1.45; }
    .chat-time { font-size: 13px; }
    .chat-empty { font-size: 16px; }
    .chat-card-link { padding: 12px 14px; border-radius: 14px; }
    .chat-card-link-title { font-size: 15px; }
    .chat-card-link-meta { font-size: 13px; }
    .chat-form { padding: 16px; gap: 12px; }
    .chat-textarea { min-height: 96px; font-size: 16px; }
    .chat-actions { gap: 12px; }
    .chat-tools { gap: 10px; }
  }
  @media (max-width: 640px) {
    .header h1 { font-size: 20px; }
    .header-right .btn { padding: 10px 14px; font-size: 14px; }
    .tab-name { font-size: 15px; }
    .board-layout { padding: 8px 0; }
    .chat-head { padding: 12px; }
    .chat-form { padding: 10px; }
    .chat-textarea { min-height: 72px; }
    .chat-actions { gap: 8px; }
    .chat-tools { gap: 6px; }
    .chat-audio-card { min-width: 0; width: 100%; padding: 10px; }
    .chat-audio-play { width: 21px; height: 21px; min-width: 21px; }
    .chat-audio-play svg { width: 26px; height: 26px; }
    .chat-audio-wave { height: 24px; }
    .chat-audio-bar { width: 3px; min-height: 7px; }
  }

  /* ── Доводка светлой темы ────────────────────────────────────────────── */
  /* Салатовый логотип на белом нечитаем — на светлой теме даём ему подложку */
  body.light .logo { background: #1a1d23; border-radius: 10px; padding: 6px; }
  /* Полоса прокрутки на светлом фоне */
  body.light ::-webkit-scrollbar-thumb { background: #c3c8d1; }
  /* Кнопка входа через Google на светлой теме нуждается в рамке */
  body.light .google-btn { border: 1px solid var(--border); }
  /* Зоны размышлений: на белом фоне заливка должна быть плотнее */
  body.light .reflection-ref { background: rgba(34,197,94,0.10); box-shadow: 0 0 0 3px rgba(34,197,94,0.05); }
  body.light .reflection-quote { background: rgba(249,115,22,0.10); box-shadow: 0 0 0 3px rgba(249,115,22,0.05); }
  body.light .reflection-editor blockquote { background: rgba(37,99,235,0.06); }
  /* Мягкие тени вместо чёрных */
  body.light .modal { box-shadow: var(--shadow-md); }
  body.light .card { box-shadow: 0 1px 2px rgba(15,23,42,0.06); }
  body.light .card:hover { box-shadow: 0 4px 10px rgba(15,23,42,0.10); }
  /* Плавный переход при переключении темы */
  body, .board, .column, .card, .tab-bar, .chat-panel, .modal, .reflection-sidebar, .reflection-editor {
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  }

  body.light .tab-bar,
  body.light .header,
  body.light .chat-panel,
  body.light .reflection-sidebar,
  body.light .reflection-toolbar { background: #ffffff; }
  body.light .reflection-editor { background: #ffffff; }
  /* Карточка на светлой колонке: белая с мягкой тенью */
  body.light .card { border-color: #e4e7ec; }
  body.light .card:hover { border-color: var(--border-light); }
