:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --text: #413f3f;
    --muted: #6a6a6a;
    /* Акцент бренда (как --text — один токен на декоративные подсветки, пульсар и т.п.) */
    --accent: #6d28d9;
    --accent-2: #5b21b6;
    --border: #ececec;
    --site-header-h: 58px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Cabin", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.magic-trail {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.magic-trail__dot {
    --spark-x: 0px;
    --spark-y: -16px;
    --spark-life: 560ms;
    --spark-hue: 44deg;
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.95) 0%,
        hsl(var(--spark-hue) 100% 82% / 0.82) 42%,
        hsl(calc(var(--spark-hue) + 8deg) 100% 68% / 0.16) 72%,
        transparent 100%
    );
    box-shadow: 0 0 10px hsl(var(--spark-hue) 95% 70% / 0.44);
}

.magic-trail__dot.is-live {
    animation: magic-spark var(--spark-life) ease-out forwards;
}

@keyframes magic-spark {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    14% {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--spark-x)), calc(-50% + var(--spark-y))) scale(0.22);
    }
}

@media (prefers-reduced-motion: reduce) {
    .magic-trail {
        display: none;
    }
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.flash {
    max-width: 42rem;
    margin: 0 auto 24px;
    padding: 12px 16px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.95rem;
}

.flash-success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #1b5e20;
}

.flash-error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #b71c1c;
}

.flash-muted {
    background: #fafafa;
    border: 1px solid var(--border);
    color: var(--muted);
}

.form-privacy {
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
    max-width: 32rem;
}

.form-privacy a {
    color: #303030;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: var(--site-header-h);
    background: transparent;
    border-bottom: none;
}

.brand {
    width: min(1080px, 92vw);
    margin: 0 auto;
    padding: 10px 0;
    display: flex;
    justify-content: center;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.brand-logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: min(240px, 55vw);
    object-fit: contain;
}

/* Белое лого на фоне hero (как на витрине); PNG с тёмным шрифтом */
.site-header .brand-logo {
    filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}

/* После hero: белый фон, чёрное лого (класс вешает landing.js) */
.site-header.site-header--past-hero {
    background: #ffffff;
    backdrop-filter: none;
    border-bottom: 1px solid var(--border);
}

.site-header.site-header--past-hero .brand-logo {
    filter: brightness(0);
}

.page {
    width: min(1080px, 92vw);
    margin: 0 auto;
    padding: 40px 0;
}

section {
    margin: 48px 0 68px;
    text-align: center;
}

/* Заголовки секций в main (Characters, Follow и т.д.) — один стиль */
.page section > h2,
.follow-section .follow-card > h2 {
    margin: 0 0 12px;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    text-align: center;
}

/*
 * Hero: сверху .hero-copy (eyebrow → h1 → lead); spacer под «окном»; .hero-bottom — ротатор + CTA в потоке.
 */
.hero.hero-fullscreen {
    --hero-copy-gap: 0.78rem;
    --hero-bottom-pad: clamp(1rem, 3vh, 2rem);
    --hero-bottom-gap: clamp(0.65rem, 1.8vh, 1.15rem);

    position: relative;
    isolation: isolate;
    width: 100%;
    margin: calc(-1 * var(--site-header-h)) 0 0;
    padding-top: calc(var(--site-header-h) + 1rem);
    padding-bottom: var(--hero-bottom-pad);
    /* чуть уже отступы — больше места под h1 в одну строку на планшетах */
    padding-inline: clamp(0.65rem, 2.5vw, 1.25rem);
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background-color: #1a1a1a;
    background-image: url("../img/gemini-bg.jpg");
    background-size: cover;
    /* Смещение фокуса кадра: персонаж ближе к центру вьюпорта (подправь % при смене арта) */
    background-position: 50% 42%;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.hero.hero-fullscreen::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Vignette: clear in the middle, darker toward edges */
    background: radial-gradient(
        ellipse 90% 85% at 50% 50%,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 32%,
        rgba(0, 0, 0, 0.6) 62%,
        rgba(0, 0, 0, 0.8) 100%
    );
    z-index: 0;
    pointer-events: none;
}

.hero.hero-fullscreen > * {
    position: relative;
    z-index: 1;
}

.hero-copy {
    flex: 0 0 auto;
    align-self: center;
    display: flex;
    flex-direction: column;
    /* stretch: одна ширина колонки, без сжатия h1/лидов — иначе визуальный сдвиг */
    align-items: stretch;
    gap: var(--hero-copy-gap);
    box-sizing: border-box;
    /* 94vw даёт перекос относительно padding hero (скроллбар / не совпадает с 100%) */
    width: min(100%, 76rem);
    max-width: 76rem;
    margin: 8rem auto 0;
    padding-inline: 0;
}

.hero-spacer {
    flex: 1 1 0;
    width: 100%;
    min-height: clamp(8rem, 16dvh, 12rem);
    /* Не раздувать пустоту на высоких экранах — кнопка не уезжает вниз */
    max-height: min(36dvh, 21rem);
    pointer-events: none;
}

.hero.hero-fullscreen .hero-bottom {
    flex: 0 0 auto;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hero-bottom-gap);
    width: min(100%, 76rem);
    max-width: 76rem;
    padding-inline: 0;
    box-sizing: border-box;
}

.hero.hero-fullscreen .hero-bottom #hero-cta {
    flex: 0 0 auto;
    align-self: center;
    margin-top: 0;
}

/* Только transform: opacity на родителе ломала crossfade у ротатора внутри .hero-lead-block */
@keyframes hero-reveal {
    from {
        transform: translateY(1.35rem);
    }

    to {
        transform: translateY(0);
    }
}

.hero.hero-fullscreen.hero--animated .hero-copy > * {
    animation: hero-reveal 1.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero.hero-fullscreen.hero--animated .hero-bottom > #hero-lead-rotator.hero-lead-rotator {
    animation: hero-reveal 1.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.52s;
}

.hero.hero-fullscreen.hero--animated .hero-copy > *:nth-child(1) {
    animation-delay: 0.1s;
}

.hero.hero-fullscreen.hero--animated .hero-copy > *:nth-child(2) {
    animation-delay: 0.28s;
}

