/* Board v2 "liquid studio": glass panels floating over a slow aurora in the channel's colours; expressive display type.
   Three themes by tokens only: noc (night), dzien (day), roz (pink). Motion is transform and opacity. */
:root {
  --base: #0d0a1f; --glass: rgba(255, 255, 255, .07); --glass2: rgba(255, 255, 255, .1); --glass3: rgba(255, 255, 255, .16);
  --solid: #17132e; --line: rgba(255, 255, 255, .14); --shine: rgba(255, 255, 255, .22);
  --text: #f6f3ff; --muted: #b6aed6; --faint: #8279a8;
  --a1: #2ee6a6; --a2: #12b8ff; --on: #071a16; --ink: #5df0bd;
  --new: #ffb155; --ok: #4be3a4; --danger: #ff6b7d;
  --shadow: 0 30px 80px rgba(3, 0, 20, .6); --lift: 0 14px 34px rgba(3, 0, 20, .4);
  --blob-o: .5; --r: 22px; --spring: cubic-bezier(.3, 1.4, .5, 1); --ease: cubic-bezier(.2, .8, .2, 1);
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  color-scheme: dark;
}
[data-theme="dzien"] {
  --base: #f2effb; --glass: rgba(255, 255, 255, .62); --glass2: rgba(255, 255, 255, .8); --glass3: rgba(120, 100, 200, .12);
  --solid: #ffffff; --line: rgba(60, 40, 120, .12); --shine: rgba(255, 255, 255, .9);
  --text: #1a1433; --muted: #5e5880; --faint: #8d87ab;
  --new: #c9620a; --ok: #0b8f62; --danger: #d42d4a;
  --shadow: 0 30px 80px rgba(60, 40, 120, .25); --lift: 0 14px 34px rgba(60, 40, 120, .16);
  --blob-o: .42; color-scheme: light;
}
[data-theme="roz"] {
  --base: #ffeaf5; --glass: rgba(255, 255, 255, .62); --glass2: rgba(255, 255, 255, .82); --glass3: rgba(255, 60, 160, .13);
  --solid: #ffffff; --line: rgba(214, 17, 122, .16); --shine: rgba(255, 255, 255, .95);
  --text: #4a0f33; --muted: #8b3a6c; --faint: #b0709a;
  --new: #b8440a; --ok: #0a7a58; --danger: #c41747;
  --shadow: 0 30px 80px rgba(214, 17, 122, .28); --lift: 0 14px 34px rgba(214, 17, 122, .18);
  --blob-o: .55; color-scheme: light;
}
body[data-ch="1"] { --a1: #2ee6a6; --a2: #12b8ff; --on: #062019; --ink: #5df0bd; }
body[data-ch="2"] { --a1: #ff5f6d; --a2: #ffa64d; --on: #2a0707; --ink: #ff8f85; }
body[data-ch="4"] { --a1: #ffb03d; --a2: #ff6a3d; --on: #2a1304; --ink: #ffbe6b; }
body[data-ch="5"] { --a1: #5b8cff; --a2: #b46bff; --on: #ffffff; --ink: #9db8ff; }
[data-theme="dzien"] body[data-ch="1"] { --ink: #078a5f; } [data-theme="dzien"] body[data-ch="2"] { --ink: #d2313f; }
[data-theme="dzien"] body[data-ch="4"] { --ink: #c95a12; } [data-theme="dzien"] body[data-ch="5"] { --ink: #4a5fe0; }
[data-theme="roz"] body { --a1: #ff4fa3 !important; --a2: #b46bff !important; --on: #ffffff !important; --ink: #d6117a !important; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--base); color: var(--text); font: 15px/1.5 "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--a1) 40%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--glass3) transparent; }

/* ---------- aurora: three slow blobs in the channel's colours, behind everything */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora b { position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%; filter: blur(70px); opacity: var(--blob-o); will-change: transform; transition: background 1s; }
.aurora b:nth-child(1) { left: -18vmax; top: -26vmax; background: radial-gradient(closest-side, var(--a1), transparent); animation: drift 26s ease-in-out infinite alternate; }
.aurora b:nth-child(2) { right: -22vmax; top: 8vh; background: radial-gradient(closest-side, var(--a2), transparent); animation: drift 33s ease-in-out -11s infinite alternate-reverse; }
.aurora b:nth-child(3) { left: 22vw; bottom: -40vmax; background: radial-gradient(closest-side, #ff5fb7, transparent); opacity: calc(var(--blob-o) * .6); animation: drift 29s ease-in-out -6s infinite alternate; }
@keyframes drift { to { transform: translate3d(9vw, 7vh, 0) scale(1.2); } }

.glass { background: var(--glass); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--shine), var(--lift); backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%); }
.grad { background: linear-gradient(120deg, var(--a1), var(--a2)); color: var(--on); }

/* ---------- login */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; z-index: 60; }
.login-card { width: 100%; max-width: 410px; border-radius: 32px; padding: 34px 30px; animation: rise .6s var(--spring);
  background: var(--glass); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--shine), var(--shadow); backdrop-filter: blur(30px) saturate(170%); }
.login-card h1 { margin: 18px 0 6px; font: 700 34px/1.1 var(--display); letter-spacing: -.03em; }
.login-card p { margin: 0 0 18px; color: var(--muted); }
.login-card input { width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass2); margin-bottom: 10px; outline: 0; }
.login-card input:focus { border-color: var(--ink); }
.login-card .btn { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
.login-card .info { min-height: 22px; margin: 12px 0 0; font-size: 14px; }
.orb { width: 38px; height: 38px; border-radius: 50%; flex: none; position: relative; display: grid; place-items: center; font: 700 15px var(--display); color: var(--on);
  background: conic-gradient(from 0deg, var(--a1), var(--a2), #ff5fb7, var(--a1)); animation: spin 7s linear infinite; box-shadow: 0 0 22px color-mix(in srgb, var(--a1) 55%, transparent); }
.orb > span { animation: spin 7s linear infinite reverse; }
.orb::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .75), transparent 55%); }
.login-card .orb { width: 56px; height: 56px; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--glass3); border-top-color: var(--a1); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.96); } }

/* ---------- frame: a floating top island, the board, the chat column */
.app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; padding: 12px; gap: 12px; padding-top: max(12px, env(safe-area-inset-top)); }
.top { display: flex; align-items: center; gap: 10px; row-gap: 8px; flex-wrap: wrap; padding: 8px 10px 8px 16px; border-radius: 24px; flex: none; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 20px var(--display); letter-spacing: -.03em; margin-right: 6px; }
.brand i { width: 26px; height: 26px; border-radius: 9px; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 4px 14px color-mix(in srgb, var(--a1) 50%, transparent); transform: rotate(-8deg); }
.grow { flex: 1; }
.views, .channels { display: flex; gap: 2px; padding: 4px; background: var(--glass2); border-radius: 999px; }
.pill { display: flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .2s, color .2s, transform .25s var(--spring); }
.pill:hover { color: var(--text); transform: translateY(-1px); }
.pill:active { transform: scale(.94); }
.pill.on { background: var(--solid); color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.views .pill.on { background: linear-gradient(120deg, var(--a1), var(--a2)); color: var(--on); box-shadow: 0 6px 18px color-mix(in srgb, var(--a1) 40%, transparent); }
.pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.pill b { font-weight: 700; font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.dot-new { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px; background: var(--new); color: #1d0f00; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 40px; width: 210px; border-radius: 999px; background: var(--glass2); color: var(--faint);
  border: 1px solid transparent; transition: border-color .2s, width .35s var(--ease); }
.search:focus-within { border-color: var(--ink); width: 280px; }
.search input { border: 0; background: none; outline: 0; width: 100%; color: var(--text); }
.search input::placeholder, textarea::placeholder { color: var(--faint); }
.icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--glass2); flex: none; transition: color .2s, transform .3s var(--spring); }
.icon:hover { color: var(--text); transform: rotate(14deg) scale(1.08); } .icon:active { transform: scale(.9); }
.user { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--a2), #ff5fb7); color: #fff; font: 700 15px var(--display); flex: none; text-transform: uppercase;
  transition: transform .3s var(--spring); }
