/* Андріївські вечорниці — на основі структури Start Bootstrap "Coming Soon" */

:root {
    --night: #0b1020;
    --panel: rgba(14, 10, 12, 0.88);
    --accent: #c8102e;      /* червоний вишиванковий */
    --gold: #e8b04a;        /* полум'я / віск */
    --text-soft: #e9dfd0;
}

html, body {
    height: 100%;
    min-height: 35rem;
    margin: 0;
}

body {
    font-family: "Rubik", system-ui, sans-serif;
    background: var(--night);
    color: var(--text-soft);
    overflow-x: hidden;
}

h1 {
    font-family: "Tinos", Georgia, serif;
    font-size: clamp(2.6rem, 5vw, 3.8rem);
    color: #fff;
}

/* ---------- Сцена: стіна кімнати, вікно, підвіконня зі свічками ---------- */
.scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    /* темна стіна хати, підсвічена свічками знизу */
    background:
        radial-gradient(ellipse 520px 420px at calc(100% - 7rem - 190px) 78%, rgba(232, 160, 70, 0.30), transparent 70%),
        repeating-linear-gradient(97deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 9px),
        linear-gradient(180deg, #120d10 0%, #1d1416 55%, #261a17 100%);
}

.room-window {
    position: absolute;
    right: 7rem;
    bottom: 12vh;
    width: min(28vw, 380px);
}

/* Рама */
.frame {
    position: relative;
    height: 58vh;
    padding: 16px;
    border-radius: 4px 4px 0 0;
    background:
        repeating-linear-gradient(90deg, rgba(40, 20, 6, 0) 0 11px, rgba(40, 20, 6, 0.22) 11px 12px),
        linear-gradient(135deg, #7a4a24 0%, #5a3519 50%, #43270f 100%);
    box-shadow:
        0 0 0 6px #2e1a0b,                   /* наличник */
        0 20px 50px rgba(0, 0, 0, 0.6),
        inset 0 0 0 2px rgba(255, 210, 150, 0.12);
}

/* Скло з нічним небом */
.glass {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #070a18 0%, #121a3c 65%, #1f2246 100%);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.8);
}
/* легкий іній по кутах */
.glass::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0 100%, rgba(220, 235, 255, 0.22), transparent 30%),
        radial-gradient(circle at 100% 100%, rgba(220, 235, 255, 0.18), transparent 26%),
        radial-gradient(circle at 0 0, rgba(220, 235, 255, 0.12), transparent 22%);
}
/* відблиск свічок на склі */
.reflection {
    position: absolute;
    left: 50%;
    bottom: -40px;
    width: 260px;
    height: 160px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(255, 190, 90, 0.22), transparent 70%);
}

.stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 40% 70%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 60% 20%, #fff, transparent),
        radial-gradient(1px 1px at 75% 45%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 85% 15%, #fff, transparent),
        radial-gradient(1px 1px at 10% 55%, #fff, transparent),
        radial-gradient(1px 1px at 55% 50%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 30% 8%, #fff, transparent);
    background-size: 200px 220px;
    animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes twinkle {
    from { opacity: 0.5; }
    to   { opacity: 1; }
}

.moon {
    position: absolute;
    top: 10%;
    right: 18%;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: transparent;
    /* серп: тінь кола, зсунута вліво */
    box-shadow: -15px 5px 0 0 #f6edd2;
    filter: drop-shadow(0 0 18px rgba(246, 237, 210, 0.45));
}

/* Хрестовина рами */
.mullion-v,
.mullion-h {
    position: absolute;
    background: linear-gradient(90deg, #4a2c14, #6e4320 50%, #4a2c14);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}
.mullion-v {
    top: 16px;
    bottom: 16px;
    left: 50%;
    width: 12px;
    transform: translateX(-50%);
}
.mullion-h {
    left: 16px;
    right: 16px;
    top: 38%;
    height: 12px;
    background: linear-gradient(180deg, #4a2c14, #6e4320 50%, #4a2c14);
}

/* ---------- Дерев'яне підвіконня ---------- */
.sill {
    position: relative;
    height: 64px;
    margin: 0 -30px;   /* виступає за раму */
    z-index: 1;
}
/* верхня площина дошки, на якій стоять свічки */
.sill-top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 30px;
    background:
        radial-gradient(ellipse 200px 30px at 50% 45%, rgba(255, 190, 90, 0.55), transparent 70%),
        repeating-linear-gradient(178deg, rgba(60, 30, 10, 0) 0 4px, rgba(60, 30, 10, 0.25) 4px 5px, rgba(60, 30, 10, 0) 5px 11px),
        linear-gradient(180deg, #5a3519 0%, #7a4a24 60%, #8a5629 100%);
    clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%); /* перспектива */
}
/* передній торець */
.sill-front {
    position: absolute;
    left: 0;
    right: 0;
    top: 30px;
    bottom: 0;
    background:
        radial-gradient(ellipse 180px 24px at 50% 0%, rgba(255, 170, 70, 0.3), transparent 70%),
        repeating-linear-gradient(90deg, rgba(40, 20, 6, 0) 0 37px, rgba(40, 20, 6, 0.18) 37px 39px, rgba(40, 20, 6, 0) 39px 83px),
        linear-gradient(180deg, #6b3f1d 0%, #4a2a12 45%, #2e1a0b 100%);
    box-shadow: inset 0 2px 0 rgba(255, 210, 150, 0.35), 0 18px 30px rgba(0, 0, 0, 0.55);
    border-radius: 0 0 3px 3px;
}

/* ---------- Свічки ---------- */
.candles {
    position: absolute;
    left: 50%;
    bottom: 46px;          /* середина верхньої площини підвіконня */
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 1.6rem;
}

.candle {
    position: relative;
    width: 28px;
    background: linear-gradient(90deg, #e9dcc0, #fff8e6 45%, #d8c7a4);
    border-radius: 6px 6px 3px 3px;
}
.c1 { height: 110px; }
.c2 { height: 160px; width: 34px; }
.c3 { height: 85px; }

/* тінь свічки на дошці */
.candle::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 170%;
    height: 10px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(20, 8, 2, 0.6), transparent 70%);
    z-index: -1;
}
/* потеки воску */
.candle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 5px;
    width: 6px;
    height: 22px;
    border-radius: 0 0 4px 4px;
    background: #fff8e6;
    box-shadow: 12px -5px 0 -1px #f3e7cb;
}

.flame {
    position: absolute;
    left: 50%;
    top: -38px;
    width: 16px;
    height: 34px;
    transform: translateX(-50%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: radial-gradient(ellipse at 50% 70%, #fff6d0 0%, var(--gold) 45%, rgba(200, 80, 20, 0.8) 75%, transparent 100%);
    box-shadow: 0 0 40px 12px rgba(232, 176, 74, 0.45);
    animation: flicker 1.6s ease-in-out infinite alternate;
    transform-origin: 50% 100%;
}
.c2 .flame { animation-duration: 1.2s; }
.c3 .flame { animation-duration: 1.9s; }

@keyframes flicker {
    0%   { transform: translateX(-50%) scale(1, 1) rotate(-2deg); opacity: 0.95; }
    50%  { transform: translateX(-50%) scale(0.92, 1.08) rotate(2deg); opacity: 1; }
    100% { transform: translateX(-50%) scale(1.05, 0.95) rotate(-1deg); opacity: 0.9; }
}

/* ---------- Головна панель (як у шаблоні: скошена) ---------- */
.masthead {
    position: relative;
    z-index: 1;
    padding-bottom: 3rem;
}
.masthead::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--panel);
    backdrop-filter: blur(3px);
}
.masthead .masthead-content {
    position: relative;
    padding-top: 5rem;
    max-width: 36rem;
    margin: 0 auto;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

/* Орнаментальна смужка (ромби, як на вишиванці) */
.ornament {
    height: 18px;
    margin-bottom: 1.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Cpath d='M9 0 L18 9 L9 18 L0 9 Z' fill='%23c8102e'/%3E%3Cpath d='M9 5 L13 9 L9 13 L5 9 Z' fill='%23111'/%3E%3Cpath d='M27 4 L32 9 L27 14 L22 9 Z' fill='%23e8b04a'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    opacity: 0.9;
}

/* Відлік */
.countdown {
    display: flex;
    gap: 0.75rem;
}
.countdown > div {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.25rem;
    border: 1px solid rgba(232, 176, 74, 0.35);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
}
.countdown span {
    display: block;
    font-size: 1.7rem;
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.countdown small {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
}
.countdown.done {
    display: block;
    text-align: center;
    font-size: 1.2rem;
    color: var(--gold);
}

/* Форма */
.input-group-newsletter .form-control {
    height: 3.25rem;
    border: 0;
    border-radius: 0.35rem;
}
.input-group-newsletter .form-control.is-invalid {
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.6);
}
.btn-accent {
    height: 3.25rem;
    padding: 0 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 0.35rem;
}
.btn-accent:hover,
.btn-accent:focus {
    background: #a50d26;
    color: #fff;
}

.invalid-msg,
.success-msg {
    display: none;
    font-size: 0.9rem;
}
.invalid-msg { color: #ff8a98; }
.success-msg { color: var(--gold); }
.invalid-msg.show,
.success-msg.show { display: block; }

/* Ворожіння */
.fortune-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
}
.fortune-link:hover { color: #fff; }
.fortune {
    min-height: 1.5em;
    font-style: italic;
    color: #fff;
    transition: opacity 0.4s;
}

/* Соцмережі */
.social-icons {
    position: relative;
    z-index: 2;
}
.social-icons .btn {
    width: 3.25rem;
    height: 3.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(232, 176, 74, 0.4);
}
.social-icons .btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* ---------- Розділ «Види ворожінь» ---------- */
html { scroll-behavior: smooth; }

.rituals-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--text-soft);
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 1px dashed rgba(232, 176, 74, 0.6);
}
.rituals-link:hover { color: var(--gold); }

.rituals {
    position: relative;
    z-index: 3;
    padding: 5rem 0 4rem;
    background: rgba(14, 10, 12, 0.96);
    border-top: 6px solid var(--accent);
}
.rituals .ornament { max-width: 360px; }
.rituals h2 {
    font-family: "Tinos", Georgia, serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #fff;
}
.lead-soft {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-soft);
}

.ritual-card {
    height: 100%;
    padding: 1.6rem 1.5rem;
    border: 1px solid rgba(232, 176, 74, 0.25);
    border-radius: 0.75rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.ritual-card:hover {
    transform: translateY(-4px);
    border-color: rgba(232, 176, 74, 0.6);
    box-shadow: 0 10px 30px rgba(232, 160, 70, 0.12);
}
.ritual-icon {
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 0.9rem;
}
.ritual-card h3,
.kalyta h3 {
    font-family: "Tinos", Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.45rem;
    color: #fff;
    margin-bottom: 0.6rem;
}
.ritual-card p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}
.ritual-card .meaning {
    margin-bottom: 0;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(232, 176, 74, 0.3);
    color: #f3e2c4;
}
.ritual-card .meaning b { color: var(--gold); font-weight: 600; }

.kalyta {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(200, 16, 46, 0.55);
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.18), rgba(232, 176, 74, 0.08));
}
.kalyta .ritual-icon { font-size: 2.8rem; margin: 0; }

.disclaimer {
    font-size: 0.85rem;
    color: rgba(233, 223, 208, 0.6);
}

/* ---------- Гра «Кілки в тину» ---------- */
.ritual-card--play {
    position: relative;
    cursor: pointer;
    border-color: rgba(200, 16, 46, 0.6);
}
.ritual-card--play:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}
.play-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.6); }
    50%      { box-shadow: 0 0 0 8px rgba(200, 16, 46, 0); }
}

