/* AUTO-GENERATED — php scripts/build-style-split.php — modul: memory */
/* ── Memory Public Page ── */

/* Karty ve výpisu: živé video nesmí být uvnitř <a> (iOS nespustí navigaci). */
.memories-grid .memory-card {
    position: relative;
}
.memory-card__open {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.001);
    transform: translateZ(0);
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
}
.memory-card__open:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.memory-layout {
    width: 100%;
    overflow-x: clip;
}

html:has(body.page-memory) {
    scroll-behavior: smooth;
}

.memory-hero {
    background: linear-gradient(165deg, #1b1310 0%, #2B180A 52%, #1b1310 100%);
    color: #FDF6EE;
    padding: 40px 20px 52px;
    position: relative;
}

.memory-hero--continue {
    /* Plynulé rozesvětlení tmavé cognac barvy směrem dolů (bez krémového overlayu,
       který by ve středu sekce dělal viditelný šedý pruh). Spodní okraj je
       teplejší hnědá, takže navazující světlá stránka už nepůsobí jako tvrdý řez. */
    background: linear-gradient(180deg, #1b1310 0%, #2B180A 55%, #6b5240 100%);
    padding-bottom: 64px;
}

.memory-hero__continue {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4px 20px 0;
    text-align: center;
}

.memory-hero__continue-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s ease;
    border-radius: 10px;
}

.memory-hero__continue-link:hover {
    color: #fff;
}

.memory-hero__continue-link:focus {
    outline: none;
}

.memory-hero__continue-link:focus-visible {
    color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.memory-hero__continue-text {
    max-width: 22rem;
    line-height: 1.45;
}

.memory-hero__continue-arrow {
    font-size: 1.4rem;
    line-height: 1;
    animation: memoryHeroContinueBounce 1.35s ease-in-out infinite;
}

@keyframes memoryHeroContinueBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    html:has(body.page-memory) {
        scroll-behavior: auto;
    }

    .memory-hero__continue-arrow {
        animation: none;
    }
}

.memory-hero__inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}

.memory-hero__grid {
    /* Vertikální rozložení: 1) hlavní fotka nahoře, 2) jméno + text,
       3) interakce (svíčky/dar). Vzkazy se přesunuly níže pod galerii. */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    max-width: 760px;
    margin: 0 auto;
}

.memory-hero__grid > .memory-hero__visual {
    order: 1;
    /* Rodič .memory-hero__grid má align-items: center, takže box o šířce 100vw
       se sám vycentruje na střed okna = full-bleed. Žádný margin/transform hack. */
    width: 100vw;
    max-width: none;
}

.memory-hero__grid > .memory-hero__main {
    order: 2;
    width: 100%;
}

.memory-hero__grid > .memory-hero__interact {
    order: 3;
    width: 100%;
    max-width: 640px;
}

.memory-hero__main {
    text-align: center;
    min-width: 0;
}

.memory-hero__main .memory-hero__lifebook,
.memory-hero__main .memory-hero__profile-actions {
    justify-content: center;
}

