/* Репетиция Нового года — кабинет и конструктор. Палитра и шрифты — как на лендинге. */
:root {
  --bg: #F7F1E8;
  --card: #FFFBF5;
  --cream: #F3EADB;
  --accent: #8E1B1B;
  --accent-hover: #A52323;
  --green: #1F3A2E;
  --green-deep: #1C3A2C;
  --green-soft: #E7EEE4;
  --gold: #C6A66A;
  --gold-soft: #F0E4C8;
  --pink: #F6E6E0;
  --text: #2B2B2B;
  --muted: #6d6a61;
  --line: rgba(31, 58, 46, .14);
  --line-strong: #D8CDB4;
  --shadow: 0 10px 28px rgba(44, 34, 22, .08);
  --radius: 14px;
  --serif: "Lora", Georgia, serif;
  --sans: "Manrope", "Segoe UI", Arial, sans-serif;
  --hand: "Caveat", cursive;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--green); line-height: 1.2; margin: 0; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 500; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 500; }
h3, .h3 { font-size: 1.15rem; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.err { color: var(--accent); }
.nowrap { white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 999; background: #fff; padding: 8px 12px; }
.hand { font-family: var(--hand); color: var(--accent); font-size: 1.7rem; line-height: 1; margin-bottom: 6px; }
[hidden] { display: none !important; }

/* ---------- Кнопки и формы ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 22px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: .92rem; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; text-align: center; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn-ghost:hover { background: var(--green-soft); border-color: var(--green); }
.btn-light { background: #fff; color: var(--green); border-color: #fff; }
.btn-light:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn-danger-ghost { background: transparent; color: var(--accent); border-color: rgba(142, 27, 27, .35); }
.btn-danger-ghost:hover { background: var(--pink); border-color: var(--accent); }
.btn-small { min-height: 38px; padding: 7px 16px; font-size: .84rem; }
.btn-wide { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: .88rem; color: var(--green); }
.field small { color: var(--muted); font-size: .8rem; }
.field input, .field select, .field textarea, .search input, .guest-add input, .assign-row input, .row-action select {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .search input:focus, .guest-add input:focus, .assign-row input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 58, 46, .12); }
/* Поле пароля с кнопкой «показать/скрыть» */
.pass-wrap { position: relative; display: block; }
.field .pass-wrap input { padding-right: 50px; }
.pass-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, background .2s; }
.pass-toggle:hover { color: var(--green); background: var(--green-soft); }
.pass-toggle .eye-closed { display: none; }
.pass-toggle[aria-pressed="true"] .eye-open { display: none; }
.pass-toggle[aria-pressed="true"] .eye-closed { display: block; }
.pass-wrap input::-ms-reveal { display: none; }
.field-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-alert { background: var(--pink); color: var(--accent); border-radius: 10px; padding: 12px 16px; font-weight: 600; margin: 0 0 16px; }
.form-alert a { font-weight: 700; }
.flash { margin: 16px 0 0; padding: 12px 18px; border-radius: 12px; font-weight: 600; background: var(--green-soft); color: var(--green); border: 1px solid rgba(31, 58, 46, .18); }
.flash-error { background: var(--pink); color: var(--accent); border-color: rgba(142, 27, 27, .2); }

/* ---------- Шапка и подвал ---------- */
.topbar { background: rgba(255, 251, 245, .97); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1.25; }
.brand strong { font-family: var(--serif); font-weight: 600; color: var(--green); font-size: 1.05rem; }
.brand span { font-size: .7rem; color: var(--muted); }
.topnav { display: flex; align-items: center; gap: 18px; font-size: .86rem; font-weight: 700; }
.topnav a { color: var(--text); text-decoration: none; }
.topnav a:hover { color: var(--accent); }
.topnav form { margin: 0; }
.topnav .link-btn { color: var(--muted); font-weight: 700; text-decoration: none; }
.site-foot { padding: 26px 0; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 40px; }
.site-foot a { color: inherit; }

/* ---------- Вход и простые страницы ---------- */
.auth { display: grid; place-items: center; padding: 48px 16px; }
.auth-card { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 32px 28px; }
.auth-card--wide { width: min(620px, 100%); }
.auth-card--festive { background: var(--card) radial-gradient(circle at 100% 0, rgba(198, 166, 106, .18), transparent 45%); }
.auth-card h1 { margin-bottom: 10px; }
.auth-card .h3 { margin: 22px 0 12px; }
.auth-links { margin: 16px 0 0; text-align: center; font-size: .9rem; }
.auth-foot { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: .88rem; }
.ticks { padding-left: 20px; margin: 0 0 20px; color: var(--muted); }
.ticks li { margin: 6px 0; }
.checks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.checks li b { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: .8rem; color: #fff; background: #4E7360; }
.checks li.bad b { background: var(--accent); }
.checks li.warn b { background: var(--gold); }
.checks small { display: block; color: var(--muted); }

/* ---------- Кабинет ---------- */
.cabinet { padding: 36px 0 20px; }
.cabinet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.cabinet-head p { margin: 6px 0 0; }
.party-list { display: grid; gap: 14px; }
.party-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(44, 34, 22, .05); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; transition: box-shadow .2s, border-color .2s; }
.party-card:hover { border-color: rgba(198, 166, 106, .7); box-shadow: var(--shadow); }
.party-card-main { display: flex; gap: 16px; align-items: center; text-decoration: none; color: inherit; flex: 1 1 380px; min-width: 0; }
.party-date { flex: none; width: 66px; height: 70px; border-radius: 12px; background: var(--green-deep); color: #fff; display: grid; place-items: center; align-content: center; text-align: center; line-height: 1.1; }
.party-date b { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--gold); }
.party-date span { font-size: .7rem; opacity: .85; }
.party-info { display: grid; gap: 4px; min-width: 0; }
.party-info h2 { font-size: 1.18rem; font-weight: 600; overflow-wrap: anywhere; }
.party-meta { font-size: .85rem; color: var(--muted); }
.party-progress { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.party-progress span { font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--gold-soft); color: #6b5222; }
.party-progress span.done { background: var(--green-soft); color: var(--green); }
.party-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.party-actions form { margin: 0; }
.empty { text-align: center; padding: 40px 20px; background: var(--card); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); }
.account { margin-top: 48px; }
.account h2 { margin-bottom: 16px; }
.account-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.account-card, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.account-card h3 { margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- Онбординг ---------- */
.wizard-wrap { padding: 36px 0 20px; }
.wizard { width: min(640px, 100%); margin-inline: auto; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 30px 28px; }
.wz-top { margin-bottom: 18px; }
.wz-top h1 { margin-bottom: 8px; }
.wz-progress { height: 6px; background: var(--cream); border-radius: 999px; overflow: hidden; margin-top: 18px; }
.wz-progress-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--accent)); border-radius: 999px; transition: width .35s ease; }
.wz-counter { margin: 8px 0 0; font-size: .8rem; font-weight: 700; color: var(--muted); }
.wz-step { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.wizard--all .wz-step { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.wz-step legend { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--green); padding: 0; margin-bottom: 6px; }
.wizard--steps .wz-step legend { font-size: clamp(1.4rem, 3vw, 1.75rem); }
.wz-hint { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.wz-input { width: 100%; min-height: 54px; padding: 12px 16px; font-size: 1.08rem; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; }
.wz-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 58, 46, .12); }
.wz-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.date-later { margin: 14px 0 0; }
.wz-input:disabled { background: var(--cream); color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper-btn { flex: none; width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid var(--green); background: #fff; color: var(--green); font-size: 1.5rem; cursor: pointer; }
.stepper-btn:hover { background: var(--green-soft); }
.stepper-input { width: 110px; text-align: center; font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--green); }
.choice-cards { display: grid; gap: 10px; }
.choice-card { display: block; cursor: pointer; }
.choice-card input, .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-card span { display: grid; gap: 2px; padding: 14px 16px 14px 48px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; position: relative; transition: border-color .2s, background .2s; }
.choice-card span::before { content: ""; position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 2px solid var(--gold); }
.choice-card b { color: var(--green); }
.choice-card small { color: var(--muted); }
.choice-card input:checked + span { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 1px var(--green); }
.choice-card input:checked + span::before { border-color: var(--green); background: radial-gradient(circle, var(--accent) 0 5px, transparent 6px); }
.choice-card input:focus-visible + span, .chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: #fff; font-weight: 700; font-size: .9rem; transition: all .2s; }
.chip input:checked + span { border-color: var(--green); background: var(--green-deep); color: #fff; }
.wz-summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 18px 0 0; padding: 16px 18px; background: var(--cream); border-radius: 12px; font-size: .92rem; }
.wz-summary dt { color: var(--muted); }
.wz-summary dd { margin: 0; font-weight: 700; }
.wz-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; }
.wz-nav .btn { min-width: 130px; }
.wz-nav [data-wz="next"], .wz-nav [data-wz="finish"] { margin-left: auto; }
.wizard--all .wz-nav { justify-content: flex-end; }
.wizard--steps .wz-step { min-height: 190px; }