.hero.hero-fullscreen.hero--animated .hero-copy > *:nth-child(3) {
    animation-delay: 0.52s;
}

.hero.hero-fullscreen.hero--animated .hero-bottom > #hero-cta {
    animation: hero-reveal 1.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.76s;
}

@media (prefers-reduced-motion: reduce) {
    .hero.hero-fullscreen.hero--animated .hero-copy > *,
    .hero.hero-fullscreen.hero--animated .hero-bottom > * {
        animation: none;
        transform: none;
    }
}

.hero.hero-fullscreen h1 {
    margin: 0;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.12;
    color: #ffffff;
    /* Иначе при align-items:center у .hero-copy заголовок сжимается по тексту и «уезжает» визуально */
    align-self: stretch;
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    text-align: center;
    text-shadow: 0 0 28px rgba(0, 0, 0, 0.55), 0 8px 8px rgba(0, 0, 0, 0.45), 0 2px 2px rgba(0, 0, 0, 0.4);
    white-space: normal;
    text-wrap: balance;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .hero.hero-fullscreen h1 {
        white-space: nowrap;
        /* на узкой ширине viewport одна строка за счёт меньшего кегля, не переполнения */
        font-size: clamp(2.35rem, 5.8vw, 4rem);
    }
}

.hero.hero-fullscreen .hero-lead {
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-size: clamp(1.15rem, 3.35vw, 1.35rem);
    font-weight: 100;
    line-height: 1.45;
    color: #ffffff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero.hero-fullscreen .hero-lead-block {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    text-align: center;
}

.hero.hero-fullscreen .hero-lead-block .hero-lead {
    margin: 0;
}

.hero.hero-fullscreen .hero-lead--static {
    margin-bottom: 0;
}

#hero-lead-rotator.hero-lead-rotator {
    width: min(92vw, 62rem);
    max-width: 100%;
    margin: 0;
    align-self: center;
    text-align: center;
    z-index: 3;
    display: block;
}

.hero.hero-fullscreen .hero-lead--rotate {
    display: grid;
    grid-template: 1fr / 1fr;
    margin: 0 auto;
    min-height: 1.5em;
    justify-items: center;
    font-size: clamp(1.5rem, 3.7vw, 1.62rem);
    font-weight: 400;
    line-height: 1.35;
}

.hero.hero-fullscreen .hero-lead-rotator__phrase {
    grid-area: 1 / 1;
    margin: 0;
    max-width: 100%;
    opacity: 0;
    transition: opacity 0.95s ease-in-out;
    pointer-events: none;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero.hero-fullscreen .hero-lead-rotator__phrase.is-visible {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .hero.hero-fullscreen .hero-lead-rotator__phrase {
        transition: none;
    }

    .hero.hero-fullscreen .hero-lead-rotator__phrase:not(.is-visible) {
        visibility: hidden;
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }
}

.hero.hero-fullscreen .eyebrow {
    margin: 0;
    width: 100%;
    max-width: 100%;
    text-align: center;
    font-size: 0.96rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
}

@media (max-width: 520px) {
    .hero.hero-fullscreen h1 {
        font-size: min(4rem, 10.5vw);
        white-space: normal;
    }
}

/* Eyebrow outside hero (если появится) */
.eyebrow {
    color: #7d7d7d;
    margin-bottom: 16px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 26rem;
    min-height: 3.35rem;
    padding: 1rem 1.75rem;
    margin-left: auto;
    margin-right: auto;
    font-family: "Cabin", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-align: center;
    border-radius: 9999px;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    /* Outlined — как «Add to cart» на витрине */
    background: #ffffff;
    color: #121212;
    border: 1px solid #121212;
}

.btn-primary:hover {
    background: #fafafa;
}

.btn-primary:focus-visible {
    outline: 2px solid #121212;
    outline-offset: 3px;
}

.btn-primary.btn-solid {
    background: #121212;
    color: #ffffff;
    border: 1px solid #121212;
}

.btn-primary.btn-solid:hover {
    background: #2c2c2c;
    border-color: #2c2c2c;
}

.btn-primary.rounded-pill {
    border-radius: 9999px;
}

/* Hero CTA: после .btn-primary, чтобы перебить width/max-width */
.btn-primary.btn-hero-cta {
    width: auto;
    max-width: none;
    min-height: 2.75rem;
    padding: 1.2rem 1.85rem;
    margin-top: 0.25rem;
    font-size: 1rem;
    font-weight: 400;
    background: #ffffff;
    color: #121212;
    border: none;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
}

.btn-primary.btn-hero-cta:hover {
    background: #f2f2f2;
}

.btn-primary.btn-hero-cta:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.hero.hero-fullscreen .btn-primary.btn-hero-cta {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.25), 0 2px 10px rgba(0, 0, 0, 0.18);
    box-shadow: 0 3px 22px rgba(0, 0, 0, 0.32), 0 1px 6px rgba(0, 0, 0, 0.22);
}

/* Карточки персонажей: фон — фото на всю площадь, типографика как в hero */
.btn-primary.btn-card-cta {
    width: auto;
    max-width: min(100%, 18rem);
    min-height: 2.55rem;
    padding: 0.72rem 1.35rem;
    margin-top: 0.35rem;
    font-size: 0.92rem;
    font-weight: 400;
    background: #ffffff;
    color: #121212;
    border: none;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
}

.btn-primary.btn-card-cta:hover {
    background: #f2f2f2;
}

.btn-primary.btn-card-cta:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.character-modal .btn-primary {
    max-width: min(26rem, 100%);
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem 1rem;
    width: 100%;
    justify-items: stretch;
    align-items: stretch;
}

