/* ============================================================
   Task Manager - design system "Berry Calm"
   Mobile first. Sidebar on wide screens, bottom tab bar on phones.
   Light / dark follow the phone unless the user picks one (Account > Appearance).
   All motion respects "reduce motion" (see the end of this file).
   ============================================================ */
:root {
  --bg: #f6f5fa; --card: #ffffff; --solid: #ffffff; --ink: #1d1926; --mute: #6b667a; --line: #e7e4ef; --line-soft: #f1eff7;
  --accent: #a0246a; --accent-ink: #ffffff; --accent-soft: rgba(160, 36, 106, .09); --accent-strong: #7d1a52; --accent-2: #d0408c;
  --brand-from: #3b1030; --brand-to: #8f2a6b;
  --ok: #1f8a3e; --ok-soft: rgba(31, 138, 62, .12); --warn: #a8610a; --warn-soft: rgba(246, 183, 60, .22); --bad: #c0282d; --bad-soft: rgba(192, 40, 45, .1); --info: #2260d6; --info-soft: rgba(34, 96, 214, .1);
  --c-new: #98a0b6; --c-active: #5b8def; --c-wait: #f6b73c; --c-late: #ef5b6c; --c-ok: #3fb6a8;
  --shadow-sm: 0 1px 2px rgba(30, 20, 50, .05);
  --shadow: 0 1px 2px rgba(30, 20, 50, .04), 0 6px 20px rgba(30, 20, 50, .06);
  --shadow-lg: 0 18px 60px rgba(30, 10, 50, .28);
  --radius: 18px; --radius-sm: 12px;
  --nav-h: 62px; --side-w: 252px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #100d16; --card: #1b1624; --solid: #1b1624; --ink: #efeaf5; --mute: #a69fb2; --line: rgba(255, 255, 255, .1); --line-soft: rgba(255, 255, 255, .05);
  --accent: #ea93c8; --accent-ink: #22101c; --accent-soft: rgba(234, 147, 200, .14); --accent-strong: #f2aad3; --accent-2: #ff8fc8;
  --brand-from: #2a0e20; --brand-to: #5d2048;
  --ok: #6ec274; --ok-soft: rgba(110, 194, 116, .15); --warn: #f0b64e; --warn-soft: rgba(240, 182, 78, .15); --bad: #f07272; --bad-soft: rgba(240, 114, 114, .15); --info: #7ab0ff; --info-soft: rgba(122, 176, 255, .14);
  --shadow-sm: none; --shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 60px rgba(0, 0, 0, .65);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100d16; --card: #1b1624; --solid: #1b1624; --ink: #efeaf5; --mute: #a69fb2; --line: rgba(255, 255, 255, .1); --line-soft: rgba(255, 255, 255, .05);
    --accent: #ea93c8; --accent-ink: #22101c; --accent-soft: rgba(234, 147, 200, .14); --accent-strong: #f2aad3; --accent-2: #ff8fc8;
    --brand-from: #2a0e20; --brand-to: #5d2048;
    --ok: #6ec274; --ok-soft: rgba(110, 194, 116, .15); --warn: #f0b64e; --warn-soft: rgba(240, 182, 78, .15); --bad: #f07272; --bad-soft: rgba(240, 114, 114, .15); --info: #7ab0ff; --info-soft: rgba(122, 176, 255, .14);
    --shadow-sm: none; --shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 60px rgba(0, 0, 0, .65);
    color-scheme: dark;
  }
}

