@font-face { font-family: "Inter Tight"; src: url("/fonts/InterTight-wght.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader-opsz-wght.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Zilla Slab"; src: url("/fonts/ZillaSlab-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Zilla Slab"; src: url("/fonts/ZillaSlab-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Familjen Grotesk"; src: url("/fonts/FamiljenGrotesk-wght.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Archivo"; src: url("/fonts/Archivo-wdth-wght.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces-SOFT-WONK-opsz-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/PlayfairDisplay-wght.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "DM Serif Display"; src: url("/fonts/DMSerifDisplay-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Anton"; src: url("/fonts/Anton-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Bebas Neue"; src: url("/fonts/BebasNeue-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Oswald"; src: url("/fonts/Oswald-wght.woff2") format("woff2"); font-weight: 200 700; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Syne"; src: url("/fonts/Syne-wght.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Roboto Slab"; src: url("/fonts/RobotoSlab-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Unbounded"; src: url("/fonts/Unbounded-wght.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Space Mono"; src: url("/fonts/SpaceMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }
@font-face { font-family: "Space Mono"; src: url("/fonts/SpaceMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0020-007E, U+00A0-017F, U+2010-2027, U+2030-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF; }

:root {
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --t-hero: 28px; --t-title: 20px; --t-body: 16px; --t-label: 14px; --t-micro: 13px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px;
  --tap: 44px; --head: 52px; --bar: 64px; --rail: 88px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}
:root[data-panel="client"] { --r-ctl: 14px; --r-tile: 20px; --r-pill: 999px; --r-card: 20px; }
:root[data-panel="admin"] { --r-ctl: 6px; --r-tile: 6px; --r-pill: 999px; --r-card: 8px; }

:root[data-panel="client"] {
  --bg: #fdfcfa; --surface: #ffffff; --surface-2: #f4f1ec; --surface-3: #ebe6df;
  --line: rgb(29 24 19 / 0.14); --line-strong: #8f857b;
  --ink: #0e0d0c; --ink-2: #3a322b; --ink-3: #5f554b;
  --accent: #a04a14; --accent-fill: #a04a14; --accent-text: #a04a14; --accent-ink: #ffffff;
  --accent-wash: color-mix(in srgb, #a04a14 10%, #ffffff);
  --anchor: #14181f; --anchor-ink: #ffffff;
  --ok: #1c7c4a; --ok-bg: #e6f3ec; --warn: #a04a14; --warn-bg: #fbeee4; --bad: #b3261e; --bad-bg: #fdecea; --off: #8f8378;
  --bubble-me: #14181f; --bubble-me-ink: #ffffff; --bubble-bot: #f4f1ec;
  --shadow: 0 1px 2px rgb(20 24 31 / .06), 0 8px 24px rgb(20 24 31 / .08);
}
@media (prefers-color-scheme: dark) { :root[data-panel="client"]:not([data-theme="light"]) {
  --bg: #0a0a0a; --surface: #151515; --surface-2: #1d1d1d; --surface-3: #262626;
  --line: #2d2d2d; --line-strong: #6b6b6b;
  --ink: #ececec; --ink-2: #b4b4b4; --ink-3: #8f8f8f;
  --accent: #f09a5d; --accent-fill: #f09a5d; --accent-text: #f09a5d; --accent-ink: #14181f;
  --accent-wash: color-mix(in srgb, #f09a5d 14%, #151515);
  --anchor: #151515; --anchor-ink: #ececec;
  --ok: #6cc292; --ok-bg: #14261d; --warn: #f09a5d; --warn-bg: #2c2013; --bad: #ff7a70; --bad-bg: #2e1517; --off: #6e6e6e;
  --bubble-me: #f09a5d; --bubble-me-ink: #14181f; --bubble-bot: #1d1d1d;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
} }
:root[data-panel="client"][data-theme="dark"] {
  --bg: #0a0a0a; --surface: #151515; --surface-2: #1d1d1d; --surface-3: #262626;
  --line: #2d2d2d; --line-strong: #6b6b6b;
  --ink: #ececec; --ink-2: #b4b4b4; --ink-3: #8f8f8f;
  --accent: #f09a5d; --accent-fill: #f09a5d; --accent-text: #f09a5d; --accent-ink: #14181f;
  --accent-wash: color-mix(in srgb, #f09a5d 14%, #151515);
  --anchor: #151515; --anchor-ink: #ececec;
  --ok: #6cc292; --ok-bg: #14261d; --warn: #f09a5d; --warn-bg: #2c2013; --bad: #ff7a70; --bad-bg: #2e1517; --off: #6e6e6e;
  --bubble-me: #f09a5d; --bubble-me-ink: #14181f; --bubble-bot: #1d1d1d;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
}

:root[data-panel="admin"] {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eef0f3; --surface-3: #e3e6eb;
  --line: #dde1e7; --line-strong: #8a93a0;
  --ink: #14181f; --ink-2: #48505c; --ink-3: #5b6472;
  --accent: #a8521a; --accent-fill: #a8521a; --accent-text: #a8521a; --accent-ink: #ffffff;
  --accent-wash: color-mix(in srgb, #a8521a 10%, #ffffff);
  --anchor: #14181f; --anchor-ink: #ffffff;
  --ok: #1c7c4a; --ok-bg: #e6f3ec; --warn: #9a5b00; --warn-bg: #fdf1dc; --bad: #b3261e; --bad-bg: #fdecea; --off: #8a93a0;
  --bubble-me: #14181f; --bubble-me-ink: #ffffff; --bubble-bot: #eef0f3;
  --shadow: 0 1px 2px rgb(20 24 31 / .06), 0 8px 24px rgb(20 24 31 / .08);
}
@media (prefers-color-scheme: dark) { :root[data-panel="admin"]:not([data-theme="light"]) {
  --bg: #0f1216; --surface: #171b21; --surface-2: #1e232b; --surface-3: #262c36;
  --line: #2a303a; --line-strong: #6b7686;
  --ink: #e8eaee; --ink-2: #a8b0bd; --ink-3: #939cab;
  --accent: #f09a5d; --accent-fill: #f09a5d; --accent-text: #f09a5d; --accent-ink: #14181f;
  --accent-wash: color-mix(in srgb, #f09a5d 14%, #171b21);
  --anchor: #171b21; --anchor-ink: #e8eaee;
  --ok: #6cc292; --ok-bg: #14261d; --warn: #e0a34a; --warn-bg: #2c2213; --bad: #f2917f; --bad-bg: #2e1a17; --off: #6f7988;
  --bubble-me: #f09a5d; --bubble-me-ink: #14181f; --bubble-bot: #1e232b;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
} }
:root[data-panel="admin"][data-theme="dark"] {
  --bg: #0f1216; --surface: #171b21; --surface-2: #1e232b; --surface-3: #262c36;
  --line: #2a303a; --line-strong: #6b7686;
  --ink: #e8eaee; --ink-2: #a8b0bd; --ink-3: #939cab;
  --accent: #f09a5d; --accent-fill: #f09a5d; --accent-text: #f09a5d; --accent-ink: #14181f;
  --accent-wash: color-mix(in srgb, #f09a5d 14%, #171b21);
  --anchor: #171b21; --anchor-ink: #e8eaee;
  --ok: #6cc292; --ok-bg: #14261d; --warn: #e0a34a; --warn-bg: #2c2213; --bad: #f2917f; --bad-bg: #2e1a17; --off: #6f7988;
  --bubble-me: #f09a5d; --bubble-me-ink: #14181f; --bubble-bot: #1e232b;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; font-family: var(--font); font-size: var(--t-body); line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; font-weight: 750; }
p { margin: 0; }
a { color: var(--accent-text); }
img, svg, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ico { flex: none; }
.muted { color: var(--ink-3); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* iOS zooms into any field under 16px. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px; }


body.has-shell { padding-block: calc(var(--head) + env(safe-area-inset-top, 0px)) calc(var(--bar) + env(safe-area-inset-bottom, 0px)); padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px); }
.main { max-width: 720px; margin-inline: auto; padding: var(--s4) var(--s4) var(--s7); }
:root[data-panel="admin"] .main { max-width: 1100px; }

.app-head { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; gap: var(--s2);
  height: calc(var(--head) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-bottom: 1px solid var(--line); }
.app-head__spacer { flex: 1 1 auto; }
.app-chip { position: relative; min-width: 0; }
.app-chip__button { list-style: none; display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); max-width: 64vw; padding-inline: var(--s2); border-radius: var(--r-ctl); cursor: pointer; font-weight: 750; font-size: 17px; }
.app-chip__button::-webkit-details-marker { display: none; }
.app-chip__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-chip[open] .app-chip__button .ico:last-child { transform: rotate(180deg); }
.app-menu { position: absolute; inset-block-start: calc(100% + 6px); inset-inline-start: 0; z-index: 50; display: grid; gap: 2px; width: min(280px, calc(100vw - 16px)); padding: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.app-menu__who { padding: var(--s1) var(--s3) var(--s2); font-size: var(--t-micro); color: var(--ink-3); overflow-wrap: anywhere; }
.app-menu__item { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s3); border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink); font-size: 16px; font-weight: 600; text-align: start; text-decoration: none; cursor: pointer; width: 100%; }
.app-menu__item:hover { background: var(--surface-2); }
.app-menu__item .ico { color: var(--ink-3); }
.app-menu form { margin: 0; }
.app-lamp { display: grid; place-items: center; width: var(--tap); height: var(--tap); }
.app-bell { position: relative; display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-ctl); color: var(--ink); text-decoration: none; }
.app-bell[aria-current="page"] { color: var(--accent-text); }
.app-bell .badge { position: absolute; inset-block-start: 4px; inset-inline-end: 2px; }

.app-bar { position: fixed; inset: auto 0 0 0; z-index: 40; display: flex; gap: var(--s1);
  height: calc(var(--bar) + env(safe-area-inset-bottom, 0px)); padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-top: 1px solid var(--line); }
.app-bar__item { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tap); color: var(--ink-3); text-decoration: none; font-size: 12.5px; font-weight: 650; }
.app-bar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-bar__item[aria-current="page"] { color: var(--accent-text); font-weight: 800; }
.app-bar__item[aria-current="page"] .ico { stroke-width: 2.3; }
.app-bar__item[aria-current="page"]::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent-fill); }
.app-bar__item .badge { position: absolute; inset-block-start: 6px; inset-inline-start: calc(50% + 6px); }
body.kbd-open .app-bar { display: none; }
body.kbd-open.has-shell { padding-block-end: 0; }

/* Client top bar: the ink anchor in light mode (PM client-light-css). */
@media not all and (prefers-color-scheme: dark) {
  :root[data-panel="client"]:not([data-theme="dark"]) .app-head { background: var(--anchor); color: var(--anchor-ink); border-bottom-color: transparent; }
  :root[data-panel="client"]:not([data-theme="dark"]) .app-head :is(.app-chip__button, .app-bell) { color: var(--anchor-ink); }
}

@media (min-width: 900px) {
  body.has-shell { padding-block: 0; padding-inline-start: var(--rail); }
  .app-head { position: sticky; inset-block-start: 0; height: var(--head); padding-top: 0; }
  .app-bar { inset: 0 auto 0 0; width: var(--rail); height: auto; flex-direction: column; justify-content: flex-start; gap: var(--s2); padding: var(--s3) var(--s1); border-top: 0; border-inline-end: 1px solid var(--line); }
  .app-bar__item { flex: none; min-height: 64px; border-radius: var(--r-ctl); }
  .app-bar__item:hover { background: var(--surface-2); color: var(--ink); }
  .app-bar__item[aria-current="page"]::before { inset-block: 25%; inset-inline: 0 auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
}

/* Bare pages (sign-in): no bars, centred column. */
body.is-bare { display: grid; place-items: start center; padding: max(48px, env(safe-area-inset-top, 0px)) var(--s4) var(--s7); }
.bare { width: 100%; max-width: 400px; display: grid; gap: var(--s5); }



.ps-ill{display:block;width:100%;max-width:160px;height:auto;color:var(--ink-2)}
.ps-ill .ps-ill-s,.ps-ill .ps-ill-f,.ps-ill .ps-ill-a,.ps-ill .ps-ill-d,.ps-ill .ps-ill-af,.ps-ill .ps-ill-ok,.ps-ill .ps-ill-ok-f{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ps-ill .ps-ill-f{fill:var(--surface-2)}
.ps-ill .ps-ill-a,.ps-ill .ps-ill-af{stroke:var(--accent)}
.ps-ill .ps-ill-af{fill:color-mix(in srgb,var(--accent) 14%,transparent)}
.ps-ill .ps-ill-d{stroke:var(--bad)}
.ps-ill .ps-ill-ok,.ps-ill .ps-ill-ok-f{stroke:var(--ok)}
.ps-ill .ps-ill-ok-f{fill:var(--ok-bg)}
.ps-ill .ps-ill-k{fill:none;stroke:var(--ink);stroke-width:4;stroke-linecap:square}
.ps-ill circle.ps-ill-k{fill:var(--ink);stroke:none}
.ps-ill .ps-ill-dash{stroke-dasharray:4 5}

.pf-icon__svg{display:inline-block;vertical-align:middle;flex:none}
.pf-icon--unknown{display:inline-flex;align-items:center;gap:6px}
.pf-icon__name{font-size:.875em}
.pf-icon-text{display:inline-flex;align-items:center;gap:6px}

/* Black brand marks (TikTok, X, Threads, Buffer, ElevenLabs, Zernio) turn to the page ink on a dark page. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pf-icon__svg path:is([fill="#000000"], [fill="#231F20"], [fill="#14181F"]) { fill: var(--ink); } }
:root[data-theme="dark"] .pf-icon__svg path:is([fill="#000000"], [fill="#231F20"], [fill="#14181F"]) { fill: var(--ink); }
/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s5); border: 1px solid transparent; border-radius: var(--r-ctl); font-size: 16px; font-weight: 700; line-height: 1.1; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn--primary { background: var(--accent-fill); color: var(--accent-ink); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--quiet { background: var(--surface-2); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn--lg { min-height: 56px; font-size: 17px; border-radius: var(--r-tile); }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.ibtn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: var(--r-ctl); background: transparent; color: inherit; cursor: pointer; text-decoration: none; }
.ibtn:hover { background: var(--surface-2); }
.ibtn--fill { background: var(--accent-fill); color: var(--accent-ink); border-radius: 50%; }
/* small marks */
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 6px; border-radius: 10px; background: var(--accent-fill); color: var(--accent-ink); font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.lamp { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--off); flex: none; }
.lamp[data-tone="ok"] { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.lamp[data-tone="warn"], .lamp[data-tone="wait"], .lamp[data-tone="accent"] { background: var(--accent-fill); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.lamp[data-tone="bad"] { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent); }
.lamp[data-tone="wait"] { animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.sw { font-weight: 700; font-size: var(--t-label); }
.sw[data-tone="ok"] { color: var(--ok); } .sw[data-tone="bad"] { color: var(--bad); } .sw[data-tone="warn"], .sw[data-tone="wait"], .sw[data-tone="accent"] { color: var(--accent-text); } .sw[data-tone="off"] { color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips { display: flex; gap: var(--s2); overflow-x: auto; padding-block: 2px; scrollbar-width: none; }
/* rows */
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s2) var(--s4); color: var(--ink); text-decoration: none; }
a.row:hover { background: var(--surface-2); }
.row__lead { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; }
.row__lead--icon { background: var(--surface-2); color: var(--ink-2); }
.row__lead--icon[data-tone="accent"], .row__lead--icon[data-tone="warn"] { background: var(--accent-wash); color: var(--accent-text); }
.row__lead--icon[data-tone="ok"] { background: var(--ok-bg); color: var(--ok); }
.row__lead--icon[data-tone="bad"] { background: var(--bad-bg); color: var(--bad); }
.row__lead--thumb { overflow: hidden; background: var(--surface-2); }
.row__lead--thumb img { width: 100%; height: 100%; object-fit: cover; }
.row__lead--avatar { border-radius: 50%; background: var(--anchor); color: var(--anchor-ink); font-weight: 800; font-size: 15px; }
.row__text { display: grid; min-width: 0; flex: 1 1 auto; }
.row__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__sub { font-size: var(--t-label); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta { flex: none; display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-label); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.row__go { flex: none; color: var(--ink-3); display: grid; }
/* sections, tiles */
.stack { display: grid; gap: var(--s5); }
.sec { display: grid; gap: var(--s3); }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.sec__title { font-size: 17px; font-weight: 800; }
.sec__act { font-size: var(--t-label); font-weight: 700; text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.tile { position: relative; display: grid; align-content: space-between; gap: var(--s4); min-height: 112px; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--surface); color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--line-strong); }
.tile__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); }
.tile[data-tone="accent"] .tile__icon { background: var(--accent-wash); color: var(--accent-text); }
.tile__label { font-weight: 750; font-size: 16px; line-height: 1.2; }
.tile__count { position: absolute; inset-block-start: var(--s4); inset-inline-end: var(--s4); min-width: 28px; height: 28px; padding-inline: 8px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-fill); color: var(--accent-ink); font-weight: 800; font-size: 14px; }
.card { padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
/* screen head */
.shead { display: flex; align-items: center; gap: var(--s1); min-height: var(--tap); margin-block-end: var(--s3); }
.shead__title { font-size: var(--t-title); font-weight: 800; }
.back { display: grid; place-items: center; width: var(--tap); height: var(--tap); margin-inline-start: -10px; color: var(--ink); border-radius: var(--r-ctl); }
/* forms */
.field { display: grid; gap: 6px; }
.field__label { font-size: var(--t-label); font-weight: 700; color: var(--ink-2); }
.field__hint { font-size: var(--t-micro); color: var(--ink-3); }
.input, textarea.input, select.input { width: 100%; min-height: 52px; padding: 0 var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); }
textarea.input { padding-block: var(--s3); min-height: 96px; resize: vertical; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.input--code { font-size: 28px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.tgl { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px; cursor: pointer; }
.tgl__label { font-weight: 650; }
.tgl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tgl__track { position: relative; flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--surface-3); transition: background .2s var(--ease); }
.tgl__track::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s var(--ease); }
.tgl input:checked + .tgl__track { background: var(--accent-fill); }
.tgl input:checked + .tgl__track::after { transform: translateX(20px); }
.tgl input:focus-visible + .tgl__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: flex; padding: 3px; gap: 3px; border-radius: var(--r-ctl); background: var(--surface-2); }
.seg__opt { flex: 1 1 0; display: grid; place-items: center; min-height: 40px; border-radius: calc(var(--r-ctl) - 2px); color: var(--ink-2); font-weight: 700; text-decoration: none; font-size: 15px; }
.seg__opt[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.prog { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.prog > i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent-fill); border-radius: inherit; transition: width .3s var(--ease); }
.banner { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--warn-bg); color: var(--ink); font-weight: 600; font-size: 15px; }
.banner .ico { color: var(--accent-text); }
.banner[data-tone="bad"] { background: var(--bad-bg); } .banner[data-tone="bad"] .ico { color: var(--bad); }
.banner[data-tone="ok"] { background: var(--ok-bg); } .banner[data-tone="ok"] .ico { color: var(--ok); }
.banner a { margin-inline-start: auto; font-weight: 800; white-space: nowrap; }
/* bottom sheet */
.sheet__open { list-style: none; cursor: pointer; }
.sheet__open::-webkit-details-marker { display: none; }
.sheet[open] > .sheet__open::before { content: ""; position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .35); }
.sheet__panel { position: fixed; inset: auto 0 0 0; z-index: 61; max-height: 80dvh; overflow: auto; padding: var(--s3) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow); display: grid; gap: var(--s3); }
.sheet__head { display: grid; justify-items: center; gap: var(--s2); padding-block-end: var(--s1); }
.sheet__head::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); }
/* chat bubble (base; the chat package refines) */
.bub { max-width: 82%; padding: 10px 14px; border-radius: 20px; background: var(--bubble-bot); color: var(--ink); display: grid; gap: 2px; }
.bub--me { justify-self: end; background: var(--bubble-me); color: var(--bubble-me-ink); border-end-end-radius: 6px; }
.bub--bot { justify-self: start; border-end-start-radius: 6px; }
.bub--system { justify-self: center; background: transparent; color: var(--ink-3); font-size: var(--t-label); text-align: center; }
.bub__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bub__time { justify-self: end; font-size: 12px; opacity: .7; }
/* toasts */
.toasts { position: fixed; inset-inline: var(--s4); inset-block-end: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + var(--s3)); z-index: 70; display: grid; gap: var(--s2); justify-items: center; pointer-events: none; }
.toast { padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--anchor); color: var(--anchor-ink); font-weight: 650; box-shadow: var(--shadow); pointer-events: auto; }
/* states */
.st { display: grid; justify-items: center; gap: var(--s3); padding: var(--s7) var(--s4); text-align: center; }
.st .ps-ill { max-width: 140px; }
.st__title { font-size: 18px; font-weight: 800; }
.st__body { color: var(--ink-2); max-width: 32ch; }
.st__body--quiet { color: var(--ink-3); font-size: var(--t-label); }
.st--error .st__title, .st--refusal .st__title { color: var(--bad); }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }


.main--chat { max-width: 760px; padding: 0; display: flex; flex-direction: column; height: calc(100dvh - var(--head) - var(--bar) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { .main--chat { height: calc(100dvh - var(--head)); } }
body.kbd-open .main--chat { height: calc(100dvh - var(--head) - env(safe-area-inset-top, 0px)); }
.chat { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.chat__top { padding: var(--s3) var(--s4) 0; }
.chat__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s3) var(--s3); overscroll-behavior: contain; scroll-padding-block-end: var(--s3); }
.chat__log > .st { margin-block: auto; }
.chat__log > .msg:first-of-type, .chat__log > .chat__older + .msg { margin-block-start: auto; }
.chat__older { align-self: center; min-height: var(--tap); display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--s4); border-radius: var(--r-ctl); color: var(--ink-2); font-weight: 700; font-size: var(--t-label); text-decoration: none; }
.chat__older svg { transform: rotate(180deg); }
.chat__older[aria-busy="true"] { opacity: .6; pointer-events: none; }
.chat__new { position: absolute; inset-inline-end: var(--s3); inset-block-end: 92px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s4); border: 0; border-radius: var(--r-ctl); background: var(--anchor); color: var(--anchor-ink); font-weight: 700; font-size: 14px; box-shadow: var(--shadow); cursor: pointer; }
.chat.is-working .chat__new { inset-block-end: 148px; }
.chat__input { position: relative; }
/* toasts on the conversation float above the composer, not over it */
body:has(.main--chat .chat) .toasts { inset-block-end: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + 96px); }
@media (min-width: 900px) { body:has(.main--chat .chat) .toasts { inset-block-end: 104px; } }

/* messages */
.msg { display: grid; }
.msg + .msg--me, .msg--me + .msg:not(.msg--me) { margin-block-start: var(--s1); }
.msg--me { justify-items: end; }
.msg--bot, .msg--card { justify-items: start; }
.msg .bub { max-width: min(84%, 520px); }
.msg--card > * { width: min(100%, 440px); }
.bub__time { display: inline-flex; align-items: center; gap: 4px; }
.bub__via { display: inline-flex; align-items: center; gap: 2px; margin-inline-end: 4px; }
.bub__via svg { border-radius: 50%; }
.msg--note { justify-items: center; }
.note { display: inline-flex; align-items: center; gap: 6px; max-width: 92%; padding: 6px var(--s3); border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-label); font-weight: 600; text-align: start; }
.note svg { flex: none; }