@media (max-width: 900px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

.card {
    --hover-x: 50%;
    --hover-y: 42%;
    --mag-x: 0px;
    --mag-y: 0px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    max-width: none;
    aspect-ratio: 4 / 5;
    /* Явное скругление + clip-path: без transform на корне — иначе в браузерах «сначала квадрат, потом round» */
    border-radius: 20px;
    overflow: hidden;
    clip-path: inset(0 round 20px);
    text-align: center;
    border: none;
    /* чётче контур, чем один огромный blur; слабая альфа — без «тяжёлой» тени */
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.07),
        0 6px 16px -3px rgba(0, 0, 0, 0.11);
    background-color: #1a1a1a;
    isolation: isolate;
    transform: translate3d(var(--mag-x), var(--mag-y), 0);
    transition:
        box-shadow 0.5s ease,
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover,
.card:focus-within {
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.09),
        0 14px 32px -10px rgba(0, 0, 0, 0.16);
}

/* Full-bleed фото + оверлей: сверху вниз прозрачный → чёрный (текст внизу) */
.card::before,
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    transition:
        opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.45s ease;
}

.card::before {
    z-index: 0;
    background-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.08) 38%,
            rgba(0, 0, 0, 0.45) 72%,
            rgba(0, 0, 0, 0.88) 100%
        ),
        var(--card-image);
    transform: scale(1);
    filter: brightness(1) saturate(1);
}

.card::after {
    z-index: 1;
    background-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.08) 38%,
            rgba(0, 0, 0, 0.45) 72%,
            rgba(0, 0, 0, 0.88) 100%
        ),
        var(--card-image-av);
    opacity: 0;
    transform: scale(1.06);
    filter: brightness(1.02) saturate(1.05);
}

.card:hover::before,
.card:focus-within::before {
    transform: scale(1.04);
    filter: brightness(1.05) saturate(1.06);
}

.card:hover::after,
.card:focus-within::after {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.08) saturate(1.12);
}

/* Soft aura from _av (размытая копия) — без negative inset, скругление как у карточки */
.card__aura {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 20px;
    pointer-events: none;
    opacity: 0;
    background-image: var(--card-image-av);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    filter: blur(18px) brightness(1.3) saturate(1.16);
    mix-blend-mode: screen;
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.card__aura::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(
            circle 22% at var(--hover-x) var(--hover-y),
            rgba(255, 250, 236, 0.5) 0%,
            rgba(255, 220, 150, 0.24) 42%,
            rgba(255, 190, 120, 0.08) 62%,
            transparent 76%
        );
    filter: blur(1.5px);
    mix-blend-mode: screen;
    transition: opacity 0.24s ease;
}

.card:hover .card__aura,
.card:focus-within .card__aura {
    opacity: 0.26;
}

.card:hover .card__aura::after,
.card:focus-within .card__aura::after {
    opacity: 1;
}

/*
 * Вспышка на карточке: заметнее, чем прошлый «тихий» вариант, но слабее полноэкранной сцены.
 */
.card__map-flash {
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: 20px;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
    --pulse-x: 50%;
    --pulse-y: 40%;
    --pulse-rx: 34%;
    --pulse-ry: 28%;
    --pulse-ray-rot: 0deg;
    background:
        radial-gradient(
            circle 16% at var(--pulse-x) var(--pulse-y),
            rgba(255, 252, 245, 0.82) 0%,
            rgba(255, 228, 160, 0.52) 38%,
            transparent 64%
        ),
        radial-gradient(
            circle 38% at var(--pulse-x) var(--pulse-y),
            rgba(255, 200, 90, 0.52) 0%,
            rgba(255, 145, 45, 0.32) 44%,
            transparent 70%
        ),
        radial-gradient(
            ellipse var(--pulse-rx) var(--pulse-ry) at var(--pulse-x) var(--pulse-y),
            rgba(255, 130, 40, 0.38) 0%,
            rgba(230, 75, 18, 0.2) 34%,
            rgba(170, 45, 12, 0.08) 56%,
            transparent 76%
        ),
        radial-gradient(
            circle 58% at var(--pulse-x) var(--pulse-y),
            rgba(255, 120, 50, 0.11) 0%,
            transparent 52%
        );
    transform-origin: var(--pulse-x) var(--pulse-y);
    transition: opacity 0.25s ease;
}

.card__map-flash::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.72;
    filter: blur(2px);
    /* Рассеянные лучи: широкие мягкие клинья вместо узких «лазерных» полос */
    background:
        repeating-conic-gradient(
            from calc(var(--pulse-ray-rot) + 11deg) at var(--pulse-x) var(--pulse-y),
            transparent 0deg 7deg,
            rgba(255, 230, 200, 0.05) 7deg 9deg,
            rgba(255, 224, 180, 0.11) 9deg 11deg,
            transparent 11deg 20deg
        ),
        repeating-conic-gradient(
            from var(--pulse-ray-rot) at var(--pulse-x) var(--pulse-y),
            transparent 0deg 8deg,
            rgba(255, 220, 165, 0.04) 8deg 10deg,
            rgba(255, 228, 195, 0.18) 10deg 13deg,
            rgba(255, 236, 210, 0.085) 13deg 15deg,
            rgba(255, 222, 175, 0.035) 15deg 17deg,
            transparent 17deg 28deg
        );
    -webkit-mask-image: radial-gradient(
        circle 44% at var(--pulse-x) var(--pulse-y),
        #000 0%,
        #000 38%,
        rgba(0, 0, 0, 0.45) 50%,
        transparent 70%
    );
    mask-image: radial-gradient(
        circle 44% at var(--pulse-x) var(--pulse-y),
        #000 0%,
        #000 38%,
        rgba(0, 0, 0, 0.45) 50%,
        transparent 70%
    );
}

.card__map-flash.is-active {
    opacity: 1;
    animation: card-map-flash-pulse 1.65s cubic-bezier(0.2, 0.85, 0.36, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
    .card:hover,
    .card:focus-within {
        box-shadow:
            0 1px 3px rgba(0, 0, 0, 0.07),
            0 6px 16px -3px rgba(0, 0, 0, 0.11);
    }

    .card::before,
    .card::after {
        transition: opacity 0.25s ease;
    }

    .card::before,
    .card:hover::before,
    .card:focus-within::before {
        transform: none;
        filter: none;
    }

    .card::after,
    .card:hover::after,
    .card:focus-within::after {
        transform: none;
        filter: brightness(1.02) saturate(1.03);
    }

    .card__aura,
    .card:hover .card__aura,
    .card:focus-within .card__aura {
        transition: opacity 0.25s ease;
        opacity: 0.14;
    }

    .card__map-flash.is-active {
        animation: none;
        opacity: 0.55;
        filter: brightness(1.06) saturate(1.08);
    }
}

.card__sr-img {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.card__body {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    padding: 1.1rem 1rem 1.2rem;
}

.card h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.85),
        0 0 22px rgba(0, 0, 0, 0.55),
        0 4px 12px rgba(0, 0, 0, 0.45),
        0 1px 2px rgba(0, 0, 0, 0.4);
}

