:root {
  color-scheme: light dark;
  --bg: #fbf7f2;
  --card: #ffffff;
  --ink: #26203a;
  --muted: #6d6680;
  --line: #ebe4da;
  --accent: #d4432a;       /* белый текст на нём — 4,53:1 (было #ef5a3c, 3,39:1) */
  --accent-text: #d4432a;  /* акцент как цвет текста */
  --accent-ink: #ffffff;
  --deep: #1f1b4b;
  --ok: #1f8a5b;
  --warn: #b86a00;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(38, 32, 58, .06), 0 8px 24px rgba(38, 32, 58, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15131f; --card: #1f1c2c; --ink: #f2eef8; --muted: #a39db3; --line: #2f2b40;
    --line-btn: #4a4560;
    --deep: #d9d4ff; --shadow: none; --accent-text: #ef5a3c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }

header.site { padding: 18px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { font-weight: 800; font-size: 22px; letter-spacing: -.02em; text-decoration: none; }
.logo span { color: var(--accent-text); }
footer.site { padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
footer.site a, footer.site span { padding: 12px 0; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 0 24px; align-items: center; justify-content: center; text-align: center; }

h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.05; letter-spacing: -.03em; margin: 24px 0 16px; }
h2 { font-size: clamp(22px, 3.5vw, 30px); letter-spacing: -.02em; margin: 48px 0 16px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.narrow h1 { font-size: clamp(28px, 5vw, 40px); }
.lead { font-size: 19px; color: var(--muted); max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-weight: 650; text-decoration: none; transition: transform .1s, opacity .2s;
  background: var(--accent); color: var(--accent-ink); min-height: 48px;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-btn, var(--line)); }
.btn.small { padding: 8px 14px; min-height: 44px; font-size: 14px; }
.btn.danger { background: transparent; color: #c0392b; box-shadow: inset 0 0 0 1.5px #e7b3ab; }
.btn.block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.grid3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid3 > .card + .card { margin-top: 0; }   /* в сетке отступы даёт gap — иначе 2-я и 3-я карточки съезжают вниз */
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }

.hero { display: grid; gap: 32px; grid-template-columns: 1.2fr .8fr; align-items: center; padding: 16px 0 8px; }
.demo { justify-self: center; width: 100%; max-width: 280px; margin: 0; }
.demo-video { display: block; width: 100%; aspect-ratio: 9/16; border-radius: 28px; background: #1f1b4b; box-shadow: var(--shadow); object-fit: cover; }
.eyebrow { color: var(--accent-text); font-weight: 650; font-size: 14px; margin: 16px 0 -8px; }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; color: var(--muted); font-size: 15px; }
.ticks li { padding-left: 26px; position: relative; margin: 6px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.cta-end { text-align: center; margin: 56px 0 24px; }
.cta-end h2 { margin-top: 0; }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; } .demo { max-width: 300px; } }

label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; min-height: 48px;
}
textarea { font-size: 15px; line-height: 1.45; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 400; color: var(--muted); }
label.inline input { width: 96px; flex: none; text-align: center; }
details.more { margin-top: 4px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 12px 0; }   /* тач-цель ≥ 44 px */
details.more > textarea { margin-top: 4px; }
.card.accent { outline: 2px solid var(--accent); }
#owner-share:empty { display: none; }
img.qr { display: block; margin: 8px 0; border-radius: 8px; background: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--muted); }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.check b { color: var(--ink); }
.error { color: #c0392b; font-weight: 600; margin: 12px 0; }
.notice { padding: 14px 16px; border-radius: 12px; background: rgba(239, 90, 60, .08); border: 1px solid rgba(239, 90, 60, .25); margin: 16px 0; }
.notice.ok { background: rgba(31, 138, 91, .08); border-color: rgba(31, 138, 91, .3); }

.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; background: var(--line); }
.pill.ready { background: rgba(31, 138, 91, .15); color: var(--ok); }
.pill.busy { background: rgba(184, 106, 0, .15); color: var(--warn); }