.game-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(5, 3, 8, 0.8);
    backdrop-filter: blur(4px);
}
.game-overlay[hidden] { display: none; }

.game-box {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 100%;
    overflow-y: auto;
    padding: 2rem 1.5rem 1.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(232, 176, 74, 0.35);
    background: linear-gradient(180deg, #1b1216, #120c0f);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    animation: pop 0.3s ease-out;
}
@keyframes pop {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.game-box h2 {
    font-family: "Tinos", Georgia, serif;
    font-weight: 700;
    color: #fff;
}
.game-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    border-radius: 50%;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.06);
}
.game-close:hover { background: var(--accent); color: #fff; }
.game-hint { font-size: 0.95rem; margin-bottom: 1.25rem; }

/* Сцена з тином */
.tyn-scene {
    position: relative;
    height: 210px;
    overflow: hidden;
    border-radius: 0.6rem;
    background:
        radial-gradient(circle at 82% 22%, rgba(246, 237, 210, 0.9) 0 14px, rgba(246, 237, 210, 0.15) 15px, transparent 40px),
        linear-gradient(180deg, #070a18 0%, #18204a 100%);
}
.tyn-strip {
    position: absolute;
    left: 0;
    bottom: 26px;
    height: 170px;
    will-change: transform;
}
/* лозини, що вплетені в тин */
.tyn-rod {
    position: absolute;
    left: 0;
    right: 0;
    height: 11px;
    border-radius: 6px;
    background: linear-gradient(180deg, #8a5a2c, #5b3717 60%, #3e240e);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
    z-index: 1;
}
.tyn-rod.r1 { bottom: 30px; }
.tyn-rod.r2 { bottom: 68px; }
.tyn-rod.r3 { bottom: 106px; }

/* кілок */
.stake {
    position: absolute;
    bottom: 0;
    width: 18px;
    border-radius: 3px;
    background: linear-gradient(90deg, #4b2e14, #7d5128 45%, #5a3718);
    clip-path: polygon(0 12px, 50% 0, 100% 12px, 100% 100%, 0 100%);
    transition: filter 0.2s;
}
.stake.front { z-index: 2; }          /* переплетення: кілок то перед лозиною, то за нею */
.stake.counted {
    filter: brightness(1.35) sepia(0.5) saturate(2);
}
.stake.current {
    filter: brightness(1.7) sepia(0.6) saturate(3) drop-shadow(0 0 8px rgba(232, 176, 74, 0.9));
}

/* «руки», що обхоплюють тин */
.tyn-hands {
    position: absolute;
    top: 14px;
    bottom: 18px;
    left: 50%;
    width: 64px;
    transform: translateX(-50%);
    border: 3px solid var(--gold);
    border-radius: 30px;
    box-shadow: 0 0 18px rgba(232, 176, 74, 0.6), inset 0 0 14px rgba(232, 176, 74, 0.35);
    z-index: 3;
    pointer-events: none;
}
.tyn-snow {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 30px;
    background: linear-gradient(180deg, #e9eef8, #c9d3e6);
    border-radius: 50% 50% 0 0 / 14px 14px 0 0;
    z-index: 4;
}

/* Лічильник і прогрес */
.tyn-counter {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 1.25rem;
}
.tyn-num {
    min-width: 2ch;
    text-align: right;
    font-size: 3rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.tyn-word {
    min-width: 6.5ch;
    font-family: "Tinos", Georgia, serif;
    font-style: italic;
    font-size: 1.6rem;
    color: var(--gold);
}
.tyn-word.odd { color: #ff8a98; }

.tyn-progress {
    height: 6px;
    margin-top: 0.9rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.tyn-progress div {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--gold), var(--accent));
}

.tyn-result {
    min-height: 3.2rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 1.1rem;
    color: #fff;
}
.tyn-result b { color: var(--gold); }
.tyn-result.show { animation: pop 0.35s ease-out; }

/* ---------- Гра «Вареники з сюрпризом» ---------- */
.plate {
    position: relative;
    width: min(340px, 78vw);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    /* розписна тарілка: синій орнамент по краю */
    background:
        radial-gradient(circle closest-side, #fbf6ec 0 80%, transparent 80.5%),
        repeating-conic-gradient(from 0deg, #1f4fa0 0 6deg, #fbf6ec 6deg 9deg, #c8102e 9deg 12deg, #fbf6ec 12deg 15deg),
        #fbf6ec;
    box-shadow:
        0 0 0 8px #f3ead8,
        0 0 0 10px #c9b998,
        0 18px 40px rgba(0, 0, 0, 0.6);
}
.plate::before {          /* внутрішня лінія тарілки */
    content: "";
    position: absolute;
    inset: 13%;
    border-radius: 50%;
    border: 2px solid rgba(31, 79, 160, 0.35);
    box-shadow: inset 0 6px 18px rgba(120, 90, 40, 0.12);
}

.varenyk {
    position: absolute;
    width: 26%;
    aspect-ratio: 3 / 2;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
    transition: left 0.45s ease-in-out, top 0.45s ease-in-out, transform 0.25s, opacity 0.4s;
    filter: drop-shadow(0 5px 5px rgba(90, 60, 20, 0.5));
}
.varenyk svg { width: 100%; height: 100%; display: block; }
.varenyk:hover:not(:disabled),
.varenyk:focus-visible {
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1.12);
    outline: none;
}
.varenyk:focus-visible { filter: drop-shadow(0 0 6px var(--gold)); }
.varenyk:disabled { cursor: default; }

/* обраний вареник «розламується» */
.varenyk.picked {
    z-index: 2;
    animation: wiggle 0.6s ease-in-out;
}
@keyframes wiggle {
    0%, 100% { transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1.15); }
    25%      { transform: translate(-50%, -50%) rotate(calc(var(--rot, 0deg) - 12deg)) scale(1.2); }
    75%      { transform: translate(-50%, -50%) rotate(calc(var(--rot, 0deg) + 12deg)) scale(1.2); }
}
.varenyk.opened { opacity: 0.25; }
.varenyk.others { opacity: 0.45; }

/* сюрприз, що з'являється над вареником */
.var-surprise {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    line-height: 1;
    pointer-events: none;
    z-index: 3;
    animation: rise 0.5s ease-out both;
}
.var-surprise.small {
    font-size: 1.4rem;
    animation-delay: 0.4s;
}
@keyframes rise {
    from { transform: translate(-50%, -20%) scale(0.3); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.var-result {
    min-height: 4.5rem;
    margin-top: 1.5rem;
    text-align: center;
    color: #fff;
}
.var-result .big {
    display: block;
    font-family: "Tinos", Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.7rem;
    color: var(--gold);
}
.var-result.show { animation: pop 0.35s ease-out; }

/* ---------- Сценка «Калита» (анімація в коді) ---------- */
.skit {
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid rgba(232, 176, 74, 0.35);
    background: #0d0809;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.skit-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(232, 176, 74, 0.2);
}
.skit-head h3 {
    margin: 0;
    font-family: "Tinos", Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.35rem;
    color: #fff;
}
.skit-head span { font-size: 0.8rem; color: var(--gold); white-space: nowrap; }

.skit-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.skit-stage svg { display: block; width: 100%; height: 100%; }

.sk-flame {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: skFlicker 0.9s ease-in-out infinite alternate;
}
.sk-flame2 { animation-duration: 1.2s; }
@keyframes skFlicker {
    from { transform: scale(1, 1) rotate(-3deg); }
    to   { transform: scale(0.85, 1.15) rotate(3deg); }
}

/* Репліки персонажів */
.skit-bubble {
    position: absolute;
    max-width: 38%;
    padding: 0.45em 0.8em;
    border-radius: 0.9em;
    background: #fffaf0;
    color: #2a1a12;
    font-size: clamp(11px, 1.55vw, 15px);
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    transform: translate(-50%, -100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.skit-bubble::after {        /* хвостик бульбашки */
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    border: 8px solid transparent;
    border-top-color: #fffaf0;
    border-bottom: 0;
    transform: translateX(-50%);
}
.skit-bubble.show { opacity: 1; }

/* Субтитри оповідача */
.skit-caption {
    position: absolute;
    left: 50%;
    bottom: 4%;
    max-width: 90%;
    padding: 0.35em 0.9em;
    border-radius: 0.4em;
    background: rgba(0, 0, 0, 0.62);
    color: #f6e7c8;
    font-size: clamp(11px, 1.5vw, 15px);
    font-style: italic;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.skit-caption.show { opacity: 1; }

/* Заставка з кнопкою */
.skit-poster {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    border: 0;
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    background: rgba(8, 5, 6, 0.45);
    cursor: pointer;
}
.skit-poster[hidden] { display: none; }
.skit-play-big {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    font-size: 2.4rem;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.6);
    animation: pulse 2s ease-in-out infinite;
    transition: transform 0.2s;
}
.skit-poster:hover .skit-play-big { transform: scale(1.08); }

/* Панель керування */
.skit-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    border-top: 1px solid rgba(232, 176, 74, 0.2);
}
.skit-controls button {
    width: 2.3rem;
    height: 2.3rem;
    flex: none;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.15rem;
}
.skit-controls button:hover { background: var(--accent); }
.skit-track {
    position: relative;
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}
.skit-track:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skit-track div {
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--gold), var(--accent));
}
.skit-time {
    font-size: 0.8rem;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.skit-controls button:disabled { opacity: 0.4; cursor: not-allowed; }
.skit-controls button:disabled:hover { background: rgba(255, 255, 255, 0.08); }
.skit-note {
    margin: 0;
    padding: 0.6rem 1rem 0.8rem;
    font-size: 0.82rem;
    color: rgba(233, 223, 208, 0.75);
}
.skit-note[hidden] { display: none; }

/* ---------- Розділ «Історія свята» ---------- */
.history { border-top-color: var(--gold); }

.timeline {
    list-style: none;
    max-width: 50rem;
    margin: 0 auto;
    padding: 0;
    position: relative;
}
.timeline::before {           /* вертикальна лінія часу */
    content: "";
    position: absolute;
    left: 1.6rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(180deg, var(--gold), var(--accent));
    opacity: 0.5;
}
.timeline li {
    position: relative;
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
.timeline li:last-child { margin-bottom: 0; }
.tl-mark {
    flex: none;
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    font-size: 1.4rem;
    background: #1d1316;
    border: 2px solid rgba(232, 176, 74, 0.6);
    z-index: 1;
}
.timeline h3 {
    font-family: "Tinos", Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.4rem;
    color: #fff;
    margin: 0.35rem 0 0.4rem;
}
.timeline p { margin: 0; }
.timeline b { color: var(--gold); }

.videos-title {
    font-family: "Tinos", Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.8rem;
    color: #fff;
}
.video-card {
    margin: 0;
    height: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(232, 176, 74, 0.25);
    background: rgba(255, 255, 255, 0.03);
}
.yt-lite {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}
.yt-lite img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.4s;
}
.yt-lite:hover img { opacity: 1; transform: scale(1.03); }
.yt-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 4rem;
    height: 2.8rem;
    border-radius: 0.8rem;
    font-size: 1.8rem;
    color: #fff;
    background: var(--accent);
    transform: translate(-50%, -50%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.video-card iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}
.video-card figcaption {
    padding: 0.8rem 1rem 1rem;
    font-size: 0.92rem;
}
.video-card figcaption b { display: block; color: #fff; font-weight: 600; margin-bottom: 0.2rem; }
.video-card figcaption span { font-size: 0.82rem; color: rgba(233, 223, 208, 0.7); }
.video-card a,
.sources a { color: var(--gold); }

.sources {
    max-width: 50rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.88rem;
    color: rgba(233, 223, 208, 0.75);
}
.sources summary { cursor: pointer; color: var(--gold); font-weight: 500; }
.sources ul { margin: 0.6rem 0 0; padding-left: 1.2rem; }

/* ---------- Міні-ігри для ворожінь ---------- */
.mg-stage {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 0.6rem;
    background: linear-gradient(180deg, #0a0e22 0%, #1b2246 70%, #2a2238 100%);
    user-select: none;
}
.mg-stage.room { background: linear-gradient(180deg, #2a1d18 0%, #3e2b20 68%, #4f321b 68%, #2e1c0e 100%); }
.mg-result {
    min-height: 3.4rem;
    margin-top: 1rem;
    text-align: center;
    color: #fff;
}
.mg-result .big {
    display: block;
    font-family: "Tinos", Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--gold);
}
.mg-result.show { animation: pop 0.35s ease-out; }
.mg-abs { position: absolute; }
.mg-emoji { position: absolute; line-height: 1; transform: translate(-50%, -50%); }
.mg-label {
    position: absolute;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(233, 223, 208, 0.55);
    transform: translate(-50%, -50%);
    transition: color 0.3s, transform 0.3s;
}
.mg-label.hit { color: var(--gold); transform: translate(-50%, -50%) scale(1.25); }
.mg-bubble {
    position: absolute;
    padding: 0.35em 0.75em;
    border-radius: 0.8em;
    background: #fffaf0;
    color: #2a1a12;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

/* віск */
.mg-bowl {
    position: absolute;
    left: 50%;
    bottom: 14px;
    width: 230px;
    height: 70px;
    transform: translateX(-50%);
    border-radius: 0 0 115px 115px / 0 0 70px 70px;
    background: linear-gradient(180deg, #9a5a2c, #5a3016);
}
.mg-water {
    position: absolute;
    left: 0;
    right: 0;
    top: -16px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 40%, #5b7fb8, #23365e);
    border: 3px solid #b07040;
}
.mg-stream {
    position: absolute;
    left: 50%;
    top: 62px;
    width: 7px;
    height: 120px;
    margin-left: -3px;
    border-radius: 4px;
    background: linear-gradient(180deg, #fff3c4, #f2d27a);
    transform-origin: top;
    transform: scaleY(0);
}
.mg-shape {
    position: absolute;
    left: 50%;
    bottom: 40px;
    width: 96px;
    height: 96px;
    transform: translateX(-50%);
    opacity: 0;
}
.mg-shape svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5)); }

/* ворота / тин для чобота */
.mg-gate {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 64px;
    height: 46px;
    background:
        repeating-linear-gradient(90deg, #6b4220 0 14px, transparent 14px 22px),
        linear-gradient(transparent 40%, #4a2c14 40% 55%, transparent 55%);
    opacity: 0.95;
}
.mg-gate::after {          /* стулки воріт по центру */
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 90px;
    height: 54px;
    transform: translateX(-50%);
    border: 5px solid #8a5a2c;
    border-bottom: 0;
    background: repeating-linear-gradient(90deg, #7a4a24 0 10px, #5a3519 10px 12px);
}
.mg-ground {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: linear-gradient(180deg, #dfe6f2, #b9c4da);
}

/* купки зерна й пампушки */
.mg-pile {
    position: absolute;
    bottom: 34px;
    width: 70px;
    height: 34px;
    transform: translateX(-50%);
    border-radius: 50% 50% 8px 8px / 100% 100% 8px 8px;
    background: radial-gradient(circle at 30% 30%, #f4d27a 0 2px, transparent 3px) 0 0 / 9px 8px,
                linear-gradient(180deg, #e2b54f, #a87a24);
    cursor: pointer;
    transition: transform 0.3s, opacity 0.4s, height 0.4s;
}
.mg-pile.bun {
    width: 50px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f7d79a, #c98a35 70%, #8a561c);
}
.mg-pile.mine { box-shadow: 0 0 0 3px var(--gold), 0 0 16px rgba(232, 176, 74, 0.7); }
.mg-pile.gone { opacity: 0; transform: translateX(-50%) scale(0.3); }
.mg-pile-name {
    position: absolute;
    bottom: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    transform: translateX(-50%);
    color: rgba(233, 223, 208, 0.75);
    white-space: nowrap;
    pointer-events: none;
}
.mg-pile-name.mine { color: var(--gold); }
.mg-order {
    position: absolute;
    bottom: 80px;
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    transform: translateX(-50%);
}

/* вулиця з ліхтарем */
.mg-lamp {
    position: absolute;
    left: 22%;
    bottom: 40px;
    width: 6px;
    height: 150px;
    background: #2a2a2a;
}
.mg-lamp::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -9px;
    width: 24px;
    height: 16px;
    border-radius: 6px 6px 2px 2px;
    background: #ffd36b;
    box-shadow: 0 0 40px 20px rgba(255, 200, 90, 0.35);
}
.mg-road {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px;
    background: linear-gradient(180deg, #c9d3e6, #9aa6bd);
}
.mg-houses {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 40px;
    height: 70px;
    background:
        radial-gradient(circle, #ffd36b 0 5px, transparent 6px) 30px 38px / 120px 70px repeat-x,
        linear-gradient(transparent 30%, #131830 30%);
    clip-path: polygon(0 30%, 8% 0, 16% 30%, 30% 30%, 38% 5%, 46% 30%, 62% 30%, 70% 0, 78% 30%, 90% 30%, 96% 8%, 100% 30%, 100% 100%, 0 100%);
}

/* спальня й сон */
.mg-bed {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: 260px;
    height: 70px;
    transform: translateX(-50%);
    border-radius: 10px;
    background: linear-gradient(180deg, #f4efe4 0 55%, #c8102e 55% 62%, #f4efe4 62%);
    box-shadow: 0 8px 0 #5a3519;
}
.mg-pillow {
    position: absolute;
    left: calc(50% - 120px);
    bottom: 84px;
    width: 90px;
    height: 36px;
    border-radius: 18px;
    background: #fffaf0;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.08);
}
.mg-night {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 20, 0.85);
    opacity: 0;
    transition: opacity 1s;
    pointer-events: none;
}
.mg-night.on { opacity: 1; }
.mg-cloud {
    position: absolute;
    left: 58%;
    top: 22px;
    width: 200px;
    height: 120px;
    transform: translateX(-50%) scale(0.2);
    opacity: 0;
    border-radius: 60px;
    background: #fffaf0;
    color: #2a1a12;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: -60px 40px 0 -42px #fffaf0, -84px 66px 0 -50px #fffaf0;
}
.mg-cloud .who { font-size: 3rem; line-height: 1; }
.mg-chips {
    position: absolute;
    left: 50%;
    top: 14px;
    display: flex;
    gap: 0.5rem;
    transform: translateX(-50%);
}
.mg-chip {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(232, 176, 74, 0.5);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-soft);
    font-size: 0.85rem;
    white-space: nowrap;
}
.mg-chip[aria-pressed="true"] { background: var(--gold); color: #2a1a12; border-color: var(--gold); }

/* ---------- Мобільна версія: вікно по центру, приглушене під текстом ---------- */
@media (max-width: 991.98px) {
    .room-window {
        right: 50%;
        transform: translateX(50%);
        bottom: 6vh;
        width: 260px;
        opacity: 0.55;
    }
    .frame { height: 50vh; }
    .scene {
        background:
            radial-gradient(ellipse 360px 320px at 50% 85%, rgba(232, 160, 70, 0.25), transparent 70%),
            linear-gradient(180deg, #120d10 0%, #1d1416 55%, #261a17 100%);
    }
}

/* ---------- Десктоп: панель ліворуч зі скосом, як в оригіналі ---------- */
@media (min-width: 992px) {

    .masthead {
        height: 100vh;
        width: max(60vw, 760px); /* лишаємо місце для вікна праворуч */
        min-height: 0;
        padding-bottom: 0;
    }
    .masthead::before {
        border-right: 6px solid var(--accent);
        transform: skewX(-9deg);
        transform-origin: top right;
    }
    .masthead .masthead-content {
        padding-left: 3rem;
        padding-right: 7rem;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        max-width: none;
        margin: 0;
        padding-top: 0;
    }
    .masthead .masthead-content .container-fluid { max-width: 38rem; }

    .social-icons {
        position: absolute;
        height: 100%;
        top: 0;
        right: 2.5rem;
        width: auto;
    }
}