.user:hover { transform: scale(1.08); }
.icon { position: relative; }
.icon.on { color: var(--on); background: linear-gradient(120deg, var(--a1), var(--a2)); }
.icon em { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #ff3b5c; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.menuwrap { position: relative; flex: none; }
.menu { position: absolute; right: 0; top: 50px; z-index: 30; min-width: 240px; padding: 8px; border-radius: 22px; background: var(--solid); border: 1px solid var(--line); box-shadow: var(--shadow); animation: rise .3s var(--spring); }
.menu small { display: block; color: var(--faint); font-size: 12px; font-weight: 600; padding: 6px 10px 8px; }
.menu label { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.menu label:hover { background: var(--glass3); }
.menu label i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.menu input { width: 18px; height: 18px; accent-color: var(--a1); }
.livedot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; transition: background .3s; }
.livedot.on { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent), 0 0 12px var(--ok); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }
.statuses, .tabs { display: none; }
.body { flex: 1; display: flex; gap: 12px; min-height: 0; }
main { flex: 1; min-width: 0; overflow: auto; border-radius: 28px; padding: 0 0 20px; }

/* ---------- board */
.board { display: flex; gap: 10px; align-items: flex-start; }
.col { flex: 1 1 0; min-width: 200px; border-radius: 26px; padding: 10px; background: var(--glass); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--shine);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); transition: border-color .2s, background .2s, flex-basis .4s var(--ease); }
.col.vacant { flex: 0 0 132px; min-width: 132px; opacity: .72; }
.col.drop { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--glass)); opacity: 1; }
.col h2 { display: flex; align-items: center; gap: 8px; margin: 6px 8px 12px; font: 600 14px var(--display); letter-spacing: -.01em; color: var(--text); }
.col h2 i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.col h2 b { margin-left: auto; font: 700 12px "Figtree", sans-serif; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border-radius: 999px; padding: 2px 9px; font-variant-numeric: tabular-nums; }
.list { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.empty { color: var(--faint); font-size: 13.5px; text-align: center; padding: 22px 8px; border: 1.5px dashed var(--line); border-radius: 18px; }
.more { width: 100%; padding: 10px; border-radius: 16px; color: var(--muted); font-size: 13.5px; font-weight: 600; background: var(--glass2); }
.more:hover { color: var(--text); }
.card { position: relative; background: var(--glass2); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; cursor: pointer; text-align: left; width: 100%; display: block;
  box-shadow: inset 0 1px 0 var(--shine); transition: transform .3s var(--spring), box-shadow .25s, border-color .2s; }
/* cards come in one after another only when a view opens, never on a live update */
.intro .card { animation: rise .5s var(--spring) backwards; }
.intro .card:nth-child(2) { animation-delay: 50ms; } .intro .card:nth-child(3) { animation-delay: 100ms; }
.intro .card:nth-child(4) { animation-delay: 150ms; } .intro .card:nth-child(n+5) { animation-delay: 200ms; }
.card:hover { transform: translateY(-4px) rotate(-.4deg); border-color: color-mix(in srgb, var(--c) 60%, var(--line)); box-shadow: inset 0 1px 0 var(--shine), 0 16px 34px color-mix(in srgb, var(--c) 26%, transparent); }
.card:active { transform: scale(.98); }
.card.dragging { opacity: .35; }
.card .row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; min-height: 20px; }
.tag { font: 600 11.5px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--glass3); color: var(--muted); border-radius: 8px; padding: 4px 7px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge.script { color: var(--ink); background: color-mix(in srgb, var(--a1) 16%, transparent); }
.badge.new { color: var(--new); background: color-mix(in srgb, var(--new) 18%, transparent); }
.badge.fixed { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.card .row .badge:first-of-type { margin-left: auto; }
.card h3 { margin: 0 0 4px; font: 600 16.5px/1.25 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quick { display: flex; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; background: var(--glass3); font-size: 13.5px; font-weight: 700; white-space: nowrap;
  transition: transform .3s var(--spring), filter .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px) scale(1.03); } .btn:active { transform: scale(.93); }
.btn.primary { background: linear-gradient(120deg, var(--a1), var(--a2)); color: var(--on); box-shadow: 0 6px 18px color-mix(in srgb, var(--a1) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.primary::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg); opacity: 0; }
.btn.primary:hover::after { animation: sweep .8s ease-out; }
@keyframes sweep { 0% { opacity: 1; transform: translateX(0) skewX(-18deg); } 100% { opacity: 1; transform: translateX(480%) skewX(-18deg); } }
.btn.ghost { background: none; color: var(--muted); } .btn.ghost:hover { color: var(--text); background: var(--glass3); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; }

/* ---------- packs */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 380px)); gap: 14px; justify-content: center; align-items: start; padding: 8px 6px; }
.grid > .empty { grid-column: 1 / -1; }
.tile { border-radius: 28px; padding: 16px; animation: rise .5s var(--spring) backwards; background: var(--glass); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--shine), var(--lift);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); }
.tile .row { display: flex; align-items: center; gap: 6px; }
.tile .row a { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 600; }
.tile h3 { margin: 10px 0 12px; font: 600 20px/1.2 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); white-space: nowrap; }
.topics { display: flex; flex-direction: column; gap: 2px; margin: 0 0 12px; }
.topic { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 12px; text-align: left; font-size: 14px; font-weight: 500; transition: background .15s, transform .25s var(--spring); }
.topic:hover { background: var(--glass3); transform: translateX(3px); }
.topic i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); flex: none; }
.topic small { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }

/* ---------- notes (cards, packs) */
.note { position: relative; background: var(--glass2); border: 1px solid var(--line); border-radius: 16px; padding: 10px 38px 10px 14px; margin-bottom: 6px; animation: rise .4s var(--spring); }
.note::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--new); }
.note.fixed::before { background: var(--ok); }
.note .who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--faint); margin-bottom: 3px; }
.note .t { white-space: pre-wrap; overflow-wrap: anywhere; }
.note.fixed .t { color: var(--muted); }
.note .how { margin-top: 4px; font-size: 13px; color: var(--ok); white-space: pre-wrap; }
.note .x { position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; border-radius: 50%; color: var(--faint); display: grid; place-items: center; }
.note .x:hover { color: var(--danger); background: var(--glass3); }
.note .x svg { width: 14px; height: 14px; }
.compose { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
textarea { width: 100%; min-height: 44px; max-height: 180px; resize: none; background: var(--glass2); border: 1px solid var(--line); border-radius: 22px; padding: 11px 16px; outline: 0; transition: border-color .2s, box-shadow .2s; display: block; }
textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 18%, transparent); }

/* ---------- chat: its own glass column on a desktop, a full tab on the phone */
.chat { width: 390px; flex: none; display: flex; flex-direction: column; border-radius: 28px; min-height: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex: none; }
.chat-head b { display: block; font: 700 17px var(--display); letter-spacing: -.02em; }
.chat-head small { display: block; color: var(--muted); font-size: 12.5px; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.day { align-self: center; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--glass2); border-radius: 999px; padding: 3px 11px; margin: 10px 0 6px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 88%; margin-top: 6px; animation: msgin .45s var(--spring); transform-origin: 0 100%; }
.msg.me { align-self: flex-end; align-items: flex-end; transform-origin: 100% 100%; }
@keyframes msgin { from { opacity: 0; transform: translateY(12px) scale(.9); } }
.bubble { padding: 10px 14px; border-radius: 20px; border-bottom-left-radius: 6px; background: var(--glass2); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.42; }
.msg.me .bubble { background: linear-gradient(120deg, var(--a1), var(--a2)); color: var(--on); border-color: transparent; border-radius: 20px; border-bottom-right-radius: 6px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--a1) 30%, transparent); }
.msg.unread .bubble { box-shadow: 0 0 0 2px var(--new); }
.msg.sending { opacity: .55; }
.msg .name { font-size: 11.5px; font-weight: 700; color: var(--ink); margin: 0 0 2px 6px; }
.msg .meta { font-size: 11px; color: var(--faint); margin: 3px 6px 0; }
.ref { display: flex; align-items: center; gap: 9px; width: 100%; min-width: 210px; text-align: left; background: var(--glass2); border: 1px solid var(--line); border-radius: 16px; padding: 9px 11px; margin-bottom: 4px;
  transition: transform .3s var(--spring), border-color .2s; }