.upload-zone { display: grid; gap: 12px; margin-top: 16px; }
.pick { position: relative; overflow: hidden; }
.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
/* голосовое вместо видео: отдельный тихий блок под кнопками видео и запись прямо на странице */
.voice-alt { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 12px; }
.voice-alt p { margin: 0; }
.recorder { display: grid; gap: 12px; margin-top: 16px; padding: 16px; border-radius: 12px; border: 1.5px solid var(--line); text-align: center; }
.recorder .rec-time { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.recorder .rec-time small { font-size: 15px; font-weight: 400; color: var(--muted); }
.rec-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; animation: rec-blink 1.2s ease-in-out infinite; }
@keyframes rec-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.review-audio { width: 100%; margin-bottom: 12px; }
.progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; display: none; margin-top: 12px; }
.progress.on { display: block; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.linkbox { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; }
.linkbox input { flex: 1; min-width: 0; font-size: 14px; }

/* «Соберите поздравление так же» у того, кто уже прислал видео: тихо, под чертой, после главного */
.viral { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.viral p { margin: 0 0 10px; }

.items { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.item.hidden { opacity: .45; }
.item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--line); cursor: pointer; display: block; }
.item .who { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.icon { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.icon:active { transform: scale(.95); }
video.player { width: 100%; max-height: 70vh; border-radius: 14px; background: #000; display: block; margin: 12px 0; }
dialog { border: 0; border-radius: 16px; padding: 12px; max-width: min(92vw, 480px); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.6); }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.prose h2 { margin-top: 32px; }
.prose p, .prose li { color: var(--ink); }
@media (max-width: 520px) {
  .item { grid-template-columns: 56px 1fr auto; }
  #items .item { grid-template-columns: 56px 1fr; }
  .item img { width: 56px; height: 56px; }
  #items .item .tools { grid-column: 1 / -1; justify-content: flex-start; }
}

/* страница участника */
.hints { margin: 4px 0 8px; padding-left: 20px; color: var(--ink); font-size: 15px; }
.hints li { margin: 3px 0; }
.promise { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 12px; padding: 10px 12px; margin: 12px 0; }
.review-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.review-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
#review .player { max-height: 60vh; }
#review .actions .btn { flex: 1; }
.small-pick { font-size: 14px; }
[hidden] { display: none !important; }

/* образец заставки: тёмный кадр, как в ролике, — первая строка мельче, имя крупно */
p.hint { margin: 6px 0 0; }
.title-preview { background: linear-gradient(160deg, #2a2160, #1f1b4b 60%, #3a1f3f); color: #fff; border-radius: 14px;
  padding: 20px 16px; text-align: center; min-height: 120px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.title-preview .tp-line { font-size: 15px; opacity: .9; overflow-wrap: anywhere; }
.title-preview .tp-name { font-size: 24px; font-weight: 700; line-height: 1.2; color: #ffd98a; overflow-wrap: anywhere; }
.title-preview .tp-name.empty { opacity: .45; }
#title-card .title-preview { margin-top: 8px; }
/* карандаш у подписи клипа — маленький, не кнопка: чтобы список не перегружать */
.icon.pencil { display: inline-block; width: auto; height: auto; border: 0; padding: 2px 4px; margin-left: 2px; font-size: 13px; opacity: .55; vertical-align: baseline; }
.icon.pencil:hover, .icon.pencil:focus-visible { opacity: 1; }
/* Приглашение на странице организатора — как сообщение в мессенджере: видно, что именно получат участники */
.invite-label { margin: 14px 0 6px; }
.invite-bubble { background: rgba(31, 138, 91, .08); border: 1px solid rgba(31, 138, 91, .25); border-radius: 14px; }
.invite-og { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 4px; }
.share { margin-top: 14px; }
.share .btn { width: 100%; }
.share-hint { margin: 6px 0 0; text-align: center; }
.share-alt { margin: 10px 0 0; text-align: center; }
.share-pick { margin-top: 12px; }
.share-pick .share-hint { margin: 0 0 10px; }
.share-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.share .share-row .btn { width: auto; }
.linkbtn { background: none; border: 0; padding: 4px 2px; font: inherit; color: var(--accent-text); text-decoration: underline; cursor: pointer; }
/* «Что мешает отправить?» — варианты столбиком, спокойно */
.why-options { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.why-options .btn { text-align: left; }
#why-thanks { margin: 4px 0 0; }

/* ---------- страница организатора: «пульт» (06.10, макет docs/research/2026-10-06-upravlenie-ux.md) ---------- */
.manage { max-width: 520px; }
.manage-page header.site { padding: 14px 0 10px; }
.center { text-align: center; }
/* шапка — как заставка ролика: тёмный кадр, имя золотом */
.m-hero { background: linear-gradient(160deg, #2a2160, #1f1b4b 60%, #3a1f3f); color: #fff; border-radius: 20px;
  padding: 14px 16px; text-align: center; }
.m-line { font-size: 15px; opacity: .9; overflow-wrap: anywhere; }
.manage .m-name { font-size: 34px; font-weight: 800; line-height: 1.1; color: #ffd98a; letter-spacing: -.02em;
  margin: 2px 0 10px; overflow-wrap: anywhere; }
.m-facts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.m-fact { background: rgba(255,255,255,.12); border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 600; }
.m-fact.ok { background: rgba(31,138,91,.35); }
.m-fact.busy { background: rgba(184,106,0,.45); }
.m-faces { display: flex; justify-content: center; margin-top: 10px; }
.m-faces:empty { display: none; }
.m-faces i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #1f1b4b; margin-left: -8px; display: grid;
  place-items: center; font-style: normal; font-size: 13px; font-weight: 700; color: #fff; background: #3a3170; }
.m-faces i:first-child { margin-left: 0; }
.m-faces .f0 { background: #b3476a; } .m-faces .f1 { background: #3a4f9e; } .m-faces .f2 { background: #1f8a5b; }
.m-faces .f3 { background: #b86a00; } .m-faces .f4 { background: #7a3fa0; } .m-faces .f5 { background: #2f7f8f; }
.m-faces .more { background: rgba(255,255,255,.2); font-size: 11px; }
.m-err { margin: 10px 0 0; font-size: 14px; color: #ffb4a6; }

/* одна главная кнопка */
.main-act { margin: 14px 0 4px; }
.btn.big { min-height: 60px; font-size: 18px; width: 100%; }
.main-hint { text-align: center; margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.main-act .build-error:empty { display: none; }
.busy-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-align: center; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 35%; background: var(--accent); border-radius: 99px; animation: bar-run 1.6s ease-in-out infinite alternate; }
@keyframes bar-run { from { margin-left: 0; } to { margin-left: 65%; } }
@media (prefers-reduced-motion: reduce) { .bar i { animation: none; width: 100%; opacity: .5; } }

/* «Что мешает отправить?» — тихая полоска под главной кнопкой */
.manage .why { margin-top: 12px; padding: 10px 12px; border-radius: 14px; border: 1px dashed var(--line-btn, var(--line)); font-size: 14px; }
.why-q { margin: 0; }
.manage .why-options { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.chip-btn { font: inherit; font-size: 13px; color: var(--ink); background: var(--card); border: 1px solid var(--line-btn, var(--line));
  border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.chip-btn:active { transform: scale(.97); }

/* плитки 2×4 */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.tile { display: flex; align-items: center; gap: 10px; text-align: left; min-height: 68px; padding: 10px 12px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow);
  color: var(--ink); font: inherit; cursor: pointer; }
.tile:active { transform: scale(.98); }
.tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tile .ic { font-size: 24px; line-height: 1; flex: none; }
.tile b { display: block; font-size: 16px; line-height: 1.2; }
.tile .st { display: block; font-size: 13px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
#owner-link-tg { margin: 12px 0 0; }
.quiet { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 0; }
.quiet button { background: none; border: 0; font: inherit; font-size: 14px; color: var(--muted); padding: 12px 4px;
  cursor: pointer; text-decoration: underline; min-height: 44px; }
.quiet .del { color: #c0392b; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 18px; font-size: 15px; z-index: 30; margin: 0;
  text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* нижние окна: лист снизу; «Назад» на телефоне, ✕ и тап по затемнению закрывают */
.shade { position: fixed; inset: 0; background: rgba(20,16,40,.55); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 10; }
.shade.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 520px; max-height: 90vh; max-height: 90dvh;
  overflow-y: auto; overscroll-behavior: contain; background: var(--bg); color: var(--ink); border-radius: 22px 22px 0 0;
  padding: 6px 16px calc(28px + env(safe-area-inset-bottom)); z-index: 11;
  transform: translateY(105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
.sheet.on { transform: none; visibility: visible; transition: transform .25s ease; }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet.on, .shade { transition: none; } }
body.sheet-open { overflow: hidden; }
.grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 6px auto 4px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: -6px;
  background: var(--bg); padding: 6px 0 8px; z-index: 1; }
.sheet-head h2 { font-size: 22px; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.sheet:focus { outline: none; }
.x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--line); color: var(--ink); font-size: 20px; cursor: pointer; flex: none; }
.sheet .lead { margin: 0 0 12px; font-size: 15px; }
.sheet .invite-label { margin-top: 0; }
.sheet .invite-label:has(+ .invite-hint) { margin-bottom: 2px; }
.invite-hint { margin: 0 0 6px; }
.sheet .invite-og { margin-top: 12px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.box + .box { margin-top: 12px; }
.box > :last-child { margin-bottom: 0; }
.big-num { font-size: 20px; display: block; }
.box label.inline { margin: 10px 0 0; }
.cal-row { margin: 0; } .cal-row + .cal-row { margin-top: 8px; }
.cal-row::first-letter { text-transform: uppercase; }
.stack { display: grid; gap: 10px; margin-top: 12px; }
.sheet .player { max-height: 52vh; margin-top: 0; }
.btn.danger.solid { background: #c0392b; color: #fff; box-shadow: none; }
.choice { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--radius); border: 1.5px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 400; margin: 0 0 10px; }
.choice input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.choice b { display: block; }
#title-edit .btn { margin-top: 16px; }
#title-edit .error:empty { display: none; }

/* список присланного: крупная картинка-кнопка, под ней ряд крупных кнопок; голосовое — кружок */
#items .item { grid-template-columns: 64px 1fr; border-radius: 14px; }
#items .thumb { position: relative; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 12px; background: var(--line);
  cursor: pointer; overflow: visible; }
#items .thumb img { width: 64px; height: 64px; border-radius: 12px; }
#items .thumb.voice { border-radius: 50%; background: transparent; }
#items .thumb.voice img { border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,217,138,.5); }
#items .thumb .play { position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55);
  color: #fff; font-size: 10px; display: grid; place-items: center; }
#items .who { display: flex; align-items: center; gap: 4px; }
#items .who .pencil { flex: none; }
#items .tools { grid-column: 1 / -1; display: grid; grid-template-columns: 52px 52px 1fr 52px; gap: 8px; }
#items .tools .icon { width: auto; height: 44px; font: inherit; font-size: 14px; white-space: nowrap; }
#items .tools .icon[disabled] { opacity: .3; cursor: default; }
@media (max-width: 520px) { #items .item { grid-template-columns: 64px 1fr; } #items .item img { width: 64px; height: 64px; } }
