@font-face { font-family: 'Great Vibes KG'; font-weight: 400; font-display: swap; src: url(fonts/great-vibes-kg.woff2) format('woff2'); }
/* Приглашение-открытка «Той Менеджер»: конверт с восковой печатью → страница с прокруткой.
   Шаблоны задаются переменными на <body data-theme="…">. */
@font-face { font-family: 'Bad Script'; font-weight: 400; font-display: swap; src: url(fonts/bad-script-cyrillic-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Bad Script'; font-weight: 400; font-display: swap; src: url(fonts/bad-script-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Bad Script'; font-weight: 400; font-display: swap; src: url(fonts/bad-script-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Cormorant'; font-weight: 500; font-display: swap; src: url(fonts/cormorant-garamond-cyrillic-ext-500-normal.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Cormorant'; font-weight: 500; font-display: swap; src: url(fonts/cormorant-garamond-cyrillic-500-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant'; font-weight: 500; font-display: swap; src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Cormorant'; font-weight: 600; font-display: swap; src: url(fonts/cormorant-garamond-cyrillic-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Cormorant'; font-weight: 600; font-display: swap; src: url(fonts/cormorant-garamond-cyrillic-600-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant'; font-weight: 600; font-display: swap; src: url(fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 500; font-display: swap; src: url(fonts/cormorant-garamond-cyrillic-ext-500-italic.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 500; font-display: swap; src: url(fonts/cormorant-garamond-cyrillic-500-italic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* Шрифты новых шаблонов (с кыргызскими ө, ү, ң) */
@font-face { font-family: 'Prata'; font-weight: 400; font-display: swap; src: url(fonts/prata-cyrillic-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Prata'; font-weight: 400; font-display: swap; src: url(fonts/prata-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Prata'; font-weight: 400; font-display: swap; src: url(fonts/prata-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Forum'; font-weight: 400; font-display: swap; src: url(fonts/forum-cyrillic-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Forum'; font-weight: 400; font-display: swap; src: url(fonts/forum-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Forum'; font-weight: 400; font-display: swap; src: url(fonts/forum-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Cormorant SC'; font-weight: 600; font-display: swap; src: url(fonts/cormorant-sc-cyrillic-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Cormorant SC'; font-weight: 600; font-display: swap; src: url(fonts/cormorant-sc-cyrillic-600-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant SC'; font-weight: 600; font-display: swap; src: url(fonts/cormorant-sc-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }

/* ---------- Шаблоны ---------- */
body[data-theme="ak-altyn"] {
  --bg: #FBF7EF; --bg2: #F4ECDD; --paper: #FFFDF8; --ink: #3B2F22; --muted: #6F5E49; --focus: #7A5B28;
  --gold1: #9C7531; --gold2: #E3C77E; --gold3: #B48A3E; --line: rgba(156, 117, 49, 0.28);
  --env1: #F3EADB; --env2: #EADFCB; --env3: #E2D4BC; --env-ink: #6A4F22;
  --wax1: #A3263A; --wax2: #6E1222; --wax-ink: #F6D7A7;
  --btn: linear-gradient(135deg, #B38A3D, #D9B867 55%, #A47B32); --btn-ink: #FFFDF6;
  --card: rgba(255, 253, 248, 0.86); --shadow: 0 18px 40px rgba(120, 90, 40, 0.12);
}
body[data-theme="tunku"] {
  --bg: #0F2A25; --bg2: #133730; --paper: #163F37; --ink: #F3EADB; --muted: #B9C3B4; --focus: #F2DA9C;
  --gold1: #C49A4A; --gold2: #F2DA9C; --gold3: #D0A957; --line: rgba(226, 196, 128, 0.3);
  --env1: #17433A; --env2: #1B4C42; --env3: #12382F; --env-ink: #E6C98A;
  --wax1: #D8B25E; --wax2: #9C7428; --wax-ink: #4E3610;
  --btn: linear-gradient(135deg, #B88C3C, #EED394 55%, #B38633); --btn-ink: #1A2C26;
  --card: rgba(22, 63, 55, 0.78); --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

/* Новые шаблоны — в пару к видео-конвертам. Имена — Prata/Forum, заголовки — капителью */
body[data-theme="tun"] {
  --bg: #0D1530; --bg2: #121C3D; --paper: #16214A; --ink: #EFE6D2; --muted: #AEB4C8; --focus: #F2DA9C;
  --gold1: #C49A4A; --gold2: #F4DFA6; --gold3: #D6AE5C; --line: rgba(226, 196, 128, 0.28);
  --env1: #16213F; --env2: #1B2850; --env3: #111A36; --env-ink: #E6C98A;
  --wax1: #EDE5D1; --wax2: #BFB49A; --wax-ink: #6B5428;
  --btn: linear-gradient(135deg, #B88C3C, #F0D69A 55%, #B38633); --btn-ink: #121A35;
  --card: rgba(22, 33, 74, 0.72); --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --f-display: 'Prata'; --f-head: 'Cormorant SC';
}
body[data-theme="ak"] {
  --bg: #F8F3E9; --bg2: #EFE6D5; --paper: #FFFCF6; --ink: #3A2A20; --muted: #6E5E4E; --focus: #7A1E2C;
  --gold1: #8E6A2C; --gold2: #D6B26A; --gold3: #A87F38; --line: rgba(142, 106, 44, 0.26);
  --env1: #F1EADC; --env2: #E9DFCC; --env3: #E0D3BC; --env-ink: #7A1E2C;
  --wax1: #8A2333; --wax2: #5E1020; --wax-ink: #F3D9A8;
  --btn: linear-gradient(135deg, #7A1E2C, #A23446 55%, #6A1626); --btn-ink: #FFF8EE;
  --card: rgba(255, 252, 246, 0.9); --shadow: 0 18px 40px rgba(110, 70, 40, 0.12);
  --f-display: 'Prata'; --f-head: 'Cormorant SC'; --accent: #7A1E2C;
}
body[data-theme="anar"] {
  --bg: #3A0D18; --bg2: #4A1220; --paper: #561727; --ink: #F5E8D8; --muted: #D4B9AE; --focus: #F4DFA6;
  --gold1: #C9A04F; --gold2: #F6E2A8; --gold3: #DDB565; --line: rgba(240, 210, 150, 0.26);
  --env1: #5A1424; --env2: #66192B; --env3: #4A101E; --env-ink: #EFD39A;
  --wax1: #D8B56A; --wax2: #9C7A32; --wax-ink: #4A2A0C;
  --btn: linear-gradient(135deg, #BC9040, #F2D99C 55%, #B48635); --btn-ink: #3A0D18;
  --card: rgba(86, 23, 39, 0.72); --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --f-display: 'Prata'; --f-head: 'Cormorant SC';
}
body[data-theme="jashyl"] {
  --bg: #0D2B25; --bg2: #113A31; --paper: #14443A; --ink: #F1E8D6; --muted: #B5C4B8; --focus: #F2DA9C;
  --gold1: #C49A4A; --gold2: #F2DA9C; --gold3: #D0A957; --line: rgba(226, 196, 128, 0.3);
  --env1: #0F3A31; --env2: #134338; --env3: #0C312A; --env-ink: #E6C98A;
  --wax1: #EEE6D2; --wax2: #C2B79C; --wax-ink: #5A4520;
  --btn: linear-gradient(135deg, #B88C3C, #EED394 55%, #B38633); --btn-ink: #0D2B25;
  --card: rgba(20, 68, 58, 0.72); --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  --f-display: 'Forum'; --f-head: 'Forum'; --ornament: 1;
}

/* Новые шаблоны (22.11): «Бермет» — жемчужно-розовый для бешик тоя, тушоо кесүү, кыз узатуу; «Асман» — небесный для мальчиков
   и дней рождения; «Кийиз» — светлый войлок с красным орнаментом, национальный; «Боз» — спокойный серый для аша */
body[data-theme="bermet"] {
  --bg: #FBF3F0; --bg2: #F5E6E1; --paper: #FFFAF8; --ink: #46302E; --muted: #7C6360; --focus: #A3525E;
  --gold1: #9A5560; --gold2: #CF9098; --gold3: #A9636F; --line: rgba(154, 85, 96, 0.24);
  --env1: #F6E8E3; --env2: #F0DCD6; --env3: #E8D0C9; --env-ink: #8E4A55;
  --wax1: #D7A3A8; --wax2: #A96B74; --wax-ink: #FFF3EE;
  --btn: linear-gradient(135deg, #B9737E, #DDA2A9 55%, #A9636F); --btn-ink: #FFFAF8;
  --card: rgba(255, 250, 248, 0.9); --shadow: 0 18px 40px rgba(150, 90, 90, 0.12);
  --f-display: 'Cormorant'; --f-head: 'Cormorant SC'; --accent: #9A5560;
}
body[data-theme="asman"] {
  --bg: #F2F6FA; --bg2: #E3ECF4; --paper: #FBFDFF; --ink: #22344A; --muted: #5D6E82; --focus: #2F5D8A;
  --gold1: #2C5580; --gold2: #6F97C2; --gold3: #3B6896; --line: rgba(47, 93, 138, 0.22);
  --env1: #E6EEF6; --env2: #DCE6F1; --env3: #D0DCEA; --env-ink: #2F5D8A;
  --wax1: #5D86B0; --wax2: #34587E; --wax-ink: #F2F7FC;
  --btn: linear-gradient(135deg, #34618F, #5D8AB8 55%, #2C5580); --btn-ink: #FBFDFF;
  --card: rgba(251, 253, 255, 0.9); --shadow: 0 18px 40px rgba(40, 70, 110, 0.12);
  --f-display: 'Prata'; --f-head: 'Cormorant SC'; --accent: #2F5D8A;
}
body[data-theme="kiyiz"] {
  --bg: #F6EEE1; --bg2: #EDE1CE; --paper: #FCF7EE; --ink: #3A231C; --muted: #6E5446; --focus: #A3271F;
  --gold1: #A3271F; --gold2: #D2563F; --gold3: #B33A2A; --line: rgba(163, 39, 31, 0.24);
  --env1: #F1E6D4; --env2: #E9DCC6; --env3: #E0D0B6; --env-ink: #A3271F;
  --wax1: #B8322A; --wax2: #7E1A15; --wax-ink: #F6E3C4;
  --btn: linear-gradient(135deg, #A3271F, #C94A35 55%, #8F2019); --btn-ink: #FCF7EE;
  --card: rgba(252, 247, 238, 0.9); --shadow: 0 18px 40px rgba(120, 50, 30, 0.12);
  --f-display: 'Forum'; --f-head: 'Forum'; --accent: #A3271F;
}
body[data-theme="boz"] {
  --bg: #EEEDEA; --bg2: #E4E2DE; --paper: #F7F6F3; --ink: #2F3133; --muted: #66696C; --focus: #3E4246;
  --gold1: #3C4044; --gold2: #7E8286; --gold3: #55595D; --line: rgba(60, 64, 68, 0.2);
  --env1: #E7E5E1; --env2: #DFDDD8; --env3: #D6D3CE; --env-ink: #45494D;
  --wax1: #6E7276; --wax2: #45494D; --wax-ink: #EEEDEA;
  --btn: linear-gradient(135deg, #45494D, #5F6367 55%, #3C4044); --btn-ink: #F7F6F3;
  --card: rgba(247, 246, 243, 0.92); --shadow: 0 18px 40px rgba(40, 40, 40, 0.1);
  --f-display: 'Cormorant'; --f-head: 'Cormorant SC'; --accent: #45494D;
}
body:is([data-theme="bermet"], [data-theme="asman"], [data-theme="kiyiz"], [data-theme="boz"]) .script {
  font-family: var(--f-display), 'Cormorant', Georgia, serif; font-weight: 500; letter-spacing: .01em; }
body:is([data-theme="bermet"], [data-theme="asman"], [data-theme="kiyiz"], [data-theme="boz"]) .script.gold { padding: .12em .2em .06em; margin: -.12em -.2em -.06em; }
body:is([data-theme="bermet"], [data-theme="asman"], [data-theme="kiyiz"], [data-theme="boz"]) .h-script {
  font-family: var(--f-head), 'Cormorant', serif; font-weight: 600; text-transform: none; letter-spacing: .08em; font-size: 30px; }
body[data-theme="kiyiz"] .h-script { text-transform: uppercase; letter-spacing: .14em; font-size: 24px; font-weight: 400; }
body:is([data-theme="bermet"], [data-theme="asman"], [data-theme="boz"]) .hero .names { font-size: clamp(44px, 13vw, 68px); line-height: 1.1; }
body[data-theme="bermet"] .hero .names { font-style: italic; }
body[data-theme="kiyiz"] .hero .names { font-size: clamp(42px, 12.5vw, 66px); text-transform: uppercase; letter-spacing: .06em; line-height: 1.12; }
body:is([data-theme="bermet"], [data-theme="asman"], [data-theme="boz"]) .hero .amp { font-family: 'Cormorant', serif; font-style: italic; font-size: clamp(30px, 8vw, 40px); }
body:is([data-theme="bermet"], [data-theme="asman"], [data-theme="kiyiz"], [data-theme="boz"]) :is(.h-script.gold, .caps) { color: var(--accent); }
body:is([data-theme="bermet"], [data-theme="asman"], [data-theme="kiyiz"], [data-theme="boz"]) .h-script.gold { background: none; -webkit-background-clip: initial; background-clip: initial; }
body:is([data-theme="bermet"], [data-theme="asman"], [data-theme="kiyiz"], [data-theme="boz"]) .greet.script { font-size: 30px; }
/* «Боз» — без блёсток */
body[data-theme="boz"] :is(.sparkles, .stars, .dust) { display: none !important; }

/* имена и заголовки в новых шаблонах — без рукописного шрифта */
body[data-theme="tun"] .script, body[data-theme="ak"] .script, body[data-theme="anar"] .script, body[data-theme="jashyl"] .script {
  font-family: var(--f-display), 'Cormorant', Georgia, serif; font-weight: 400; letter-spacing: .01em; }
body[data-theme="tun"] .script.gold, body[data-theme="ak"] .script.gold, body[data-theme="anar"] .script.gold, body[data-theme="jashyl"] .script.gold { padding: .12em .2em .06em; margin: -.12em -.2em -.06em; }
body[data-theme="tun"] .h-script, body[data-theme="ak"] .h-script, body[data-theme="anar"] .h-script, body[data-theme="jashyl"] .h-script {
  font-family: var(--f-head), 'Cormorant', serif; font-weight: 600; text-transform: none; letter-spacing: .08em; font-size: 30px; }
body[data-theme="jashyl"] .h-script { text-transform: uppercase; letter-spacing: .14em; font-size: 24px; font-weight: 400; }
body[data-theme="tun"] .hero .names, body[data-theme="ak"] .hero .names, body[data-theme="anar"] .hero .names { font-size: clamp(44px, 13vw, 68px); line-height: 1.1; }
body[data-theme="jashyl"] .hero .names { font-size: clamp(42px, 12.5vw, 66px); text-transform: uppercase; letter-spacing: .06em; line-height: 1.12; }
body[data-theme="tun"] .hero .amp, body[data-theme="ak"] .hero .amp, body[data-theme="anar"] .hero .amp { font-family: 'Cormorant', serif; font-style: italic; font-size: clamp(30px, 8vw, 40px); }
body[data-theme="ak"] .h-script.gold, body[data-theme="ak"] .caps { color: var(--accent); }
body[data-theme="ak"] .h-script.gold { background: none; -webkit-background-clip: initial; background-clip: initial; }
body[data-theme="tun"] .greet.script, body[data-theme="ak"] .greet.script, body[data-theme="anar"] .greet.script, body[data-theme="jashyl"] .greet.script { font-size: 30px; }
/* «Жашыл»: орнамент «кочкор мүйүз» по краям разделов — национальный акцент */
body:is([data-theme="jashyl"], [data-theme="kiyiz"]) main > section:not(.hero)::before { content: ""; display: block; width: 120px; height: 36px; margin: 0 auto 18px; opacity: .8;
  background: linear-gradient(100deg, var(--gold1), var(--gold2), var(--gold3)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 30 H13 C21 30 22 15 35 15 C48 15 50 31 40 33 C33 34 31 26 37 24'/%3E%3Cpath d='M13 30 C21 30 22 45 35 45 C48 45 50 29 40 27 C33 26 31 34 37 36'/%3E%3Cpath d='M93 30 H87 C79 30 78 15 65 15 C52 15 50 31 60 33 C67 34 69 26 63 24'/%3E%3Cpath d='M87 30 C79 30 78 45 65 45 C52 45 50 29 60 27 C67 26 69 34 63 36'/%3E%3C/g%3E%3Cpath d='M50 21 L57 30 L50 39 L43 30 Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 30 H13 C21 30 22 15 35 15 C48 15 50 31 40 33 C33 34 31 26 37 24'/%3E%3Cpath d='M13 30 C21 30 22 45 35 45 C48 45 50 29 40 27 C33 26 31 34 37 36'/%3E%3Cpath d='M93 30 H87 C79 30 78 15 65 15 C52 15 50 31 60 33 C67 34 69 26 63 24'/%3E%3Cpath d='M87 30 C79 30 78 45 65 45 C52 45 50 29 60 27 C67 26 69 34 63 36'/%3E%3C/g%3E%3Cpath d='M50 21 L57 30 L50 39 L43 30 Z'/%3E%3C/svg%3E") center / contain no-repeat; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Cormorant', Georgia, 'Times New Roman', serif; font-weight: 500;
  font-size: 20px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums; }
body.locked { overflow: hidden; height: 100svh; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.script { font-family: 'Bad Script', 'Cormorant', cursive; font-weight: 400; }
/* у рукописных букв (Т, Ж) росчерки выходят за край — даём им место, иначе градиент их обрежет */
.script.gold { padding: .3em .3em .15em; margin-left: -.3em; margin-right: -.3em; margin-top: -.3em; margin-bottom: -.15em; }
.gold { background: linear-gradient(100deg, var(--gold1) 0%, var(--gold2) 45%, var(--gold3) 70%, var(--gold1) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.caps { text-transform: uppercase; letter-spacing: 0.22em; font-weight: 600; font-size: 14px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Фон страницы: мягкий свет и золотая пыль */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70vmax 60vmax at 10% -10%, color-mix(in srgb, var(--gold2) 22%, transparent), transparent 60%),
    radial-gradient(60vmax 60vmax at 110% 110%, color-mix(in srgb, var(--gold1) 18%, transparent), transparent 60%),
    linear-gradient(var(--bg), var(--bg2)); }
.dust { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5; }
.dust i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--gold2); filter: blur(.3px);
  animation: float 14s linear infinite; }
@keyframes float { from { transform: translateY(10vh); opacity: 0; } 15% { opacity: 1; } 85% { opacity: .8; } to { transform: translateY(-110vh); opacity: 0; } }

/* ---------- Конверт ---------- */
.envelope { position: fixed; inset: 0; z-index: 50; perspective: 1400px; overflow: hidden; background: var(--env3); }
.flap { position: absolute; inset: 0; transition: transform 1.1s cubic-bezier(.65, .05, .25, 1), opacity .9s ease; will-change: transform; }
.flap > div { position: absolute; inset: 0; }
.flap.left > div { clip-path: polygon(0 0, 54% 52%, 0 100%); background: linear-gradient(100deg, var(--env2), var(--env1)); }
.flap.right > div { clip-path: polygon(100% 0, 46% 52%, 100% 100%); background: linear-gradient(260deg, var(--env2), var(--env1)); }
.flap.bottom { filter: drop-shadow(0 -6px 10px rgba(0, 0, 0, .12)); }
.flap.bottom > div { clip-path: polygon(0 100%, 50% 47%, 100% 100%); background: linear-gradient(0deg, var(--env1), var(--env2)); }
.flap.top { transform-origin: 50% 0; z-index: 3; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .18)); }
.flap.top > div { clip-path: polygon(0 0, 100% 0, 100% 2%, 50% 60%, 0 2%); background: linear-gradient(180deg, var(--env1), var(--env2) 70%, var(--env3)); }
.paper-grain { position: absolute; inset: 0; opacity: .35; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .38 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.edge { position: absolute; inset: 14px; border: 1px solid var(--line); border-radius: 6px; pointer-events: none; z-index: 4; transition: opacity .5s; }
.env-title { position: absolute; top: 9%; left: 0; right: 0; text-align: center; z-index: 5; transition: opacity .4s; }
.env-title .script { font-size: clamp(44px, 13vw, 64px); line-height: 1.1; }
.env-title .caps { color: var(--env-ink); margin-top: 6px; }
.env-to { position: absolute; bottom: 9%; left: 24px; right: 24px; text-align: center; z-index: 2; transition: opacity .4s; color: var(--env-ink); }
.env-to .who { font-size: clamp(26px, 7vw, 34px); line-height: 1.2; margin-top: 4px; }
.env-hint { position: absolute; top: calc(60% + 92px); left: 0; right: 0; text-align: center; z-index: 5; font-size: 15px; color: var(--env-ink);
  letter-spacing: .06em; animation: hint 2.4s ease-in-out infinite; transition: opacity .3s; }
/* подсказка «покачивается», а не бледнеет — чтобы текст оставался читаемым */
@keyframes hint { 50% { transform: translateY(-3px); } }
.seal { position: absolute; left: 50%; top: 60%; width: 132px; height: 132px; margin: -66px 0 0 -66px; z-index: 6; border: 0; padding: 0;
  background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; filter: drop-shadow(0 8px 10px rgba(40, 10, 10, .35)); }
.seal:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; border-radius: 50%; }
.seal svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: transform .7s cubic-bezier(.3, .7, .3, 1), opacity .7s; }
.seal:not(.broken) .whole { animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }
.seal .half { opacity: 0; transition: none; }
.seal.broken .whole { opacity: 0; transition: none; animation: none; }
.seal.broken .half { opacity: 1; }
.seal.fly .half { transition: transform .9s cubic-bezier(.3, .6, .4, 1), opacity .6s ease .35s; }
.seal.fly .half.l { transform: translate(-40px, 90px) rotate(-32deg); opacity: 0; }
.seal.fly .half.r { transform: translate(40px, 100px) rotate(28deg); opacity: 0; }
.envelope.open .flap.top { transform: rotateX(178deg); opacity: 0; transition-delay: .55s, 1.1s; }
.envelope.open .flap.left { transform: translateX(-104%); transition-delay: 1s; }
.envelope.open .flap.right { transform: translateX(104%); transition-delay: 1s; }
.envelope.open .flap.bottom { transform: translateY(104%); transition-delay: 1.05s; }
.envelope.open .env-title, .envelope.open .env-to, .envelope.open .env-hint, .envelope.open .edge { opacity: 0; animation: none; }
.envelope.open { background: transparent; transition: background-color .6s .7s; }
.envelope.gone { display: none; }

/* ---------- Страница ---------- */
main { max-width: 560px; margin: 0 auto; padding: 0 20px 120px; overflow-x: clip; }
section { padding: 56px 0; text-align: center; position: relative; }
/* прячем до появления только если скрипт работает (класс js на <html>) — без скрипта текст виден сразу */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding-top: 70px; }
.hero .names { font-size: clamp(58px, 17vw, 88px); line-height: 1.05; margin: 18px 0 4px; }
.hero .amp { font-size: clamp(34px, 9vw, 46px); line-height: 1; margin: 2px 0; }
.hero .date { margin-top: 22px; font-size: 22px; letter-spacing: .3em; font-weight: 600; }
.hero .scroll-cue { margin-top: 46px; width: 26px; height: 42px; border: 1.5px solid var(--line); border-radius: 14px; position: relative; }
.hero .scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: var(--gold1); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 60% { transform: translateY(12px); opacity: 0; } }
.orn { display: block; margin: 0 auto; width: 150px; height: auto; color: var(--gold1); }
.orn.small { width: 96px; }
.h-script { font-size: clamp(40px, 11vw, 54px); line-height: 1.15; margin: 0 0 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 34px 24px; box-shadow: var(--shadow);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); position: relative; }
.card::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--line); border-radius: 22px; pointer-events: none; }
.greet { font-size: 26px; line-height: 1.3; margin: 0 0 14px; }
.text { font-size: 21px; line-height: 1.55; margin: 0; }
.month { font-size: 18px; letter-spacing: .5em; font-weight: 600; margin-bottom: 12px; }
.week { display: flex; justify-content: center; align-items: center; gap: 4px; margin: 6px 0 4px; }
.week span { width: 52px; text-align: center; font-size: 30px; color: var(--muted); opacity: .55; }
.week span.n1 { opacity: .8; font-size: 34px; }
.week .day { position: relative; width: 92px; height: 92px; display: grid; place-items: center; opacity: 1; font-size: 50px; font-weight: 600; }
.week .day svg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--gold1); }
.weekday { font-size: 20px; letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
.time { margin-top: 10px; font-size: 26px; letter-spacing: .12em; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.countdown b { display: block; font-size: 44px; line-height: 1.1; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.countdown small { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.place-name { font-size: 30px; line-height: 1.25; margin: 4px 0 6px; font-weight: 600; }
.btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 0;
  background: var(--btn); color: var(--btn-ink); font-family: 'Cormorant', serif; font-weight: 600; font-size: 18px; letter-spacing: .12em;
  text-transform: uppercase; text-decoration: none; cursor: pointer; box-shadow: 0 10px 22px rgba(150, 110, 40, .25); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn:focus-visible, .opt:focus-visible, .music:focus-visible, .lang button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.btn:disabled { opacity: .5; cursor: default; }
.timeline { list-style: none; padding: 0; margin: 8px auto 0; max-width: 360px; text-align: left; position: relative; }
.timeline::before { content: ""; position: absolute; left: 76px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 26px; align-items: baseline; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 72px; top: 22px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold2) 30%, transparent); }
.timeline b { font-size: 22px; font-weight: 600; font-variant-numeric: lining-nums; }
.timeline span { font-size: 21px; }
.swatches { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.swatches i { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--ink) 45%, transparent); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 2px 8px rgba(0, 0, 0, .18); }
.opts { display: grid; gap: 12px; margin: 20px 0 6px; }
.opt { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: transparent; cursor: pointer; text-align: left; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.opt i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--gold1); flex: none; display: grid; place-items: center; }
.opt[aria-pressed="true"] { border-color: var(--gold1); background: color-mix(in srgb, var(--gold2) 14%, transparent); }
.opt[aria-pressed="true"] i::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--gold1); }
.count { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 14px 0 4px; }
.count button { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; font-size: 26px; cursor: pointer; }
.count output { font-size: 34px; font-weight: 600; min-width: 40px; }
.thanks { padding: 10px 0; }
.thanks .mark { width: 72px; height: 72px; margin: 0 auto 14px; color: var(--gold1); }
.field { width: 100%; min-height: 54px; border-radius: 18px; border: 1.5px solid var(--line); background: color-mix(in srgb, var(--paper) 70%, transparent);
  padding: 12px 18px; font: inherit; font-size: 19px; color: var(--ink); }
.field::placeholder { color: var(--muted); opacity: .8; }
.field:focus { outline: none; border-color: var(--gold1); box-shadow: 0 0 0 2px var(--focus); }
textarea.field { min-height: 110px; resize: vertical; }
.wish-form { display: grid; gap: 12px; margin-top: 16px; }
.wishes { display: grid; gap: 12px; margin-top: 22px; text-align: left; }
.wish { padding: 16px 20px; border-radius: 22px; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 55%, transparent); }
.wish p { margin: 0 0 6px; font-size: 20px; font-style: italic; }
.wish b { font-size: 16px; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.closing .names { font-size: clamp(42px, 12vw, 58px); line-height: 1.15; margin-top: 8px; }
.made { margin-top: 40px; font-size: 15px; color: var(--muted); letter-spacing: .04em; }
.made a { text-decoration: none; border-bottom: 1px solid var(--line); }
/* Ненавязчивая карточка приложения в самом конце приглашения и строка после ответа */
.made-cta { display: grid; gap: 8px; max-width: 360px; margin: 22px auto 0; padding: 24px 20px 22px; border-radius: 16px; text-align: center;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease; }
.made-cta:hover { transform: translateY(-2px); border-color: var(--gold1); }
.made-cta:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.made-q { font-family: var(--f-display, inherit), serif; font-size: 22px; line-height: 1.2; color: var(--ink); }
.made-s { font-size: 15px; line-height: 1.5; color: var(--muted); }
.made-go { justify-self: center; margin-top: 8px; padding: 11px 22px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-size: 15px; font-weight: 600; letter-spacing: .03em; }
.thanks-cta { margin: 16px 0 0; font-size: 13px; line-height: 1.45; }
.thanks-cta a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }

/* Плавающие кнопки */
.music { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow); color: var(--gold1); }
.music svg { width: 22px; height: 22px; }
.music .bars { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.music .bars i { width: 3px; background: currentColor; border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.music .bars i:nth-child(2) { animation-delay: -.4s; } .music .bars i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 18px; } }
.music.off .bars i { animation: none; height: 5px; }
.lang { position: absolute; top: 16px; right: 16px; z-index: 10; display: flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); }
.lang button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--muted); }
.lang button[aria-pressed="true"] { background: color-mix(in srgb, var(--gold2) 25%, transparent); color: var(--ink); }
.demo-bar { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; display: flex; gap: 2px; padding: 4px;
  max-width: calc(100% - 100px); overflow-x: auto; scrollbar-width: none; border-radius: 999px; background: rgba(30, 26, 46, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-family: system-ui, sans-serif; }
.demo-bar a { white-space: nowrap; flex: none; color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; padding: 9px 12px; border-radius: 999px; opacity: .75; }
.demo-bar a[aria-current="true"] { background: rgba(255, 255, 255, .18); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .flap, .seal svg { transition-duration: .01s !important; transition-delay: 0s !important; }
  .dust, .env-hint, .seal .whole, .hero .scroll-cue::after { animation: none !important; }
}

/* Золотые линии по краям клапанов */
.flap svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.flap svg.lines path { fill: none; stroke: var(--gold1); stroke-opacity: .55; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.env-title .orn { width: 120px; margin-top: 10px; opacity: .9; }
.h-script.gold { margin-bottom: 12px; }
.greet.gold { margin-bottom: 10px; }

/* Загрузка и ошибка */
.seal[disabled] { cursor: default; }
.seal[disabled] .whole { animation: none; opacity: .55; }
.oops { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: var(--bg); text-align: center; }
.oops .card { max-width: 420px; }
.err { color: #A3263A; font-size: 17px; margin: 10px 0 0; }
body[data-theme="tunku"] .err { color: #F2B8A0; }
.week .day.plain svg { display: none; }
.week .day.plain { border: 1.5px solid var(--gold1); border-radius: 50%; width: 76px; height: 76px; margin: 8px; }

/* ---------- Видео-конверт ---------- */
.venv { position: fixed; inset: 0; z-index: 60; background: #0b0f1c; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: opacity .8s ease; }
.venv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.venv.light { background: #EFE8DA; }
.venv-to, .venv-hint { position: absolute; left: 24px; right: 24px; text-align: center; color: #F6EEDC; text-shadow: 0 1px 12px rgba(0, 0, 0, .55); transition: opacity .4s; }
.venv.light .venv-to, .venv.light .venv-hint { color: #4A3826; text-shadow: 0 1px 10px rgba(255, 255, 255, .7); }
.venv-to { top: calc(9% + env(safe-area-inset-top)); z-index: 1; }
.venv-to .who { font-size: clamp(30px, 8.5vw, 42px); line-height: 1.2; margin-top: 4px; }
.venv-hint { left: 50%; right: auto; bottom: calc(7% + env(safe-area-inset-bottom)); translate: -50% 0; white-space: nowrap; padding: 11px 20px 11px 22px;
  border-radius: 999px; background: rgba(9, 12, 24, .62); border: 1px solid rgba(214, 180, 110, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; text-shadow: none; animation: hint 2.4s ease-in-out infinite; }
.venv.light .venv-hint { background: rgba(255, 250, 240, .72); border-color: rgba(150, 115, 60, .4); text-shadow: none; }
.venv-to::before { content: ''; position: absolute; inset: -40px -24px -30px; z-index: -1; background: radial-gradient(closest-side, rgba(9, 12, 24, .55), transparent); }
.venv.light .venv-to::before { background: radial-gradient(closest-side, rgba(255, 250, 240, .6), transparent); }
.venv.playing .venv-to, .venv.playing .venv-hint { opacity: 0; }
/* Компьютер и планшет в альбомной ориентации: ролик снят вертикально (9:16) — показываем его «экраном телефона» по центру,
   а по бокам размытый кадр того же конверта. Иначе ролик растягивается на всю ширину и выглядит крупно и мыльно. */
@media (min-aspect-ratio: 3/4) {
  .venv { --vw: min(100vw, calc(100svh * 9 / 16)); overflow: hidden; }
  .venv::before { content: ''; position: absolute; inset: -60px; background: var(--venv-bg, none) center / cover; filter: blur(30px) brightness(.45) saturate(1.1); }
  .venv.light::before { filter: blur(30px) brightness(.85); }
  .venv video { left: 50%; width: var(--vw); translate: -50% 0; box-shadow: 0 0 80px rgba(0, 0, 0, .45); }
  .venv-to { left: 50%; right: auto; width: calc(var(--vw) - 48px); translate: -50% 0; }
  .venv-to .who { font-size: clamp(28px, calc(var(--vw) * .085), 42px); }
}
.venv.done { opacity: 0; pointer-events: none; }
.venv:focus-visible { outline: 3px solid var(--focus); outline-offset: -6px; }

/* ---------- Фото пары на первом экране ---------- */
.hero.has-photo { justify-content: flex-start; padding-top: 0; }
.hero-photo { margin: 0 calc(50% - 50vw); width: 100vw; max-width: none; height: min(64svh, 560px); position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
@media (min-width: 600px) { .hero-photo { margin: 0 auto; width: 100%; border-radius: 0 0 24px 24px; } }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.08); transition: transform 14s cubic-bezier(.2, .6, .2, 1); }
.hero-photo.in img { transform: scale(1); }
.hero.has-photo .orn { margin-top: -28px; position: relative; }
.hero.has-photo .names { font-size: clamp(50px, 15vw, 78px); }

/* ---------- Галерея ---------- */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.gallery button { padding: 0; border: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: var(--line); cursor: zoom-in; }
.gallery button:first-child { grid-column: span 2; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.gallery button:hover img { transform: scale(1.04); }
.gallery button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(10, 8, 6, .94); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.lb-x { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.lb-nav.prev { left: 12px; top: 50%; margin-top: -24px; } .lb-nav.next { right: 12px; top: 50%; margin-top: -24px; }
.lb-count { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .75); font-size: 14px; letter-spacing: .1em; }
@media (hover: none) { .lb-nav { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-photo img { transition: none; transform: none; } }

/* ---------- Карточка из видео-конверта: первый экран — та же карточка, на которой проявляется текст ----------
   Фон — последний кадр ролика (тот же масштаб, что у видео), поэтому при растворении ролика картинка не меняется:
   рамка и орнамент остаются на месте, а имена «проявляются» над и под центральным орнаментом (он вместо «&»). */
.hero-top, .hero-bot { display: contents; }
@media (max-aspect-ratio: 3/4) {
  body.venv-card .hero { position: relative; min-height: 0; height: 100svh; padding: 0; margin: 0 calc(50% - 50vw); width: 100vw;
    background: #CEC8C1 var(--card-img) center / cover no-repeat; display: block;
    --gold1: #7E5C22; --gold2: #B8904A; --gold3: #8E6A2C; --ink: #3A2C1E; --muted: #6E5E4E; --line: rgba(126, 92, 34, .35); }
  body.venv-card .hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 9%; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
  body.venv-card .hero .orn, body.venv-card .hero .amp, body.venv-card .hero .scroll-cue { display: none; }
  body.venv-card .hero-top, body.venv-card .hero-bot { display: flex; flex-direction: column; align-items: center; position: absolute; left: 13%; right: 13%; text-align: center; }
  body.venv-card .hero-top { bottom: 52.6%; justify-content: flex-end; }   /* орнамент карточки: 49,2–57,9 % высоты */
  body.venv-card .hero-bot { top: 59.6%; }
  body.venv-card .hero .names { font-size: clamp(38px, 11.5vw, 60px); line-height: 1.08; margin: 4px 0; text-wrap: balance; }
  body.venv-card .hero .caps { color: var(--muted); }
  body.venv-card .hero .date { color: var(--ink); margin-top: 12px; font-size: 18px; }
  body.venv-card .hero .reveal { transition-duration: 1.4s; transform: translateY(10px); filter: blur(4px); transition-property: opacity, transform, filter; }
  body.venv-card .hero .reveal.in { transform: none; filter: none; }
  /* фото пары — сразу под карточкой */
  body.venv-card .hero-photo.below { margin: 0 calc(50% - 50vw) 8px; height: min(70svh, 600px); }
  body.venv-card .lang { color: #4A3826; }
}
.venv.done { transition-duration: 1.3s; }

/* Знак «пробная версия»: пока тариф не оплачен. Заметный, но не мешает читать. */
.wm-ribbon { position: fixed; z-index: 70; top: 20px; left: -50px; width: 190px; transform: rotate(-45deg); pointer-events: none;
  background: linear-gradient(#B3263F, #8F1B30); color: #fff; text-align: center; font: 700 12px/30px Inter, system-ui, -apple-system, sans-serif;
  letter-spacing: .22em; text-transform: uppercase; box-shadow: 0 4px 14px rgba(60, 10, 20, .28); }
.wm-bar { position: fixed; z-index: 70; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); max-width: calc(100% - 100px);
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px;
  background: rgba(24, 19, 38, .82); color: #fff; font: 500 13px/1.2 Inter, system-ui, -apple-system, sans-serif; text-decoration: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 22px rgba(0, 0, 0, .22); }
.wm-bar svg { width: 16px; height: 16px; flex: none; color: #FFD27A; }
.wm-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-stamp { display: none; }
body.wm .hero { position: relative; }
body.wm .wm-stamp { display: block; position: absolute; z-index: 3; left: 50%; top: 52%; transform: translate(-50%, -50%) rotate(-18deg);
  pointer-events: none; padding: 6px 22px; border: 3px solid currentColor; border-radius: 12px; color: rgba(160, 30, 50, .24);
  font: 800 clamp(34px, 11vw, 56px)/1.1 Inter, system-ui, -apple-system, sans-serif; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
body.wm .wm-stamp::before { content: attr(data-t); }
body.locked .wm-bar { display: none; }
body.wm .demo-bar { bottom: calc(72px + env(safe-area-inset-bottom)); }

/* Пример на компьютере: приглашение колонкой во всю высоту экрана по центру, вокруг размытый фон; без рамки и полосы прокрутки */
html.inframe { scrollbar-width: none; }
html.inframe::-webkit-scrollbar, html.inframe body::-webkit-scrollbar { display: none; }
body.dframe-page { margin: 0; height: 100svh; overflow: hidden; background: var(--dframe-color, #0D1530); font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
.dframe-bg { position: fixed; inset: -60px; background: var(--dframe-bg, none) center / cover, var(--dframe-color, #0D1530);
  filter: blur(34px) brightness(.5) saturate(1.1); }
.dframe { position: fixed; top: 0; bottom: 0; left: 50%; translate: -50% 0; width: min(100vw, 470px, calc(100svh * .6));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 0 90px rgba(0, 0, 0, .55); }
.dframe iframe { display: block; width: 100%; height: 100%; border: 0; }
.dframe-side { position: fixed; left: calc(50% + min(470px, 100svh * .6) / 2 + 40px); bottom: 48px; width: 230px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; color: rgba(255, 255, 255, .8); font-size: 15px; line-height: 1.45; }
.dframe-side p { margin: 0 0 4px; }
.dframe-side a { text-decoration: none; font-weight: 600; font-size: 14px; border-radius: 999px; padding: 11px 18px; }
.dframe-cta { background: #7A1E2C; color: #FFF7EE; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.dframe-full { color: rgba(255, 255, 255, .85); padding-left: 4px !important; text-decoration: underline !important; text-underline-offset: 3px; font-weight: 500 !important; }
@media (max-width: 1100px) { .dframe-side { display: none; } }

/* ---------- Шаблоны-сцены (24.11): картинка на весь экран, имена рукописным шрифтом ----------
   Фон — /inv/scenes/<тема>.webp (9:16). Цвета и место текста задаются в tools/scenes/scenes.py (блок SCENES ниже). */
.scover { position: fixed; inset: 0; z-index: 61; cursor: pointer; overflow: hidden; color: var(--sc-ink, #FFF7E8); -webkit-tap-highlight-color: transparent;
  transition: opacity 1.1s ease, transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.scover-bg, body.scene .hero::before { content: ''; position: absolute; inset: 0; background: #888 var(--scene) center / var(--sc-size, cover) no-repeat; }
.scover-bg { animation: scZoom 18s ease-out both; }
.scover::after, body.scene .hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--sc-veil, rgba(0, 0, 0, .3)), transparent 45%); }
.scover-in { position: absolute; z-index: 1; left: var(--sc-left, 24px); right: 24px; top: calc(var(--zone-top, 13svh) + env(safe-area-inset-top));
  display: flex; flex-direction: column; align-items: var(--sc-align, center); text-align: center; text-shadow: var(--sc-shadow); }
.scover-in > * { width: min(100%, 360px); }
.scover .caps, body.scene .hero .caps { color: var(--sc-caps, #F4E2B8); letter-spacing: .24em; font-size: 12px; font-weight: 700; text-wrap: balance; max-width: 300px; margin-left: auto; margin-right: auto; }
.sc-names, body.scene .hero .names, body.scene .hero .amp { font-family: 'Great Vibes KG', 'Cormorant', serif; font-weight: 400; font-style: normal; text-transform: none; letter-spacing: 0; }
.sc-names { font-size: clamp(54px, 16vw, 84px); line-height: 1.12; margin-top: 10px; text-shadow: none;
  background: linear-gradient(180deg, var(--sc-n1), var(--sc-n2) 60%, var(--sc-n3)); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .15em;
  filter: drop-shadow(var(--sc-drop, 0 2px 10px rgba(0, 0, 0, .18))); }
.sc-names span { display: block; }
.sc-names .amp2 { font-size: .55em; line-height: .9; }
.sc-date, body.scene .hero .date { font: 600 17px/1 'Cormorant', serif; letter-spacing: .42em; color: var(--sc-ink); margin-top: 16px; }
.scover-bot { margin-top: 6svh; }
.scover-bot .who { font: 400 clamp(32px, 9vw, 44px)/1.15 'Great Vibes KG', serif; margin-top: 6px; }
.sc-btn { width: 60px; height: 60px; margin: 16px auto 0; border-radius: 50%; border: 1.5px solid currentColor;
  background: radial-gradient(circle, var(--sc-n2) 0 7px, transparent 8px); animation: scPulse 2.2s ease-in-out infinite; }
.sc-hint { font: 500 12px/1.4 Inter, system-ui, sans-serif; letter-spacing: .08em; margin-top: 12px; opacity: .9; }
.scover.open { opacity: 0; transform: scale(1.06); pointer-events: none; }
.scover.open .scover-bot { opacity: 0; transition: opacity .35s; }
@keyframes scZoom { from { transform: scale(1.1); } to { transform: scale(1); } }
@keyframes scPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); } 50% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .scover-bg, .sc-btn { animation: none; } .scover { transition: opacity .2s; } }

body.scene .hero { position: relative; isolation: isolate; margin: 0 calc(50% - 50vw); width: 100vw; min-height: 100svh;
  padding: calc(var(--zone-top, 13svh) + env(safe-area-inset-top)) 24px 0 var(--sc-left, 24px); justify-content: flex-start; align-items: var(--sc-align, center);
  color: var(--sc-ink); text-shadow: var(--sc-shadow); }
@media (min-width: 600px) { body.scene .hero { margin: 0 -20px; width: auto; } }
body.scene .hero > * { max-width: 360px; }
body.scene .hero::before { z-index: -2; }
body.scene .hero::after { z-index: -1; background: linear-gradient(var(--sc-veil, rgba(0, 0, 0, .3)), transparent 45%, transparent 84%, var(--bg)); }
body.scene .hero .orn, body.scene .hero .scroll-cue { display: none; }
body.scene .hero #kindTitle { margin-top: 0 !important; }
body.scene .hero :is(.names, .amp) { --gold1: var(--sc-n3); --gold2: var(--sc-n1); --gold3: var(--sc-n2); text-shadow: none; filter: drop-shadow(var(--sc-drop, 0 2px 10px rgba(0, 0, 0, .18))); }
body.scene .hero .names { font-size: clamp(54px, 16vw, 84px); line-height: 1.12; margin: 10px 0 0; padding: 0 .15em; }
body.scene .hero .amp { font-size: clamp(30px, 9vw, 46px); line-height: .9; margin: 0; }
body.scene .hero .hero-photo { display: none; }
body.scene .hero-photo.below { margin: 0 calc(50% - 50vw) 8px; width: 100vw; height: min(70svh, 600px); }
@media (min-width: 600px) { body.scene .hero-photo.below { margin: 0 -20px 8px; width: auto; } }
body.scene .wm-stamp { z-index: 3; color: rgba(160, 30, 50, .3); }
body.scene .script { font-family: 'Great Vibes KG', 'Cormorant', serif; font-weight: 400; }
body.scene .script.gold { padding: .12em .25em .06em; margin: -.12em -.25em -.06em; }
body.scene :is(.h-script, .greet.script) { font-family: 'Great Vibes KG', serif; font-weight: 400; font-size: 44px; line-height: 1.15; text-transform: none; letter-spacing: 0; }
body.scene .greet.script { font-size: 36px; }


/* SCENES:BEGIN — сгенерировано tools/scenes/scenes.py, руками не править */
body[data-theme="ala-too"] {
  --bg: #F7F1EA; --bg2: #EEE3D8; --paper: #FFFCF8; --ink: #3A2A38; --muted: #6D5C68; --focus: #6E3B5A;
  --gold1: #8E5E3A; --gold2: #D7A86E; --gold3: #A8743F; --line: rgba(142, 94, 58, 0.26);
  --env1: #F7F1EA; --env2: #EEE3D8; --env3: #EEE3D8; --env-ink: #6E3B5A; --wax1: #8D4A6C; --wax2: #4E2239; --wax-ink: #FFF7EE;
  --btn: linear-gradient(135deg, #5E2C47, #8D4A6C 55%, #4E2239); --btn-ink: #FFF7EE;
  --card: rgba(255, 252, 248, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #6E3B5A; --f-head: 'Cormorant SC';
  --zone-top: 10svh; --sc-ink: #4A2338; --sc-caps: #7A3D52; --sc-n1: #9A4E68; --sc-n2: #7A2E4A; --sc-n3: #5A1E36;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,236,236,.25); --sc-align: center;
}
body[data-theme="ala-too"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="boz-uy"] {
  --bg: #F7F1EA; --bg2: #EEE3D8; --paper: #FFFCF8; --ink: #3A2A38; --muted: #6D5C68; --focus: #6E3B5A;
  --gold1: #8E5E3A; --gold2: #D7A86E; --gold3: #A8743F; --line: rgba(142, 94, 58, 0.26);
  --env1: #F7F1EA; --env2: #EEE3D8; --env3: #EEE3D8; --env-ink: #6E3B5A; --wax1: #8D4A6C; --wax2: #4E2239; --wax-ink: #FFF7EE;
  --btn: linear-gradient(135deg, #5E2C47, #8D4A6C 55%, #4E2239); --btn-ink: #FFF7EE;
  --card: rgba(255, 252, 248, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #6E3B5A; --f-head: 'Cormorant SC';
  --zone-top: 9svh; --sc-ink: #4A2338; --sc-caps: #7A3D52; --sc-n1: #9A4E68; --sc-n2: #7A2E4A; --sc-n3: #5A1E36;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,236,236,.22); --sc-align: center;
}
body[data-theme="boz-uy"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="jibek"] {
  --bg: #FBF7EF; --bg2: #F4ECDD; --paper: #FFFDF8; --ink: #3B2F22; --muted: #6F5E49; --focus: #8A6A2C;
  --gold1: #9C7531; --gold2: #E3C77E; --gold3: #B48A3E; --line: rgba(156, 117, 49, 0.26);
  --env1: #FBF7EF; --env2: #F4ECDD; --env3: #F4ECDD; --env-ink: #8A6A2C; --wax1: #D9B867; --wax2: #A47B32; --wax-ink: #FFFDF6;
  --btn: linear-gradient(135deg, #B38A3D, #D9B867 55%, #A47B32); --btn-ink: #FFFDF6;
  --card: rgba(255, 253, 248, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #8A6A2C; --f-head: 'Cormorant SC';
  --zone-top: 20svh; --sc-ink: #4A3A22; --sc-caps: #8A6A2C; --sc-n1: #C9A25A; --sc-n2: #A47B32; --sc-n3: #7E5A1E;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,250,240,0); --sc-align: center; --sc-size: 100% 100%;
}
body[data-theme="jibek"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="barhat"] {
  --bg: #3A0D18; --bg2: #4A1220; --paper: #561727; --ink: #F5E8D8; --muted: #D4B9AE; --focus: #F4DFA6;
  --gold1: #C9A04F; --gold2: #F6E2A8; --gold3: #DDB565; --line: rgba(201, 160, 79, 0.26);
  --env1: #3A0D18; --env2: #4A1220; --env3: #4A1220; --env-ink: #F4DFA6; --wax1: #F2D99C; --wax2: #B48635; --wax-ink: #3A0D18;
  --btn: linear-gradient(135deg, #BC9040, #F2D99C 55%, #B48635); --btn-ink: #3A0D18;
  --card: rgba(86, 23, 39, 0.72); --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  --accent: #F4DFA6; --f-head: 'Cormorant SC';
  --zone-top: 44svh; --sc-ink: #FBEBD6; --sc-caps: #E9C98C; --sc-n1: #FFF0C8; --sc-n2: #E8C77F; --sc-n3: #C99A48;
  --sc-shadow: 0 2px 18px rgba(0, 0, 0, .45); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="bilerik"] {
  --bg: #0D2B25; --bg2: #113A31; --paper: #14443A; --ink: #F1E8D6; --muted: #B5C4B8; --focus: #F2DA9C;
  --gold1: #C49A4A; --gold2: #F2DA9C; --gold3: #D0A957; --line: rgba(196, 154, 74, 0.26);
  --env1: #0D2B25; --env2: #113A31; --env3: #113A31; --env-ink: #F2DA9C; --wax1: #EED394; --wax2: #B38633; --wax-ink: #0D2B25;
  --btn: linear-gradient(135deg, #B88C3C, #EED394 55%, #B38633); --btn-ink: #0D2B25;
  --card: rgba(20, 68, 58, 0.72); --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  --accent: #F2DA9C; --f-head: 'Cormorant SC';
  --zone-top: 52svh; --sc-ink: #F4EAD3; --sc-caps: #E2C68A; --sc-n1: #FFF0C8; --sc-n2: #E8C77F; --sc-n3: #C99A48;
  --sc-shadow: 0 2px 18px rgba(0, 0, 0, .45); --sc-veil: rgba(0,0,0,.15); --sc-align: center;
}
body[data-theme="shokulo"] {
  --bg: #3A0D18; --bg2: #4A1220; --paper: #561727; --ink: #F5E8D8; --muted: #D4B9AE; --focus: #F4DFA6;
  --gold1: #C9A04F; --gold2: #F6E2A8; --gold3: #DDB565; --line: rgba(201, 160, 79, 0.26);
  --env1: #3A0D18; --env2: #4A1220; --env3: #4A1220; --env-ink: #F4DFA6; --wax1: #F2D99C; --wax2: #B48635; --wax-ink: #3A0D18;
  --btn: linear-gradient(135deg, #BC9040, #F2D99C 55%, #B48635); --btn-ink: #3A0D18;
  --card: rgba(86, 23, 39, 0.72); --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  --accent: #F4DFA6; --f-head: 'Cormorant SC';
  --zone-top: 53svh; --sc-ink: #FBEBD6; --sc-caps: #E9C98C; --sc-n1: #FFF0C8; --sc-n2: #E8C77F; --sc-n3: #C99A48;
  --sc-shadow: 0 2px 18px rgba(0, 0, 0, .45); --sc-veil: rgba(0,0,0,.1); --sc-align: center;
}
body[data-theme="jurkan"] {
  --bg: #F8EEE3; --bg2: #F0E0CE; --paper: #FFFAF3; --ink: #3E2418; --muted: #76584A; --focus: #A3352A;
  --gold1: #A3352A; --gold2: #D86A45; --gold3: #B8452F; --line: rgba(163, 53, 42, 0.26);
  --env1: #F8EEE3; --env2: #F0E0CE; --env3: #F0E0CE; --env-ink: #A3352A; --wax1: #C9533A; --wax2: #8E2A20; --wax-ink: #FFF8EE;
  --btn: linear-gradient(135deg, #A3352A, #C9533A 55%, #8E2A20); --btn-ink: #FFF8EE;
  --card: rgba(255, 250, 243, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #A3352A; --f-head: 'Cormorant SC';
  --zone-top: 36svh; --sc-ink: #FFF6E8; --sc-caps: #FFE3B0; --sc-n1: #FFF6DC; --sc-n2: #FBE2A8; --sc-n3: #F2C677;
  --sc-shadow: 0 2px 18px rgba(0, 0, 0, .45); --sc-veil: rgba(60,20,0,.12); --sc-align: flex-end; --sc-left: 34%;
}
body[data-theme="jurkan"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="shyrdak"] {
  --bg: #F6EEE1; --bg2: #EDE1CE; --paper: #FCF7EE; --ink: #3A231C; --muted: #6E5446; --focus: #A3271F;
  --gold1: #A3271F; --gold2: #D2563F; --gold3: #B33A2A; --line: rgba(163, 39, 31, 0.26);
  --env1: #F6EEE1; --env2: #EDE1CE; --env3: #EDE1CE; --env-ink: #A3271F; --wax1: #C94A35; --wax2: #8F2019; --wax-ink: #FCF7EE;
  --btn: linear-gradient(135deg, #A3271F, #C94A35 55%, #8F2019); --btn-ink: #FCF7EE;
  --card: rgba(252, 247, 238, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #A3271F; --f-head: 'Cormorant SC';
  --zone-top: 25svh; --sc-ink: #4A1E18; --sc-caps: #8E2A20; --sc-n1: #B33A2A; --sc-n2: #8E2A20; --sc-n3: #5E1A14;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="shyrdak"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="ak-kalpak"] {
  --bg: #F2F6FA; --bg2: #E3ECF4; --paper: #FBFDFF; --ink: #22344A; --muted: #5D6E82; --focus: #2F5D8A;
  --gold1: #2C5580; --gold2: #6F97C2; --gold3: #3B6896; --line: rgba(44, 85, 128, 0.26);
  --env1: #F2F6FA; --env2: #E3ECF4; --env3: #E3ECF4; --env-ink: #2F5D8A; --wax1: #5D8AB8; --wax2: #2C5580; --wax-ink: #FBFDFF;
  --btn: linear-gradient(135deg, #34618F, #5D8AB8 55%, #2C5580); --btn-ink: #FBFDFF;
  --card: rgba(251, 253, 255, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #2F5D8A; --f-head: 'Cormorant SC';
  --zone-top: 12svh; --sc-ink: #1F3550; --sc-caps: #2F5D8A; --sc-n1: #3B6896; --sc-n2: #244A73; --sc-n3: #16324F;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,255,255,.12); --sc-align: center;
}
body[data-theme="ak-kalpak"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="kok-asman"] {
  --bg: #F2F6FA; --bg2: #E3ECF4; --paper: #FBFDFF; --ink: #22344A; --muted: #5D6E82; --focus: #2F5D8A;
  --gold1: #2C5580; --gold2: #6F97C2; --gold3: #3B6896; --line: rgba(44, 85, 128, 0.26);
  --env1: #F2F6FA; --env2: #E3ECF4; --env3: #E3ECF4; --env-ink: #2F5D8A; --wax1: #5D8AB8; --wax2: #2C5580; --wax-ink: #FBFDFF;
  --btn: linear-gradient(135deg, #34618F, #5D8AB8 55%, #2C5580); --btn-ink: #FBFDFF;
  --card: rgba(251, 253, 255, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #2F5D8A; --f-head: 'Cormorant SC';
  --zone-top: 22svh; --sc-ink: #1F3550; --sc-caps: #2F5D8A; --sc-n1: #3B6896; --sc-n2: #244A73; --sc-n3: #16324F;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,255,255,.18); --sc-align: center; --sc-size: 100% 100%;
}
body[data-theme="kok-asman"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="beshik"] {
  --bg: #FBF3F0; --bg2: #F5E6E1; --paper: #FFFAF8; --ink: #46302E; --muted: #7C6360; --focus: #9A5560;
  --gold1: #9A5560; --gold2: #CF9098; --gold3: #A9636F; --line: rgba(154, 85, 96, 0.26);
  --env1: #FBF3F0; --env2: #F5E6E1; --env3: #F5E6E1; --env-ink: #9A5560; --wax1: #DDA2A9; --wax2: #A9636F; --wax-ink: #FFFAF8;
  --btn: linear-gradient(135deg, #B9737E, #DDA2A9 55%, #A9636F); --btn-ink: #FFFAF8;
  --card: rgba(255, 250, 248, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #9A5560; --f-head: 'Cormorant SC';
  --zone-top: 8svh; --sc-ink: #5A2E34; --sc-caps: #9A5560; --sc-n1: #B9737E; --sc-n2: #9A5560; --sc-n3: #713E48;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,250,248,.35); --sc-align: center;
}
body[data-theme="beshik"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="ala-jip"] {
  --bg: #F7F1E8; --bg2: #EDE3D4; --paper: #FFFCF6; --ink: #3A2C20; --muted: #6E5E4E; --focus: #6B4A2E;
  --gold1: #7A5A3A; --gold2: #C9A57A; --gold3: #8E6A44; --line: rgba(122, 90, 58, 0.26);
  --env1: #F7F1E8; --env2: #EDE3D4; --env3: #EDE3D4; --env-ink: #6B4A2E; --wax1: #8E6A44; --wax2: #57402A; --wax-ink: #FFFCF6;
  --btn: linear-gradient(135deg, #6B4A2E, #8E6A44 55%, #57402A); --btn-ink: #FFFCF6;
  --card: rgba(255, 252, 246, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #6B4A2E; --f-head: 'Cormorant SC';
  --zone-top: 12svh; --sc-ink: #4A3526; --sc-caps: #7A5A3A; --sc-n1: #9C7A55; --sc-n2: #7A5A3A; --sc-n3: #57402A;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="ala-jip"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="altyn-kuz"] {
  --bg: #FAF2E6; --bg2: #F2E4CF; --paper: #FFFBF4; --ink: #3E2A14; --muted: #735E46; --focus: #8A5A1E;
  --gold1: #8A5A1E; --gold2: #D9A55A; --gold3: #A8702A; --line: rgba(138, 90, 30, 0.26);
  --env1: #FAF2E6; --env2: #F2E4CF; --env3: #F2E4CF; --env-ink: #8A5A1E; --wax1: #B57A32; --wax2: #6E4614; --wax-ink: #FFFBF4;
  --btn: linear-gradient(135deg, #8A5A1E, #B57A32 55%, #6E4614); --btn-ink: #FFFBF4;
  --card: rgba(255, 251, 244, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #8A5A1E; --f-head: 'Cormorant SC';
  --zone-top: 10svh; --sc-ink: #4A2A10; --sc-caps: #8A5A1E; --sc-n1: #A8702A; --sc-n2: #8A5A1E; --sc-n3: #5E3A10;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,240,220,.15); --sc-align: center;
}
body[data-theme="altyn-kuz"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="tunku-asman"] {
  --bg: #0B1230; --bg2: #101A3E; --paper: #142048; --ink: #F1E8D6; --muted: #AEB4C8; --focus: #F4DFA6;
  --gold1: #C49A4A; --gold2: #F4DFA6; --gold3: #D6AE5C; --line: rgba(196, 154, 74, 0.26);
  --env1: #0B1230; --env2: #101A3E; --env3: #101A3E; --env-ink: #F4DFA6; --wax1: #F0D69A; --wax2: #B38633; --wax-ink: #0B1230;
  --btn: linear-gradient(135deg, #B88C3C, #F0D69A 55%, #B38633); --btn-ink: #0B1230;
  --card: rgba(20, 32, 72, 0.72); --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  --accent: #F4DFA6; --f-head: 'Cormorant SC';
  --zone-top: 12svh; --sc-ink: #F1E8D6; --sc-caps: #E6CF9A; --sc-n1: #FFF3D2; --sc-n2: #E8C77F; --sc-n3: #C99A48;
  --sc-shadow: 0 2px 18px rgba(0, 0, 0, .45); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="tuman"] {
  --bg: #EEEDEA; --bg2: #E4E2DE; --paper: #F7F6F3; --ink: #2F3133; --muted: #66696C; --focus: #45494D;
  --gold1: #3C4044; --gold2: #7E8286; --gold3: #55595D; --line: rgba(60, 64, 68, 0.26);
  --env1: #EEEDEA; --env2: #E4E2DE; --env3: #E4E2DE; --env-ink: #45494D; --wax1: #5F6367; --wax2: #3C4044; --wax-ink: #F7F6F3;
  --btn: linear-gradient(135deg, #45494D, #5F6367 55%, #3C4044); --btn-ink: #F7F6F3;
  --card: rgba(247, 246, 243, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #45494D; --f-head: 'Cormorant SC';
  --zone-top: 14svh; --sc-ink: #2F3133; --sc-caps: #55595D; --sc-n1: #6E7276; --sc-n2: #45494D; --sc-n3: #2F3133;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,255,255,.15); --sc-align: center;
}
body[data-theme="tuman"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="kyzyl-kiyiz"] {
  --bg: #3A0D18; --bg2: #4A1220; --paper: #561727; --ink: #F5E8D8; --muted: #D4B9AE; --focus: #F4DFA6;
  --gold1: #C9A04F; --gold2: #F6E2A8; --gold3: #DDB565; --line: rgba(201, 160, 79, 0.26);
  --env1: #3A0D18; --env2: #4A1220; --env3: #4A1220; --env-ink: #F4DFA6; --wax1: #F2D99C; --wax2: #B48635; --wax-ink: #3A0D18;
  --btn: linear-gradient(135deg, #BC9040, #F2D99C 55%, #B48635); --btn-ink: #3A0D18;
  --card: rgba(86, 23, 39, 0.72); --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  --accent: #F4DFA6; --f-head: 'Cormorant SC';
  --zone-top: 30svh; --sc-ink: #FBEBD6; --sc-caps: #EBCB8E; --sc-n1: #FFF0C8; --sc-n2: #E8C77F; --sc-n3: #C99A48;
  --sc-shadow: 0 2px 18px rgba(0, 0, 0, .45); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="altyn-jibek"] {
  --bg: #FBF7EF; --bg2: #F4ECDD; --paper: #FFFDF8; --ink: #3B2F22; --muted: #6F5E49; --focus: #8A6A2C;
  --gold1: #9C7531; --gold2: #E3C77E; --gold3: #B48A3E; --line: rgba(156, 117, 49, 0.26);
  --env1: #FBF7EF; --env2: #F4ECDD; --env3: #F4ECDD; --env-ink: #8A6A2C; --wax1: #D9B867; --wax2: #A47B32; --wax-ink: #FFFDF6;
  --btn: linear-gradient(135deg, #B38A3D, #D9B867 55%, #A47B32); --btn-ink: #FFFDF6;
  --card: rgba(255, 253, 248, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #8A6A2C; --f-head: 'Cormorant SC';
  --zone-top: 22svh; --sc-ink: #4A3A22; --sc-caps: #8E2A20; --sc-n1: #C9A25A; --sc-n2: #A47B32; --sc-n3: #7E5A1E;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="altyn-jibek"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="nuska"] {
  --bg: #0D2B25; --bg2: #113A31; --paper: #14443A; --ink: #F1E8D6; --muted: #B5C4B8; --focus: #F2DA9C;
  --gold1: #C49A4A; --gold2: #F2DA9C; --gold3: #D0A957; --line: rgba(196, 154, 74, 0.26);
  --env1: #0D2B25; --env2: #113A31; --env3: #113A31; --env-ink: #F2DA9C; --wax1: #EED394; --wax2: #B38633; --wax-ink: #0D2B25;
  --btn: linear-gradient(135deg, #B88C3C, #EED394 55%, #B38633); --btn-ink: #0D2B25;
  --card: rgba(20, 68, 58, 0.72); --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  --accent: #F2DA9C; --f-head: 'Cormorant SC';
  --zone-top: 24svh; --sc-ink: #F4EAD3; --sc-caps: #E2C68A; --sc-n1: #FFF0C8; --sc-n2: #E8C77F; --sc-n3: #C99A48;
  --sc-shadow: 0 2px 18px rgba(0, 0, 0, .45); --sc-veil: rgba(0,0,0,0); --sc-align: center; --sc-size: 100% 100%;
}
body[data-theme="tunduk"] {
  --bg: #F6EEE1; --bg2: #EDE1CE; --paper: #FCF7EE; --ink: #3A231C; --muted: #6E5446; --focus: #A3271F;
  --gold1: #A3271F; --gold2: #D2563F; --gold3: #B33A2A; --line: rgba(163, 39, 31, 0.26);
  --env1: #F6EEE1; --env2: #EDE1CE; --env3: #EDE1CE; --env-ink: #A3271F; --wax1: #C94A35; --wax2: #8F2019; --wax-ink: #FCF7EE;
  --btn: linear-gradient(135deg, #A3271F, #C94A35 55%, #8F2019); --btn-ink: #FCF7EE;
  --card: rgba(252, 247, 238, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #A3271F; --f-head: 'Cormorant SC';
  --zone-top: 22svh; --sc-ink: #4A1E18; --sc-caps: #8E2A20; --sc-n1: #B33A2A; --sc-n2: #8E2A20; --sc-n3: #5E1A14;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="tunduk"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="tasma"] {
  --bg: #F6EEE1; --bg2: #EDE1CE; --paper: #FCF7EE; --ink: #3A231C; --muted: #6E5446; --focus: #A3271F;
  --gold1: #A3271F; --gold2: #D2563F; --gold3: #B33A2A; --line: rgba(163, 39, 31, 0.26);
  --env1: #F6EEE1; --env2: #EDE1CE; --env3: #EDE1CE; --env-ink: #A3271F; --wax1: #C94A35; --wax2: #8F2019; --wax-ink: #FCF7EE;
  --btn: linear-gradient(135deg, #A3271F, #C94A35 55%, #8F2019); --btn-ink: #FCF7EE;
  --card: rgba(252, 247, 238, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #A3271F; --f-head: 'Cormorant SC';
  --zone-top: 25svh; --sc-ink: #4A1E18; --sc-caps: #8E2A20; --sc-n1: #B33A2A; --sc-n2: #8E2A20; --sc-n3: #5E1A14;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="tasma"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="kemer"] {
  --bg: #F6EEE1; --bg2: #EDE1CE; --paper: #FCF7EE; --ink: #3A231C; --muted: #6E5446; --focus: #A3271F;
  --gold1: #A3271F; --gold2: #D2563F; --gold3: #B33A2A; --line: rgba(163, 39, 31, 0.26);
  --env1: #F6EEE1; --env2: #EDE1CE; --env3: #EDE1CE; --env-ink: #A3271F; --wax1: #C94A35; --wax2: #8F2019; --wax-ink: #FCF7EE;
  --btn: linear-gradient(135deg, #A3271F, #C94A35 55%, #8F2019); --btn-ink: #FCF7EE;
  --card: rgba(252, 247, 238, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #A3271F; --f-head: 'Cormorant SC';
  --zone-top: 30svh; --sc-ink: #4A1E18; --sc-caps: #8E2A20; --sc-n1: #B33A2A; --sc-n2: #8E2A20; --sc-n3: #5E1A14;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="kemer"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="sep"] {
  --bg: #F6F1E8; --bg2: #ECE3D4; --paper: #FFFCF6; --ink: #1E2E32; --muted: #5E6A6C; --focus: #1F5560;
  --gold1: #1F5560; --gold2: #7FA8AE; --gold3: #2E7180; --line: rgba(31, 85, 96, 0.26);
  --env1: #F6F1E8; --env2: #ECE3D4; --env3: #ECE3D4; --env-ink: #1F5560; --wax1: #2E7180; --wax2: #143A42; --wax-ink: #FFFCF6;
  --btn: linear-gradient(135deg, #1F5560, #2E7180 55%, #143A42); --btn-ink: #FFFCF6;
  --card: rgba(255, 252, 246, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #1F5560; --f-head: 'Cormorant SC';
  --zone-top: 20svh; --sc-ink: #173D45; --sc-caps: #1F5560; --sc-n1: #2E7180; --sc-n2: #1F5560; --sc-n3: #143A42;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="sep"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="tor"] {
  --bg: #F6EEE1; --bg2: #EDE1CE; --paper: #FCF7EE; --ink: #3A231C; --muted: #6E5446; --focus: #A3271F;
  --gold1: #A3271F; --gold2: #D2563F; --gold3: #B33A2A; --line: rgba(163, 39, 31, 0.26);
  --env1: #F6EEE1; --env2: #EDE1CE; --env3: #EDE1CE; --env-ink: #A3271F; --wax1: #C94A35; --wax2: #8F2019; --wax-ink: #FCF7EE;
  --btn: linear-gradient(135deg, #A3271F, #C94A35 55%, #8F2019); --btn-ink: #FCF7EE;
  --card: rgba(252, 247, 238, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #A3271F; --f-head: 'Cormorant SC';
  --zone-top: 24svh; --sc-ink: #4A1E18; --sc-caps: #8E2A20; --sc-n1: #B33A2A; --sc-n2: #8E2A20; --sc-n3: #5E1A14;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(0,0,0,0); --sc-align: center; --sc-left: 14%;
}
body[data-theme="tor"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="dastorkon"] {
  --bg: #FAF2E6; --bg2: #F2E4CF; --paper: #FFFBF4; --ink: #3E2A14; --muted: #735E46; --focus: #8A5A1E;
  --gold1: #8A5A1E; --gold2: #D9A55A; --gold3: #A8702A; --line: rgba(138, 90, 30, 0.26);
  --env1: #FAF2E6; --env2: #F2E4CF; --env3: #F2E4CF; --env-ink: #8A5A1E; --wax1: #B57A32; --wax2: #6E4614; --wax-ink: #FFFBF4;
  --btn: linear-gradient(135deg, #8A5A1E, #B57A32 55%, #6E4614); --btn-ink: #FFFBF4;
  --card: rgba(255, 251, 244, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #8A5A1E; --f-head: 'Cormorant SC';
  --zone-top: 16svh; --sc-ink: #4A2A10; --sc-caps: #8E2A20; --sc-n1: #A8702A; --sc-n2: #8A5A1E; --sc-n3: #5E3A10;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(0,0,0,0); --sc-align: center;
}
body[data-theme="dastorkon"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="tan"] {
  --bg: #F7F1EA; --bg2: #EEE3D8; --paper: #FFFCF8; --ink: #3A2A38; --muted: #6D5C68; --focus: #6E3B5A;
  --gold1: #8E5E3A; --gold2: #D7A86E; --gold3: #A8743F; --line: rgba(142, 94, 58, 0.26);
  --env1: #F7F1EA; --env2: #EEE3D8; --env3: #EEE3D8; --env-ink: #6E3B5A; --wax1: #8D4A6C; --wax2: #4E2239; --wax-ink: #FFF7EE;
  --btn: linear-gradient(135deg, #5E2C47, #8D4A6C 55%, #4E2239); --btn-ink: #FFF7EE;
  --card: rgba(255, 252, 248, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #6E3B5A; --f-head: 'Cormorant SC';
  --zone-top: 13svh; --sc-ink: #3A2A38; --sc-caps: #6E3B5A; --sc-n1: #9A4E68; --sc-n2: #7A2E4A; --sc-n3: #5A1E36;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,240,230,.25); --sc-align: center; --sc-size: 100% 100%;
}
body[data-theme="tan"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="kuzgu-jailoo"] {
  --bg: #FAF2E6; --bg2: #F2E4CF; --paper: #FFFBF4; --ink: #3E2A14; --muted: #735E46; --focus: #8A5A1E;
  --gold1: #8A5A1E; --gold2: #D9A55A; --gold3: #A8702A; --line: rgba(138, 90, 30, 0.26);
  --env1: #FAF2E6; --env2: #F2E4CF; --env3: #F2E4CF; --env-ink: #8A5A1E; --wax1: #B57A32; --wax2: #6E4614; --wax-ink: #FFFBF4;
  --btn: linear-gradient(135deg, #8A5A1E, #B57A32 55%, #6E4614); --btn-ink: #FFFBF4;
  --card: rgba(255, 251, 244, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #8A5A1E; --f-head: 'Cormorant SC';
  --zone-top: 14svh; --sc-ink: #4A2A10; --sc-caps: #7A2E20; --sc-n1: #A8702A; --sc-n2: #8A5A1E; --sc-n3: #5E3A10;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(0,0,0,0); --sc-align: center; --sc-size: 100% 100%;
}
body[data-theme="kuzgu-jailoo"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="jaz"] {
  --bg: #F3F5EF; --bg2: #E6EBE0; --paper: #FCFDFA; --ink: #22302C; --muted: #5E6B66; --focus: #2E5E57;
  --gold1: #2E5E57; --gold2: #8FB3A8; --gold3: #3E7A70; --line: rgba(46, 94, 87, 0.26);
  --env1: #F3F5EF; --env2: #E6EBE0; --env3: #E6EBE0; --env-ink: #2E5E57; --wax1: #3E7A70; --wax2: #1E403B; --wax-ink: #FCFDFA;
  --btn: linear-gradient(135deg, #2E5E57, #3E7A70 55%, #1E403B); --btn-ink: #FCFDFA;
  --card: rgba(252, 253, 250, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #2E5E57; --f-head: 'Cormorant SC';
  --zone-top: 14svh; --sc-ink: #1F3E3A; --sc-caps: #2E5E57; --sc-n1: #3E7A70; --sc-n2: #2E5E57; --sc-n3: #1E403B;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,255,255,.15); --sc-align: center; --sc-size: 100% 100%;
}
body[data-theme="jaz"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body[data-theme="kysh"] {
  --bg: #F3F4F8; --bg2: #E6E8EF; --paper: #FCFCFE; --ink: #22263A; --muted: #5E6276; --focus: #8A1E2C;
  --gold1: #8A1E2C; --gold2: #C9707C; --gold3: #A8324A; --line: rgba(138, 30, 44, 0.26);
  --env1: #F3F4F8; --env2: #E6E8EF; --env3: #E6E8EF; --env-ink: #8A1E2C; --wax1: #A8324A; --wax2: #6E1622; --wax-ink: #FCFCFE;
  --btn: linear-gradient(135deg, #8A1E2C, #A8324A 55%, #6E1622); --btn-ink: #FCFCFE;
  --card: rgba(252, 252, 254, 0.9); --shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --accent: #8A1E2C; --f-head: 'Cormorant SC';
  --zone-top: 14svh; --sc-ink: #2A2F45; --sc-caps: #8A1E2C; --sc-n1: #A8324A; --sc-n2: #8A1E2C; --sc-n3: #5E1420;
  --sc-shadow: 0 1px 14px rgba(255, 255, 255, .55); --sc-veil: rgba(255,255,255,.15); --sc-align: center; --sc-size: 100% 100%;
}
body[data-theme="kysh"] :is(.h-script.gold, .greet.script.gold) { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
/* SCENES:END */
