/* BIS Portal v2 look: themed glass over a living backdrop. Tokens first, then shell, then pieces. */
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Montserrat", "Inter", system-ui, sans-serif;
  --r-hero: 26px; --r-card: 20px; --radius: 16px; --r-ctl: 12px;
  --tab-h: 62px; --bar-h: 56px; --dock: calc(var(--tab-h) + 10px);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --blur: blur(22px) saturate(170%);
}

/* ---- themes. Each one sets: backdrop, glass, ink, accent, hero ---- */
:root, [data-theme="midnight"] {
  --bg: #0b1c2d; --bg-2: #07131f;
  --b1: #00c2ff; --b2: #3550ff; --b3: #00d9b2; --blob-a: .34;
  --surface: rgba(255, 255, 255, .07); --surface-2: rgba(255, 255, 255, .05); --solid: #12283d;
  --glass-line: rgba(255, 255, 255, .13); --hi: rgba(255, 255, 255, .16); --line: rgba(255, 255, 255, .11);
  --ink: #eaf5ff; --muted: #9db4cb;
  --brand: #00c2ff; --brand-ink: #03202e; --brand-soft: rgba(0, 194, 255, .16); --sky: #00c2ff; --navy: #1b3a5c;
  --hero-a: #0a3f66; --hero-b: #0077b8; --hero-c: #00c2ff;
  --good: #4ade80; --warn: #fbbf24; --bad: #ff7a7a;
  --shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 10px 30px rgba(0, 0, 0, .32);
  --scrim: rgba(3, 10, 18, .6); --glow: rgba(0, 194, 255, .14);
  color-scheme: dark;
}
[data-theme="daylight"] {
  --bg: #eaf2f9; --bg-2: #dfeaf5;
  --b1: #7fdcff; --b2: #b9c6ff; --b3: #a6f0df; --blob-a: .7;
  --surface: rgba(255, 255, 255, .66); --surface-2: rgba(255, 255, 255, .5); --solid: #f6fafd;
  --glass-line: rgba(255, 255, 255, .9); --hi: rgba(255, 255, 255, .95); --line: rgba(11, 28, 45, .1);
  --ink: #0b1c2d; --muted: #4f6478;
  --brand: #006fa8; --brand-ink: #ffffff; --brand-soft: rgba(0, 150, 214, .13); --sky: #0096d6; --navy: #0b1c2d;
  --hero-a: #0b1c2d; --hero-b: #0a5f93; --hero-c: #00b4ee;
  --good: #117a46; --warn: #a85208; --bad: #bf2630;
  --shadow: 0 1px 1px rgba(11, 28, 45, .04), 0 10px 28px rgba(11, 28, 45, .09);
  --scrim: rgba(11, 28, 45, .38); --glow: rgba(0, 150, 214, .1);
  color-scheme: light;
}
[data-theme="dusk"] {
  --bg: #24121f; --bg-2: #170b16;
  --b1: #ff9a4a; --b2: #e2506b; --b3: #6f4fe0; --blob-a: .36;
  --surface: rgba(255, 240, 228, .075); --surface-2: rgba(255, 240, 228, .05); --solid: #36202f;
  --glass-line: rgba(255, 226, 204, .15); --hi: rgba(255, 236, 220, .18); --line: rgba(255, 226, 204, .12);
  --ink: #fff3e8; --muted: #d0b3ad;
  --brand: #ffae5c; --brand-ink: #381a04; --brand-soft: rgba(255, 174, 92, .16); --sky: #ffae5c; --navy: #5a2a45;
  --hero-a: #5a1f3f; --hero-b: #c2473f; --hero-c: #ffa24d;
  --good: #7be0a0; --warn: #ffd166; --bad: #ff8a8a;
  --shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 10px 30px rgba(10, 2, 8, .4);
  --scrim: rgba(14, 5, 12, .62); --glow: rgba(255, 174, 92, .14);
  color-scheme: dark;
}
[data-theme="evergreen"] {
  --bg: #0b1f1a; --bg-2: #061410;
  --b1: #19d49b; --b2: #0f8f8a; --b3: #b9f26b; --blob-a: .28;
  --surface: rgba(236, 255, 246, .07); --surface-2: rgba(236, 255, 246, .045); --solid: #142e27;
  --glass-line: rgba(214, 255, 236, .14); --hi: rgba(226, 255, 242, .16); --line: rgba(214, 255, 236, .11);
  --ink: #ecfff6; --muted: #a2c2b5;
  --brand: #3fe0ac; --brand-ink: #03261a; --brand-soft: rgba(63, 224, 172, .15); --sky: #3fe0ac; --navy: #1d4a3d;
  --hero-a: #0b3f33; --hero-b: #0f8a6c; --hero-c: #5fe8b4;
  --good: #7ae582; --warn: #f6c453; --bad: #ff8478;
  --shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 10px 30px rgba(0, 0, 0, .34);
  --scrim: rgba(3, 12, 9, .62); --glow: rgba(63, 224, 172, .13);
  color-scheme: dark;
}
/* Clean: no blur, no moving backdrop. Fastest on older phones and easiest to read in sunlight. */
[data-theme="clean"] {
  --bg: #eef0f3; --bg-2: #eef0f3;
  --surface: #ffffff; --surface-2: #f5f6f8; --solid: #ffffff;
  --glass-line: #dfe3e9; --hi: transparent; --line: #dfe3e9;
  --ink: #0b1c2d; --muted: #556575;
  --brand: #0b1c2d; --brand-ink: #ffffff; --brand-soft: #e3e8ee; --sky: #0096d6; --navy: #0b1c2d;
  --hero-a: #0b1c2d; --hero-b: #12324f; --hero-c: #1c4f78;
  --good: #117a46; --warn: #a85208; --bad: #bf2630;
  --shadow: 0 1px 2px rgba(11, 28, 45, .06);
  --scrim: rgba(11, 28, 45, .4); --glow: transparent; --blur: none;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.45 var(--font); font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
  transition: background-color .5s var(--ease), color .3s;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--brand); color: var(--brand-ink); }

