/* Мини-приложение Светлицы. Стиль «Парной»: ночь, лампа, мёд. Одна тёмная тема — так задумано. */
:root {
  --bg: #17100d; --bg2: #221813; --deep: #0e0907; --fg: #f5ede3; --soft: rgba(245,237,227,.66);
  --acc: #e0a861; --acc-fg: #17100d; --line: rgba(245,237,227,.13); --card: rgba(255,244,230,.05); --ok: #9cc58a; --bad: #f0a08a;
  --hf: "Monomakh", Georgia, serif; --bf: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --bar: 52px; --navh: 68px; --top: max(env(safe-area-inset-top, 0px), var(--tg-top, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--bf); font-weight: 300; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--hf); font-weight: 400; margin: 0; line-height: 1.08; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--soft); font-size: 13.5px; }

/* Шапка и меню */
.bar { position: fixed; inset: 0 0 auto; z-index: 40; height: calc(var(--bar) + var(--top)); padding: var(--top) 14px 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, var(--bg) 70%, rgba(23,16,13,0)); }
.bar b { font-family: var(--hf); font-weight: 400; font-size: 22px; }
.bar-back { position: absolute; left: 8px; bottom: 6px; width: 40px; height: 40px; border: 0; background: transparent; color: var(--acc); font-size: 30px; line-height: 1; }
.nav { position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(16,11,8,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.nav button { border: 0; background: transparent; color: var(--soft); font-size: 11px; display: grid; justify-items: center; gap: 3px; padding: 4px 0; transition: color .25s; }
.nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav button[aria-current="true"] { color: var(--acc); }
.nav .ember-tab i { margin-top: -26px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, #ffb066, #d58a43 60%, #9c5a24); color: var(--acc-fg); box-shadow: 0 0 0 4px var(--bg), 0 0 26px rgba(255,128,48,.55); animation: emberPulse 3.6s ease-in-out infinite; }
.nav .ember-tab svg { width: 26px; height: 26px; stroke-width: 1.8; }
.nav .ember-tab[aria-current="true"] { color: var(--fg); }
@keyframes emberPulse { 50% { box-shadow: 0 0 0 4px var(--bg), 0 0 40px rgba(255,128,48,.8); } }
.badge { position: relative; display: inline-grid; }
.badge[data-n]::after { content: attr(data-n); position: absolute; top: -5px; right: -10px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--acc); color: var(--acc-fg); font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }

/* Экраны и переходы между ними */
#views { position: relative; min-height: 100vh; }
.view { padding: calc(var(--bar) + var(--top) + 4px) 16px calc(var(--navh) + 30px + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin: 0 auto; }
.view.in { animation: viewIn .55s cubic-bezier(.2,.7,.2,1) both; }
.view.in.back { animation-name: viewBack; }
@keyframes viewIn { from { opacity: 0; transform: translateX(28px); filter: blur(6px); } }
@keyframes viewBack { from { opacity: 0; transform: translateX(-28px); filter: blur(6px); } }
.rise > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 30; pointer-events: none; }

/* Кнопки */
.big { position: relative; isolation: isolate; display: block; width: 100%; margin-top: 14px; border: 0; border-radius: 16px; padding: 15px; font-size: 15px; font-weight: 600; background: linear-gradient(180deg, #ebb56c, #c98a45); color: var(--acc-fg); text-align: center; text-decoration: none; }
.big:not(.ghost):not(:disabled)::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; z-index: -1; pointer-events: none; box-shadow: 0 0 18px 2px rgba(255,128,48,.55), 0 0 46px 6px rgba(255,128,48,.2); opacity: .3; animation: ember 4.2s ease-in-out infinite; }
@keyframes ember { 0%, 100% { opacity: .25; } 38% { opacity: .8; } 52% { opacity: .5; } 70% { opacity: 1; } }
.big.ghost { background: rgba(14,9,7,.35); color: var(--fg); border: 1px solid var(--line); }
.big:disabled { opacity: .45; cursor: default; }
.big + .big { margin-top: 10px; }
.link { border: 0; background: none; color: var(--acc); padding: 0; font-weight: 500; }

/* Главная */
.hero { position: relative; isolation: isolate; overflow: hidden; margin: calc(-1 * (var(--bar) + var(--top) + 4px)) -16px 0; min-height: 470px; padding: calc(var(--bar) + 60px) 20px 24px; display: flex; flex-direction: column; justify-content: flex-end; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("img/hero.jpg") center 30% / cover; transform-origin: 60% 35%; animation: kb 22s ease-in-out infinite alternate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--bg) 3%, rgba(23,16,13,.55) 45%, rgba(23,16,13,.25)); }
@keyframes kb { from { transform: scale(1.03); } to { transform: scale(1.16) translate(-2%, -1.5%); } }
.hero small { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); font-weight: 500; }
.hero h1 { font-size: 54px; margin-top: 6px; }
.hero p { color: rgba(245,237,227,.85); margin-top: 8px; max-width: 34ch; font-size: 15.5px; }
.sec-title { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 12px; }
.sec-title h2 { font-size: 26px; }
.next-card { margin-top: 16px; border-radius: 20px; padding: 16px; background: linear-gradient(150deg, #3a2516, #1c120d); border: 1px solid rgba(224,168,97,.35); display: grid; gap: 6px; text-align: left; width: 100%; color: inherit; }
.next-card small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); font-weight: 500; display: flex; justify-content: space-between; gap: 8px; }
.next-card b { font-family: var(--hf); font-weight: 400; font-size: 25px; line-height: 1.1; }
.next-card span { color: var(--soft); font-size: 13.5px; }
/* Разделы главной: каждый со своим оформлением */
.sections { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sc { position: relative; isolation: isolate; overflow: hidden; border: 0; border-radius: 22px; text-align: left; color: var(--fg); padding: 16px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; transition: transform .25s; }
.sc:active { transform: scale(.98); }
.sc b { font-family: var(--hf); font-weight: 400; font-size: 25px; line-height: 1.05; }
.sc span { font-size: 12.5px; color: rgba(245,237,227,.78); }
.sc.photo::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--img) center / cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.sc.photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(14,9,7,.92), rgba(14,9,7,.15) 70%); }
.sc.photo:hover::before { transform: scale(1.06); }
.sc.wide { grid-column: 1 / -1; min-height: 190px; }
.sc.wide b { font-size: 32px; }
.sc.cert { background: linear-gradient(135deg, #f3e2c4, #d9ae6e); color: #2a1a10; box-shadow: inset 0 0 0 5px rgba(42,26,16,.08), inset 0 0 0 6px rgba(42,26,16,.28); }
.sc.cert span { color: #5c4027; }
.sc.cert i { position: absolute; top: 14px; right: 14px; font-style: normal; font-size: 28px; }
.sc.glass { background: linear-gradient(160deg, rgba(224,168,97,.16), rgba(224,168,97,.03)); border: 1px solid rgba(224,168,97,.28); min-height: 150px; padding-top: 54px; }
.sc.glass svg { position: absolute; top: 14px; left: 16px; width: 28px; height: 28px; fill: none; stroke: var(--acc); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sc.bonus { grid-column: 1 / -1; min-height: 0; background: radial-gradient(120% 140% at 100% 0%, rgba(255,140,60,.28), transparent 60%), #1f1510; border: 1px solid rgba(224,168,97,.3); flex-direction: row; align-items: center; justify-content: space-between; }
.stamps { display: flex; gap: 6px; }
.stamps i { width: 22px; height: 22px; border-radius: 50%; border: 1px dashed rgba(224,168,97,.55); }
.stamps i.on { border: 0; background: radial-gradient(circle at 50% 60%, #ffb066, #c9752f); box-shadow: 0 0 12px rgba(255,128,48,.6); }

/* Списки и карточки */
.pcards { display: grid; gap: 12px; }
.pcard { position: relative; isolation: isolate; overflow: hidden; border: 0; border-radius: 22px; min-height: 170px; padding: 16px; text-align: left; color: var(--fg); display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.pcard::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--img) center / cover; }
.pcard::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(14,9,7,.94), rgba(14,9,7,.1) 75%); }
.pcard small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); font-weight: 500; }
.pcard b { font-family: var(--hf); font-weight: 400; font-size: 27px; line-height: 1.05; }
.pcard em { font-style: normal; font-weight: 600; font-size: 14px; }
.hint-card { width: 100%; border: 1px solid rgba(224,168,97,.35); background: linear-gradient(120deg, rgba(224,168,97,.16), rgba(224,168,97,.03)); border-radius: 18px; padding: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; color: inherit; margin-bottom: 12px; }
.hint-card b { display: block; font-weight: 600; }
.hint-card span { font-size: 12.5px; color: var(--soft); }
.prog-top { position: relative; isolation: isolate; overflow: hidden; margin: calc(-1 * (var(--bar) + var(--top) + 4px)) -16px 14px; min-height: 360px; display: flex; align-items: flex-end; padding: 18px; }
.prog-top::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--img) center / cover; animation: kb 26s ease-in-out infinite alternate; }
.prog-top::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--bg), transparent 55%); }
.prog-top small { display: block; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); font-weight: 500; margin-bottom: 4px; }
.prog-top h1 { font-size: 36px; }
.ppass { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.ppass div { border: 1px solid var(--line); border-radius: 14px; padding: 9px 11px; }
.ppass span { display: block; font-size: 11px; color: var(--soft); text-transform: uppercase; letter-spacing: .08em; }
.ppass b { font-weight: 600; font-size: 15px; }
.lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--acc); margin: 20px 0 8px; font-weight: 500; }
.incl { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.incl li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 14px; }
.incl li::before { content: "✓"; color: var(--acc); font-weight: 700; }
.incl li.cond::before { content: "•"; }
.incl small { color: var(--soft); }
.who-row { display: flex; gap: 10px; align-items: center; border: 0; background: transparent; padding: 0; color: inherit; text-align: left; }
.who-row i { width: 40px; height: 40px; border-radius: 50%; background: url("img/master.jpg") center 25% / cover; border: 1px solid rgba(224,168,97,.5); flex: none; }
.revs-ph { border: 1px dashed var(--line); border-radius: 14px; padding: 12px; color: var(--soft); font-size: 13px; }
.sticky { position: sticky; bottom: calc(var(--navh) + env(safe-area-inset-bottom, 0px)); margin: 18px -16px 0; padding: 12px 16px 14px; background: linear-gradient(0deg, var(--bg) 72%, rgba(23,16,13,0)); display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; z-index: 5; }
.sticky small { display: block; color: var(--soft); font-size: 11.5px; }
.sticky b { font-weight: 600; font-size: 16px; white-space: nowrap; }
.sticky .big { margin: 0; }

