/* PromptInput — App.promptInput (core/prompt-input.js), prefix .pin-. r32 (16.11.2026): the LOOK of the old line of the
   Ассистент (Kirill: «Верните вот эту строку… очень красиво сделано») — a white card with a big radius, a pale-lavender
   edge, a soft violet shadow and a sheen on the edge that follows the pointer; the text; a row «+» … microphone, a
   pale-lavender square «send»; a pale grey strip with chips («Клиент или сделка ▾», «⚡ Модель авто ▾»). The BEHAVIOUR of
   round T3: a pill 48 high (radius 24) springs open into the card (cubic-bezier(.175,.885,.32,1.275) .4 s) and closes back.
   Geometry the script reads: --pin-lh, --pin-pad-t, --pin-pad-b (the text), --pin-row-h (the row with its gap),
   --pin-strip-h (the strip; 0 without one). */

/* r31 (16.11): the ink tokens of the platform (its css/icons-ink.css, round T2) — the Продажник has no such file */
:root { --ink-icon: #1d1f2b; --ink-tile: rgba(29, 31, 43, .045); --ink-tile-brd: rgba(29, 31, 43, .09); --ink-tile-hov: rgba(29, 31, 43, .075); }
:root[data-theme="dark"] { --ink-icon: #f1f1f5; --ink-tile: rgba(255, 255, 255, .06); --ink-tile-brd: rgba(255, 255, 255, .12); --ink-tile-hov: rgba(255, 255, 255, .1); }

/* the springs — also on the menu and the preview, which live in <body>, outside .pin */
.pin, .pin-menu, .pin-pv {
  --pin-spring: cubic-bezier(.175, .885, .32, 1.275);
  --pin-soft: cubic-bezier(.3, 1.12, .5, 1);
  --pin-out: cubic-bezier(.22, 1, .36, 1);
}
.pin {
  --pin-bg: var(--l1);
  --pin-brd: var(--acc-soft-brd);
  --pin-brd-on: color-mix(in srgb, var(--acc) 55%, var(--acc-soft-brd));
  --pin-strip: var(--l2);
  --pin-strip-line: var(--line);
  --pin-hot: var(--l1);
  --pin-sh: 0 8px 24px -16px color-mix(in srgb, var(--acc) 34%, transparent);
  --pin-sh-open: 0 12px 38px -16px color-mix(in srgb, var(--acc) 28%, transparent);
  --pin-sh-hov: 0 18px 44px -16px color-mix(in srgb, var(--acc) 34%, transparent);
  --pin-lh: 23px; --pin-pad-t: 16px; --pin-pad-b: 4px; --pin-row-h: 54px; --pin-row-pb: 8px; --pin-strip-h: 42px;
  position: relative; width: 100%; font: 400 15px/var(--pin-lh) var(--font); color: var(--ink); text-align: left; letter-spacing: 0;
}
.pin:not(.has-strip) { --pin-strip-h: 0px; }
[data-theme="dark"] .pin {
  --pin-brd: color-mix(in srgb, var(--acc) 30%, transparent);
  --pin-brd-on: color-mix(in srgb, var(--acc) 58%, transparent);
  --pin-hot: #f3eeff;
  --pin-sh: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px -14px rgba(0, 0, 0, .6);
  --pin-sh-open: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 44px -20px color-mix(in srgb, var(--acc) 34%, transparent);
  --pin-sh-hov: 0 1px 2px rgba(0, 0, 0, .3), 0 22px 50px -20px color-mix(in srgb, var(--acc) 42%, transparent);
}
.pin.is-pill { max-width: 320px; transition: max-width .4s var(--pin-spring); }
.pin.is-pill.is-open { max-width: 480px; }

/* ── the card: the pill that becomes the input ── */
.pin-card {
  position: relative; z-index: 1; height: 48px; border-radius: 24px; overflow: hidden; container-type: inline-size;
  background: var(--pin-bg); border: 1px solid var(--pin-brd); box-shadow: var(--pin-sh);
  /* closing: a softer spring (the full one would sink the pill under 48 and crowd the microphone) */
  transition: height .4s var(--pin-soft), border-radius .4s ease, box-shadow .3s ease, border-color .2s ease;
}
.pin.is-open .pin-card { border-radius: 18px; box-shadow: var(--pin-sh-open); transition: height .4s var(--pin-spring), border-radius .25s ease, box-shadow .3s ease, border-color .2s ease; }
.pin .pin-card:hover { box-shadow: var(--pin-sh-hov); }
.pin:not(.is-open) .pin-card:hover { border-color: var(--pin-brd-on); }
.pin.is-open .pin-card:focus-within { border-color: var(--pin-brd-on); }
.pin.is-typing .pin-card { transition: height .15s ease-out, box-shadow .3s ease, border-color .2s ease; }
.pin.is-drop .pin-card { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
/* FLIP (flipFrom): the card travels from where the screen had its input */
.pin.is-fly { z-index: 6; }
.pin.is-fly .pin-card { transition: transform .62s cubic-bezier(.3, 1.14, .4, 1), height .62s cubic-bezier(.3, 1.14, .4, 1), width .62s cubic-bezier(.3, 1.14, .4, 1),
  border-radius .3s ease, box-shadow .3s ease, border-color .2s ease; }
.pin.is-fly .pin-glow { opacity: 0; animation: none; }

/* the sheen on the edge: a 1.5 px ring, its light where the pointer is (--sx / --sy, set by the script on this .pin only) */
.pin-sheen { position: absolute; inset: 0; z-index: 5; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: radial-gradient(160px 160px at var(--sx, 50%) var(--sy, 0%), var(--pin-hot) 0%, color-mix(in srgb, var(--acc) 22%, var(--pin-hot)) 22%, color-mix(in srgb, var(--acc) 55%, transparent) 48%, transparent 76%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: pin-sheen 4.6s ease-in-out infinite; }
@keyframes pin-sheen { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
/* glow: true — a soft violet light behind the card (the Ассистент home) */
.pin-glow { position: absolute; inset: -14px; z-index: 0; border-radius: 32px; pointer-events: none; filter: blur(16px); transition: opacity .4s ease;
  background: radial-gradient(150px 140px at var(--sx, 50%) var(--sy, 0%), color-mix(in srgb, var(--acc) 42%, transparent) 0%, transparent 72%);
  animation: pin-glow 4.6s ease-in-out infinite; }
@keyframes pin-glow { 0%, 100% { opacity: .32; } 50% { opacity: .8; } }
[data-theme="dark"] .pin-glow { background: radial-gradient(150px 140px at var(--sx, 50%) var(--sy, 0%), color-mix(in srgb, var(--acc) 34%, transparent) 0%, transparent 72%); }

/* the hint as a button — leaves with scale 1.05 and a small lift, comes back after the card has closed */
.pin-ph {
  position: absolute; left: 0; top: 0; right: 0; height: min(46px, 100%); display: flex; align-items: center; padding: 0 56px 0 20px;
  border: 0; background: none; color: var(--mut2); font: inherit; text-align: left; cursor: text; transform-origin: 20px 50%;
  transition: opacity .26s ease .1s, transform .45s var(--pin-spring) .06s;
}
.pin-ph:focus-visible { outline: none; }
.pin-ph-t { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-ph.is-draft { color: var(--ink); }
.pin-ph-t.is-out { position: absolute; left: 20px; right: 56px; animation: pin-ph-out .22s ease both; }
.pin-ph-t.is-in { animation: pin-ph-in .42s var(--pin-out) backwards; }
@keyframes pin-ph-out { to { opacity: 0; transform: translateY(-7px); filter: blur(3px); } }
@keyframes pin-ph-in { from { opacity: 0; transform: translateY(7px); filter: blur(3px); } }
.pin.is-open .pin-ph { opacity: 0; transform: translateY(-3px) scale(1.05); pointer-events: none; transition: opacity .11s ease-out, transform .3s ease; }

/* the text — fades in (opacity, scale .95 → 1, translateY); its box is sized by the script, the card clips it */
.pin-tw {
  position: absolute; left: 0; right: 0; top: 0; height: 66px; opacity: 0; transform: translateY(5px) scale(.95); transform-origin: 20px 0;
  pointer-events: none; transition: opacity .14s ease, transform .25s ease;
}
.pin.is-open .pin-tw { opacity: 1; transform: none; pointer-events: auto; transition: opacity .24s ease .08s, transform .45s var(--pin-spring); }
.pin-ta {
  display: block; width: 100%; height: 100%; margin: 0; padding: var(--pin-pad-t) 18px var(--pin-pad-b); border: 0; border-radius: 0; outline: 0; resize: none;
  background: transparent; color: var(--ink); font: inherit; overflow-y: hidden; overscroll-behavior: contain; box-shadow: none;
  scrollbar-width: none;   /* the fades say there is more — no bar */
}
.pin-ta::placeholder { color: var(--mut2); opacity: 1; }
.pin.is-phswap .pin-ta::placeholder { animation: pin-ph-fade .4s ease both; }
@keyframes pin-ph-fade { from { opacity: 0; } }
.pin-ta::-webkit-scrollbar { display: none; }
.pin-mirror {
  position: absolute; left: 0; top: 0; height: 0 !important; min-height: 0; margin: 0; padding: var(--pin-pad-t) 18px var(--pin-pad-b); border: 0; visibility: hidden;
  overflow: hidden; pointer-events: none; resize: none; font: inherit; white-space: pre-wrap; overflow-wrap: break-word;
}
/* the soft fades of a scrolled text — the colour of the card */
.pin-fade { position: absolute; left: 0; right: 0; height: 22px; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.pin-fade.is-top { top: 0; background: linear-gradient(var(--pin-bg), color-mix(in srgb, var(--pin-bg) 0%, transparent)); }
.pin-fade.is-bot { bottom: 0; background: linear-gradient(color-mix(in srgb, var(--pin-bg) 0%, transparent), var(--pin-bg)); }
.pin.has-top .pin-fade.is-top, .pin.has-bot .pin-fade.is-bot { opacity: 1; }

/* ── the row: «+» on the left; «демо», the bars, the microphone and «send» on the right. On the pill it is the pill
   itself (46 high, only the microphone shows); open, it sits above the strip and the microphone travels beside «send» ── */
.pin-row {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 46px; display: flex; align-items: center; gap: 8px;
  padding: 0 6px 0 13px; pointer-events: none;
  transition: bottom .4s var(--pin-soft), padding .4s var(--pin-soft);
}
.pin.is-open .pin-row { bottom: calc(var(--pin-strip-h) + var(--pin-row-pb)); padding: 0 16px 0 13px; transition: bottom .4s var(--pin-spring), padding .4s var(--pin-spring); }
.pin.is-typing .pin-row { transition: bottom .15s ease-out, padding .15s ease-out; }
.pin-row > * { pointer-events: auto; }
.pin-row > .pin-grow { pointer-events: none; }
.pin-grow { flex: 1 1 auto; min-width: 4px; }
.pin-ib {
  position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--mut); cursor: pointer; transition: background .16s ease, color .16s ease, transform .2s var(--pin-spring), opacity .2s ease;
}
.pin-ib:hover { background: var(--l2); color: var(--ink); }
.pin-ib:active { transform: scale(.92); }
.pin-ib:focus-visible, .pin-send:focus-visible, .pin-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.pin-add { width: 32px; height: 32px; border-radius: 9px; }
.pin-add[hidden] { display: none; }
.pin:not(.is-open) .pin-add { opacity: 0; transform: scale(.6); pointer-events: none; }
.pin.is-open .pin-add { transition: background .16s ease, color .16s ease, transform .45s var(--pin-spring) .06s, opacity .25s ease .08s; }
/* the microphone: quiet like «+»; recording — violet with a soft ring */
.pin-mic .ic { stroke-width: 1.7; }
.pin.is-rec .pin-mic { background: var(--acc-soft); color: var(--acc); animation: pin-rec 1.6s ease-in-out infinite; }
@keyframes pin-rec { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 16%, transparent); } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc) 16%, transparent); } }
/* «send»: a pale-lavender square with an arrow; empty — pale; while busy — a square «show the answer now» */
.pin-send {
  position: relative; display: block; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--acc-soft); color: var(--acc); cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, opacity .2s ease, transform .25s var(--pin-spring),
    width .4s var(--pin-spring), margin .4s var(--pin-spring);
}
.pin-send:hover { background: var(--l4); border-color: var(--acc-soft-brd); }
.pin-send:active { transform: scale(.9); }
.pin-send.is-idle { opacity: .55; cursor: default; }
.pin-send.is-idle:hover { background: var(--acc-soft); border-color: var(--line-2); }
.pin-send.is-idle:active { transform: none; }
.pin-send.is-ready { border-color: var(--acc-soft-brd); }
.pin-send[data-on="halt"] { background: var(--l1); border-color: var(--line-3, var(--line-2)); color: var(--ink); }
.pin-send.is-sent { animation: pin-sent .4s var(--pin-spring); }
@keyframes pin-sent { 30% { transform: scale(.86) translateX(2px); } }
.pin:not(.is-open):not(.is-busy) .pin-send { width: 0; margin-left: -10px; opacity: 0; transform: scale(.6); pointer-events: none;
  transition: width .32s var(--pin-soft), margin .32s var(--pin-soft), opacity .12s ease, transform .2s ease; }
