/* ══════════════════════════════════════
   chybismi.eu – Main Stylesheet
   ══════════════════════════════════════ */

/* ── Reset & Base ── */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:           #F8F6F3;
    --bg-alt:       #EDE9E3;
    --text:         #2C2C2C;
    --text-muted:   #6B6B6B;
    --accent:       #6B8FA3;
    --accent-hover: #567a8c;
    --gold:         #C4A87C;
    --gold-hover:   #b09468;
    --white:        #FFFFFF;
    --border:       #DDD8D0;
    --danger:       #C0392B;
    --success:      #27AE60;
    --radius:       12px;
    --radius-sm:    8px;
    --shadow:       0 2px 16px rgba(0,0,0,0.06);
    --shadow-lg:    0 8px 32px rgba(0,0,0,0.10);
    --transition:   0.25s ease;

    /* Jednotný rámeček karet (modrošedý obrys + mírné černé zvýraznění) */
    --frame-border-color: rgba(107, 143, 163, 0.44);
    --frame-border:       1px solid var(--frame-border-color);
    --frame-ring:         0 0 0 1px rgba(0, 0, 0, 0.09);
    --frame-shadow-soft:  0 2px 14px rgba(0, 0, 0, 0.052);
    --shadow-card:        var(--frame-ring), var(--frame-shadow-soft);
    --frame-grid-line:    rgba(107, 143, 163, 0.26);

    /* Vstupní pole – světlejší vnitřní okraj */
    --field-border:       1px solid #d0ccc4;
    --field-ring:         0 0 0 1px rgba(0, 0, 0, 0.06);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* ── Container ── */

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Typography ── */

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }

.serif {
    font-family: 'Lora', Georgia, serif;
}

/* ── Buttons ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
}

.btn:active {
    transform: translateY(2px) scale(0.96) !important;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.2) !important;
    transition: none !important;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-gold {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.btn-gold:hover {
    background: var(--gold-hover);
    border-color: var(--gold-hover);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.btn-danger:hover {
    opacity: 0.9;
    color: var(--white);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* ── Header ── */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 16px;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.site-header .btn-sm {
    padding: 11px 24px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* ── Mega navigation ── */

.mega-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
    margin-left: 24px;
}

.mega-nav__item {
    position: static;
}

.mega-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-sm, 8px);
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    position: relative;
}

.mega-nav__link:hover {
    background: var(--bg-alt);
    color: var(--accent);
}

.mega-nav__item:hover .mega-nav__link {
    background: var(--bg-alt);
    color: var(--accent);
}

.mega-nav__cta {
    margin-left: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Auth links */
.mega-nav__auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mega-nav__auth-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm, 8px);
    transition: all 0.2s;
    white-space: nowrap;
}

.mega-nav__auth-link:hover {
    color: var(--text);
    background: var(--bg-alt);
}

.mega-nav__auth-link--primary {
    background: var(--accent);
    color: var(--white);
    font-weight: 600;
}