/* own message on its way */
.msg.is-pending .bub { opacity: .78; }
.msg.is-failed .bub { opacity: 1; box-shadow: inset 0 0 0 2px var(--bad); }
.msg.is-failed .bub__time { color: var(--bad); opacity: 1; font-weight: 700; }
.bub__spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: chatspin .8s linear infinite; }
.msg.is-failed .bub__spin { display: none; }
@keyframes chatspin { to { transform: rotate(1turn); } }
.bub__retry { justify-self: end; min-height: 36px; margin-block-start: 4px; padding: 0 var(--s3); border: 0; border-radius: var(--r-ctl); background: var(--bad); color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; }
.bub--me .bub__text--said, .bub--bot .bub__text--said { font-size: 15px; opacity: .9; }

/* voice note (audio attachment) */
.bub--voice { min-width: min(240px, 84%); }
.vnote { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: var(--s2); min-height: 44px; }
.vnote__play { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; cursor: pointer; }
.vnote__pause { display: none; width: 12px; height: 14px; border-inline: 4px solid currentColor; }
.vnote.is-playing .vnote__play svg { display: none; }
.vnote.is-playing .vnote__pause { display: block; }
.vnote__bars { position: relative; display: flex; align-items: center; gap: 2px; height: 28px; overflow: hidden; }
.vnote__bars i { flex: 1 1 0; min-width: 2px; height: var(--h, 40%); border-radius: 2px; background: currentColor; opacity: .38; }
.vnote__fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: currentColor; opacity: .22; mix-blend-mode: normal; border-radius: 4px; pointer-events: none; transition: width .2s linear; }
.vnote__len { display: inline-flex; align-items: center; min-width: 32px; justify-content: end; font-size: 12px; font-variant-numeric: tabular-nums; opacity: .8; }