.ref:hover { border-color: var(--c); transform: translateY(-2px); }
.ref i { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); box-shadow: 0 0 10px var(--c); flex: none; }
.ref span { display: block; min-width: 0; }
.ref b { display: block; font: 600 14px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref small { display: block; font-size: 11.5px; color: var(--c); font-weight: 700; }
.ref svg { margin-left: auto; color: var(--faint); width: 15px; height: 15px; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.choice { padding: 9px 16px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--a1) 70%, transparent); color: var(--ink); font-weight: 700; font-size: 13.5px; background: color-mix(in srgb, var(--a1) 8%, transparent);
  transition: transform .3s var(--spring), background .2s, color .2s; }
.choice:hover { transform: translateY(-2px) scale(1.04); background: color-mix(in srgb, var(--a1) 20%, transparent); } .choice:active { transform: scale(.92); }
.choice.picked { background: linear-gradient(120deg, var(--a1), var(--a2)); color: var(--on); border-color: transparent; box-shadow: 0 6px 18px color-mix(in srgb, var(--a1) 40%, transparent); }
.choices.done .choice:not(.picked) { border-color: var(--line); color: var(--faint); background: none; }
.chat-attach { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 8px 10px 8px 14px; background: var(--glass2); border: 1px solid var(--line); border-radius: 16px; font-size: 13px; color: var(--muted); animation: rise .3s var(--spring); }
.chat-attach b { color: var(--text); font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-attach button { color: var(--faint); display: grid; place-items: center; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 12px; flex: none; }
.send { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(120deg, var(--a1), var(--a2)); color: var(--on); display: grid; place-items: center; flex: none;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--a1) 45%, transparent); transition: transform .3s var(--spring); }
.send:hover { transform: scale(1.1) rotate(-8deg); } .send:active { transform: scale(.88); }
.send svg { width: 19px; height: 19px; stroke-width: 2.4; }
.hint { margin: auto; text-align: center; color: var(--muted); font-size: 14.5px; padding: 24px; max-width: 280px; }
.hint .orb { width: 64px; height: 64px; margin: 0 auto 16px; }
.hint b { display: block; font: 700 19px var(--display); color: var(--text); margin-bottom: 4px; letter-spacing: -.02em; }