/* ---- living backdrop: three soft lights drifting behind the glass ---- */
.wall { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: linear-gradient(160deg, var(--bg), var(--bg-2)); transition: background .5s; }
.wall i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; opacity: var(--blob-a); filter: blur(70px); will-change: transform; transition: background .6s, opacity .6s; }
.wall i:nth-child(1) { background: radial-gradient(circle, var(--b1), transparent 62%); left: -28vmax; top: -30vmax; animation: drift1 34s ease-in-out infinite alternate; }
.wall i:nth-child(2) { background: radial-gradient(circle, var(--b2), transparent 62%); right: -34vmax; top: 18vh; animation: drift2 41s ease-in-out infinite alternate; }
.wall i:nth-child(3) { background: radial-gradient(circle, var(--b3), transparent 62%); left: -8vmax; bottom: -42vmax; animation: drift3 47s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(16vmax, 12vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-18vmax, -10vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(14vmax, -14vmax) scale(1.1); } }
[data-theme="clean"] .wall i { display: none; }
[data-motion="off"] .wall i { animation: none; }
#app { position: relative; z-index: 1; height: 100%; }

.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--bg); color: var(--muted); z-index: 50; transition: opacity .35s; }
.boot.gone { opacity: 0; pointer-events: none; }
@keyframes breathe { 50% { transform: scale(1.06); } }

/* ---- glass: one recipe, used by everything raised ---- */
.card, .tile, .bar, .tabs, .sheet, .composer, .seg, .pal, .editbar {
  background: var(--surface); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .tile, .bar, .tabs, .sheet, .composer, .seg, .pal, .editbar { background: var(--solid); }
}