/* attachments */
.att { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: var(--s3); align-items: center; padding: 6px; margin-block-end: 4px; border-radius: 14px; background: color-mix(in srgb, currentColor 8%, transparent); color: inherit; text-decoration: none; }
.att > img, .att__thumb, .att__ph { grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 10px; }
.att__thumb { position: relative; overflow: hidden; background: var(--surface-3); }
.att__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att__play { position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; }
.att__ph { display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.att__name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att__size { font-size: var(--t-micro); opacity: .75; }

/* delivery tile: finished material for the client (not an approval) */
.dlv { width: min(100%, 420px); display: grid; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); }
.dlv__kicker { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-micro); font-weight: 800; color: var(--ok); text-transform: uppercase; letter-spacing: .04em; }
.dlv .att { background: var(--surface-2); margin: 0; }
.dlv__more { display: grid; gap: var(--s2); }
.dlv .dlv__more .att[data-mime^="video/"] { grid-template-columns: 56px 1fr; grid-template-rows: auto auto; padding: var(--s2); background: var(--surface-2); }
.dlv .dlv__more .att[data-mime^="video/"] .att__thumb, .dlv .dlv__more .att[data-mime^="video/"] .att__ph { grid-row: 1 / span 2; width: 56px; height: 56px; aspect-ratio: auto; border-radius: 12px; }
.dlv__body { display: grid; gap: 2px; }
.dlv__title { font-size: 17px; font-weight: 800; line-height: 1.25; }
.dlv__text { color: var(--ink-2); font-size: 15px; white-space: pre-wrap; }
.dlv__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.dlv__get { min-height: 44px; }
.dlv .bub__time { font-size: 12px; color: var(--ink-3); }

/* composer: voice first (the mic is the big button), text, attach */
.composer { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: var(--s2); padding: var(--s2) var(--s3) var(--s3); background: var(--surface); border-top: 1px solid var(--line); }
.composer:not(:has(.composer__attach)) { grid-template-columns: 1fr auto; }
.composer__text { min-height: 48px; max-height: 160px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--bg); color: var(--ink); resize: none; line-height: 1.35; font-size: 16px; }
.composer__text:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.composer__send, .composer__mic { display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; }
.composer__send { width: 48px; height: 48px; background: var(--accent-fill); color: var(--accent-ink); }
.composer__mic { width: 60px; height: 60px; margin-block-start: -6px; background: var(--accent-fill); color: var(--accent-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .15s var(--ease); }
.composer__mic:active { transform: scale(.94); }
.composer__mic:focus-visible, .composer__send:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* Voice first: the send button shows only when there is text (web/chat.js toggles .has-text). */
.composer:not(.has-text):has(.composer__mic) .composer__send { display: none; }
.composer:not(:has(.composer__mic)):not(.has-text) .composer__send { opacity: .55; }
.composer.has-text .composer__mic { display: none; }
.composer__attach { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); }


.bstate { padding: var(--s2) var(--s3); border-top: 1px solid var(--line); background: var(--surface); }
.bstate__run { display: flex; align-items: center; gap: var(--s2); min-height: 40px; font-size: var(--t-label); color: var(--ink-2); font-weight: 650; }
.bstate__dots { display: inline-flex; gap: 4px; padding-inline-start: var(--s1); }
.bstate__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-fill); animation: bdot 1.2s var(--ease) infinite; }
.bstate__dots i:nth-child(2) { animation-delay: .15s; } .bstate__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.bstate__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bstate__stop { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.bstate__stop svg, .bstate__yes svg { color: var(--bad); }
.bstate__ask { display: grid; gap: var(--s2); }
.bstate__q { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--ink); }
.bstate__q svg { flex: none; color: var(--ink-3); }
.bstate__acts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.bstate__no, .bstate__yes { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 var(--s3); border-radius: var(--r-ctl); font-weight: 800; font-size: 15px; cursor: pointer; }
.bstate__no { border: 0; background: var(--surface-2); color: var(--ink); }
.bstate__yes { border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); background: var(--surface); color: var(--bad); }
.bstate__yes svg { color: currentColor; }
.bstate__yes[disabled] { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .bstate__dots i { animation: none; opacity: .7; } }


.vrec { position: absolute; inset-inline: 0; inset-block-end: 0; min-height: 100%; z-index: 6; display: grid; align-content: end; gap: 6px; padding: var(--s2) var(--s3) var(--s3); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgb(0 0 0 / .06); }
.vrec__msg { text-align: center; font-weight: 800; font-size: 15px; color: var(--ink); }
.vrec__msg:empty, .vrec__hint:empty { display: none; }
.vrec__hint { text-align: center; font-size: var(--t-label); color: var(--ink-3); }
.vrec__row { display: grid; grid-template-columns: 48px 1fr 60px; align-items: center; gap: var(--s2); }
.vrec__row > * { grid-row: 1; }
.vrec__discard { grid-column: 1; }
.vrec__mid { grid-column: 2; }
.vrec__end, .vrec__send, .vrec__retry, .vrec__close { grid-column: 3; justify-self: end; }
.vrec__btn { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.vrec__btn:focus-visible, .vrec__play:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.vrec__end, .vrec__send { width: 60px; height: 60px; }
.vrec__end { background: var(--bad); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--bad) 35%, transparent); }
.vrec__send { background: var(--accent-fill); color: var(--accent-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.vrec__retry { background: var(--accent-fill); color: var(--accent-ink); width: 56px; height: 56px; }
.vrec__mid { display: flex; align-items: center; gap: var(--s2); min-width: 0; min-height: 56px; padding: 0 var(--s3); border-radius: 20px; background: var(--surface-2); }
.vrec__dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--bad); animation: vrecdot 1.1s ease-in-out infinite; }
@keyframes vrecdot { 50% { opacity: .25; } }
.vrec__time { flex: none; min-width: 40px; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 16px; }
.vrec__meter { flex: 1 1 auto; display: flex; align-items: center; justify-content: end; gap: 3px; height: 32px; overflow: hidden; }
.vrec__meter i { flex: 0 0 4px; height: var(--h, 10%); min-height: 4px; border-radius: 2px; background: var(--ink-2); transition: height .08s linear; }
.vrec__play { flex: none; position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--accent-fill); color: var(--accent-ink); cursor: pointer; }
.vrec__play { order: -1; }
.vrec[data-state="preview"] .vrec__time, .vrec[data-state="sending"] .vrec__time { order: 2; min-width: 0; }
.vrec__pause { display: none; width: 12px; height: 14px; border-inline: 4px solid currentColor; }
.vrec.is-playing .vrec__play svg { display: none; }
.vrec.is-playing .vrec__pause { display: block; }
.vrec__track { flex: 1 1 auto; position: relative; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.vrec__fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--accent-fill); transition: width .2s linear; }
.vrec__spin { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent-fill); border-inline-end-color: transparent; animation: chatspin .8s linear infinite; }

/* what each state shows */
.vrec__row > *, .vrec__mid > * { display: none; }
.vrec__mid { display: none; }
.vrec[data-state="rec"] .vrec__mid, .vrec[data-state="preview"] .vrec__mid, .vrec[data-state="sending"] .vrec__mid { display: flex; }
.vrec[data-state="rec"] :is(.vrec__discard, .vrec__end) { display: grid; }
.vrec[data-state="rec"] :is(.vrec__dot, .vrec__time) { display: block; }
.vrec[data-state="rec"] .vrec__meter { display: flex; }
.vrec[data-state="preview"] :is(.vrec__discard, .vrec__send, .vrec__play) { display: grid; }
.vrec[data-state="preview"] :is(.vrec__track, .vrec__time) { display: block; }
.vrec[data-state="sending"] :is(.vrec__spin, .vrec__track) { display: block; }
.vrec[data-state="failed"] .vrec__discard { display: grid; }
.vrec[data-state="failed"].has-blob .vrec__retry { display: grid; }
.vrec[data-state="failed"]:not(.has-blob) .vrec__close { display: grid; }
.vrec:is([data-state="asking"], [data-state="denied"], [data-state="nodevice"], [data-state="unsupported"]) .vrec__close { display: grid; }
/* message states: words on the left, the buttons on the right */
.vrec:is([data-state="asking"], [data-state="denied"], [data-state="nodevice"], [data-state="unsupported"], [data-state="failed"]) { grid-template-columns: 1fr auto; grid-template-areas: "msg row" "hint row"; align-items: center; align-content: center; column-gap: var(--s3); padding-inline-start: var(--s4); }
.vrec:is([data-state="asking"], [data-state="denied"], [data-state="nodevice"], [data-state="unsupported"], [data-state="failed"]) .vrec__msg { grid-area: msg; text-align: start; }
.vrec:is([data-state="asking"], [data-state="denied"], [data-state="nodevice"], [data-state="unsupported"], [data-state="failed"]) .vrec__hint { grid-area: hint; text-align: start; }
.vrec:is([data-state="asking"], [data-state="denied"], [data-state="nodevice"], [data-state="unsupported"], [data-state="failed"]) .vrec__row { grid-area: row; display: flex; gap: var(--s2); }
.vrec:is([data-state="denied"], [data-state="nodevice"], [data-state="unsupported"], [data-state="failed"]) .vrec__msg { color: var(--bad); }
.vrec:is([data-state="asking"]) .vrec__msg::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-inline-end: 8px; border-radius: 50%; background: var(--accent-fill); animation: vrecdot 1.1s ease-in-out infinite; }
/* the composer under an open sheet stays in place but is not reachable */
.chat[data-voice]:not([data-voice="idle"]) .composer { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .vrec__dot, .vrec__spin, .vrec__meter i { animation: none; transition: none; } }


.upl { display: contents; }
.upl__net { flex: none; display: flex; align-items: center; gap: var(--s2); margin: 0; padding: var(--s2) var(--s4); background: var(--warn-bg); color: var(--warn); font-weight: 700; font-size: var(--t-label); }
.upl__net[hidden], .upl__tray[hidden], .upl-sheet[hidden] { display: none; }
.upl__tray { position: relative; flex: none; list-style: none; margin: 0; padding: var(--s2) var(--s3); display: grid; gap: var(--s2); max-height: 38dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-top: 1px solid var(--line); }
.upl-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: 6px; border-radius: 16px; background: var(--surface-2); }
.upl-item__thumb { position: relative; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.upl-item__thumb > [data-ico] { display: none; }
.upl-item__thumb[data-kind="file"] > [data-ico="file"], .upl-item__thumb[data-kind="video"] > [data-ico="video"], .upl-item__thumb[data-kind="audio"] > [data-ico="audio"] { display: grid; }
.upl-item__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.upl-item__thumb[data-kind="video"]:has(img)::after { content: ""; position: absolute; inset-inline-start: 6px; inset-block-end: 6px; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; filter: drop-shadow(0 0 2px rgb(0 0 0 / .6)); }
.upl-item__main { display: grid; gap: 4px; min-width: 0; }
.upl-item__name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upl-item__line { display: flex; align-items: center; gap: 6px; font-size: var(--t-micro); color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.upl-item__line .ico { flex: none; }
.upl-item__status { overflow: hidden; text-overflow: ellipsis; }
.upl-item__size[hidden] { display: none; }
.upl-item__size::before { content: "·"; margin-inline-end: 6px; }
.upl-item .prog { height: 6px; }
.upl-item[data-state="done"] .prog, .upl-item[data-state="error"] .prog, .upl-item[data-state="queued"] .prog { display: none; }
.upl-item[data-state="done"] .upl-item__line { color: var(--ok); font-weight: 700; }
.upl-item[data-state="error"] .upl-item__line { color: var(--bad); font-weight: 700; }
.upl-item[data-state="paused"] .upl-item__line, .upl-item[data-state="offline"] .upl-item__line { color: var(--warn); font-weight: 700; }
.upl-item[data-state="paused"] .prog > i, .upl-item[data-state="offline"] .prog > i { background: var(--off); }
.upl-item__acts { display: flex; gap: 2px; }
.upl-item__acts .ibtn { width: 44px; height: 44px; border-radius: 50%; }
.upl-item__acts .ibtn[hidden] { display: none; }
/* Standalone upload (Materiały, Biblioteka): tray + note + send, only while files are picked. */
.upl-solo { display: grid; gap: var(--s2); }
.upl-solo:not(:has(.upl__tray:not([hidden]))) .upl-solo__form { display: none; }
.upl-solo .upl__tray { border: 1px solid var(--line); border-radius: var(--r-card, 20px); max-height: none; }
.upl-solo__form { grid-template-columns: 1fr; padding: 0; border: 0; background: none; }
.upl-solo__send { min-height: 52px; }
/* Files waiting for the next message: the send button shows even without text (beats chat.css voice-first rule). */
.composer.has-files .composer__send { display: grid; }
.composer.has-files .composer__mic { display: none; }
.composer.is-uploading .composer__send { opacity: .5; }
.composer__attach[aria-expanded="true"] { background: var(--accent-fill); color: var(--accent-ink); }
/* Sheet */
.upl-sheet { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; }
.upl-sheet__scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .4); animation: upl-fade .2s var(--ease); }
.upl-sheet__panel { position: relative; display: grid; gap: var(--s4); padding: var(--s3) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow); max-height: 86dvh; overflow-y: auto; animation: upl-up .25s var(--ease); }
@media (min-width: 900px) { .upl-sheet { place-items: center; } .upl-sheet__panel { width: min(480px, 92vw); border-radius: 20px; } }
.upl-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: 18px; }
.upl-sheet__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.upl-pick { display: grid; justify-items: start; gap: 2px; min-height: 112px; padding: var(--s4); border: 1px solid var(--line); border-radius: 20px; background: var(--surface-2); color: var(--ink); text-align: start; cursor: pointer; font: inherit; }
.upl-pick:active { transform: scale(.98); }
.upl-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.upl-pick__ico { display: grid; place-items: center; width: 48px; height: 48px; margin-block-end: var(--s2); border-radius: 14px; background: var(--accent-wash); color: var(--accent-text); }
.upl-pick__label { font-weight: 800; font-size: 16px; line-height: 1.2; }
.upl-pick__hint { font-size: var(--t-micro); color: var(--ink-3); }
.upl-sheet__limits { list-style: none; margin: 0; padding: var(--s3) var(--s4); display: grid; gap: var(--s2); border-radius: 16px; background: var(--surface-2); font-size: var(--t-label); color: var(--ink-2); }
.upl-sheet__limits li { display: flex; align-items: center; gap: var(--s2); }
.upl-sheet__limits .ico { flex: none; color: var(--ink-3); }
body.upl-open { overflow: hidden; }
/* Drop zone on a computer */
.chat.upl-drop { outline: 3px dashed var(--accent); outline-offset: -8px; }
@keyframes upl-up { from { transform: translateY(24px); opacity: 0; } }
@keyframes upl-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .upl-sheet__panel, .upl-sheet__scrim { animation: none; } }