.memory-hero__main .memory-message--hero {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.memory-hero .memory-name {
    font-size: clamp(1.75rem, 4vw, 2.55rem);
    font-weight: 700;
    color: #FDF6EE;
    margin: 0 0 12px;
    line-height: 1.12;
}

.memory-hero .memory-life-dates {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.memory-hero .memory-age {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 16px;
    font-style: italic;
}

.memory-hero__lifebook {
    margin: 8px 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.memory-hero__lifebook .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.memory-hero__profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.memory-hero__profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.memory-hero__profile-btn--light.btn-outline {
    border-color: rgba(255, 255, 255, 0.45);
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.06);
}

.memory-hero__profile-btn--light.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.memory-hero__ftree {
    display: inline-flex;
}

.memory-message--hero {
    font-family: var(--font-serif);
    font-size: 1.08rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 8px;
    max-width: 100%;
    white-space: pre-line;
}

.memory-hero__interact {
    min-width: 0;
}

.memory-hero__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.memory-hero__tab {
    flex: 1 1 min(168px, 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.memory-hero__tab:hover {
    background: rgba(255, 255, 255, 0.11);
    color: #fff;
}

.memory-hero__tab.is-active {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.42);
    color: #fff;
}

.memory-hero__tab:focus {
    outline: none;
}

.memory-hero__tab:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.memory-hero__tab-label {
    text-align: center;
}

.memory-hero__tab .candle-count--hero {
    margin-left: 0;
}

.memory-hero__tab-panels {
    margin-top: 12px;
}

.memory-hero__tab-panels .memory-hero__panel {
    margin-top: 0;
}

.memory-hero__lists {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    max-height: min(52vh, 480px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.memory-hero__lists--ticker {
    max-height: none;
    overflow: visible;
}

.memory-hero__list-block {
    margin-bottom: 20px;
}

.memory-hero__list-block:last-child {
    margin-bottom: 0;
}

.memory-hero__list-title {
    font-size: 1.02rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.memory-ticker__viewport {
    overflow: hidden;
    width: 100%;
    margin-top: 4px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}

/* Smíšený pás (příspěvky + svíčky): jedna skupina, horizontální posuv — bez marquee animace (transform zde nekazit scroll). */
.memory-ticker--mixed .memory-ticker__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-behavior: auto;
    cursor: default;
    animation: none !important;
}

/* Smíšený pás: inline-flex + min-width aby řádek měl šířku obsahu a viewport měl scrollWidth > clientWidth */
.memory-ticker--mixed .memory-ticker__viewport > .memory-ticker__group,
.memory-ticker--mixed .memory-ticker__group--mixed {
    display: inline-flex;
    width: max-content;
    max-width: none;
    min-width: min-content;
    flex-shrink: 0;
    vertical-align: top;
    animation: none !important;
}

/* Marquee (-50 %) jen tam, kde NENÍ smíšený pás (jedna řada). Kořen má vždy obě třídy memory-ticker + memory-ticker--mixed → tato animace se na vzpomínku vůbec nepoužije. */
.memory-ticker__track {
    display: flex;
    width: max-content;
}

.memory-ticker:not(.memory-ticker--mixed) .memory-ticker__track {
    animation: memoryTickerMarquee var(--ticker-duration, 40s) linear infinite;
}

@keyframes memoryTickerMarquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Smíšený pás: vždy bez marqueu (i když na serveru visí starší CSS nebo chybí třída memory-ticker). */
.memory-ticker--mixed .memory-ticker__track {
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
}

.memory-ticker__group {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 12px;
    padding-right: 36px;
}

.memory-ticker__item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.84rem;
    line-height: 1.35;
    max-width: min(560px, 94vw);
}

.memory-ticker__item--contribution {
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.28);
}

.memory-ticker__item--contribution .memory-ticker__kind {
    color: rgba(0, 0, 0, 0.45);
}

.memory-ticker__item--contribution .memory-ticker__name {
    font-weight: 600;
}

.memory-ticker__item--contribution .memory-ticker__text {
    color: var(--text);
}

.memory-ticker__kind {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.55);
    flex-shrink: 0;
    align-self: center;
}

.memory-ticker__icon {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
    align-self: center;
}

.memory-ticker__body {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    flex: 1 1 10rem;
}

.memory-ticker__item--candle .memory-ticker__body {
    flex: 1 1 12rem;
}

.memory-ticker__name {
    flex-shrink: 0;
    align-self: center;
    line-height: 1.35;
}

.memory-ticker__text {
    color: rgba(255, 255, 255, 0.82);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
    align-self: center;
}

.memory-ticker__anon,
.memory-ticker__pending {
    font-style: italic;
    color: rgba(255, 255, 255, 0.72);
}

.memory-ticker__item--contribution .memory-ticker__anon,
.memory-ticker__item--contribution .memory-ticker__pending {
    color: var(--text-muted);
}

.memory-ticker__date {
    flex-shrink: 0;
    flex-basis: 100%;
    width: 100%;
    text-align: right;
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    align-self: stretch;
    box-sizing: border-box;
}

.memory-ticker__item--contribution .memory-ticker__date {
    color: var(--text-muted);
    border-top-color: rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .memory-ticker__viewport {
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .memory-ticker--mixed .memory-ticker__viewport {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .memory-ticker--mixed .memory-ticker__viewport > .memory-ticker__group {
        display: inline-flex;
        width: max-content;
        max-width: none;
        min-width: min-content;
        vertical-align: top;
    }

    .memory-ticker__track {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        width: max-content;
        max-width: none;
    }

    .memory-ticker:not(.memory-ticker--mixed) .memory-ticker__track {
        animation: memoryTickerMarquee var(--ticker-duration, 40s) linear infinite;
        will-change: transform;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    .memory-ticker__group {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: flex-start;
        width: auto;
        flex-shrink: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .memory-ticker__track {
        animation: none;
        flex-direction: row;
        flex-wrap: nowrap;
        width: max-content;
        max-width: none;
        will-change: auto;
    }

    .memory-ticker--mixed .memory-ticker__viewport > .memory-ticker__group {
        display: inline-flex;
        width: max-content;
        max-width: none;
        min-width: min-content;
        vertical-align: top;
    }

    .memory-ticker__viewport {
        -webkit-mask-image: none;
        mask-image: none;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .memory-ticker__group {
        flex-direction: row;
        flex-wrap: nowrap;
        width: auto;
        flex-shrink: 0;
        padding-right: 36px;
    }
}

.memory-hero__panel {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 18px 18px 20px;
    margin-top: 16px;
}

.memory-hero__panel-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #fff;
}

.memory-hero__panel-heading {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    margin: 0 0 8px;
}

.memory-hero__panel-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 14px;
}

.candle-count--hero {
    margin-left: auto;
}

.memory-hero .candle-form__input {
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    border-color: rgba(0, 0, 0, 0.1);
}

.memory-hero .candle-form__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(var(--accent-rgb), 0.22);
}

.memory-hero .candle-form__row {
    flex-direction: column;
    align-items: stretch;
}

.memory-hero .form-group {
    margin-bottom: 10px;
}

.memory-hero .form-group:last-of-type {
    margin-bottom: 12px;
}

.memory-hero__form-msg {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #fde68a;
    text-align: left;
}

.memory-share--hero {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.memory-hero__visual {
    position: relative;
}

.memory-hero__figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    /* Full-bleed pruh přes celou šířku – užší banner (jako fotobedna).
       U fotky na šířku (cover, object-position nahoře) se ořízne spodek, hlavy
       zůstanou. U portrétů (contain) zůstane fotka celá s rozmazanými boky. */
    width: 100%;
    height: clamp(300px, 42vh, 460px);
    background: #241610;
}

/* ── Live Photo (motion photo) ──
   Společná komponenta používaná jak pro Apple Live Photo (LivePhotosKit),
   tak pro generic motion (krátký <video> hrající přes <img>).
   Markup:
     <div class="live-photo" data-live-kind="generic|apple">
         <img class="live-photo__img" src="...">
         <video class="live-photo__video" muted playsinline loop preload="metadata"></video>
         <span class="live-photo__badge">● LIVE</span>
     </div>
*/
.live-photo {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}
.live-photo__img,
.live-photo__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.live-photo__video {
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.live-photo.is-playing .live-photo__video { opacity: 1; }
.live-photo.is-playing .live-photo__img    { opacity: 0; transition: opacity 0.35s ease; }

.live-photo__badge {
    position: absolute;
    top: 10px; left: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 9px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
    user-select: none;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.live-photo__badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 6px rgba(255,59,48,0.8);
}
.live-photo.is-playing .live-photo__badge {
    background: rgba(255,59,48,0.9);
}

/* Wrapper, který drží parallax transform — obsahuje obě <img> vrstvy.
   Scale 1.3 = 15 % overflow na každou stranu, prostor pro výrazný posun. */
.memory-hero__parallax {
    position: absolute;
    inset: 0;
    /* Mírnější zoom (1.08) — chceme, aby byla fotka co nejvíc vidět celá. */
    transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.08);
    transform-origin: center center;
    will-change: transform;
}

/* Hero slide = jeden snímek, který může být statický (img) nebo Live Photo (img+video). */
.memory-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
    will-change: opacity;
}
.memory-hero__slide.is-active { opacity: 1; }

/* ── Ken Burns efekt (pomalý zoom + posun) ──
   Každý slide dostane jeden z 5 směrů. Animace běží 12 s, ease-out
   tak aby zpomalovala. `both` zachová finální stav i když se animace
   sama dokončí (před přechodem na další snímek). */
/* Mírnější Ken Burns — fotka má primárně být vidět celá. Zoom max 4 %
   a posun max 1.2 % — jemný „dech" bez výrazného oříznutí. */
/* translate3d() vynutí GPU kompozici → animace běží na separátní vrstvě.
   Větší scale (1.10) + výraznější translate (3.5%) → pohyb je dobře vidět. */
@keyframes kb-zoom-tl {
    from { transform: scale(1.0)  translate3d(0, 0, 0); }
    to   { transform: scale(1.10) translate3d(-3.5%, -3.5%, 0); }
}
@keyframes kb-zoom-tr {
    from { transform: scale(1.0)  translate3d(0, 0, 0); }
    to   { transform: scale(1.10) translate3d(3.5%, -3.5%, 0); }
}
@keyframes kb-zoom-bl {
    from { transform: scale(1.0)  translate3d(0, 0, 0); }
    to   { transform: scale(1.10) translate3d(-3.5%, 3.5%, 0); }
}
@keyframes kb-zoom-br {
    from { transform: scale(1.0)  translate3d(0, 0, 0); }
    to   { transform: scale(1.10) translate3d(3.5%, 3.5%, 0); }
}
@keyframes kb-zoom-out {
    from { transform: scale(1.12) translate3d(0, 0, 0); }
    to   { transform: scale(1.0)  translate3d(0, 0, 0); }
}

.memory-hero__slide-img {
    transform-origin: center center;
    animation-duration: 14s;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
    animation-play-state: paused;
    will-change: transform;
    backface-visibility: hidden;
    z-index: 1; /* nad rozmazaným backdropem */
}
/* Animace hraje jen na aktuálně viditelném slidu, jinak je pauznutá. */
.memory-hero__slide.is-active .memory-hero__slide-img { animation-play-state: running; }

/* První slide má default Ken Burns (zoom-in zleva nahoru), nově načtené
   slidy dostanou variantu přes JS (.kb-tl/tr/bl/br/zoom-out). */
.memory-hero__slide                        .memory-hero__slide-img { animation-name: kb-zoom-tl; }
.memory-hero__slide.kb-tl                  .memory-hero__slide-img { animation-name: kb-zoom-tl; }
.memory-hero__slide.kb-tr                  .memory-hero__slide-img { animation-name: kb-zoom-tr; }
.memory-hero__slide.kb-bl                  .memory-hero__slide-img { animation-name: kb-zoom-bl; }
.memory-hero__slide.kb-br                  .memory-hero__slide-img { animation-name: kb-zoom-br; }
.memory-hero__slide.kb-zoom-out            .memory-hero__slide-img { animation-name: kb-zoom-out; }

/* U Live Photo (kde hraje video) Ken Burns vypneme — pohyb dělá samo video. */
.memory-hero__slide.has-live.is-playing .memory-hero__slide-img { animation: none; }

/* Portrét je na výšku → contain ho ukáže CELÝ (neoříznutý). Pruh je přes celou
   šířku, fotka je celá uprostřed a okraje vyplní rozmazaná kopie (slide-blur).
   Ken Burns vypínáme, aby zoom neodhaloval okraje neoříznutého snímku. */
.memory-hero__slide-img { animation: none !important; }

.memory-hero__slide-img,
.memory-hero__slide-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    z-index: 1;
}

/* Rozmazaná zvětšená kopie fotky vyplní prázdné okraje full-bleed pruhu. */
.memory-hero__slide-blur {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.15);
    filter: blur(30px) brightness(0.8);
    z-index: 0;
}

.memory-hero__slide-video {
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.memory-hero__slide.has-live.is-playing .memory-hero__slide-video { opacity: 1; }
.memory-hero__slide.has-live.is-playing .memory-hero__slide-img   { opacity: 0; }
.memory-hero__slide-img { transition: opacity 0.4s ease; }

.memory-hero__live-badge {
    display: none;
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 5px 10px 5px 9px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    z-index: 2;
    align-items: center;
    gap: 5px;
}
.memory-hero__slide.has-live .memory-hero__live-badge { display: inline-flex; }
.memory-hero__slide.has-live.is-playing .memory-hero__live-badge {
    background: rgba(255, 59, 48, 0.92);
}

/* Zachováme starý třídy pro zpětnou kompatibilitu (lightbox a další JS hledají gallery-photo) */
.memory-hero__photo { display: none; }

@media (prefers-reduced-motion: reduce) {
    .memory-hero__slide,
    .memory-hero__slide-img,
    .memory-hero__slide-video { transition: none; }
    .memory-hero__slide-img { animation: none !important; }
    .memory-hero__parallax {
        --parallax-y: 0px;
        transform: scale(1) !important;
    }
}

.memory-hero__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.memory-hero__nav:hover {
    background: rgba(0, 0, 0, 0.62);
}

.memory-hero__nav--prev {
    left: 12px;
}

.memory-hero__nav--next {
    right: 12px;
}

.memory-hero__figure:hover .memory-hero__nav,
.memory-hero__figure:focus-within .memory-hero__nav {
    opacity: 1;
}

@media (hover: none) {
    .memory-hero__nav {
        opacity: 0.88;
    }
}

.contribute-photo {
    margin: 0 0 10px;
}
.contribute-photo__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.contribute-photo__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-wrap: wrap;
}
.contribute-photo__btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.contribute-photo__label:hover .contribute-photo__btn {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
}
.contribute-photo__name {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.contribute-photo__preview {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    vertical-align: middle;
}
.contribute-photo__preview[hidden] {
    display: none !important;
}
.contribute-photo__preview img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
}
.contribute-photo__clear {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.contribute-media {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 12px 0 16px;
}
.contribute-media .contribute-photo {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}
.contribute-audio {
    margin: 0;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.contribute-audio__preview {
    max-width: 100%;
}
@media (min-width: 560px) {
    .memory-hero__accordions {
        max-width: 720px;
    }
}
.contribute-audio__label {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
}
.contribute-audio__hint {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 14px;
    max-width: 36em;
    line-height: 1.45;
}
.contribute-audio__unsupported {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 10px 0 0;
}
.contribute-audio__controls {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    width: 100%;
}
.contribute-audio__controls .btn,
.contribute-audio__controls .btn-outline {
    color: #FDF6EE !important;
    border-color: rgba(253, 246, 238, 0.55) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    display: inline-flex !important;
    opacity: 1 !important;
}
.contribute-audio__controls .btn:hover,
.contribute-audio__controls .btn-outline:hover {
    color: #fff !important;
    border-color: #FDF6EE !important;
    background: rgba(255, 255, 255, 0.16) !important;
}
.memory-hero__accordion-body .btn-primary {
    color: #fff;
}
.contribute-audio__status {
    font-size: 0.85rem;
    color: rgba(243, 232, 216, 0.9);
    margin: 10px 0 0;
    text-align: center;
    width: 100%;
}
.contribute-audio__preview,
.contrib-audio {
    width: 100%;
    max-width: 100%;
    margin: 8px 0 4px;
    border-radius: 8px;
}
.contrib-audio {
    max-width: 360px;
}

/* Vlastní přehrávač hlasové zprávy (feed) */
.voice-player {
    --vp-gold: #d4b483;
    --vp-gold-soft: rgba(212, 180, 131, 0.35);
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    margin: 12px auto 6px;
    padding: 8px 12px 8px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(212, 180, 131, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.voice-player__btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #2a1f16;
    background: linear-gradient(145deg, #e8d2a8, #c4a35a);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, filter 0.15s ease;
}
.voice-player__btn:hover {
    filter: brightness(1.06);
    transform: scale(1.04);
}
.voice-player__btn:active {
    transform: scale(0.97);
}
.voice-player__icon {
    width: 16px;
    height: 16px;
    display: block;
}
.voice-player__icon--play {
    margin-left: 2px;
}
.voice-player.is-playing .voice-player__icon--play {
    display: none;
}
.voice-player.is-playing .voice-player__icon--pause {
    display: block !important;
}
.voice-player:not(.is-playing) .voice-player__icon--pause {
    display: none !important;
}
.voice-player__track {
    flex: 1 1 auto;
    min-width: 0;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    cursor: pointer;
}
.voice-player__fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--vp-gold-soft), var(--vp-gold));
    transition: width 0.08s linear;
}
.voice-player__time {
    flex: 0 0 auto;
    min-width: 2.4em;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    color: rgba(232, 210, 168, 0.85);
    text-align: right;
}
.memory-feed__card-audio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.contribute-photo__hint {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.35;
}
.contrib-author-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.memory-hero__form-msg--err {
    color: #a94442;
}
.memory-hero__form-msg--ok {
    color: #a7f3d0;
}

.memory-hero__figure--placeholder {
    aspect-ratio: auto;
    min-height: 260px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.memory-hero__placeholder-icon {
    font-size: 4rem;
    line-height: 1;
    opacity: 0.45;
}

@media (min-width: 560px) {
    .memory-hero .candle-form__row {
        flex-direction: row;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .memory-hero__grid {
        gap: 22px;
    }

        .memory-hero__figure {
            height: clamp(220px, 34vh, 340px);
        }

    .memory-hero {
        padding-top: 28px;
    }
}

.memory-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 24px 80px;
    text-align: center;
}

.memory-page.memory-page--below {
    padding: 48px 24px 80px;
}

.memory-page .memory-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    margin: 0;
    border: 3px solid var(--white);
    box-shadow: none;
}

.memory-page .memory-name {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.memory-showcase-badge {
    display: inline-block;
    margin: 0 0 12px;
    padding: 5px 12px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent, #8B6914);
    background: rgba(193, 154, 107, 0.14);
    border: 1px solid rgba(193, 154, 107, 0.55);
    border-radius: 4px;
}

/* Na tmavé stránce vzpomínky musí být štítek světlý, jinak zanikne. */
.memory-hero .memory-showcase-badge,
.memory-page .memory-showcase-badge {
    color: #FDF6EE;
    background: rgba(193, 154, 107, 0.42);
    border-color: rgba(253, 246, 238, 0.55);
}

.memory-showcase-badge--on-dark {
    color: #f5e6c8;
    background: rgba(193, 154, 107, 0.28);
    border-color: rgba(245, 230, 200, 0.45);
    margin-bottom: 8px;
}

.memory-page .memory-life-dates {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.memory-page .memory-age {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-style: italic;
}

.memory-page .memory-divider {
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin: 0 auto 32px;
}

.memory-page .memory-message {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text);
    max-width: 580px;
    margin: 0 auto 48px;
    white-space: pre-line;
}

.memory-candles--list {
    margin-top: 40px;
}

.memory-gallery {
    margin-bottom: 48px;
}

.memory-section__title {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.memory-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.memory-gallery .gallery-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    border: var(--frame-border);
    box-shadow: var(--frame-ring), 0 1px 4px rgba(0,0,0,.08);
}

.memory-gallery .gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: var(--frame-ring), 0 4px 12px rgba(0,0,0,.15);
}

/* ── Mřížka zbylých fotek (pod hlavní fotkou) ── */
.memory-gallery-grid {
    margin-bottom: 48px;
}

.memory-gallery-grid__title {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 20px;
}

.memory-gallery-grid__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.memory-gallery-grid__item {
    position: relative;
    display: block;
    padding: 0;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.05);
    box-shadow: var(--frame-ring), 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.memory-gallery-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.memory-gallery-grid__item:hover {
    transform: translateY(-2px);
    box-shadow: var(--frame-ring), 0 8px 20px rgba(0, 0, 0, 0.18);
}

.memory-gallery-grid__item:hover img {
    transform: scale(1.06);
}

.memory-gallery-grid__live {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 7px;
    border-radius: 999px;
    pointer-events: none;
}

@media (max-width: 480px) {
    .memory-gallery-grid__items {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        gap: 8px;
    }
}

.memory-video {
    margin-bottom: 48px;
}

.memory-video__frame {
    border-radius: var(--radius);
    overflow: hidden;
    line-height: 0;
}

.memory-video video {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius);
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .memory-video__frame { --parallax-y: 0px; }
}

.memory-qr {
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius);
    display: inline-block;
    border: var(--frame-border);
    box-shadow: var(--shadow-card);
}