/* ---------- shell ---------- */
.shell { display: flex; flex-direction: column; height: 100dvh; max-width: 760px; margin: 0 auto; position: relative; }
.bar {
  flex: none; display: flex; align-items: center; gap: 10px; min-height: calc(var(--bar-h) + var(--safe-t)); padding: var(--safe-t) 12px 0;
  border-width: 0 0 1px; border-radius: 0; z-index: 5;
}
.bar .logo { width: 34px; height: 34px; object-fit: contain; flex: none; }
.bar h1 { font-family: var(--display); font-size: 1.12rem; font-weight: 700; letter-spacing: -.015em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.bar .sub { display: block; font-family: var(--font); font-size: .74rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: var(--r-ctl); cursor: pointer; color: var(--ink); flex: none; transition: background .15s, transform .15s; }
.iconbtn:active { background: var(--brand-soft); transform: scale(.92); }
.iconbtn svg { width: 22px; height: 22px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, var(--hero-b), var(--hero-c)); color: #fff; font-family: var(--display); font-weight: 700; font-size: .78rem; flex: none; object-fit: cover; box-shadow: 0 0 0 2px var(--glass-line); }

.view { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px 14px calc(var(--dock) + var(--safe-b) + 30px); }
.view > div { animation: rise .32s var(--ease); }
.view.no-tabs { padding-bottom: calc(var(--safe-b) + 28px); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* floating dock */
.tabs {
  position: absolute; left: 10px; right: 10px; bottom: calc(8px + var(--safe-b)); display: flex; border-radius: 24px; z-index: 6; padding: 0 4px;
}
.tab { flex: 1; min-height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .69rem; font-weight: 600; color: var(--muted); border: 0; background: none; cursor: pointer; position: relative; z-index: 1; transition: color .2s; }
.tab svg { width: 23px; height: 23px; transition: transform .35s var(--spring); }
.tab[aria-current="page"] { color: var(--brand); }
.tab[aria-current="page"] svg { transform: translateY(-1px) scale(1.1); }
.tab:active svg { transform: scale(.88); }
.tab-ind { position: absolute; left: 0; top: 0; width: var(--iw, 0); height: var(--ih, 0); transform: translate(var(--ix, 0), var(--iy, 0)); border-radius: 18px; background: var(--brand-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent); opacity: var(--io, 0); transition: transform .42s var(--ease), width .42s var(--ease), height .42s var(--ease), opacity .2s; pointer-events: none; }
.rail-brand, .rail-foot { display: none; }

/* ---------- primitives ---------- */
.card { border-radius: var(--r-card); padding: 16px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.strong { font-weight: 650; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-title { font-family: var(--display); font-size: .98rem; font-weight: 650; letter-spacing: -.01em; color: var(--ink); margin: 18px 4px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.section-title a { font-family: var(--font); font-size: .84rem; font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: var(--r-ctl); border: 1px solid var(--glass-line); background: var(--surface); box-shadow: inset 0 1px 0 var(--hi); font-weight: 620; cursor: pointer; text-decoration: none; color: var(--ink); transition: transform .18s var(--ease), box-shadow .25s, filter .2s, background .2s; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 88%, #fff), var(--brand)); border-color: transparent; color: var(--brand-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 18px color-mix(in srgb, var(--brand) 32%, transparent); position: relative; overflow: hidden; }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-120%); }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(.97); }
.fab { position: absolute; right: 18px; bottom: calc(var(--dock) + var(--safe-b) + 18px); width: 58px; height: 58px; border-radius: 20px; border: 0; background: linear-gradient(150deg, color-mix(in srgb, var(--brand) 80%, #fff), var(--brand)); color: var(--brand-ink); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 26px color-mix(in srgb, var(--brand) 42%, transparent); cursor: pointer; z-index: 4; animation: pop .45s var(--spring) both; transition: transform .2s var(--ease); }
.fab:active { transform: scale(.92); }
.fab svg { width: 26px; height: 26px; }
@keyframes pop { from { transform: scale(.4) rotate(-30deg); opacity: 0; } }

.pill { --c: var(--muted); display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 650; color: color-mix(in srgb, var(--c) 82%, var(--ink)); background: color-mix(in srgb, var(--c) 15%, transparent); white-space: nowrap; }
[data-scheme="dark"] .pill { color: color-mix(in srgb, var(--c) 45%, #ffffff); background: color-mix(in srgb, var(--c) 26%, transparent); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; margin: 0 -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--surface); font-weight: 600; font-size: .86rem; color: var(--muted); cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: transparent; color: var(--brand-ink); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.seg a { text-align: center; padding: 9px 6px; border-radius: 10px; font-weight: 620; color: var(--muted); font-size: .92rem; transition: background .2s, color .2s; }
.seg a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 30%, transparent); }

.search { position: relative; margin-bottom: 10px; }
.search svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); }
.search input { width: 100%; min-height: 46px; padding: 0 14px 0 40px; border-radius: var(--r-ctl); border: 1px solid var(--glass-line); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.search input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }

/* list rows: tinted, not blurred, so long lists stay smooth on phones */
.list { display: grid; gap: 8px; }
.item { display: flex; gap: 12px; align-items: center; padding: 13px 14px; background: var(--surface); border: 1px solid var(--glass-line); border-radius: var(--radius); color: inherit; text-decoration: none; box-shadow: inset 0 1px 0 var(--hi); min-height: 64px; transition: transform .18s var(--ease), background .2s; }
.item:active { transform: scale(.985); background: var(--surface-2); }
.item .title { font-weight: 620; }
.item .meta { color: var(--muted); font-size: .84rem; }
.chev { width: 18px; height: 18px; color: var(--muted); flex: none; transition: transform .2s var(--ease); }
.unread { width: 9px; height: 9px; border-radius: 50%; background: var(--sky); flex: none; box-shadow: 0 0 0 0 var(--sky); animation: ping 2s infinite; }
.badge-n { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-family: var(--display); font-weight: 700; flex: none; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { display: block; padding: 15px 16px; border-radius: var(--r-card); color: inherit; position: relative; transition: transform .2s var(--ease); }
.tile:active { transform: scale(.97); }
.tile .n { font-family: var(--display); font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .l { color: var(--muted); font-size: .82rem; font-weight: 550; margin-top: 2px; }
.tile.alert .n { color: var(--bad); }
.tile.alert::after { content: ""; position: absolute; top: 14px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 var(--bad); animation: ping 2s infinite; }

.hero { border-radius: var(--r-hero); padding: 20px; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 140% at 100% 0%, var(--hero-c), transparent 55%), linear-gradient(140deg, var(--hero-a), var(--hero-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 14px 34px color-mix(in srgb, var(--hero-b) 38%, transparent); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .22) 50%, transparent 62%); transform: translateX(-130%); animation: sheen 1.5s .35s var(--ease) both; }
@keyframes sheen { to { transform: translateX(130%); } }
.hero .hi { opacity: .88; font-size: .9rem; }
.hero .big { font-family: var(--display); font-size: clamp(1.9rem, 8.5vw, 2.5rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.12; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.hero .btn { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .34); color: #fff; margin-top: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero .ring { position: absolute; right: 16px; top: 16px; width: 46px; height: 46px; }
.hero .ring circle { fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 2.5; stroke-dasharray: 126; stroke-dashoffset: 126; animation: draw .9s .3s var(--ease) forwards; transform: rotate(-90deg); transform-origin: center; }
.hero .ring path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s 1s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--hero-c), var(--brand)); border-radius: inherit; transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.actions .btn { min-height: 54px; flex-direction: column; gap: 3px; font-size: .78rem; padding: 0 6px; border-radius: 14px; }
.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; font-size: .93rem; white-space: pre-wrap; word-break: break-word; }
.note .meta { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 2px; white-space: normal; }

.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--muted); background: transparent; display: grid; place-items: center; flex: none; cursor: pointer; color: transparent; padding: 0; transition: background .2s, border-color .2s, transform .3s var(--spring); }
.check svg { width: 15px; height: 15px; }
.check[aria-checked="true"] { background: var(--good); border-color: var(--good); color: var(--bg-2); transform: scale(1.08); }
.prio { width: 4px; align-self: stretch; border-radius: 4px; flex: none; background: var(--line); }
.prio.p3 { background: var(--warn); } .prio.p4 { background: var(--bad); }
.due.over { color: var(--bad); font-weight: 650; }
.timer { font-family: var(--display); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.5rem; letter-spacing: .01em; }

/* chat */
.thread { display: grid; gap: 10px; padding-bottom: 8px; }
.bubble { max-width: 86%; padding: 10px 13px; border-radius: 18px; background: var(--surface); border: 1px solid var(--glass-line); white-space: pre-wrap; word-break: break-word; animation: rise .3s var(--ease); }
.bubble .who { display: block; font-size: .72rem; font-weight: 650; color: var(--muted); margin-bottom: 2px; }
.bubble time { display: block; font-size: .68rem; color: var(--muted); margin-top: 3px; text-align: right; }
.bubble.mine { margin-left: auto; background: var(--brand); border-color: transparent; color: var(--brand-ink); border-bottom-right-radius: 5px; }
.bubble.mine .who, .bubble.mine time { color: color-mix(in srgb, var(--brand-ink) 75%, transparent); }
.bubble:not(.mine) { border-bottom-left-radius: 5px; }
.composer { position: sticky; bottom: calc(var(--dock) + var(--safe-b) + 12px); z-index: 3; display: flex; gap: 8px; align-items: flex-end; padding: 8px; border-radius: 20px; margin-top: 10px; }
.view.no-tabs .composer { bottom: calc(var(--safe-b) + 8px); }
.composer textarea { flex: 1; border: 0; background: transparent; resize: none; max-height: 120px; min-height: 40px; padding: 8px; outline: none; }
.composer .btn { min-height: 42px; border-radius: 14px; }

/* forms + sheet */
.field { display: grid; gap: 5px; }
.field label { font-size: .8rem; font-weight: 620; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--glass-line); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.field select option { background: var(--solid); color: var(--ink); }
.field textarea { min-height: 96px; resize: vertical; }
.field .err { color: var(--bad); font-size: .8rem; }
.form { display: grid; gap: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.sheet-wrap { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); animation: fade .2s; }
.sheet { width: 100%; max-width: 640px; max-height: 92dvh; overflow-y: auto; background: color-mix(in srgb, var(--solid) 86%, transparent); border-radius: 26px 26px 0 0; border-bottom: 0; padding: 8px 16px calc(var(--safe-b) + 20px); animation: up .38s var(--ease); }
[data-theme="clean"] .sheet { background: var(--bg); }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--muted); opacity: .5; margin: 6px auto 12px; }
.sheet h2 { font-family: var(--display); font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; margin-bottom: 14px; }
@keyframes up { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast { position: fixed; left: 50%; bottom: calc(var(--dock) + var(--safe-b) + 22px); translate: -50% 0; max-width: min(92vw, 420px); background: var(--ink); color: var(--bg-2); padding: 11px 16px; border-radius: 14px; font-weight: 600; font-size: .9rem; z-index: 60; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); animation: toast .4s var(--spring); }
.toast.err { background: #b3232c; color: #fff; }
@keyframes toast { from { opacity: 0; transform: translateY(16px) scale(.94); } }

.empty { text-align: center; padding: 36px 20px; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty svg { width: 40px; height: 40px; opacity: .6; }
.empty strong { color: var(--ink); font-family: var(--display); }
.skel { height: 66px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; border: 1px solid var(--line); animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.banner { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); color: var(--ink); padding: 10px 12px; border-radius: var(--r-ctl); font-size: .88rem; margin-bottom: 12px; }

/* login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--safe-t) + 20px) 18px 28px; max-width: 460px; margin: 0 auto; }
.login .panel { width: 100%; display: grid; gap: 18px; animation: rise .5s var(--ease); }
.login .brand { display: grid; justify-items: center; gap: 10px; text-align: center; }
[data-scheme="dark"] [data-scheme="dark"] .bar .logo { background: rgba(255, 255, 255, .94); border-radius: 10px; padding: 3px; }
.login .brand p { color: var(--muted); font-size: .95rem; }
.login .pw { position: relative; }
.login .pw button { position: absolute; right: 4px; top: 50%; translate: 0 -50%; }
.login .foot { text-align: center; font-size: .78rem; color: var(--muted); }

/* switches */
.prefrow { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; border-top: 1px solid var(--line); cursor: pointer; }
.prefrow:first-of-type { border-top: 0; }
.prefrow .grow { min-width: 0; }
.prefrow input { position: absolute; opacity: 0; pointer-events: none; }
.prefrow .sw { flex: none; width: 46px; height: 28px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 35%, transparent); position: relative; transition: background .2s; }
.prefrow .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s var(--spring); }
.prefrow input:checked + .sw { background: var(--brand); }
.prefrow input:checked + .sw::after { transform: translateX(18px); }
.prefrow input:focus-visible + .sw { outline: 3px solid var(--sky); outline-offset: 2px; }
.prefrow input:disabled + .sw { opacity: .5; }

/* billing documents */
.seg + .search, .seg + .chips { margin-top: 10px; }
.linecard { display: grid; gap: 10px; }
.linecard .two3 { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 10px; align-items: end; }
.linecard .amt { min-height: 46px; display: flex; align-items: center; font-weight: 650; padding-bottom: 0; white-space: nowrap; }
.linecard .rm { justify-self: end; }
.picker { text-align: left; justify-content: space-between; }
.totals { display: grid; gap: 6px; }
.totals .row.between { justify-content: space-between; }
.confirm p { margin: 0 0 14px; }
.confirm .actions { display: grid; grid-auto-flow: row; gap: 10px; }
.confirm .actions .btn { flex-direction: row; font-size: 1rem; min-height: 46px; }

/* ---------- Home: widgets you can rearrange ---------- */
.home { display: grid; gap: 12px; }
.home > .widget { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); position: relative; }
.widget > .section-title:first-child { margin-top: 6px; }
.grip { display: none; position: absolute; top: -8px; right: -6px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--solid); color: var(--ink); place-items: center; cursor: grab; touch-action: none; box-shadow: var(--shadow); }
.grip svg { width: 18px; height: 18px; }
.editing .grip { display: grid; animation: pop .35s var(--spring) both; }
.editing [data-w] { outline: 1.5px dashed color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 3px; border-radius: var(--r-card); }
.editing [data-w] > :not(.grip) { pointer-events: none; }
.editing [data-w]:not(.dragging) { animation: wiggle .5s ease-in-out infinite alternate; }
.editing .tiles > [data-w]:nth-child(even) { animation-direction: alternate-reverse; }
@keyframes wiggle { from { rotate: -.35deg; } to { rotate: .35deg; } }
[data-w].dragging { z-index: 20; transition: none !important; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); scale: 1.03; cursor: grabbing; }
.editbar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 16px; font-size: .9rem; animation: rise .3s var(--ease); }
.arrange { justify-self: center; margin-top: 6px; color: var(--muted); background: transparent; border-style: dashed; box-shadow: none; }