.kcard { width: min(100%, 440px); display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); }
.kcard--akcept { width: 100%; }
.kcard--closed { box-shadow: none; background: var(--surface-2); }
.kcard--closed .kcard__media { aspect-ratio: 16 / 6; filter: saturate(.4); opacity: .8; }
/* delivery card (contract 3 v1.5): first file big, then one row per file */
.kcard .kcard__media.kcard__media--doc { aspect-ratio: auto !important; min-height: 64px; grid-auto-flow: column; gap: var(--s2); justify-content: start; padding-inline: var(--s4); color: var(--accent); font-weight: 800; }
.kdl { list-style: none; margin: 0; padding: var(--s2) var(--s3) 0; display: grid; gap: 4px; }
.kdl__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--s2); min-height: 48px; padding-inline-start: var(--s2); border-radius: 14px; background: var(--surface-2); color: var(--ink-2); }
.kdl__name { min-width: 0; display: grid; color: var(--ink); font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kdl__name small { font-weight: 500; font-size: var(--t-micro); color: var(--ink-3); }
.kdl__act { width: 44px; height: 44px; color: var(--ink); }
.kcard__media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); color: var(--ink-3); text-decoration: none; }
.kcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kcard__play { position: absolute; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; }
.kcard__where { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4) 0; flex-wrap: wrap; }
.kcard__chs { display: inline-flex; gap: 6px; }
.kcard__ch { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); }
.kcard__when { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-label); font-weight: 700; color: var(--ink-2); }
.kcard__when--past { color: var(--warn); }
.kcard__body { display: grid; gap: var(--s2); padding: var(--s3) var(--s4) var(--s4); }
.kcard__kicker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--t-micro); font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.kcard__tag { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; padding: 3px 9px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-text); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 800; }
.kcard__title { font-size: 19px; font-weight: 800; line-height: 1.25; }
.kcard__text { color: var(--ink-2); }
.kcard__facts { display: grid; gap: 6px; padding: var(--s3); border-radius: 14px; background: var(--surface-2); }
.kcard__fact { display: flex; align-items: flex-start; gap: var(--s2); font-size: var(--t-label); color: var(--ink-2); }
.kcard__fact svg { flex: none; margin-top: 1px; color: var(--ink-3); }
.kcard__fact--bad, .kcard__fact--bad svg { color: var(--bad); font-weight: 700; }
.kcard__days { margin-inline-start: 6px; padding: 1px 7px; border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 800; color: var(--ink-3); }
.kcard__actions { display: grid; gap: var(--s2); margin-block-start: var(--s2); }
.kcard__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.kcard__opts > :only-child { grid-column: 1 / -1; }
.kcard__opts--stack { grid-template-columns: 1fr; }
.kcard__opts .btn { white-space: normal; text-align: center; }
.kcard__free { display: grid; gap: var(--s2); }
.kcard__reply { display: flex; align-items: flex-end; gap: var(--s2); padding: 6px 6px 6px var(--s3); border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); }
.kcard__reply textarea { flex: 1; min-height: 32px; max-height: 140px; padding: 6px 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font: inherit; }
.kcard__mic { display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r-ctl); background: transparent; color: var(--ink-2); font: inherit; font-weight: 700; cursor: pointer; }
.kcard__mic[data-rec="1"] { border-style: solid; border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.kcard__mic[data-rec="1"] svg { animation: kcard-pulse 1s ease-in-out infinite; }
@keyframes kcard-pulse { 50% { opacity: .35; } }
.kcard__approve { min-height: 60px; font-size: 18px; }
.kcard__sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--s2); }
.kcard__side { min-height: 48px; }
.kcard__side[aria-expanded="true"] { background: var(--anchor); color: var(--anchor-ink); }
.kcard__panel { display: grid; gap: var(--s2); padding: var(--s3); border-radius: 16px; background: var(--surface-2); }
.kcard__panel[hidden] { display: none; }
.kcard__panel textarea { width: 100%; min-height: 64px; padding: var(--s2) var(--s3); border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; resize: vertical; }
.kcard__panelrow { display: grid; grid-template-columns: auto 1fr; gap: var(--s2); }
.kcard__panelrow .kcard__mic, .kcard__panelrow .btn { min-height: 48px; padding: 0 var(--s3); white-space: nowrap; }
.kcard__panelrow .kcard__mic[data-rec="1"] { grid-column: 1 / -1; white-space: normal; }
.kcard__status { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-label); font-weight: 700; color: var(--ink-2); }
.kcard__status[hidden] { display: none; }
.kcard__status[data-tone="bad"] { color: var(--bad); }
.kcard__status[data-tone="ok"] { color: var(--ok); }
.kcard__status button { margin-inline-start: auto; min-height: 36px; padding: 0 var(--s3); border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-weight: 800; cursor: pointer; }
.kcard__done { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-weight: 700; font-size: var(--t-label); }
.kcard__done[hidden] { display: none; }
.kcard[data-busy="1"] .kcard__actions { opacity: .55; pointer-events: none; }


/* Video tiles in the conversation (ui/message.ts renders .att__thumb + .att__play itself; no second mark here).
   Delivery messages (.dlv) show the poster big, 16:10, with a big play mark. */
.att[data-mime^="video/"] { position: relative; cursor: pointer; }
.dlv .att[data-mime^="video/"] { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 4px; padding: 0; background: none; }
.dlv .att[data-mime^="video/"] .att__thumb, .dlv .att[data-mime^="video/"] .att__ph { grid-row: auto; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 16px; }
.dlv .att[data-mime^="video/"] .att__thumb img { object-fit: cover; }
.dlv .att[data-mime^="video/"] .att__play { width: 56px; height: 56px; }
.dlv .att[data-mime^="video/"] .att__play svg { width: 26px; height: 26px; }
.dlv .att[data-mime^="video/"] .att__name, .dlv .att[data-mime^="video/"] .att__size { padding-inline: 4px; }
/* Any other tile that opens the viewer (cards, Gotowe, Biblioteka): pointer only, each owns its play mark. */
[data-video-src] { cursor: pointer; }
/* Layer */
.vv { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; }
.vv[hidden] { display: none; }
body.vv-open { overflow: hidden; }
.vv__panel { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.vv__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); }
.vv__name { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.vv__btn { width: 48px; height: 48px; border-radius: 50%; color: #fff; background: rgb(255 255 255 / .12); }
.vv__btn:hover { background: rgb(255 255 255 / .22); }
.vv__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vv__stage { position: relative; min-height: 0; overflow: hidden; }
.vv__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.vv__state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s2); padding: var(--s5); text-align: center; background: rgb(0 0 0 / .55); }
.vv__state[hidden] { display: none; }
.vv__state[data-kind="loading"] { background: transparent; pointer-events: none; }
.vv__title { font-size: 18px; font-weight: 800; }
.vv__body { color: rgb(255 255 255 / .8); font-size: 15px; }
.vv__spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgb(255 255 255 / .25); border-top-color: #fff; animation: vv-spin .9s linear infinite; }
.vv__ico { display: none; color: #ffb37f; }
.vv__retry { display: none; margin-block-start: var(--s2); }
.vv__state:not([data-kind="loading"]) .vv__spin { display: none; }
.vv__state:not([data-kind="loading"]) .vv__ico { display: block; }
.vv__state:not([data-kind="loading"]) .vv__retry { display: inline-flex; }
.vv__state[data-kind="loading"] .vv__title { text-shadow: 0 1px 4px rgb(0 0 0 / .8); }
.vv__foot { display: grid; gap: var(--s2); justify-items: center; padding: var(--s3) var(--s4) var(--s4); }
.vv__note { display: flex; align-items: center; gap: var(--s2); margin: 0; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .14); font-size: var(--t-label); font-weight: 700; }
.vv__note[hidden] { display: none; }
.vv__dl { min-width: 200px; background: rgb(255 255 255 / .14); color: #fff; }
.vv__dl:hover { background: rgb(255 255 255 / .24); }
.vv[data-state="error"] .vv__dl { background: var(--accent-fill); color: var(--accent-ink); }
@media (min-width: 900px) { .vv__panel { max-width: 960px; margin-inline: auto; } }
@keyframes vv-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vv__spin { animation-duration: 2.4s; } }


.login__head { display: grid; justify-items: center; gap: var(--s3); text-align: center; padding-block: var(--s5) var(--s2); }
.login__title { font-size: 24px; font-weight: 800; }
.login__sent { display: grid; gap: 4px; text-align: center; }
.login__sent h2 { font-size: 18px; }
.login__sent p { color: var(--ink-2); overflow-wrap: anywhere; }
.login__fine { text-align: center; font-size: var(--t-label); color: var(--ink-3); }
.login__fine a { font-weight: 700; display: inline-flex; min-height: var(--tap); align-items: center; }


.kit-block { display: grid; gap: var(--s3); padding-block-end: var(--s5); border-bottom: 1px solid var(--line); }
.kit-block__title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); }
.kit-grid--icons { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.kit-grid--ill { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.kit-cell { display: grid; justify-items: center; gap: 4px; padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); text-align: center; }
.kit-cell small { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.kit-chat { padding: var(--s3); border: 1px dashed var(--line-strong); border-radius: var(--r-card); }
.conn-logo { display: grid; place-items: center; padding-block: var(--s3); }


.pwa-update { position: fixed; z-index: 60; inset-inline: var(--s3); inset-block-end: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + var(--s3));
  display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s4);
  background: var(--anchor); color: var(--anchor-ink); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); box-shadow: var(--shadow); font-weight: 700; }
.pwa-update__text { flex: 1 1 auto; min-width: 0; }
.pwa-update .btn { min-height: 40px; padding-inline: var(--s3); }
.pwa-update .btn--quiet { background: transparent; color: var(--anchor-ink); }
body.is-bare .pwa-update, body.kbd-open .pwa-update { inset-block-end: calc(env(safe-area-inset-bottom, 0px) + var(--s3)); }
@media (min-width: 900px) { .pwa-update { inset-inline: auto var(--s5); inset-block-end: var(--s5); max-width: 420px; } }