.memory-qr img {
    width: 160px;
    height: 160px;
    margin: 0 auto 12px;
}

.memory-qr p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Lightbox ── */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: #000;
    cursor: pointer;
}

.lightbox__media {
    position: relative;
    z-index: 1;
    width: 90vw;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Backdrop už nepoužíváme — fotka vyplní celý rámeček. */
.lightbox__bg { display: none; }

.lightbox__img {
    /* Galerie ukazuje fotku v původní velikosti (contain) — nic neoříznuté.
       Auto-margin trik vycentruje abs. element s intrinsickou velikostí,
       takže obě crossfade vrstvy leží přesně na sobě. */
    position: absolute;
    inset: 0;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    z-index: 1;
    transform-origin: center center;
    animation-duration: 16s;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
    opacity: 0;
    /* Stejně dlouhý plynulý crossfade jako v hero náhledu */
    transition: opacity 1.4s ease-in-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
}
.lightbox__img.is-active { opacity: 1; }
/* Ken Burns hraje jen na aktivní vrstvě — neaktivní vrstva (skrytá ghost img) má pauznutou animaci,
   ať neplýtvá GPU a nezpůsobuje škubání. */
.lightbox__img:not(.is-active) { animation-play-state: paused; }
.lightbox__img.is-active       { animation-play-state: running; }
/* Ken Burns varianty v lightboxu — JS přidá jednu z těchto tříd */
.lightbox__img.kb-tl       { animation-name: kb-zoom-tl; }
.lightbox__img.kb-tr       { animation-name: kb-zoom-tr; }
.lightbox__img.kb-bl       { animation-name: kb-zoom-bl; }
.lightbox__img.kb-br       { animation-name: kb-zoom-br; }
.lightbox__img.kb-zoom-out { animation-name: kb-zoom-out; }
/* Když hraje video u Live Photo, statický img je skrytý → animaci ani nepotřebujeme */
.lightbox__media.is-playing .lightbox__img { animation: none; }
/* Ken Burns v galerii běží i při prefers-reduced-motion — je to jemný,
   pomalý efekt (16s), ne bleskový pohyb, a je součástí zážitku z galerie. */

.lightbox__media .lightbox__img { z-index: 1; }

.lightbox__video {
    position: absolute;
    inset: 0;
    margin: auto;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.lightbox__media.is-playing .lightbox__video { opacity: 1; }
.lightbox__media.is-playing .lightbox__img    { opacity: 0; }
/* Pozor: transition pro .lightbox__img je definovaná výš (1.4s).
   Nepřepisovat tady krátkým časem — způsobovalo to rychlé přeskakování v galerii. */

/* Samostatný přehrávač videa z filmového pásu (#memory-video-modal) — jde
   jen o jedno <video controls>, žádné Ken Burns/crossfade vrstvy, takže
   nepotřebuje "is-playing" gate jako Live Photo video v hlavním lightboxu. */
.lightbox--video .lightbox__video {
    position: static;
    opacity: 1;
    pointer-events: auto;
}

/* Apple LivePhotosKit container — vyrenderuje vlastní DOM */
.lightbox__livekit {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    overflow: hidden;
    z-index: 3;
}

.lightbox__live-toggle {
    position: absolute;
    bottom: 16px; left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 8px 16px 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}
.lightbox__live-toggle:hover { background: rgba(255, 59, 48, 0.85); }
.lightbox__live-toggle.is-active { background: rgba(255, 59, 48, 0.92); }
.lightbox__live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 8px rgba(255,59,48,0.8);
}

.lightbox__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.6);
    color: #fff;
    font-size: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    z-index: 2;
    transition: background 0.2s;
}