.card__lifestyle {
    margin: 0;
    max-width: 22rem;
    font-size: 0.94rem;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 2px 14px rgba(0, 0, 0, 0.5),
        0 1px 3px rgba(0, 0, 0, 0.4);
}

.card .open-character {
    flex-shrink: 0;
}

/* Recent sightings — поток наблюдений (ритм, live, устаревание) */
.recent {
    text-align: center;
}

/* Полноэкранный блок как hero: фон bg.jpg, лента у правого края */
.recent.recent--fullscreen {
    position: relative;
    isolation: isolate;
    /* 100% от .page ломало full-bleed — справа оставалась белая полоса */
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0;
    padding: 0;
    box-sizing: border-box;
    /* ровно один экран; без внутреннего скролла — поток в окне сцены */
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    text-align: left;
    background-color: #1a1a1a;
    background-image: url("../img/map-1.jpg");
    background-size: cover;
    background-position: 40% center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.recent.recent--fullscreen::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Vignette как у hero: прозрачно в центре градиента, сильнее к краям (фокус — нижний левый квадрант) */
    background: radial-gradient(
        ellipse 92% 88% at 25% 76%,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 32%,
        rgba(0, 0, 0, 0.58) 60%,
        rgba(0, 0, 0, 0.8) 100%
    );
    z-index: 0;
    pointer-events: none;
}

.recent.recent--fullscreen .recent__inner {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: clamp(1.75rem, 4vh, 2.75rem) clamp(0.65rem, 2.5vw, 1.25rem) clamp(1.25rem, 3vh, 2rem);
    overflow: hidden;
}

/* Контент сцены поверх полноширинной вспышки (pulse — прямой потомок секции) */
.recent.recent--fullscreen.recent--sightings-scene .recent__inner {
    z-index: 2;
}

.recent.recent--fullscreen .recent__rail {
    position: relative;
    width: min(40rem, 100%);
    max-width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    margin-left: auto;
    align-self: flex-end;
    display: flex;
    flex-direction: column;
}

.recent.recent--fullscreen .recent__rail::before {
    content: "";
    position: absolute;
    inset: -2% -2% -4%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(5, 9, 18, 0.2) 0%,
        rgba(5, 9, 18, 0.45) 24%,
        rgba(5, 9, 18, 0.68) 58%,
        rgba(5, 9, 18, 0.78) 100%
    );
}

/* Окно «текущей сцены» — на всю высоту блока (как фон), без скролла, маска снизу */
.sightings-scene {
    position: relative;
    z-index: 1;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    outline: none;
}

.sightings-scene:focus-visible {
    box-shadow: 0 0 0 2px rgba(216, 180, 254, 0.65);
    border-radius: 12px;
}

/* Вспышка: свет из кратера — тёплое ядро, янтарь, объём + лучи (screen поверх карты) */
.recent.recent--fullscreen.recent--sightings-scene > .sightings-scene__pulse {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
    /* Центр, эллипс и поворот лучей — из JS при каждом событии */
    --pulse-x: 50%;
    --pulse-y: 40%;
    --pulse-rx: 34%;
    --pulse-ry: 28%;
    --pulse-ray-rot: 0deg;
    background:
        /* яркое ядро — размер «звёздочки», не на весь экран */
        radial-gradient(
            circle min(2.6vw, 3vh) at var(--pulse-x) var(--pulse-y),
            rgba(255, 252, 245, 0.98) 0%,
            rgba(255, 228, 160, 0.62) 38%,
            transparent 64%
        ),
        /* золотое кольцо */
        radial-gradient(
            circle min(7.5vw, 7vh) at var(--pulse-x) var(--pulse-y),
            rgba(255, 200, 90, 0.68) 0%,
            rgba(255, 145, 45, 0.4) 44%,
            transparent 70%
        ),
        /* янтарный хвост / кома */
        radial-gradient(
            ellipse var(--pulse-rx) var(--pulse-ry) at var(--pulse-x) var(--pulse-y),
            rgba(255, 130, 40, 0.52) 0%,
            rgba(230, 75, 18, 0.28) 34%,
            rgba(170, 45, 12, 0.11) 56%,
            transparent 76%
        ),
        /* короткий слабый bloom */
        radial-gradient(
            circle 22vmax at var(--pulse-x) var(--pulse-y),
            rgba(255, 120, 50, 0.14) 0%,
            transparent 52%
        );
    transform-origin: var(--pulse-x) var(--pulse-y);
    transition: opacity 0.25s ease;
}

.recent.recent--fullscreen.recent--sightings-scene > .sightings-scene__pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.88;
    filter: blur(2.5px);
    background:
        repeating-conic-gradient(
            from calc(var(--pulse-ray-rot) + 11deg) at var(--pulse-x) var(--pulse-y),
            transparent 0deg 7deg,
            rgba(255, 230, 200, 0.06) 7deg 9deg,
            rgba(255, 224, 180, 0.14) 9deg 11deg,
            transparent 11deg 20deg
        ),
        repeating-conic-gradient(
            from var(--pulse-ray-rot) at var(--pulse-x) var(--pulse-y),
            transparent 0deg 8deg,
            rgba(255, 220, 165, 0.05) 8deg 10deg,
            rgba(255, 228, 195, 0.22) 10deg 13deg,
            rgba(255, 236, 210, 0.1) 13deg 15deg,
            rgba(255, 222, 175, 0.04) 15deg 17deg,
            transparent 17deg 28deg
        );
    /* лучи только вокруг ядра вспышки, не на весь экран */
    -webkit-mask-image: radial-gradient(
        circle min(9vw, 8.5vh) at var(--pulse-x) var(--pulse-y),
        #000 0%,
        #000 38%,
        rgba(0, 0, 0, 0.45) 50%,
        transparent 72%
    );
    mask-image: radial-gradient(
        circle min(9vw, 8.5vh) at var(--pulse-x) var(--pulse-y),
        #000 0%,
        #000 38%,
        rgba(0, 0, 0, 0.45) 50%,
        transparent 72%
    );
}

