/* Memory Site Experience v1 — public page UX (presentation only, R2026.09) */

.rp-layout--memory-site {
    gap: 2.5rem;
}

.rp-memory-main .rp-section + .rp-section {
    margin-top: 2.25rem;
}

.rp-memory-main .rp-section {
    padding: 0;
}

.rp-section-actions {
    margin-top: 1rem;
}

.rp-person--inscription {
    border-style: dashed;
}

.rp-people--after-linked {
    margin-top: 1rem;
}

/* ── Inscription roster (large plaque lists) ── */

.rp-inscription-roster {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .16);
    background: rgba(15, 23, 42, .34);
}

.rp-inscription-roster__intro {
    display: grid;
    gap: .75rem;
    margin-bottom: 1rem;
}

.rp-inscription-roster__summary {
    margin: 0;
    font-size: .92rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.rp-inscription-roster__search {
    display: block;
}

.rp-inscription-roster__input {
    width: 100%;
    padding: .65rem .85rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .24);
    background: rgba(15, 23, 42, .72);
    color: #e2e8f0;
    font-size: .92rem;
}

.rp-inscription-roster__input:focus {
    outline: none;
    border-color: rgba(96, 165, 250, .45);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

.rp-inscription-roster__hint {
    margin: 0;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--color-muted);
}

.rp-inscription-roster__status {
    margin: .75rem 0 0;
    font-size: .8125rem;
    color: var(--color-muted);
}

.rp-inscription-roster__actions {
    margin-top: .75rem;
}

.rp-inscription-roster__grid {
    margin-top: .25rem;
}

.rp-person__note {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: var(--rp-muted, #6b7280);
}

/* ── First screen (hero) ── */

.rp-hero--memory-site {
    margin-bottom: var(--rp-gap-lg);
}

.rp-hero__where {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin: 0 0 .85rem;
    font-size: .95rem;
    line-height: 1.5;
    color: #cbd5e1;
    max-width: 62ch;
}

.rp-hero__where .rp-icon {
    margin-top: .15rem;
    color: #94a3b8;
}

/* ── Hero media (photo + map) ── */

.rp-hero--memory-site .rp-hero__grid {
    align-items: stretch;
}

.rp-hero--memory-site .rp-hero__map--solo {
    min-height: clamp(220px, 36vw, 320px);
    aspect-ratio: auto;
}

@media (min-width: 768px) {
    .rp-hero--memory-site .rp-hero__map--solo {
        min-height: 280px;
    }
}

/* Empty cover — only when there is no map; compact photo slot, not a second empty-state card */
.rp-hero-cover-empty {
    display: flex;
    align-items: stretch;
    aspect-ratio: auto;
    min-height: clamp(200px, 32vw, 280px);
    border-radius: var(--rp-radius);
    border: 1px dashed rgba(148, 163, 184, .24);
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 11px,
            rgba(148, 163, 184, .035) 11px,
            rgba(148, 163, 184, .035) 12px
        ),
        rgba(15, 23, 42, .42);
    overflow: hidden;
}

.rp-hero-cover-empty__frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.75rem 1.25rem;
    text-align: center;
}

.rp-hero-cover-empty__icon .rp-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.rp-hero-cover-empty__icon {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: .65rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, .1);
    color: #94a3b8;
}

.rp-hero-cover-empty__title {
    margin: 0;
    font-size: .92rem;
    font-weight: 500;
    color: #cbd5e1;
}

.rp-hero-cover-empty__desc {
    margin: .45rem 0 0;
    max-width: 38ch;
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--color-muted);
}

.rp-hero-cover-empty__actions {
    margin-top: .75rem;
}

.rp-hero-cover-empty__link {
    font-size: .8125rem;
    font-weight: 500;
    color: #93c5fd;
    text-decoration: none;
}

.rp-hero-cover-empty__link:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

.rp-hero-cover-empty--compact .rp-hero-cover-empty__frame {
    padding: 1.5rem 1rem;
}

.rp-hero-cover-empty--compact .rp-hero-cover-empty__icon {
    width: 2.15rem;
    height: 2.15rem;
    margin-bottom: .5rem;
}

.rp-hero-cover-empty--compact .rp-hero-cover-empty__title {
    font-size: .875rem;
}

/* ── Long-form reading ── */