/* ---------- theme picker ---------- */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.swatch { display: grid; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; text-align: center; font-size: .78rem; font-weight: 600; color: var(--muted); }
.swatch .pv { height: 68px; border-radius: 16px; position: relative; overflow: hidden; border: 1px solid var(--glass-line); background: var(--pv-bg); transition: transform .3s var(--spring), box-shadow .2s; }
.swatch .pv::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; left: -20%; top: -40%; background: var(--pv-a); filter: blur(14px); opacity: .9; }
.swatch .pv::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: 12%; height: 42%; border-radius: 9px; background: var(--pv-glass); border: 1px solid var(--pv-line); box-shadow: inset 4px 0 0 var(--pv-a); }
.swatch[aria-checked="true"] { color: var(--ink); }
.swatch[aria-checked="true"] .pv { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 5px var(--brand); transform: scale(.96); }
.swatch:active .pv { transform: scale(.92); }

/* ---------- quick search / command palette ---------- */
.pal-wrap { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: flex; justify-content: center; align-items: flex-start; padding: calc(var(--safe-t) + 9vh) 12px 12px; animation: fade .15s; }
.pal { width: 100%; max-width: 560px; max-height: min(70dvh, 560px); display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--solid) 82%, transparent); animation: palin .32s var(--spring); }
@keyframes palin { from { opacity: 0; transform: translateY(-12px) scale(.96); } }
.pal .q { display: flex; align-items: center; gap: 10px; padding: 4px 16px; border-bottom: 1px solid var(--line); }
.pal .q svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.pal .q input { flex: 1; min-height: 54px; border: 0; background: transparent; outline: none; font-size: 1.05rem; }
.pal ul { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.pal li.grp { padding: 10px 10px 4px; font-size: .76rem; font-weight: 600; color: var(--muted); }
.pal li.opt { display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 46px; border-radius: 12px; cursor: pointer; }
.pal li.opt svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.pal li.opt .sub { color: var(--muted); font-size: .82rem; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.pal li.opt[aria-selected="true"] { background: var(--brand-soft); }
.pal li.opt[aria-selected="true"] svg { color: var(--brand); }
.pal .none { padding: 22px; text-align: center; color: var(--muted); }
kbd { font: 600 .72rem var(--font); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--glass-line); background: var(--surface-2); color: var(--muted); }

/* ---------- pointer devices: light follows the cursor, things lift ---------- */
@media (hover: hover) and (pointer: fine) {
  .card, .item, .tile { background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), var(--glow), transparent 60%); }
  .item:hover, .tile:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--hi), var(--shadow); }
  .item:hover .chev { transform: translateX(3px); color: var(--brand); }
  .btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
  .btn.primary:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 26px color-mix(in srgb, var(--brand) 48%, transparent); }
  .btn.primary:hover:not(:disabled)::after { transform: translateX(120%); transition: transform .7s var(--ease); }
  .fab:hover { transform: translateY(-3px) rotate(90deg); }
  .iconbtn:hover, .tab:hover { background: var(--surface-2); }
  .chip:hover { color: var(--ink); }
  .chip[aria-pressed="true"]:hover { color: var(--brand-ink); }
  ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 40%, transparent); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
}