.mega-nav__auth-link--primary:hover {
    background: var(--accent-hover, #5a7f92);
    color: var(--white);
}

/* ── Dropdown panel (full-width under header) ── */

.mega-nav__dropdown {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 200;
}

.mega-nav__dropdown::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

.mega-nav__item:hover > .mega-nav__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mega-dd {
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    padding: 28px 0;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.mega-dd__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Homepage-style tiles in mega menu (Jak to funguje, Nabízíme) */
.mega-dd--tiles {
    padding: 22px 0;
}

.mega-dd--tiles .mega-dd__inner {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1180px;
}

.mega-dd--tiles-4 .mega-dd__inner {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1280px;
}

.mega-dd--tiles .feature-card {
    padding: 22px 14px;
}

.mega-dd--tiles .feature-card__icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.mega-dd--tiles .feature-card h3 {
    font-size: 0.98rem;
    margin-bottom: 6px;
}

.mega-dd--tiles .feature-card p {
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0;
}

@media (max-width: 1200px) {
    .mega-dd--tiles-4 .mega-dd__inner {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .mega-dd--tiles .mega-dd__inner,
    .mega-dd--tiles-4 .mega-dd__inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Memories dropdown */
.mega-dd--memories .mega-dd__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.mega-dd__memory {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 16px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s, transform 0.15s;
}

.mega-dd__memory:hover {
    background: var(--bg-alt);
    transform: translateY(-2px);
}

.mega-dd__memory-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid var(--border);
}

.mega-dd__memory-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mega-dd__memory-photo span {
    font-size: 1.4rem;
}

.mega-dd__memory-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mega-dd__memory-info strong {
    font-size: 0.88rem;
    font-weight: 600;
}

.mega-dd__memory-info span {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.mega-dd__empty {
    grid-column: 1 / -1;
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Steps dropdown (CTA hover) */
.mega-nav__item--cta {
    margin-left: 8px;
}

.mega-dd--steps {
    background: linear-gradient(135deg, var(--gold) 0%, #d4b88a 50%, var(--gold) 100%);
    color: #fff;
    border-top: none;
    box-shadow: 0 8px 32px rgba(196,168,124,0.35);
}

.mega-dd__steps-title {
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.mega-dd__steps-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.mega-dd__step {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.mega-dd__step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.4);
}

.mega-dd__step strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
}

.mega-dd__step span {
    font-size: 0.82rem;
    opacity: 0.85;
}

.mega-dd__step-arrow {
    opacity: 0.5;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Mobile steps bar (inside hamburger menu) */
.mobile-steps-bar {
    display: none;
    background: linear-gradient(135deg, var(--gold) 0%, #d4b88a 100%);
    color: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 6px;
}

.mobile-steps-bar.open {
    display: block;
}

.mobile-steps-bar__title {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

.mobile-steps-bar__step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 5px 0;
}

.mobile-steps-bar__step span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.4);
}

/* Mobile accordion (Nabízíme submenu) */
.mob-accordion {
    display: flex;
    flex-direction: column;
}

.mob-accordion__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: left;
}

.mob-accordion__btn:hover {
    color: var(--text);
}

.mob-accordion__arrow {
    font-size: 1.1rem;
    transition: transform 0.2s;
    display: inline-block;
}

.mob-accordion.open .mob-accordion__arrow {
    transform: rotate(90deg);
}

.mob-accordion__panel {
    display: none;
    flex-direction: column;
    padding-left: 12px;
    gap: 2px;
    margin-top: 4px;
    margin-bottom: 4px;
    border-left: 2px solid var(--gold);
}

.mob-accordion.open .mob-accordion__panel {
    display: flex;
}

.mob-accordion__panel a {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
}

.mob-accordion__panel a:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo__img {
    height: 36px;
    width: auto;
    border-radius: 6px;
    flex-shrink: 0;
}

.logo__text {
    white-space: nowrap;
}

.logo__text span {
    color: var(--accent);
}

.logo:hover {
    color: var(--text);
}

.main-nav {
    display: none;
}

.main-nav a:not(.btn) {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 12px;
}

.main-nav a:not(.btn):hover {
    color: var(--text);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.lang-link {
    display: inline-block;
    padding: 3px 7px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 4px;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.lang-link:hover {
    color: var(--text);
    background: var(--bg-alt);
}

.lang-link.active {
    color: var(--white);
    background: var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all var(--transition);
    border-radius: 2px;
}

/* ── Hero ── */

.hero {
    position: relative;
    padding: 320px 0 80px;
    text-align: center;
    overflow: hidden;
    background-color: #2a2a2a;
    background-image: none;
    color: #fff;
}

.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
    pointer-events: none;
}

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

    .hero {
        background-color: #2a2a2a;
        background-image: url('/assets/img/hero-qr-scan.webp');
        background-position: center top;
        background-size: cover;
        background-repeat: no-repeat;
    }
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.35) 40%,
        rgba(0, 0, 0, 0.75) 100%
    );
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.hero .subtitle {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 550px;
    margin: 0 auto 40px;
    font-style: italic;
    line-height: 1.8;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.hero .btn {
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* „Vyzkoušet zdarma“ v hero jen na mobilu (v hlavičce je na desktopu) */
.hero-cta-try-free {
    display: none;
}

/* Do 1024px: horní zlaté CTA schovat (šířka >768px = stále „desktop“ hlavička, ale telefony na šířku) */
@media (max-width: 1024px) {
    .mega-nav {
        display: none !important;
    }

    .mega-nav__auth {
        display: none !important;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .main-nav {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 8px;
        box-shadow: var(--shadow-lg);
        transition: right var(--transition);
        z-index: 105;
        align-items: stretch;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav.open {
        right: 0;
    }

    .hero-cta-try-free {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-top: 4px;
        margin-bottom: 4px;
    }
}

/* Kotva prvního kroku průvodce – nesmí zajet pod sticky hlavičku */
#wizard {
    scroll-margin-top: 88px;
}

#parte,
#strom-zivota,
#funkce,
#pozdravy-z-nebe,
#posledni-vzpominky,
#jak-to-funguje,
#cesty {
    scroll-margin-top: 80px;
}

.hero-sm {
    padding: 72px 0 48px;
}

.hero-sm h1 {
    font-size: 2.4rem;
}

/* ── About (O projektu) ── */

.about-content {
    max-width: 720px;
    margin: 0 auto;
}

.about-block {
    margin-bottom: 48px;
}

.about-block h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text);
}

.about-block p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 12px;
}

.about-list {
    list-style: none;
    padding: 0;
    margin-top: 12px;
}

.about-list li {
    position: relative;
    padding-left: 24px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 8px;
}

.about-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.about-cta {
    text-align: center;
    padding: 48px 0 16px;
    border-top: 1px solid var(--border);
    margin-top: 48px;
}

.about-cta p {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text);
    margin-bottom: 24px;
}

.gdpr-intro {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.gdpr-updated {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* ── Section ── */

.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-dark {
    background: #d9cdbf;
}

.section-dark .section-title {
    color: var(--text);
}

.section-dark .section-subtitle {
    color: var(--text-muted);
}

.section-title {
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 48px;
    font-size: 1.05rem;
}

/* ── Steps Showcase (Jak to funguje – Air Bank style) ── */

.steps-showcase {
    max-width: 1100px;
    margin: 0 auto;
}

.steps-showcase__panels {
    background: var(--white);
    border: var(--frame-border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    min-height: 280px;
    box-shadow: var(--frame-ring);
}

.steps-showcase__panel {
    display: none;
    padding: 48px 48px;
    align-items: flex-start;
    gap: 40px;
    animation: showcaseFadeIn 0.3s ease;
}

.steps-showcase__panel.is-active {
    display: flex;
}

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

.steps-showcase__photo {
    flex-shrink: 0;
    width: 300px;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
}

.steps-showcase__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.steps-showcase__text {
    flex: 1;
    min-width: 0;
}

.steps-showcase__text h3 {
    font-size: 1.55rem;
    margin-bottom: 12px;
    color: var(--text);
}

.steps-showcase__text > p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 18px;
}

/* ── Clickable color badges ── */

.steps-showcase__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

.sc-badge {
    padding: 9px 20px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
}

.sc-badge--coral  { background: #FFF0ED; color: #C0392B; border-color: #F5C6C0; }
.sc-badge--blue   { background: #EAF3F7; color: #2471A3; border-color: #B8D8E8; }
.sc-badge--gold   { background: #FDF6EC; color: #B7950B; border-color: #F0D98C; }
.sc-badge--violet { background: #F3EDF7; color: #7D3C98; border-color: #D2B4DE; }

.sc-badge--coral:hover,  .sc-badge--coral.is-active  { background: #C0392B; color: #fff; border-color: #C0392B; }
.sc-badge--blue:hover,   .sc-badge--blue.is-active   { background: #2471A3; color: #fff; border-color: #2471A3; }
.sc-badge--gold:hover,   .sc-badge--gold.is-active   { background: #B7950B; color: #fff; border-color: #B7950B; }
.sc-badge--violet:hover, .sc-badge--violet.is-active  { background: #7D3C98; color: #fff; border-color: #7D3C98; }

/* ── Expandable detail card ── */

.sc-detail {
    margin-top: 16px;
    background: var(--bg);
    border: var(--frame-border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    animation: showcaseFadeIn 0.3s ease;
    box-shadow: var(--field-ring);
}

.sc-detail[hidden] {
    display: none;
}

.sc-detail__head {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.sc-detail__head--coral  { color: #C0392B; border-bottom-color: #F5C6C0; }
.sc-detail__head--blue   { color: #2471A3; border-bottom-color: #B8D8E8; }
.sc-detail__head--gold   { color: #B7950B; border-bottom-color: #F0D98C; }
.sc-detail__head--violet { color: #7D3C98; border-bottom-color: #D2B4DE; }

.sc-detail__desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.sc-detail ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sc-detail ul li {
    font-size: 0.88rem;
    color: var(--text);
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.sc-detail ul li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.sc-detail__actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.sc-detail__img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 12px;
    display: block;
}

/* ── QR materials page ── */

.qr-materialy-page {
    padding: 60px 0;
}

.qr-materialy-page__title {
    text-align: center;
    margin-bottom: 8px;
}

.qr-materialy-page__desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.qr-materialy-page__videos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.qr-materialy-page__videos video {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.qr-materialy-page__photos {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.qr-materialy-page__photos img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.qr-materials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.qr-material-card {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.qr-material-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.qr-material-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Tab bar ── */

.steps-showcase__tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.steps-showcase__tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 16px;
    background: var(--white);
    border: 1px solid var(--frame-grid-line);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    color: var(--text-muted);
    min-height: 64px;
    position: relative;
}

.steps-showcase__tab:first-child {
    border-radius: 0 0 0 var(--radius);
}

.steps-showcase__tab:last-child {
    border-radius: 0 0 var(--radius) 0;
}

.steps-showcase__tab:hover {
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: var(--frame-ring), 0 4px 12px rgba(0,0,0,0.08);
}

.steps-showcase__tab.is-active {
    background: var(--white);
    color: var(--text);
    font-weight: 700;
    border-color: var(--frame-border-color);
    transform: translateY(-4px);
    box-shadow: var(--frame-ring), 0 6px 20px rgba(0,0,0,0.12);
    z-index: 2;
}

.steps-showcase__tab.is-active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
}

.steps-showcase__tab-label {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
}

/* ── Tier Cards ── */

.tiers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}
@media (max-width: 1024px) {
    .tiers {
        grid-template-columns: repeat(2, 1fr);
        max-width: 680px;
    }
    .tier-card.featured {
        order: -1;
    }
}

.tier-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 22px 28px;
    text-align: center;
    border: var(--frame-border);
    box-shadow: var(--frame-ring);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.tier-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--frame-ring), var(--shadow-lg);
}

.tier-card.featured {
    border: 2px solid var(--gold);
    box-shadow: var(--frame-ring), 0 4px 24px rgba(196, 168, 124, 0.22);
    position: relative;
}

.tier-card.featured::before {
    content: 'Nejoblíbenější';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tier-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.tier-card h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.tier-card .tier-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
}

.tier-features {
    list-style: none;
    text-align: left;
    margin-bottom: 32px;
    flex: 1;
}

.tier-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.tier-features li:last-child {
    border-bottom: none;
}

.tier-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

.tier-card .btn {
    margin-top: auto;
}

/* ── Instagram-style photo ring ── */

.photo-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #833AB4, #C13584, #E1306C, #F56040, #F77737, #FCAF45);
    border-radius: 50%;
    padding: 5px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(131, 58, 180, 0.3), 0 6px 20px rgba(131, 58, 180, 0.35), 0 2px 8px rgba(0,0,0,0.15);
}

.photo-ring img {
    display: block;
    border-radius: 50%;
    border: 4px solid #1a1a1a;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

.photo-ring--sm  { width: 100px; height: 100px; padding: 4px; }
.photo-ring--sm img  { width:  92px; height:  92px; }

.photo-ring--md  { width: 160px; height: 160px; padding: 4px; }
.photo-ring--md img  { width: 152px; height: 152px; }

.photo-ring--lg  { width: 220px; height: 220px; padding: 5px; }
.photo-ring--lg img  { width: 210px; height: 210px; }

.photo-ring--placeholder {
    background: linear-gradient(135deg, #333 0%, #555 100%);
}

.photo-ring--placeholder span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    opacity: 0.4;
    background: #1a1a2e;
    border-radius: 50%;
    border: 4px solid #1a1a1a;
    color: rgba(255,255,255,0.5);
}

/* ── Latest Memories (Homepage) ── */

.latest-memories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.latest-memory-card {
    background: #2e2e3a;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    text-decoration: none;
    color: rgba(255,255,255,0.9);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px 24px;
}

.latest-memory-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    color: #fff;
}

.latest-memory-card .photo-ring {
    margin-bottom: 16px;
    transition: transform 0.4s ease;
}

.latest-memory-card:hover .photo-ring {
    transform: scale(1.06);
}

.latest-memory-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.latest-memory-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    color: #fff;
}

.latest-memory-dates {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.latest-memory-excerpt {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    font-style: italic;
    flex: 1;
}

/* ── Flash Messages ── */

.flash {
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    margin: 16px auto;
    max-width: 1100px;
    font-size: 0.95rem;
    font-weight: 500;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ── Forms ── */

.form-page {
    max-width: 480px;
    margin: 60px auto;
    padding: 0 24px;
}

.form-page.form-wide {
    max-width: 780px;
}

/* ── Edit page tab layout ── */

.edit-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.edit-tabs__btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.edit-tabs__btn:hover {
    color: var(--text);
}

.edit-tabs__btn--active {
    color: var(--accent, #6b8fa3);
    border-bottom-color: var(--accent, #6b8fa3);
}

.edit-tab {
    display: none;
}

.edit-tab--active {
    display: block;
}

.edit-tab__section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.edit-tab__section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-tab__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.edit-tab__link-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.edit-tab__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    transition: background 0.15s, border-color 0.15s;
}

.edit-tab__link:hover {
    background: var(--bg-alt);
    border-color: var(--accent, #6b8fa3);
}

.edit-tab__link-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.edit-tab__link-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 6px;
}

.edit-tab__status {
    font-size: 0.88rem;
    margin: 8px 0 0;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .edit-tabs__btn {
        padding: 8px 14px;
        font-size: 0.82rem;
    }
    .edit-tab__grid {
        grid-template-columns: 1fr;
    }
    .edit-tab__section {
        padding: 16px;
    }
}

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 36px;
    border: var(--frame-border);
    box-shadow: var(--shadow-card);
}

.form-card h2 {
    margin-bottom: 8px;
    text-align: center;
}

.form-card .form-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    border: var(--field-border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--field-ring);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(107, 143, 163, 0.18);
}

.pw-wrap {
    position: relative;
}
.pw-wrap input {
    padding-right: 44px;
}
.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s;
}
.pw-toggle:hover {
    color: var(--accent);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group .form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.92rem;
    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);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(107, 143, 163, 0.18);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.gender-radio {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}
.gender-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: var(--field-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: var(--field-ring);
}
.gender-option:hover {
    border-color: var(--accent);
    background: rgba(107, 143, 163, 0.04);
}
.gender-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(107, 143, 163, 0.08);
    color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.gender-option input[type="radio"] {
    accent-color: var(--accent);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-footer a {
    font-weight: 500;
}

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

.form-link-muted:hover {
    color: var(--accent);
}

.form-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 12px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.form-divider span {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: lowercase;
}

/* ── Dashboard ── */

.dashboard {
    padding: 40px 0 60px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
}

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

.memory-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    border: var(--frame-border);
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    overflow: hidden;
}

.memory-card:hover {
    box-shadow: var(--frame-ring), var(--shadow-lg);
}

.memory-card__photo {
    margin: -28px -28px 16px -28px;
    height: 180px;
    overflow: hidden;
}

.memory-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.memory-card h3 {
    margin-bottom: 4px;
    font-size: 1.2rem;
}

.memory-card .memory-dates {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.memory-card .memory-tier {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.tier-zaklad { background: #e8e8e8; color: #555; }
.tier-plus   { background: #dbeafe; color: #1e40af; }
.tier-premium { background: #fef3c7; color: #92400e; }

.memory-card .memory-status {
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.status-published   { color: var(--success); }
.status-draft       { color: var(--text-muted); }

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

.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ── Memory Public Page ── */

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

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

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

.memory-hero--continue {
    background:
        linear-gradient(to bottom, transparent 0%, transparent 62%, rgba(248, 250, 252, 0.07) 100%),
        linear-gradient(165deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
    padding-bottom: 36px;
}

.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 {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 0.8fr) minmax(220px, 1.2fr) minmax(200px, 1fr);
    gap: 16px 32px;
    align-items: start;
}

.memory-hero__grid > .memory-hero__main {
    grid-column: 1;
    grid-row: 1;
}

.memory-hero__grid > .memory-hero__visual {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
}

.memory-hero__grid > .memory-hero__interact {
    grid-column: 3;
    grid-row: 1;
}

.memory-hero__grid > .memory-feed {
    grid-column: 4;
    grid-row: 1;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    align-self: start;
}

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

.memory-hero .memory-name {
    font-size: clamp(1.75rem, 4vw, 2.55rem);
    font-weight: 700;
    color: #fff;
    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: 'Lora', Georgia, 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-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(107, 143, 163, 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;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 28px 56px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

.memory-hero__photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    vertical-align: middle;
}

.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;
    }
}

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

.memory-hero__figure--placeholder {
    aspect-ratio: 3 / 4;
    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: 18px;
    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: 1280px) {
    .memory-hero__grid {
        grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) minmax(0, 1fr);
    }

    .memory-hero__grid > .memory-hero__main {
        grid-column: 1;
        grid-row: 1;
    }

    .memory-hero__grid > .memory-hero__visual {
        grid-column: 2;
        grid-row: 1;
    }

    .memory-hero__grid > .memory-hero__interact {
        grid-column: 3;
        grid-row: 1;
    }

    .memory-hero__grid > .memory-feed {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 12px;
    }
}

@media (max-width: 900px) {
    .memory-hero__grid {
        grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
    }

    .memory-hero__grid > .memory-hero__main {
        grid-column: 1;
        grid-row: 1;
    }

    .memory-hero__grid > .memory-hero__visual {
        grid-column: 2;
        grid-row: 1;
    }

    .memory-hero__grid > .memory-hero__interact {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .memory-hero__grid > .memory-feed {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-top: 12px;
    }
}

@media (max-width: 640px) {
    .memory-hero__grid {
        grid-template-columns: 1fr;
    }

    .memory-hero__grid > .memory-hero__main,
    .memory-hero__grid > .memory-hero__interact,
    .memory-hero__grid > .memory-hero__visual,
    .memory-hero__grid > .memory-feed {
        grid-column: 1;
        grid-row: auto;
    }

    .memory-hero__visual {
        order: -1;
        max-width: min(100%, 340px);
        margin: 0 auto 12px;
        width: 100%;
    }

    .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-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: 'Lora', Georgia, 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);
}

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

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

.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);
}

/* ── Features grid (homepage) ── */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

a.feature-card,
.feature-card {
    display: block;
    padding: 32px 24px;
    background: var(--white);
    border-radius: var(--radius);
    border: var(--frame-border);
    text-align: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-card);
}

a.feature-card:hover,
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--frame-ring), 0 8px 32px rgba(0, 0, 0, 0.08);
}

.feature-card__icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Heaven promo (homepage) ── */

.heaven-promo {
    display: flex;
    align-items: center;
    gap: 48px;
}

.heaven-promo__content {
    flex: 1;
}

.heaven-promo__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.heaven-promo__text {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 20px;
}

.heaven-promo__example {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--accent);
    padding: 16px 20px;
    border-left: 3px solid var(--accent);
    background: rgba(107, 143, 163, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 24px;
}

.heaven-promo__visual {
    flex-shrink: 0;
    width: 260px;
}

.heaven-envelope {
    position: relative;
    width: 240px;
    height: 180px;
    margin: 0 auto;
}

.heaven-envelope__flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 120px solid transparent;
    border-right: 120px solid transparent;
    border-top: 80px solid var(--accent);
    z-index: 2;
    animation: envelopeFloat 3s ease-in-out infinite;
}

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

.heaven-envelope__body {
    position: absolute;
    top: 30px;
    left: 0;
    width: 240px;
    height: 150px;
    background: var(--white);
    border: 2px solid var(--accent);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-shadow: var(--frame-ring), 0 4px 16px rgba(0, 0, 0, 0.06);
}

.heaven-envelope__text {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--accent);
    text-align: center;
}

@media (max-width: 768px) {
    .heaven-promo {
        flex-direction: column;
        text-align: center;
    }

    .heaven-promo__example {
        border-left: none;
        border-top: 3px solid var(--accent);
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    }

    .heaven-promo__visual {
        width: 200px;
    }

    .heaven-envelope {
        width: 180px;
        height: 140px;
    }

    .heaven-envelope__flap {
        border-left-width: 90px;
        border-right-width: 90px;
        border-top-width: 60px;
    }

    .heaven-envelope__body {
        width: 180px;
        height: 110px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Memorial map ── */

.map-page {
    padding-bottom: 0;
}

.map-page .container {
    padding: 40px 24px 24px;
    text-align: center;
}

.memorial-map {
    width: 100%;
    height: 500px;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.map-candle-icon {
    background: none;
    border: none;
}

@media (max-width: 768px) {
    .memorial-map {
        height: 350px;
    }
}

/* ── AI suggest ── */

.ai-suggest {
    margin-top: 8px;
}

.ai-suggest__options {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.ai-suggest__options .candle-form__input {
    flex: 1;
    min-width: 160px;
}

/* ── Parte ── */

.parte-page {
    width: 595px;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.parte-inner {
    position: relative;
    background: #fff;
    padding: 0;
    aspect-ratio: 210 / 297;
    overflow: hidden;
    border: var(--frame-border);
    box-shadow: var(--frame-ring), 0 2px 16px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
}

.parte-border {
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
    border: 3px double #333;
    padding: 48px 40px;
    text-align: center;
}

.parte-cross {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

.parte-announcement {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    font-family: 'Lora', Georgia, serif;
}

.parte-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Lora', Georgia, serif;
}

.parte-dates {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
    letter-spacing: 1px;
    font-family: 'Lora', Georgia, serif;
}

.parte-message {
    font-family: 'Lora', Georgia, serif;
    font-style: normal;
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.65;
    color: #1a1a1a;
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-line;
}

.parte-age {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-family: 'Lora', Georgia, serif;
}

.parte-mourners {
    font-size: 1.3rem;
    font-weight: 700;
    font-style: normal;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.6;
    font-family: 'Lora', Georgia, serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-line;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.parte-ceremony {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.6;
    padding: 10px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    font-family: 'Lora', Georgia, serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-line;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.parte-qr {
    margin-bottom: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.parte-qr img {
    width: 120px;
    height: 120px;
    margin-bottom: 8px;
    display: block;
}

.parte-qr p {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
    font-family: 'Lora', Georgia, serif;
}

.parte-qr small {
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    font-family: 'Lora', Georgia, serif;
}

.parte-footer-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    font-style: normal;
    font-family: 'Lora', Georgia, serif;
}

@media print {
    .header, .footer, .cookie-bar { display: none !important; }
    html {
        color-scheme: light !important;
        forced-color-adjust: none !important;
    }
    .parte-page { margin: 0; padding: 0; max-width: 100%; }
    .parte-inner {
        box-shadow: none;
        border: none;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        filter: none !important;
    }
    .parte-page img,
    .parte-inner img {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        filter: none !important;
    }
}

/* ── QR order materials ── */

.qr-materials {
    margin-bottom: 32px;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.material-card {
    padding: 16px;
    text-align: center;
    border: var(--frame-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--frame-ring);
}

.material-card:hover {
    border-color: var(--accent);
}

.material-card--active {
    border-color: var(--accent);
    background: rgba(107, 143, 163, 0.06);
}

.material-card__icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.material-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.material-card .text-muted {
    font-size: 0.75rem;
}

.material-card__price {
    display: block;
    margin-top: 6px;
    font-weight: 600;
    color: var(--accent);
    font-size: 0.85rem;
}

/* ── Photos gallery sortable ── */

.photos-gallery-sortable {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.photo-item {
    position: relative;
    height: 100px;
    cursor: grab;
    user-select: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
    border-radius: 8px;
    overflow: visible;
}

.photo-item:active {
    cursor: grabbing;
}

.photo-item--dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.photo-item__img {
    height: 100%;
    width: auto;
    object-fit: cover;
    border-radius: 8px;
    transition: box-shadow 0.2s ease;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.photo-item:hover .photo-item__img {
    box-shadow: 0 0 0 2px var(--accent);
}

.photo-item__delete {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: none;
    cursor: pointer;
    z-index: 2;
    pointer-events: auto;
}

.photo-item__order {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.photo-item__pending {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(212, 160, 23, 0.9);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    padding: 3px 0;
    border-radius: 8px 8px 0 0;
    letter-spacing: 0.02em;
}

/* ── 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: rgba(0,0,0,0.92);
    cursor: pointer;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.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;
}

/* ── Toggle switch ── */

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
}

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

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    transition: 0.2s;
}

.switch__slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.switch input:checked + .switch__slider {
    background: var(--primary, #4CAF50);
}

.switch input:checked + .switch__slider::before {
    transform: translateX(22px);
}

/* ── Sticky form actions ── */

.form-actions-sticky {
    display: flex;
    gap: 12px;
    position: sticky;
    bottom: 0;
    background: var(--bg, #fff);
    padding: 16px 0;
    border-top: 1px solid var(--border);
    margin-top: 24px;
    z-index: 100;
}

.form-actions-sticky .btn {
    flex: 1;
}

/* ── Parte photo ── */

.parte-photo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.parte-photo img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #333;
}

/* ── Messages from deceased (dashboard) ── */

.messages-intro {
    padding: 20px;
    background: linear-gradient(135deg, #f0f4f7, #e8eef2);
    border-radius: var(--radius);
    margin-bottom: 32px;
    text-align: center;
}

.messages-intro .serif {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
}

.messages-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.message-card--inactive {
    opacity: 0.5;
}

.message-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.message-card__text {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 12px;
}

.message-card__meta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.message-card__actions {
    display: flex;
    gap: 8px;
}

/* ── Testimonials ── */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.testimonial-card {
    padding: 28px;
    background: var(--white);
    border-radius: var(--radius);
    border: var(--frame-border);
    box-shadow: var(--shadow-card);
}

.testimonial-card__text {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 16px;
}

.testimonial-card__author {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.testimonial-card__author strong {
    color: var(--text);
}

/* ── 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 {
    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(107, 143, 163, 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;
}

/* ── Lightbox ── */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-sm);
}

/* ── Footer ── */

.site-footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 12px;
    display: inline-block;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .hero {
        padding: 260px 0 60px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

    .steps-showcase__panel {
        flex-direction: column;
        padding: 24px 20px;
        gap: 20px;
    }

    .steps-showcase__photo {
        width: 100%;
        height: 180px;
    }

    .steps-showcase__text {
        text-align: center;
    }

    .steps-showcase__badges {
        justify-content: center;
    }

    .sc-detail ul {
        grid-template-columns: 1fr;
    }

    .qr-materials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .qr-materialy-page__videos {
        grid-template-columns: 1fr;
    }

    .sc-detail__actions {
        flex-direction: column;
        gap: 10px;
    }

    .sc-detail__actions .btn {
        width: 100%;
        text-align: center;
    }

    .steps-showcase__tabs {
        grid-template-columns: 1fr;
    }

    .steps-showcase__tab {
        padding: 16px 20px;
        min-height: auto;
    }

    .steps-showcase__tab.is-active {
        transform: none;
        box-shadow: var(--frame-ring), inset 4px 0 0 var(--accent);
    }

    .steps-showcase__tab.is-active::after {
        display: none;
    }

    .steps-showcase__tab:hover {
        transform: none;
    }

    .steps-showcase__tab:first-child {
        border-radius: 0;
    }

    .steps-showcase__tab:last-child {
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .latest-memories-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .tiers {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }

    .tier-card.featured {
        order: 0;
    }

    .site-header .container {
        height: 60px;
    }

    .lang-switcher {
        border-left: none;
        margin-left: 0;
        padding-left: 0;
        padding: 8px 0;
        border-top: 1px solid var(--border);
        justify-content: center;
    }

    .lightbox__img {
        max-width: 96vw;
        max-height: 80vh;
        border-radius: 4px;
    }

    .lightbox__close {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }

    .lightbox__arrow {
        padding: 8px 12px;
        font-size: 1.5rem;
    }

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

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

    .lightbox__counter {
        bottom: 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .memory-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 28px 20px;
    }

    .memory-page .memory-name {
        font-size: 1.7rem;
    }

    .cookie-bar {
        right: 8px;
        left: 8px;
        bottom: 8px;
        max-width: none;
    }
}

/* ── Cookie Consent Bar ── */

.cookie-bar {
    position: fixed;
    bottom: 16px;
    left: auto;
    right: 16px;
    z-index: 500;
    background: #fff;
    color: #444;
    padding: 16px 20px;
    font-size: 0.78rem;
    max-width: 360px;
    border-radius: 12px;
    border: var(--frame-border);
    box-shadow: var(--frame-ring), 0 4px 24px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
    transform: translateY(120%);
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.cookie-bar.visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-bar .container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-bar p {
    margin: 0;
    line-height: 1.5;
    color: #666;
}

.cookie-bar a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-bar a:hover {
    color: var(--accent-hover);
}

.cookie-bar-actions {
    display: flex;
    gap: 8px;
}

.cookie-bar-actions button {
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.cookie-accept {
    background: var(--accent);
    color: #fff;
}

.cookie-accept:hover {
    background: var(--accent-hover);
}

.cookie-decline {
    background: transparent;
    color: #999;
    border: 1px solid #ddd !important;
}

.cookie-decline:hover {
    color: #666;
    border-color: #bbb !important;
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 220px 0 50px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

/* ══════════════════════════════════════
   Guided Tour
   ══════════════════════════════════════ */

.hero-tour-trigger {
    margin-top: 24px;
}

.btn-tour {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(4px);
}

.btn-tour:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

[data-tour-section].tour-active {
    position: relative;
    z-index: 1001;
    box-shadow: 0 0 0 4px var(--accent), 0 0 40px rgba(107, 143, 163, 0.25);
    border-radius: var(--radius);
    transition: box-shadow 0.5s ease;
}

.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1000;
    transition: opacity 0.4s ease;
}

.tour-overlay[hidden] {
    display: none;
}

.tour-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 700px;
    width: calc(100% - 48px);
    padding: 16px 24px;
    background: rgba(15, 15, 15, 0.92);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.tour-bar__text {
    flex: 1;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.tour-bar__controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.tour-bar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all var(--transition);
}

.tour-bar__btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .tour-bar {
        bottom: 16px;
        padding: 14px 18px;
        gap: 12px;
    }

    .tour-bar__text {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .tour-bar {
        flex-direction: column;
        text-align: center;
    }

    .tour-bar__controls {
        justify-content: center;
    }
}

/* ── Strom života (ukázka jako na produkci — PNG + samostatný CTA) ── */

.family-tree-showcase {
    margin-top: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
}

.family-tree-showcase__visual {
    line-height: 0;
    background: #f5f1e6;
}

.family-tree-showcase__visual img {
    width: 100%;
    height: auto;
    display: block;
}

.family-tree-showcase__cta {
    background: #161b2c;
    text-align: center;
    padding: 1.75rem 1.5rem 1.75rem;
    line-height: 1.5;
}

.family-tree-showcase__badge {
    display: inline-block;
    background: var(--gold);
    color: #161b2c;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.family-tree-showcase__text {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 1.25rem;
}

.family-tree-showcase__btn {
    min-width: 220px;
}

@media (max-width: 768px) {
    .family-tree-showcase__cta {
        padding: 1.35rem 1rem 1.5rem;
    }

    .family-tree-showcase__text {
        font-size: 0.95rem;
    }

    .family-tree-showcase__btn {
        width: 100%;
        max-width: 320px;
    }
}

/* ── Family Tree Editor ── */

/* Dark member cards */

.ftree-members-dark {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.ftree-dark-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 14px 16px;
    position: relative;
    border: 1.5px solid rgba(196, 168, 124, 0.15);
    transition: border-color var(--transition);
}

.ftree-dark-card--deceased {
    border-color: var(--gold);
}

.ftree-dark-card:hover {
    border-color: rgba(196, 168, 124, 0.5);
}

.ftree-dark-card__photo-wrap {
    position: relative;
    flex-shrink: 0;
}

.ftree-dark-card__photo-wrap .photo-ring--sm {
    width: 64px;
    height: 64px;
    padding: 3px;
}

.ftree-dark-card__photo-wrap .photo-ring--sm img {
    width: 58px;
    height: 58px;
    border-width: 2px;
}

.ftree-dark-card__photo-wrap .photo-ring--placeholder {
    width: 64px;
    height: 64px;
}

.ftree-dark-card__photo-wrap .photo-ring--placeholder span {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.ftree-photo-upload-btn {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    z-index: 2;
}

.ftree-photo-upload-btn:hover {
    transform: scale(1.15);
}

.ftree-photo-form {
    display: contents;
}

.ftree-role-badge {
    display: inline-block;
    padding: 1px 8px;
    background: rgba(196, 168, 124, 0.2);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: lowercase;
}

.ftree-dark-card__info {
    flex: 1;
    min-width: 0;
}

.ftree-dark-card__info strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ftree-dark-card__link {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}

.ftree-dark-card__link:hover {
    color: var(--gold);
}

.ftree-dark-card__link strong {
    display: inline;
}

.ftree-dark-card__dates {
    display: block;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}

.ftree-dark-card__candle {
    position: absolute;
    top: 10px;
    right: 40px;
    font-size: 0.9rem;
}

.ftree-dark-card__rels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.ftree-rel-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(196, 168, 124, 0.15);
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
}

.ftree-dark-card__actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ftree-dark-card__edit-btn,
.ftree-dark-card__remove button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ftree-dark-card__edit-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.ftree-dark-card__remove {
    flex-shrink: 0;
}

.ftree-dark-card__remove button:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

/* Inline edit form */

.ftree-edit-inline {
    display: none;
    padding: 16px;
    margin: -4px 0 10px;
    background: var(--bg);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    border: var(--frame-border);
    border-top: 2px solid var(--gold);
    box-shadow: var(--field-ring);
}

.ftree-edit-inline.ftree-edit--open {
    display: block;
}

.ftree-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.ftree-edit-inline .form-group {
    margin-bottom: 0;
}

.ftree-edit-inline .form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 3px;
    display: block;
    color: var(--text-muted);
}

.ftree-edit-inline .form-control {
    padding: 8px 10px;
    font-size: 0.88rem;
}

/* Compact relations */

.ftree-rels-compact {
    margin: 12px 0 20px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: var(--frame-border);
    box-shadow: var(--field-ring);
}

.ftree-rels-compact h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.ftree-rel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.ftree-rel-row:last-child {
    border-bottom: none;
}

.ftree-rel-row__del {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ftree-rel-row__del:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

/* Add member form section */

.ftree-add-section {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: var(--frame-border);
    box-shadow: var(--field-ring);
}

.ftree-add-section h3 {
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.ftree-form-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.ftree-form-grid--2 { grid-template-columns: 1fr 1fr; }
.ftree-form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }

.ftree-add-section .form-group {
    margin-bottom: 0;
}

.ftree-add-section .form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
    color: var(--text);
}

.ftree-add-section .form-control {
    padding: 11px 14px;
    font-size: 0.92rem;
}

/* ── Family Tree – Dashboard forms ── */

.ftree-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border: var(--frame-border);
    box-shadow: var(--shadow-card);
}

.ftree-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.ftree-create-form {
    margin-bottom: 1.5rem;
}

/* Přehled / úprava rodokmenů – výrazný rámeček (stejný jazyk jako průvodce) */
.ftree-dashboard .ftree-create-form {
    margin-bottom: 0;
}

.ftree-dashboard .ftree-panel {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(72, 95, 110, 0.58);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), var(--frame-shadow-soft);
}

.ftree-dashboard .ftree-panel .ftree-create-row .form-control {
    border: 1px solid rgba(148, 140, 128, 0.95);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.ftree-dashboard .ftree-panel .ftree-create-row .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(107, 143, 163, 0.2);
}

.ftree-dashboard .memory-card.ftree-tree-card {
    border: 1px solid rgba(72, 95, 110, 0.58);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), var(--frame-shadow-soft);
}

.ftree-dashboard .memory-card.ftree-tree-card:hover {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14), var(--shadow-lg);
}

.ftree-dashboard .btn.btn-outline {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.ftree-dashboard .btn.btn-primary {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ftree-dashboard .ftree-section {
    border: 1px solid rgba(72, 95, 110, 0.58);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), var(--frame-shadow-soft);
}

.ftree-dashboard .ftree-section .form-control,
.ftree-dashboard .ftree-add-section .form-control,
.ftree-dashboard .ftree-edit-inline .form-control {
    border: 1px solid rgba(148, 140, 128, 0.95);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.ftree-dashboard .ftree-section .form-control:focus,
.ftree-dashboard .ftree-add-section .form-control:focus,
.ftree-dashboard .ftree-edit-inline .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(107, 143, 163, 0.2);
}

.ftree-create-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ftree-create-row .form-control {
    flex: 1;
}

.ftree-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 1rem;
}

.ftree-member-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    position: relative;
    border: var(--frame-border);
    box-shadow: var(--field-ring);
}

.ftree-member-card__photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ftree-member-card__photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border);
    color: var(--text-muted);
    font-size: 1.3rem;
}

.ftree-member-card__info {
    flex: 1;
    min-width: 0;
}

.ftree-member-card__info strong {
    display: block;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ftree-member-card__info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ftree-member-card__remove {
    flex-shrink: 0;
}

.ftree-add-form {
    margin-top: 1rem;
}

.ftree-relation-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.ftree-relation-form .form-control {
    flex: 1;
    min-width: 140px;
}

.ftree-relations-list {
    margin-bottom: 1rem;
}

.ftree-relation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.ftree-relation-row:last-child {
    border-bottom: none;
}

.ftree-relation-badge {
    display: inline-block;
    background: var(--gold);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 10px;
    border-radius: 12px;
    margin: 0 6px;
}

/* ── Family Tree – SVG Visualization ── */

.ftree-canvas {
    background: #1a1a2e;
    border-radius: var(--radius);
    padding: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ftree-canvas--public {
    padding: 2rem;
    min-height: 300px;
}

.ftree-svg {
    display: block;
    max-width: 100%;
    height: auto;
    min-height: 200px;
}

.ftree-line {
    fill: none;
    stroke: rgba(196, 168, 124, 0.4);
    stroke-width: 2;
}

.ftree-line--spouse {
    stroke: rgba(196, 168, 124, 0.6);
    stroke-width: 2.5;
    stroke-dasharray: 6 4;
}

.ftree-line--parent {
    stroke: rgba(196, 168, 124, 0.5);
    stroke-width: 2;
}

.ftree-line--sibling {
    stroke: rgba(196, 168, 124, 0.3);
    stroke-width: 1.5;
    stroke-dasharray: 4 3;
}

.ftree-card__bg {
    fill: rgba(30, 30, 55, 0.9);
    stroke: rgba(196, 168, 124, 0.25);
    stroke-width: 1.5;
    transition: all 0.2s ease;
}

.ftree-card--deceased .ftree-card__bg {
    stroke: var(--gold);
    stroke-width: 2;
}

.ftree-card--living .ftree-card__bg {
    fill: rgba(40, 40, 65, 0.7);
    stroke: rgba(255, 255, 255, 0.15);
}

.ftree-card--clickable:hover .ftree-card__bg {
    fill: rgba(50, 50, 80, 1);
    stroke: var(--gold);
    stroke-width: 2;
}

.ftree-card__photo-placeholder {
    fill: rgba(100, 100, 130, 0.5);
}

.ftree-card__placeholder-icon {
    fill: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

.ftree-card__name {
    fill: #ffffff;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.ftree-card__role {
    fill: #C4A87C;
    font-size: 10px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-transform: lowercase;
}

.ftree-card__dates {
    fill: rgba(255, 255, 255, 0.45);
    font-size: 10px;
    font-family: 'Inter', sans-serif;
}

.ftree-card__candle {
    font-size: 12px;
}

.ftree-public-section {
    padding-top: 0;
}

/* ── 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 {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
}
.footer-share__label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
}

@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: #6B8FA3; }
.addon-toggle input:checked + .addon-toggle__track::after { transform: translateX(20px); }

/* ── Kniha života (veřejná čtečka, MVP) ── */

.life-book-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.life-book-page__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.life-book-page__counter {
    margin-left: auto;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.life-book {
    position: relative;
    min-height: 420px;
}

.life-book__sheet {
    display: none;
    animation: lifeBookIn 0.35s ease;
}

.life-book__sheet--active {
    display: block;
}

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

.life-book__paper {
    background: linear-gradient(180deg, #faf6ee 0%, #f0e8d8 100%);
    border-radius: 12px;
    padding: 28px 24px 32px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(90, 70, 50, 0.12);
    color: #3a3428;
}

.life-book__script {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.75rem;
    text-align: center;
    margin: 0 0 20px;
    font-style: italic;
    color: #5c4d3a;
}

.life-book__cover-photo {
    max-width: 280px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.life-book__cover-photo img {
    display: block;
    width: 100%;
    height: auto;
}

.life-book__name {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.65rem;
    text-align: center;
    margin: 0 0 8px;
    font-weight: 600;
    color: #2c2419;
}

.life-book__dates {
    text-align: center;
    font-size: 1rem;
    color: #6b5c48;
    margin: 0 0 8px;
}

.life-book__heading {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.25rem;
    margin: 0 0 14px;
    color: #3d3428;
    border-bottom: 1px solid rgba(90, 70, 50, 0.15);
    padding-bottom: 8px;
}

.life-book__body {
    font-size: 0.98rem;
    line-height: 1.75;
    color: #4a4034;
}

.life-book__inline-photo {
    max-width: 100%;
    margin: 0 0 16px;
    border-radius: 8px;
    overflow: hidden;
}

.life-book__inline-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.life-book__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.life-book__gallery-item {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.life-book__gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.life-book__video {
    width: 100%;
    max-height: 360px;
    border-radius: 8px;
    margin-top: 12px;
    background: #000;
}

.life-book-page__nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .life-book__paper {
        padding: 20px 16px 24px;
    }

    .life-book__script {
        font-size: 1.45rem;
    }

    .life-book-page__counter {
        width: 100%;
        margin-left: 0;
        text-align: center;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   Časová osa života (Timeline)
   ══════════════════════════════════════════════════════════════════════ */

.memory-timeline {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 16px;
    display: none;
}

.memory-timeline__title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 32px;
    color: var(--text);
}

.memory-timeline__line {
    position: relative;
    padding: 8px 0;
}

.memory-timeline__line::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border);
    transform: translateX(-50%);
}

.memory-timeline__item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: timelineFadeIn 0.5s ease forwards;
}

.memory-timeline__item:nth-child(1)  { animation-delay: 0.05s; }
.memory-timeline__item:nth-child(2)  { animation-delay: 0.1s; }
.memory-timeline__item:nth-child(3)  { animation-delay: 0.15s; }
.memory-timeline__item:nth-child(4)  { animation-delay: 0.2s; }
.memory-timeline__item:nth-child(5)  { animation-delay: 0.25s; }
.memory-timeline__item:nth-child(6)  { animation-delay: 0.3s; }
.memory-timeline__item:nth-child(7)  { animation-delay: 0.35s; }
.memory-timeline__item:nth-child(8)  { animation-delay: 0.4s; }
.memory-timeline__item:nth-child(9)  { animation-delay: 0.45s; }
.memory-timeline__item:nth-child(10) { animation-delay: 0.5s; }

@keyframes timelineFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.memory-timeline__item--left {
    flex-direction: row-reverse;
    text-align: right;
}

.memory-timeline__item--right {
    text-align: left;
}

.memory-timeline__dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 1;
    flex-shrink: 0;
}

.memory-timeline__card {
    width: calc(50% - 40px);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}

.memory-timeline__card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.memory-timeline__item--left .memory-timeline__card {
    margin-right: 40px;
}

.memory-timeline__item--right .memory-timeline__card {
    margin-left: auto;
}

.memory-timeline__date {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.memory-timeline__event-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text);
}

.memory-timeline__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .memory-timeline__line::before {
        left: 20px;
    }

    .memory-timeline__item,
    .memory-timeline__item--left,
    .memory-timeline__item--right {
        flex-direction: row;
        text-align: left;
    }

    .memory-timeline__dot {
        position: relative;
        left: 0;
        transform: none;
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .memory-timeline__card {
        width: auto;
        flex: 1;
        margin-left: 12px !important;
        margin-right: 0 !important;
    }

    .memory-timeline__item--left .memory-timeline__card {
        margin-right: 0;
    }
}

/* ── 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, #6b8fa3);
}

.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(107, 143, 163, 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(107, 143, 163, 0.08);
    box-shadow: 0 0 0 3px rgba(107, 143, 163, 0.15);
}

.gift-picker__btn--primary {
    border-color: var(--accent);
    background: rgba(107, 143, 163, 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(107, 143, 163, 0.06);
    transform: translateY(-1px);
}

.gift-picker__more.is-open {
    border-style: solid;
    border-color: var(--accent);
    background: rgba(107, 143, 163, 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(107, 143, 163, 0.06);
    border-color: var(--border);
    transform: scale(1.08);
}

.gift-picker__grid-btn.is-active {
    border-color: var(--accent);
    background: rgba(107, 143, 163, 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); }
}

/* ══════════════════════════════════════════════════════════════════════
   Music Player (plovoucí přehrávač)
   ══════════════════════════════════════════════════════════════════════ */


@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, colored) ── */

.memory-hero__primary-section .gift-picker {
    gap: 10px;
    justify-content: flex-start;
}

.memory-hero__primary-section .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(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.2s, box-shadow 0.25s, border-color 0.2s, background 0.2s;
    color: #fff;
}

.memory-hero__primary-section .gift-picker__btn:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.memory-hero__primary-section .gift-picker__btn.is-active,
.memory-hero__primary-section .gift-picker__btn:active {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: scale(0.97);
}

.memory-hero__primary-section .gift-picker__btn--primary {
    border-color: rgba(255, 200, 100, 0.5);
    background: rgba(255, 200, 100, 0.12);
}

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

.memory-hero__primary-section .gift-picker__label {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
}

.memory-hero__primary-section .gift-picker__more {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    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 {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.memory-hero__primary-section .gift-picker__grid {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.memory-hero__primary-section .gift-picker__grid-btn {
    color: rgba(255, 255, 255, 0.9);
}

.memory-hero__primary-section .gift-picker__grid-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.memory-hero__primary-section .gift-picker__grid-label {
    color: rgba(255, 255, 255, 0.6);
}

/* ── Form fields below gift picker ── */

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

.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(107, 143, 163, 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(107, 143, 163, 0.2);
}

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

/* ── Accordions ── */

.memory-hero__accordions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.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);
}

.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;
}

.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(107, 143, 163, 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(107, 143, 163, 0.12);
}

.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%;
}

.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(107, 143, 163, 0.18);
    border-color: rgba(107, 143, 163, 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;
    padding: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.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;
}

.memory-share--hero .share-btn {
    width: 38px;
    height: 38px;
    opacity: 0.85;
    transition: transform 0.2s, opacity 0.2s;
}

.memory-share--hero .share-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ── Gradient divider helper ── */

.memory-hero__grid > .memory-feed::before {
    display: none;
}

@media (max-width: 480px) {
    .memory-hero__primary-section .gift-picker__btn {
        width: 60px;
        height: 60px;
    }

    .memory-hero__primary-section .gift-picker__icon {
        font-size: 1.5rem;
    }

    .memory-hero__primary-section .gift-picker__label {
        font-size: 0.55rem;
    }

    .memory-hero__primary-section .gift-picker__more {
        width: 60px;
        height: 60px;
    }

    .memory-hero__primary-section {
        padding: 20px 16px 18px;
    }
}