.rp-prose--readable {
    max-width: 68ch;
    font-size: 1.02rem;
    line-height: 1.75;
    color: #e2e8f0;
}

.rp-prose--readable + .rp-prose--readable {
    margin-top: 1rem;
}

.rp-memory-main .rp-section__title {
    font-family: var(--rp-serif);
}

.rp-memory-main .rp-gallery {
    margin-top: .25rem;
}

/* ── Gallery footer ── */

.rp-gallery__footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, .12);
}

/* ── Sticky CTA (long pages) ── */

.rp-memory-sticky-cta {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 900;
    transform: translateX(-50%);
    padding: .45rem .55rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, .35);
    background: rgba(15, 23, 42, .92);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
    backdrop-filter: blur(8px);
}

.rp-memory-sticky-cta[hidden] {
    display: none !important;
}

.rp-memory-sticky-cta.is-visible {
    display: block;
}

@media (max-width: 768px) {
    .rp-memory-sticky-cta {
        left: var(--mob-gap, 20px);
        right: var(--mob-gap, 20px);
        bottom: calc(var(--mob-tab-h, 56px) + 12px);
        z-index: 180;
        transform: none;
        padding: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .rp-memory-sticky-cta .btn {
        width: 100%;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }
}

/* ── Memory sidebar hierarchy ── */

.rp-memory-sidebar {
    display: grid;
    gap: .75rem;
    align-content: start;
}

.rp-memory-sidebar__card {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .14);
    background: rgba(15, 23, 42, .38);
}

.rp-memory-sidebar__card--primary {
    padding: 1.25rem 1.2rem;
    border-color: rgba(96, 165, 250, .32);
    background: linear-gradient(145deg, rgba(30, 58, 95, .45), rgba(15, 23, 32, .65));
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

.rp-memory-sidebar__card--primary .rp-memory-sidebar__title {
    font-size: 1rem;
}

.rp-memory-sidebar__card--featured {
    border-color: rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .52);
}

.rp-memory-sidebar__card--muted {
    padding: .85rem 1rem;
    border-color: rgba(148, 163, 184, .1);
    background: rgba(15, 23, 42, .28);
}

.rp-memory-sidebar__card--muted .rp-memory-sidebar__title {
    font-size: .84rem;
    font-weight: 600;
    color: #cbd5e1;
}

.rp-memory-sidebar__title {
    margin: 0 0 .55rem;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.rp-memory-sidebar__lead {
    margin: 0 0 .85rem;
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--color-muted);
}

.rp-memory-sidebar__location {
    display: flex;
    align-items: flex-start;
    gap: .35rem;
    margin: 0 0 .85rem;
    font-size: .875rem;
    line-height: 1.45;
    color: #e2e8f0;
}

.rp-memory-sidebar__facts {
    margin: 0;
    display: grid;
    gap: .55rem;
}

.rp-memory-sidebar__fact {
    display: grid;
    gap: .1rem;
}

.rp-memory-sidebar__fact dt {
    margin: 0;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-muted);
}

.rp-memory-sidebar__fact dd {
    margin: 0;
    font-size: .8125rem;
    line-height: 1.45;
}

.rp-memory-sidebar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.rp-memory-sidebar__nearby {
    margin: .65rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: .4rem;
}

.rp-memory-sidebar__details > summary {
    cursor: pointer;
    list-style: none;
}

.rp-memory-sidebar__details > summary::-webkit-details-marker {
    display: none;
}

.rp-memory-sidebar__link {
    display: grid;
    gap: .05rem;
    padding: .45rem .55rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, .1);
    text-decoration: none;
    color: inherit;
    font-size: .8125rem;
    transition: border-color .15s, background .15s;
}

.rp-memory-sidebar__link:hover {
    border-color: rgba(96, 165, 250, .28);
    background: rgba(59, 130, 246, .05);
}

.rp-memory-sidebar__link-name {
    font-weight: 600;
}

.rp-memory-sidebar__link-kind {
    font-size: .72rem;
    color: var(--color-muted);
}

.rp-memory-sidebar__cta {
    width: 100%;
    justify-content: center;
}

@media (max-width: 1023px) {
    .rp-memory-sidebar__card--primary {
        display: none;
    }
}

@media (min-width: 1024px) {
    .rp-page--with-sidebar .rp-layout--memory-site {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}