.pwa-hint { display: grid; gap: var(--s3); }
.pwa-hint[hidden] { display: none; }
.pwa-hint__head { display: flex; align-items: center; gap: var(--s3); }
.pwa-hint__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-ctl); background: var(--accent-wash); color: var(--accent-text); }
.pwa-hint__text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.pwa-hint__text span { color: var(--ink-3); font-size: var(--t-label); }
.pwa-hint__close { flex: none; margin-inline-end: calc(var(--s2) * -1); }
.pwa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); counter-reset: step; }
.pwa-steps[hidden] { display: none; }
.pwa-steps li { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--surface-2); font-weight: 650; }
.pwa-steps li::before { counter-increment: step; content: counter(step); flex: none; width: 22px; color: var(--ink-3); font-weight: 800; text-align: center; }
.pwa-steps__icon { flex: none; display: grid; place-items: center; color: var(--accent-text); }

.push__switch { display: grid; gap: var(--s1); padding-block: var(--s2) var(--s3); }
.push__switch .tgl__label { font-size: 17px; }
.push__state { margin: 0; color: var(--ink-3); font-size: var(--t-label); font-weight: 600; }
.push__switch .tgl:has(input:checked) + .push__state { color: var(--ok); }
.push__switch .tgl:has(input:disabled) { cursor: default; opacity: .7; }


.akcept { display: grid; gap: var(--s6); }
.akcept__list { display: grid; gap: var(--s4); }
.akcept__list--closed { gap: var(--s3); }
.akcept__list--closed .kcard__body { padding-block: var(--s3); }
.akcept__list--closed .kcard__title { font-size: 16px; }
.akcept__list--closed .kcard__media, .akcept__list--closed .kcard__text,.akcept__list--closed .kcard__facts, .akcept__list--closed .kcard__where { display: none; }
.akcept .kcard--akcept .kcard__media { aspect-ratio: 16 / 9; }
.ready__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 72%); gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s2); scrollbar-width: none; }
.ready__more { position: absolute; inset-inline-end: 8px; inset-block-end: 8px; padding: 2px 8px; border-radius: 999px; background: rgb(0 0 0 / .6); color: #fff; font-weight: 800; font-size: var(--t-micro); }
.ready__row::-webkit-scrollbar { display: none; }
.ready__row:has(> :only-child) { grid-auto-columns: 100%; }
.ready { display: grid; grid-template-rows: auto 1fr; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.ready__media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); color: var(--ink-3); }
.ready__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ready__play { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; }
.ready__body { display: grid; gap: var(--s2); align-content: start; padding: var(--s3); }
.ready__title { font-size: 16px; font-weight: 800; line-height: 1.25; }
.ready__at { font-size: var(--t-micro); color: var(--ink-3); }
.ready__dl { min-height: 48px; }


.ready__list { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .ready__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc { margin-block-end: var(--s4); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); color: var(--ink); font-size: 17px; line-height: 1.55; overflow-wrap: anywhere; }
.doc > :first-child { margin-block-start: 0; }
.doc h3 { margin: var(--s4) 0 var(--s2); font-size: 19px; line-height: 1.3; }
.doc h4 { margin: var(--s3) 0 var(--s1, 4px); font-size: 17px; }
.doc p { margin: 0 0 var(--s3); }
.doc ul, .doc ol { margin: 0 0 var(--s3); padding-inline-start: 1.3em; }
.doc li + li { margin-block-start: 4px; }
.doc code { padding: 1px 5px; border-radius: 6px; background: var(--surface-2); font-size: .9em; }
.doc__cut { color: var(--ink-3); font-size: var(--t-label); }


.zo-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.zo-list > li + li { border-top: 1px solid var(--line); }
.zo { display: flex; align-items: center; gap: var(--s3); min-height: 84px; padding: var(--s3) var(--s3) var(--s3) var(--s4); color: var(--ink); text-decoration: none; }
a.zo:hover { background: var(--surface-2); }
.zo-thumb { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: var(--surface-2); color: var(--ink-2); }
.zo-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.zo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zo-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 6px; }
.zo-title { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zo-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s3); font-size: var(--t-label); }
.zo-state { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.zo-state b { font-weight: 700; }
.zo-state[data-tone="ok"] { color: var(--ok); }
.zo-state[data-tone="bad"] { color: var(--bad); }
.zo-state[data-tone="accent"], .zo-state[data-tone="warn"] { color: var(--accent-text); }
.zo-state[data-tone="off"], .zo-state[data-tone="wait"] { color: var(--ink-3); }
.zo-eta { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.zo-bar { display: block; }
.zo-bar .prog { height: 6px; }
.zo-bar[data-tone="bad"] .prog > i { background: var(--bad); }
.zo-bar[data-tone="off"] .prog > i, .zo-bar[data-tone="wait"] .prog > i { background: var(--off); }
.zo-go { flex: none; color: var(--ink-3); display: grid; }

.zd-hero { display: flex; align-items: center; gap: var(--s4); }
.zd-hero .zo-thumb { width: 88px; height: 88px; border-radius: 18px; }
.zd-hero__main { display: grid; gap: 6px; min-width: 0; font-size: 15px; }
.zd-kind { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: var(--t-label); font-weight: 650; }
.zd .zo-bar { margin-block-start: calc(-1 * var(--s2)); }
.zd-fail { display: flex; gap: var(--s3); padding: var(--s4); border-radius: var(--r-card); background: var(--bad-bg); color: var(--ink); }
.zd-fail > .ico { flex: none; color: var(--bad); }
.zd-fail strong { display: block; font-weight: 750; }
.zd-fail p { margin: 2px 0 0; color: var(--ink-2); font-size: var(--t-label); }
.zd-pub { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s4); border-radius: var(--r-card); background: var(--ok-bg); font-weight: 650; }
.zd-pub__text { flex: 1 1 auto; display: grid; line-height: 1.25; } .zd-pub__text small { font-size: var(--t-micro); color: var(--ink-2); font-weight: 500; }
.zd-pub a { font-weight: 750; white-space: nowrap; min-height: var(--tap); display: inline-flex; align-items: center; }
.zd-asked { display: grid; gap: var(--s2); }
.zd-quote { margin: 0; font-size: 16px; line-height: 1.4; }
.zd-note { margin: 0; display: flex; gap: 6px; align-items: flex-start; color: var(--ink-2); font-size: var(--t-label); }
.zd-note .ico { flex: none; margin-top: 1px; }
.zd-by { margin: 0; color: var(--ink-3); font-size: var(--t-micro); }
.zd-quiet { margin: 0; color: var(--ink-3); font-size: var(--t-label); }
.zc { display: grid; gap: var(--s2); }
.zc-valid { margin: 0; display: flex; align-items: center; gap: 6px; font-size: var(--t-label); font-weight: 650; color: var(--ok); }
.zc-valid[data-tone="bad"] { color: var(--bad); }
.zc-valid .ico { flex: none; }
.zc-text { margin: 0; color: var(--ink-2); }
.zc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.zc-row { display: flex; gap: var(--s2); align-items: flex-start; }
.zc-row > .ico { flex: none; margin-top: 2px; color: var(--ink-3); }
.zc-row b { display: block; font-size: var(--t-label); font-weight: 700; }
.zc-items { display: flex; flex-wrap: wrap; gap: 6px var(--s3); margin-top: 2px; }
.zc-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.zc-hash { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-3); background: var(--surface-2); border-radius: 6px; padding: 3px 5px; }

.zs-list { list-style: none; margin: 0; padding: 0; display: grid; }
.zs { position: relative; display: grid; grid-template-columns: 32px 1fr auto; grid-template-areas: "dot name word" "dot time time"; column-gap: var(--s3); padding-block: 8px; }
.zs + .zs::before { content: ""; position: absolute; inset-inline-start: 15px; inset-block-start: -10px; height: 18px; border-inline-start: 2px solid var(--line); }
.zs-dot { grid-area: dot; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--ink-3); align-self: start; }
.zs-dot[data-tone="ok"] { background: var(--ok-bg); color: var(--ok); }
.zs-dot[data-tone="bad"] { background: var(--bad-bg); color: var(--bad); }
.zs-dot[data-tone="accent"] { background: var(--accent-wash); color: var(--accent-text); }
.zs-name { grid-area: name; font-weight: 700; align-self: center; }
.zs-word { grid-area: word; font-size: var(--t-label); font-weight: 700; color: var(--ink-3); align-self: center; }
.zs-word[data-tone="ok"] { color: var(--ok); } .zs-word[data-tone="bad"] { color: var(--bad); } .zs-word[data-tone="accent"] { color: var(--accent-text); }
.zs-time { grid-area: time; font-size: var(--t-micro); color: var(--ink-3); font-variant-numeric: tabular-nums; }

.zm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.zm { position: relative; border-radius: 16px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.zm--video { aspect-ratio: 9 / 16; }
.zm--audio { grid-column: 1 / -1; aspect-ratio: auto; padding: var(--s3); }
.zm--audio audio { width: calc(100% - 52px); }
.zm--file { grid-column: 1 / -1; aspect-ratio: auto; }
.zm-file { display: flex; align-items: center; gap: var(--s2); min-height: 56px; padding: var(--s2) 56px var(--s2) var(--s4); color: var(--ink); font-weight: 650; text-decoration: none; }
.zm-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zm-open { display: block; width: 100%; height: 100%; }
.zm-media { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.zm-dl { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgb(0 0 0 / .55); color: #fff; }


.ka { display: grid; gap: var(--s5); }
.ka-sum { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--t-label); font-weight: 650; color: var(--ink-2); }
.ka-sum span { display: inline-flex; align-items: center; gap: 6px; }
.ka-sum [data-tone="bad"] { color: var(--bad); }
.ka-group { display: grid; gap: var(--s2); }
.ka-day { font-size: 17px; font-weight: 800; }
.ka-group[data-kind="undated"] .ka-day, .ka-group[data-kind="earlier"] .ka-day { color: var(--ink-2); font-size: 15px; }
.ka-sep { font-size: var(--t-micro); font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: var(--s4); margin-bottom: calc(-1 * var(--s3)); }
.ka-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.ka-list > li + li { border-top: 1px solid var(--line); }
.ka-row { display: flex; align-items: center; gap: var(--s3); min-height: 72px; padding: var(--s2) var(--s3) var(--s2) var(--s4); color: var(--ink); text-decoration: none; }
a.ka-row:hover { background: var(--surface-2); }
.ka-group[data-kind="earlier"] .ka-row { opacity: .8; }
.ka-thumb { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--surface-2); color: var(--ink-2); }
.ka-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ka-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
.ka-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ka-meta { display: flex; align-items: center; gap: 6px; font-size: var(--t-label); color: var(--ink-3); }
.ka-time { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-inline-end: 4px; }
.ka-logo { display: inline-grid; }
.ka-more { font-size: var(--t-micro); font-weight: 700; }
.ka-state { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--ink-3); }
.ka-state[data-tone="ok"] { background: var(--ok-bg); color: var(--ok); }
.ka-state[data-tone="bad"] { background: var(--bad-bg); color: var(--bad); }


.rp-nav { display: grid; grid-template-columns: var(--tap) 1fr var(--tap); align-items: center; gap: var(--s2); padding: var(--s1); border-radius: var(--r-card); background: var(--surface-2); }
.rp-nav__btn { display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 14px; color: var(--ink); }
a.rp-nav__btn { background: var(--surface); }
.rp-nav__label { display: grid; justify-items: center; line-height: 1.2; }
.rp-nav__label b { font-size: 17px; font-weight: 800; }
.rp-nav__label small { font-size: var(--t-micro); color: var(--ink-3); }

.rp-summary { list-style: none; margin: 0; padding: var(--s4); display: grid; gap: var(--s2); border-radius: var(--r-card); background: var(--accent-wash); }
.rp-summary li { display: flex; gap: var(--s2); align-items: flex-start; font-weight: 600; line-height: 1.35; }
.rp-summary .ico { flex: none; margin-top: 2px; color: var(--accent-text); }