.lightbox__arrow:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox__arrow--left {
    left: 16px;
}

.lightbox__arrow--right {
    right: 16px;
}

.lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* ── Memory sections (candles, contributions) ── */

.memory-section {
    margin-top: 56px;
    text-align: left;
}

.memory-section__title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.candle-icon {
    font-size: 1.5rem;
}

.candle-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 14px;
}

.candle-form__hint {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}
.candle-form__hint:empty { display: none; }
.candle-form__input--need {
    outline: 2px solid #c9a227 !important;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25);
}
.candle-form__input--ready {
    font-size: 1.1rem !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: default;
}
.candle-form--staged .candle-form__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.candle-form--staged .candle-form__actions[hidden] { display: none !important; }
.candle-form__preview-edit {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 8px;
}
.candle-form__preview-edit:hover { color: #fff; }
.candle-form--staged #candle-gift-picker[hidden] { display: none !important; }

.candle-form {
    margin-bottom: 24px;
}

.candle-form__row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.candle-form__input {
    flex: 1;
    min-width: 120px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    border: var(--field-border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--field-ring);
}

.candle-form__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

.candle-form__input--wide {
    flex: 2;
}

.candle-form__btn {
    white-space: nowrap;
}

.candle-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.candle-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    border: var(--frame-border);
    box-shadow: var(--field-ring);
    transition: background var(--transition);
}

.candle-item--new {
    animation: candleFadeIn 0.6s ease;
}

@keyframes candleFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.candle-item__flame {
    font-size: 1.2rem;
    flex-shrink: 0;
    animation: candleFlicker 2s ease-in-out infinite alternate;
}

@keyframes candleFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.candle-item__content {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
}

.candle-item__content strong {
    margin-right: 6px;
}

.candle-item__msg {
    color: var(--text-muted);
}

.candle-item__anon {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.candle-item__time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Contributions ── */

.contribution-card {
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: var(--frame-border);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
}

.contribution-card__text {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 12px;
}

.contribution-card__meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Visit counter ── */

.memory-visits {
    margin-top: 40px;
    text-align: center;
}

.memory-visits p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Social share buttons ── */
.memory-share {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 16px 0 8px;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0;
}
.share-btn:hover {
    transform: scale(1.12);
    opacity: 0.9;
}
.share-btn--facebook { background: #1877F2; }
.share-btn--x { background: #000; }
.share-btn--whatsapp { background: #25D366; }
.share-btn--email { background: var(--accent); }
.share-btn--copy { background: var(--text-muted); }
.share-btn--native { background: linear-gradient(135deg, #833AB4, #E1306C, #F77737); }

.footer-share {
    order: 1;
}
/* Sdílení v patičce je ve výchozím stavu sbalené pod tlačítkem – na všech šířkách. */
.footer-share__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(196, 168, 124, 0.3);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.footer-share__toggle .icon { color: var(--gold); }
.footer-share__toggle:hover {
    background: rgba(196, 168, 124, 0.1);
    color: #fff;
    border-color: rgba(196, 168, 124, 0.5);
}
.footer-share__toggle svg { display: block; }

.footer-share__list { display: none; }
.footer-share.is-open .footer-share__list {
    display: flex;
    margin-top: 14px;
    animation: memory-add-in 0.3s ease;
}

/* Brandové barvy (FB modrá, X černá, WhatsApp zelená…) v teplé pergamenové
   patičce působily cize. Sjednocené do stejného tlumeného, obrysového
   stylu jako .memory-share--hero – ikony zůstávají rozpoznatelné, ale
   nekřičí barvou. */
.footer-share__list .share-btn {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(196, 168, 124, 0.22);
    color: rgba(255, 255, 255, 0.75);
}
.footer-share__list .share-btn:hover {
    background: rgba(196, 168, 124, 0.16);
    border-color: rgba(196, 168, 124, 0.4);
    color: #fff;
    opacity: 1;
}

@media (max-width: 900px) {
    .ftree-form-grid--2,
    .ftree-form-grid--3,
    .ftree-edit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ftree-create-row,
    .ftree-relation-form {
        flex-direction: column;
    }

    .ftree-create-row .form-control,
    .ftree-relation-form .form-control {
        width: 100%;
    }

    .ftree-section {
        padding: 1rem 1.25rem;
    }

    .ftree-canvas {
        padding: 0.75rem;
    }

    .ftree-members-grid {
        grid-template-columns: 1fr;
    }

    .ftree-dark-card {
        padding: 12px;
        gap: 10px;
    }

    .ftree-dark-card__photo {
        width: 42px;
        height: 42px;
    }

    .ftree-add-section {
        padding: 14px;
    }

    .ftree-edit-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Addon toggle switch */
.addon-toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.addon-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.addon-toggle__track { position: absolute; inset: 0; background: #d4d0ca; border-radius: 12px; transition: background 0.25s; cursor: pointer; }
.addon-toggle__track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.15); transition: transform 0.25s; }
.addon-toggle input:checked + .addon-toggle__track { background: var(--accent); }
.addon-toggle input:checked + .addon-toggle__track::after { transform: translateX(20px); }

/* ── Timeline photo slider ── */

.tl-slider {
    position: relative;
    margin-bottom: 12px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-alt);
}

.tl-slider__track {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
}

.tl-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
}

.tl-slider__slide--active {
    opacity: 1;
    z-index: 1;
}

.tl-slider__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tl-slider__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.4;
    z-index: 2;
}

.tl-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--text);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.tl-slider:hover .tl-slider__nav {
    opacity: 1;
}

.tl-slider__nav--prev { left: 6px; }
.tl-slider__nav--next { right: 6px; }

.tl-slider__dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.tl-slider__dot-ind {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.tl-slider__dot-ind--active {
    background: #fff;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .tl-slider__nav {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
        opacity: 0.8;
    }
}

/* ── Fullscreen slideshow ── */

.mem-slideshow {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mem-slideshow__bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.3);
    z-index: 0;
}

.mem-slideshow__img {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}

.mem-slideshow__caption {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    background: rgba(0,0,0,0.5);
    padding: 8px 20px;
    border-radius: 20px;
    max-width: 80vw;
    backdrop-filter: blur(4px);
}

.mem-slideshow__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.15);
    z-index: 3;
}