/* accent colours (Account > Appearance) */
:root[data-accent="ocean"] { --accent: #1769c9; --accent-strong: #0f4fa0; --accent-2: #2fa8f5; --accent-soft: rgba(23,105,201, .1); --brand-from: #0a2a5c; --brand-to: #1f7ae0; }
:root[data-theme="dark"][data-accent="ocean"] { --accent: #6db3ff; --accent-strong: #9ccaff; --accent-2: #59c2ff; --accent-soft: rgba(109,179,255, .15); --brand-from: #0a2347; --brand-to: #1b5cae; --accent-ink: #14101a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-accent="ocean"] { --accent: #6db3ff; --accent-strong: #9ccaff; --accent-2: #59c2ff; --accent-soft: rgba(109,179,255, .15); --brand-from: #0a2347; --brand-to: #1b5cae; --accent-ink: #14101a; } }
:root[data-accent="forest"] { --accent: #1f8a4c; --accent-strong: #146b39; --accent-2: #3cc77a; --accent-soft: rgba(31,138,76, .1); --brand-from: #0d3b24; --brand-to: #2a9d5f; }
:root[data-theme="dark"][data-accent="forest"] { --accent: #7bd9a0; --accent-strong: #a6e8bf; --accent-2: #5fdc92; --accent-soft: rgba(123,217,160, .15); --brand-from: #0b2c1b; --brand-to: #1d7447; --accent-ink: #14101a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-accent="forest"] { --accent: #7bd9a0; --accent-strong: #a6e8bf; --accent-2: #5fdc92; --accent-soft: rgba(123,217,160, .15); --brand-from: #0b2c1b; --brand-to: #1d7447; --accent-ink: #14101a; } }
:root[data-accent="sunset"] { --accent: #d9622b; --accent-strong: #b34a1c; --accent-2: #ff9a4d; --accent-soft: rgba(217,98,43, .1); --brand-from: #5a1d0a; --brand-to: #e0702f; }
:root[data-theme="dark"][data-accent="sunset"] { --accent: #ffab7a; --accent-strong: #ffc6a3; --accent-2: #ffb070; --accent-soft: rgba(255,171,122, .15); --brand-from: #3d1406; --brand-to: #a8481d; --accent-ink: #14101a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-accent="sunset"] { --accent: #ffab7a; --accent-strong: #ffc6a3; --accent-2: #ffb070; --accent-soft: rgba(255,171,122, .15); --brand-from: #3d1406; --brand-to: #a8481d; --accent-ink: #14101a; } }
:root[data-accent="violet"] { --accent: #6a3fd0; --accent-strong: #512ab0; --accent-2: #9b7cf2; --accent-soft: rgba(106,63,208, .1); --brand-from: #2a1160; --brand-to: #7b52e0; }
:root[data-theme="dark"][data-accent="violet"] { --accent: #b79dff; --accent-strong: #cfc0ff; --accent-2: #a98cff; --accent-soft: rgba(183,157,255, .15); --brand-from: #1e0c48; --brand-to: #5a3bb0; --accent-ink: #14101a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-accent="violet"] { --accent: #b79dff; --accent-strong: #cfc0ff; --accent-2: #a98cff; --accent-soft: rgba(183,157,255, .15); --brand-from: #1e0c48; --brand-to: #5a3bb0; --accent-ink: #14101a; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Sinhala", "Iskoola Pota", sans-serif; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 340px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 100% at 20% 0%, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 70%), radial-gradient(50% 90% at 90% 0%, color-mix(in srgb, var(--brand-to) 11%, transparent), transparent 70%); }
body.modal-open { overflow: hidden; }
body.dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
h1 { font-size: 1.55rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5rem; font-weight: 800; }
h2 { font-size: 1.12rem; margin: 0 0 .6rem; font-weight: 750; } h3 { font-size: 1rem; margin: 0 0 .4rem; font-weight: 700; }
p { margin: 0 0 .6rem; } a { color: var(--accent); }
.muted { color: var(--mute); } .small { font-size: .85rem; } .hidden { display: none !important; }
.icon { flex: none; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 300; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }

/* ---------- forms ---------- */
label { display: block; font-size: .85rem; font-weight: 650; color: var(--mute); margin: .9rem 0 .3rem; }
input[type=text], input[type=password], input[type=date], input[type=search], input[type=number], select, textarea {
  width: 100%; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--solid); color: var(--ink); font: inherit; min-height: 48px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--mute); opacity: .7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
button:focus-visible, a:focus-visible, .node:focus-visible, summary:focus-visible, .bubble:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
textarea { min-height: 96px; resize: vertical; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.field { position: relative; } .field input { padding-right: 3rem; }
.field-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: var(--mute); border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.field-btn:hover { color: var(--accent); }
.search { position: relative; }
.search .icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--mute); pointer-events: none; }
.search input { padding-left: 2.6rem; border-radius: 999px; }
.check-row { display: flex; gap: .6rem; align-items: center; color: var(--ink); font-size: 1rem; font-weight: 500; margin: .9rem 0 0; cursor: pointer; }
.hint { color: var(--mute); font-size: .82rem; margin-top: .3rem; }
.counter { text-align: right; font-size: .78rem; color: var(--mute); margin-top: .2rem; }

/* ---------- buttons ---------- */
.btn, .send, .mic, .fab { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .22; transform: scale(0); animation: rip .62s ease-out forwards; pointer-events: none; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 48px; padding: .55rem 1.2rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--solid); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s var(--spring), background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
:root[data-theme="dark"] .btn.primary { color: #22101c; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #22101c; background: linear-gradient(135deg, var(--accent), var(--accent-2)); } }
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ok { background: linear-gradient(135deg, #1f7a37, #2fa04f); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(35, 130, 58, .3); }
.btn.small { min-height: 38px; padding: .3rem .85rem; font-size: .9rem; border-radius: 11px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--mute); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--mute); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; text-decoration: none; transition: background .15s, color .15s, transform .15s var(--spring); }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); } .icon-btn:active { transform: scale(.9); }

/* ---------- app shell ---------- */
.app { min-height: 100vh; }
.sidebar { display: none; }
.mtop { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); color: var(--ink); }
.mtop-in { display: flex; align-items: center; gap: .6rem; min-height: 56px; padding: .3rem .9rem; max-width: 980px; margin: 0 auto; }
.mtop .brand { font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05rem; }
.mtop .icon-btn { color: var(--ink); } .mtop .icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.logo { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.content { max-width: 900px; margin: 0 auto; padding: 1rem 1rem calc(var(--nav-h) + var(--safe-b) + 5.5rem); animation: rise .35s var(--ease); }
.app.focus .content { padding-bottom: calc(var(--safe-b) + 1rem); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.bottom-nav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 40; display: flex; align-items: center; background: var(--solid); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 10px 34px rgba(30, 20, 50, .16); padding: 0 6px; }
.bottom-nav a { flex: 1; min-width: 0; height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--mute); text-decoration: none; font-size: .7rem; font-weight: 700; position: relative; }
.bottom-nav a .pill { display: inline-flex; width: 52px; height: 30px; border-radius: 15px; align-items: center; justify-content: center; transition: background .25s, transform .25s var(--spring); position: relative; }
.bottom-nav a:active .pill { transform: scale(.88); }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a.active .pill { background: var(--accent-soft); }
.bottom-nav a.ai { flex: 0 0 80px; color: var(--accent); }
.bottom-nav a.ai .pill { width: 56px; height: 56px; border-radius: 50%; margin-top: -28px; background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 45%, transparent); border: 4px solid var(--bg); }
.bottom-nav a.ai.active .pill { background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); }
.nav-badge { position: absolute; top: -4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--c-late); color: #fff; font-size: .68rem; line-height: 18px; text-align: center; font-weight: 800; animation: pop .35s var(--spring); }

.seg { display: flex; gap: 2px; padding: 3px; background: var(--line-soft); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 1rem; }
.seg a, .seg button { flex: 1; text-align: center; padding: .55rem .4rem; border: 0; border-radius: 11px; font: inherit; font-size: .9rem; font-weight: 700; color: var(--mute); text-decoration: none; background: transparent; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; transition: background .2s, color .2s; }
.seg a.active, .seg button.on { background: var(--solid); color: var(--accent); box-shadow: var(--shadow-sm); }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .mtop, .bottom-nav, .seg-admin { display: none; }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 1.2rem .9rem; background: var(--solid); border-right: 1px solid var(--line); overflow: hidden; }
  .side-brand { display: flex; align-items: center; gap: .7rem; padding: .2rem .6rem 1rem; font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
  .side-brand span:last-child { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .side-new { margin: 0 .3rem .6rem; }
  .side-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 1rem .8rem .3rem; font-weight: 700; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
  .side-nav a { display: flex; align-items: center; gap: .7rem; padding: .65rem .85rem; border-radius: 14px; color: var(--mute); text-decoration: none; font-weight: 650; position: relative; transition: background .2s, color .2s; }
  .side-nav a:hover { background: var(--line-soft); color: var(--ink); }
  .side-nav a.active { background: var(--accent-soft); color: var(--accent); }
  .side-nav a.ai-link .icon { color: var(--accent-2); }
  .side-nav .nav-badge { position: static; margin-left: auto; }
  .side-user { margin-top: auto; display: flex; align-items: center; gap: .6rem; padding: .8rem .6rem 0; border-top: 1px solid var(--line); }
  .side-user .who { flex: 1; min-width: 0; line-height: 1.25; } .side-user .who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
  .side-user .who span { font-size: .78rem; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .side-user a.me { display: contents; text-decoration: none; color: inherit; }
  .content { padding: 2rem 2.2rem 3rem; }
  .app.focus .content { padding-bottom: 1rem; }
  .overlay { align-items: center; padding: 1rem; }
  .modal { border-radius: 24px; animation: pop .26s var(--spring); }
  .sheet-handle { display: none; }
  .msg { max-width: 68%; }
  .two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
  .fab { display: none !important; }

  .bubbles { flex-wrap: wrap !important; overflow: visible !important; touch-action: none !important; }
  .bubble { touch-action: none !important; }
}
@media (min-width: 900px) and (max-width: 1100px) { :root { --side-w: 220px; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- cards, headings ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); margin-bottom: .9rem; }
@media (min-width: 900px) { .card { backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); } }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 200px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--mute); margin: .15rem 0 0; font-size: .95rem; }
.empty { text-align: center; padding: 1.4rem 1.2rem 1.8rem; color: var(--mute); }
.empty h3 { color: var(--ink); margin: .2rem 0 .2rem; font-size: 1.1rem; }
.empty-art { max-width: 280px; margin: 0 auto .4rem; }
.empty .btn { margin-top: .6rem; }
.err { color: var(--bad); background: var(--bad-soft); border-radius: var(--radius-sm); padding: .65rem .85rem; margin: .8rem 0 0; font-size: .95rem; }
.note { color: var(--info); background: var(--info-soft); border-radius: var(--radius-sm); padding: .7rem .9rem; margin: .8rem 0; font-size: .95rem; }
.note.warn { color: var(--warn); background: var(--warn-soft); }
.banner { border-radius: var(--radius); padding: .9rem 1rem; margin-top: .9rem; }
.banner.pending { background: var(--warn-soft); border: 1px solid var(--c-wait); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 5px rgba(246, 183, 60, .18); } }
.back-link { display: inline-flex; align-items: center; gap: .2rem; margin: 0 0 .8rem -.3rem; padding: .3rem .6rem; border-radius: 12px; color: var(--mute); text-decoration: none; font-weight: 650; font-size: .92rem; }
.back-link:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- avatars, chips, bars ---------- */
.avatar { position: relative; overflow: hidden; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, hsl(var(--h, 215) 70% 90%), hsl(calc(var(--h, 215) + 30) 70% 84%)); color: hsl(var(--h, 215) 50% 28%); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .82rem; flex: none; text-decoration: none; }
.avatar b { font-weight: 800; } .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
:root[data-theme="dark"] .avatar { background: linear-gradient(135deg, hsl(var(--h, 215) 35% 26%), hsl(calc(var(--h, 215) + 30) 35% 20%)); color: hsl(var(--h, 215) 75% 85%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: linear-gradient(135deg, hsl(var(--h, 215) 35% 26%), hsl(calc(var(--h, 215) + 30) 35% 20%)); color: hsl(var(--h, 215) 75% 85%); } }
.avatar.xs { width: 24px; height: 24px; font-size: .6rem; box-shadow: 0 0 0 2px var(--solid); }
.avatar.sm { width: 30px; height: 30px; font-size: .7rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.avatar.xl { width: 104px; height: 104px; font-size: 2.1rem; box-shadow: 0 0 0 4px var(--solid), var(--shadow); }
.avatar.more { background: var(--line); color: var(--mute); }
.avatar-stack { display: inline-flex; } .avatar-stack .avatar + .avatar { margin-left: -8px; }
.mtop .avatar, .side-user .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .62rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--line-soft); color: var(--mute); border: 1px solid var(--line); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .chip.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.chip.brand { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.bar { height: 9px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--c-active), #8ab4ff); border-radius: 6px; transition: width .6s var(--ease); position: relative; overflow: hidden; }
.bar-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: sheen 3.2s ease-in-out infinite; }
@keyframes sheen { 60%, 100% { transform: translateX(100%); } }
.bar.pending .bar-fill { background: linear-gradient(90deg, #e6a21c, var(--c-wait)); } .bar.closed .bar-fill, .bar.done .bar-fill { background: linear-gradient(90deg, #2fa04f, #5fd28a); }
.filters { display: flex; gap: .4rem; overflow-x: auto; padding: .15rem .1rem .4rem; margin: .8rem 0 .6rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.filters button { border: 1.5px solid var(--line); background: var(--solid); color: var(--ink); padding: .4rem .95rem; border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 650; cursor: pointer; white-space: nowrap; min-height: 40px; transition: background .2s, color .2s, transform .15s var(--spring); }
.filters button:active { transform: scale(.94); }
.filters button.on { background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
:root[data-theme="dark"] .filters button.on { color: #22101c; background: var(--accent); }
.filters button .n { opacity: .65; margin-left: .3rem; font-weight: 500; }

@keyframes drift { to { transform: translate(24px, -30px) scale(1.15); } }
.greet { margin: .2rem 0 1rem; }
.greet .date { color: var(--mute); font-weight: 650; font-size: .88rem; }
.greet h1 { font-size: 1.7rem; margin: .1rem 0 0; }
.home-grid { display: block; }
@media (min-width: 1100px) { .home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 1.4rem; align-items: start; } .home-side { position: sticky; top: 1.4rem; order: 2; } .home-main { order: 1; min-width: 0; } }
.brief { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; padding: 1.1rem 1.1rem 1rem; background: linear-gradient(135deg, var(--accent-soft), rgba(91, 141, 239, .08)), var(--solid); box-shadow: var(--shadow); margin: 0 0 1rem; }
.brief::before { content: ""; position: absolute; width: 190px; height: 190px; right: -60px; top: -80px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%); animation: drift 12s ease-in-out infinite alternate; pointer-events: none; }
.brief > * { position: relative; }
.brief-head { display: flex; align-items: center; gap: .45rem; font-weight: 800; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.brief-head .sum-ico { animation: twinkle 3s ease-in-out infinite; }
.brief-head .grow { flex: 1; }
.brief-headline { font-size: 1.1rem; font-weight: 750; line-height: 1.35; margin: .5rem 0 .65rem; overflow-wrap: anywhere; }
.brief-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.bi { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem .7rem; border-radius: 12px; background: var(--solid); border: 1px solid var(--line-soft); font-size: .92rem; line-height: 1.4; text-decoration: none; color: inherit; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
a.bi:hover { border-color: var(--accent); }
.bi .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: .45rem; flex: none; background: var(--c-active); }
.bi.tone-urgent .dot { background: var(--c-late); } .bi.tone-watch .dot { background: var(--c-wait); } .bi.tone-good .dot { background: var(--c-ok); }
.brief-foot { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .85rem; }
.brief-note { font-size: .76rem; color: var(--mute); margin-left: auto; }
.statbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--line); gap: 2px; margin: 0 0 .7rem; }
.statbar i { display: block; height: 100%; width: 0; transition: width .9s var(--ease); background: var(--c); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-bottom: 1rem; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: .05rem; padding: .7rem .85rem; border-radius: 16px; border: 1.5px solid var(--line); background: var(--solid); font: inherit; color: inherit; cursor: pointer; text-align: left; position: relative; transition: transform .15s var(--spring), border-color .15s, box-shadow .15s; }
.stat:hover { border-color: var(--c); } .stat:active { transform: scale(.97); }
.stat.on { border-color: var(--c); box-shadow: 0 0 0 3px var(--accent-soft); }
.stat .n { font-size: 1.6rem; font-weight: 800; line-height: 1.1; } .stat .l { font-size: .78rem; font-weight: 700; color: var(--mute); }
.stat i.dot { position: absolute; right: .8rem; top: .8rem; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.toolbar { display: flex; gap: .5rem; align-items: center; margin-bottom: .2rem; }
.toolbar .search { flex: 1; }
.toolbar select { width: auto; min-height: 48px; border-radius: 999px; padding-right: 1.6rem; font-size: .9rem; font-weight: 650; }
.active-filter { display: inline-flex; align-items: center; gap: .4rem; margin: .4rem 0 .2rem; }
.group-title { display: flex; align-items: center; gap: .5rem; margin: 1.2rem 0 .5rem; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); }
.group-title i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.group-title .cnt { background: var(--line); border-radius: 999px; padding: 0 .55rem; font-size: .72rem; letter-spacing: 0; }

/* ---------- task cards ---------- */
.task { display: block; color: inherit; text-decoration: none; position: relative; padding: 1.05rem 1.05rem 1rem 1.3rem; transition: transform .25s var(--spring), box-shadow .2s, border-color .2s; overflow: hidden; animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.task::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--rail, var(--line)); }
.task:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow), 0 14px 34px color-mix(in srgb, var(--brand-from) 14%, transparent); }
.task:active { transform: scale(.992); }
.task.st-bad { --rail: linear-gradient(var(--c-late), #ff9aa6); } .task.st-warn { --rail: linear-gradient(var(--c-wait), #ffd98a); } .task.st-info { --rail: linear-gradient(var(--c-active), #9dc0ff); } .task.st-ok { --rail: linear-gradient(#2fa04f, #7fe0a0); }
.task .top { display: flex; align-items: flex-start; gap: .5rem; }
.task .title { font-weight: 750; flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 1.02rem; }
.task .new { background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; font-size: .66rem; font-weight: 800; padding: .12rem .55rem; border-radius: 999px; letter-spacing: .05em; flex: none; margin-top: .15rem; animation: pulse-s 2s ease-in-out infinite; }
@keyframes pulse-s { 50% { transform: scale(1.1); } }
.task .people { color: var(--mute); font-size: .88rem; margin: .4rem 0 .7rem; display: flex; align-items: center; gap: .55rem; min-width: 0; }
.task .people span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task .prog { display: flex; align-items: center; gap: .6rem; } .task .prog .bar { flex: 1; } .task .prog strong { font-size: .9rem; min-width: 2.7em; text-align: right; }
.task .meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .7rem; }
.task .last { color: var(--mute); font-size: .88rem; margin-top: .65rem; padding-top: .6rem; border-top: 1px dashed var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fab { position: fixed; right: 1rem; bottom: calc(var(--nav-h) + var(--safe-b) + 1.2rem); z-index: 35; height: 56px; padding: 0 1.4rem 0 1.15rem; border-radius: 28px; box-shadow: 0 10px 28px color-mix(in srgb, var(--accent-strong) 50%, transparent); animation: pop .5s var(--spring) .3s backwards; }

/* ---------- task detail ---------- */
.detail { padding: 0; overflow: hidden; }
.detail-banner { height: 4px; background: linear-gradient(90deg, var(--accent-strong), var(--accent-2)); }
@keyframes slide-bg { to { background-position: 200% 0; } }
.detail-in { padding: 1.1rem; }
.head-top { display: flex; align-items: flex-start; gap: 1rem; }
.head-top h1 { overflow-wrap: anywhere; }
.head-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; flex: none; max-width: 96px; }
.ring { display: block; flex: none; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 8; }
.ring-fill { fill: none; stroke: var(--c-active); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease), stroke .3s; }
.ring.pending .ring-fill { stroke: var(--c-wait); } .ring.full .ring-fill, .ring.closed .ring-fill { stroke: #2fa04f; }
.ring-text { fill: var(--ink); font-size: 20px; font-weight: 800; }
.person-line { display: flex; align-items: center; gap: .55rem; margin: .4rem 0; font-size: .92rem; min-width: 0; }
.person-line .k { color: var(--mute); width: 3.4rem; flex: none; font-size: .78rem; font-weight: 700; }
.person-line .names { min-width: 0; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; }
.who-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; text-align: left; min-width: 0; border-radius: 10px; }
.who-btn:hover { color: var(--accent); }
.desc { white-space: pre-wrap; margin: .7rem 0 0; padding: .75rem .9rem; background: var(--line-soft); border-radius: var(--radius-sm); font-size: .95rem; }
.slider-box { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.presets { display: flex; gap: .4rem; margin: .6rem 0 .2rem; }
.presets button { flex: 1; min-height: 42px; border: 1.5px solid var(--line); background: var(--solid); color: var(--ink); border-radius: 12px; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; transition: transform .15s var(--spring), border-color .15s; }
.presets button:hover { border-color: var(--accent); color: var(--accent); } .presets button:active { transform: scale(.92); }
.presets button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
input[type=range] { width: 100%; height: 36px; accent-color: var(--accent); margin: .2rem 0; }
.sumcard { border-left: 4px solid var(--accent-2); }
.sumcard .sum-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-weight: 800; }
.sumcard .sum-head .grow { flex: 1 1 auto; }
.sumcard .sum-ico { color: var(--accent); animation: twinkle 3s ease-in-out infinite; }
.sumcard .body { margin-top: .6rem; }
.sumcard ul { margin: .2rem 0 .5rem 1.1rem; padding: 0; }
.sumcard .sum-foot { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.sumcard .sum-foot .grow { flex: 1 1 140px; }
.sec-title { display: flex; align-items: center; gap: .5rem; margin: 1.3rem 0 .4rem; }
.sec-title h2 { margin: 0; }

.chat { display: flex; flex-direction: column; gap: .3rem; margin: .5rem 0 1rem; }
.day { align-self: center; color: var(--mute); font-size: .74rem; font-weight: 700; background: var(--line-soft); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .75rem; margin: .8rem 0 .3rem; }
.msg-row { display: flex; gap: .45rem; align-items: flex-end; margin-top: .35rem; animation: rise .3s var(--ease) both; }
.msg-row.cont { margin-top: 0; } .msg-row.me { justify-content: flex-end; }
.msg-row > .avatar, .msg-row > .avatar-spacer { width: 30px; height: 30px; flex: none; font-size: .68rem; }
.msg-row > .avatar { cursor: pointer; }
.msg { max-width: 82%; padding: .5rem .85rem .35rem; border-radius: 20px 20px 20px 6px; background: var(--solid); border: 1px solid var(--line); word-wrap: break-word; overflow-wrap: anywhere; box-shadow: var(--shadow-sm); }
.msg.me { background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; border-color: transparent; border-radius: 20px 20px 6px 20px; }
:root[data-theme="dark"] .msg.me { color: #22101c; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.me { color: #22101c; background: linear-gradient(135deg, var(--accent), var(--accent-2)); } }
.msg.sending { opacity: .7; }
.msg .who { font-size: .76rem; font-weight: 750; color: var(--accent); margin-bottom: .1rem; }
.msg .who span { color: var(--mute); font-weight: 500; }
.msg .txt { white-space: pre-wrap; }
.msg .tr { font-size: .85rem; opacity: .8; margin-top: .35rem; padding-top: .3rem; border-top: 1px dashed currentColor; border-color: rgba(128, 128, 128, .4); white-space: pre-wrap; }
.msg .time { font-size: .68rem; opacity: .65; text-align: right; margin-top: .1rem; display: flex; justify-content: flex-end; align-items: center; gap: .25rem; }
.msg.system, .msg-sys { align-self: center; max-width: 94%; background: var(--line-soft); border: 0; box-shadow: none; color: var(--mute); font-size: .82rem; text-align: center; padding: .25rem .85rem; border-radius: 999px; margin: .3rem 0; }
.voice { display: flex; align-items: center; gap: .6rem; min-width: 200px; }
.play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.msg.me .play { background: #fff; color: var(--accent-strong); }
.wave { display: flex; align-items: center; gap: 2px; height: 28px; flex: 1; }
.wave i { display: block; width: 3px; border-radius: 2px; background: currentColor; opacity: .4; height: var(--hh, 40%); }
.voice.playing .wave i { opacity: .95; animation: wave .9s ease-in-out infinite; animation-delay: calc(var(--i) * 40ms); }
@keyframes wave { 50% { transform: scaleY(.4); } }
.voice .dur { font-size: .78rem; opacity: .75; font-variant-numeric: tabular-nums; }
.transcribing { opacity: .7; font-style: italic; }

.composer { position: sticky; bottom: 0; z-index: 20; background: linear-gradient(to top, var(--bg) 62%, transparent); padding: .8rem 0 calc(.7rem + var(--safe-b)); }
.composer-in { display: flex; gap: .5rem; align-items: flex-end; background: var(--solid); border: 1.5px solid var(--line); border-radius: 28px; padding: .3rem .35rem .3rem 1rem; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.composer-in { padding-left: .4rem; }
.composer-in .icon-btn { color: var(--mute); }
.composer-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.composer textarea, .a-composer textarea { min-height: 46px; max-height: 140px; height: 46px; padding: .65rem 0 .5rem; resize: none; overflow-y: hidden; border: 0; background: transparent; box-shadow: none !important; border-radius: 0; flex: 1; }
.send, .mic { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; transition: transform .15s var(--spring), background .15s; }
.send { background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent); } .mic { background: var(--accent-soft); color: var(--accent); }
.send:active, .mic:active { transform: scale(.88); } .send:disabled { opacity: .5; }
.recbar { display: flex; align-items: center; gap: .6rem; background: var(--bad-soft); border: 1.5px solid var(--bad); border-radius: 28px; padding: .45rem .5rem .45rem 1rem; }
.recdot { width: 12px; height: 12px; border-radius: 50%; background: var(--bad); animation: pulse 1s infinite; flex: none; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.8); } }

/* ---------- task builder (drag & drop) ---------- */
.builder { display: flex; flex-direction: column; min-height: calc(100vh - 90px); }
.draft { padding: 0; overflow: hidden; margin-bottom: .8rem; }
.draft-in { padding: 1rem 1.1rem 1.1rem; }
.draft-title { border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; padding: .3rem 0 !important; min-height: 0 !important; border-radius: 0 !important; border-bottom: 2px dashed var(--line) !important; }
.draft-title:focus { border-bottom-color: var(--accent) !important; }
.draft-label { display: flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin: 1rem 0 .4rem; }
.dropzone { min-height: 92px; border: 2px dashed var(--line); border-radius: 18px; padding: .6rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; transition: border-color .2s, background .2s, transform .25s var(--spring); position: relative; }
.dropzone .dz-hint { display: flex; flex-direction: column; align-items: center; gap: .15rem; color: var(--mute); font-weight: 650; font-size: .9rem; text-align: center; padding: .3rem; }
.dropzone .dz-hint .icon { color: var(--accent); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.dropzone.drop-ready { border-color: var(--accent); background: var(--accent-soft); animation: wiggle-border 1.2s ease-in-out infinite; }
.dropzone.drop-over { border-style: solid; background: var(--accent-soft); transform: scale(1.025); box-shadow: 0 0 0 6px var(--accent-soft), 0 12px 30px color-mix(in srgb, var(--accent-strong) 25%, transparent); }
@keyframes wiggle-border { 50% { box-shadow: 0 0 0 5px var(--accent-soft); } }
.dropzone.filled { justify-content: flex-start; border-style: solid; border-color: var(--line); }
.pchip { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .35rem .25rem .3rem; border-radius: 999px; background: var(--solid); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-weight: 700; font-size: .88rem; animation: pop .4s var(--spring) both; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.pchip .x { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--line-soft); color: var(--mute); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pchip .x:hover { background: var(--bad-soft); color: var(--bad); }
.due-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.due-row button, .due-row .datebtn { border: 1.5px solid var(--line); background: var(--solid); color: var(--ink); border-radius: 999px; padding: .35rem .9rem; font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer; min-height: 38px; transition: transform .15s var(--spring), background .15s; }
.due-row button:active { transform: scale(.93); }
.due-row button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.due-row input[type=date] { width: auto; min-height: 38px; padding: .25rem .6rem; border-radius: 999px; font-size: .88rem; }
.more > summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: .9rem; list-style: none; margin-top: .9rem; display: inline-flex; align-items: center; gap: .3rem; }
.more > summary::-webkit-details-marker { display: none; }
.more textarea { margin-top: .5rem; }
.dock { position: sticky; bottom: 0; z-index: 25; margin: auto -1rem 0; padding: .8rem 1rem calc(.8rem + var(--safe-b)); background: var(--solid); border-top: 1px solid var(--line); border-radius: 26px 26px 0 0; box-shadow: 0 -12px 40px rgba(40, 10, 60, .18); }
.dock-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.dock-head h2 { margin: 0; font-size: 1rem; flex: 1; display: flex; align-items: center; gap: .4rem; }
.dock-head .search { flex: 1 1 140px; } .dock-head .search input { min-height: 40px; }
.dock-body { display: flex; flex-direction: row; align-items: flex-start; gap: 1.1rem; overflow-x: auto; padding-bottom: .1rem; scrollbar-width: none; touch-action: pan-x; }
.dock-body::-webkit-scrollbar { display: none; }
.dock-group { flex: none; }
.dock-label { white-space: nowrap; gap: .8rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin: .1rem 0 .25rem; display: flex; justify-content: space-between; align-items: center; }
.dock-label button { border: 0; background: none; color: var(--accent); font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; text-transform: none; letter-spacing: 0; }
.bubbles { display: flex; gap: .45rem; padding: .2rem .1rem .3rem; touch-action: pan-x; }
.bubble { flex: none; width: 76px; border: 0; background: none; padding: .35rem .2rem; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: .25rem; cursor: grab; font: inherit; color: var(--ink); touch-action: pan-x; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; position: relative; transition: transform .2s var(--spring), background .2s; }
.bubble:hover { background: var(--accent-soft); transform: translateY(-3px); }
.bubble .avatar { width: 52px; height: 52px; font-size: 1rem; pointer-events: none; transition: box-shadow .2s; }
.bubble .bn { font-size: .78rem; font-weight: 700; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.15; pointer-events: none; }
.bubble .bt { font-size: .64rem; color: var(--mute); max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -.25rem; pointer-events: none; }
.bubble .tick { position: absolute; top: 2px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: #2fa04f; color: #fff; display: none; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--solid); }
.bubble.sel .tick { display: inline-flex; animation: pop .35s var(--spring); }
.bubble.sel .avatar { box-shadow: 0 0 0 3px var(--accent); }
.bubble.drag-src { opacity: .35; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; will-change: transform; filter: drop-shadow(0 14px 22px color-mix(in srgb, var(--brand-from) 35%, transparent)); transition: opacity .2s, filter .15s; }
.drag-ghost.landing { transition: transform .25s var(--ease), opacity .25s; }
.drag-ghost.can-drop { filter: drop-shadow(0 14px 26px color-mix(in srgb, var(--accent-strong) 60%, transparent)); }
.drag-ghost .bn, .drag-ghost .bt, .drag-ghost .tick { display: none; }
.drag-ghost.bubble { background: none; transform-origin: center; }
.drag-ghost .avatar { width: 64px; height: 64px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.draft-foot { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 500; }

/* ---------- profile ---------- */
.profile-card { padding: 0; overflow: hidden; }
.cover { height: 104px; background: linear-gradient(135deg, var(--brand-from), var(--accent-2) 70%, var(--c-active)); background-size: 160% 160%; animation: slide-bg 10s ease-in-out infinite alternate; position: relative; }
.cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .3), transparent 50%); }
.profile-in { padding: 0 1.2rem 1.2rem; margin-top: -52px; position: relative; }
.photo-edit { position: relative; display: inline-block; }
.photo-edit .cam { position: absolute; right: -2px; bottom: 2px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--solid); background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s var(--spring); }
.photo-edit .cam:hover { transform: scale(1.1) rotate(-8deg); }
.profile-in h2 { margin: .6rem 0 0; font-size: 1.35rem; }
.bio-text { white-space: pre-wrap; margin: .7rem 0 0; color: var(--ink); }
.bio-empty { color: var(--mute); font-style: italic; }
.person-sheet { text-align: center; }
.person-sheet .avatar { margin: 0 auto .5rem; }
.person-sheet h2 { margin: .2rem 0; font-size: 1.3rem; }
.crop-frame { width: 260px; height: 260px; margin: 0 auto .8rem; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px var(--accent), var(--shadow); touch-action: none; background: #fff; }
.crop-canvas { width: 100%; height: 100%; display: block; cursor: grab; }

/* ---------- lists (admin) ---------- */
.list-row { display: flex; align-items: center; gap: .75rem; padding: .8rem 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.list-row .info { flex: 1 1 140px; min-width: 0; } .list-row .info strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.list-row .tags { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.list-row .tags:empty { display: none; }
.list-row.user { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: .75rem; row-gap: .35rem; align-items: center; }
.list-row.user .info { flex: none; } .list-row.user .tags { grid-column: 2 / -1; grid-row: 2; } .list-row.user > .btn { grid-column: 3; grid-row: 1; }
.list-row.user .info span { display: block; line-height: 1.3; }
.layer-badge { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--info-soft), var(--accent-soft)); color: var(--info); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; line-height: 1; font-size: 1.1rem; flex: none; }
.layer-badge small { font-size: .55rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.pyramid { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: .2rem 0 .1rem; }
.pyr { height: 32px; min-width: 70px; border-radius: 10px; background: linear-gradient(90deg, var(--accent-strong), var(--accent-2)); color: #fff; font-size: .78rem; font-weight: 750; display: flex; align-items: center; justify-content: center; gap: .4rem; width: 0; transition: width .8s var(--ease); transition-delay: calc(var(--i) * 90ms); white-space: nowrap; overflow: hidden; padding: 0 .6rem; }
.pw { font: 700 1.3rem/1.2 ui-monospace, Menlo, Consolas, monospace; background: var(--line-soft); border: 2px dashed var(--accent); border-radius: var(--radius-sm); padding: .9rem; text-align: center; letter-spacing: .05em; user-select: all; word-break: break-all; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: .75rem .9rem; box-shadow: var(--shadow-sm); }
.kpi .num { font-size: 1.6rem; font-weight: 800; line-height: 1.1; } .kpi .lbl { font-size: .75rem; font-weight: 700; color: var(--mute); }

/* ---------- modal & toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 6, 24, .55); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; z-index: 90; padding: 0; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--solid); width: 100%; max-width: 500px; max-height: 92vh; overflow: auto; border-radius: 26px 26px 0 0; padding: .5rem 1.2rem calc(1.1rem + var(--safe-b)); box-shadow: var(--shadow-lg); animation: sheet .32s var(--ease); }
@keyframes sheet { from { transform: translateY(60px); opacity: .3; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 42px; height: 4px; border-radius: 2px; background: var(--line); margin: .25rem auto .6rem; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; } .modal-head h2 { margin: 0; font-size: 1.2rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.2rem; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 120px; }
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 24px); transform: translate(-50%, 30px) scale(.95); background: #2a2230; color: #fff; padding: .75rem 1.15rem; border-radius: 16px; opacity: 0; pointer-events: none; transition: .3s var(--spring); z-index: 120; max-width: min(92vw, 460px); display: flex; align-items: center; gap: .55rem; box-shadow: var(--shadow-lg); font-size: .95rem; font-weight: 550; }
#toast .icon { color: #8be29a; } #toast.bad .icon { color: #fff; }
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); } #toast.bad { background: var(--bad); }
body.focus-view #toast { bottom: calc(var(--safe-b) + 96px); }
@media (min-width: 900px) { #toast { bottom: 28px; } body.focus-view #toast { bottom: 96px; } }

/* ---------- skeletons ---------- */
.skel { background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 37%, var(--line-soft) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel.line { height: 14px; margin: .4rem 0; } .skel.line.sm { height: 10px; } .skel.w60 { width: 60%; } .skel.w40 { width: 40%; } .skel.w30 { width: 30%; } .skel.bar-s { height: 8px; margin: .8rem 0; border-radius: 6px; }
.skel-card { padding: 1.1rem; }

/* ---------- login / splash ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth-hero { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--brand-from), color-mix(in srgb, var(--brand-from) 55%, var(--brand-to)) 55%, var(--brand-to)); color: #fff; padding: calc(1.6rem + env(safe-area-inset-top, 0px)) 1.4rem 4.6rem; text-align: center; }
.auth-hero::before { content: ""; position: absolute; width: 340px; height: 340px; left: 50%; top: -120px; margin-left: -170px; background: radial-gradient(circle, rgba(255, 255, 255, .2), transparent 70%); animation: drift 12s ease-in-out infinite alternate; }
.auth-hero > * { position: relative; }
.auth-hero .ill { width: min(340px, 86vw); height: auto; margin: 0 auto .2rem; display: block; }
.auth-hero h1 { color: #fff; margin: 0 0 .2rem; font-size: 1.7rem; }
.auth-hero p { margin: 0; opacity: .85; }
.auth-card { width: 100%; max-width: 440px; margin: -3rem auto 0; padding: 0 1rem 2rem; position: relative; }
.auth-card .card { padding: 1.4rem; box-shadow: var(--shadow-lg); background: var(--solid); animation: rise .6s var(--ease) .1s both; }
.auth-card .card h2 { margin-bottom: .2rem; font-size: 1.25rem; }
.auth-foot { text-align: center; color: var(--mute); font-size: .82rem; margin-top: 1rem; }
.chip-btn { border: 1.5px solid var(--line); background: var(--solid); color: var(--accent); border-radius: 999px; padding: .25rem .7rem; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; margin: .15rem .2rem .15rem 0; }
.chip-btn:hover { border-color: var(--accent); }
.splash { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg, var(--brand-from), var(--brand-to)); }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tip { display: flex; gap: .7rem; align-items: flex-start; } .tip .icon { color: var(--accent); margin-top: .15rem; }

/* ---------- illustrations ---------- */
.ill { max-width: 100%; height: auto; overflow: visible; }
.ill .fl { animation: float 5.5s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes float { 50% { transform: translateY(-9px); } }
.ill .tw, .sum-ico { transform-box: fill-box; transform-origin: center; animation: twinkle 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
.ill .ill-dot { fill: #b7a3b0; animation: dotb 1.1s ease-in-out infinite; animation-delay: var(--d); transform-box: fill-box; transform-origin: center; }
@keyframes dotb { 40% { transform: translateY(-4px); fill: var(--accent); } }
.ill .ill-grow { transform-box: fill-box; transform-origin: left center; animation: grow 3.4s ease-in-out infinite alternate; }
@keyframes grow { from { transform: scaleX(.35); } to { transform: scaleX(1); } }
.ill .ill-pulse { fill: none; stroke: var(--ok); stroke-width: 2; opacity: .4; transform-box: fill-box; transform-origin: center; animation: ring-out 2.4s ease-out infinite; }
@keyframes ring-out { from { transform: scale(.75); opacity: .6; } to { transform: scale(1.12); opacity: 0; } }
.ill-glow { fill: #fff; opacity: .1; animation: glowp 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; } @keyframes glowp { 50% { transform: scale(1.08); opacity: .16; } }
.ill-card { fill: #fff; filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--brand-from) 28%, transparent)); } .ill-line { fill: color-mix(in srgb, var(--accent) 22%, #d6d6de); } .ill-track { fill: color-mix(in srgb, var(--accent) 10%, #eeeef3); } .ill-fill { fill: var(--accent); } .ill-ok { fill: #2fa04f; }
.ill-tick { stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; } .ill-tag { fill: #fdecc8; } .ill-av1 { fill: #8ab4ff; } .ill-warn { fill: #f6b73c; }
.ill-soft { fill: var(--accent-soft); } .ill-card2 { fill: var(--solid); stroke: var(--line); stroke-width: 1.5; filter: drop-shadow(0 8px 12px rgba(60, 20, 80, .16)); }
.ill-line2 { fill: var(--accent); opacity: .55; } .ill-track2 { fill: var(--line); }
.ill-tray { stroke: var(--accent); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; fill: var(--solid); }
.ill-wire { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 5 6; opacity: .5; fill: none; }
.ill-av2 { fill: #f6b73c; } .ill-av3 { fill: #3fb6a8; } .ill-face { fill: #fff; opacity: .9; } .ill-face-s { stroke: #fff; stroke-width: 6; stroke-linecap: round; opacity: .9; }
.ill-ok-big { fill: #2fa04f; } .ill-tick-big { stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; stroke-dashoffset: 90; animation: draw 1.2s var(--ease) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ill-lens { fill: var(--solid); stroke: var(--accent); stroke-width: 7; } .ill-handle { stroke: var(--accent); stroke-width: 9; stroke-linecap: round; fill: none; } .ill-bub { fill: var(--accent); opacity: .25; }
.ill .tw { fill: var(--accent); } .auth-hero .ill .tw { fill: #fff; } .ill-card2 ~ .tw { fill: var(--accent-2); }

/* ---------- org chart ---------- */
.org-toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .7rem; }
.org-count { flex: 1 1 140px; color: var(--mute); font-size: .9rem; font-weight: 650; }
.org-scroll { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); touch-action: pan-x pan-y; box-shadow: var(--shadow); }
.org-svg { display: block; margin: 0 auto; }
.layer { fill: var(--accent-soft); opacity: .6; } .layer.alt { opacity: .3; }
.layer-label { fill: var(--mute); font-size: 12px; font-weight: 700; }
.node rect { fill: var(--solid); stroke: var(--line); stroke-width: 1.5; cursor: pointer; transition: stroke .15s; filter: drop-shadow(0 3px 5px rgba(60, 20, 80, .1)); }
.node:hover rect { stroke: var(--accent); }
.node.sel rect { stroke: var(--accent); stroke-width: 3; } .node.target rect { stroke: var(--info); stroke-dasharray: 5 3; stroke-width: 2; } .node.linked rect { fill: var(--info-soft); }
.node.off { opacity: .5; }
.n-name { fill: var(--ink); font-size: 13px; font-weight: 700; pointer-events: none; } .n-title { fill: var(--mute); font-size: 11px; pointer-events: none; }
.n-av { pointer-events: none; } .n-av-bg { fill: var(--accent-soft); } .n-av-t { fill: var(--accent); font-size: 12px; font-weight: 800; }
.handle { fill: var(--accent); stroke: var(--solid); stroke-width: 2; cursor: crosshair; touch-action: none; }
.link-line { fill: none; stroke: var(--mute); stroke-width: 2; } .link-line.preview { stroke: var(--accent); stroke-dasharray: 6 4; }
.link.hi .link-line { stroke: var(--accent); stroke-width: 3; } .link.dim .link-line { opacity: .25; } .link.sel .link-line { stroke: var(--bad); stroke-width: 4; }
.link-hit { fill: none; stroke: transparent; stroke-width: 16; cursor: pointer; }
.arrow-head { fill: var(--mute); } .arrow-head.hi { fill: var(--accent); }
.org-info { margin-top: .7rem; }

@media (max-width: 899px) {
  .desk, .new-task { display: none !important; }   /* phones have the top-bar back arrow and the round "New task" button */
  .page-head h1 { font-size: 1.35rem; }
}
@media (min-width: 900px) {
  .dock { position: static; margin: 1rem 0 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
  .dock-body { flex-direction: column; gap: .6rem; overflow: visible; touch-action: none; }
  .dock-group { flex: initial; }
  .builder { min-height: 0; }
  .bubbles { flex-wrap: wrap; overflow: visible; touch-action: none; }
  .bubble { touch-action: none; }
}
/* ---------- the assistant ---------- */
.assist { display: flex; flex-direction: column; min-height: calc(100vh - 130px); }
.assist-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; flex-wrap: wrap; }
.assist-tools { margin-left: auto; display: flex; gap: .35rem; flex-wrap: wrap; }
.tool-btn { display: inline-flex; align-items: center; gap: .35rem; border: 1.5px solid var(--line); background: var(--solid); color: var(--mute); border-radius: 999px; padding: .3rem .8rem; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; min-height: 36px; transition: background .15s, color .15s, border-color .15s; }
.tool-btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.focus-chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: .25rem .4rem .25rem .8rem; font-size: .85rem; font-weight: 700; max-width: 100%; }
.focus-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-chip button { border: 0; width: 24px; height: 24px; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.a-welcome { text-align: center; padding: 1.6rem .5rem .8rem; }
.a-welcome h2 { font-size: 1.35rem; margin: .2rem 0 .3rem; }
.a-orb { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1rem; background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--accent-2) 30%, #fff), var(--accent-2) 45%, var(--accent-strong)); box-shadow: 0 12px 40px color-mix(in srgb, var(--accent-2) 45%, transparent); animation: orb 4s ease-in-out infinite; display: flex; align-items: center; justify-content: center; color: #fff; }
@keyframes orb { 50% { transform: scale(1.07); box-shadow: 0 16px 52px color-mix(in srgb, var(--accent-2) 60%, transparent); } }
.a-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.a-chip { border: 1.5px solid var(--line); background: var(--solid); border-radius: 999px; padding: .55rem 1rem; font: inherit; font-weight: 650; font-size: .92rem; cursor: pointer; color: var(--ink); text-align: left; transition: border-color .15s, color .15s, transform .15s var(--spring); }
.a-chip:hover { border-color: var(--accent); color: var(--accent); } .a-chip:active { transform: scale(.96); }
.a-feed { display: flex; flex-direction: column; gap: .6rem; margin: .5rem 0 1rem; }
.a-msg { max-width: 90%; padding: .7rem .95rem; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; animation: rise .3s var(--ease) both; }
.a-msg.bot { align-self: flex-start; background: var(--solid); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm); }
.a-msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; border-bottom-right-radius: 6px; }
:root[data-theme="dark"] .a-msg.user { color: #22101c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .a-msg.user { color: #22101c; } }
.a-msg .a-tag { font-size: .72rem; opacity: .8; display: flex; gap: .3rem; align-items: center; margin-bottom: .2rem; font-weight: 700; }
.a-msg.typing { display: flex; gap: 5px; align-items: center; padding: .95rem 1rem; }
.a-msg.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); animation: dotb2 1s ease-in-out infinite; }
.a-msg.typing i:nth-child(2) { animation-delay: .15s; } .a-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dotb2 { 40% { transform: translateY(-5px); background: var(--accent); } }
.a-act { align-self: stretch; border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 18px; padding: .8rem .9rem; animation: pop .35s var(--spring); }
.a-act h4 { margin: 0 0 .4rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.a-act ul { margin: 0 0 .7rem; padding-left: 1.1rem; } .a-act li { margin: .25rem 0; font-weight: 650; }
.a-act .row { gap: .5rem; }
.a-done { align-self: flex-start; max-width: 90%; border-radius: 16px; padding: .6rem .9rem; background: var(--ok-soft); color: var(--ok); font-weight: 650; font-size: .92rem; }
.a-done.bad { background: var(--bad-soft); color: var(--bad); }
.a-done a { color: inherit; }
.a-composer { position: sticky; bottom: 0; z-index: 20; background: linear-gradient(to top, var(--bg) 72%, transparent); padding: .6rem 0 calc(.7rem + var(--safe-b)); margin-top: auto; }
.a-composer .composer-in { padding-left: .9rem; }
.mic-big { width: 52px; height: 52px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent); position: relative; transition: transform .15s var(--spring); }
.mic-big:active { transform: scale(.9); }
.mic-big.live { background: var(--bad); box-shadow: 0 6px 18px rgba(192, 40, 45, .45); }
.mic-big.live::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--bad); opacity: .5; transform: scale(calc(1 + var(--lv, 0) * .5)); transition: transform .08s linear; }
.a-listen { display: flex; align-items: center; gap: .7rem; padding: .4rem .5rem .4rem 1rem; background: var(--solid); border: 1.5px solid var(--bad); border-radius: 32px; box-shadow: var(--shadow); }
.a-listen .lbl { font-weight: 700; font-size: .92rem; min-width: 5.5rem; }
.a-listen .lvl { flex: 1; height: 30px; display: flex; align-items: center; gap: 3px; }
.a-listen .lvl i { flex: 1; background: var(--bad); border-radius: 2px; height: 12%; opacity: .75; transition: height .09s; }
.a-hint { text-align: center; color: var(--mute); font-size: .78rem; margin: .4rem 0 0; }
.speaking { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.speaking i { width: 3px; background: var(--accent); border-radius: 2px; animation: wave .8s ease-in-out infinite; height: 100%; }
.speaking i:nth-child(2) { animation-delay: .15s; } .speaking i:nth-child(3) { animation-delay: .3s; }

/* ---------- photos and documents ---------- */
.file-card { display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: 14px; background: var(--line-soft); border: 1px solid var(--line); color: inherit; cursor: pointer; font: inherit; text-align: left; min-width: 220px; max-width: 100%; }
.file-card:hover { border-color: var(--accent); }
.msg.me .file-card { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .32); }
.file-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: .62rem; font-weight: 800; flex: none; text-transform: uppercase; }
.file-ico[data-k="pdf"] { background: var(--bad-soft); color: var(--bad); } .file-ico[data-k="doc"] { background: var(--info-soft); color: var(--info); }
.file-ico[data-k="xls"] { background: var(--ok-soft); color: var(--ok); } .file-ico[data-k="ppt"] { background: var(--warn-soft); color: var(--warn); }
.msg.me .file-ico { background: rgba(255, 255, 255, .9); color: var(--accent-strong); }
.file-meta { min-width: 0; flex: 1; } .file-meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; } .file-meta span { font-size: .74rem; opacity: .75; }
.img-btn { display: block; border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 14px; overflow: hidden; margin-bottom: .2rem; }
.img-btn img { display: block; max-width: min(240px, 100%); max-height: 240px; width: auto; height: auto; border-radius: 14px; }
.files-strip { display: flex; gap: .45rem; overflow-x: auto; padding: .1rem .05rem .4rem; scrollbar-width: none; margin: 0 0 .8rem; }
.files-strip::-webkit-scrollbar { display: none; }
.fchip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: var(--solid); border-radius: 999px; padding: .3rem .8rem .3rem .45rem; font: inherit; font-size: .82rem; font-weight: 650; cursor: pointer; max-width: 230px; flex: none; color: inherit; }
.fchip:hover { border-color: var(--accent); }
.fchip .file-ico { width: 26px; height: 26px; border-radius: 8px; font-size: .5rem; }
.fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox { text-align: center; } .lightbox img { max-width: 100%; max-height: 68vh; border-radius: 12px; }
.modal.wide { max-width: 760px; }
.drop-veil { position: fixed; inset: 0; z-index: 300; background: color-mix(in srgb, var(--accent) 16%, transparent); border: 4px dashed var(--accent); display: none; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; color: var(--accent); pointer-events: none; }
body.file-drag .drop-veil { display: flex; }
.attach-sheet { display: grid; gap: .6rem; }
.attach-opt { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 16px; background: var(--solid); font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-align: left; }
.attach-opt:hover { border-color: var(--accent); }
.attach-opt .ic { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.attach-opt small { display: block; font-weight: 500; color: var(--mute); }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }

/* ============================================================
   Refresh: bold hero, colour tiles + progress rings, gradient task header, accent colours
   ============================================================ */
body { background: var(--bg); }
body::before { display: none; }
h1 { letter-spacing: -.025em; }

/* ---------- home hero ---------- */
.hero2 { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--brand-from), var(--brand-to)); margin: -1rem -1rem 1.1rem; padding: calc(.9rem + env(safe-area-inset-top, 0px)) 1.1rem 1.15rem; border-radius: 0 0 30px 30px; box-shadow: 0 14px 34px color-mix(in srgb, var(--brand-from) 22%, transparent); }
.hero2::before, .hero2::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero2::before { width: 280px; height: 280px; right: -90px; top: -120px; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 68%); animation: drift 14s ease-in-out infinite alternate; }
.hero2::after { width: 220px; height: 220px; left: -80px; bottom: -110px; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%); animation: drift 17s ease-in-out infinite alternate-reverse; }
.hero2 > * { position: relative; z-index: 1; }
.hero2-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; font-weight: 800; }
.hero2-top .logo { background: rgba(255, 255, 255, .2); }
.hero2-top .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero2-top .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); }
.hero2 .date { opacity: .8; font-size: .85rem; font-weight: 650; }
.hero2 h1 { color: #fff; font-size: 1.75rem; margin: .1rem 0 .15rem; }
.hero2 .sub { margin: 0 0 .95rem; opacity: .92; font-size: .98rem; }
.hero2 .statbar { background: rgba(255, 255, 255, .2); height: 8px; margin-bottom: .75rem; }
.hero2 .stats { margin-bottom: 0; gap: .5rem; }
.hero2 .stat { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .24); color: #fff; backdrop-filter: blur(6px); }
.hero2 .stat .l { color: rgba(255, 255, 255, .85); }
.hero2 .stat i.dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.hero2 .stat:hover { border-color: #fff; }
.hero2 .stat.on { background: #fff; color: #1d1926; box-shadow: 0 8px 22px rgba(0, 0, 0, .22); } .hero2 .stat.on .l { color: #6b667a; }
.app.bare .mtop { display: none; }
@media (min-width: 900px) {
  .hero2 { margin: 0 0 1.4rem; border-radius: 28px; padding: 1.6rem 1.7rem 1.5rem; }
  .hero2-top { display: none; }
  .hero2 h1 { font-size: 2.1rem; }
  .hero2 .stats { max-width: 760px; }
}
@media (max-width: 899px) { .hero2 .stats { grid-template-columns: repeat(4, 1fr); gap: .4rem; } .hero2 .stat { padding: .6rem .5rem; } .hero2 .stat .n { font-size: 1.35rem; } .hero2 .stat .l { font-size: .66rem; } .hero2 .stat i.dot { right: .45rem; top: .55rem; width: 8px; height: 8px; } }

/* ---------- task cards: colour tile, text, progress ring ---------- */
.task { --sc: var(--c-new); padding: 1rem 1.05rem; border-radius: 20px; box-shadow: var(--shadow); }
.task::before { display: none; }
.task.st-bad { --sc: var(--c-late); } .task.st-warn { --sc: var(--c-wait); } .task.st-info { --sc: var(--c-active); } .task.st-ok { --sc: #2fa04f; }
.task:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 12px 28px rgba(60, 30, 90, .12); }
.t-row { display: flex; align-items: center; gap: .85rem; }
.t-ico { width: 46px; height: 46px; border-radius: 15px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--sc), color-mix(in srgb, var(--sc) 70%, #fff)); box-shadow: 0 6px 14px color-mix(in srgb, var(--sc) 40%, transparent); }
.t-main { flex: 1; min-width: 0; }
.t-main .top { display: flex; align-items: center; gap: .5rem; }
.t-main .title { font-size: 1.02rem; }
.t-main .people { margin: .25rem 0 0; }
.t-ring { --p: 0; width: 50px; height: 50px; border-radius: 50%; flex: none; display: grid; place-items: center; position: relative; background: conic-gradient(var(--sc) calc(var(--p) * 1%), var(--line) 0); }
.t-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--solid); }
.t-ring b { position: relative; font-size: .76rem; font-weight: 800; }
.task .meta { margin-top: .75rem; }
.task .last { margin-top: .6rem; padding-top: .55rem; }

/* ---------- task detail: gradient header ---------- */
.detail-banner { display: none; }
.detail-in > .head-top { margin: -1.1rem -1.1rem 1rem; padding: 1.2rem 1.2rem 1.1rem; background: linear-gradient(135deg, var(--brand-from), var(--brand-to)); color: #fff; }
.detail-in > .head-top h1 { color: #fff; margin-bottom: .45rem; }
.detail-in > .head-top .chip { background: rgba(255, 255, 255, .18); color: #fff; border-color: transparent; }
.detail-in > .head-top .muted { color: rgba(255, 255, 255, .8); }
.detail-in > .head-top .ring-track { stroke: rgba(255, 255, 255, .25); } .detail-in > .head-top .ring-fill { stroke: #fff; } .detail-in > .head-top .ring-text { fill: #fff; }

/* ---------- sidebar and small touches ---------- */
@media (min-width: 900px) { .side-nav a.active { background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); } .side-nav a.active .icon { color: #fff; } }
.group-title { margin-top: 1.4rem; }
.brief { border-radius: 24px; }
.swatches { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: .6rem; }
.swatch { width: 56px; border: 2px solid transparent; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--mute); font-size: .72rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.swatch i { width: 44px; height: 44px; border-radius: 50%; display: block; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: var(--shadow-sm); transition: transform .2s var(--spring); }
.swatch:hover i { transform: scale(1.1); } .swatch.on i { box-shadow: 0 0 0 3px var(--solid), 0 0 0 5px var(--a); } .swatch.on { color: var(--ink); }

@media (max-width: 599px) { .brief-items li:nth-child(n+3) { display: none; } .brief-headline { font-size: 1.02rem; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print { .sidebar, .mtop, .bottom-nav, .composer, .fab, .dock { display: none !important; } .app { display: block; } body::before { display: none; } }

/* ---------- voice picker ---------- */
.voice-pick { display: grid; gap: .5rem; max-height: 60vh; overflow-y: auto; }
.voice-opt { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem 1rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--solid); font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-align: left; min-height: 48px; }
.voice-opt small { display: block; font-weight: 500; color: var(--mute); font-size: .78rem; }
.voice-opt:hover { border-color: var(--accent); }
.voice-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.voice-opt.studio { border-style: dashed; }



/* ---------- the AI bubble: floats over every screen, drag it anywhere ---------- */
:root { --aib-glass: color-mix(in srgb, var(--solid) 84%, transparent); --aib-edge: rgba(255, 255, 255, .7); --aib-hi: rgba(255, 255, 255, .75); }
:root[data-theme="dark"] { --aib-edge: rgba(255, 255, 255, .13); --aib-hi: rgba(255, 255, 255, .09); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --aib-edge: rgba(255, 255, 255, .13); --aib-hi: rgba(255, 255, 255, .09); } }

.aib-fab { position: fixed; z-index: 72; width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0; background: none; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; transition: transform .2s var(--spring); animation: pop .5s var(--spring) .3s backwards; }
.aib-fab.hidden { display: none; }
.aib-fab.drag { cursor: grabbing; transform: scale(1.12); transition: none; }
.aib-orb { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--accent-2) 30%, #fff), var(--accent-2) 42%, var(--accent-strong)); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 50%, transparent), inset 0 -4px 10px rgba(0, 0, 0, .12); animation: aibfloat 5s ease-in-out infinite; }
.aib-fab::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--accent-2); opacity: 0; animation: aiblisten 3.2s ease-out infinite; pointer-events: none; }
.aib-dot { position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; background: #2fbf5b; border: 2.5px solid var(--solid); }
.aib-fab.listening .aib-orb { background: radial-gradient(circle at 32% 28%, #ffd9d9, var(--bad) 55%, #8f1d22); box-shadow: 0 10px 26px rgba(192, 40, 45, .5); animation: none; }
.aib-fab.listening::before { animation: none; opacity: .65; border-color: var(--bad); transform: scale(calc(1 + var(--lv, 0) * .55)); transition: transform .08s linear; }
.aib-fab.busy .aib-orb { animation: aibthink 1s ease-in-out infinite; }
@keyframes aibfloat { 50% { transform: translateY(-3px); } }
@keyframes aiblisten { 0% { transform: scale(.9); opacity: .5; } 70%, 100% { transform: scale(1.4); opacity: 0; } }
@keyframes aibthink { 50% { transform: scale(.9); filter: brightness(1.15); } }

/* the floating words */
.aib-stack { position: fixed; z-index: 71; display: flex; flex-direction: column; gap: .6rem; pointer-events: none; }
.aib-stack.below { flex-direction: column-reverse; }
/* a little trail of two dots from the bubble to its words, like a thought */
.aib-stack::before, .aib-stack::after { content: ""; position: absolute; border-radius: 50%; background: var(--aib-glass); border: 1px solid var(--aib-edge); box-shadow: 0 4px 12px rgba(20, 6, 40, .22); animation: aibpop .4s var(--spring) .15s both; }
.aib-stack::before { width: 11px; height: 11px; } .aib-stack::after { width: 6px; height: 6px; animation-delay: .05s; }
.aib-stack:not(.has)::before, .aib-stack:not(.has)::after { display: none; }
.aib-stack.above::before { bottom: -17px; } .aib-stack.above::after { bottom: -25px; }
.aib-stack.below::before { top: -17px; } .aib-stack.below::after { top: -25px; }
.aib-stack::before { left: calc(var(--tx, 40px) + var(--tdx, 0px) - 5.5px); } .aib-stack::after { left: calc(var(--tx, 40px) - 3px); }
.aib-stack.right .aib-msg.bot, .aib-stack.right .aib-card { align-self: flex-end; margin-right: var(--aib-edge, 0px); }
.aib-stack.left .aib-msg.bot, .aib-stack.left .aib-card { align-self: flex-start; margin-left: var(--aib-edge, 0px); }
.aib-msg.bot, .aib-card { max-width: var(--aib-w, 340px); }
@keyframes aibpop { from { transform: scale(0); opacity: 0; } }

.aib-msg { pointer-events: auto; position: relative; max-width: 100%; cursor: pointer; border-radius: 22px; font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; will-change: transform, opacity; }
/* the assistant: frosted glass, soft layered glow, drifting gently */
.aib-msg.bot { padding: .7rem 1.05rem .85rem; color: var(--ink); max-height: var(--aib-max, 40vh); overflow-y: auto; scrollbar-width: thin; background: linear-gradient(145deg, var(--aib-hi), transparent 58%), var(--aib-glass); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border: 1px solid var(--aib-edge); box-shadow: 0 2px 5px rgba(20, 6, 40, .07), 0 16px 38px -8px rgba(60, 20, 100, .36), 0 30px 64px -22px color-mix(in srgb, var(--accent) 32%, transparent); animation: aibemerge .6s var(--spring) both, aibdrift 6.5s ease-in-out .7s infinite; }
.aib-stack.above.right .aib-msg.bot { transform-origin: 100% 100%; border-bottom-right-radius: 8px; } .aib-stack.above.left .aib-msg.bot { transform-origin: 0 100%; border-bottom-left-radius: 8px; }
.aib-stack.below.right .aib-msg.bot { transform-origin: 100% 0; border-top-right-radius: 8px; } .aib-stack.below.left .aib-msg.bot { transform-origin: 0 0; border-top-left-radius: 8px; }
.aib-who { display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.aib-mini { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--accent-2) 30%, #fff), var(--accent-2) 45%, var(--accent-strong)); box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 40%, transparent); }
.aib-line { margin: .12rem 0; font-weight: 500; letter-spacing: -.005em; }
.aib-line.li { display: flex; align-items: flex-start; gap: .6rem; }
.aib-line .pt { flex: none; width: 7px; height: 7px; margin-top: .62em; border-radius: 50%; background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); box-shadow: 0 1px 4px color-mix(in srgb, var(--accent) 45%, transparent); }
.aib-line.note { margin-top: .4rem; font-size: .84rem; color: var(--mute); }
.aib-line .w { display: inline-block; opacity: 0; animation: aibword .42s ease forwards; }
@keyframes aibword { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
/* you */
.aib-msg.user { padding: .62rem 1.05rem; color: #fff; font-weight: 600; background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 14px 30px -8px color-mix(in srgb, var(--accent) 55%, transparent); animation: aibemerge .55s var(--spring) .12s both, aibdrift 7.5s ease-in-out .9s infinite reverse; }
.aib-stack.right .aib-msg.user { border-bottom-left-radius: 8px; transform-origin: 0 100%; } .aib-stack.left .aib-msg.user { border-bottom-right-radius: 8px; transform-origin: 100% 100%; }
/* your side: your picture, with your words coming out of it, always opposite the AI bubble */
.aib-urow { display: flex; align-items: flex-end; gap: .6rem; max-width: min(340px, 100%); pointer-events: none; }
.aib-stack.right .aib-urow { align-self: flex-start; }
.aib-stack.left .aib-urow { align-self: flex-end; flex-direction: row-reverse; }
.aib-urow .aib-msg.user { max-width: calc(100% - 56px); }
.aib-dp { flex: none; border-radius: 50%; display: inline-flex; box-shadow: 0 0 0 3px var(--solid), 0 10px 22px -4px rgba(60, 20, 100, .42); animation: aibpop .5s var(--spring) both, aibdrift 7s ease-in-out .6s infinite; }
.aib-dp .avatar { width: 46px; height: 46px; font-size: .95rem; }
.aib-urow.out { animation: aibdissolve .45s ease forwards !important; pointer-events: none; }
.aib-msg.user.swap { animation: aibdrift 7.5s ease-in-out infinite reverse !important; }
/* the order: the assistant's things are always the nearest to its bubble */
.aib-stack.above .aib-urow { order: 1; } .aib-stack.above .aib-msg.bot { order: 2; } .aib-stack.above .aib-card { order: 3; }
.aib-stack.below .aib-urow { order: 1; } .aib-stack.below .aib-card { order: 2; } .aib-stack.below .aib-msg.bot { order: 3; }
/* thinking dots */
.aib-msg.typing { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.aib-msg.typing > i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: .5; animation: aibdot 1s ease-in-out infinite; }
.aib-msg.user.typing > i { background: #fff; }
.aib-msg.typing > i:nth-child(2) { animation-delay: .15s; } .aib-msg.typing > i:nth-child(3) { animation-delay: .3s; }
/* listening */
.aib-msg.user.listening { display: flex; align-items: center; gap: .75rem; padding: .5rem .55rem .5rem 1.1rem; background: linear-gradient(135deg, #b8232d, #ee5a50); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 14px 32px -8px rgba(192, 40, 45, .6); animation: aibrise .5s var(--spring) both, aibglow 1.8s ease-in-out infinite; }
.aib-msg .lbl { font-weight: 700; white-space: nowrap; }
.aib-msg .lbl.live { white-space: normal; font-weight: 600; line-height: 1.35; }
.aib-msg .lvl { display: flex; align-items: center; gap: 2px; height: 26px; flex: 1; min-width: 70px; }
.aib-msg .lvl i { width: 3px; height: 14%; border-radius: 2px; background: #fff; opacity: .92; transition: height .08s linear; }
.aib-kbd { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .24); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.aib-msg.out { animation: aibdissolve .45s ease forwards !important; pointer-events: none; }
@keyframes aibemerge { from { opacity: 0; transform: scale(.12) translateY(26px); filter: blur(8px); } 55% { transform: scale(1.045); filter: none; } to { opacity: 1; transform: none; filter: none; } }
@keyframes aibrise { from { opacity: 0; transform: translateY(18px) scale(.88); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes aibdrift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes aibdissolve { to { opacity: 0; filter: blur(10px); transform: translateY(-16px) scale(.92); } }
@keyframes aibdot { 50% { transform: translateY(-5px); opacity: 1; } }
@keyframes aibglow { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 14px 38px -4px rgba(192, 40, 45, .85); } }
/* the draft card: Send / Edit / Delete */
.aib-card { pointer-events: auto; width: var(--aib-w, 340px); padding: .85rem 1rem .95rem; border-radius: 22px; background: linear-gradient(145deg, var(--aib-hi), transparent 58%), var(--aib-glass); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 2px 5px rgba(20, 6, 40, .07), 0 16px 38px -8px rgba(60, 20, 100, .36), 0 30px 64px -22px color-mix(in srgb, var(--accent) 32%, transparent); animation: aibrise .5s var(--spring) .1s both, aibdrift 8s ease-in-out 1s infinite; }
.aib-card-head { display: flex; align-items: center; gap: .45rem; margin-bottom: .5rem; font-size: .68rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .09em; }
.aib-card-text { margin: .1rem 0 .8rem; padding-left: .75rem; border-left: 3px solid var(--accent-2); font-size: 1rem; line-height: 1.5; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22vh; overflow-y: auto; }
.aib-card-list { margin: 0 0 .7rem; padding-left: 1.1rem; } .aib-card-list li { margin: .2rem 0; }
.aib-card textarea { width: 100%; min-height: 80px; border: 1.5px solid var(--line); border-radius: 14px; padding: .6rem .75rem; font: inherit; background: var(--bg); color: inherit; resize: vertical; margin-bottom: .65rem; }
.aib-card-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.aib-card-actions .btn { border-radius: 999px; }
.aib-typer { position: fixed; z-index: 73; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b, 0px)); width: min(600px, calc(100vw - 24px)); display: flex; align-items: center; gap: .5rem; background: var(--aib-glass); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border: 1.5px solid var(--accent); border-radius: 999px; padding: .3rem .35rem .3rem 1.1rem; box-shadow: 0 14px 38px -8px rgba(60, 20, 100, .4); }
.aib-typer input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: inherit; outline: none; min-height: 40px; box-shadow: none !important; }
.aib-send { width: 42px; height: 42px; border-radius: 50%; border: 0; flex: none; background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
/* a task the AI points out */
.task.ai-spot { position: relative; z-index: 5; overflow: visible; outline: 3px solid var(--accent-2); outline-offset: 3px; animation: aispot 1.4s ease-in-out infinite; }
.task.ai-spot::after { content: "Here it is"; position: absolute; top: -13px; right: 16px; background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; font-size: .72rem; font-weight: 800; padding: .18rem .65rem; border-radius: 999px; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent); }
@keyframes aispot { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 55%, transparent); } 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--accent-2) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { .aib-fab::before, .aib-orb, .task.ai-spot, .aib-msg, .aib-card { animation: none !important; } .aib-line .w { animation: none; opacity: 1; } }
@media print { .aib-fab, .aib-stack, .aib-typer { display: none !important; } }

.slow-note { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; padding: 8px 14px; border-radius: 999px; background: rgba(20,24,32,.88); color: #fff; font-size: 13px; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
@media (min-width: 1100px) { .home-grid.solo { display: block; } }

/* the chat can be tucked away and brought back (same conversation) */
.aib-stack { transition: opacity .25s ease, transform .25s ease, visibility 0s; }
.aib-stack.min { opacity: 0; visibility: hidden; transform: scale(.9); transition: opacity .22s ease, transform .22s ease, visibility 0s .22s; transform-origin: var(--tx, 50%) 100%; }
.aib-stack.below.min { transform-origin: var(--tx, 50%) 0; }
.aib-stack.min * { pointer-events: none !important; }
.aib-fab.unread .aib-dot { background: #ff5a3c; animation: aibunread 1.2s ease-in-out infinite; }
@keyframes aibunread { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
/* small tools tied to the conversation: ask by voice, type, clear */
.aib-tools { display: none; pointer-events: auto; gap: .3rem; align-items: center; order: 5; width: max-content; }
.aib-stack.has .aib-tools { display: flex; }
.aib-stack.right .aib-tools { align-self: flex-end; margin-right: var(--aib-edge, 0px); }
.aib-stack.left .aib-tools { align-self: flex-start; margin-left: var(--aib-edge, 0px); }
.aib-tb { height: 30px; min-width: 30px; padding: 0 .55rem; border-radius: 999px; border: 1px solid var(--aib-edge); background: var(--aib-glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--mute); display: inline-flex; align-items: center; justify-content: center; gap: .3rem; font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; box-shadow: 0 3px 10px rgba(20, 6, 40, .18); }
.aib-tb:hover { color: var(--ink); }
.aib-tb.clr:hover { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .aib-stack { transition: none; } }

/* listening: the AI bubble turns teal, shows sound bars and says so; your own bubble says you are speaking */
.aib-eq { display: none; position: absolute; align-items: center; justify-content: center; gap: 3px; height: 28px; }
.aib-eq i { width: 4px; height: 100%; border-radius: 3px; background: #fff; transform: scaleY(.25); animation: aibeq 1s ease-in-out infinite; }
.aib-eq i:nth-child(2) { animation-delay: .15s; } .aib-eq i:nth-child(3) { animation-delay: .3s; } .aib-eq i:nth-child(4) { animation-delay: .45s; } .aib-eq i:nth-child(5) { animation-delay: .6s; }
@keyframes aibeq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(calc(.55 + var(--lv, 0) * .45)); } }
.aib-fab.listening .aib-eq { display: flex; }
.aib-fab.listening .aib-orb svg { display: none; }
.aib-fab.listening .aib-orb { background: radial-gradient(circle at 32% 28%, #d6fff2, #1fb99a 52%, #0a6454); box-shadow: 0 10px 26px rgba(16, 140, 118, .55); }
.aib-fab.listening::before { border-color: #1fb99a; }
.aib-fab.listening::after, .aib-fab.busy::after { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 5px 11px; border-radius: 999px; font-size: .74rem; font-weight: 800; letter-spacing: .02em; color: var(--ink); background: var(--aib-glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--aib-edge); box-shadow: 0 4px 14px rgba(20, 6, 40, .2); pointer-events: none; }
.aib-fab.listening::after { content: "Listening…"; } .aib-fab.busy::after { content: "Thinking…"; }
.aib-fab::after { left: calc(100% + 10px); } .aib-fab.tag-left::after { left: auto; right: calc(100% + 10px); }
.aib-mic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .24); animation: aibmic 1.2s ease-in-out infinite; }
@keyframes aibmic { 50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, .18); } }
.aib-msg.user.listening { padding-left: .6rem; }
.aib-urow.speaking .aib-dp { box-shadow: 0 0 0 3px var(--solid), 0 0 0 6px rgba(238, 90, 80, .55), 0 10px 22px -4px rgba(60, 20, 100, .42); }
@media (prefers-reduced-motion: reduce) { .aib-eq i, .aib-mic { animation: none; } .aib-eq i { transform: scaleY(.6); } }

/* the open chat can be dragged by touching it; the background around it is untouched */
.aib-msg { cursor: grab; touch-action: none; }
.aib-msg.bot { touch-action: pan-y; }                      /* a long answer scrolls up and down; sideways it drags the chat */
.aib-dp { pointer-events: auto; cursor: grab; touch-action: none; }
.aib-card-head, .aib-card-text { cursor: grab; touch-action: none; }
.aib-stack.dragging, .aib-stack.dragging * { user-select: none; -webkit-user-select: none; cursor: grabbing; }

/* your "speaking" bubble is the same small size as the AI's "Listening…" tag */
.aib-msg.user.listening { gap: .4rem; padding: 4px 5px 4px 5px; font-size: .74rem; border-radius: 999px; }
.aib-msg.user.listening .lbl, .aib-msg.user.listening .lbl.live { white-space: nowrap; font-weight: 800; font-size: .74rem; line-height: 1.2; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.aib-msg.user.listening .aib-mic { width: 22px; height: 22px; }
.aib-msg.user.listening .aib-mic svg { width: 13px; height: 13px; }
.aib-msg.user.listening .lvl { height: 16px; min-width: 40px; flex: none; width: 44px; }
.aib-msg.user.listening .aib-kbd { width: 24px; height: 24px; }
.aib-msg.user.listening .aib-kbd svg { width: 13px; height: 13px; }
.aib-urow .aib-msg.user.listening { max-width: none; }
.aib-urow.speaking { align-items: center; }

/* working on an answer: one small spinning ring on the AI bubble and the "Thinking…" tag (no bouncing dots) */
.aib-fab.busy::before { inset: -5px; border: 3px solid transparent; border-top-color: var(--accent-2); border-right-color: var(--accent-2); opacity: 1; transform: none; animation: aibspin .8s linear infinite; }
.aib-fab.busy .aib-orb { animation: none; }
@keyframes aibspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .aib-fab.busy::before { animation: none; } }

/* your bubble while listening: your picture alive with rings, and a small keyboard button */
.aib-msg.user.kbdonly { background: none !important; box-shadow: none !important; padding: 0 !important; animation: none !important; border-radius: 50%; min-width: 0; cursor: default; }
.aib-msg.user.kbdonly .aib-kbd { width: 38px; height: 38px; background: var(--aib-glass); color: var(--ink); border: 1px solid var(--aib-edge); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 4px 14px rgba(20, 6, 40, .22); }
.aib-msg.user.kbdonly .aib-kbd svg { width: 17px; height: 17px; }
.aib-urow .aib-msg.user.kbdonly { max-width: none; }
.aib-dp { position: relative; }
.aib-urow.speaking .aib-dp { animation: aibactive 1.3s ease-in-out infinite; }
.aib-urow.speaking .aib-dp::before, .aib-urow.speaking .aib-dp::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(238, 90, 80, .75); animation: aibripple 1.8s ease-out infinite; pointer-events: none; }
.aib-urow.speaking .aib-dp::after { animation-delay: .9s; }
@keyframes aibripple { from { transform: scale(1); opacity: .85; } to { transform: scale(calc(1.55 + var(--lv, 0) * .6)); opacity: 0; } }
@keyframes aibactive { 50% { transform: scale(calc(1.05 + var(--lv, 0) * .12)); } }
@media (prefers-reduced-motion: reduce) { .aib-urow.speaking .aib-dp, .aib-urow.speaking .aib-dp::before, .aib-urow.speaking .aib-dp::after { animation: none; } }

/* ---------- simple task cards: doughnut, title, faces with an arrow, one time badge, a thin time bar ---------- */
.task { --sc: var(--c-new); padding: .9rem 1rem 1rem; }
.task .t-row { gap: .9rem; }
.task .t-dn { flex: none; display: grid; place-items: center; }
.task .ring-fill, .task .ring.full .ring-fill { stroke: var(--sc); }
.task .ring-track { stroke: color-mix(in srgb, var(--sc) 14%, var(--line)); }
.task .ring-text { font-size: 21px; }
.task .t-main .title { font-size: 1.04rem; font-weight: 750; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task .sub-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem .8rem; flex-wrap: wrap; margin-top: .45rem; }
.task .flow { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; font-size: .82rem; font-weight: 650; color: var(--mute); }
.task .flow .who { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; }
.task .flow .who > span:last-child { max-width: 8.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task .flow .arrow { color: var(--sc); display: inline-flex; animation: flowmove 1.8s ease-in-out infinite; }
@keyframes flowmove { 50% { transform: translateX(3px); } }
.task .dbadge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .62rem; border-radius: 999px; font-size: .78rem; font-weight: 800; background: var(--line-soft); color: var(--mute); white-space: nowrap; }
.task .dbadge.soon { background: var(--info-soft); color: var(--info); }
.task .dbadge.warn { background: var(--warn-soft); color: var(--warn); }
.task .dbadge.bad { background: var(--bad-soft); color: var(--bad); }
.task .dbadge.late { animation: latepulse 1.6s ease-in-out infinite; }
@keyframes latepulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--bad) 18%, transparent); } }
.task .newdot { flex: none; width: 11px; height: 11px; border-radius: 50%; margin-top: .3rem; background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 55%, transparent); animation: newpulse 1.8s ease-out infinite; }
@keyframes newpulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.task .timebar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: color-mix(in srgb, var(--sc) 10%, transparent); }
.task .timebar i { display: block; height: 100%; width: var(--u, 0%); background: var(--sc); border-radius: 0 4px 4px 0; transform-origin: left; animation: timegrow .9s var(--ease) both; }
@keyframes timegrow { from { transform: scaleX(0); } }
.task.is-late .timebar i { background: var(--c-late); }
@media (prefers-reduced-motion: reduce) { .task .flow .arrow, .task .dbadge.late, .task .newdot, .task .timebar i { animation: none; } }
.task .flow .avatar-stack { margin-right: .25rem; flex: none; }
.task .flow .avatar-stack .avatar { box-shadow: 0 0 0 2px var(--solid); }

/* ---------- Today at a glance: icon tiles and a week strip ---------- */
.glance { padding: 1rem 1rem 1.05rem; border-radius: 24px; overflow: hidden; position: relative; background: linear-gradient(160deg, color-mix(in srgb, var(--accent-soft) 70%, var(--solid)), var(--solid) 60%); }
.glance-head { display: flex; align-items: center; gap: .45rem; font-weight: 800; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: .75rem; }
.glance-head .grow { flex: 1; } .glance-head .sum-ico { animation: twinkle 3s ease-in-out infinite; }
.glance .spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: aibspin .8s linear infinite; display: inline-block; }
.glance-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.gtile { --c: var(--mute); position: relative; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .7rem .2rem .55rem; border-radius: 18px; border: 1.5px solid var(--line); background: var(--solid); font: inherit; color: var(--ink); cursor: pointer; opacity: .55; animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); transition: transform .2s var(--spring), border-color .2s; }
.gtile.has { opacity: 1; border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.gtile.has:hover { transform: translateY(-2px); } .gtile.has:active { transform: scale(.96); }
.gtile:disabled { cursor: default; }
.gtile.late { --c: var(--c-late); } .gtile.today { --c: #f08a24; } .gtile.approve { --c: var(--c-wait); } .gtile.fresh { --c: var(--accent-2); }
.gtile .gi { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 60%, #fff)); }
.gtile:not(.has) .gi { background: var(--line); color: var(--mute); }
.gtile.has.late .gi { animation: latepulse 1.6s ease-in-out infinite; }
.gtile b { font-size: 1.5rem; line-height: 1.1; font-weight: 800; }
.gtile em { font-style: normal; font-size: .7rem; font-weight: 700; color: var(--mute); }
.glance-clear { display: flex; align-items: center; gap: .8rem; padding: .3rem .2rem; }
.glance-clear b { font-size: 1.15rem; }
.okring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2fa04f, #6fd08c); animation: pop .5s var(--spring) both; box-shadow: 0 0 0 8px color-mix(in srgb, #2fa04f 14%, transparent); }
.wstrip { display: flex; gap: .3rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.wcol { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .3rem .1rem .45rem; border-radius: 14px; }
.wcol.wtoday { background: color-mix(in srgb, var(--accent-soft) 80%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent-2); }
.wcol.wlate { background: color-mix(in srgb, var(--bad-soft) 80%, transparent); }
.whead { display: flex; flex-direction: column; align-items: center; gap: 0; border: 0; background: none; font: inherit; color: var(--ink); padding: .1rem .2rem; cursor: pointer; border-radius: 10px; }
.whead:disabled { cursor: default; } .whead small { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); } .whead b { font-size: .95rem; font-weight: 800; }
.wcol.wlate .whead b, .wcol.wlate .whead small { color: var(--bad); }
.wdots { display: flex; flex-direction: column; align-items: center; gap: 5px; min-height: 58px; }
.wcol:not(.has) .wdots::before { content: ""; width: 10px; height: 2px; border-radius: 2px; background: var(--line); margin-top: 6px; }
.gdot { width: 15px; height: 15px; border-radius: 50%; background: var(--c-new); box-shadow: 0 0 0 2px var(--solid); animation: pop .45s var(--spring) both; animation-delay: var(--d, 0ms); transition: transform .15s; }
.gdot:hover { transform: scale(1.3); }
.gdot.late { background: var(--c-late); } .gdot.wait { background: var(--c-wait); } .gdot.active { background: var(--c-active); } .gdot.new { background: var(--c-new); }
.wmore { font-size: .62rem; font-weight: 800; color: var(--mute); }
@media (prefers-reduced-motion: reduce) { .gtile, .gdot, .okring, .gtile.has.late .gi, .glance .spin { animation: none; } }

/* the week-strip column is one button (its dots are only pictures) */
.wcol { border: 0; font: inherit; color: inherit; background: transparent; cursor: pointer; transition: transform .2s var(--spring), background .2s; }
.wcol.has:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.wcol.has:active { transform: scale(.96); }
.wcol:disabled { cursor: default; }
.wcol.wtoday { background: color-mix(in srgb, var(--accent-soft) 80%, transparent); } .wcol.wlate { background: color-mix(in srgb, var(--bad-soft) 80%, transparent); }
.whead { cursor: inherit; }
.gdot:hover { transform: none; }

/* calm refreshes: no entrance animations once a screen has settled, so new data swaps in without a flash */
.calm .card.task:not(.ai-spot), .calm .gtile, .calm .gdot, .calm .okring, .calm .group-title, .calm .msg-row, .calm .day, .calm .stat, .calm .a-msg { animation: none !important; }
.calm .ring-fill, .calm .timebar i { transition: none; animation: none; }

/* hold-to-drag: the chat lights up while it is carried; the text of the chat cannot be selected by the long press */
.aib-msg, .aib-card { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.aib-card textarea { user-select: text; -webkit-user-select: text; touch-action: auto; }
.aib-stack.dragging .aib-msg, .aib-stack.dragging .aib-card { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 65%, transparent), 0 26px 48px -10px rgba(30, 8, 40, .6); }
/* the assistant filled something in on the New task form: it glows once */
.ai-fill { animation: aifill 1.4s ease-out; }
@keyframes aifill { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 75%, transparent); background-color: color-mix(in srgb, var(--accent-soft) 90%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }

/* the logo mark (berry with leaves and a tick) sits on the brand colour and follows the chosen appearance */
.logo { background: linear-gradient(135deg, var(--brand-from), var(--brand-to)); }
.logomark { display: block; overflow: visible; }
.lm-fruit { fill: #fff; } .lm-leaf { fill: #9be37a; } .lm-tick { fill: none; stroke: var(--brand-to); stroke-width: 42; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .lm-tick { stroke: var(--brand-to); }

/* the assistant's answer as points: a bold headline, coloured dots for meaning, a small bar for progress */
.aib-line.head { font-weight: 750; margin-bottom: .3rem; }
.aib-line.li .txt { flex: 1; min-width: 0; }
.aib-line.tone-late { --tc: var(--c-late); } .aib-line.tone-wait { --tc: var(--c-wait); } .aib-line.tone-good { --tc: var(--c-ok); } .aib-line.tone-info { --tc: var(--c-active); }
.aib-line[class*="tone-"] .pt { width: 9px; height: 9px; margin-top: .55em; background: var(--tc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 24%, transparent); }
.aib-pct { display: inline-flex; align-items: center; gap: .35rem; vertical-align: middle; margin: 0 .2rem; opacity: 0; animation: aibword .42s ease forwards; }
.aib-pct .bar { width: 46px; height: 7px; border-radius: 99px; overflow: hidden; background: color-mix(in srgb, var(--tc, var(--accent)) 18%, var(--line)); }
.aib-pct .bar i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: var(--tc, var(--accent)); transform-origin: left; animation: aibgrow .8s var(--ease) .1s both; }
.aib-pct b { font-size: .78rem; font-weight: 800; color: var(--tc, var(--accent)); }
@keyframes aibgrow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .aib-pct { animation: none; opacity: 1; } .aib-pct .bar i { animation: none; } }
.aib-line.li .aib-pct { display: flex; margin: .22rem 0 .1rem; }

/* "New version ready": shown only when the app could not reload itself without disturbing something */
.upd-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 90; display: flex; align-items: center; gap: .8rem; padding: .5rem .55rem .5rem 1.1rem; border-radius: 999px; color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); box-shadow: 0 14px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent); animation: pop .4s var(--spring) both; }
.upd-bar button { border: 0; border-radius: 999px; padding: .4rem .95rem; font: inherit; font-weight: 800; color: var(--accent-strong); background: #fff; cursor: pointer; }

/* history: a voice message whose audio was not kept shows what was said; and where the task is saved in Drive */
.voice-gone { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; color: var(--mute); }
.msg .txt.vtr { margin-top: .25rem; font-style: italic; }
.person-line .names.drive-path { font-size: .84rem; color: var(--mute); }
.person-line .names.drive-path a { color: var(--accent-strong); font-weight: 700; }

/* history: a task archived as a zip - the archive ID, where it is saved, the shared documents */
.arch-where .arch-code-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.arch-where .arch-code { font-size: 1.7rem; font-weight: 800; letter-spacing: .04em; color: var(--accent-strong); }
.arch-where .arch-path { margin: .2rem 0 .5rem; font-weight: 700; overflow-wrap: anywhere; }
.arch-where .row { gap: .5rem; flex-wrap: wrap; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.doc-list li { overflow-wrap: anywhere; padding: .35rem .6rem; border-radius: 10px; background: color-mix(in srgb, var(--accent) 9%, transparent); }

/* finished tasks that could not be saved to Google Drive: a warm notice, not an error (nothing is lost) */
.attn { background: var(--warn-soft); border-left: 4px solid var(--warn); border-radius: var(--radius-sm); padding: .75rem .95rem; margin: .8rem 0; }
.attn h3 { margin: 0 0 .25rem; color: var(--warn); font-size: 1rem; } .attn p { margin: .25rem 0; } .attn .why { overflow-wrap: anywhere; font-size: .92rem; }
.card .why { overflow-wrap: anywhere; font-size: .92rem; margin: .35rem 0; }

/* notifications: the settings card and the one-time question */
.notify-ask { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; } .notify-ask .grow { flex: 1 1 14rem; } .notify-ask > svg { color: var(--accent); flex: none; }
.ok-line { display: flex; align-items: center; gap: .4rem; color: var(--ok); font-weight: 700; margin: .2rem 0 .6rem; }
.nrow { display: flex; align-items: flex-start; gap: .8rem; padding: .65rem 0; border-top: 1px solid var(--line, rgba(127,127,127,.18)); cursor: pointer; }
.nrow input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--accent); flex: none; }
.nrow span { display: grid; gap: .1rem; } .nrow small { color: var(--mute); font-size: .83rem; line-height: 1.35; }
.devices { margin-top: 1rem; } .devices h3 { margin: 0 0 .4rem; }
.dev { display: flex; align-items: flex-start; gap: .6rem; padding: .4rem 0; } .dev > svg { color: var(--mute); margin-top: .15rem; flex: none; } .dev span { display: grid; gap: .1rem; } .dev small { color: var(--mute); } .dev small.bad-text { color: var(--bad); }

/* a task that is still being made on the server ("Sending…"): there for the person at once, a little faded until it is real */
.card.task.creating { opacity: .72; cursor: progress; }
.card.task.creating .dbadge { animation: creating-pulse 1.1s ease-in-out infinite; }
@keyframes creating-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .card.task.creating .dbadge { animation: none; } }

/* things you can hold a finger on (your own tasks and messages): no phone text-selection or callout menu, and a small "pressed" look while holding */
.lp { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.lp.pressing { transform: scale(.985); transition: transform .15s ease; }
.sheet-list { display: grid; gap: .55rem; }
.sheet-list .btn { justify-content: center; gap: .5rem; }