/* Календарь */
.cal { border: 1px solid var(--line); border-radius: 20px; padding: 12px; background: var(--card); }
.cal header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal header b { font-family: var(--hf); font-weight: 400; font-size: 23px; }
.cal header button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: transparent; }
.cal header button:disabled { opacity: .25; }
.cal .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .wd { font-size: 11px; color: var(--soft); }
.cal .d { aspect-ratio: 1; border: 0; border-radius: 11px; background: transparent; color: rgba(245,237,227,.25); font-size: 14px; display: grid; place-items: center; position: relative; padding: 0; }
.cal .d.free { color: var(--fg); background: rgba(224,168,97,.11); font-weight: 500; }
.cal .d.free::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--acc); }
.cal .d.full { color: rgba(245,237,227,.4); text-decoration: line-through; }
.cal .d[aria-pressed="true"] { background: var(--acc); color: var(--acc-fg); box-shadow: 0 0 16px rgba(255,128,48,.4); }
.cal .d[aria-pressed="true"]::after { background: var(--acc-fg); }
.picked { margin-top: 12px; display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid rgba(224,168,97,.4); border-radius: 16px; padding: 11px 13px; }
.picked span { color: var(--soft); font-size: 12.5px; }
.picked .wl { border: 0; border-radius: 11px; padding: 9px 12px; font-size: 13px; font-weight: 600; background: rgba(224,168,97,.16); color: var(--acc); }
.picked .wl:disabled { color: var(--ok); background: rgba(156,197,138,.12); }