.mem-slideshow__progress-bar {
    height: 100%;
    width: 0;
    background: var(--accent, #3E2407);
}

.mem-slideshow__counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    z-index: 3;
}

.mem-slideshow__close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 4;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.mem-slideshow__close:hover {
    background: rgba(255,255,255,0.3);
}

.mem-slideshow__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.mem-slideshow__nav:hover {
    background: rgba(255,255,255,0.25);
}

.mem-slideshow__nav--prev { left: 16px; }
.mem-slideshow__nav--next { right: 16px; }


@media (max-width: 768px) {
    .mem-slideshow__nav {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .mem-slideshow__nav--prev { left: 8px; }
    .mem-slideshow__nav--next { right: 8px; }
    .mem-slideshow__caption {
        font-size: 0.9rem;
        bottom: 50px;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   Gift Picker (výběr daru)
   ══════════════════════════════════════════════════════════════════════ */

.gift-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.gift-picker--submit {
    margin-top: 8px;
}

.gift-picker__btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
    font-size: inherit;
    font-family: inherit;
    color: var(--text);
}

.gift-picker__btn:hover {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gift-picker__btn:active {
    transform: translateY(0) scale(0.95);
    box-shadow: none;
}

.gift-picker__btn.is-active {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.gift-picker__btn--primary {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.06);
}

.gift-picker__btn--submit:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.gift-picker__icon {
    font-size: 1.3rem;
    line-height: 1;
}

.gift-picker__label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Gift picker: "+" button and dropdown grid */

.gift-picker {
    position: relative;
}

.gift-picker__more {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm, 8px);
    background: var(--white);
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
    font-family: inherit;
    line-height: 1;
    flex-shrink: 0;
    min-width: 52px;
}

.gift-picker__more:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.06);
    transform: translateY(-1px);
}

.gift-picker__more.is-open {
    border-style: solid;
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
}

.gift-picker__grid {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 8px;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: none;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gift-picker__grid.is-open {
    display: grid;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: giftGridIn 0.2s ease forwards;
}

@keyframes giftGridIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.gift-picker__grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm, 8px);
    background: none;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, transform 0.12s;
    font-family: inherit;
    color: var(--text);
}

.gift-picker__grid-btn:hover {
    background: rgba(var(--accent-rgb), 0.06);
    border-color: var(--border);
    transform: scale(1.08);
}

.gift-picker__grid-btn.is-active {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
}

.gift-picker__grid-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.gift-picker__grid-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
}

@media (max-width: 480px) {
    .gift-picker__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Gift type animations in ticker */
.memory-ticker__item--flower .memory-ticker__icon {
    animation: giftBloom 2s ease-in-out infinite;
}
.memory-ticker__item--heart .memory-ticker__icon {
    animation: giftPulse 1.2s ease-in-out infinite;
}
.memory-ticker__item--butterfly .memory-ticker__icon {
    animation: giftFlutter 1.8s ease-in-out infinite;
}
.memory-ticker__item--star .memory-ticker__icon {
    animation: giftTwinkle 2s ease-in-out infinite;
}
.memory-ticker__item--dove .memory-ticker__icon {
    animation: giftFloat 2.5s ease-in-out infinite;
}
.memory-ticker__item--candle .memory-ticker__icon {
    animation: giftFlame 1.5s ease-in-out infinite;
}

@keyframes giftFlame {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1) translateY(-1px); }
}

@keyframes giftBloom {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(5deg); }
}

@keyframes giftPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes giftFlutter {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(5deg); }
    75% { transform: translateY(-3px) rotate(-5deg); }
}

@keyframes giftTwinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

@keyframes giftFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* ══════════════════════════════════════════════════════════════════════
   Oblíbená hudba (odkaz / embed Spotify·YouTube)
   ══════════════════════════════════════════════════════════════════════ */

.memory-favorite-music {
    margin: 16px 0 8px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.18);
    max-width: min(320px, 100%);
}

.memory-favorite-music--yt-mini {
    max-width: 280px;
    padding: 10px 12px;
}

.memory-favorite-music__label {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 4px;
}

.memory-favorite-music__title {
    font-family: var(--font-serif, Georgia, serif);
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.memory-favorite-music__yt-mini {
    width: 260px;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    /* YouTube v příliš malém iframe často otevře youtube.com místo přehrání zde */
    min-height: 146px;
}

.memory-favorite-music__yt-mini iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 146px;
    border: 0;
}

.memory-favorite-music__link {
    margin-top: 10px;
    margin-right: 8px;
    margin-bottom: 4px;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.memory-favorite-music__link:hover {
    border-color: rgba(255, 255, 255, 0.75) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.18) !important;
}

.memory-favorite-music__title--muted {
    font-size: 0.95rem;
    opacity: 0.75;
}

.memory-favorite-music__play {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    font-weight: 600;
    text-decoration: none;
}

.memory-favorite-music__play:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

.memory-favorite-music__play--spotify {
    background: rgba(30, 215, 96, 0.28) !important;
}

.memory-favorite-music__play--spotify:hover {
    background: rgba(30, 215, 96, 0.42) !important;
}

.memory-favorite-music__play--yt {
    background: rgba(196, 48, 43, 0.35) !important;
}

.memory-favorite-music__play--yt:hover {
    background: rgba(196, 48, 43, 0.5) !important;
}

.memory-favorite-music__embed {
    margin-top: 10px;
    margin-bottom: 4px;
}

.memory-favorite-music__preview {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
}

.memory-favorite-music__preview summary {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.memory-favorite-music__privacy {
    margin: 8px 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.55);
}