/* the icons swap: a turn of ±45°, scale .5 → 1 and a blur, on the spring */
.pin-ai {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: rotate(45deg) scale(.5); filter: blur(3px);
  transition: opacity .18s ease, transform .42s var(--pin-spring), filter .22s ease;
}
.pin-ai.is-on { opacity: 1; transform: none; filter: none; }
.pin-ai.is-gone { transform: rotate(-45deg) scale(.5); }
.pin-ai.is-pre { transition: none; transform: rotate(45deg) scale(.5); }
.pin-send .pin-ai .ic { stroke-width: 1.9; }

/* the voice: five violet bars left of the microphone, «демо» when nothing can be recognised */
.pin-eq { display: inline-flex; align-items: center; justify-content: center; gap: 2.5px; flex: 0 0 auto; width: 0; height: 22px; margin: 0 -8px 0 0; opacity: 0; overflow: hidden;
  transition: width .4s var(--pin-spring), margin .4s var(--pin-spring), opacity .18s ease; }
.pin.is-rec .pin-eq { width: 25px; margin: 0 2px 0 0; opacity: 1; }
.pin-eq i { display: block; flex: 0 0 3px; height: 18px; border-radius: 2px; background: var(--acc); transform: scaleY(.16); will-change: transform; }
.pin-demo { display: none; flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; font: 600 10.5px/1 var(--font); letter-spacing: .02em; color: var(--mut);
  background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--line-2); cursor: help; }