/* ---------- card sheet */
.scrim { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 28px 16px; background: color-mix(in srgb, var(--base) 55%, transparent); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { width: 100%; max-width: 780px; max-height: 100%; display: flex; flex-direction: column; background: color-mix(in srgb, var(--solid) 88%, transparent); border: 1px solid var(--line); border-radius: 34px;
  box-shadow: inset 0 1px 0 var(--shine), var(--shadow); overflow: hidden; transform: translateY(26px) scale(.94); transition: transform .45s var(--spring); backdrop-filter: blur(30px) saturate(170%); }
.scrim.on .sheet { transform: none; }
.sheet-top { display: flex; align-items: center; gap: 8px; padding: 14px 14px 12px 24px; flex: none; }
.sheet-body { padding: 0 30px 24px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.sheet h1 { font: 700 clamp(28px, 4vw, 40px)/1.05 var(--display); margin: 10px 0 14px; letter-spacing: -.04em; text-wrap: balance; }
.lead { font-size: 18.5px; line-height: 1.5; color: var(--muted); padding: 14px 18px; margin: 0 0 24px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--a1) 14%, transparent), color-mix(in srgb, var(--a2) 14%, transparent)); }
.part { margin: 0 0 16px; }
.part b, .section h4 { display: block; font: 700 11.5px "Figtree", sans-serif; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); margin: 0 0 4px; }
.part div { white-space: pre-line; font-size: 16px; }
.block { white-space: pre-wrap; background: var(--glass2); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.section { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.section h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.section h4 .btn { margin-left: auto; text-transform: none; letter-spacing: 0; padding: 5px 12px; font-size: 12.5px; color: var(--text); }
.section h4 span { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--new); } .section h4 span.fixed { color: var(--ok); }
details { margin-top: 10px; color: var(--muted); }
details summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }
details .block { margin-top: 8px; font-size: 14.5px; }
.none { color: var(--faint); font-style: italic; }
.filemeta { margin-top: 18px; color: var(--faint); font-size: 12.5px; overflow-wrap: anywhere; }
.sheet-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 18px; padding-bottom: max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.sheet-foot .btn { padding: 11px 18px; font-size: 14.5px; }
.sheet-foot select { margin-left: auto; padding: 11px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass2); font-weight: 700; font-size: 13.5px; max-width: 170px; }
.sheet-foot select option { background: var(--solid); color: var(--text); }
.waiting { color: var(--muted); font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.waiting::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); animation: breathe 1.6s ease-in-out infinite; }