/* ---------- desktop: side rail, wider canvas, two-column Home ---------- */
@media (min-width: 960px) {
  .shell { max-width: none; display: grid; grid-template-columns: 252px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .tabs, .tabs[hidden] { display: flex !important; position: static; grid-column: 1; grid-row: 1 / 3; flex-direction: column; gap: 4px; padding: 18px 12px; margin: 12px 0 12px 12px; border-radius: 24px; }
  .tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 14px; font-size: .95rem; border-radius: 14px; }
  .tab-ind { border-radius: 14px; }
  .rail-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
  .rail-brand img { width: 34px; height: 34px; object-fit: contain; }
  .rail-foot { display: grid; gap: 8px; margin-top: auto; }
  .rail-foot .btn { justify-content: space-between; font-size: .88rem; color: var(--muted); min-height: 42px; padding: 0 12px; }
  .bar { grid-column: 2; background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 10px 28px 0; }
  .bar .logo { display: none; }
  .bar h1 { font-size: 1.5rem; }
  .view, .view.no-tabs { grid-column: 2; padding: 18px 28px 40px; }
  .view > div { max-width: 820px; margin: 0 auto; }
  .view > div:has(> .home) { max-width: 1180px; }
  .home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .home > [data-w="hero"], .home > .editbar, .home > .arrange { grid-column: 1 / -1; }
  .home > .arrange { justify-self: start; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .hero { padding: 30px; }
  .hero .big { font-size: 3.2rem; }
  .fab { position: fixed; right: 32px; bottom: 32px; }
  .composer, .view.no-tabs .composer { bottom: 8px; }
  .toast { bottom: 28px; }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 26px; border-bottom: 1px solid var(--glass-line); max-height: 86dvh; padding-top: 18px; }
  .sheet .grab { display: none; }
  .themes { grid-template-columns: repeat(6, 1fr); }
  .list { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }


/* ---- Animated brand mark: the emblem draws in along its blade, light crosses it, and its sphere goes into orbit while something loads ---- */
.mark { --s: 72px; position: relative; display: inline-block; width: calc(var(--s) * .825); height: var(--s); flex: none; }
.mark img { display: block; width: 100%; height: 100%; object-fit: contain; animation: markin .95s cubic-bezier(.2, .8, .2, 1) both; filter: drop-shadow(0 6px 18px var(--glow)); }
[data-scheme="dark"] .mark img { filter: brightness(1.28) saturate(1.1) drop-shadow(0 0 1px rgba(255, 255, 255, .55)) drop-shadow(0 6px 22px var(--glow)); }
.mark .shine { position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(../icons/emblem.png) center / 100% 100% no-repeat; mask: url(../icons/emblem.png) center / 100% 100% no-repeat;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .9) 50%, transparent 62%) 130% 0 / 260% 100% no-repeat;
  animation: markshine 3.6s ease-in-out 1s infinite; }