.recent.recent--fullscreen.recent--sightings-scene > .sightings-scene__pulse.is-active {
    opacity: 1;
    animation: sightings-scene-pulse 2.1s cubic-bezier(0.2, 0.85, 0.36, 1) forwards;
}

@keyframes sightings-scene-pulse {
    0% {
        opacity: 0;
        filter: brightness(0.88) saturate(1);
        transform: scale(0.78);
    }

    12% {
        opacity: 1;
        filter: brightness(1.18) saturate(1.2);
        transform: scale(1);
    }

    48% {
        opacity: 0.38;
        filter: brightness(1.05) saturate(1.1);
        transform: scale(1.03);
    }

    100% {
        opacity: 0;
        filter: brightness(0.96) saturate(1);
        transform: scale(1.07);
    }
}

/* Слабее полноэкранной сцены; быстрый спад после пика, чтобы не «тянуть» затухание */
@keyframes card-map-flash-pulse {
    0% {
        opacity: 0;
        filter: brightness(0.92) saturate(1);
        transform: scale(0.88);
    }

    11% {
        opacity: 0.92;
        filter: brightness(1.12) saturate(1.14);
        transform: scale(1);
    }

    24% {
        opacity: 0.16;
        filter: brightness(1.02) saturate(1.05);
        transform: scale(1.015);
    }

    36% {
        opacity: 0;
        filter: brightness(0.98) saturate(1);
        transform: scale(1.04);
    }

    100% {
        opacity: 0;
        filter: brightness(0.97) saturate(1);
        transform: scale(1.04);
    }
}

.sightings-scene__viewport {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    /* Высота = оставшееся место в секции (полный экран фона), не обрезка по 72vh */
    /* Длинный мягкий спад: 4-я без резкого скачка; 5-я полупрозрачна, но читаема (без полного transparent) */
    mask-image: linear-gradient(
        to bottom,
        black 0%,
        black 84%,
        rgba(0, 0, 0, 0.45) 93%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        black 0%,
        black 84%,
        rgba(0, 0, 0, 0.45) 93%,
        transparent 100%
    );
}

.sightings-scene__list {
    list-style: none;
    padding: 0;
    margin: 0;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .recent.recent--fullscreen.recent--sightings-scene > .sightings-scene__pulse::after {
        opacity: 0.35;
    }

    .recent.recent--fullscreen.recent--sightings-scene > .sightings-scene__pulse.is-active {
        animation: none;
        opacity: 0.78;
        filter: brightness(1.05);
    }

    .sightings-scene__list {
        transition: none;
    }
}

.sightings-tier-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sighting-item {
    margin-bottom: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    background: rgba(250, 250, 250, 0.95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    transition:
        transform 0.22s ease,
        background-color 0.22s ease,
        box-shadow 0.22s ease,
        opacity 0.22s ease;
}

.sighting-item:last-child {
    margin-bottom: 0;
}

.sighting-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 26px rgba(0, 0, 0, 0.07);
}

.sighting-item--featured {
    border: 1px solid rgba(17, 17, 17, 0.16);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 248, 248, 0.94) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 12px 32px rgba(0, 0, 0, 0.09);
}

.sighting-item--featured:hover {
    background: linear-gradient(165deg, #ffffff 0%, #f6f6f6 100%);
}

/* Уход нижней карточки при prepend */
.sighting-item--leaving {
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
    .sighting-item--leaving {
        transition: none;
        transform: none;
    }
}

.sightings-scene--paused .sightings-scene__viewport {
    opacity: 0.94;
    transition: opacity 0.25s ease;
}

.sighting-when--badge {
    flex-shrink: 0;
    margin: 0;
    padding: 0.3em 0.65em;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1.2;
    border-radius: 9999px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.55);
    transition: opacity 0.35s ease;
}

