/* Общий каркас мини-приложений. Цвета: нейтральные токены + один акцент заказчика (--accent из data.json). */
:root {
  --accent: #E4573D;
  --on-accent: #fff;
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --surface-2: #F7F7FA;
  --text: #0C0D10;
  --text-2: #3C3C43;
  --hint: #8A8A90;
  --sep: rgba(60, 60, 67, .13);
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 24px rgba(16, 24, 40, .06);
  --shadow-up: 0 -1px 0 var(--sep), 0 -12px 32px rgba(16, 24, 40, .06);
  --skel: linear-gradient(90deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.09) 50%, rgba(0,0,0,.05) 100%);
  --chat-bg: #DCE6EC;
  --bubble: #FFFFFF;
  --r: 16px;
  --r-lg: 22px;
  --pad: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1C1C1E;
  --surface-2: #232326;
  --text: #F4F4F6;
  --text-2: #D1D1D6;
  --hint: #8E8E93;
  --sep: rgba(255, 255, 255, .1);
  --fill: rgba(118, 118, 128, .24);
  --fill-2: rgba(118, 118, 128, .34);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-up: 0 -1px 0 var(--sep);
  --skel: linear-gradient(90deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.05) 100%);
  --chat-bg: #0E1621;
  --bubble: #182533;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body {
  font: 400 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--hint); }

/* ---------- сцена и экраны ---------- */
#stage { position: fixed; inset: 0; overflow: hidden; max-width: 520px; margin: 0 auto; background: var(--bg); }
.scr {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  background: var(--bg); display: flex; flex-direction: column;
  -webkit-overflow-scrolling: touch;
  transition: transform .42s var(--ease), opacity .42s var(--ease), filter .42s var(--ease);
  will-change: transform;
}
.scr.in-right { transform: translateX(100%); }
.scr.out-left { transform: translateX(-28%); filter: brightness(.92); pointer-events: none; }
.scr.out-right { transform: translateX(100%); }
.scr-body { flex: 1 0 auto; padding: 0 0 24px; }

/* ---------- шапка ---------- */
.bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 8px var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
}
.bar.lined { box-shadow: 0 1px 0 var(--sep); }
.bar-title { flex: 1; min-width: 0; }
.bar-title b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-title small { display: block; font-size: 13px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--sep); }
.brand b { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--fill); color: var(--text); position: relative;
  transition: transform .15s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(.9); background: var(--fill-2); }
.icon-btn .badge {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.tg .bar .back-btn { display: none; }
.lang { display: flex; padding: 2px; border-radius: 10px; background: var(--fill); flex: none; }
.lang button { min-width: 36px; height: 30px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--hint); transition: all .2s var(--ease); }
.lang button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ---------- блоки ---------- */
.sec { padding: 0 var(--pad); margin-top: 22px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 10px; }
.sec-h h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--hint); }
.sec-h span { font-size: 13px; color: var(--hint); }
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.card.pad { padding: 16px; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 52px; position: relative; width: 100%; text-align: left;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; height: 1px; background: var(--sep); }
.row.plain + .row.plain::before { left: 16px; }
.row .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); flex: none; }
.row .ico svg { width: 17px; height: 17px; }
.row .grow { flex: 1; min-width: 0; }
.row .grow small { display: block; color: var(--hint); font-size: 13px; margin-top: 1px; }
.row .val { color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.row.tap { transition: background .15s; }
.row.tap:active { background: var(--fill); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--fill-2); flex: none; display: grid; place-items: center; transition: all .2s var(--ease); }
.on > .radio, .radio.on { border-color: var(--accent); background: var(--accent); }
.on > .radio::after, .radio.on::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--fill-2); position: relative; flex: none; transition: background .25s var(--ease); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.on > .switch { background: var(--accent); }
.on > .switch::after { transform: translateX(20px); }