.mark .orbit { position: absolute; left: 50%; top: 50%; width: calc(var(--s) * 1.5); height: calc(var(--s) * 1.5); margin: calc(var(--s) * -.75) 0 0 calc(var(--s) * -.75); border-radius: 50%; opacity: 0; transition: opacity .3s; pointer-events: none; }
.mark .orbit::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 55%, var(--brand) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); }
.mark .orbit b { position: absolute; top: calc(var(--s) * -.055); left: 50%; width: calc(var(--s) * .15); height: calc(var(--s) * .15); margin-left: calc(var(--s) * -.075); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #bfe6ff, #2aa5f5 45%, #0b3fae); box-shadow: 0 0 12px 2px var(--glow); }
.mark.busy .orbit { opacity: 1; animation: markspin 1.15s linear infinite; }
.mark.busy img { animation: markin .95s cubic-bezier(.2, .8, .2, 1) both, breathe 1.8s ease-in-out .95s infinite; }
@keyframes markin { from { clip-path: circle(0% at 18% 100%); opacity: .2; transform: translateY(8px) scale(.94); } to { clip-path: circle(150% at 18% 100%); opacity: 1; transform: none; } }
@keyframes markshine { 0% { background-position: 130% 0; } 45%, 100% { background-position: -30% 0; } }
@keyframes markspin { to { transform: rotate(360deg); } }
[data-motion="off"] .mark .shine { display: none; }
@media (prefers-reduced-motion: reduce) { .mark .shine { display: none; } }

.boot .mark { --s: 84px; margin-bottom: 26px; }
.loading { display: grid; justify-items: center; gap: 30px; padding: 72px 0 40px; color: var(--muted); font-size: .9rem; }
.loading .mark { --s: 56px; }
.login .brand .mark { --s: 104px; margin: 22px 0 26px; }
.login .brand h1 { font-family: var(--display); font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; animation: rise .6s var(--ease) .35s both; }
.login .brand p { animation: rise .6s var(--ease) .45s both; }
.rail-brand .mark { --s: 36px; }
.rail-brand:hover .mark .shine { animation-duration: 1.2s; animation-delay: 0s; }
.btn .mark { --s: 20px; }


/* ---- Chat ---- */
.tab { position: relative; }
.tab-badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--danger, #e5484d); color: #fff; font-size: .66rem; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px var(--solid, var(--bg)); }
.tab-badge[hidden] { display: none; }
.tab-badge.bump { animation: bump .5s var(--spring, ease); }
@keyframes bump { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } }
.chat-row { align-items: center; }
.chat-row .chat-av { width: 44px; height: 44px; font-size: .95rem; flex: none; }
.chat-row .chat-av svg { width: 20px; height: 20px; }
.chat-av.client { background: linear-gradient(140deg, #f59e0b, #ef6c3a); }
.chat-av.group { background: linear-gradient(140deg, #7c5cff, #3b82f6); }
.chat-row.has-unread .title { font-weight: 720; }
.chat-row.has-unread .meta.ellip { color: var(--text); }
.chat-row .count { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: .74rem; font-weight: 700; }
.chat-thread { gap: 6px; }
.chat-thread .day { justify-self: center; font-size: .72rem; font-weight: 620; color: var(--muted); padding: 4px 12px; margin: 8px 0 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--glass-line); }
.chat-thread .bubble { animation: msgin .32s var(--spring, ease) both; transform-origin: 0 100%; }
.chat-thread .bubble.mine { transform-origin: 100% 100%; }
.chat-thread .bubble.still { animation: none; }
.chat-thread .bubble.pending { opacity: .62; }
.chat-thread .bubble.failed { background: transparent; color: var(--danger, #e5484d); border: 1px dashed currentColor; cursor: pointer; }
.chat-thread .bubble.failed time { color: inherit; }
.chat-thread .bubble a { color: inherit; text-decoration: underline; word-break: break-all; }
.chat-thread .bubble audio { display: block; width: min(240px, 60vw); height: 38px; margin: 2px 0 4px; }
.chat-img { display: block; max-width: min(240px, 62vw); max-height: 260px; border-radius: 12px; margin: 2px 0 4px; }
@keyframes msgin { from { opacity: 0; transform: translateY(10px) scale(.92); } }
@media (min-width: 900px) { .tab-badge { position: static; margin-left: auto; box-shadow: none; } }
.chat-row { min-width: 0; }
.chat-row .grow { min-width: 0; flex: 1 1 0; }
.chat-row .grow .row { min-width: 0; }
.chat-row .title { min-width: 0; }

/* conversation screens: the message box sits at the bottom even when the thread is short */
.view > .fill { min-height: 100%; display: flex; flex-direction: column; }
.view > .fill > .talk { flex: 1; display: flex; flex-direction: column; }
.view > .fill > .talk > .thread { flex: 1; align-content: start; }
.view > .fill > .talk > .composer { margin-top: auto; }
.view > .fill > .talk > .composer, .view.no-tabs > .fill > .talk > .composer { bottom: 6px; }
.view:has(> .fill) { padding-bottom: calc(var(--dock) + var(--safe-b) + 18px); }
.view.no-tabs:has(> .fill) { padding-bottom: calc(var(--safe-b) + 12px); }
@media (min-width: 900px) { .view:has(> .fill), .view.no-tabs:has(> .fill) { padding-bottom: 20px; } }


/* ---- Conversation screens: the message box always sits on the bottom edge ---- */
.view.talk-mode { display: flex; flex-direction: column; padding-bottom: calc(var(--safe-b) + 10px); }
.view.talk-mode > .fill { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 0; }
.view.talk-mode > .fill > .talk { flex: 1 0 auto; display: flex; flex-direction: column; }
.view.talk-mode > .fill > .talk > .thread { flex: 1 0 auto; align-content: end; }
.view.talk-mode .dock-in { position: sticky; bottom: 0; z-index: 3; margin-top: 10px; display: grid; gap: 8px; }
.view.talk-mode .dock-in .composer { position: static; margin: 0; }
.composer .iconbtn { flex: none; width: 40px; height: 42px; color: var(--muted); }
.composer .iconbtn[aria-expanded="true"] { color: var(--brand); }
.composer textarea { min-width: 0; }
.emoji-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 2px; padding: 8px; border-radius: 18px; max-height: 196px; overflow-y: auto; background: var(--solid, var(--surface)); border: 1px solid var(--glass-line); box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,.18)); animation: rise .2s var(--ease); }
.emoji-panel[hidden] { display: none; }
.emoji-panel .emo { font-size: 1.45rem; line-height: 1; height: 44px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; }
.emoji-panel .emo:hover, .emoji-panel .emo:focus-visible { background: var(--brand-soft, rgba(0,0,0,.06)); }
@media (min-width: 900px) { .view.talk-mode { padding-bottom: 16px; } }

.view.talk-mode .dock-in { grid-template-columns: minmax(0, 1fr); width: 100%; box-sizing: border-box; }
.view.talk-mode .dock-in > * { min-width: 0; box-sizing: border-box; width: 100%; }
.composer { min-width: 0; }
.composer .btn { flex: none; }
.emoji-panel { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); overflow-x: hidden; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 12px; margin: 2px 0 4px; border-radius: 12px; background: rgba(255,255,255,.16); text-decoration: none !important; font-weight: 600; }
.bubble:not(.mine) .file-chip { background: var(--brand-soft, rgba(0,0,0,.06)); }
.file-chip svg { width: 20px; height: 20px; flex: none; }
.file-chip .ellip { min-width: 0; }