/* Полноэкранная сцена: стекло на inner, светлый текст, без тяжёлых белых подложек */
.recent.recent--fullscreen .sightings-scene .sighting-item {
    padding: 0;
    margin-bottom: 10px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.recent.recent--fullscreen .sightings-scene .sighting-item:hover {
    transform: none;
    background: transparent;
    box-shadow: none;
}

.recent.recent--fullscreen .sightings-scene .sighting-item__inner {
    padding: 12px 14px;
    backdrop-filter: blur(8px) saturate(1.05);
    -webkit-backdrop-filter: blur(8px) saturate(1.05);
}

/* Верхняя карточка — микро-сигнал «новое» */
.recent.recent--fullscreen .sightings-scene .sighting-item--depth-0 .sighting-item__inner {
    padding: 16px 18px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 244, 205, 0.24) 0%, transparent 44%),
        radial-gradient(circle at 82% 16%, rgba(140, 210, 255, 0.12) 0%, transparent 36%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.15) 0%, rgba(195, 220, 255, 0.09) 100%);
    border-color: rgba(255, 236, 188, 0.4);
    box-shadow:
        inset 0 0 0 1px rgba(255, 243, 213, 0.22),
        0 16px 34px rgba(4, 10, 18, 0.36),
        0 0 32px rgba(255, 206, 110, 0.14);
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-0 .sighting-media {
    width: 4.5rem;
    height: 4.5rem;
    border-color: rgba(255, 240, 210, 0.9);
    box-shadow:
        0 0 0 1px rgba(255, 245, 225, 0.35),
        0 10px 24px rgba(4, 10, 18, 0.35);
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-0 .sighting-avatar {
    transform: scale(1.24);
}

.recent.recent--fullscreen .sightings-scene .sighting-name,
.recent.recent--fullscreen .sightings-scene .sighting-city {
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.recent.recent--fullscreen .sightings-scene .sighting-dash {
    color: rgba(255, 255, 255, 0.45);
}

.recent.recent--fullscreen .sightings-scene .sighting-again {
    color: rgba(238, 245, 255, 0.86);
}

.recent.recent--fullscreen .sightings-scene .sighting-repeat {
    color: rgba(222, 233, 250, 0.58);
}

.recent.recent--fullscreen .sightings-scene .sighting-body {
    color: rgba(214, 226, 246, 0.72);
}

.recent.recent--fullscreen .sightings-scene .sighting-when--badge {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(9, 15, 28, 0.24);
    color: rgba(220, 232, 252, 0.75);
}

/* Глубина в полноэкранной сцене: контраст / обрезка текста */

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-1 {
    opacity: 0.84;
    transform: scale(0.988);
    transform-origin: top center;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-1 .sighting-body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-2 {
    opacity: 0.68;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-2 .sighting-repeat {
    display: none;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-2 .sighting-body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-3 {
    opacity: 0.48;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-3 .sighting-again {
    font-size: 0.76rem;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-3 .sighting-body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-1 .sighting-media,
.recent.recent--fullscreen .sightings-scene .sighting-item--depth-2 .sighting-media,
.recent.recent--fullscreen .sightings-scene .sighting-item--depth-3 .sighting-media,
.recent.recent--fullscreen .sightings-scene .sighting-item--depth-4 .sighting-media,
.recent.recent--fullscreen .sightings-scene .sighting-item--depth-5 .sighting-media {
    width: 3.8rem;
    height: 3.8rem;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-3 .sighting-headline,
.recent.recent--fullscreen .sightings-scene .sighting-item--depth-4 .sighting-headline,
.recent.recent--fullscreen .sightings-scene .sighting-item--depth-5 .sighting-headline {
    margin-bottom: 4px;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-4,
.recent.recent--fullscreen .sightings-scene .sighting-item--depth-5 {
    opacity: 0.28;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-4 .sighting-body,
.recent.recent--fullscreen .sightings-scene .sighting-item--depth-5 .sighting-body {
    display: none;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-4 .sighting-when--badge,
.recent.recent--fullscreen .sightings-scene .sighting-item--depth-5 .sighting-when--badge {
    opacity: 0.85;
}

/* Новое событие: движение задаётся сдвигом всего ul (FLIP); здесь только лёгкий fade */
.sighting-item--incoming {
    opacity: 0;
}

.sighting-item--incoming.is-visible {
    opacity: 1;
    transition: opacity 0.38s ease;
}

@media (prefers-reduced-motion: reduce) {
    .sighting-item--incoming {
        opacity: 1;
    }

    .sighting-item--incoming.is-visible {
        transition: none;
    }
}

.sighting-item--aged {
    opacity: 0.62;
}

.sighting-item--aged:hover {
    opacity: 0.78;
}

.sighting-item__inner {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 14px;
    align-items: start;
}

/* Фиксированный квадрат: не привязывать размер к высоте текста (иначе «прыгает» и залезает на колонку) */
.sighting-media {
    position: relative;
    width: 4.5rem;
    height: 4.5rem;
    flex-shrink: 0;
    justify-self: start;
    box-sizing: border-box;
    border: 1px solid #ffffff;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    background: #e8e8e8;
}

.sighting-stack {
    min-width: 0;
}

.sighting-stack:only-child {
    grid-column: 1 / -1;
}

.sighting-headline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 1.05rem;
    line-height: 1.25;
}

.sighting-headline__lead {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.15rem;
    min-width: 0;
}

.sighting-city {
    font-weight: 500;
    color: #3d3d3d;
}

.sighting-dash {
    font-weight: 400;
    color: var(--muted);
}

.sighting-again {
    margin: 0 0 4px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #2a2a2a;
    line-height: 1.35;
}

.sighting-repeat {
    margin: 0 0 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.35;
}

.sighting-avatar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 28%;
    transform: scale(1.18);
    transform-origin: 50% 28%;
}

.sighting-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    min-width: 0;
}

.sighting-body {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: #4a4a4a;
}

.sighting-body--live {
    transition: opacity 0.3s ease;
}

.recent.recent--fullscreen .sightings-scene .sighting-item--depth-0 .sighting-body {
    transition: opacity 0.3s ease;
}

.sightings-feed--modal {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    max-width: none;
}

.sightings-feed--modal .sighting-item {
    margin-bottom: 10px;
    padding: 14px;
}

.sightings-feed--modal .sighting-item:last-child {
    margin-bottom: 0;
}

.sightings-feed--modal .sighting-name {
    font-size: 1rem;
}

.sightings-feed--modal .sighting-body {
    font-size: 0.9rem;
}

.sightings-feed--modal .sighting-media {
    border-radius: 50%;
}

.sightings-feed--modal .sighting-headline {
    font-size: 1rem;
}

.sightings-feed--modal .sighting-again {
    font-size: 0.78rem;
}

@media (max-width: 520px) {
    .sighting-headline {
        align-items: flex-start;
    }

    .sighting-when--badge {
        align-self: flex-start;
    }

    .sighting-item__inner {
        grid-template-columns: 4rem 1fr;
        gap: 12px;
    }

    .sighting-media {
        width: 4rem;
        height: 4rem;
    }

    .sighting-headline {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .sighting-dash {
        display: none;
    }
}

/* Follow — та же ширина контента, что и .cards (3 колонки в .page), без боковых полей */
.follow-section {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    box-sizing: border-box;
}

.follow-logo {
    display: block;
    width: 150px;
    height: auto;
    margin: 0 auto 10px;
}

.follow-card {
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.follow-lead {
    margin: 0 0 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--muted);
    max-width: none;
}

.follow-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    margin: 0;
    text-align: left;
}

.follow-selected-panel {
    position: relative;
    width: 100%;
    align-self: center;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 0.9fr);
    align-items: center;
    column-gap: 0;
    row-gap: 10px;
    padding: 80px 40px;
    border-radius: 20px;
    background: url("../img/map.jpg") center / cover no-repeat;
    border: 0;
    overflow: hidden;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.07),
        0 6px 16px -3px rgba(0, 0, 0, 0.11);
}

.follow-selected-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.06) 0%,
        rgba(0, 0, 0, 0.28) 24%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.28) 76%,
        rgba(0, 0, 0, 0.06) 100%
    );
    pointer-events: none;
}

.follow-selected-panel > * {
    position: relative;
    z-index: 1;
}

.follow-selected-root {
    min-width: 0;
    padding-right: 14px;
}

.selected-character {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: left;
}

.follow-email-block {
    min-width: 0;
}

.follow-submit-block {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    align-items: stretch;
}

.selected-character__avatar-wrap {
    width: 64px;
    height: 64px;
    box-sizing: border-box;
    border: 2px solid #ffffff;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
}

.selected-character__avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 28%;
    transform: scale(1.14);
    transform-origin: 50% 28%;
}

.selected-character__meta {
    min-width: 0;
    flex: 1;
}

.selected-character__name {
    display: block;
    margin: 0 0 4px;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.25;
    color: white;
}

.selected-character__tagline {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.714);
}