.pin.is-rec.is-demo .pin-demo { display: inline-block; animation: pin-in .4s var(--pin-spring) backwards; }
@keyframes pin-in { from { opacity: 0; transform: scale(.7); filter: blur(2px); } }

/* ── the strip: pale grey under a hairline; arrives from a blur ── */
.pin-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: var(--pin-strip-h); box-sizing: border-box; display: flex; align-items: center; gap: 4px 8px;
  padding: 0 14px 0 10px; background: var(--pin-strip); border-top: 1px solid var(--pin-strip-line); min-width: 0;
  opacity: 0; filter: blur(6px); transform: translateY(8px); pointer-events: none;
  transition: opacity .12s ease, filter .12s ease, transform .2s ease;
}
.pin-bar[hidden] { display: none; }
.pin.is-open .pin-bar { opacity: 1; filter: none; transform: none; pointer-events: auto; transition: opacity .28s ease .1s, filter .36s ease .1s, transform .5s var(--pin-spring) .06s; }
.pin-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 8px; flex: 0 0 auto; min-width: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--mut); font: 400 13px/1 var(--font); white-space: nowrap; cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .2s var(--pin-spring);
}
.pin-chip[hidden] { display: none; }
.pin-chip:hover, .pin-chip[aria-expanded="true"] { color: var(--ink); background: color-mix(in srgb, var(--acc) 7%, transparent); }
.pin-chip:active { transform: scale(.96); }
.pin-chip-ic { display: inline-grid; place-items: center; flex: 0 0 auto; width: 16px; height: 16px; color: var(--mut2); transition: color .15s ease; }
.pin-chip:hover .pin-chip-ic { color: var(--mut); }
.pin-model-ic.is-pop { animation: pin-pop .45s var(--pin-spring); }
@keyframes pin-pop { from { opacity: .2; transform: scale(.5) rotate(-30deg); } }
.pin-model-t { display: inline-flex; align-items: baseline; white-space: pre; }
.pin-tri { flex: 0 0 auto; color: var(--mut2); transition: transform .35s var(--pin-spring); }
.pin-chip[aria-expanded="true"] .pin-tri { transform: rotate(180deg); }