/* Формы */
.field { display: grid; gap: 5px; font-size: 12.5px; color: var(--soft); margin-top: 12px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); background: rgba(0,0,0,.25); border-radius: 14px; padding: 12px 13px; font-size: 15px; color: var(--fg); }
.field textarea { resize: vertical; min-height: 90px; }
.check { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--acc); }
.err { color: var(--bad); font-size: 13px; min-height: 1.3em; margin-top: 8px; }
.sum { margin-top: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); padding: 13px; display: grid; gap: 5px; font-size: 14px; }
.sum div { display: flex; justify-content: space-between; gap: 10px; }
.sum span { color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 8px 13px; font-size: 13px; }
.chips button[aria-pressed="true"] { background: rgba(224,168,97,.16); border-color: var(--acc); color: var(--acc); }

/* Подбор */
.steps { display: flex; gap: 4px; margin-bottom: 16px; }
.steps i { flex: 1; height: 3px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--acc); box-shadow: 0 0 10px rgba(255,128,48,.5); }
.opts { display: grid; gap: 8px; margin-top: 16px; }
.opt { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; color: inherit; transition: border-color .2s, background .2s; }
.opt:hover, .opt:active { border-color: rgba(224,168,97,.55); background: rgba(224,168,97,.08); }
.opt b { font-weight: 600; font-size: 15.5px; }
.opt span { grid-column: 1; color: var(--soft); font-size: 12.5px; }
.opt::after { content: "›"; grid-row: 1 / 3; grid-column: 2; color: var(--acc); font-size: 22px; }
.match { margin-top: 14px; border-radius: 22px; overflow: hidden; border: 1px solid rgba(224,168,97,.45); background: var(--card); }
.match .ph { aspect-ratio: 16 / 10; background: var(--img) center / cover; }
.match .in { padding: 15px; }
.match .tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); font-weight: 500; }
.match h2 { font-size: 30px; margin-top: 4px; }
.why { margin-top: 8px; border-left: 2px solid var(--acc); padding-left: 10px; color: rgba(245,237,227,.86); font-size: 13.5px; }