.rp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.rp-stat { display: grid; gap: 4px; align-content: start; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); min-width: 0; }
.rp-stat--wide, .rp-stat:not(.rp-stat--wide):last-child:nth-child(even) { grid-column: 1 / -1; }
.rp-stat__label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: var(--t-label); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-stat__value { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rp-stat[data-missing="true"] .rp-stat__value { color: var(--ink-3); }
.rp-spark { display: block; width: 100%; height: 36px; margin-top: 4px; overflow: visible; }
.rp-spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rp-spark__area { fill: var(--accent-wash); stroke: none; }
.rp-stat:not(.rp-stat--wide) .rp-spark { height: 24px; }

.rp-chans, .rp-posts { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.rp-chans > li + li, .rp-posts > li + li { border-top: 1px solid var(--line); }
.rp-chan { display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s2) var(--s4); }
.rp-chan__logo { flex: none; display: grid; place-items: center; width: 40px; height: 40px; }
.rp-chan__main { flex: 1 1 auto; display: grid; min-width: 0; line-height: 1.25; }
.rp-chan__main small { color: var(--ink-3); font-size: var(--t-micro); }
.rp-num { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: var(--t-label); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-num b { color: var(--ink); font-weight: 750; }
.rp-num--quiet { font-size: var(--t-micro); }

.rp-post { display: flex; align-items: center; gap: var(--s3); min-height: 72px; padding: var(--s2) var(--s4); color: var(--ink); text-decoration: none; }
a.rp-post:hover { background: var(--surface-2); }
.rp-post__thumb { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.rp-post__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-post__main { flex: 1 1 auto; display: grid; gap: 2px; min-width: 0; }
.rp-post__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-post__sub { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-micro); color: var(--ink-3); }
.rp-post__logo { display: inline-grid; }
.rp-post__nums { flex: none; display: grid; justify-items: end; gap: 2px; }
.rp-delta { margin-inline-start: 8px; font-size: 15px; font-weight: 750; vertical-align: middle; }
.rp-delta[data-tone="ok"] { color: var(--ok); } .rp-delta[data-tone="bad"] { color: var(--bad); }
.rp-chan__fans { flex: none; display: grid; justify-items: end; gap: 2px; }
.rp-chan__fans .rp-delta { margin: 0; font-size: var(--t-micro); }
.rp-chan__main small .ico { vertical-align: -1px; }
.rp-quiet { margin: 0; color: var(--ink-3); font-size: var(--t-label); }


.bl-filters { display: flex; gap: var(--s2); overflow-x: auto; margin-inline: calc(-1 * var(--s4)); padding-inline: var(--s4); scrollbar-width: none; }
.bl-filters::-webkit-scrollbar { display: none; }
.bl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3) var(--s2); }
.bl-item { display: grid; gap: 4px; min-width: 0; }
.bl-tile { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); color: var(--ink-2); text-decoration: none; }
.bl-tile img, .bl-tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.bl-badge { position: absolute; inset-block-end: 6px; inset-inline-start: 6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; }
.bl-doc { display: grid; place-items: center; align-content: center; gap: 4px; width: 100%; height: 100%; }
.bl-doc b { font-size: var(--t-micro); font-weight: 800; letter-spacing: .04em; color: var(--ink-3); }
.bl-item[data-kind="dzwiek"] .bl-tile { background: var(--accent-wash); color: var(--accent-text); }
.bl-name { font-size: var(--t-micro); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-quiet { margin: 0; color: var(--ink-3); font-size: var(--t-label); }

.bp-media { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--r-card); background: var(--surface-2); }
video.bp-media { background: #000; }
.bp-doc { display: grid; place-items: center; gap: var(--s3); padding: var(--s7) var(--s4); border-radius: var(--r-card); background: var(--surface-2); color: var(--ink-2); }
.bp-doc b { font-weight: 800; color: var(--ink-3); }
.bp-doc audio { width: 100%; }
.bp-name { margin: 0; font-weight: 750; overflow-wrap: anywhere; }
.bp-facts { margin: 0; display: grid; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.bp-facts > div { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); }
.bp-facts > div + div { border-top: 1px solid var(--line); }
.bp-facts dt { color: var(--ink-3); font-size: var(--t-label); }
.bp-facts dd { margin: 0; font-weight: 650; font-size: var(--t-label); text-align: end; overflow-wrap: anywhere; }


.ideas { gap: var(--s4); min-width: 0; }
.ideas > *, .ideas .sec { min-width: 0; }
.idea-cap, .idea-make { grid-template-columns: minmax(0, 1fr); }
.idea-cap { display: grid; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.idea-cap__text, .idea-make__text { box-sizing: border-box; display: block; width: 100%; min-height: 64px; max-height: 200px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink); font: inherit; line-height: 1.4; resize: vertical; }
.idea-cap__text:focus, .idea-make__text:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.idea-cap__bar { display: flex; align-items: center; gap: var(--s3); }
.idea-cap__mic { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--accent-fill); color: var(--accent-ink); cursor: pointer; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.idea-cap__mic[data-state="rec"] { background: var(--bad); color: #fff; animation: idea-rec 1.4s var(--ease) infinite; }
.idea-cap__mic[data-state="busy"] { opacity: .6; cursor: progress; }
@keyframes idea-rec { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--bad) 18%, transparent); } }
.idea-cap__hint { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: var(--t-label); }
.idea-cap__hint > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-cap__hint[data-tone="rec"] { color: var(--bad); font-weight: 700; }
.idea-cap__save { flex: none; }
.idea-filter .chip { min-height: 36px; padding-inline: var(--s3); font-size: 14px; }
.ideas .rows .row__lead--icon[data-tone="wait"] { background: var(--surface-2); color: var(--accent-text); }
.ideas .rows li[data-pending] .row { opacity: .7; }
.idea { display: grid; gap: var(--s3); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.idea__meta { display: flex; align-items: center; gap: var(--s2); color: var(--ink-3); font-size: var(--t-label); }
.idea__body { display: grid; gap: var(--s3); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.idea__h { font-weight: 800; }
.idea__quiet { color: var(--ink-3); }
.idea-make { display: grid; gap: var(--s2); }
.idea-make .chips { margin-block-end: var(--s2); }


.pr { display: grid; gap: var(--s5); }
.pr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.pr-opt { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s2) var(--s4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); color: var(--ink); cursor: pointer; text-align: start; font: inherit; width: 100%; }
.pr-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pr-opt__ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); }
.pr-opt__text { display: grid; min-width: 0; flex: 1 1 auto; }
.pr-opt__title { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-opt__sub { font-size: var(--t-label); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-opt__sub:empty { display: none; }
.pr-opt__tick { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 14px; border: 2px solid var(--line-strong); color: transparent; }
.pr-opt:has(input:checked), .pr-opt[aria-pressed="true"], .pr-paste.is-on > .pr-opt { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pr-opt:has(input:checked) .pr-opt__ico, .pr-opt[aria-pressed="true"] .pr-opt__ico, .pr-paste.is-on > .pr-opt .pr-opt__ico { background: var(--accent-wash); color: var(--accent-text); }
.pr-opt:has(input:checked) .pr-opt__tick { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
.pr-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pr-more { display: grid; gap: var(--s2); }
.pr-paste > summary { list-style: none; }
.pr-paste > summary::-webkit-details-marker { display: none; }
.pr-paste__text { margin-block-start: var(--s2); min-height: 160px; padding: var(--s3) var(--s4); line-height: 1.5; resize: vertical; }
.pr-none { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s3); padding: var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r-card); color: var(--ink-2); }
.pr-none > div { display: grid; }
.pr-none span { font-size: var(--t-label); color: var(--ink-3); }
.pr-none .btn { grid-column: 1 / -1; }
.pr-go { position: sticky; inset-block-end: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + var(--s2)); z-index: 5; }
.pr-go .btn { box-shadow: var(--shadow); }
.pr-note { margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--warn-bg); font-weight: 650; }