@media (prefers-reduced-motion: reduce) {
    .memory-timeline__item {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .memory-ticker__item--flower .memory-ticker__icon,
    .memory-ticker__item--heart .memory-ticker__icon,
    .memory-ticker__item--butterfly .memory-ticker__icon,
    .memory-ticker__item--star .memory-ticker__icon,
    .memory-ticker__item--dove .memory-ticker__icon,
    .memory-ticker__item--candle .memory-ticker__icon {
        animation: none;
    }

}

/* ══════════════════════════════════════════════════════════════════════
   REDESIGN: Primary section + Accordions + Feed + Polish
   ══════════════════════════════════════════════════════════════════════ */

.memory-hero__primary-section {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 28px 24px 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.memory-hero__section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.memory-hero__section-title .candle-count--hero {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 10px;
    border-radius: 20px;
}

.memory-hero__section-subtitle {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 20px;
    font-style: italic;
}

/* ── Gift Picker redesign (circular, brown on dark hero) ── */

.memory-hero__primary-section .gift-picker,
.memory-hero__accordion-body .gift-picker {
    gap: 10px;
    justify-content: flex-start;
    margin-top: 28px;
}

.memory-hero__primary-section .gift-picker__btn,
.memory-hero__accordion-body .gift-picker__btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 2px solid rgba(180, 140, 100, 0.35);
    background: rgba(55, 38, 28, 0.92);
    transition: transform 0.2s, box-shadow 0.25s, border-color 0.2s, background 0.2s;
    color: #f3e8d8;
    box-shadow: none;
}

.memory-hero__primary-section .gift-picker__btn:hover,
.memory-hero__accordion-body .gift-picker__btn:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(210, 170, 120, 0.55);
    background: rgba(72, 50, 36, 0.98);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.memory-hero__primary-section .gift-picker__btn.is-active,
.memory-hero__primary-section .gift-picker__btn:active,
.memory-hero__accordion-body .gift-picker__btn.is-active,
.memory-hero__accordion-body .gift-picker__btn:active {
    border-color: rgba(230, 185, 110, 0.7);
    background: rgba(90, 62, 40, 0.98);
    box-shadow: 0 0 0 3px rgba(210, 160, 90, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25);
    transform: scale(0.97);
}

.memory-hero__primary-section .gift-picker__btn--primary,
.memory-hero__accordion-body .gift-picker__btn--primary {
    border-color: rgba(230, 185, 110, 0.65);
    background: rgba(95, 65, 40, 0.98);
}

.memory-hero__primary-section .gift-picker__icon,
.memory-hero__accordion-body .gift-picker__icon {
    font-size: 1.8rem;
    line-height: 1;
}

.memory-hero__primary-section .gift-picker__label,
.memory-hero__accordion-body .gift-picker__label {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(243, 232, 216, 0.8);
    white-space: nowrap;
}

.memory-hero__primary-section .gift-picker__more,
.memory-hero__accordion-body .gift-picker__more {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px dashed rgba(180, 140, 100, 0.4);
    background: rgba(45, 32, 24, 0.9);
    color: rgba(243, 232, 216, 0.65);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: auto;
}

.memory-hero__primary-section .gift-picker__more:hover,
.memory-hero__accordion-body .gift-picker__more:hover {
    border-color: rgba(210, 170, 120, 0.55);
    color: #f3e8d8;
    background: rgba(72, 50, 36, 0.98);
    transform: translateY(-2px);
}

.memory-hero__primary-section .gift-picker__grid,
.memory-hero__accordion-body .gift-picker__grid {
    background: rgba(27, 19, 16, 0.95);
    border-color: rgba(180, 140, 100, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.memory-hero__primary-section .gift-picker__grid-btn,
.memory-hero__accordion-body .gift-picker__grid-btn {
    color: rgba(243, 232, 216, 0.9);
    background: rgba(55, 38, 28, 0.85);
    border-color: rgba(180, 140, 100, 0.3);
}

.memory-hero__primary-section .gift-picker__grid-btn:hover,
.memory-hero__accordion-body .gift-picker__grid-btn:hover {
    background: rgba(72, 50, 36, 0.98);
    border-color: rgba(210, 170, 120, 0.45);
}

.memory-hero__primary-section .gift-picker__grid-label,
.memory-hero__accordion-body .gift-picker__grid-label {
    color: rgba(243, 232, 216, 0.65);
}

/* ── Form fields (nad výběrem svíček/pocitů) ── */

.candle-form__fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
}

.memory-hero__primary-section .candle-form__fields {
    margin-bottom: 4px;
}

.memory-hero__primary-section .candle-form__input {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.memory-hero__primary-section .candle-form__input::placeholder {
    color: rgba(0, 0, 0, 0.35);
    font-style: italic;
}

.memory-hero__primary-section .candle-form__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.25);
    outline: none;
}

.candle-form__actions {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.candle-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 999px;
    min-width: 180px;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.candle-form__submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.candle-form__submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.candle-form__submit-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.candle-form__submit-label {
    letter-spacing: 0.01em;
}

.memory-feed__card--new {
    animation: memoryFeedCardIn 0.6s ease-out;
    box-shadow: 0 0 0 2px var(--accent), 0 6px 18px rgba(var(--accent-rgb), 0.2);
}

@keyframes memoryFeedCardIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Accordions ── */

.memory-hero__accordions {
    margin: 18px auto 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 560px;
    text-align: left;
}

.memory-hero__main .memory-hero__accordions {
    margin-top: 16px;
}

.memory-hero__accordions .candle-count--hero {
    margin-left: auto;
}

.memory-hero__accordion {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transition: border-color 0.2s;
}

.memory-hero__accordion[open] {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    /* Aby se výběr dalších symbolů (+) neořezal */
    overflow: visible;
}

.memory-hero__accordion-header,
.memory-hero__accordion-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    list-style: none;
    transition: color 0.2s, background 0.2s;
    user-select: none;
}

.memory-hero__accordion-header::-webkit-details-marker,
.memory-hero__accordion-summary::-webkit-details-marker {
    display: none;
}

.memory-hero__accordion-header:hover,
.memory-hero__accordion-summary:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.memory-hero__accordion-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.memory-hero__accordion-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.2s;
    opacity: 0.5;
}

.memory-hero__accordion[open] .memory-hero__accordion-arrow {
    transform: rotate(180deg);
}

.memory-hero__accordion-body {
    padding: 0 18px 18px;
}

.subscribe-occasions {
    margin: 4px 0 8px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}
.subscribe-occasions__legend {
    padding: 0 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}
.subscribe-occasions__row {
    margin: 6px 0 10px;
}
.subscribe-occasions__item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
}
.subscribe-occasions__item input {
    width: auto;
    accent-color: var(--gold, #c4a35a);
}
.subscribe-occasions__date {
    margin: 6px 0 0 0;
    width: 100%;
}
.subscribe-occasions__date:not([hidden]) {
    display: block;
}
.subscribe-occasions__date .candle-form__input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    flex: none;
}
/* Segmentované datum dd . mm . rrrr (posun jako na PC) */
.subscribe-date-field {
    position: relative;
    display: block;
    width: 100%;
}
.subscribe-date-field--parts {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 48px;
    padding: 4px 40px 4px 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}
.subscribe-date-field__parts {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
}
.subscribe-date-field__part {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: #1a1a1a !important;
    font-size: 16px;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    text-align: center;
    padding: 8px 2px !important;
    min-width: 0;
    flex: 0 0 auto;
    border-radius: 0 !important;
}
.subscribe-date-field__part[data-part="d"],
.subscribe-date-field__part[data-part="m"] {
    width: 2.1em;
}
.subscribe-date-field__part[data-part="y"] {
    width: 3.4em;
}
.subscribe-date-field__part::placeholder {
    color: #8a8a8a !important;
    font-style: normal !important;
    opacity: 1;
}
.subscribe-date-field__dot {
    color: #555;
    font-size: 1rem;
    line-height: 1;
    user-select: none;
    flex: 0 0 auto;
}
.subscribe-date-field__cal {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}
.subscribe-date-field__native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    left: 0;
    top: 0;
}
.subscribe-date-hint {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.35;
}
.subscribe-relation {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 10px;
}
.subscribe-relation__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}
.subscribe-relation select.candle-form__input {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 28px;
}
.subscribe-relation #subscribe-relation-custom {
    margin-top: 2px;
}
.subscribe-relation-fill {
    margin-top: 2px;
}
.subscribe-relation-fill__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.subscribe-relation-fill__prompt {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
}
.subscribe-relation-fill__input {
    flex: 1 1 140px;
    min-width: 120px;
}
/* Samostatná vzpomínka: roletka vztahu přímo v řádku „Eva byla moje …“ */
.subscribe-relation-fill__select {
    flex: 1 1 140px;
    min-width: 120px;
    width: auto;
}
.subscribe-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0 14px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
}
.subscribe-consent input {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--gold, #c4a35a);
}
.subscribe-consent a {
    color: rgba(255, 230, 180, 0.95);
    text-decoration: underline;
}
.subscribe-consent a:hover {
    color: #fff;
}

.memory-hero__accordion-body .candle-form__input {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.92rem;
}

.memory-hero__accordion-body .candle-form__input::placeholder {
    color: rgba(0, 0, 0, 0.35);
    font-style: italic;
}

.memory-hero__accordion-body .candle-form__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.25);
    outline: none;
}

/* ── Vertical feed (replaces ticker) ── */

.memory-feed {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.memory-feed__title {
    font-size: 1.08rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
}

.memory-feed__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.memory-feed__card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: feedCardIn 0.35s ease both;
}

@keyframes feedCardIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.memory-feed__card:nth-child(2) { animation-delay: 0.06s; }
.memory-feed__card:nth-child(3) { animation-delay: 0.12s; }
.memory-feed__card:nth-child(4) { animation-delay: 0.18s; }

.memory-feed__card--contribution {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.3);
}

.memory-feed__card-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.2rem;
    line-height: 1;
}

.memory-feed__card--contribution .memory-feed__card-icon {
    background: rgba(var(--accent-rgb), 0.12);
}

.memory-feed__card-photo {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.06);
}

.memory-feed__card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.memory-feed__card-body {
    flex: 1;
    min-width: 0;
}

.memory-feed__card-kind {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 2px;
}

.memory-feed__card--contribution .memory-feed__card-kind {
    color: rgba(0, 0, 0, 0.4);
}

.memory-feed__card-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    display: block;
}

.memory-feed__card--contribution .memory-feed__card-name {
    color: var(--text);
}

.memory-feed__card-text {
    font-size: 0.84rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin: 4px 0 0;
    word-break: break-word;
}

.memory-feed__card--contribution .memory-feed__card-text {
    color: var(--text);
}