/* ---------- Конструктор: шапка и вкладки ---------- */
.party-hero { background: var(--green-deep); color: #fff; position: relative; }
.party-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 90% -10%, rgba(198, 166, 106, .28), transparent 40%), radial-gradient(circle at 0 120%, rgba(142, 27, 27, .35), transparent 45%); pointer-events: none; }
.party-hero-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding: 26px 0 18px; }
.party-hero h1 { color: #fff; margin: 6px 0 6px; overflow-wrap: anywhere; }
.party-hero-meta { margin: 0; color: rgba(255, 255, 255, .82); font-size: .92rem; }
.back-link { color: rgba(255, 255, 255, .75); text-decoration: none; font-size: .85rem; font-weight: 700; }
.back-link:hover { color: #fff; }
.party-hero-side { display: grid; gap: 8px; justify-items: end; }
.save-status { font-size: .78rem; color: rgba(255, 255, 255, .7); min-height: 1.2em; }
.save-status[data-kind="ok"]::before { content: "✓ "; color: var(--gold); }
.save-status[data-kind="error"] { color: #FFD1C8; font-weight: 700; }
.tabs { position: relative; z-index: 2; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 0 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px 14px; color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 700; font-size: .9rem; border-radius: 12px 12px 0 0; transition: background .2s, color .2s; }
.tab:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.tab-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .45); font-size: .76rem; }
.tab.is-done .tab-num { background: var(--gold); border-color: var(--gold); color: var(--green-deep); }
.tab.is-active { background: var(--bg); color: var(--green); }
.tab.is-active .tab-num { border-color: var(--accent); background: var(--accent); color: #fff; }
.party-body { padding: 30px 0 10px; }
.panel { outline: none; overflow-anchor: none; }
html:has(.page-party), .page-party { overflow-anchor: none; }
.panel-head { max-width: 72ch; margin-bottom: 22px; }
.panel-head h2 { margin-bottom: 10px; }
.panel-head h2::after { content: ""; display: block; width: 56px; height: 3px; border-radius: 999px; background: linear-gradient(to right, var(--gold), var(--accent)); margin-top: 10px; }
.panel-head p { color: var(--muted); }
.panel-sub { font-size: .9rem; }
.progress-pill { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; background: var(--gold-soft); color: #6b5222; font-weight: 700; font-size: .84rem; }
.progress-pill.is-done { background: var(--green-soft); color: var(--green); }
.progress-pill.is-done::before { content: "✓ "; white-space: pre; }
.panel-next { display: flex; justify-content: flex-end; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- 1. Программа ---------- */
.stages { display: grid; gap: 14px; }
.stage { display: grid; grid-template-columns: 92px 1fr; gap: 18px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(43, 38, 32, .05); transition: border-color .2s, box-shadow .2s; }
.stage.needs-choice { border-left: 4px solid var(--gold); }
.stage-time { align-self: start; display: grid; align-content: start; gap: 2px; text-align: center; padding: 10px 6px; background: var(--cream); border-radius: 10px; }
.stage-time b { font-family: var(--serif); font-size: 1.35rem; color: var(--green); font-weight: 600; }
.stage-time span { font-size: .72rem; font-weight: 700; color: var(--muted); }
.stage-main { min-width: 0; }
.stage-title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.stage-num { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green-deep); color: var(--gold); font-family: var(--serif); font-size: .95rem; }
.stage-need { display: inline-block; margin: 10px 0 0; font-size: .8rem; font-weight: 700; background: var(--gold-soft); border-radius: 999px; padding: 4px 12px; }
.stage-desc { margin: 10px 0 0; color: var(--muted); }
.stage-note { display: flex; gap: 12px; align-items: flex-start; background: var(--cream); border: 1.5px dashed var(--gold); border-radius: 12px; padding: 12px 16px; font-size: .92rem; }
.stage-note::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.stage-note p { margin: 0; }
.choice-label { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: .86rem; font-weight: 700; color: var(--accent); }
.choice-label::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.options { display: grid; gap: 10px; margin-top: 10px; }
.option { position: relative; }
.option > input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-head { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 6px 6px 6px 14px; transition: border-color .2s, background .2s, box-shadow .2s; }
.option-head:hover { border-color: var(--gold); }
.option > input:checked ~ .option-head { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 1px var(--green); }
.option-head label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; flex: 1; min-width: 0; cursor: pointer; padding: 8px 4px 8px 0; font-weight: 700; color: var(--green); }
.option > input:focus-visible ~ .option-head label { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.option-radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--gold); position: relative; }
.option > input:checked ~ .option-head .option-radio { border-color: var(--green); }
.option > input:checked ~ .option-head .option-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.option-title { flex: 1 1 auto; min-width: 0; }
.fit-badge { font-size: .72rem; font-weight: 700; color: #fff; background: var(--green); border-radius: 999px; padding: 3px 10px; }
.option-toggle { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: .84rem; font-weight: 600; cursor: pointer; }
.option-toggle:hover { color: var(--accent); background: var(--gold-soft); }
.option-toggle svg { transition: transform .2s; }
.option-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.option-body { display: grid; gap: 8px; color: var(--muted); font-size: .9rem; background: var(--cream); border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 16px; margin-top: 8px; }
.option-body p { margin: 0; }
.option-body b { color: var(--text); }
.option-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.option-body--easy { display: flow-root; }
.option-body--easy > p + p, .option-body--easy > ul, .option-body--easy > .option-links { margin-top: 8px; }
.game-badge-row { float: right; width: 62px; margin: 10px 4px 8px 12px; shape-outside: circle(50%); }
.game-easy-bauble { position: relative; display: flex; align-items: center; justify-content: center; width: 62px; height: 62px; padding: 6px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 8.5px; line-height: 1.3; font-weight: 700; text-align: center; }
.game-easy-bauble::before { content: ""; position: absolute; top: -5px; left: 50%; transform: translateX(-50%); width: 13px; height: 6px; border-radius: 2px 2px 0 0; background: var(--gold); }
.game-easy-bauble::after { content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; border: 1px solid var(--gold); border-radius: 50%; }
.game-intro-note { color: var(--green); font-weight: 700; font-style: italic; }
.option-links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { display: inline-flex; align-items: center; font-size: .76rem; font-weight: 700; color: var(--accent); background: rgba(142, 27, 27, .06); border: 1px solid rgba(142, 27, 27, .25); border-radius: 999px; padding: 4px 12px; text-decoration: none; }
.chip-link:hover { background: rgba(142, 27, 27, .13); }

/* ---------- 2. Меню ---------- */
.menu-note { background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 10px; padding: 14px 18px; font-size: .92rem; }
.menu-note p { margin: 0; }
.qty-card { margin-top: 18px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 20px 22px; }
.qty-card ul, .doc-qty ul { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.qty-card .out { color: var(--accent); margin: 12px 0 0; font-size: .92rem; }
.qty-foot { margin: 8px 0 0; font-size: .78rem; color: var(--muted); }
.menu-subtitle { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--green); margin: 30px 0 4px; }
.menu-hint { color: var(--muted); }
.menu-cats { display: grid; gap: 22px; margin-top: 16px; }
.menu-cat h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.menu-cat h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.dishes { display: grid; gap: 8px; margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dish { position: relative; }
.dish input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dish label, .checklist label { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 11px 14px; cursor: pointer; font-size: .9rem; font-weight: 600; min-height: 48px; transition: border-color .2s, background .2s; }
.dish label:hover, .checklist label:hover { border-color: var(--gold); }
.dish input:checked + label { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 1px var(--green); }
.box { flex: none; width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--gold); position: relative; background: #fff; }
.dish input:checked + label .box::after, .checklist input:checked + .box::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); font-weight: 800; font-size: 14px; line-height: 1; }
.dish input:focus-visible + label, .checklist input:focus-visible + .box { outline: 3px solid var(--gold); outline-offset: 2px; }
.assign { margin-top: 30px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.assign h3 { margin-bottom: 4px; }
.assign-list { display: grid; gap: 8px; margin-top: 14px; }
.assign-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.assign-dish { font-weight: 700; color: var(--green); display: grid; }
.assign-dish small { font-weight: 600; color: var(--muted); font-size: .72rem; }
.assign-row input { min-height: 42px; }
.assign-actions { margin-top: 14px; }

/* ---------- 3. Гости ---------- */
.guests-top { display: grid; gap: 16px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; }
.card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.guest-add { display: flex; gap: 8px; margin: 12px 0; }
.guest-add input { min-height: 42px; flex: 1; min-width: 0; }
.guest-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.guest-chips li { display: inline-flex; align-items: center; gap: 4px; background: var(--green-soft); color: var(--green); border-radius: 999px; padding: 4px 4px 4px 14px; font-weight: 700; font-size: .88rem; }
.guest-chips button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.guest-chips button:hover { background: #fff; color: var(--accent); }
.invite-text { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: .92rem; margin: 10px 0 12px; }
.invite-text p:last-child { margin: 0; }
.invite-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: .8rem; }
.guest-grid { display: grid; gap: 14px; margin-top: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.guest-card { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.guest-card p { margin: 0; font-size: .9rem; color: var(--muted); }
.guest-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--green-deep); color: var(--gold); display: grid; place-items: center; }
.card h3 .guest-icon { width: 34px; height: 34px; }
.card h3 .guest-icon svg { width: 18px; height: 18px; }

/* ---------- 4. Музыка ---------- */
.playlist-card { background: var(--green-deep); color: rgba(255, 255, 255, .88); border-radius: var(--radius); padding: 26px; display: grid; gap: 14px; }
.playlist-card p { margin: 0; }
.playlist-card .btn { justify-self: start; }
.playlist-card ul { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 4px; }
.playlist-illustrations { display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); gap: 16px; }
.playlist-illustrations img { border-radius: 10px; }

/* ---------- 5. Подготовка ---------- */
.prep-groups { display: grid; gap: 18px; }
.prep-group h3 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 1.05rem; }
.prep-group h3 span { font-family: var(--sans); font-size: .8rem; font-weight: 700; color: var(--accent); background: var(--pink); border-radius: 999px; padding: 2px 10px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist label { font-weight: 600; }
.checklist input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checklist input:checked ~ span:last-child { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(142, 27, 27, .5); }
.shop-card { margin-top: 28px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 20px 22px; }
.shop-card h3 { margin-bottom: 8px; }
.shop-card p { color: var(--muted); font-size: .9rem; }
.shop-list { margin-top: 26px; }
.shop-list ul { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--muted); }
.shop-disclaimer { margin-top: 20px; font-size: .75rem; color: var(--muted); }