/* MorphingText: the width flows, the letters swap in a stagger */
.pin-mt { position: relative; display: inline-flex; white-space: nowrap; transition: width .42s cubic-bezier(.3, 1.25, .5, 1); }
.pin-mt-w { display: inline-flex; flex: 0 0 auto; }
.pin-mt-w > span { display: inline-block; }
.pin-mt-w.is-out { position: absolute; left: 0; top: 0; }
.pin-mt-w.is-out > span { animation: pin-ch-out .2s ease both; animation-delay: calc(var(--i) * 8ms); }
.pin-mt-w.is-in > span { animation: pin-ch-in .42s cubic-bezier(.2, .9, .3, 1.25) backwards; animation-delay: calc(var(--i) * 20ms + 50ms); }
@keyframes pin-ch-in { from { opacity: 0; transform: translateY(7px); filter: blur(3px); } }
@keyframes pin-ch-out { to { opacity: 0; transform: translateY(-7px); filter: blur(3px); } }
/* a fast second click: the leaving label always plays its exit, whatever it still carries */
.pin-mt-w.is-out.is-in > span { animation: pin-ch-out .2s ease both; }

/* the effort (only when a screen asks for it): three bars light 1 / 2 / 3 */
.pin-bars { display: inline-flex; align-items: flex-end; gap: 2px; width: 13px; height: 12px; margin: 0 1px 1px 2px; }
.pin-bars i { display: block; width: 3px; border-radius: 1.5px; background: color-mix(in srgb, var(--mut2) 45%, transparent); transform-origin: 50% 100%; transition: background .22s ease; }
.pin-bars i:nth-child(1) { height: 5px; }
.pin-bars i:nth-child(2) { height: 8.5px; }
.pin-bars i:nth-child(3) { height: 12px; }
.pin-bars i.is-on { background: var(--acc); }
.pin-bars i.is-pop { animation: pin-bar-pop .45s var(--pin-spring); }
@keyframes pin-bar-pop { from { transform: scaleY(.3); } }