.character-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    justify-content: center;
    overflow: visible;
    padding: 4px 4px 8px;
    margin: 4px auto 0;
}

.character-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 8px 12px;
    outline: 1px solid #1f1f1f;
    border: none;
    border-radius: 999px;
    background: linear-gradient(
        118deg,
        #e5ebff 40%,
        #eef0ff 78%,
        #fff7fa 100%
    );
    cursor: pointer;
    font: inherit;
    color: var(--text);
    transition:
        background-color 0.18s ease,
        transform 0.15s ease;
}

.character-chip:hover {
    background: #e5ebff;
}

.character-chip:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 2px;
}

.character-chip__avatar-wrap {
    width: 28px;
    height: 28px;
    box-sizing: border-box;
    border: 1px solid #ffffff;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.character-chip__avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 28%;
    transform: scale(1.12);
    transform-origin: 50% 28%;
}

.character-chip__name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-input-email {
    width: 100%;
    height: 56px;
    box-sizing: border-box;
    border-radius: 999px 0 0 999px;
    border: 1px solid #121212;
    border-right: 0;
    padding: 0 16px;
    font-size: 16px;
    font-family: inherit;
    background: #ffffff;
    color: var(--text);
}

.follow-input-email::placeholder {
    color: rgba(0, 0, 0, 0.42);
}

.follow-input-email:focus {
    outline: none;
    border-color: #121212;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

@media (max-width: 900px) {
    .follow-selected-panel {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 22px 14px;
    }

    .follow-selected-root {
        width: 100%;
        padding-right: 0;
    }

    .character-row {
        width: 100%;
        justify-content: center;
        margin: 4px 0 0;
        padding: 0 12px 4px;
        box-sizing: border-box;
    }

    .follow-input-email {
        border-radius: 999px;
        border-right: 1px solid rgba(0, 0, 0, 0.1);
    }

    .follow-submit-block .btn-primary.btn-solid {
        border-radius: 999px;
    }
}

.follow-status {
    min-height: 0;
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
    white-space: pre-line;
}

.follow-status:empty {
    display: none;
}

.follow-submit-block .btn-primary.btn-solid {
    width: 100%;
    max-width: none;
    height: 56px;
    margin-left: 0;
    margin-right: 0;
    align-self: auto;
    border-radius: 0 999px 999px 0;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
    .follow-submit-block .btn-primary.btn-solid {
        border-radius: 999px;
    }
}

.follow-card .form-note {
    margin: 0;
    margin-top: -4px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.56);
    text-align: center;
}

.follow-card .form-note a {
    color: rgba(0, 0, 0, 0.72);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.follow-card .form-note a:hover {
    color: #111111;
}

.site-footer {
    width: 100%;
    padding: 0 0 12px;
}

.site-footer__note {
    margin: 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.58);
}

.site-footer__note a {
    color: rgba(0, 0, 0, 0.74);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-footer__note a:hover {
    color: #111111;
}

dialog {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    color: var(--text);
    width: min(640px, 92vw);
    padding: 0;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.35);
}

.modal-content {
    position: relative;
    padding: 48px 18px 10px;
    text-align: center;
}

.modal-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
}

.modal-content #modal-image {
    width: 100%;
    height: auto;
    max-height: min(68vh, 900px);
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Имя и хук — поверх картинки сверху, без затемняющего оверлея */
.modal-hero__head {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 16px 18px 14px;
    text-align: left;
    pointer-events: none;
}

.modal-hero__head #modal-name {
    margin: 0;
    color: #ffffff;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.75),
        0 2px 16px rgba(0, 0, 0, 0.55),
        0 0 1px rgba(0, 0, 0, 0.9);
}

.modal-hero__head .modal-hook {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.96rem;
    line-height: 1.4;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.7),
        0 2px 14px rgba(0, 0, 0, 0.5),
        0 0 1px rgba(0, 0, 0, 0.85);
}

/* Форма follow — внизу картинки, тоже без градиента */
.modal-hero__cta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 14px 18px 18px;
    text-align: left;
    pointer-events: auto;
}

.modal-action {
    margin-bottom: 0;
}

.modal-hero__cta .modal-action {
    margin-top: 0;
    margin-bottom: 0;
}