/* ---------- 6. Итог ---------- */
.summary-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.summary-tip { font-size: .82rem; margin: 10px 0 18px; }
.print-doc { background: #fff; border: 1px solid var(--gold); border-radius: 18px; padding: clamp(18px, 4vw, 40px); box-shadow: var(--shadow); }
.doc-head { border-bottom: 2px solid var(--green); padding-bottom: 14px; margin-bottom: 8px; }
.doc-head h2 { margin-bottom: 6px; }
.doc-head p { margin: 0; color: var(--muted); }
.doc-section { margin-top: 24px; }
.doc-section > h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--accent); }
.doc-stage { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.doc-time { font-family: var(--serif); font-weight: 600; color: var(--green); font-size: 1.1rem; }
.doc-stage h4 { font-size: 1.02rem; }
.doc-stage .meta { font-size: .78rem; font-weight: 700; color: var(--muted); margin: 4px 0 0; }
.doc-stage .desc { font-size: .9rem; color: var(--muted); margin: 6px 0 0; }
.doc-stage .activity { margin-top: 10px; background: var(--cream); border-radius: 10px; padding: 14px; font-size: .88rem; display: grid; gap: 6px; }
.doc-stage .activity > b { color: var(--green); font-size: .95rem; }
.doc-stage .activity p { margin: 0; }
.doc-stage .activity ul { margin: 0; padding-left: 1.2em; display: grid; gap: 3px; }
.doc-note p { margin: 0; font-size: .9rem; }
.doc-note .doc-time { color: var(--accent); }
.doc-menu { padding: 10px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.doc-menu ul { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 3px; font-size: .92rem; }
.doc-qty { margin-top: 12px; padding: 14px 16px; background: var(--cream); border-radius: 10px; font-size: .9rem; break-inside: avoid; }
.doc-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.doc-check li { position: relative; padding-left: 26px; }
.doc-check li::before { content: ""; position: absolute; left: 0; top: 3px; width: 15px; height: 15px; border: 1.5px solid var(--green); border-radius: 3px; }
.doc-check li.is-done { color: var(--muted); }
.doc-check li.is-done::after { content: "✓"; position: absolute; left: 3px; top: -2px; color: var(--accent); font-weight: 800; }
.final-block { margin-top: 34px; display: grid; gap: 24px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; background: var(--green-deep); color: rgba(255, 255, 255, .85); border-radius: 18px; padding: clamp(20px, 4vw, 36px); }
.final-block img { border-radius: 14px; }
.final-block h2 { color: #fff; font-size: 1.35rem; margin-bottom: 10px; }
.final-block p { font-size: .92rem; }
.feedback-email { color: var(--gold); overflow-wrap: anywhere; }

/* ---------- Админка ---------- */
.admin { padding: 26px 0 10px; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.admin-tabs a { padding: 10px 16px; font-weight: 700; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.admin-tabs a.is-active { color: var(--green); border-color: var(--accent); }
.dot-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 20px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; }
.stats b { font-family: var(--serif); font-size: 1.7rem; color: var(--green); }
.stats span { font-size: .8rem; color: var(--muted); }
.search { display: flex; gap: 8px; margin-bottom: 14px; max-width: 480px; }
.search input { min-height: 40px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--cream); }
.table tr.is-blocked td { opacity: .6; }
.table tr.is-error td { background: #FFF4F1; }
.table pre { white-space: pre-wrap; font-size: .76rem; background: #fff; padding: 8px; border-radius: 6px; margin: 6px 0 0; }
.table details summary { cursor: pointer; color: var(--muted); font-size: .78rem; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.tag-bad { background: var(--pink); color: var(--accent); }
.row-action { display: flex; gap: 6px; align-items: center; margin: 0; }
.row-action select { min-height: 36px; padding: 4px 8px; font-size: .82rem; width: auto; }
.admin-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 18px; align-items: start; }
.settings { display: grid; gap: 16px; }
.settings .card { display: grid; gap: 14px; }
.settings-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, rgba(247, 241, 232, 0)); }
.settings-save .btn { box-shadow: var(--shadow); }
.copy-field { display: grid; gap: 4px; }
.copy-field span { font-weight: 700; font-size: .85rem; color: var(--green); }
.copy-field code { display: block; padding: 10px 12px; background: #fff; border: 1px dashed var(--gold); border-radius: 8px; font-size: .85rem; overflow-wrap: anywhere; user-select: all; }
.field-s { max-width: 200px; }
.notice-card { background: var(--green-soft); border: 1px solid rgba(31, 58, 46, .25); border-radius: 14px; padding: 18px 22px; margin-bottom: 20px; }
.notice-card h2 { font-size: 1.2rem; margin-bottom: 10px; }
.notice-card .kv { margin-bottom: 8px; }
.pass { font-size: 1.05rem; background: #fff; padding: 2px 8px; border-radius: 6px; user-select: all; }

/* ---------- Мобильные ---------- */
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .topnav { gap: 14px; font-size: .8rem; }
  .stage { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .stage-time { display: flex; align-items: baseline; gap: 10px; justify-content: flex-start; text-align: left; padding: 6px 12px; }
  .stage-time b { font-size: 1.15rem; }
  .guests-top, .final-block { grid-template-columns: 1fr; }
  .assign-row { grid-template-columns: 1fr; gap: 6px; }
  .party-hero-side { justify-items: start; }
  .party-actions { width: 100%; }
  .party-actions .btn { flex: 1 1 auto; }
  .wizard { padding: 22px 18px; border-radius: 16px; }
  .wz-row { grid-template-columns: 1fr; }
  .wz-nav .btn { min-width: 0; flex: 1; }
  .option-head { padding-left: 10px; }
  .option-toggle { padding: 0 8px; }
  .option-toggle-label { display: none; }
  .doc-stage { grid-template-columns: 50px 1fr; gap: 10px; }
  .panel-next .btn { width: 100%; }
  .tab { padding: 10px 12px 12px; font-size: .84rem; }
}

/* ---------- Печать: только документ «Итог» ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; display: block; font-size: 11pt; }
  .topbar, .site-foot, .party-hero, .summary-actions, .summary-tip, .final-block, .form-alert, .flash, .skip-link { display: none !important; }
  .party-body { padding: 0; }
  .wrap { width: 100%; }
  .print-doc { border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  .doc-stage .activity, .doc-qty { background: #f6f3ee; }
  a { color: inherit; text-decoration: none; }
  .chip-link { border: 0; padding: 0; background: none; text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