/* the host's own chips — first in the strip; chosen — violet (the old «is-set») */
.pin-tool-t { min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.pin-tool.is-on { color: var(--acc); font-weight: 560; }
.pin-tool.is-on .pin-chip-ic { color: var(--acc); }
.pin-note { flex: 0 1 auto; min-width: 0; padding: 0 2px; font: 400 12.5px/1 var(--font); color: var(--mut2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── the attachments tab: slides out from under the card ── */
.pin-tab {
  position: absolute; z-index: 0; left: 16px; bottom: calc(100% - 16px); max-width: calc(100% - 32px); padding: 7px 7px 23px;
  border-radius: 16px 16px 0 0; background: var(--l2); border: 1px solid var(--pin-brd); border-bottom: 0;
  box-shadow: 0 -6px 18px -12px color-mix(in srgb, var(--acc) 30%, transparent);
  transform: translateY(100%); opacity: 0; visibility: hidden;
  transition: transform .3s cubic-bezier(.4, 0, .7, .2), opacity .12s ease .18s, visibility 0s .3s;
}
.pin.is-open.has-files .pin-tab { transform: none; opacity: 1; visibility: visible; transition: transform .55s var(--pin-spring), opacity .12s ease, visibility 0s; }
.pin-tab-in { display: flex; flex-wrap: wrap; gap: 6px; }
.pin-th { position: relative; flex: 0 0 48px; width: 48px; height: 48px; animation: pin-th-in .5s var(--pin-spring) backwards; animation-delay: var(--d, 0ms);
  transition: width .26s ease, flex-basis .26s ease, margin .26s ease, opacity .16s ease, transform .26s ease; }
@keyframes pin-th-in { from { opacity: 0; transform: translateY(12px) scale(.7); filter: blur(3px); } }
.pin-th.is-out { flex-basis: 0; width: 0; margin-right: -6px; opacity: 0; transform: scale(.6); pointer-events: none; }
.pin-th-b {
  position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden;
  background: var(--l1); cursor: zoom-in;
}
.pin-th-b::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--ink-tile-brd); pointer-events: none; }
.pin-th-b img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pin-th-b:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
.pin-th.is-doc .pin-th-b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--acc); cursor: default; }
.pin-th.is-doc .pin-th-b b { font: 700 8.5px/1 var(--font); letter-spacing: .05em; color: var(--mut); }
.pin-th.is-lifted .pin-th-b img { visibility: hidden; }
.pin-th-x {
  position: absolute; top: -6px; right: -6px; z-index: 1; display: grid; place-items: center; width: 19px; height: 19px; padding: 0;
  border: 2px solid var(--l2); border-radius: 50%; background: var(--ink); color: var(--l1); cursor: pointer;
  opacity: 0; transform: scale(.5); transition: opacity .15s ease, transform .3s var(--pin-spring);
}
.pin-th-x .ic { stroke-width: 2.2; }
.pin-th:hover .pin-th-x, .pin-th:focus-within .pin-th-x { opacity: 1; transform: none; }
.pin-th-x:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 50%; }
@media (hover: none) { .pin-th-x { opacity: 1; transform: none; } }