.memory-feed__card-gift {
    display: inline-block;
    margin-left: 6px;
    font-size: 1.1em;
    line-height: 1;
    vertical-align: -0.12em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.memory-feed__card--has-message {
    padding-left: 14px;
}

.memory-feed__card--has-message .memory-feed__card-body {
    width: 100%;
}

/* ── Vzkazy jako rotující titulky (na světlé spodní stránce) ── */
.memory-feed--ticker {
    margin: 0 auto 48px;
    max-width: 620px;
    padding-top: 0;
    border-top: none;
}

.memory-feed--ticker .memory-feed__title {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.memory-feed__ticker {
    position: relative;
}

.memory-feed__stage {
    display: grid;
}

/* Všechny slidy sdílí stejnou buňku → výška = nejvyšší karta, plynulý crossfade. */
.memory-feed__slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    pointer-events: none;
}

.memory-feed__slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Karty na světlém pozadí spodní stránky — tmavý text místo bílého. */
.memory-feed--ticker .memory-feed__card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: left;
    animation: none;
}

.memory-feed--ticker .memory-feed__card-icon {
    background: rgba(var(--accent-rgb), 0.12);
}

.memory-feed--ticker .memory-feed__card-kind {
    color: rgba(0, 0, 0, 0.4);
}

.memory-feed--ticker .memory-feed__card-name {
    color: var(--text);
}

.memory-feed--ticker .memory-feed__card-text {
    color: var(--text);
}

.memory-feed--ticker .memory-feed__card-anon {
    color: var(--text-muted);
}

.memory-feed--ticker .memory-feed__card-date {
    color: var(--text-muted);
}

.memory-feed__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
}

.memory-feed__nav {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    color: var(--text);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.memory-feed__nav:hover {
    background: var(--accent, #3E2407);
    border-color: var(--accent, #3E2407);
    color: #fff;
    transform: scale(1.05);
}

.memory-feed__dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.memory-feed__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.memory-feed__dot:hover {
    background: rgba(0, 0, 0, 0.4);
}

.memory-feed__dot.is-active {
    background: var(--accent, #3E2407);
    transform: scale(1.25);
}

.candle-form__notice {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 1px solid transparent;
    animation: candleNoticeIn 0.25s ease-out;
}

.candle-form__notice--success {
    background: rgba(39, 174, 96, 0.15);
    border-color: rgba(39, 174, 96, 0.45);
    color: #b6f0cf;
}

.candle-form__notice--info {
    background: rgba(var(--accent-rgb), 0.18);
    border-color: rgba(var(--accent-rgb), 0.45);
    color: #d7e4ec;
}

.candle-form__notice--error {
    background: rgba(192, 57, 43, 0.18);
    border-color: rgba(192, 57, 43, 0.45);
    color: #ffc8c2;
}

@keyframes candleNoticeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.emoji-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 6px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

#contribute-form > .btn.btn-primary,
#contribute-form > button[type="submit"] {
    display: block;
    margin: 22px auto 0;
}

.emoji-bar__btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.emoji-bar__btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.emoji-bar__btn--pulse {
    animation: giftPickPulse 0.5s ease-out;
    background: rgba(232, 168, 56, 0.22);
    border-color: rgba(232, 168, 56, 0.7);
}

.gift-picker__btn--just-picked {
    animation: giftPickPulse 0.6s ease-out;
}

@keyframes giftPickPulse {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(232, 168, 56, 0.55); }
    50%  { transform: scale(1.18); box-shadow: 0 0 0 10px rgba(232, 168, 56, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(232, 168, 56, 0); }
}

/* Výrazné zvýraznění aktivního daru */
.memory-hero__primary-section .gift-picker__btn.is-active {
    border-color: rgba(255, 196, 90, 0.85) !important;
    background: rgba(255, 196, 90, 0.22) !important;
    box-shadow: 0 0 0 3px rgba(255, 196, 90, 0.35), 0 8px 24px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-2px) scale(1.04) !important;
}

.gift-picker__grid-btn.is-active {
    border-color: rgba(232, 168, 56, 0.9) !important;
    background: rgba(232, 168, 56, 0.22) !important;
    box-shadow: 0 0 0 2px rgba(232, 168, 56, 0.35) !important;
}

.memory-feed__card-anon {
    font-size: 0.82rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
}

.memory-feed__card-date {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 6px;
}

.memory-feed__card--contribution .memory-feed__card-date {
    color: var(--text-muted);
}

.memory-feed__show-all {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.memory-feed__show-all:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ── Share section polish ── */

.memory-share__label {
    width: 100%;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0 6px;
}

/* Sdílení v hero: jedno elegantní tlačítko, ikony schované pod ním. */
.memory-share--hero {
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.memory-share__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.memory-share__toggle:hover,
.memory-share__toggle.is-open {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}
.memory-share__toggle svg { display: block; }

.memory-share__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    animation: memory-add-in 0.3s ease;
}
.memory-share__list[hidden] { display: none; }

/* Monochromatická loga – jednotný, decentní vzhled (jen v hero). */
.memory-share--hero .share-btn {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.75);
    opacity: 1;
    transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.memory-share--hero .share-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ── Filmový pás ── */
.memory-cinema {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: clamp(320px, 60vh, 680px);
    overflow: hidden;
    background: #1b1310;
    /* Vertikální scroll stránky necháme, horizont táhne JS. */
    touch-action: pan-y;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}
.memory-cinema.is-dragging {
    cursor: grabbing;
}
.memory-cinema__track {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    height: 100%;
    width: max-content;
    will-change: transform;
    /* Jen JS (konstantní px/s) — CSS % animace na mobilu zrychlovala po loadu fotek. */
    animation: none;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}
.memory-cinema__group {
    display: flex;
    align-items: stretch;
    height: 100%;
    flex: 0 0 auto;
}
.memory-cinema__cell {
    position: relative;
    flex: 0 0 auto;
    height: 100%;
    /* Stabilní šířka před decode — jinak první 1–2 fotky „ujedou“ a pak to škubne. */
    min-width: clamp(160px, 36vh, 300px);
    margin-right: 8px;
    overflow: hidden;
    background: #2B180A;
    cursor: inherit;
}
.memory-cinema__cell--video { cursor: inherit; }
.memory-cinema__cell--person { cursor: pointer; }
.memory-cinema__person-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    color: inherit;
    text-decoration: none;
}
.memory-cinema__item {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.6s ease, filter 0.6s ease;
}
@media (hover: hover) and (pointer: fine) {
    .memory-cinema__cell:hover .memory-cinema__item {
        transform: scale(1.04);
    }
}
.memory-cinema__live {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}
.memory-cinema__cell.is-live-playing .memory-cinema__live { opacity: 1; }
.memory-cinema__live-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    padding: 3px 8px;
    border-radius: 999px;
}
.memory-cinema__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-size: 18px;
    padding-left: 3px;
    pointer-events: none;
    backdrop-filter: blur(2px);
}
.memory-cinema__veil {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    /* Jen jemný přechod dole do tmavé sekce se jménem. Boční gradient byl
       odstraněn – jeho hrana (~10 % šířky) se na mobilu jevila jako statický
       svislý pruh, přes který fotky „přejížděly". */
    background: linear-gradient(0deg, rgba(27,19,16,0.92) 0%, rgba(27,19,16,0) 26%);
}

/* Oblíbená hudba – pod foto pásem vlevo (ne přes fotky); po spuštění se schová */
.memory-hero--cinema .memory-favorite-dock {
    position: relative;
    z-index: 3;
    width: min(280px, calc(100% - 32px));
    margin: 14px 16px 4px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.14);
    max-width: 100%;
    overflow: hidden;
}

.memory-favorite-dock__title {
    font-family: var(--font-serif, Georgia, serif);
    font-size: 0.85rem;
    color: #fff;
    margin: 0 0 6px;
    text-align: left;
    line-height: 1.25;
}

.memory-favorite-dock .memory-favorite-music__yt-mini {
    width: 100%;
    min-height: 146px;
}

.memory-favorite-dock__chip {
    display: none;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: auto;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
}