/* stage */
body.prs-open { overflow: hidden; }
.prs { --prs-size: 40px; position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; overflow: hidden; touch-action: none; display: grid; }
.prs [hidden] { display: none !important; }
.prs__cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.prs.is-audio .prs__cam { display: none; }
.prs__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(0 0 0 / .78) 0%, rgb(0 0 0 / .62) 55%, rgb(0 0 0 / .15) 78%, rgb(0 0 0 / .55) 100%); pointer-events: none; }
.prs.is-audio .prs__shade { background: #000; }
.prs__text { position: absolute; inset-inline: 0; inset-block: calc(64px + env(safe-area-inset-top, 0px)) 40%; overflow: hidden; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 85%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 85%, transparent 100%); cursor: grab; user-select: none; -webkit-user-select: none; }
.prs__text.is-mirror { transform: scaleX(-1); }
.prs__roll { font-size: var(--prs-size); line-height: 1.3; font-weight: 750; letter-spacing: .005em; will-change: transform; text-shadow: 0 1px 3px rgb(0 0 0 / .6); }
.prs__roll p { margin: 0 0 .7em; }
.prs__end { color: rgb(255 255 255 / .45); font-size: .6em; text-align: center; }
.prs__guide { position: absolute; inset-inline: 0; inset-block-start: calc(64px + env(safe-area-inset-top, 0px) + (60% - 64px) * .22); height: 0; border-top: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); pointer-events: none; }
.prs__guide::before { content: ""; position: absolute; inset-inline-start: 4px; inset-block-start: -9px; border: 8px solid transparent; border-inline-start: 12px solid var(--accent); }
.prs__top { position: absolute; inset-inline: 0; inset-block-start: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 8px; }
.prs__ibtn { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 24px; background: rgb(255 255 255 / .14); color: #fff; cursor: pointer; }
.prs__ibtn[aria-pressed="true"] { background: var(--accent-fill); color: var(--accent-ink); }
.prs__ibtn:disabled { opacity: .4; }
.prs__timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 17px; padding: 6px 12px; border-radius: 16px; background: rgb(0 0 0 / .4); visibility: hidden; }
.prs[data-state="rec"] .prs__timer { visibility: visible; background: #d92d20; }
.prs[data-state="rec"] .prs__timer::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: #fff; margin-inline-end: 6px; vertical-align: 2px; animation: pulse 1.2s var(--ease) infinite; }
.prs__ctrl { position: absolute; inset-inline: 8px; inset-block-end: calc(120px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: center; gap: 6px; }
.prs__tbtn { min-width: 48px; height: 44px; padding: 0 10px; border: 0; border-radius: 22px; background: rgb(255 255 255 / .16); color: #fff; font: inherit; font-weight: 800; font-size: 18px; cursor: pointer; }
.prs__val { min-width: 76px; text-align: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.prs__sep { width: 10px; }
.prs__bottom { position: absolute; inset-inline: 0; inset-block-end: 0; display: flex; align-items: center; justify-content: space-around; padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
.prs__rec { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 42px; border: 4px solid #fff; background: transparent; cursor: pointer; padding: 0; }
.prs__rec i { display: block; width: 64px; height: 64px; border-radius: 32px; background: #d92d20; transition: all .2s var(--ease); }
.prs[data-state="rec"] .prs__rec i { width: 32px; height: 32px; border-radius: 8px; }
.prs:not([data-state="ready"]):not([data-state="rec"]) .prs__rec { opacity: .4; pointer-events: none; }
.prs__pause .pr-ico { position: relative; }
.prs.is-scrolling .prs__pause .pr-ico svg { visibility: hidden; }
.prs.is-scrolling .prs__pause .pr-ico::before, .prs.is-scrolling .prs__pause .pr-ico::after { content: ""; position: absolute; inset-block: 3px; width: 6px; border-radius: 2px; background: currentColor; }
.prs.is-scrolling .prs__pause .pr-ico::before { inset-inline-start: 5px; }
.prs.is-scrolling .prs__pause .pr-ico::after { inset-inline-end: 5px; }
.prs[data-state="rec"] .prs__ctrl .prs__tbtn:nth-last-child(-n+2) { opacity: .5; }
.prs__count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 140px; font-weight: 900; text-shadow: 0 4px 20px rgb(0 0 0 / .6); pointer-events: none; }
.prs__msg { position: absolute; z-index: 2; inset-inline: 16px; inset-block-start: 30%; display: grid; justify-items: center; gap: var(--s2); padding: var(--s5) var(--s4); border-radius: var(--r-card); background: #161616; box-shadow: 0 8px 32px rgb(0 0 0 / .6); text-align: center; }
.prs[data-state="error"] .prs__text, .prs[data-state="starting"] .prs__text { opacity: .2; }
.prs__msg strong { font-size: 19px; }
.prs__msg span { color: rgb(255 255 255 / .75); }
.prs__msg .btn { margin-block-start: var(--s2); width: 100%; }
.prs__msg.is-bad > .pr-ico { color: #ff7a70; }
.prs__review { position: absolute; inset: 0; z-index: 2; display: grid; align-content: center; gap: var(--s3); padding: calc(64px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); background: #000; }
.prs__rhead { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; }
.prs__play { width: 100%; max-height: 58dvh; border-radius: 16px; background: #111; }
audio.prs__play { height: 54px; }
.prs__rrow { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.prs__rrow .btn { padding-inline: var(--s3); }
.prs__again { color: #fff; border-color: rgb(255 255 255 / .4); }
.prs__prog { display: grid; gap: 6px; font-weight: 700; }
.prs__prog small { color: rgb(255 255 255 / .6); font-weight: 600; }
.prs__prog .prog { background: rgb(255 255 255 / .2); }
.prs__bad { color: #ff7a70; }
.prs__done { display: grid; justify-items: center; gap: var(--s2); text-align: center; padding-block: var(--s6, 32px); }
.prs__done > .pr-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 32px; background: var(--ok); color: #fff; }
.prs__done strong { font-size: 22px; }
.prs__done span { color: rgb(255 255 255 / .7); }
.prs[data-state="review"] .prs__top .prs__ibtn:last-child, .prs[data-state="sent"] .prs__top .prs__ibtn:last-child { visibility: hidden; }
.prs[data-state="review"] .prs__top, .prs[data-state="sent"] .prs__top { z-index: 3; }
.pr-ico { display: inline-grid; place-items: center; }


.drop { display: grid; gap: var(--s4); }
.drop.is-over { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: var(--r-card); }
.drop-lead { margin: 0; color: var(--ink-2); font-weight: 600; }
.drop-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.drop-pick { position: relative; display: grid; justify-items: center; align-content: center; gap: var(--s2); min-height: 132px; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--surface); color: var(--ink); font-weight: 750; font-size: 17px; text-align: center; cursor: pointer; }
.drop-pick:first-child { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; }
.drop-pick:active { transform: scale(.98); }
.drop-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop-limit { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-3); font-size: var(--t-label); }
.drop-picked { display: grid; gap: var(--s2); }
.drop-picked[hidden], .drop-caption[hidden], .drop-bar[hidden], .drop-voice[hidden] { display: none; }
.drop-picked__head { display: flex; align-items: center; justify-content: space-between; min-height: var(--tap); }
.drop-link { min-height: var(--tap); padding: 0 var(--s2); border: 0; background: none; color: var(--accent-text); font-weight: 750; font-size: 15px; cursor: pointer; }
.drop-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.drop-tile { position: relative; display: grid; gap: 4px; min-width: 0; }
.drop-tile__media { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.drop-tile__media img, .drop-tile__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.drop-ico { display: inline-grid; place-items: center; }
.drop-tile__video { position: absolute; inset-block-end: 6px; inset-inline-start: 6px; width: 26px; height: 26px; border-radius: 13px; background: rgb(0 0 0 / .55); color: #fff; }
.drop-tile__video svg { width: 14px; height: 14px; }
.drop-tile__x { position: absolute; inset-block-start: 2px; inset-inline-end: 2px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; padding: 0; }
.drop-tile__x .drop-ico { width: 28px; height: 28px; border-radius: 14px; background: rgb(0 0 0 / .6); color: #fff; }
.drop-tile__x svg { width: 16px; height: 16px; }
.drop-tile__x[hidden] { display: none; }
.drop-tile__mark { position: absolute; inset: 0; display: none; place-items: center; background: rgb(0 0 0 / .35); color: #fff; }
.drop-tile__mark svg { width: 32px; height: 32px; }
.drop-tile[data-state="done"] .drop-tile__mark, .drop-tile[data-state="bad"] .drop-tile__mark { display: grid; }
.drop-tile[data-state="done"] .drop-tile__mark { background: color-mix(in srgb, var(--ok) 55%, transparent); }
.drop-tile[data-state="bad"] .drop-tile__mark { background: color-mix(in srgb, var(--bad) 55%, transparent); }
.drop-tile[data-state="done"] .drop-tile__mark .drop-ico:last-child, .drop-tile[data-state="bad"] .drop-tile__mark .drop-ico:first-child { display: none; }
.drop-tile__prog { height: 5px; visibility: hidden; }
.drop-tile[data-state="send"] .drop-tile__prog { visibility: visible; }
.drop-tile__meta { font-size: var(--t-micro); color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-tile[data-state="bad"] .drop-tile__meta { color: var(--bad); font-weight: 700; white-space: normal; }
.drop-tile[data-state="done"] .drop-tile__meta { color: var(--ok); font-weight: 700; }
.drop-caption { display: grid; gap: 6px; }
.drop-caption__row { display: flex; gap: var(--s2); align-items: center; }
.drop-caption__row .input { flex: 1 1 auto; min-width: 0; }
.drop-caption__row .ibtn { flex: none; width: 52px; height: 52px; background: var(--surface-2); }
.drop-caption__row .ibtn.is-rec { background: var(--bad); color: #fff; animation: pulse 1.6s var(--ease) infinite; }
.drop-voice { display: flex; align-items: center; gap: var(--s2); }
.drop-voice audio { flex: 1 1 auto; min-width: 0; height: 40px; }
.drop-voice__rec { color: var(--bad); font-weight: 700; }
.drop-note { margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--surface-2); font-weight: 650; }
.drop-note[data-tone="warn"] { background: var(--warn-bg); }
.drop-note[data-tone="bad"] { background: var(--bad-bg); color: var(--ink); }
.drop-done { display: grid; gap: var(--s2); padding: var(--s5) var(--s4); border-radius: var(--r-card); background: var(--ok-bg); text-align: center; }
.drop-done strong { font-size: 19px; }
.drop-done span { color: var(--ink-2); }
.drop-done__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-block-start: var(--s2); }
.drop-bar { position: sticky; inset-block-end: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + var(--s2)); z-index: 5; }
.drop-bar .btn { box-shadow: var(--shadow); }
@media (min-width: 768px) { .drop-bar { inset-block-end: var(--s4); } .drop-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }


.conn-sum { margin: 0; font-size: var(--t-label); font-weight: 700; color: var(--ink-2); }
.conn-sum[data-done="1"] { color: var(--ok); }
.conn-list .row__lead--logo { background: var(--surface-2); }
.conn-list .row[data-soon="1"] .row__title { color: var(--ink-2); }
.conn-list .row[data-soon="1"] .row__lead--logo svg { opacity: .55; }
.conn-chan { gap: var(--s2); }
.conn-chan__note { margin: 0; color: var(--ink-3); font-size: var(--t-label); }


.conn-hero { display: flex; align-items: center; gap: var(--s4); }
.conn-hero__logo { display: grid; place-items: center; width: 72px; height: 72px; flex: none; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.conn-hero__text { display: grid; gap: var(--s1); min-width: 0; }
.conn-hero__why { margin: 0; font-weight: 650; color: var(--ink); }
.conn-state { margin: 0; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.conn-state__extra { font-size: var(--t-label); color: var(--ink-3); }
.key-form { display: grid; gap: var(--s4); }
.key-form__title { margin: 0; font-size: 17px; font-weight: 800; }
.key-saved { margin: 0; display: flex; align-items: center; gap: var(--s2); font-weight: 700; color: var(--ok); }
.key-in { position: relative; }
.key-in__input { padding-inline-end: 56px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.key-in__eye { position: absolute; inset-block: 4px; inset-inline-end: 4px; width: var(--tap); display: grid; place-items: center; border: 0; border-radius: calc(var(--r-ctl) - 4px); background: transparent; color: var(--ink-3); cursor: pointer; }
.key-in__eye[aria-pressed="true"] { color: var(--accent-text); background: var(--accent-wash); }
.key-safe { margin: 0; display: flex; align-items: center; gap: var(--s2); font-size: var(--t-label); color: var(--ink-2); }
.key-safe .ico { color: var(--ok); flex: none; }
.key-msg { margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r-ctl); font-weight: 650; font-size: 15px; background: var(--surface-2); }
.key-msg[data-tone="ok"] { background: var(--ok-bg); color: var(--ok); }
.key-msg[data-tone="bad"] { background: var(--bad-bg); color: var(--bad); }
.key-more { display: grid; gap: var(--s3); }
.key-more__sum { list-style: none; display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding-inline: var(--s1); font-weight: 700; color: var(--ink-2); cursor: pointer; }
.key-more__sum::-webkit-details-marker { display: none; }
.key-more__sum > span { flex: 1 1 auto; }
.key-more[open] .key-more__sum > .ico:last-child { transform: rotate(180deg); }
.conn-act { display: grid; gap: var(--s2); }
.conn-act__hint { margin: 0; text-align: center; font-size: var(--t-label); color: var(--ink-3); }
.conn-soon { display: grid; justify-items: center; gap: var(--s2); padding-block: var(--s6); text-align: center; }
.conn-soon .ico { color: var(--ink-3); }
.conn-soon strong { font-size: 18px; font-weight: 800; }
.conn-soon p { margin: 0 0 var(--s2); color: var(--ink-2); }
.conn-detail [data-act="link"][aria-busy="true"] { opacity: .7; pointer-events: none; }
.conn-dlg { width: min(100% - 32px, 360px); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.conn-dlg::backdrop { background: rgb(0 0 0 / .4); }
.conn-dlg__box { display: grid; justify-items: center; gap: var(--s3); padding: var(--s6) var(--s5) var(--s5); text-align: center; }
.conn-dlg__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--bad-bg); color: var(--bad); }
.conn-dlg__title { margin: 0; font-size: 19px; font-weight: 800; }
.conn-dlg__body { margin: 0; color: var(--ink-2); }
.conn-dlg__btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); width: 100%; margin-block-start: var(--s2); }
.conn-dlg__btns .btn { padding-inline: var(--s3); }


.voices { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.voice { display: flex; align-items: center; gap: var(--s3); min-height: 68px; padding: var(--s2) var(--s4); }
.voice + .voice { border-top: 1px solid var(--line); }
.voice audio { display: none; }
.voice__play { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 0; border-radius: 50%; background: var(--accent-fill); color: var(--accent-ink); cursor: pointer; }
.voice__play--none { background: var(--surface-2); color: var(--ink-3); cursor: default; }
.voice__play .voice__off { display: none; }
.voice__play[aria-pressed="true"] .voice__on { display: none; }
.voice__play[aria-pressed="true"] .voice__off { display: grid; }
.voice__play[aria-pressed="true"] { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.voice__on, .voice__off { display: grid; }
.voice__text { display: grid; min-width: 0; flex: 1 1 auto; }
.voice__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice__sub { font-size: var(--t-label); color: var(--ink-3); }
.voice__right { flex: none; display: inline-flex; align-items: center; }
.voice__right .btn { min-height: 40px; padding: 0 var(--s4); font-size: 15px; }
.voice__def { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }
.voice--default { background: color-mix(in srgb, var(--ok-bg) 55%, transparent); }
.voices__note { margin: 0; display: flex; align-items: center; gap: var(--s2); font-size: var(--t-label); color: var(--ink-3); }


/* draft sheet (4.1-4.4) */
.bdraft > .sheet__open { display: inline-flex; }
.bdraft__ibtn { width: var(--tap); height: var(--tap); }
.bdraft__ibtn .ico { width: 20px; height: 20px; }
.bdraft__chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; max-width: 100%; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 650; }
.bdraft__chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdraft__chip .ico { color: var(--accent-text); flex: none; }
.bdraft > .sheet__open:has(.btn) { display: block; }
.bdraft .sheet__head strong { display: inline-flex; align-items: center; gap: var(--s2); font-size: 17px; }
.bdraft__form { display: grid; gap: var(--s3); }
.bdraft__text { width: 100%; min-height: 112px; padding: var(--s3) var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink); font: inherit; font-size: 17px; line-height: 1.4; resize: vertical; }
.bdraft__text:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.bdraft__hint { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-3); font-size: var(--t-micro); }
.bdraft[data-busy] .bdraft__form button { opacity: .6; pointer-events: none; }

/* brand cards */
.bintro { display: flex; align-items: center; gap: var(--s2); margin: 0; color: var(--ink-3); font-size: var(--t-label); font-weight: 600; }
.bcards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.bcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 1px 2px rgb(0 0 0 / .03); }
.bcard__fold > summary { list-style: none; cursor: pointer; }
.bcard__fold > summary::-webkit-details-marker { display: none; }
.bcard__sum { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s4) calc(var(--tap) + var(--s4)) var(--s3) var(--s4); border-radius: var(--r-card); }
.bcard__sum:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bcard__lead { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-wash); color: var(--accent-text); }
.bcard__text { display: grid; gap: 4px; min-width: 0; flex: 1; }
.bcard__title { font-size: 17px; font-weight: 800; line-height: 1.25; }
.bcard__ex { color: var(--ink-2); font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard__fold[open] .bcard__ex { display: none; }
.bcard__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); min-width: 0; min-height: 28px; margin-top: 2px; color: var(--ink-3); font-size: var(--t-micro); }
.bcard__date { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.bcard__strip { display: inline-flex; align-items: center; gap: var(--s2); min-width: 0; }
.bcard__logo { flex: none; display: block; width: 44px; height: 26px; padding: 2px 4px; border-radius: 8px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.bcard__logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bcard__fold[open] .bcard__strip { display: none; }
.bcard__ask .bdraft__ibtn { background: var(--surface-2); color: var(--ink-2); }
.bcard__ask .bdraft__ibtn:hover { background: var(--accent-wash); color: var(--accent-text); }
.bcard__dots { display: inline-flex; }
.bcard__dots i { width: 18px; height: 18px; border-radius: 50%; background: var(--sw); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.bcard__dots i + i { margin-inline-start: -6px; }
.bcard__aa { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1; }
.bcard__more { margin-inline-start: auto; display: inline-grid; color: var(--ink-3); transition: transform .2s var(--ease); }
.bcard__fold[open] .bcard__more { transform: rotate(180deg); }
.bcard__ask { position: absolute; inset-block-start: var(--s3); inset-inline-end: var(--s3); }
.bcard__body { display: grid; gap: var(--s4); padding: 0 var(--s4) var(--s4); }
.bmd { color: var(--ink); font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.bmd > * { margin: 0; }
.bmd > * + * { margin-top: var(--s3); }
.bmd h3 { font-size: 16px; font-weight: 800; margin-top: var(--s4); }
.bmd ul, .bmd ol { padding-inline-start: 1.3em; }
.bmd li + li { margin-top: 4px; }
.bmd code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }

/* visual preview inside an open card */
.bvis { display: grid; gap: var(--s2); padding: var(--s3); border-radius: 16px; background: var(--surface-2); margin: 0; }
.bvis__label, .bvis figcaption { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-3); font-size: var(--t-micro); font-weight: 700; }
.bvis--logo { justify-items: center; }
.bvis--logo img { max-width: 100%; max-height: 120px; object-fit: contain; padding: var(--s3); border-radius: 12px; background: #fff; }
.bsw-list, .bfont-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.bsw-list { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.bsw { display: grid; gap: 4px; }
.bsw__chip { display: block; height: 52px; border-radius: 12px; background: var(--sw); box-shadow: inset 0 0 0 1px var(--line-strong); }
.bsw__name { font-size: var(--t-micro); font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsw__hex { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.bfont { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: 12px; background: var(--surface); }
.bfont__aa { font-size: 30px; line-height: 1; font-weight: 700; min-width: 48px; }
.bfont__name { font-weight: 700; font-size: 15px; }


.cmode { display: grid; gap: var(--s3); padding: var(--s4); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.cmode__top { display: flex; align-items: center; gap: var(--s3); }
.cmode__icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--ok-bg); color: var(--ok); }
.cmode[data-mode="sam"] .cmode__icon { background: var(--accent-wash); color: var(--accent-text); }
.cmode__text { display: grid; gap: 2px; min-width: 0; }
.cmode__title { font-size: 18px; font-weight: 800; line-height: 1.25; }
.cmode__sub { color: var(--ink-2); font-size: 15px; }
.cmode__exp { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-3); font-size: var(--t-label); font-weight: 600; }
.cmode__opts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); }
.cmode__opts > .bdraft { display: grid; }
.cmode__opts > .bdraft > .sheet__open { display: grid; }
.cmode__opts .bdraft__chip { justify-content: center; border-color: transparent; background: transparent; min-height: 44px; }
.cmode__opt { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 750; white-space: nowrap; }
.cch-head { margin: var(--s2) 0 0; color: var(--ink-3); font-size: var(--t-micro); font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.cchs, .rtns { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.cchs > li + li, .rtns > li + li { border-top: 1px solid var(--line); }
.cch { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s2) var(--s2) var(--s2) var(--s4); }
.cch__logo { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); }
.cch__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.cch__name { font-weight: 750; font-size: 16px; }
.cch__sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 14px; }
.cch__own { color: var(--ink-3); font-size: var(--t-micro); }
.cch__until { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: var(--t-micro); }
.cch__ask .bdraft__ibtn { background: var(--surface-2); color: var(--ink); }
.cnote { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-3); font-size: var(--t-micro); }

.rtns { margin-block-end: var(--s3); }
.rtn { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s2) var(--s3) var(--s4); }
.rtn__lead { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); }
.rtn__lead[data-tone="off"] { background: var(--surface-2); color: var(--off); }
.rtn__lead[data-tone="bad"] { background: var(--bad-bg); color: var(--bad); }
.rtn__text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.rtn__name { font-weight: 800; font-size: 16px; line-height: 1.25; }
.rtn[data-tone="off"] .rtn__name { color: var(--ink-2); }
.rtn__when { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 15px; font-weight: 600; }
.rtn__when .ico { color: var(--ink-3); }
.rtn__what { color: var(--ink-3); font-size: 14px; }
.rtn__state { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.rtn__last { color: var(--ink-3); font-size: var(--t-micro); }
.rtn__ask .bdraft__ibtn { background: var(--surface-2); color: var(--ink); }


.mintro { display: flex; align-items: center; gap: var(--s2); margin: 0; color: var(--ink-3); font-size: var(--t-label); font-weight: 600; }
.mgrp { display: grid; gap: var(--s3); }
.mgrp__title { display: flex; align-items: center; gap: var(--s2); margin: 0; font-size: 17px; font-weight: 800; }
.mgrp__title .ico { color: var(--accent-text); }
.mgrp__n { margin-inline-start: auto; min-width: 26px; height: 26px; padding-inline: 8px; display: inline-grid; place-items: center; border-radius: 13px; background: var(--surface-2); color: var(--ink-2); font-size: var(--t-micro); font-weight: 800; }
.mcaps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.mcap { display: grid; gap: var(--s3); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.mcap__top { display: flex; align-items: center; gap: var(--s3); }
.mcap__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-wash); color: var(--accent-text); }
.mcap__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.mcap__name { font-size: 17px; font-weight: 800; line-height: 1.25; }
.mcap__what { color: var(--ink-2); font-size: 15px; }
.mcap__ex { position: relative; flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.mcap__ex img { width: 100%; height: 100%; object-fit: cover; }
.mcap__play { position: absolute; inset: auto auto 4px 4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; }
.mcap__say { display: flex; flex-wrap: wrap; gap: var(--s2); }
.mcap__say .bdraft { max-width: 100%; }
.mcap__say .bdraft > .sheet__open { max-width: 100%; }
.mcap__say .bdraft__chip { background: var(--surface-2); border-color: transparent; }


.tp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s2); }
.tp-head .shead { flex: 1; }
.tp-full-btn { flex: none; background: var(--surface-2); }
.tp-frame { position: relative; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.tp-frame__bar { display: none; }
.tp-frame__view { display: block; width: 100%; height: max(420px, calc(100dvh - var(--head) - var(--bar) - 220px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))); border: 0; background: #fff; }
.tp-frame:target { position: fixed; inset: 0; z-index: 80; border: 0; border-radius: 0; display: flex; flex-direction: column; background: var(--bg); padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.tp-frame:target .tp-frame__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: var(--head); padding: 0 var(--s2) 0 var(--s4); background: var(--surface); border-bottom: 1px solid var(--line); }
.tp-frame__name { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 800; font-size: 17px; }
.tp-frame:target .tp-frame__view { flex: 1; height: auto; }
body.tp-full { overflow: hidden; }
.tp-note { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-3); font-size: var(--t-micro); }
.tp { gap: var(--s3); }


.wel-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 44px; padding: var(--s2) var(--s4) 0; }
.wel-dots { display: inline-flex; gap: 6px; }
.wel-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line-strong); transition: width .25s var(--ease), background .25s var(--ease); }
.wel-dots i[data-on] { background: var(--accent); }
.wel-dots i[data-on]:last-of-type, .wel-dots i[data-on]:not(:has(+ i[data-on])) { width: 22px; }
.wel-skip { min-height: var(--tap); display: inline-flex; align-items: center; padding-inline: var(--s3); font-weight: 700; font-size: var(--t-label); color: var(--ink-2); text-decoration: none; }
.wel-log { gap: var(--s2); }
.wel-step { display: grid; gap: var(--s2); }
.wel-step[hidden] { display: none; }
.wel-step .msg--bot .bub { animation: wel-in .32s var(--ease) both; }
.wel-step .msg--bot:nth-child(2) .bub { animation-delay: .25s; }
.wel-step .msg--bot:nth-child(3) .bub { animation-delay: .5s; }
@keyframes wel-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .wel-step .msg--bot .bub, .wel-chips { animation: none !important; } }
.wel-live { display: grid; gap: var(--s2); }
.wel-live:empty { display: none; }
.wel-chips { flex-wrap: wrap; padding-block: var(--s2) var(--s1); animation: wel-in .3s .6s var(--ease) both; }
.wel-chips[hidden] { display: none; }
.wel-chip { min-height: var(--tap); border-color: var(--accent); color: var(--accent-text); }
.wel-chip--main { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; }
.wel-tabs { width: min(100%, 360px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); padding: var(--s2); border-radius: 20px; border-end-start-radius: 6px; background: var(--bubble-bot); animation: wel-in .32s .3s var(--ease) both; }
.wel-tab { display: grid; gap: 4px; padding: var(--s2); border-radius: 14px; background: var(--surface); }
.wel-tab__pic { width: 100%; height: 72px; }
.wel-chip[hidden] { display: none; }
.wel-tab__pic .p-bg { fill: var(--surface-2); }
.wel-tab__pic .p-soft { fill: var(--surface-3); }
.wel-tab__pic .p-acc { fill: var(--accent); }
.wel-tab__pic .p-eye { fill: var(--surface); }
.wel-tab__pic .p-ink { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wel-tab__pic .p-line { fill: none; stroke: var(--line-strong); stroke-width: 2.4; stroke-linecap: round; }
.wel-tab__name { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.wel-tab__name .ico { color: var(--accent-text); flex: none; }
.wel-tab__line { font-size: var(--t-label); color: var(--ink-3); }
.wel-hint { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--accent-wash); color: var(--accent-text); font-weight: 700; font-size: var(--t-label); }
.wel-typing { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 20px; border-end-start-radius: 6px; background: var(--bubble-bot); color: var(--ink-3); font-size: var(--t-label); }
.wel-typing i { width: 6px; height: 6px; border-radius: 3px; background: currentColor; animation: wel-dot 1.2s infinite; }
.wel-typing i:nth-child(2) { animation-delay: .2s; } .wel-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes wel-dot { 40% { opacity: .25; } }
.wel .composer__mic[data-state="rec"] { background: var(--bad); color: #fff; animation: wel-rec 1.4s var(--ease) infinite; }
.wel .composer__mic[data-state="busy"] { opacity: .6; cursor: progress; }
.wel .composer__mic.is-called { animation: wel-call 1s var(--ease) 3; }
@keyframes wel-rec { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--bad) 18%, transparent); } }
@keyframes wel-call { 50% { transform: scale(1.12); box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 22%, transparent); } }