/* ── the model menu (in body, above windows): springs up from the chip, the highlight glides ── */
.pin-menu {
  position: fixed; z-index: 20050; min-width: 248px; padding: 6px; border-radius: 16px; background: var(--l1); border: 1px solid var(--acc-soft-brd);
  box-shadow: 0 20px 48px -14px color-mix(in srgb, var(--acc) 30%, rgba(16, 24, 40, .2)), 0 2px 8px rgba(16, 24, 40, .06); font: 400 13px/1.35 var(--font); color: var(--ink);
  transform-origin: 14px 100%; opacity: 0; transform: translateY(10px) scale(.94); filter: blur(4px);
  transition: opacity .14s ease, transform .18s ease, filter .14s ease;
}
[data-theme="dark"] .pin-menu { background: var(--l2); border-color: color-mix(in srgb, var(--acc) 26%, transparent); box-shadow: 0 24px 56px -14px rgba(0, 0, 0, .65), 0 2px 8px rgba(0, 0, 0, .3); }
.pin-menu.is-down { transform-origin: 14px 0; transform: translateY(-10px) scale(.94); }
.pin-menu.is-in { opacity: 1; transform: none; filter: none; transition: opacity .2s ease, transform .5s var(--pin-spring), filter .25s ease; }
.pin-menu-t { position: relative; padding: 6px 10px 7px; font: 600 11.5px/1 var(--font); color: var(--mut2); }
.pin-menu-hl {
  position: absolute; left: 6px; right: 6px; top: 0; height: 0; border-radius: 10px; background: color-mix(in srgb, var(--acc) 8%, transparent); pointer-events: none;
  transition: transform .34s cubic-bezier(.3, 1.3, .5, 1), height .34s cubic-bezier(.3, 1.3, .5, 1);
}
.pin-menu-hl.is-snap { transition: none; }
.pin-mi {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; outline: none;
}
.pin-mi:focus-visible { outline: none; }
.pin-mi-ic { display: inline-grid; place-items: center; flex: 0 0 auto; width: 18px; height: 18px; color: var(--acc); }
.pin-mi-tx { flex: 1 1 auto; min-width: 0; }
.pin-mi-tx b { display: block; font-weight: 580; font-size: 13.5px; line-height: 18px; }
.pin-mi-tx small { display: block; margin-top: 1px; font-size: 12px; line-height: 16px; color: var(--mut2); }
.pin-mi-ck { flex: 0 0 auto; display: inline-grid; place-items: center; width: 16px; color: var(--acc); opacity: 0; transform: scale(.5);
  transition: opacity .15s ease, transform .35s var(--pin-spring); }