/* Готово */
.done { text-align: center; padding-top: 30px; display: grid; justify-items: center; gap: 8px; }
.ok-ring { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(224,168,97,.35), rgba(224,168,97,.08) 70%); box-shadow: 0 0 40px rgba(255,128,48,.35); animation: ring .6s cubic-bezier(.2,.7,.2,1) both, glow 3.6s 1s ease-in-out infinite; }
.ok-ring svg { width: 40px; height: 40px; stroke: var(--acc); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: tick .5s .3s ease forwards; }
@keyframes ring { from { transform: scale(.6); opacity: 0; } }
@keyframes tick { to { stroke-dashoffset: 0; } }
@keyframes glow { 50% { box-shadow: 0 0 70px rgba(255,128,48,.55); } }
.done h1 { font-size: 34px; margin-top: 8px; }
.done .sum { text-align: left; width: 100%; }

/* Мастера, сертификат, вопросы, бонусы */
.mst { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 9px; margin-top: 10px; }
.mst i { aspect-ratio: 1; border-radius: 15px; background: var(--img) center 25% / cover, repeating-linear-gradient(135deg, rgba(224,168,97,.08) 0 8px, transparent 8px 16px), #221813; display: grid; place-items: center; font-style: normal; font-family: var(--hf); font-size: 32px; color: var(--acc); }
.mst b { display: block; font-family: var(--hf); font-weight: 400; font-size: 21px; line-height: 1.1; }
.mst small { display: block; color: var(--acc); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-top: 2px; }
.mst span { display: block; color: var(--soft); font-size: 12.5px; margin-top: 4px; }
.certcard { aspect-ratio: 16 / 10; border-radius: 20px; padding: 18px; display: grid; align-content: space-between; color: #2a1a10; background: linear-gradient(135deg, #f3e2c4, #dcb171); box-shadow: inset 0 0 0 6px rgba(42,26,16,.08), inset 0 0 0 7px rgba(42,26,16,.28), 0 20px 50px rgba(0,0,0,.4); margin-bottom: 6px; }
.certcard b { font-family: var(--hf); font-weight: 400; font-size: 30px; }
.certcard .to { font-family: var(--hf); font-size: 22px; }
.certcard span { font-size: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; margin-top: 8px; background: var(--card); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: "+"; color: var(--acc); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--soft); margin-top: 8px; font-size: 14px; }
.loy { border-radius: 24px; padding: 20px; background: radial-gradient(120% 140% at 100% 0%, rgba(255,140,60,.3), transparent 60%), linear-gradient(160deg, #2c1c12, #160f0b); border: 1px solid rgba(224,168,97,.35); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.loy small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); font-weight: 500; }
.loy h2 { font-size: 30px; margin: 6px 0 14px; }
.loy .stamps i { width: 34px; height: 34px; }
.loy p { color: var(--soft); margin-top: 12px; font-size: 13.5px; }
.list { display: grid; gap: 8px; }
.row { border: 1px solid var(--line); border-radius: 16px; padding: 12px 13px; background: var(--card); display: grid; gap: 4px; }
.row header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.row b { font-weight: 600; }
.row small { color: var(--soft); font-size: 12.5px; }
.row .acts { display: flex; gap: 8px; margin-top: 6px; }
.row .acts button { border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 7px 12px; font-size: 13px; }
.row .acts button.y { border-color: rgba(156,197,138,.5); color: var(--ok); }
.row .acts button.n { border-color: rgba(240,160,138,.4); color: var(--bad); }
.st { font-size: 11.5px; border-radius: 99px; padding: 2px 9px; white-space: nowrap; border: 1px solid; }
.st.wait { color: #e6c27a; border-color: rgba(230,194,122,.35); }
.st.paid, .st.confirmed { color: var(--ok); border-color: rgba(156,197,138,.4); }
.st.cancelled { color: var(--bad); border-color: rgba(240,160,138,.35); }
.st.done { color: var(--soft); border-color: var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.stats b { display: block; font-family: var(--hf); font-weight: 400; font-size: 30px; color: var(--acc); }
.stats span { font-size: 11.5px; color: var(--soft); }
.drow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.drow input { flex: 1; min-width: 0; border: 1px solid var(--line); background: rgba(0,0,0,.25); border-radius: 12px; padding: 9px 10px; color: var(--fg); }
.stepper { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.stepper button { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--card); font-size: 18px; }
.stepper b { min-width: 22px; text-align: center; font-weight: 600; }
.del { border: 0; background: transparent; color: var(--soft); width: 30px; height: 30px; border-radius: 8px; font-size: 16px; }
.empty { text-align: center; color: var(--soft); padding: 40px 10px; display: grid; gap: 10px; justify-items: center; }
/* Экран въезжает сбоку — не даём ему на миг расширить страницу (clip не ломает sticky) */
#views { overflow-x: clip; }
/* Широкий экран (Telegram на компьютере, браузер): меню и «назад» держатся колонки, а не краёв окна */
@media (min-width: 620px) {
  .nav { padding-left: calc(50% - 280px); padding-right: calc(50% - 280px); }
  .bar-back { left: calc(50% - 288px); }
}
.toast { position: fixed; left: 50%; bottom: calc(var(--navh) + 18px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 50; background: var(--fg); color: var(--bg); border-radius: 99px; padding: 10px 16px; font-size: 13.5px; font-weight: 500; max-width: 90vw; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; pointer-events: none; }
.toast.on { opacity: 1; transform: none; }
.loader { display: grid; place-items: center; min-height: 60vh; color: var(--soft); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── 05.2: логотип, слайды программ, даты, мастера, QR, карта гостя ── */
.hero .logo { width: 118px; height: auto; margin: 0 0 8px -6px; filter: drop-shadow(0 4px 18px rgba(0,0,0,.6)); animation: logoIn 1.2s cubic-bezier(.2,.7,.2,1) both; }
@keyframes logoIn { from { opacity: 0; transform: translateY(-8px) scale(.96); filter: blur(4px); } }
.lead { font-size: 15.5px; color: rgba(245,237,227,.88); }
.hint-ic svg { width: 26px; height: 26px; fill: none; stroke: var(--acc); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dchips { display: flex; gap: 8px; flex-wrap: wrap; }
.dchip { border: 1px solid rgba(224,168,97,.45); background: rgba(224,168,97,.1); border-radius: 14px; padding: 9px 12px; text-align: left; color: inherit; display: grid; gap: 1px; transition: transform .2s, background .2s; }
.dchip:active { transform: scale(.97); background: rgba(224,168,97,.2); }
.dchip b { font-weight: 600; font-size: 14.5px; }
.dchip span { font-size: 12px; color: var(--soft); }
.slides { margin: 16px -16px 4px; }
.slides .strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px; scrollbar-width: none; }
.slides .strip::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 86%; max-width: 420px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; scroll-snap-align: center; border: 1px solid var(--line); background: #1c130e; }
.sdots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.sdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background .3s, width .3s; }
.sdots i.on { width: 18px; border-radius: 4px; background: var(--acc); }
details.long { margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--card); }
details.long summary { cursor: pointer; color: var(--acc); font-weight: 500; list-style: none; }
details.long summary::after { content: " ›"; }
details.long[open] summary::after { content: ""; }
details.long p { margin-top: 10px; color: rgba(245,237,227,.86); font-size: 14.5px; }
.who-row { width: 100%; margin-top: 8px; }
.who-row i { width: 46px; height: 46px; background-position: center 22%; background-size: cover; }
.incl em { font-style: normal; color: var(--acc); }
button.mst { width: 100%; text-align: left; color: inherit; grid-template-columns: 92px 1fr auto; }
.mst i { background-size: cover; background-position: center 22%; }
.mst em { font-style: normal; color: var(--acc); font-size: 22px; padding-right: 6px; }
.mtop { min-height: 440px; }
.mtop::before { background-position: center 20%; }
.qr { margin-top: 16px; border: 1px solid rgba(224,168,97,.4); border-radius: 20px; padding: 16px; text-align: center; background: radial-gradient(100% 120% at 50% 0%, rgba(224,168,97,.14), transparent 60%), var(--card); display: grid; justify-items: center; gap: 10px; }
.qr img { width: min(240px, 70vw); aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 14px; padding: 10px; }
.qr p { color: rgba(245,237,227,.86); font-size: 13.5px; max-width: 32ch; }
.qr small { color: var(--soft); font-size: 12px; }
.qr .big { margin-top: 0; }
.qr-ph { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(224,168,97,.14); }
.qr-ph svg { width: 34px; height: 34px; fill: none; stroke: var(--acc); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
b.acc { color: var(--acc); }
.gift-link { display: block; margin: 16px auto 0; font-size: 14px; }
.why em { font-style: normal; color: var(--acc); }
.empty.center { min-height: 55vh; align-content: center; }
.stats div.hot { border-color: rgba(224,168,97,.6); background: rgba(224,168,97,.1); }
.st.check { color: var(--acc); border-color: rgba(224,168,97,.5); }
/* Карта гостя: 3D, поворачивается за пальцем, металл по уровню */
.mcard-wrap { perspective: 900px; margin-top: 4px; }
.mcard { position: relative; aspect-ratio: 1.586; border-radius: 22px; overflow: hidden; transform-style: preserve-3d; transition: transform .25s ease-out; animation: cardIn 1s cubic-bezier(.2,.7,.2,1) both, floaty 6s 1s ease-in-out infinite; box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.12); --sx: 30%; --sy: 20%; }
@keyframes cardIn { from { opacity: 0; transform: rotateX(30deg) translateY(30px) scale(.94); } }
@keyframes floaty { 50% { translate: 0 -4px; } }
.mcard.wood { background: repeating-linear-gradient(95deg, rgba(0,0,0,.12) 0 3px, transparent 3px 11px), radial-gradient(120% 140% at 100% 0%, rgba(255,140,60,.35), transparent 55%), linear-gradient(150deg, #5a3820, #2a180d 60%, #1a0f08); }
.mcard.copper { background: radial-gradient(120% 140% at 100% 0%, rgba(255,190,120,.5), transparent 55%), linear-gradient(150deg, #b8703c, #6e3a18 55%, #3a1d0c); }
.mcard.gold { background: radial-gradient(120% 140% at 100% 0%, rgba(255,240,200,.6), transparent 55%), linear-gradient(150deg, #f1cf8a, #b8873e 50%, #6b4a1c); }
.mc-face { position: absolute; inset: 0; padding: 18px; display: grid; grid-template-rows: auto 1fr auto; color: #fff7ea; }
.mc-face img { width: 74px; opacity: .92; }
.mc-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; align-self: end; }
.mc-row small { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.mc-row b { font-family: var(--hf); font-weight: 400; font-size: 26px; line-height: 1.05; }
.mc-row span { font-size: 12px; letter-spacing: .12em; opacity: .8; white-space: nowrap; }
.mc-stamps { position: absolute; top: 18px; right: 18px; display: flex; gap: 5px; }
.mc-stamps i { width: 22px; height: 22px; border-radius: 50%; border: 1px dashed rgba(255,247,234,.6); display: grid; place-items: center; font-style: normal; font-size: 11px; }
.mc-stamps i.on { border: 0; background: radial-gradient(circle at 50% 60%, #ffd08a, #e07a2a); box-shadow: 0 0 12px rgba(255,140,50,.8); }
.mc-shine { position: absolute; inset: 0; background: radial-gradient(60% 50% at var(--sx) var(--sy), rgba(255,255,255,.28), transparent 60%); mix-blend-mode: soft-light; pointer-events: none; }
.mc-title { font-size: 28px; margin: 18px 0 10px; }
.friend { display: flex; align-items: center; gap: 12px; border: 1px solid rgba(224,168,97,.4); border-radius: 16px; padding: 12px 14px; background: rgba(224,168,97,.08); }
.friend b { font-family: var(--hf); font-weight: 400; font-size: 30px; color: var(--acc); white-space: nowrap; }
.friend span { font-size: 13.5px; color: rgba(245,237,227,.86); }
/* Кнопки отзываются на нажатие */
.big:active:not(:disabled), .opt:active, .pcard:active, .sc:active { transform: scale(.98); }
.big, .pcard { transition: transform .15s; }
.pcard::before { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.pcard:hover::before { transform: scale(1.05); }
/* Сертификат — макет Юли, переворачивается */
.cert3d { perspective: 1100px; width: min(300px, 78vw); margin: 0 auto; cursor: pointer; }
.cert-in { position: relative; aspect-ratio: 436 / 612; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,.7,.2,1); animation: cardIn 1s cubic-bezier(.2,.7,.2,1) both; }
.cert3d.flipped .cert-in { transform: rotateY(180deg); }
.cside { position: absolute; inset: 0; border-radius: 14px; background: center / cover; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.55); overflow: hidden; }
.cside.backside { transform: rotateY(180deg); }
.cert-over { position: absolute; inset: auto 0 0; padding: 50px 16px 18px; text-align: center; background: linear-gradient(0deg, rgba(14,9,7,.92), transparent); color: #fff7ea; display: grid; gap: 2px; }
.cert-over small { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.cert-over b { font-family: var(--hf); font-weight: 400; font-size: 22px; line-height: 1.1; }
.cert-over span { font-size: 12.5px; opacity: .85; }
/* Банная помощница — русская женщина в платке (по совету Саши вместо «магии») */
.baba { width: 84px; height: auto; flex: none; animation: babaIn .9s cubic-bezier(.2,.7,.2,1) both, sway 5s 1s ease-in-out infinite; transform-origin: 50% 100%; }
.baba.sm { width: 52px; animation: sway 5s ease-in-out infinite; }
@keyframes babaIn { from { opacity: 0; transform: translateY(10px) scale(.9); } }
@keyframes sway { 50% { transform: rotate(-3deg); } }
.baba-say { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.baba-say p { position: relative; background: rgba(224,168,97,.12); border: 1px solid rgba(224,168,97,.35); border-radius: 16px 16px 16px 4px; padding: 10px 12px; font-size: 13.5px; color: rgba(245,237,227,.9); margin-bottom: 14px; }
/* Фото в подборе медленно приближается, как на главной */
.match .ph { position: relative; overflow: hidden; background: none; }
.match .ph::before { content: ""; position: absolute; inset: 0; background: var(--img) center / cover; transform-origin: 50% 40%; animation: kb 22s ease-in-out infinite alternate; }
/* Карта по ступеням: 0 искра … 5 солнце */
.mcard.st-0 { background: repeating-linear-gradient(95deg, rgba(0,0,0,.14) 0 3px, transparent 3px 11px), linear-gradient(150deg, #3b2616, #1d120a 60%, #120b07); }
.mcard.st-1 { background: repeating-linear-gradient(95deg, rgba(0,0,0,.12) 0 3px, transparent 3px 11px), radial-gradient(90% 110% at 100% 0%, rgba(255,120,40,.25), transparent 55%), linear-gradient(150deg, #4d2f1a, #24150b 60%); }
.mcard.st-2 { background: repeating-linear-gradient(95deg, rgba(0,0,0,.1) 0 3px, transparent 3px 11px), radial-gradient(110% 130% at 100% 0%, rgba(255,140,60,.38), transparent 55%), linear-gradient(150deg, #6a3f20, #2e1a0c 60%); }
.mcard.st-3 { background: radial-gradient(120% 140% at 100% 0%, rgba(255,170,90,.45), transparent 55%), linear-gradient(150deg, #a5612f, #5c3014 55%, #2e170a); }
.mcard.st-4 { background: radial-gradient(120% 140% at 100% 0%, rgba(255,200,130,.55), transparent 55%), linear-gradient(150deg, #c88445, #7a4a1e 55%, #3e250e); }
.mcard.st-5 { background: radial-gradient(120% 140% at 100% 0%, rgba(255,245,210,.65), transparent 55%), linear-gradient(150deg, #f3d48f, #c0903f 50%, #6b4a1c); box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 50px rgba(255,190,90,.35), inset 0 0 0 1px rgba(255,255,255,.25); }
.mc-sun { position: absolute; left: 50%; bottom: 34%; width: 62%; translate: -50% 0; pointer-events: none; }
.mc-sun line { stroke: rgba(255,240,215,.16); stroke-width: 2.2; stroke-linecap: round; }
.mc-sun line.on { stroke: #ffd690; filter: drop-shadow(0 0 3px rgba(255,170,70,.9)); animation: rayOn .8s var(--d) both; }
@keyframes rayOn { from { stroke: rgba(255,240,215,.16); filter: none; } }
.mc-sun .disc { fill: rgba(255,214,144,.12); stroke: rgba(255,240,215,.35); stroke-width: 1.4; }
.mcard.st-3 .mc-sun .disc, .mcard.st-4 .mc-sun .disc { fill: rgba(255,214,144,.35); }
.mcard.st-5 .mc-sun .disc { fill: #ffe3a6; filter: drop-shadow(0 0 8px rgba(255,200,100,.9)); }
.mc-sun .hor { stroke: rgba(255,240,215,.3); stroke-width: 1; }
.mc-face { z-index: 1; }
.mc-path { display: flex; justify-content: space-between; gap: 4px; margin-top: 14px; }
.mc-path span { flex: 1; display: grid; justify-items: center; gap: 5px; font-size: 10.5px; color: var(--soft); text-align: center; line-height: 1.15; }
.mc-path i { width: 12px; height: 12px; border-radius: 50%; border: 1px dashed rgba(224,168,97,.5); }
.mc-path .past i { border: 0; background: #c9752f; }
.mc-path .now { color: var(--acc); font-weight: 600; }
.mc-path .now i { border: 0; background: radial-gradient(circle at 50% 60%, #ffd08a, #e07a2a); box-shadow: 0 0 10px rgba(255,140,50,.9); }
/* Подарки за 5-й визит — фото Юли */
.gifts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gifts figure { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid rgba(224,168,97,.35); background: var(--card); }
.gifts img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.gifts figure:hover img { transform: scale(1.05); }
.gifts figcaption { padding: 9px 11px 11px; font-family: var(--hf); font-size: 18px; line-height: 1.1; }
.gifts small { display: block; font-family: var(--bf); font-size: 11.5px; color: var(--soft); margin-top: 3px; }
/* Отзывы гостей — листаются */
.revs { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.revs::-webkit-scrollbar { display: none; }
.rev { flex: 0 0 82%; max-width: 380px; margin: 0; scroll-snap-align: center; border: 1px solid rgba(224,168,97,.3); border-radius: 18px; padding: 14px 15px; background: radial-gradient(120% 100% at 0% 0%, rgba(224,168,97,.12), transparent 60%), var(--card); display: grid; align-content: space-between; gap: 8px; }
.rev blockquote { margin: 0; font-size: 13.5px; line-height: 1.55; color: rgba(245,237,227,.9); }
.rev blockquote::before { content: "«"; font-family: var(--hf); color: var(--acc); font-size: 30px; line-height: 0; vertical-align: -10px; margin-right: 2px; }
.rev figcaption { font-size: 12px; color: var(--acc); }
.home-revs { grid-column: 1 / -1; }
.home-revs .lbl { margin-top: 8px; }
/* Скидки по карте гостя (решение Юли 02.12) */
.mc-disc { position: absolute; right: 16px; bottom: 44px; z-index: 2; font-family: var(--hf); font-size: 30px; color: #fff7ea; text-shadow: 0 0 14px rgba(255,170,70,.9); }
.disc { margin-top: 12px; border: 1px solid rgba(156,197,138,.45); background: rgba(156,197,138,.08); border-radius: 16px; padding: 11px 13px; display: grid; gap: 2px; }
.disc b { color: var(--ok); font-weight: 600; }
.disc span { font-size: 14px; }
.disc small { font-size: 12px; color: var(--soft); }
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tiers div { border: 1px dashed rgba(224,168,97,.4); border-radius: 14px; padding: 10px 6px; text-align: center; display: grid; gap: 2px; }
.tiers b { font-family: var(--hf); font-weight: 400; font-size: 24px; color: var(--soft); }
.tiers span { font-size: 11px; color: var(--soft); }
.tiers div.on { border: 1px solid var(--acc); background: rgba(224,168,97,.12); }
.tiers div.on b { color: var(--acc); }
.friend.six { margin-top: 8px; }
.friend.six b { font-size: 22px; }
.fprog { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; }
.fprog i { width: 22px; height: 22px; border-radius: 50%; border: 1px dashed rgba(224,168,97,.55); }
.fprog i.on { border: 0; background: radial-gradient(circle at 50% 60%, #ffb066, #c9752f); box-shadow: 0 0 10px rgba(255,128,48,.6); }
.fprog span { margin-left: 6px; font-size: 12.5px; color: var(--soft); }