/* ---------- hero ---------- */
.hero { margin: 4px var(--pad) 0; height: 216px; border-radius: var(--r-lg); overflow: hidden; position: relative; background: var(--ink, #222); box-shadow: var(--shadow); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.72) 100%); }
.hero-t { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; color: #fff; }
.hero-t h1 { margin: 0 0 6px; font-size: 27px; line-height: 1.1; font-weight: 750; letter-spacing: -.6px; }
.hero-t p { margin: 0; font-size: 14px; line-height: 1.35; opacity: .9; }

/* ---------- даты ---------- */
.dates { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; }
.date-tile { position: relative; padding: 14px 16px; min-height: 76px; display: flex; flex-direction: column; justify-content: center; transition: background .15s; }
.date-tile:active { background: var(--fill); }
.date-tile small { font-size: 12px; color: var(--hint); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.date-tile b { font-size: 21px; font-weight: 700; letter-spacing: -.4px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.date-tile span { font-size: 13px; color: var(--hint); }
.date-tile input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.date-tile input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.dates .mid { display: grid; place-items: center; padding: 0 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 14px; font-size: 13px; font-weight: 650; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill.grey { background: var(--fill); color: var(--text-2); }

/* ---------- чипы ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px var(--pad) 4px; margin: 0 calc(-1 * var(--pad)); }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 18px; background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 550; white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 6px;
  box-shadow: inset 0 0 0 1px var(--sep); transition: transform .15s var(--ease), background .2s, color .2s, box-shadow .2s;
}
.chip:active { transform: scale(.95); }
.chip.on { background: var(--text); color: var(--bg); box-shadow: none; }
.chip.acc.on { background: var(--accent); color: var(--on-accent); }
.chip small { opacity: .6; font-weight: 500; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 12px; background: var(--fill); }
.seg button { height: 34px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-2); transition: all .2s var(--ease); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* ---------- плитки классов ---------- */
.tiles { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px var(--pad) 6px; margin: 0 calc(-1 * var(--pad)); scroll-snap-type: x mandatory; }
.tiles::-webkit-scrollbar { display: none; }
.tiles { scroll-padding-inline: var(--pad); }
.tile {
  flex: none; width: 148px; height: 112px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--sep);
  position: relative; overflow: hidden; text-align: left; padding: 12px; scroll-snap-align: start;
  transition: transform .15s var(--ease), box-shadow .2s;
}
.tile:active { transform: scale(.96); }
.tile b { position: relative; z-index: 1; font-size: 14px; font-weight: 650; line-height: 1.2; display: block; max-width: 120px; }
.tile small { position: relative; z-index: 1; font-size: 12px; color: var(--hint); }
.tile img { position: absolute; right: -14px; bottom: -4px; width: 132px; height: auto; transition: transform .3s var(--ease); }
.tile.on { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.tile.dark { background: var(--ink, #14232F); color: #fff; }
.tile.dark small { color: rgba(255,255,255,.6); }
.tile.dark .marks { position: absolute; left: 12px; bottom: 12px; font-size: 11px; letter-spacing: .3px; color: rgba(255,255,255,.75); line-height: 1.35; }
.tile.dark.on { box-shadow: inset 0 0 0 2px var(--accent); }
.tile.any { width: 124px; }
.tile.any svg { position: absolute; left: 12px; bottom: 12px; width: 28px; height: 28px; color: var(--accent); }

/* ---------- карточки каталога ---------- */
.list { padding: 4px var(--pad) 0; display: grid; gap: 14px; }
.item { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; text-align: left; width: 100%; display: block; transition: transform .18s var(--ease); animation: rise .45s var(--ease) both; }
.item:active { transform: scale(.98); }
.ph { position: relative; aspect-ratio: 16 / 10; background: var(--fill); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transform: scale(1.03); transition: opacity .5s var(--ease), transform .8s var(--ease); }
.ph img.ld { opacity: 1; transform: none; }
.ph .tag { position: absolute; left: 10px; top: 10px; z-index: 1; }
.ph .tag-r { position: absolute; right: 10px; top: 10px; z-index: 1; }
.glass { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 650; color: #fff; background: rgba(20, 20, 24, .5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.glass svg { width: 14px; height: 14px; }
.item-b { padding: 12px 16px 14px; }
.item-t { display: flex; align-items: baseline; gap: 8px; }
.item-t b { font-size: 17px; font-weight: 650; letter-spacing: -.2px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-t span { font-size: 14px; color: var(--hint); font-variant-numeric: tabular-nums; }
.specs { margin-top: 3px; font-size: 14px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.specs i { font-style: normal; padding: 0 5px; opacity: .6; }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sep); }
.price { font-size: 18px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.price small { font-size: 13px; font-weight: 500; color: var(--hint); letter-spacing: 0; }
.price.req { font-size: 15px; color: var(--accent); }
.price.req .ask { display: flex; align-items: center; gap: 2px; }
.price.req .ask svg { width: 18px; height: 18px; flex: none; }
.price.req small { display: block; margin-top: 2px; }
.count:has(.sort) { align-items: center; }
.count .sort { display: flex; gap: 4px; }
.count .sort button { font-size: 13px; color: var(--hint); padding: 2px 8px; border-radius: 99px; }
.count .sort button.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 600; }
.price-side { text-align: right; font-size: 13px; color: var(--hint); font-variant-numeric: tabular-nums; line-height: 1.3; }
.price-side b { color: var(--text); font-weight: 600; font-size: 14px; }
.count { padding: 6px calc(var(--pad) + 4px) 10px; font-size: 13px; color: var(--hint); display: flex; justify-content: space-between; }
.empty { margin: 28px var(--pad); padding: 28px 20px; text-align: center; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.empty svg { width: 40px; height: 40px; color: var(--accent); stroke-width: 1.5; }
.empty b { display: block; font-size: 17px; margin: 10px 0 6px; }
.empty p { margin: 0 0 16px; color: var(--hint); }
.subbar { position: sticky; top: 56px; z-index: 4; padding: 4px var(--pad) 10px; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); }

/* скелетоны */
.sk { background: var(--skel); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
.sk-card { background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.sk-card .sk-ph { aspect-ratio: 16/10; border-radius: 0; }
.sk-line { height: 14px; margin: 14px 16px 0; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; } .sk-line.last { margin-bottom: 16px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- карточка объекта ---------- */
.gal { position: relative; background: var(--ink, #111); }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-track .ph { flex: 0 0 100%; aspect-ratio: auto; scroll-snap-align: center; background: transparent; }
.gal-count { position: absolute; right: 14px; bottom: 26px; z-index: 2; }
.gal-dots { position: absolute; left: 0; right: 0; bottom: 30px; display: flex; justify-content: center; gap: 6px; z-index: 2; pointer-events: none; }
.gal-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); transition: all .3s var(--ease); }
.gal-dots i.on { width: 18px; background: #fff; }
.float-back { position: absolute; top: 12px; left: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(20,20,24,.45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .15s; }
.float-back:active { transform: scale(.9); }
.tg .float-back { display: none; }
.sheet-top { position: relative; margin-top: -18px; border-radius: 20px 20px 0 0; background: var(--bg); padding: 20px var(--pad) 0; z-index: 1; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--accent); }
.h1 { margin: 4px 0 4px; font-size: 26px; line-height: 1.12; font-weight: 750; letter-spacing: -.6px; }
.sub { color: var(--hint); font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin-top: 16px; }
.fact { background: var(--surface); border-radius: 14px; padding: 11px 10px; box-shadow: var(--shadow); text-align: center; }
.fact svg { width: 20px; height: 20px; color: var(--accent); }
.fact b { display: block; font-size: 14px; font-weight: 650; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.fact small { display: block; font-size: 11px; color: var(--hint); }
.checks { margin: 0; padding: 4px 0; list-style: none; }
.checks li { display: flex; gap: 10px; padding: 7px 16px; font-size: 15px; line-height: 1.35; }
.checks li svg { width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }
.calc .row { min-height: 44px; padding: 10px 16px; }
.calc .row + .row::before { left: 16px; }
.calc .tot { font-weight: 700; font-size: 17px; }
.calc .tot .val { color: var(--text); }
.calc-note { padding: 0 16px 14px; font-size: 13px; color: var(--hint); }
.link-row { color: var(--accent); font-weight: 600; }
.flash { animation: flash .5s var(--ease); }
@keyframes flash { 0% { color: var(--accent); transform: scale(1.06); } 100% { transform: none; } }

/* ---------- форма ---------- */
.field { display: block; padding: 10px 16px 12px; position: relative; }
.field + .field::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
.field small { display: block; font-size: 12px; color: var(--hint); font-weight: 600; margin-bottom: 2px; }
.field input, .field textarea { width: 100%; border: 0; outline: 0; background: transparent; font-size: 17px; padding: 2px 0; resize: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--hint); opacity: .7; }
.field.err small { color: #E5484D; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.mini { display: flex; gap: 12px; align-items: center; padding: 10px; }
.mini img { width: 72px; height: 54px; border-radius: 10px; object-fit: cover; background: var(--fill); }
.mini b { display: block; font-size: 15px; }
.mini span { font-size: 13px; color: var(--hint); }
.fine { padding: 10px calc(var(--pad) + 4px) 0; font-size: 13px; color: var(--hint); line-height: 1.4; }

/* ---------- нижняя кнопка ---------- */
.cta { position: sticky; bottom: 0; z-index: 6; padding: 12px var(--pad) calc(12px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); box-shadow: var(--shadow-up); display: flex; align-items: center; gap: 14px; }
.cta-sum { flex: 1; min-width: 0; line-height: 1.25; }
.cta-sum b { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta-sum small { font-size: 13px; color: var(--hint); }
.btn {
  height: 52px; border-radius: 14px; padding: 0 22px; background: var(--accent); color: var(--on-accent);
  font-size: 17px; font-weight: 650; letter-spacing: -.2px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s var(--ease), filter .15s; flex: 1;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn:active { transform: scale(.97); filter: brightness(.94); }
.btn.ghost { background: var(--fill); color: var(--text); box-shadow: none; }
.cta-sum + .btn { flex: none; }
.tg .cta .btn { display: none; }
.tg .cta:not(:has(.cta-sum)) { display: none; }

/* ---------- лист снизу ---------- */
.veil { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.38); opacity: 0; transition: opacity .3s var(--ease); }
.veil.show { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 520px; margin: 0 auto; max-height: 86vh; overflow-y: auto; background: var(--bg); border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform .38s var(--ease); box-shadow: 0 -10px 40px rgba(0,0,0,.18); }
.sheet.show { transform: none; }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 8px auto 2px; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; padding: 8px var(--pad) 0; }
.sheet-h b { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.sheet-h button.lnk { color: var(--accent); font-weight: 600; font-size: 15px; }
.sheet .sec { margin-top: 18px; }
.sheet .cta { margin-top: 18px; }

/* ---------- готово ---------- */
.done-top { text-align: center; padding: 24px var(--pad) 4px; }
.ok { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; animation: pop .55s var(--ease) both; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 40%, transparent); }
.ok svg { width: 44px; height: 44px; color: #fff; stroke-width: 2.6; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .3s var(--ease) forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-top h2 { margin: 0 0 6px; font-size: 26px; font-weight: 750; letter-spacing: -.5px; }
.done-top p { margin: 0 auto; max-width: 320px; color: var(--hint); }
.note { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px; border-radius: 10px; background: var(--fill); font-size: 13px; color: var(--text-2); }
.note svg { width: 15px; height: 15px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; padding: 16px; font-size: 15px; }
.kv dt { color: var(--hint); }
.kv dd { margin: 0; text-align: right; font-weight: 550; font-variant-numeric: tabular-nums; }
.fade { animation: rise .35s var(--ease) both; }

/* «как это видит менеджер»: имитация чата Telegram */
.chat { border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: var(--chat-bg); }
.chat-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); box-shadow: 0 1px 0 var(--sep); }
.chat-h img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.chat-h b { display: block; font-size: 15px; }
.chat-h small { font-size: 13px; color: var(--hint); }
.chat-body { padding: 14px 10px 12px;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1.4px); background-size: 16px 16px; }
.day { text-align: center; margin-bottom: 10px; }
.day span { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(0,0,0,.22); }
.bubble { max-width: 92%; background: var(--bubble); border-radius: 16px 16px 16px 6px; padding: 10px 12px 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); font-size: 14.5px; line-height: 1.42; animation: rise .4s var(--ease) both; }
.bubble .from { color: var(--accent); font-weight: 650; font-size: 13.5px; margin-bottom: 4px; }
.bubble .head { font-weight: 700; margin-bottom: 6px; }
.bubble p { margin: 0; }
.bubble p b { font-weight: 600; }
.bubble a { color: #2A8BD6; text-decoration: none; }
.bubble .tot { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--sep); }
.bubble time { display: block; text-align: right; font-size: 11.5px; color: var(--hint); margin-top: 2px; }
.kb { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-width: 92%; margin-top: 4px; }
.kb span { height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 13.5px; font-weight: 600; color: #fff; background: rgba(0,0,0,.24); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
:root[data-theme="dark"] .kb span { background: rgba(255,255,255,.1); }

/* заглушка в корне */
.stub { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.stub svg { width: 44px; height: 44px; color: var(--hint); stroke-width: 1.4; }
.stub b { display: block; font-size: 19px; margin: 12px 0 6px; }
.stub p { margin: 0; color: var(--hint); max-width: 280px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* режим снимков: без анимаций */
.noanim *, .noanim *::before, .noanim *::after { transition: none !important; animation: none !important; }
.noanim .ok svg { stroke-dashoffset: 0; }
.noanim #stage, .noanim .sheet { max-width: 390px; }
#viewSeg { grid-auto-flow: row; grid-template-columns: 1fr 1.7fr; }
#viewSeg button { font-size: 14px; white-space: nowrap; }
.tile { height: 132px; }
.tile img { width: 116px; right: -12px; bottom: -6px; }
.noanim .ph img { opacity: 1; transform: none; }
.kv a { color: var(--accent); text-decoration: none; }
