/* «Мой тайный друг»: типографика-блоки, как в расписаниях Swiss-графики. Чёрный холст, плоские цветные плашки без скруглений и теней,
   плотный гротеск крупно, плашки лесенкой. Вайб игры = набор цветов плашек (--c1..--c4). Текст на плашках всегда чёрный: цвета подобраны светлыми. */
:root, :root[data-scheme="dark"], :root[data-scheme="light"] {
  --bg: #000; --fg: #F4F2EE; --fg2: #D3D0CA; --blk: #0B0B0B;
  --c1: #F69862; --c2: #E8EB1A; --c3: #CCAA8A; --c4: #9DB7D5; --hi: #E8EB1A;
  --font: "Helvetica Neue", Helvetica, Arial, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ink: #000; --ink2: #000; --ink3: #000;
  --glass: var(--c1); --glass-strong: #F4F2EE; --glass-line: transparent; --line: #000; --chip: var(--c4);
  --btn: var(--hi); --btn-ink: #000; --dot: var(--hi); --sheet-bg: #000; --shadow: none; --r: 0; --r-sm: 0;
  --good: #3DDC84; --danger: #FF6B5A; color-scheme: dark;
}
:root[data-vibe="ny"] { --c1: #FF9088; --c2: #F4F2EE; --c3: #2FC77D; --c4: #FFD23F; --hi: #FFD23F; }
:root[data-vibe="xmas"] { --c1: #2FC77D; --c2: #FF9088; --c3: #F2E8CF; --c4: #FFD23F; --hi: #F2E8CF; }
:root[data-vibe="church"] { --bg: #F7FBFF; --fg: #0A0A0A; --fg2: #3B4A5A; --c1: #8EC2F0; --c2: #FFFFFF; --c3: #79B5EC; --c4: #D6E9FB; --hi: #79B5EC; --sheet-bg: #F7FBFF; color-scheme: light; }
:root[data-vibe="bday"] { --c1: #FFD23F; --c2: #FF8ABF; --c3: #4CC9F0; --c4: #F69862; --hi: #FFD23F; }
:root[data-vibe="family"] { --c1: #F69862; --c2: #E8EB1A; --c3: #CCAA8A; --c4: #9DB7D5; --hi: #E8EB1A; }
:root[data-vibe="office"] { --c1: #D9D9D9; --c2: #9DB7D5; --c3: #E8EB1A; --c4: #F69862; --hi: #E8EB1A; }
:root[data-vibe="spring"] { --c1: #C9A7F5; --c2: #A8E6A1; --c3: #FFD6E8; --c4: #E8EB1A; --hi: #A8E6A1; }
:root[data-vibe="valentine"] { --c1: #FF8CA7; --c2: #FFC2D1; --c3: #F4F2EE; --c4: #FFD23F; --hi: #FFC2D1; }
:root[data-vibe="summer"] { --c1: #3DD6E0; --c2: #FFD23F; --c3: #FF9F6B; --c4: #F4F2EE; --hi: #FFD23F; }
:root[data-vibe="cozy"] { --c1: #CCAA8A; --c2: #E8C9A0; --c3: #F69862; --c4: #F2E8CF; --hi: #E8C9A0; }

html, body { background: var(--bg); color: var(--fg); font-family: var(--font); }
body::before, body::after { display: none !important; }
#app { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.screen, .stagger > * { animation: none; }

/* заголовки: огромные, плотные, как на афише */
h1 { font-size: clamp(40px, 13vw, 60px); font-weight: 800; letter-spacing: -.045em; line-height: .96; margin: 14px 0 10px; color: var(--fg); background: none; display: block; overflow-wrap: anywhere; }
h2 { font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fg); margin: 32px 0 8px; border-top: 3px solid var(--fg); padding-top: 8px; }
.sub { color: var(--fg2); font-size: 16px; line-height: 1.3; }
.brand { font-size: 17px; font-weight: 800; letter-spacing: -.03em; color: var(--fg); }
.brand i { color: var(--hi); }
.top { min-height: 52px; }
.back { color: var(--fg); }
.top .brand { margin-left: 2px; }

/* плашки: цветные прямоугольники, лесенкой */
.glass { background: var(--c1); color: #000; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; border-radius: 0; box-shadow: none; }
.glass.s0 { background: var(--c1); } .glass.s1 { background: var(--c2); } .glass.s2 { background: var(--c4); }
.glass { margin-right: 32px; } .glass.ofs { margin-right: 0; margin-left: 32px; }
.glass.gcard, .glass.reveal { margin-right: 0; margin-left: 0; }
.list.glass { overflow: visible; }
.card { padding: 18px; }
.row { padding: 14px 16px; min-height: 56px; color: #000; }
.row + .row::before { left: 0; right: 0; height: 0; background: none; border-top: 3px solid #000; }
.row .t b { font-weight: 800; font-size: 20px; letter-spacing: -.03em; line-height: 1.05; }
.row .t small { color: #000; font-size: 16px; opacity: 1; font-weight: 700; }
.row .go, .row svg { color: #000; }
.row:active { background: rgba(0,0,0,.14); }
.avatar { border-radius: 0; background: #000; color: var(--c1); border: 0; font-weight: 800; }

/* кнопки: чистые прямоугольники */
.btn { height: 64px; border-radius: 0; background: var(--hi); color: #000; font-weight: 800; font-size: 20px; letter-spacing: -.03em; box-shadow: none; border: 0; justify-content: space-between; padding: 0 18px; }
.btn:active { transform: none; filter: brightness(.82); }
.btn.soft { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 3px var(--fg); }
.btn.quiet { background: none; color: var(--fg); height: 44px; font-weight: 700; justify-content: center; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.btn.danger { background: none; color: var(--danger); box-shadow: none; justify-content: center; }
.btn[disabled] { opacity: 1; background: #1E1E1E; color: #C9C6C0; }
:root[data-vibe="church"] .btn[disabled] { background: #E3EEF9; color: #3B4A5A; }
:root[data-vibe="church"] .btn.soft { box-shadow: inset 0 0 0 3px #0A0A0A; }
:root[data-vibe="church"] .btn.quiet { color: #0A0A0A; }

/* метки, поля */
.chip { background: var(--c4); color: #000; border-radius: 0; font-weight: 800; padding: 6px 10px; font-size: 16px; letter-spacing: -.01em; }
.chip.dot { background: var(--c2); }
.chip.dot::before { background: #000; border-radius: 0; width: 8px; height: 8px; }
.chip.toggle { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 2px var(--fg); }
.chip.toggle[aria-pressed="true"] { background: var(--hi); color: #000; box-shadow: none; }
.field span { color: var(--fg); font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.field input, .field textarea, .field select { background: #F4F2EE; color: #000; border: 0; border-radius: 0; font-weight: 600; }
.field input:focus, .field textarea:focus, .field select:focus { box-shadow: 0 0 0 4px var(--hi); }
.field input::placeholder, .field textarea::placeholder { color: #5E5B55; }
:root[data-vibe="church"] .field input, :root[data-vibe="church"] .field textarea, :root[data-vibe="church"] .field select { background: #fff; box-shadow: inset 0 0 0 3px #0A0A0A; }

/* пустые состояния и «вы дарите» */
.empty { text-align: left; padding: 22px 18px 20px; }
.empty .art { background: #000; color: var(--c1); border: 0; border-radius: 0; width: 56px; height: 56px; margin: 0 0 14px; }
.empty b { font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1; display: block; }
.empty p { color: #000; margin: 10px 0 18px; max-width: none; font-size: 16px; font-weight: 500; }
.reveal { text-align: left; padding: 22px 18px; }
.reveal small { color: #000; font-weight: 800; letter-spacing: .08em; }
.reveal .who { font-size: clamp(44px, 15vw, 68px); font-weight: 800; letter-spacing: -.05em; line-height: .92; animation: none; }
.reveal .who i { color: #000; }
.gcard, .gcard.v2 { background: var(--c1) !important; border: 0 !important; box-shadow: none !important; border-radius: 0; min-height: 150px; height: auto; color: #000; }
.gcard::before, .gcard.v2::before { display: none; }
.gcard .big, .gcard.v2 .nm { font-size: clamp(44px, 15vw, 64px); font-weight: 800; letter-spacing: -.05em; line-height: .92; color: #000; }
.gcard .k, .gcard .low, .gcard.v2 .nsub, .gcard.v2 .logo { color: #000; }
.gcard.v2 .logo i { color: #000; }
.note { color: var(--fg2); }

/* нижняя панель */
.tabbar { padding: 0; }
.tabbar nav { max-width: none; width: 100%; border-radius: 0; padding: 0 0 env(safe-area-inset-bottom); gap: 0; background: var(--bg); border-top: 3px solid var(--fg); }
.tabbar button { color: var(--fg); border-radius: 0; font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; padding: 16px 0 15px; }
.tabbar button svg { display: none; }
.tabbar button.on { background: var(--hi); color: #000; }
.scrim { background: rgba(0,0,0,.6); }
.sheet > div { background: var(--sheet-bg); border-radius: 0; border-top: 3px solid var(--fg); color: var(--fg); }
.sheet .grab { display: none; }
.sheet h3 { font-size: 34px; font-weight: 800; letter-spacing: -.045em; line-height: 1; margin: 12px 0 6px; }
.toast { background: var(--hi); color: #000; border-radius: 0; font-weight: 800; }
.link { color: var(--fg); text-decoration-thickness: 2px; }
.btn svg { stroke: #000; }
.btn.soft svg { stroke: var(--fg); }

/* выбор вайба: образцы из двух плашек */
.vibes { gap: 6px; }
.vibe { background: transparent; border-radius: 0; box-shadow: inset 0 0 0 2px var(--fg); color: var(--fg); font-weight: 800; letter-spacing: -.02em; min-height: 52px; padding: 6px 10px 6px 6px; }
.vibe i { width: 38px; height: 38px; border-radius: 0; box-shadow: none; }
.vibe[aria-pressed="true"] { background: var(--hi); color: #000; box-shadow: none; }
.lbl { color: var(--fg); font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
:root[data-vibe="church"] .vibe { box-shadow: inset 0 0 0 2px #0A0A0A; color: #0A0A0A; }
:root[data-vibe="church"] .vibe[aria-pressed="true"] { background: var(--hi); color: #000; }
:root[data-vibe="church"] .btn.danger { color: #B3261E; }
:root[data-vibe="church"] .brand i { color: #0A0A0A; }
.tabbar .glass, .tabbar nav { margin: 0 !important; }
.field span.opt { color: var(--fg2); text-transform: none; font-weight: 500; letter-spacing: 0; }
:root[data-vibe="church"] .field span.opt { color: #3B4A5A; }
.glass .sub, .glass p, .glass small { color: #000; }
.glass .btn { background: #000; color: var(--hi); } .glass .btn svg { stroke: var(--hi); }

/* афиша поводов на главном экране: плитки лесенкой, у каждой своя палитра вайба */
.poster { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
.tile { position: relative; display: flex; align-items: flex-start; text-align: left; width: 100%; min-height: 128px; padding: 16px 12px 40px; color: #000; overflow: hidden; }
.tile:nth-child(4n+2), .tile:nth-child(4n+3) { margin-top: 24px; }
.tile:nth-child(3n) { min-height: 152px; }
.tile .tn { font-size: 26px; font-weight: 800; letter-spacing: -.045em; line-height: .98; overflow-wrap: anywhere; }
.tile i { position: absolute; right: 0; bottom: 0; width: 46%; height: 30px; }
.tile:active { filter: brightness(.85); }

/* мельче 14 пикселей не делаем */
.avatars .avatar { font-size: 14px; }
.reveal small, .gcard .k, .gcard .low, .q small { font-size: 14px; font-weight: 700; color: #000; }
.screen > div > p, .screen p.center { color: var(--fg2); }
.glass p, .glass .empty p { color: #000; }
:root[data-vibe="church"] .screen > div > p, :root[data-vibe="church"] .screen p.center { color: var(--fg2); }
:root, :root[data-scheme="dark"], :root[data-scheme="light"] { --danger: #FFBDB3; }
.avatar { color: #fff; }
.gcard.v2 .nsub { font-weight: 800; }
.glass p { font-weight: 700; }

/* правки по независимой проверке: ровный ритм по шагу 8 */
.tile:nth-child(3n) { min-height: 128px; }
.tile { min-height: 144px; }
.poster { gap: 8px; }
#app { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.vibes { gap: 8px !important; }
.vibe { height: 56px; min-height: 56px; }
.field span.opt { display: block; margin-top: 2px; }
.field input, .field select { color-scheme: light; }
.btn { justify-content: flex-start; gap: 12px; }
h1 { text-wrap: balance; }
.tabbar nav { min-height: 56px; }
.tabbar button { min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 0; }
.empty { text-align: left; }

/* фокус поля: в тёмной схеме старый стиль делал фон полупрозрачным тёмным, а буквы чёрными — их не было видно */
:root[data-scheme] .field input:focus, :root[data-scheme] .field textarea:focus, :root[data-scheme] .field select:focus { background: #F4F2EE; color: #000; border-color: transparent; box-shadow: 0 0 0 4px var(--hi); }
:root[data-vibe="church"][data-scheme] .field input:focus, :root[data-vibe="church"][data-scheme] .field textarea:focus, :root[data-vibe="church"][data-scheme] .field select:focus { background: #fff; box-shadow: inset 0 0 0 3px #0A0A0A, 0 0 0 4px var(--hi); }
.field input:-webkit-autofill, .field input:-webkit-autofill:focus { -webkit-text-fill-color: #000; box-shadow: 0 0 0 100px #F4F2EE inset; }