/* ---------- toast, effects */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-radius: 999px; max-width: calc(100% - 24px);
  background: var(--text); color: var(--base); font-weight: 600; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 20px) scale(.9); transition: transform .45s var(--spring), opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.bad { background: var(--danger); color: #fff; border-radius: 22px; }
.toast button { font-weight: 800; color: inherit; text-decoration: underline; }
.fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 55; }
.fx i { position: absolute; width: 9px; height: 13px; border-radius: 3px; will-change: transform, opacity; }
.skeleton { border-radius: 20px; height: 90px; background: linear-gradient(100deg, var(--glass2) 40%, var(--glass3) 50%, var(--glass2) 60%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
::view-transition-group(moving) { animation-duration: .45s; animation-timing-function: cubic-bezier(.3, 1.3, .5, 1); }

@media (min-width: 901px) { .scrim { right: 414px; } body.nochat .scrim { right: 0; } body.nochat .chat { display: none; } } /* the chat stays usable next to an open card */
@media (min-width: 901px) and (max-width: 1400px) { .scrim { right: 354px; } .chat { width: 330px; } .search { width: 150px; } .search:focus-within { width: 200px; } .col { min-width: 220px; } }

/* ---------- phone: floating dock at the bottom, one status at a time, chat as its own tab */
@media (max-width: 900px) {
  .app { padding: 8px 8px 0; gap: 8px; padding-top: max(8px, env(safe-area-inset-top)); }
  .top { padding: 6px 8px 6px 14px; gap: 8px; flex-wrap: wrap; border-radius: 22px; }
  .views, #chatToggle { display: none; }
  .brand { font-size: 19px; }
  .channels { order: 5; width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 2px; }
  .channels .pill { flex: 1; justify-content: center; padding: 8px 10px; }
  .search { flex: 1; width: auto; min-width: 0; } .search:focus-within { width: auto; }
  body:not([data-tab="board"]) .channels, body:not([data-tab="board"]) .search, body:not([data-tab="board"]) .statuses { display: none; }
  body:not([data-tab="board"]) .top .grow { display: block; }
  .statuses { display: flex; gap: 6px; overflow-x: auto; padding: 0 2px; scrollbar-width: none; flex: none; }
  .statuses .pill { background: var(--glass); border: 1px solid var(--line); flex: none; backdrop-filter: blur(16px); }
  .statuses .pill.on { background: color-mix(in srgb, var(--c) 24%, var(--glass)); border-color: var(--c); color: var(--text); box-shadow: none; }
  main { padding: 0 0 110px; border-radius: 22px; }
  .board { display: block; min-width: 0; padding: 0; }
  .col { display: none; background: none; border: 0; padding: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; min-width: 0; opacity: 1 !important; }
  .col.on { display: block; } .col h2 { display: none; }
  .card { background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .card:hover { transform: none; }
  .grid { grid-template-columns: 1fr; padding: 0; }
  .chat { width: 100%; margin-bottom: 84px; }
  body.typing .chat { margin-bottom: 8px; }
  body[data-tab="chat"] main, body:not([data-tab="chat"]) .chat { display: none; }
  .tabs { display: flex; gap: 4px; position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 15; padding: 6px; border-radius: 999px;
    background: color-mix(in srgb, var(--solid) 78%, transparent); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--shine), var(--shadow); backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%); }
  .tab { display: flex; align-items: center; gap: 7px; padding: 11px 15px; border-radius: 999px; color: var(--muted); font-size: 13.5px; font-weight: 700; position: relative; transition: transform .3s var(--spring), color .2s; }
  .tab:active { transform: scale(.9); }
  .tab svg { width: 21px; height: 21px; }
  .tab span { display: none; }
  .tab.on { background: linear-gradient(120deg, var(--a1), var(--a2)); color: var(--on); box-shadow: 0 6px 18px color-mix(in srgb, var(--a1) 45%, transparent); }
  .tab.on span { display: inline; }
  .tab em { position: absolute; top: 2px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b5c; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
  body.typing .tabs { display: none; }
  .scrim { padding: 0; align-items: end; }
  .sheet { max-width: none; height: 95%; border-radius: 34px 34px 0 0; border-width: 1px 0 0; transform: translateY(100%); }
  .sheet-body { padding: 0 20px 20px; }
  .sheet-foot .btn { flex: 1; justify-content: center; }
  .sheet-foot select { margin-left: 0; flex: 1; max-width: none; }
  .toast { bottom: 96px; }
  .aurora b { filter: blur(50px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- accepting is always green, in every channel and theme */
.btn[data-move="Do produkcji"], .choice[data-move="Do produkcji"] { background: linear-gradient(120deg, #2fd66b, #12a150); color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(24, 180, 90, .45), inset 0 1px 0 rgba(255, 255, 255, .45); }