.pin-mi[aria-checked="true"] .pin-mi-ck { opacity: 1; transform: none; }

/* ── the preview: a shared element over a blurred page ── */
.pin-pv { position: fixed; inset: 0; z-index: 20060; outline: none; cursor: zoom-out; }
.pin-pv-bg { position: absolute; inset: 0; background: color-mix(in srgb, var(--l-1, var(--l0)) 52%, transparent); -webkit-backdrop-filter: blur(12px) saturate(1.05); backdrop-filter: blur(12px) saturate(1.05);
  opacity: 0; transition: opacity .3s ease; }
[data-theme="dark"] .pin-pv-bg { background: rgba(6, 10, 18, .55); }
.pin-pv.is-in .pin-pv-bg { opacity: 1; }
.pin-pv-img {
  position: fixed; display: block; object-fit: cover; cursor: default; box-shadow: 0 0 0 1px var(--ink-tile-brd);
  --pin-pv-ease: cubic-bezier(.3, 1.12, .4, 1);
  transition: left .52s var(--pin-pv-ease), top .52s var(--pin-pv-ease), width .52s var(--pin-pv-ease), height .52s var(--pin-pv-ease),
    border-radius .45s ease, box-shadow .4s ease;
}
.pin-pv.is-in .pin-pv-img { box-shadow: 0 30px 80px -24px rgba(16, 24, 40, .45), 0 0 0 1px var(--ink-tile-brd); }
.pin-pv.is-out { pointer-events: none; }
.pin-pv.is-out .pin-pv-img { transition-duration: .38s; transition-timing-function: cubic-bezier(.3, 1.08, .4, 1); }
.pin-pv-cap {
  position: fixed; left: 50%; display: flex; align-items: baseline; gap: 8px; max-width: calc(100vw - 48px); padding: 6px 12px; border-radius: 999px;
  background: var(--l1); box-shadow: var(--sh-pop); font: 500 12.5px/18px var(--font); color: var(--ink); white-space: nowrap; cursor: default;
  opacity: 0; transform: translate(-50%, 8px); transition: opacity .16s ease, transform .2s ease;
}
.pin-pv-cap b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pin-pv-cap span { color: var(--mut2); }
.pin.is-busy .pin-send[data-on="halt"] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 12%, transparent); }
.pin-pv.is-in .pin-pv-cap { opacity: 1; transform: translate(-50%, 0); transition: opacity .3s ease .2s, transform .45s var(--pin-spring) .2s; }

/* narrow cards: «Модель» drops its word (the bolt and the name stay), own chips get shorter, a lone note stays */
@container (max-width: 460px) { .pin-model-pre { display: none; } .pin-tool-t { max-width: 140px; } .pin-bar:has(.pin-chip:not([hidden])) .pin-note { display: none; } }
@container (max-width: 360px) { .pin-effort .pin-mt { display: none; } .pin-tool-t { max-width: 100px; } }

/* low windows: the card is shorter (the script reads these) */
@media (max-height: 640px) {
  .pin { --pin-pad-t: 11px; --pin-row-h: 46px; --pin-row-pb: 6px; --pin-strip-h: 36px; }
  .pin:not(.has-strip) { --pin-strip-h: 0px; }
}

/* the first paint and reduced motion: no morph — the states just are */
.pin.is-still, .pin.is-still * { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .pin *, .pin, .pin-menu, .pin-pv * { transition-duration: .01ms !important; animation: none !important; }
  .pin-tw, .pin-ph, .pin-bar, .pin-ai, .pin-menu { transform: none !important; filter: none !important; }
  .pin-sheen { opacity: .8; }
  .pin-glow { opacity: .5; }
}