.modal-action__row {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.modal-action .follow-email-block {
    flex: 1 1 auto;
    min-width: 0;
}

.modal-action .follow-submit-block {
    flex: 0 0 auto;
    min-width: 15rem;
}

.modal-action .follow-input-email {
    width: 100%;
    background: #ffffff;
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px 0 0 999px;
    border-right: 0;
    box-shadow: none;
}

.modal-hero__cta .follow-input-email {
    background: #ffffff;
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-right: 0;
}

.modal-action .follow-input-email::placeholder {
    color: rgba(0, 0, 0, 0.42);
}

.modal-action .follow-input-email:focus {
    border-color: #111111;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.modal-action .follow-submit-block .btn-primary.btn-solid {
    width: 100%;
    min-width: 15rem;
    margin: 0;
    border-radius: 0 999px 999px 0;
    background: #121212;
    border-color: #121212;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
}

.modal-action .follow-submit-block .btn-primary.btn-solid:hover {
    background: #2c2c2c;
    border-color: #2c2c2c;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
}

.modal-legal {
    margin: 8px 0 0;
    font-size: 0.84rem;
    line-height: 1.45;
    color: rgba(0, 0, 0, 0.62);
}

.modal-legal a {
    color: rgba(0, 0, 0, 0.76);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.modal-details {
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: #fafafa;
    padding: 0 10px 10px;
}

.modal-details > summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    padding: 10px 2px;
}

.modal-details > summary::-webkit-details-marker {
    display: none;
}

.modal-details > summary::after {
    content: "▾";
    float: right;
    color: rgba(0, 0, 0, 0.6);
}

.modal-details[open] > summary::after {
    transform: rotate(180deg);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

#modal-sightings.sightings-feed--modal {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    display: grid;
    gap: 6px;
    text-align: left;
}

#modal-sightings.sightings-feed--modal:last-child {
    margin-bottom: 0;
}

#modal-sightings.sightings-feed--modal .modal-log-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.modal-sightings {
    margin-top: 10px;
    margin-bottom: 0;
    padding-bottom: 0;
    text-align: left;
    overflow: visible;
}

.modal-sightings__title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    overflow: visible;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.5);
}

/*
 * Modal spark — только мягкое свечение var(--accent), без белого ядра.
 */
.modal-sightings__pulse {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    top: 1px;
    --modal-spark-x: 50%;
    --modal-spark-y: 46%;
    filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 50%, transparent))
        drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 32%, transparent));
}

.modal-sightings__pulse::before {
    content: "";
    position: absolute;
    inset: -11px;
    pointer-events: none;
    background:
        radial-gradient(
            circle 7px at var(--modal-spark-x) var(--modal-spark-y),
            color-mix(in srgb, var(--accent) 52%, transparent) 0%,
            color-mix(in srgb, var(--accent) 22%, transparent) 52%,
            transparent 76%
        ),
        radial-gradient(
            ellipse 12px 10px at var(--modal-spark-x) var(--modal-spark-y),
            color-mix(in srgb, var(--accent) 34%, transparent) 0%,
            color-mix(in srgb, var(--accent-2) 12%, transparent) 48%,
            transparent 74%
        ),
        radial-gradient(
            circle 15px at var(--modal-spark-x) var(--modal-spark-y),
            color-mix(in srgb, var(--accent) 16%, transparent) 0%,
            transparent 62%
        );
    transform-origin: var(--modal-spark-x) var(--modal-spark-y);
    animation: modal-sightings-spark-core 2.35s ease-in-out infinite;
    will-change: transform, opacity;
}

.modal-sightings__pulse::after {
    content: "";
    position: absolute;
    inset: -11px;
    pointer-events: none;
    opacity: 0.92;
    filter: blur(1.5px);
    background:
        repeating-conic-gradient(
            from 9deg at var(--modal-spark-x) var(--modal-spark-y),
            transparent 0deg 8deg,
            color-mix(in srgb, var(--accent) 22%, transparent) 8deg 10deg,
            color-mix(in srgb, var(--accent) 38%, transparent) 10deg 13deg,
            color-mix(in srgb, var(--accent) 16%, transparent) 13deg 15deg,
            transparent 15deg 26deg
        ),
        repeating-conic-gradient(
            from 0deg at var(--modal-spark-x) var(--modal-spark-y),
            transparent 0deg 9deg,
            color-mix(in srgb, var(--accent) 14%, transparent) 9deg 12deg,
            color-mix(in srgb, var(--accent) 40%, transparent) 12deg 14.5deg,
            color-mix(in srgb, var(--accent) 18%, transparent) 14.5deg 17deg,
            transparent 17deg 30deg
        );
    -webkit-mask-image: radial-gradient(
        circle 11px at var(--modal-spark-x) var(--modal-spark-y),
        #000 0%,
        #000 36%,
        rgba(0, 0, 0, 0.4) 52%,
        transparent 74%
    );
    mask-image: radial-gradient(
        circle 11px at var(--modal-spark-x) var(--modal-spark-y),
        #000 0%,
        #000 36%,
        rgba(0, 0, 0, 0.4) 52%,
        transparent 74%
    );
    transform-origin: center;
    animation: modal-sightings-spark-rays 14s linear infinite;
    will-change: transform;
}

#modal-sightings.sightings-feed--modal .modal-log-body {
    min-width: 0;
    width: 100%;
}

#modal-sightings.sightings-feed--modal .modal-log-status {
    font-size: 12px;
    line-height: 1.2;
    padding: 0;
    border: 0;
    border-radius: 0;
    white-space: normal;
    color: rgba(20, 0, 196, 0.75);
    background: transparent;
    font-weight: 400;
    letter-spacing: 0.02em;
}

#modal-sightings.sightings-feed--modal .modal-log-desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.35;
    color: rgba(0, 0, 0, 0.72);
    max-width: 62ch;
}

@keyframes modal-sightings-spark-core {
    0%,
    100% {
        opacity: 0.88;
        transform: scale(0.92);
        filter: brightness(1.02) saturate(1.08);
    }

    42% {
        opacity: 1;
        transform: scale(1.06);
        filter: brightness(1.22) saturate(1.22);
    }

    68% {
        opacity: 0.94;
        transform: scale(1.1);
        filter: brightness(1.12) saturate(1.14);
    }
}

@keyframes modal-sightings-spark-rays {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal-sightings__pulse::before {
        animation: none;
        opacity: 0.95;
        transform: scale(1);
        filter: brightness(1.08) saturate(1.1);
    }

    .modal-sightings__pulse::after {
        animation: none;
        opacity: 0.55;
        transform: none;
    }
}

@media (max-width: 640px) {
    .modal-hero__head {
        padding: 12px 14px 10px;
    }

    .modal-hero__cta {
        padding: 12px 14px 14px;
    }
}

.page-loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 40;
    display: grid;
    place-items: center;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-logo {
    display: block;
    width: min(120px, 38vw);
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

.loader-spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #d8d8d8;
    border-top-color: #232323;
    animation: spin 0.8s linear infinite;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
