/* Мастерская — оформление «Мультстудия» (studio). Эталон: design/mockups/b-*.html, b.css.
   Шрифты свои (CSP не пускает внешние): Unbounded — заголовки, Onest — текст.
   Никаких inline-стилей в разметке: CSP style-src 'self'. */

/* ── шрифты ── */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/onest-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/onest-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/onest-cyrillic-600-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/onest-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/onest-cyrillic-700-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/onest-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/unbounded-cyrillic-600-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/unbounded-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/unbounded-cyrillic-700-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/unbounded-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 800; font-display: swap;
  src: url(fonts/unbounded-cyrillic-800-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 800; font-display: swap;
  src: url(fonts/unbounded-latin-800-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ── палитра и основа ── */
:root {
  --sky: #EEF2FF;
  --card: #FFFFFF;
  --ink: #1E1B4B;
  --cobalt: #3048D6;
  --sun: #FFC83D;
  --pink: #FF8FB3;
  --mint: #3EC49A;
  --mint-soft: #D5F5EA;
  --lilac: #F3F5FF;
  --cream: #FFF0C7;
  --muted: #5E5C86;
  --film: #37346F;
  --danger: #B3123A;
  --edge: 2px solid var(--ink);
  --lift: 3px 3px 0 var(--ink);
  --display: "Unbounded", system-ui, sans-serif;
  --text: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabs-h: 68px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { font: 16px/1.5 var(--text); color: var(--ink); background: var(--sky); overflow-wrap: anywhere;
  min-height: 100vh; }
a { color: var(--cobalt); text-underline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; }
h1 { font-weight: 800; font-size: 28px; margin: 0 0 12px; }
h2 { font-weight: 700; font-size: 20px; margin: 0 0 14px; }
h3 { font-weight: 700; font-size: 17px; margin: 0 0 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; }
code, pre { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }

:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.top :focus-visible, .reel :focus-visible, .strip :focus-visible { outline-color: var(--sun); }

.notice, .error { border: var(--edge); border-radius: 14px; padding: 10px 14px; box-shadow: var(--lift);
  margin: 0 0 16px; font-weight: 600; }
.notice { background: var(--mint-soft); }
.error { background: #FFE3EC; color: #6B0A24; }

/* ── кнопки и поля ── */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border: var(--edge); border-radius: 12px; padding: 8px 16px; font-weight: 600;
  background: #fff; color: var(--ink); box-shadow: var(--lift); text-decoration: none; cursor: pointer;
  list-style: none; }
.btn::-webkit-details-marker { display: none; }
.btn.primary { background: var(--sun); }
.btn.danger { background: #FFE3EC; color: #6B0A24; }
.btn.small { min-height: 44px; padding: 6px 12px; font-size: 14px; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.field { display: block; margin: 0 0 12px; font-weight: 600; font-size: 15px; }
.field input, .field textarea, .field select, input.input, textarea.input {
  display: block; width: 100%; max-width: 100%; margin-top: 4px; min-height: 44px;
  border: var(--edge); border-radius: 12px; padding: 9px 12px; background: #fff; font-weight: 400; }
.field textarea { resize: vertical; }
.hint { font-size: 13px; color: var(--muted); }

/* ── шапка сайта ── */
.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--cobalt);
  color: #fff; border-bottom: var(--edge); }
.mascot { width: 46px; height: 46px; border-radius: 50%; border: var(--edge); background: #fff;
  overflow: hidden; flex: none; }
.mascot img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25) translateY(4%); display: block; }
.top .title { font: 700 17px/1.15 var(--display); min-width: 0; }
.top .title small { display: block; font: 400 13px/1.3 var(--text); color: #E3E7FF; }
.nav { display: flex; gap: 6px; margin-left: 24px; }
.nav a { color: #fff; text-decoration: none; font: 600 15px/1 var(--display); padding: 12px 14px;
  border-radius: 12px; border: 2px solid transparent; }
.nav a:hover { border-color: #fff; }
.nav a[aria-current="page"] { background: var(--sun); color: var(--ink); border: var(--edge); box-shadow: var(--lift); }
.top .me { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.pill { font-size: 13px; background: var(--mint); color: var(--ink); border: var(--edge);
  border-radius: 999px; padding: 2px 10px; font-weight: 600; white-space: nowrap; }
.logout { margin: 0; }
.logout button { min-height: 44px; background: none; border: 2px solid transparent; color: #fff;
  font-weight: 600; font-size: 14px; padding: 0 8px; border-radius: 10px; text-decoration: underline;
  text-underline-offset: 3px; }
.logout button:hover { border-color: #fff; }

/* ── нижние вкладки (телефон) ── */
.tabs { display: none; }

/* ── общий каркас страниц ── */
.page { max-width: 1180px; margin: 0 auto; padding: 24px 28px 48px; }
.page.narrow { max-width: 860px; }
.card { background: var(--card); border: var(--edge); border-radius: 18px; padding: 18px;
  box-shadow: var(--lift); margin: 0 0 22px; }
.card > h2:first-child { margin-top: 0; }

/* ── разговор ── */
.chat { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 70px); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff;
  border-bottom: var(--edge); }
.chat-head .title { font: 700 17px/1.15 var(--display); }
.chat-head .title small { display: block; font: 400 13px/1.3 var(--text); color: var(--muted); }
.chat-head .pill { margin-left: auto; }
.chat-head .title { min-width: 0; }
.chat-logout { display: none; }

.reel { background: var(--ink); padding: 8px 0 14px; }
.reel-head { color: #fff; font: 600 13px/1 var(--display); padding: 4px 16px 16px; display: flex;
  justify-content: space-between; gap: 10px; }
.reel-head span { font: 400 13px/1 var(--text); color: #DCDBF7; white-space: nowrap; margin-left: 8px; }
.frames-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 8px 0 9px; }
.frames-scroll::-webkit-scrollbar { display: none; }
.frames { display: flex; gap: 6px; padding: 0 16px; margin: 0; list-style: none; position: relative; width: max-content; min-width: 100%; }
.frames::before, .frames::after { content: ""; position: absolute; left: 0; right: 0; height: 5px;
  background: radial-gradient(circle, var(--sky) 2px, transparent 2.5px) 0 0 / 12px 5px repeat-x; }
.frames::before { top: -8px; } .frames::after { bottom: -9px; }
.frame { flex: none; width: 128px; overflow-wrap: normal; word-break: normal; min-height: 62px; border-radius: 6px; background: var(--film);
  color: #DCDBF7; border: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px;
  text-align: center; font-size: 12px; line-height: 1.15; padding: 6px 7px; hyphens: auto; }
.frame-title { font-weight: 700; font-size: 12.5px; }
.frame-hint { font-size: 10.5px; line-height: 1.2; opacity: .85; font-weight: 400; }
.frame.done { background: var(--mint); color: var(--ink); font-weight: 600; }
.frame.now { background: var(--sun); color: var(--ink); font-weight: 700; outline: 2px solid #fff; outline-offset: -2px; }

.feed { padding: 18px 14px 12px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.empty { color: var(--muted); text-align: center; margin: 24px 0; }

.msg { max-width: 88%; border: var(--edge); border-radius: 18px; padding: 10px 14px; background: var(--card);
  box-shadow: var(--lift); align-self: flex-start; min-width: 0; }
.msg-head { font-size: 12px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.msg-head .meta { font-weight: 400; }
.msg-bot { border-radius: 18px 18px 18px 4px; }
.msg-ivan { align-self: flex-end; background: var(--sun); border-radius: 18px 18px 4px 18px; }
.msg-ivan .msg-head { color: #5C470C; text-align: right; }
.msg-igor { align-self: flex-end; background: var(--mint-soft); border-radius: 18px 18px 4px 18px; }
.msg-igor .msg-head { color: #1F5C48; text-align: right; }
.msg-body.plain { white-space: pre-wrap; }
.msg.pending { opacity: .75; }
.msg.failed { border-style: dashed; }
.msg-error { background: #FFE3EC; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .5em; }
.md ul, .md ol { margin: 0 0 .5em; padding-left: 1.3em; }
.md pre { overflow-x: auto; background: var(--lilac); padding: .6em; border-radius: 8px; white-space: pre; }
.md table { border-collapse: collapse; display: block; overflow-x: auto; }
.md td, .md th { border: 1px solid #C9CCEA; padding: 2px 6px; }

/* системная пометка */
.msg-system { align-self: center; max-width: 94%; background: transparent; box-shadow: none;
  border: 2px dashed #8D8BB3; border-radius: 12px; padding: 6px 12px; font-size: 14px; color: var(--muted);
  text-align: center; }
.msg-system > time { display: block; font-size: 12px; }

/* «Позвал Игоря» */
.msg.msg-kind-call { align-self: center; max-width: 94%; background: var(--pink); border: var(--edge);
  border-style: solid; border-radius: 14px; box-shadow: var(--lift); color: var(--ink); text-align: left;
  display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; padding: 10px 14px; }
.bell { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: var(--edge);
  display: grid; place-items: center; }
.msg-kind-call b { font: 700 14px/1.25 var(--display); display: block; }
.msg-kind-call .call-text { font-size: 14px; line-height: 1.4; margin-top: 3px; white-space: pre-wrap; }
.msg-kind-call time { font-size: 12px; color: #4A0F24; display: block; margin-top: 2px; }

/* заявка на генерацию (этап 3): карточка по событию; результат — карточки файлов */
.msg.msg-kind-gen { align-self: center; max-width: 94%; background: var(--lilac); border: var(--edge);
  border-style: solid; border-radius: 14px; box-shadow: var(--lift); color: var(--ink); text-align: left;
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start;
  padding: 10px 14px; font-size: 14px; }
.msg.msg-kind-gen[data-event="submitted"], .msg.msg-kind-gen[data-event="repriced"] { background: var(--cream); }
.msg.msg-kind-gen[data-event="done"] { background: var(--mint-soft); width: 94%; }
.msg.msg-kind-gen[data-event="invalid"], .msg.msg-kind-gen[data-event="failed"] { background: #FFE3EC; }
.msg.msg-kind-gen[data-event="rejected"], .msg.msg-kind-gen[data-event="disabled"] { background: #fff; }
.gen-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--sun); border: var(--edge);
  display: grid; place-items: center; }
.msg-kind-gen b { font: 700 14px/1.25 var(--display); display: block; }
.gen-line { line-height: 1.4; margin-top: 3px; }
.gen-note { font-size: 13px; line-height: 1.4; color: #4A4870; margin-top: 3px; white-space: pre-wrap; }
.msg-kind-gen time { font-size: 12px; color: #4A4870; display: block; margin-top: 4px; }
.gen-files { display: grid; gap: 10px; margin-top: 8px; }

/* «Итог» */
.msg.msg-kind-summary { max-width: 94%; width: 94%; background: var(--cream); border-radius: 18px; }
.summary-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.summary-head img { width: 40px; height: 40px; border-radius: 50%; border: var(--edge); object-fit: cover; flex: none; }
.summary-head b { font: 700 16px/1.2 var(--display); display: block; }
.summary-head span { font-size: 12px; color: var(--muted); font-weight: 600; }

/* файл и ссылка в ленте */
.msg.msg-kind-upload, .msg.msg-kind-link { background: transparent; border: 0; box-shadow: none; padding: 0;
  text-align: left; font-size: 16px; color: var(--ink); width: 88%; }
.msg.from-ivan, .msg.from-igor { align-self: flex-end; }
.msg-kind-upload .msg-head, .msg-kind-link .msg-head { padding: 0 4px; }
.from-ivan .msg-head, .from-igor .msg-head { text-align: right; }
.file { border: var(--edge); border-radius: 18px; background: #fff; box-shadow: var(--lift); padding: 12px;
  display: grid; gap: 8px; }
.file-name { font: 600 14px/1.25 var(--display); }
.file-sub { font-size: 13px; }
.file.audio, .file.video { background: var(--cobalt); color: #fff; }
.file.audio .file-sub, .file.video .file-sub { color: #E3E7FF; }
.file.audio a, .file.video a { color: #fff; }
.file audio { width: 100%; display: block; }
.file video { width: 100%; max-height: 60vh; display: block; border-radius: 10px; border: var(--edge); background: #000; }
.file-img { display: block; border-radius: 10px; overflow: hidden; border: var(--edge); background: var(--lilac); }
.file-img img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.eq i { width: 4px; background: #fff; border-radius: 2px; height: 50%; }
.eq i:nth-child(1) { height: 30%; } .eq i:nth-child(2) { height: 60%; } .eq i:nth-child(3) { height: 85%; }
.eq i:nth-child(4) { height: 50%; } .eq i:nth-child(5) { height: 95%; } .eq i:nth-child(6) { height: 70%; }
.eq i:nth-child(7) { height: 40%; } .eq i:nth-child(8) { height: 65%; } .eq i:nth-child(9) { height: 90%; }
.eq i:nth-child(10) { height: 55%; } .eq i:nth-child(11) { height: 35%; } .eq i:nth-child(12) { height: 75%; }
.eq i:nth-child(13) { height: 100%; } .eq i:nth-child(14) { height: 60%; } .eq i:nth-child(15) { height: 45%; }
.eq i:nth-child(16) { height: 80%; } .eq i:nth-child(17) { height: 50%; } .eq i:nth-child(18) { height: 30%; }
.file-row { display: flex; align-items: center; gap: 10px; }
.file-icon { width: 44px; height: 44px; border-radius: 12px; border: var(--edge); background: var(--cream);
  display: grid; place-items: center; flex: none; color: var(--ink); }
.link-card { border: var(--edge); border-radius: 18px; background: #fff; box-shadow: var(--lift); padding: 12px 14px; }
.link-card a { font-weight: 600; word-break: break-all; }
.link-card p { margin: 4px 0 0; white-space: pre-wrap; color: var(--muted); font-size: 15px; }

/* бот думает — метроном качает маятником */
.thinking { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted);
  font-size: 14px; padding: 0 14px 10px; }
.metro { width: 40px; height: 44px; flex: none; }
.metro .pendulum { transform-origin: 20px 36px; animation: swing 1s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }

/* поле ввода */
.composer { position: sticky; bottom: 0; background: var(--sky); padding: 8px 12px 12px;
  border-top: 2px solid transparent; z-index: 5; }
.composer-row { display: grid; grid-template-columns: 44px 1fr 48px; gap: 8px; align-items: end; }
.clip { width: 44px; height: 46px; border-radius: 14px; border: var(--edge); background: #fff;
  display: grid; place-items: center; padding: 0; }
.composer textarea { font: inherit; min-height: 46px; max-height: 40vh; width: 100%; border: var(--edge);
  border-radius: 16px; padding: 10px 14px; resize: none; background: #fff; display: block;
  field-sizing: content; }
.send { width: 48px; height: 48px; border-radius: 16px; border: var(--edge); background: var(--sun);
  box-shadow: var(--lift); display: grid; place-items: center; padding: 0; }
.send:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.send:disabled { opacity: .6; }
.composer-status { font-size: 13px; color: var(--muted); margin: 6px 4px 0; min-height: 0; }
.composer-status:empty { display: none; }
.composer-status.bad, .upload-status .bad { color: #8A0B2C; font-weight: 600; }
.composer-hint { font-size: 12px; color: var(--muted); margin: 4px 4px 0; }
progress { width: 100%; height: 10px; accent-color: var(--cobalt); }

/* ── материалы ── */
.drop { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; text-align: center; border: 2px dashed var(--ink);
  border-radius: 18px; padding: 22px 16px; background: var(--lilac); }
.drop.over { background: var(--cream); border-style: solid; }
.drop-title { font: 700 17px/1.2 var(--display); }
.drop input[type=file] { max-width: 100%; font-size: 14px; }
.drop input[type=file]::file-selector-button { font: 600 15px/1 var(--text); min-height: 44px; margin-right: 10px;
  border: var(--edge); border-radius: 12px; padding: 8px 14px; background: #fff; color: var(--ink); cursor: pointer; }
.upload-status { display: grid; gap: 6px; margin-top: 12px; }
.upload-status:empty { display: none; }
.upload-item { font-size: 14px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cards .file { box-shadow: var(--lift); }
.list { padding-left: 1.2em; margin: 0; }
.list li { margin: 0 0 .5em; }
.list-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cols > .card { margin: 0; }

/* ── проект ── */
.hero { background: #fff; border-bottom: var(--edge); overflow: hidden; }
.hero-in { max-width: 1180px; margin: 0 auto; padding: 26px 28px; display: grid;
  grid-template-columns: 1fr minmax(0, 520px); align-items: center; gap: 24px; }
.hero h1 { font: 800 56px/1 var(--display); margin: 0 0 12px; letter-spacing: -.01em; }
.hero p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 17px; }
.hero img { width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
.strip { background: var(--ink); border-radius: 14px; padding: 18px 14px; position: relative; box-shadow: var(--lift); }
.strip::before, .strip::after { content: ""; position: absolute; left: 10px; right: 10px; height: 8px;
  background: radial-gradient(ellipse 5px 3.5px, var(--sky) 98%, transparent) 0 0 / 22px 8px repeat-x; }
.strip::before { top: 4px; } .strip::after { bottom: 4px; }
.strip-scroll { overflow-x: auto; scrollbar-width: thin; }
.strip ol { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: auto;
  width: max-content; min-width: 100%; gap: 8px; }
.strip li { background: var(--film); color: #DCDBF7; border-radius: 8px; min-height: 104px; padding: 10px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.strip li b { font: 600 14px/1.2 var(--display); overflow-wrap: normal; word-break: normal; hyphens: auto; }
.strip li span { font-size: 12px; }
.strip li.done { background: var(--mint); color: var(--ink); }
.strip li.now { background: var(--sun); color: var(--ink); outline: 3px solid #fff; outline-offset: -3px; }
.admin { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; margin: 16px 0 0; }
.admin > details { flex: 0 1 auto; }
.admin > details[open] { flex-basis: 100%; }
.admin .note { font-size: 13px; color: var(--muted); flex-basis: 100%; margin: 0; }
.panel { margin-top: 12px; background: #fff; border: var(--edge); border-radius: 16px; padding: 16px;
  box-shadow: var(--lift); }
.panel .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.preview { margin-top: 12px; border: 2px dashed var(--ink); border-radius: 12px; padding: 12px; background: var(--lilac); }
.preview-title { font: 700 13px/1 var(--display); color: var(--muted); margin-bottom: 8px; }
.news { margin-top: 30px; display: grid; gap: 14px; }
.post { background: #fff; border: var(--edge); border-radius: 16px; padding: 16px 18px; box-shadow: var(--lift);
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; }
.post .date { background: var(--pink); border: var(--edge); border-radius: 12px; text-align: center;
  padding: 8px 4px; font: 800 24px/1 var(--display); align-self: start; }
.post .date small { display: block; font: 600 12px/1.4 var(--text); }
.post .date.plain { font-size: 13px; }
.post .md { color: var(--muted); max-width: 60ch; }
.post-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: flex-start; }
.post-tools details[open] { flex-basis: 100%; }
.know { background: #fff; border: var(--edge); border-radius: 18px; padding: 18px; box-shadow: var(--lift); }
.know ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.know li { border-radius: 12px; padding: 8px 12px; background: var(--lilac); font-size: 15px; }
.know li small { display: block; font-size: 12px; color: var(--muted); }
.know li.ask { background: var(--cream); }
.know .more { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.know .head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.know .head img { width: 56px; height: 56px; border-radius: 50%; border: var(--edge); object-fit: cover; flex: none; }
.know .head h2 { margin: 0; }
summary { cursor: pointer; }

/* ── кухня ── */
.ladder { margin: 8px 0; padding-left: 1.3em; }
.ladder li.current { font-weight: 700; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.buttons form { margin: 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; border-bottom: 1px solid #D5D8F0; padding: 6px; }
tr.bad td { background: #FFE3EC; }
.evidence { margin: .3em 0 0; padding-left: 1.1em; color: var(--muted); }  /* только на странице открытого захода */
pre { white-space: pre-wrap; margin: .2em 0; font-size: 13px; }
.calls li[data-status="error"], .calls li[data-status="cooldown"] { background: var(--cream); }
.gen-money { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; margin: 0 0 12px; }
.gen-list { display: grid; gap: 14px; }
.gen-item { border: var(--edge); border-radius: 16px; padding: 14px; background: #fff; box-shadow: var(--lift);
  scroll-margin-top: 16px; min-width: 0; }
.gen-item[data-status="pending"] { background: var(--cream); }
.gen-item[data-status="done"] { background: var(--mint-soft); }
.gen-item[data-status="invalid"], .gen-item[data-status="error"], .gen-item[data-status="unknown"] { background: #FFE3EC; }
.gen-item:target { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.gen-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.gen-top h3 { margin: 0; font-size: 16px; }
.gen-status { flex: none; font: 600 12px/1 var(--display); border: var(--edge); border-radius: 999px;
  padding: 6px 10px; background: #fff; white-space: nowrap; }
.gen-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 10px 0;
  font-size: 14px; }
.gen-meta dt { color: var(--muted); font-weight: 600; }
.gen-meta dd { margin: 0; min-width: 0; }
.gen-prompt { background: var(--lilac); border-radius: 10px; padding: 8px 10px; max-height: 14em; overflow: auto; }
.gen-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: 12px; }
.gen-actions form { margin: 0; }
.gen-reject[open] { flex-basis: 100%; }
.gen-reject form { margin-top: 10px; }

/* ── вход ── */
.login { max-width: 420px; margin: 0 auto; padding: 32px 16px 48px; }
.login-mascot { width: 150px; height: 150px; margin: 0 auto 12px; border-radius: 50%; border: var(--edge);
  box-shadow: var(--lift); overflow: hidden; background: #fff; }
.login-mascot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login h1 { text-align: center; margin-bottom: 4px; }
.login .lead { text-align: center; color: var(--muted); margin: 0 0 20px; }
.login .card .btn { width: 100%; margin-top: 4px; }
.login .note { text-align: center; font-size: 14px; color: var(--muted); margin: 16px 0 0; }
.nowrap { white-space: nowrap; }

/* ── телефон ── */
@media (max-width: 759.98px) {
  body.signed { padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
  .top { padding: 8px 12px; gap: 10px; }
  .top .nav { display: none; }
  .mascot { width: 42px; height: 42px; }
  .top .pill { display: none; }
  body.page-chat .top { display: none; }
  .chat { min-height: calc(100vh - var(--tabs-h)); }
  .chat-head { background: var(--cobalt); color: #fff; }
  .chat-head .title small { color: #E3E7FF; }
  .chat-logout { display: block; flex: none; margin-left: -4px; }
  .composer { bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
  .composer-hint { display: none; }
  .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 10; background: #fff; border-top: var(--edge); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); gap: 6px; }
  .tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 52px; text-decoration: none; color: var(--muted); font: 600 11px/1 var(--display);
    padding: 6px 0; border-radius: 12px; border: 2px solid transparent;
    /* «Материалы» на iPhone с четырьмя вкладками (у Игоря) переносились по букве */
    white-space: nowrap; min-width: 0; font-size: min(11px, 2.6vw); letter-spacing: -.01em; }
  .tabs a svg { width: 22px; height: 22px; }
  .tabs a[aria-current="page"] { background: var(--sun); color: var(--ink); border: var(--edge); }
  .page { padding: 18px 14px 32px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .hero-in { grid-template-columns: 1fr; padding: 18px 16px; gap: 12px; }
  .hero h1 { font-size: 38px; }
  .hero p { font-size: 15px; }
  .wrap { grid-template-columns: minmax(0, 1fr); padding: 18px 14px 32px; gap: 24px; }
  .strip { padding: 18px 0; }
  .strip-scroll { overflow-x: auto; padding: 0 12px; scrollbar-width: none; }
  .strip-scroll::-webkit-scrollbar { display: none; }
  .strip ol { grid-auto-columns: 132px; }
  .strip li { min-height: 92px; }
  .strip li b { font-size: 13px; }
  .post { grid-template-columns: 66px minmax(0, 1fr); padding: 14px; gap: 12px; }
  .post .date { font-size: 20px; }
  .post .date small { font-size: 10px; letter-spacing: -.01em; }
  .msg { max-width: 92%; }
  .msg.msg-kind-upload, .msg.msg-kind-link { width: 92%; }
  .gen-meta { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .gen-meta dd { margin-bottom: 6px; }
}
/* сенсорный экран (планшет, телефон боком): Ctrl+Enter нечем нажать */
@media (hover: none), (pointer: coarse) {
  .composer-hint { display: none; }
}
@media (min-width: 760px) and (max-width: 1023.98px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-in { grid-template-columns: 1fr minmax(0, 380px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* «Кухня»: заходы — итог, оценка, открыть переписку (SPEC-privacy.md) */
.visit { border: var(--edge); border-radius: 14px; margin: 10px 0; background: #fff; scroll-margin-top: 16px; }
.visit > summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 4px 12px;
  align-items: baseline; list-style-position: inside; }
.visit-counts { color: var(--muted); font-size: 13px; }
.visit-score, .visit-flag { font: 600 12px/1 var(--display); border: var(--edge); border-radius: 999px;
  padding: 5px 9px; background: var(--mint-soft); white-space: nowrap; }
.visit-score.bad { background: #FFE3EC; }
.visit-flag { background: var(--cream); }
.visit[open] > summary { border-bottom: var(--edge); }
.visit-body { padding: 12px 14px 14px; display: grid; gap: 12px; }
.visit-part h3 { font-size: 14px; margin: 0 0 6px; }
.visit-part > p { margin: 0 0 6px; }
.visit-summary { background: var(--cream); border-radius: 12px; padding: 10px 12px; }
.visit-summary .hint { margin: 4px 0 0; }
.visit-grade code { font-size: 13px; }
.visit-open { justify-self: start; max-width: 100%; }
.visit-open[open] { justify-self: stretch; }
.visit-open .panel { margin-top: 10px; }
.visit-opened .list { font-size: 14px; }
.feed.kitchen-feed { padding: 0; }
.konspekt-body { max-width: 70ch; }
.konspekt-body h1, .konspekt-body h2, .konspekt-body h3 { font-size: 16px; margin: 1em 0 .4em; }
.back { margin: 0 0 8px; font-size: 14px; }
.access-card { background: var(--lilac); }
.access-card > :first-child { margin-top: 0; } .access-card > :last-child { margin-bottom: 0; }
.access-card.expired { background: var(--cream); }

/* «Проект»: конспект бота — тот же, что у Игоря на «Кухне» */
.konspekt { margin-top: 26px; }
.konspekt-box { background: #fff; border: var(--edge); border-radius: 18px; box-shadow: var(--lift); }
.konspekt-box > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; list-style: none; }
.konspekt-box > summary::-webkit-details-marker { display: none; }
.konspekt-box > summary img { width: 48px; height: 48px; border-radius: 50%; border: var(--edge); object-fit: cover; flex: none; }
.konspekt-box > summary b { font: 700 17px/1.25 var(--display); display: block; }
.konspekt-box > summary small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.konspekt-box[open] > summary { border-bottom: var(--edge); }
.konspekt-box > .konspekt-body, .konspekt-box > .error { margin: 14px 16px 16px; }

/* «Разговор» у Игоря: что он видит */
.privacy-note { margin: 10px 14px 0; padding: 8px 12px; border: 2px dashed #8D8BB3; border-radius: 12px;
  font-size: 13px; color: var(--muted); background: var(--lilac); }

/* пометка «Игорь открыл переписку» — видна Ивану */
.msg.msg-kind-access { align-self: center; max-width: 94%; background: #fff; border: var(--edge);
  border-style: solid; border-radius: 14px; box-shadow: var(--lift); color: var(--ink); text-align: left;
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 14px; }
.eye { width: 34px; height: 34px; border-radius: 50%; background: var(--lilac); border: var(--edge);
  display: grid; place-items: center; }
.msg-kind-access b { font: 700 14px/1.25 var(--display); display: block; }
.msg-kind-access .access-text { font-size: 14px; line-height: 1.4; margin-top: 3px; white-space: pre-wrap; }
.msg-kind-access time { font-size: 12px; color: #4A4870; display: block; margin-top: 2px; }