/* ── the hidden demo screen #/dev/prompt ── */
.pin-dm { max-width: 980px; margin: 0 auto; padding: 32px 24px 72px; display: flex; flex-direction: column; gap: 24px; }
.pin-dm-h h1 { font-size: 22px; line-height: 30px; font-weight: 640; }
.pin-dm-h p { margin-top: 4px; color: var(--mut); }
.pin-dm-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 340px; padding: 120px 24px 44px;
  border-radius: 20px; background: var(--l2); border: 1px solid var(--line); }
.pin-dm-log { position: absolute; left: 22px; right: 22px; top: 18px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--mut2); }
.pin-dm-log b { color: var(--ink); font-weight: 560; white-space: pre-wrap; }
.pin-dm-host { display: flex; justify-content: center; width: 100%; }
.pin-dm-chat { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 760px; margin: 0 auto; padding: 20px; border-radius: 20px;
  background: var(--l1); border: 1px solid var(--line); }
.pin-dm-msgs { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: 260px; max-height: 420px; overflow-y: auto; padding: 4px 4px 84px; }
.pin-dm-q, .pin-dm-b { max-width: 80%; padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pin-dm-q { align-self: flex-start; background: var(--l2); border-bottom-left-radius: 5px; }
.pin-dm-b { align-self: flex-end; background: var(--ink-tile-hov); border-bottom-right-radius: 5px; }
.pin-dm-b small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--mut2); }

/* inside a core window (.sheet.is-core) the platform tints every textarea (.core textarea, core.css) — the field of the
   prompt input stays clear: its card is the surface (round T3: a lilac band showed over the white card) */
.core .pin .pin-ta, .pin .pin-ta { background: transparent; border: 0; box-shadow: none; }

/* ── r33 (16.11, Кирилл: «иконки в строке ввода — именно чёрные, как черненько было; не фиолетовым, а чёрным») ──
   Все значки строки — чернилами платформы (--ink-icon; в тёмной теме — светлые): «+», микрофон, значки полосы, ▾, меню
   модели. «Отправить» — чёрный квадрат с белой стрелкой (пустое поле — бледный), запись — чёрная кнопка «стоп» и чёрные
   полоски голоса, «показать ответ сейчас» — тоже чёрная. Лиловым остаются только кромка карточки и её мягкая тень. */
:root { --ink-on: #fff; } :root[data-theme="dark"] { --ink-on: #16141f; }   /* значок на чёрной (в тёмной теме — светлой) кнопке */
.pin-ib { color: var(--ink-icon); }
.pin-ib:hover { background: var(--ink-tile-hov); color: var(--ink-icon); }
.pin.is-rec .pin-mic { background: var(--ink-icon); color: var(--ink-on); animation-name: pin-rec-ink; }
@keyframes pin-rec-ink { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink-icon) 14%, transparent); } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ink-icon) 14%, transparent); } }
.pin-send { border-color: transparent; background: var(--ink-icon); color: var(--ink-on); }
.pin-send:hover { background: color-mix(in srgb, var(--ink-icon) 86%, var(--l1)); border-color: transparent; }
.pin-send.is-idle { opacity: 1; background: var(--ink-tile); border-color: var(--ink-tile-brd); color: color-mix(in srgb, var(--ink-icon) 45%, transparent); }
.pin-send.is-idle:hover { background: var(--ink-tile); border-color: var(--ink-tile-brd); }
.pin-send.is-ready { border-color: transparent; }
.pin-send[data-on="halt"] { background: var(--ink-icon); border-color: transparent; color: var(--ink-on); }
.pin-eq i { background: var(--ink-icon); }
.pin-demo { background: var(--ink-tile); box-shadow: inset 0 0 0 1px var(--ink-tile-brd); }
.pin-chip-ic, .pin-tri, .pin-chip:hover .pin-chip-ic { color: var(--ink-icon); }
.pin-chip:hover, .pin-chip[aria-expanded="true"] { background: var(--ink-tile-hov); }
.pin-tool.is-on, .pin-tool.is-on .pin-chip-ic { color: var(--ink-icon); }
.pin-bars i.is-on { background: var(--ink-icon); }
.pin-mi-ic, .pin-mi-ck { color: var(--ink-icon); }
.pin-th.is-doc .pin-th-b { color: var(--ink-icon); }