.memory-favorite-dock__chip-action {
    opacity: 0.7;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.memory-favorite-dock.is-tucked {
    margin: 8px 16px 0;
    width: auto;
    max-width: calc(100% - 32px);
    padding: 0;
    border: 0;
    background: transparent;
}

.memory-favorite-dock.is-tucked .memory-favorite-dock__player {
    /* Nesmí jít display:none / pryč z viewportu — YouTube pak hlásí chybu přehrávání */
    position: fixed;
    width: 240px;
    height: 135px;
    right: 8px;
    bottom: 8px;
    opacity: 0.001;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.memory-favorite-dock.is-tucked .memory-favorite-dock__chip {
    display: inline-flex;
}

.memory-favorite-dock.is-tucked .memory-favorite-dock__title {
    display: none;
}

/* ── Identita pod pásem ── */
.memory-hero__inner--cinema {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.memory-hero--cinema .memory-identity {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 6;
    isolation: isolate;
    width: 100%;
}
.memory-hero--cinema .memory-hero__profile-actions {
    justify-content: center;
    margin-top: 16px;
}
.memory-hero--cinema .memory-message--hero {
    margin: 18px auto 0;
    max-width: 680px;
    text-align: left;
}
.memory-hero--cinema .memory-hero__lifebook {
    margin-top: 14px;
}
.memory-hero--cinema .memory-hero__interact {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 36px; /* víc vzduchu mezi textem a tlačítky */
}
.memory-hero--cinema .memory-hero__accordions {
    text-align: center;
    margin-top: 0;
}
.memory-hero--cinema .memory-hero__accordion-summary {
    justify-content: center;
    text-align: center;
}
.memory-hero--cinema .memory-hero__accordions .candle-count--hero {
    margin-left: 8px;
}
.memory-hero--cinema .memory-share--below-actions {
    margin-top: 36px;
    padding-top: 8px;
}

/* ── Plynoucí vzkazy (stream) ── */
.memory-feed--stream {
    width: 100%;
    max-width: 720px;
    margin: 34px auto 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}
.memory-feed--stream .memory-feed__title {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    font-weight: 600;
    margin: 0 0 16px;
}
.memory-feed--stream .memory-feed__ticker { position: relative; }
.memory-feed--stream .memory-feed__stage {
    position: relative;
    display: grid;
    /* prostor po stranách pro šipky na hranách */
    padding: 0 44px;
}
.memory-feed--stream .memory-feed__slide {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transform: translateY(10px);
    /* delší, klidnější prolínání */
    transition: opacity 1.4s ease, transform 1.4s ease;
    pointer-events: none;
}
.memory-feed--stream .memory-feed__slide.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.memory-feed--stream .memory-feed__card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 0;
    /* Všechny vzkazy ve stejně širokém rámečku (plná šířka sloupce). */
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.memory-feed--stream .memory-feed__card-icon { font-size: 1.7rem; line-height: 1; }
.memory-feed--stream .memory-feed__card-kind {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.memory-feed--stream .memory-feed__card-name {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.98rem;
}
.memory-feed--stream .memory-feed__card-text {
    font-family: var(--font-serif);
    font-size: 1.14rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
}
.memory-feed--stream .memory-feed__card-date {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.76rem;
}
.memory-feed--stream .memory-feed__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}
.memory-feed--stream .memory-feed__dots {
    display: flex;
    gap: 7px;
}
.memory-feed--stream .memory-feed__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background 0.25s ease;
}
.memory-feed--stream .memory-feed__dot.is-active { background: var(--gold); }
/* Šipky („posuvníky") sedí přímo na hranách karet, ne jako samostatný řádek. */
.memory-feed--stream .memory-feed__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 19, 16, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(2px);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.memory-feed--stream .memory-feed__nav--prev { left: 0; }
.memory-feed--stream .memory-feed__nav--next { right: 0; }
.memory-feed--stream .memory-feed__nav:hover {
    color: #fff;
    background: rgba(27, 19, 16, 0.8);
    transform: translateY(-50%) scale(1.08);
}

/* ── Vzkazy v pruhu hned pod fotkami: vynořují se a zanikají ── */
.memory-feed--float {
    position: static;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    max-width: none;
    padding: 18px 16px 20px;
}
.memory-feed--float .memory-feed__stage {
    padding: 0 40px;
    max-width: 420px;
    margin: 0 auto;
}
.memory-feed--float .memory-feed__slide {
    align-items: center;
    transform: translateY(14px);
    transition: opacity 1.6s ease, transform 1.6s ease;
}
.memory-feed--float .memory-feed__slide.is-active { transform: none; }
.memory-feed--float .memory-feed__nav {
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
    background: rgba(27, 19, 16, 0.4);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.7);
}
.memory-feed--float .memory-feed__nav--prev { left: 4px; }
.memory-feed--float .memory-feed__nav--next { right: 4px; }
.memory-feed--float .memory-feed__nav:hover {
    background: rgba(27, 19, 16, 0.7);
    color: #fff;
}

/* Všechny vzkazy (svíčky, dárky i psané vzpomínky) = obdélníkový rámeček.
   Jemná linka a zaoblené rohy ladí s tmavým motivem; obsah drží uvnitř těla
   decentní padding a rámeček se přizpůsobí i delšímu textu. */
.memory-feed--float .memory-feed__card {
    width: auto;
    min-width: 232px;
    max-width: 340px;
    margin: 0 auto;
    padding: 22px 26px;
    gap: 3px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
    justify-content: center;
}
.memory-feed--float .memory-feed__card-icon { font-size: 1.3rem; }
.memory-feed--float .memory-feed__card-kind { font-size: 0.66rem; }
.memory-feed--float .memory-feed__card-name {
    font-size: 0.9rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.memory-feed--float .memory-feed__card-text {
    font-size: 0.98rem;
    line-height: 1.5;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.memory-feed--float .memory-feed__card-date { font-size: 0.72rem; }

/* ── Tlačítka pod citátem (Přidat vzpomínku + Sdílet vedle sebe) ── */
.memory-hero__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}
.memory-hero__cta .memory-add__toggle { margin: 0; }

/* ── CTA „Přidat vzpomínku" + skrytý editor ── */
.memory-add {
    width: 100%;
    max-width: 560px;
    margin: 28px auto 0;
    text-align: center;
}
.memory-add__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    padding: 13px 28px;
    border-radius: 999px;
}
.memory-add__plus {
    font-size: 1.3em;
    line-height: 1;
    font-weight: 400;
}
.memory-add__panel {
    width: 100%;
    max-width: 560px;
    margin: 22px auto 0;
    text-align: left;
    animation: memory-add-in 0.35s ease;
}
.memory-add__panel[hidden] { display: none; }
@keyframes memory-add-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}
/* Sdílení pod akordeony (Přidat vzpomínku / příspěvek / vzkazy) */
.memory-share--below-actions {
    margin: 32px auto 0;
    padding-top: 4px;
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    clear: both;
    position: relative;
    z-index: 1;
}
.memory-hero--cinema .memory-share--hero {
    margin-left: auto;
    margin-right: auto;
}
.memory-hero--cinema .memory-share--hero .memory-share__list {
    margin-top: 14px;
}
.memory-share--hero .memory-share__toggle .icon {
    color: rgba(243, 232, 216, 0.9);
}

/* ── Responzivita ── */
@media (max-width: 640px) {
    .memory-cinema { height: clamp(220px, 50vh, 420px); }
    .memory-feed--stream .memory-feed__card-text { font-size: 1.04rem; }
    .memory-hero__inner--cinema { padding: 0 16px; }
    .memory-feed--stream .memory-feed__stage { padding: 0 36px; }
    .memory-feed--stream .memory-feed__nav { width: 30px; height: 30px; font-size: 0.95rem; }
    .memory-feed--stream .memory-feed__card { padding: 16px 16px; }
    .memory-feed--float { padding: 18px 12px 22px; }
    .memory-feed--float .memory-feed__stage { padding: 0 32px; }
    .memory-feed--float .memory-feed__nav { width: 24px; height: 24px; font-size: 0.72rem; }
    .memory-feed--float .memory-feed__card {
        min-width: 200px;
        max-width: 300px;
        padding: 18px 20px;
    }
    .memory-feed--float .memory-feed__card-text { font-size: 0.94rem; max-width: 220px; }

    /* Tři CTA tlačítka — vycentrovaný text + ikona */
    .memory-hero--cinema .memory-hero__accordions {
        text-align: center;
    }
    .memory-hero--cinema .memory-hero__accordion-summary {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        align-items: center;
        text-align: center;
        flex-wrap: wrap;
        gap: 8px 10px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .memory-hero--cinema .memory-hero__accordion-label {
        text-align: center;
        flex: 0 1 auto;
        max-width: 100%;
    }
    .memory-hero--cinema .memory-hero__accordions .candle-count--hero {
        margin-left: 0;
    }
}