:is(a, button, input, select, textarea, summary, [tabindex], [contenteditable]):focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
.kcard__reply:focus-within, .composer:has(textarea:focus-visible), .kcard__panel:focus-within { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
.kcard__reply textarea:focus-visible, .composer textarea:focus-visible { outline: none; }
:target { scroll-margin-block: 72px; }
.skip { position: fixed; z-index: 1000; inset-block-start: 8px; inset-inline-start: 8px; padding: 12px 16px; min-height: 44px; border-radius: var(--r-ctl); background: var(--anchor); color: var(--anchor-ink); font-weight: 700; text-decoration: none; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html, .chat__log, * { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-iteration-count: 1 !important; animation-delay: 0s !important; }
}
/* Touch targets (WCAG 2.5.5): every control at least 44 px on its short side; text links inside a sentence excepted. */
.chip, .seg__opt, .sheet__open, .bstate__stop, .bdraft__chip, .ps-more > summary, .ol__fold > summary { min-height: var(--tap); }
.ps-more > summary, .ol__fold > summary { display: flex; align-items: center; }
.back { min-width: var(--tap); }
main a:not([class]):not(p a):not(.doc a) { display: inline-flex; align-items: center; min-height: var(--tap); }
h1, h2, h3, p, li, dd, dt, label, .btn, .row, .kcard__title, .dlv__title { overflow-wrap: break-word; }
.bcard__ex, .row__sub, .zc-item { overflow-wrap: anywhere; }
@media (forced-colors: active) {
  .btn, .card, .kcard, .sheet, .ibtn, .composer, .tabbar { border: 1px solid CanvasText; }
  :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: Highlight; }
}
