/* Person Experience v1 — public profile UX (Material System LOCK — presentation only) */

/* ── Person hero band — фон по вероисповеданию ── */

.rp-person-hero-band {
    position: relative;
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 1.75rem;
    overflow: hidden;
    background-color: #0a0f0d;
}

.rp-person-hero-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        var(--rp-person-hero-bg) 68% 40% / cover no-repeat;
    transform: scale(1.02);
}

.rp-person-hero-band__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 15, 13, .08) 0%, rgba(10, 15, 13, .62) 78%, rgba(10, 15, 13, .92) 100%),
        linear-gradient(90deg, rgba(10, 15, 13, .97) 0%, rgba(10, 15, 13, .9) 38%, rgba(10, 15, 13, .52) 58%, rgba(10, 15, 13, .12) 78%, rgba(10, 15, 13, 0) 100%);
    pointer-events: none;
}

.rp-person-hero-band__inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.25rem 2rem;
    width: min(1140px, 100%);
    margin: 0 auto;
    padding: 1.45rem 1.25rem 1.65rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .rp-person-hero-band__inner {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

.rp-person-hero-band__main {
    min-width: 0;
}

.rp-person-hero-band__aside {
    align-self: start;
}

/* ── Person page shell (контент + сайдбар) ── */

.rp-person-shell {
    display: grid;
    gap: 1.25rem 2rem;
}

@media (min-width: 1024px) {
    .rp-person-shell {
        grid-template-columns: minmax(0, 1fr) 300px;
        align-items: start;
    }
}

.rp-person-meta {
    margin: 1.5rem 0 0;
    font-size: .78rem;
    color: #64748b;
}

.rp-person-meta a {
    color: #6ee7b7;
    text-decoration: none;
}

.rp-person-meta a:hover {
    text-decoration: underline;
}

.rp-person-hero__head {
    min-width: 0;
}

.rp-person-hero__badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: .28rem .72rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .28);
    background: rgba(15, 23, 42, .55);
    color: #cbd5e1;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rp-person-hero__profile {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.rp-person-hero__avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
    flex-shrink: 0;
}

.rp-person-hero__avatar {
    flex-shrink: 0;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--rp-serif);
    font-size: 2.35rem;
    font-weight: 700;
    color: #e8edf4;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .35);
    border: 3px solid rgba(255, 255, 255, .12);
}

button.rp-person-hero__tool {
    padding: 0;
    font: inherit;
    appearance: none;
}

button.rp-person-hero__avatar {
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

button.rp-person-hero__avatar:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 36px rgba(0, 0, 0, .42);
}

button.rp-person-hero__avatar:focus-visible {
    outline: 2px solid rgba(94, 207, 138, .75);
    outline-offset: 3px;
}

.rp-person-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rp-person-hero__body {
    min-width: 0;
    flex: 1;
}

.rp-person-hero__title {
    margin: 0 0 .5rem;
    font-family: var(--rp-serif);
    font-size: clamp(1.65rem, 3.5vw, 2.35rem);
    font-weight: 700;
    line-height: 1.12;
    color: #fff;
}

.rp-person-hero__tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
}

.rp-person-hero__tool {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .28);
    background: rgba(15, 23, 42, .45);
    color: #cbd5e1;
    cursor: pointer;
}

.rp-person-hero__tool:hover {
    color: #fff;
    border-color: rgba(94, 207, 138, .45);
}

.rp-person-hero__dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .65rem;
    font-size: .98rem;
    color: #e2e8f0;
}

.rp-person-hero__age {
    display: inline-block;
    padding: .18rem .62rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, .18);
    color: #93c5fd;
    font-size: .78rem;
    font-weight: 600;
}

.rp-person-hero__events {
    display: grid;
    gap: .45rem;
    margin: 0 0 1rem;
}

.rp-person-hero__event-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    font-size: .92rem;
    color: #cbd5e1;
}

.rp-person-hero__event-label {
    color: #94a3b8;
}

.rp-person-hero__event-value {
    color: #e2e8f0;
    font-weight: 500;
}

.rp-person-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .35rem;
    align-items: center;
}

.rp-person-hero__actions .btn--primary {
    flex: 1 1 100%;
    max-width: 22rem;
    padding: .72rem 1.2rem;
    font-size: .9rem;
    border-radius: 10px;
    justify-content: center;
}

.rp-person-hero__actions .btn--outline {
    border-color: rgba(94, 207, 138, .45);
    color: #86efac;
}

/* Memorial card in hero */
.rp-person-memorial-card {
    padding: 1.25rem 1.3rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .78);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, .28);
}

.rp-person-memorial-card__head {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .75rem;
    color: #cbd5e1;
}

.rp-person-memorial-card__title {
    margin: 0;
    font-size: .9375rem;
    font-weight: 600;
    font-family: var(--rp-serif);
}

.rp-person-memorial-card__text {
    margin: 0 0 1rem;
    font-size: .8125rem;
    color: #94a3b8;
    line-height: 1.55;
}

.rp-person-memorial-card__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .65rem;
}

.rp-person-memorial-card__form {
    margin: 0;
    display: flex;
    justify-content: center;
}

.rp-person-memorial-card__cta {
    width: auto;
    max-width: 100%;
    justify-content: center;
    padding: .55rem 1rem;
    font-size: .8125rem;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 999px;
}

.rp-person-memorial-card__settings {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #6ee7b7;
    font-size: .84rem;
    text-align: center;
    text-decoration: underline;
    cursor: pointer;
}

.rp-person-memorial-card__settings:hover {
    color: #a7f3d0;
}

.rp-person-memorial-card__hint {
    margin: .85rem 0 0;
    font-size: .75rem;
    color: #94a3b8;
    line-height: 1.45;
}

.rp-person-memorial-card__now {
    margin: 0 0 .85rem;
    padding: .55rem .6rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .2);
    background: rgba(15, 23, 42, .35);
    display: grid;
    gap: .45rem;
}

.rp-person-memorial-card__now-row {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .8125rem;
    line-height: 1.4;
    color: #e2e8f0;
}

.rp-person-memorial-card__now-icon {
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

.rp-person-memorial-card__now-copy {
    display: grid;
    gap: .1rem;
    min-width: 0;
}

.rp-person-memorial-card__now-copy strong {
    font-size: .72rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.rp-person-memorial-card__now-row--yesterday .rp-person-memorial-card__now-copy strong {
    color: #94a3b8;
}

.rp-person-memorial-card__now-row--today .rp-person-memorial-card__now-copy strong {
    color: #6ee7b7;
}

.rp-person-memorial-card__now-row--tomorrow .rp-person-memorial-card__now-copy strong {
    color: #7dd3fc;
}

.rp-person-nav__avatar-wrap,
.rp-person-hero__avatar-wrap {
    position: relative;
    display: inline-grid;
    justify-items: center;
}

.rp-person-nav__memorial-badge,
.rp-person-hero__memorial-badge {
    position: absolute;
    right: -.15rem;
    bottom: -.1rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(15, 23, 42, .95);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.rp-person-hero__memorial-badge {
    width: 2rem;
    height: 2rem;
}

.rp-person-nav__avatar--memorial-theme-birth,
.rp-person-hero__avatar--memorial-theme-birth {
    box-shadow: 0 0 0 2px rgba(251, 191, 36, .85), 0 0 18px rgba(251, 191, 36, .25);
}

.rp-person-nav__avatar--memorial-theme-death,
.rp-person-hero__avatar--memorial-theme-death {
    box-shadow: 0 0 0 2px rgba(167, 139, 250, .75), 0 0 16px rgba(167, 139, 250, .2);
}

.rp-person-nav__avatar--memorial-theme-burial,
.rp-person-hero__avatar--memorial-theme-burial {
    box-shadow: 0 0 0 2px rgba(168, 162, 158, .8), 0 0 14px rgba(120, 113, 108, .22);
}

.rp-person-nav__avatar--memorial-theme-tradition,
.rp-person-hero__avatar--memorial-theme-tradition {
    box-shadow: 0 0 0 2px rgba(252, 211, 77, .75), 0 0 16px rgba(252, 211, 77, .18);
}

.rp-person-nav__memorial-badge--birth,
.rp-person-hero__memorial-badge--birth,
.rp-person-memorial-marker--theme-birth .rp-person-memorial-marker__icon,
.rp-person-memorial-card__now-row--theme-birth .rp-person-memorial-card__now-icon {
    background: linear-gradient(145deg, #fbbf24, #d97706);
    color: #422006;
}

.rp-person-nav__memorial-badge--death,
.rp-person-hero__memorial-badge--death,
.rp-person-memorial-marker--theme-death .rp-person-memorial-marker__icon,
.rp-person-memorial-card__now-row--theme-death .rp-person-memorial-card__now-icon {
    background: linear-gradient(145deg, #8b5cf6, #5b21b6);
    color: #f5f3ff;
}

.rp-person-nav__memorial-badge--burial,
.rp-person-hero__memorial-badge--burial,
.rp-person-memorial-marker--theme-burial .rp-person-memorial-marker__icon,
.rp-person-memorial-card__now-row--theme-burial .rp-person-memorial-card__now-icon {
    background: linear-gradient(145deg, #78716c, #44403c);
    color: #fafaf9;
}

.rp-person-nav__memorial-badge--tradition,
.rp-person-hero__memorial-badge--tradition,
.rp-person-memorial-marker--theme-tradition .rp-person-memorial-marker__icon,
.rp-person-memorial-card__now-row--theme-tradition .rp-person-memorial-card__now-icon {
    background: linear-gradient(145deg, #fde68a, #ca8a04);
    color: #422006;
}

.rp-person-memorial-marker {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    width: 100%;
    max-width: 15.5rem;
    margin: .55rem 0 0;
    padding: .5rem .55rem;
    border-radius: 12px;
    text-align: left;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(15, 23, 42, .55);
}

.rp-person-memorial-marker--theme-birth {
    border-color: rgba(251, 191, 36, .35);
    background: linear-gradient(135deg, rgba(69, 26, 3, .55), rgba(15, 23, 42, .65));
}

.rp-person-memorial-marker--theme-death {
    border-color: rgba(167, 139, 250, .35);
    background: linear-gradient(135deg, rgba(46, 16, 101, .45), rgba(15, 23, 42, .65));
}

.rp-person-memorial-marker--theme-burial {
    border-color: rgba(168, 162, 158, .35);
    background: linear-gradient(135deg, rgba(41, 37, 36, .55), rgba(15, 23, 42, .65));
}

.rp-person-memorial-marker--theme-tradition {
    border-color: rgba(252, 211, 77, .35);
    background: linear-gradient(135deg, rgba(69, 26, 3, .4), rgba(15, 23, 42, .65));
}

.rp-person-memorial-marker--compact {
    max-width: 9.5rem;
    margin-top: .4rem;
    padding: .4rem .45rem;
}

.rp-person-memorial-marker__icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.rp-person-memorial-marker--compact .rp-person-memorial-marker__icon {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
}

.rp-person-memorial-marker__body {
    display: grid;
    gap: .08rem;
    min-width: 0;
}

.rp-person-memorial-marker__context {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.rp-person-memorial-marker--theme-birth .rp-person-memorial-marker__context {
    color: #fcd34d;
}

.rp-person-memorial-marker--theme-death .rp-person-memorial-marker__context {
    color: #c4b5fd;
}

.rp-person-memorial-marker--theme-burial .rp-person-memorial-marker__context {
    color: #d6d3d1;
}

.rp-person-memorial-marker--theme-tradition .rp-person-memorial-marker__context {
    color: #fde68a;
}

.rp-person-memorial-marker__when {
    font-size: .72rem;
    color: #94a3b8;
}

.rp-person-memorial-marker--today .rp-person-memorial-marker__when {
    color: #6ee7b7;
    font-weight: 600;
}

.rp-person-memorial-marker__label {
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.25;
    color: #f8fafc;
}

.rp-person-memorial-marker--compact .rp-person-memorial-marker__label {
    font-size: .72rem;
}

.rp-person-memorial-marker--compact .rp-person-memorial-marker__when,
.rp-person-memorial-marker--compact .rp-person-memorial-marker__context {
    display: none;
}

/* О человеке */
.rp-person-about {
    margin-bottom: 1.75rem;
    padding: 1.5rem 1.55rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, .14);
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(94, 207, 138, 0.05), transparent 55%),
        rgba(15, 23, 42, .42);
    box-shadow: 0 12px 36px rgba(0, 0, 0, .14);
}

.rp-person-about__title {
    margin: 0 0 1.15rem;
    font-family: var(--rp-serif);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -.01em;
    color: #f1f5f9;
}

.rp-person-about__grid {
    display: grid;
    gap: 1rem 1.35rem;
    margin: 0;
}

@media (min-width: 900px) {
    .rp-person-about__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.rp-person-about__item {
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rp-person-about__item dt {
    margin: 0 0 .35rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.rp-person-about__item dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    margin: 0;
    font-size: .95rem;
    line-height: 1.45;
    color: #e2e8f0;
}

.rp-person-about__empty {
    color: #64748b;
    font-style: italic;
}

.rp-layout--person {
    gap: 2.5rem;
}

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

.rp-person-shell .rp-person-main .rp-section {
    padding: 0;
}

.rp-person-fact-field {
    margin-top: 1rem;
}

/* ── Icons ── */

.rp-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

.rp-icon--sm {
    width: 1rem;
    height: 1rem;
}

.rp-icon--lg {
    width: 1.35rem;
    height: 1.35rem;
}

.rp-icon--xl {
    width: 1.65rem;
    height: 1.65rem;
}

/* ── Empty states ── */

.rp-empty-state {
    padding: 1.75rem 1.5rem;
    border-radius: 14px;
    border: 1px dashed rgba(148, 163, 184, .28);
    background: rgba(15, 23, 42, .35);
    text-align: center;
}

.rp-empty-state__icon {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: .85rem;
    border-radius: 12px;
    background: rgba(148, 163, 184, .1);
    color: #94a3b8;
}

.rp-empty-state__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--rp-serif);
}

.rp-empty-state__desc {
    margin: .5rem auto 0;
    max-width: 42ch;
    font-size: .875rem;
    color: var(--color-muted);
    line-height: 1.55;
}

.rp-empty-state__actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem;
}

/* ── Sources ── */

.rp-sources__card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.35rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(15, 23, 42, .42);
}

.rp-sources__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: rgba(167, 139, 250, .12);
    color: #c4b5fd;
    flex-shrink: 0;
}

.rp-sources__text {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.65;
}

.rp-sources__edit {
    margin: .65rem 0 0;
    font-size: .8125rem;
}

/* ── Documents ── */

.rp-documents {
    display: grid;
    gap: .65rem;
}

.rp-document-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(15, 23, 42, .42);
    text-decoration: none;
    color: inherit;
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.rp-document-card:hover {
    border-color: rgba(129, 140, 248, .35);
    background: rgba(15, 23, 42, .55);
    transform: translateY(-1px);
}

.rp-document-card__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: rgba(59, 130, 246, .12);
    color: #93c5fd;
}

.rp-document-card__body {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.rp-document-card__title {
    font-weight: 600;
    font-size: .9375rem;
}

.rp-document-card__role {
    font-size: .75rem;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.rp-document-card__meta {
    font-size: .8125rem;
    color: var(--color-muted);
}

.rp-document-card__arrow {
    color: var(--color-muted);
    opacity: .7;
}

.rp-document-card:hover .rp-document-card__arrow {
    color: #93c5fd;
    opacity: 1;
}

/* ── Gallery polish ── */

.rp-person-dash .rp-gallery--person {
    grid-template-columns: repeat(auto-fill, minmax(132px, 168px));
    gap: 0.85rem;
    justify-content: flex-start;
}

.rp-person-dash .rp-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rp-person-dash .rp-gallery-manage-bar {
    display: block;
    margin-bottom: 1.15rem;
}

.rp-person-dash .rp-gallery__wrap {
    position: relative;
    border-radius: 14px;
    transition: transform .15s ease, box-shadow .15s ease;
    touch-action: none;
}

.rp-person-dash .rp-gallery--manage .rp-gallery__wrap {
    cursor: grab;
}

.rp-person-dash .rp-gallery--manage .rp-gallery__wrap:active {
    cursor: grabbing;
}

.rp-person-dash .rp-gallery__wrap.is-cover {
    box-shadow: 0 0 0 2px rgba(94, 207, 138, .75), 0 10px 28px rgba(94, 207, 138, .12);
}

.rp-person-dash .rp-gallery__wrap.is-dragging-float {
    opacity: .96;
    transform: scale(1.04) rotate(-1deg);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
    cursor: grabbing;
    transition: none;
    touch-action: none;
}

.rp-person-dash .rp-gallery--manage.is-sorting {
    user-select: none;
    cursor: grabbing;
}

.rp-person-dash .rp-gallery--manage.is-sorting .rp-gallery__item {
    pointer-events: none;
}

.rp-person-dash .rp-gallery__placeholder {
    border-radius: 12px;
    border: 2px dashed rgba(94, 207, 138, .55);
    background: rgba(94, 207, 138, .1);
    min-height: 148px;
    animation: rp-gallery-placeholder-pulse 1s ease infinite alternate;
}

@keyframes rp-gallery-placeholder-pulse {
    from { background: rgba(94, 207, 138, .08); }
    to { background: rgba(94, 207, 138, .16); }
}

.rp-person-dash .rp-gallery__item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .18);
    max-height: none;
    min-height: 0;
}

.rp-person-dash .rp-gallery__item:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}

.rp-person-dash .rp-gallery__drag {
    position: absolute;
    top: .45rem;
    right: .45rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(15, 23, 42, .72);
    color: rgba(255, 255, 255, .85);
    border: 1px solid rgba(255, 255, 255, .12);
    cursor: grab;
    opacity: 0;
    transition: opacity .15s ease;
}

.rp-person-dash .rp-gallery__wrap:hover .rp-gallery__drag,
.rp-person-dash .rp-gallery__wrap.is-dragging .rp-gallery__drag {
    opacity: 1;
}

.rp-person-dash .rp-gallery__main-mark[hidden] {
    display: none !important;
}

.rp-person-dash .rp-gallery__main-mark {
    position: absolute;
    top: .45rem;
    left: .45rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(94, 207, 138, .95), rgba(52, 168, 110, .92));
    color: #052e16;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    pointer-events: none;
}

.rp-person-dash .rp-gallery__toolbar {
    position: absolute;
    left: .4rem;
    right: .4rem;
    bottom: .4rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .35rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, .78);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .18s ease, transform .18s ease;
}

.rp-person-dash .rp-gallery__wrap:hover .rp-gallery__toolbar,
.rp-person-dash .rp-gallery__wrap:focus-within .rp-gallery__toolbar {
    opacity: 1;
    transform: translateY(0);
}

@media (hover: none) {
    .rp-person-dash .rp-gallery--manage .rp-gallery__toolbar,
    .rp-person-dash .rp-gallery--manage .rp-gallery__drag {
        opacity: 1;
        transform: none;
    }
}

.rp-person-dash .rp-gallery__tool-form {
    display: contents;
}

.rp-person-dash .rp-gallery__tool {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: #f8fafc;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease, border-color .15s ease, color .15s ease;
}

.rp-person-dash .rp-gallery__tool:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .16);
}

.rp-person-dash .rp-gallery__tool--main {
    color: rgba(255, 255, 255, .55);
}

.rp-person-dash .rp-gallery__tool--main.is-active {
    background: rgba(94, 207, 138, .22);
    border-color: rgba(94, 207, 138, .55);
    color: #86efac;
    box-shadow: 0 0 0 1px rgba(94, 207, 138, .25);
}

.rp-person-dash .rp-gallery__tool--danger:hover {
    background: rgba(239, 68, 68, .28);
    border-color: rgba(248, 113, 113, .45);
    color: #fecaca;
}

/* ── Person sidebar ── */

.rp-person-sidebar__card {
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(15, 23, 42, .45);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
}

.rp-person-sidebar__card--muted {
    background: rgba(15, 23, 42, .32);
}

.rp-person-burial-mini-map__head {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .5rem;
    color: #cbd5e1;
}

.rp-person-burial-mini-map__hint {
    margin: 0 0 .65rem;
    font-size: .78rem;
    color: var(--color-muted);
    line-height: 1.45;
}

.rp-person-burial-mini-map__trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 12px;
    background: #0f1720;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
}

.rp-person-burial-mini-map__trigger:hover {
    border-color: rgba(110, 231, 183, .45);
}

.rp-person-burial-mini-map__trigger:focus-visible {
    outline: 2px solid #6ee7b7;
    outline-offset: 2px;
}

.rp-person-burial-mini-map__canvas {
    display: block;
    width: 100%;
    height: 148px;
}

.rp-person-burial-mini-map__canvas .leaflet-control-container {
    display: none;
}

.rp-person-burial-mini-map__expand {
    display: block;
    padding: .45rem .65rem .55rem;
    font-size: .72rem;
    color: #94a3b8;
}

.rp-person-burial-mini-map__rodia-link {
    display: inline-block;
    margin-top: .65rem;
    font-size: .78rem;
    color: #6ee7b7;
    text-decoration: underline;
}

.rp-person-burial-mini-map__rodia-link:hover {
    color: #a7f3d0;
}

.rp-person-burial-map-modal__dialog {
    width: min(920px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}

.rp-person-burial-map-modal__hint {
    margin: 0 0 .75rem;
    font-size: .85rem;
    color: var(--color-muted);
}

.rp-person-burial-map-modal__map {
    flex: 1 1 auto;
    min-height: min(56vh, 420px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .2);
    background: #0f1720;
}

.rp-person-burial-map-modal__map .leaflet-control-attribution {
    display: none !important;
}

.rp-person-burial-map-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.rp-person-sidebar__card-head {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .75rem;
    color: #cbd5e1;
}

.rp-person-sidebar__title {
    margin: 0;
    font-size: .9375rem;
    font-weight: 600;
    font-family: var(--rp-serif);
}

.rp-person-sidebar__text {
    margin: 0 0 .85rem;
    font-size: .8125rem;
    color: var(--color-muted);
    line-height: 1.55;
}

.rp-person-sidebar__btn {
    width: 100%;
    justify-content: center;
}

.rp-person-sidebar__form {
    margin-bottom: .65rem;
}

.rp-person-sidebar__form--secondary {
    margin-top: .75rem;
    margin-bottom: 0;
}

.rp-person-sidebar__configure {
    display: inline-block;
    margin-top: .15rem;
    padding: 0;
    border: 0;
    background: none;
    color: #6ee7b7;
    font-size: .84rem;
    text-decoration: underline;
    cursor: pointer;
}

.rp-person-sidebar__configure:hover {
    color: #a7f3d0;
}

.rp-person-sidebar__meta {
    margin: .75rem 0 0;
    font-size: .75rem;
    color: var(--color-muted);
}

.rp-person-sidebar__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
    margin: 0;
}

.rp-person-sidebar__stats div {
    padding: .65rem .75rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, .5);
    border: 1px solid rgba(148, 163, 184, .12);
}

.rp-person-sidebar__stats dt {
    margin: 0;
    font-size: .68rem;
    color: var(--color-muted);
}

.rp-person-sidebar__stats dd {
    margin: .2rem 0 0;
    font-size: 1.15rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rp-sidebar-tools .card {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(15, 23, 42, .45);
}

/* ── Relatives cards ── */

.rp-relatives__head {
    margin-bottom: 1rem;
}

.rp-relatives--cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .85rem;
}

.rp-relative-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .85rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, .16);
    background: rgba(15, 23, 42, .42);
    transition: border-color .2s ease, transform .2s ease;
}

.rp-relative-card:hover {
    border-color: rgba(129, 140, 248, .35);
    transform: translateY(-1px);
}

.rp-relative-card__avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    flex-shrink: 0;
}

span.rp-relative-card__avatar {
    display: grid;
    place-items: center;
    background: rgba(129, 140, 248, .18);
    color: #c7d2fe;
    font-weight: 600;
}

img.rp-relative-card__avatar {
    display: block;
    object-fit: cover;
    background: rgba(15, 23, 42, .35);
}

.rp-relative-card__name {
    display: block;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

.rp-relative-card__name:hover {
    color: #86efac;
}

.rp-relative-card__role {
    display: block;
    margin-top: .15rem;
    font-size: .8125rem;
    color: var(--color-muted);
}

.rp-relative-card__del {
    border: none;
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    padding: .25rem;
}

.rp-possible-relatives {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, .14);
}

.rp-possible-relatives__title {
    margin: 0 0 .35rem;
    font-size: 1.05rem;
}

.rp-possible-relatives__lead {
    margin: 0 0 1rem;
    font-size: .875rem;
    color: var(--color-muted);
    line-height: 1.45;
}

.rp-possible-relatives__list {
    display: grid;
    gap: .85rem;
}

.rp-possible-relatives__empty {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.rp-possible-relative {
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px dashed rgba(251, 191, 36, .45);
    background: rgba(251, 191, 36, .06);
}

.rp-possible-relative--probable {
    border-style: solid;
    border-color: rgba(134, 239, 172, .35);
    background: rgba(134, 239, 172, .06);
}

.rp-possible-relative__main {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .85rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.rp-possible-relative__avatar {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, .18);
    color: #fde68a;
    font-weight: 600;
}

.rp-possible-relative--probable .rp-possible-relative__avatar {
    background: rgba(134, 239, 172, .18);
    color: #bbf7d0;
}

.rp-possible-relative__avatar--photo {
    object-fit: cover;
}

.rp-possible-relative__name {
    display: block;
    font-weight: 600;
}

.rp-possible-relative__dates,
.rp-possible-relative__role {
    display: block;
    margin-top: .15rem;
    font-size: .8125rem;
    color: var(--color-muted);
}

.rp-possible-relative__role {
    color: #fcd34d;
}

.rp-possible-relative--probable .rp-possible-relative__role {
    color: #86efac;
}

.rp-possible-relative__reasons {
    margin: .75rem 0 0;
    padding-left: 1.1rem;
    font-size: .8125rem;
    color: var(--color-muted);
    line-height: 1.45;
}

.rp-possible-relative__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .85rem;
    align-items: center;
}

.rp-possible-relative__actions form {
    display: contents;
}

/* ── Community hub (person) ── */

.rp-community-hub--person {
    margin-top: 2.75rem;
}

.rp-community-hub__credibility {
    margin-bottom: 1.75rem;
}

.rp-help-project__actions--grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.rp-help-project__actions--grid form {
    display: contents;
}

.rp-community-hub--person .rp-help-project__actions--grid .rp-help-project__action,
.rp-community-hub--person .rp-help-project__actions--grid form button.rp-help-project__action {
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
    border-radius: 999px;
    padding: .45rem .85rem;
    font-size: .8125rem;
    line-height: 1.2;
    white-space: nowrap;
}

.rp-help-project__action--confirmed {
    border-color: rgba(34, 197, 94, .35);
    color: #86efac;
}

.rp-activity-card__summary--emphasis {
    font-size: .9375rem;
    font-weight: 600;
    color: #ecfdf5;
}

/* ── Timeline (audit + changes) ── */

.rp-timeline--audit,
.rp-timeline--changes {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rp-timeline--audit .rp-timeline__item,
.rp-timeline--changes .rp-timeline__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding-bottom: 1.25rem;
    position: relative;
}

.rp-timeline--audit .rp-timeline__item:not(:last-child)::before,
.rp-timeline--changes .rp-timeline__item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: .45rem;
    top: 1.1rem;
    bottom: 0;
    width: 2px;
    background: rgba(148, 163, 184, .2);
}

.rp-timeline__dot {
    width: .95rem;
    height: .95rem;
    margin-top: .2rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, .25);
    border: 2px solid rgba(34, 197, 94, .55);
}

.rp-timeline__content {
    min-width: 0;
}

.rp-timeline__summary {
    margin: .35rem 0 0;
    font-size: .8125rem;
    color: var(--color-muted);
}

.rp-timeline__diff {
    margin-top: .5rem;
    font-size: .8125rem;
    line-height: 1.5;
}

.rp-timeline__old {
    display: block;
    color: #fca5a5;
}

.rp-timeline__new {
    display: block;
    color: #86efac;
    margin-top: .15rem;
}

/* ── Form fields in modals ── */

.rp-form-field {
    margin-bottom: 1rem;
}

.rp-form-field label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: .35rem;
}

.rp-input {
    width: 100%;
    padding: .55rem .65rem;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 8px;
    background: rgba(15, 23, 42, .6);
    color: inherit;
    font: inherit;
}

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

    .rp-help-project__actions--grid {
        grid-template-columns: 1fr;
    }
}

.rp-memorial-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .85rem;
}

.rp-memorial-filter {
    border: 1px solid rgba(148, 163, 184, .28);
    background: rgba(15, 23, 42, .35);
    color: #cbd5e1;
    border-radius: 999px;
    padding: .25rem .65rem;
    font-size: .78rem;
    cursor: pointer;
}

.rp-memorial-filter.is-active {
    border-color: rgba(129, 140, 248, .65);
    background: rgba(79, 70, 229, .18);
    color: #eef2ff;
}

.rp-dialog--memorial {
    max-width: 34rem;
    background: #121a16;
    color: #eef2ef;
    border: 1px solid rgba(42, 61, 50, .65);
}

.rp-dialog--memorial .rp-dialog__close {
    color: #94a3b8;
}

.rp-dialog--memorial .rp-dialog__title {
    color: #f8fafc;
}

.rp-dialog__intro {
    margin: 0 0 1rem;
    color: #94a3b8;
    font-size: .92rem;
    line-height: 1.5;
}

.rp-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: 1rem;
}

.rp-memorial-modal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 22rem;
    overflow: auto;
    display: grid;
    gap: .45rem;
}

.rp-memorial-modal-list__item {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .16);
    background: rgba(15, 23, 42, .28);
}

.rp-memorial-modal-list__item[hidden] {
    display: none !important;
}

.rp-memorial-modal-list__label {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .65rem .75rem;
    cursor: pointer;
}

.rp-memorial-modal-list__label input[type="checkbox"] {
    margin-top: .15rem;
}

.rp-memorial-modal-list__text {
    display: grid;
    gap: .15rem;
}

.rp-memorial-modal-list__name {
    color: #e2e8f0;
    font-size: .92rem;
}

.rp-memorial-modal-list__date {
    color: #94a3b8;
    font-size: .78rem;
}

/* Full-bleed Person shell (etalon: на всю ширину) */
.rp-page--fluid {
    padding-left: 0;
    padding-right: 0;
}

.rp-page--fluid .rp-wrap,
.rp-wrap--fluid {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 1.25rem;
}

@media (min-width: 768px) {
    .rp-page--fluid .rp-wrap,
    .rp-wrap--fluid {
        padding: 0 1.75rem;
    }
}

@media (min-width: 1280px) {
    .rp-page--fluid .rp-wrap,
    .rp-wrap--fluid {
        padding: 0 2rem;
    }
}

/* ── Person dashboard (left nav + panels, SPA) ── */

.rp-person-dash {
    display: grid;
    gap: 1.25rem;
    align-items: start;
}

@media (min-width: 960px) {
    .rp-person-dash {
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 1.5rem 1.75rem;
    }

    .rp-person-nav {
        grid-column: 1;
        grid-row: 1 / -1;
    }

    .rp-person-panels {
        grid-column: 2;
    }
}

.rp-person-nav {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 1rem;
}

.rp-person-nav__card {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .14);
    background: rgba(18, 23, 24, .92);
    padding: 1.15rem 1rem;
}

.rp-person-nav__card--profile {
    display: grid;
    gap: 1rem;
    justify-items: center;
    text-align: center;
}

.rp-person-nav__avatar {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, #1e3a5f, #2563eb);
    color: #e8edf4;
    font-size: 1.6rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, .1);
}

button.rp-person-nav__avatar {
    padding: 0;
    margin: 0;
    font: inherit;
    appearance: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

button.rp-person-nav__avatar:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

button.rp-person-nav__avatar:focus-visible {
    outline: 2px solid rgba(94, 207, 138, .75);
    outline-offset: 2px;
}

.rp-person-nav__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rp-person-nav__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    color: #f1f5f9;
    line-height: 1.3;
}

.rp-person-nav__meta {
    margin: .25rem 0 0;
    font-size: .8125rem;
    color: #94a3b8;
}

.rp-person-nav__menu {
    display: grid;
    gap: .35rem;
    width: 100%;
    text-align: left;
}

.rp-person-nav__btn {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    padding: .7rem .85rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #cbd5e1;
    font: inherit;
    font-size: .9rem;
    cursor: pointer;
    text-align: left;
    transition: background .15s ease, color .15s ease;
}

.rp-person-nav__btn:hover {
    background: rgba(148, 163, 184, .1);
    color: #f8fafc;
}

.rp-person-nav__btn.is-active {
    background: rgba(34, 80, 54, .55);
    color: #86efac;
}

.rp-person-nav__btn.is-active .rp-person-nav__icon {
    color: #86efac;
}

.rp-person-nav__icon {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    color: #94a3b8;
}

.rp-person-nav__card-title {
    margin: 0 0 .85rem;
    font-size: .78rem;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.rp-person-nav__relatives {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .55rem;
}

.rp-person-nav__relative {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .7rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: .35rem;
    border-radius: 10px;
    transition: background .15s ease;
}

.rp-person-nav__relative:hover {
    background: rgba(148, 163, 184, .08);
}

.rp-person-nav__relative-avatar {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 999px;
    flex-shrink: 0;
}

span.rp-person-nav__relative-avatar {
    display: grid;
    place-items: center;
    background: rgba(37, 99, 235, .28);
    color: #bfdbfe;
    font-size: .85rem;
    font-weight: 650;
}

img.rp-person-nav__relative-avatar {
    display: block;
    object-fit: cover;
    background: rgba(15, 23, 42, .35);
}

.rp-person-nav__relative-name {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.25;
}

.rp-person-nav__relative-role {
    display: block;
    margin-top: .1rem;
    font-size: .75rem;
    color: #94a3b8;
}

.rp-person-nav__empty {
    margin: 0;
    font-size: .8125rem;
    color: #94a3b8;
}

.rp-person-nav__link-btn {
    margin-top: .65rem;
    padding: 0;
    border: 0;
    background: none;
    color: #86efac;
    font: inherit;
    font-size: .8125rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rp-person-nav__tree-btn {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    margin-top: .85rem;
    padding: .85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(74, 222, 128, .35);
    background: rgba(34, 80, 54, .12);
    color: #86efac;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.rp-person-nav__tree-btn:hover {
    border-color: rgba(74, 222, 128, .55);
    background: rgba(34, 80, 54, .2);
}

.rp-person-nav__tree-btn-text {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}

.rp-person-nav__tree-btn-title {
    font-size: .8125rem;
    font-weight: 650;
    color: #e2e8f0;
}

.rp-person-nav__tree-btn-sub {
    font-size: .72rem;
    color: #86efac;
}

.rp-person-panels {
    min-width: 0;
}

.rp-person-panel[hidden] {
    display: none !important;
}

.rp-person-panel__head {
    margin-bottom: 1.25rem;
}

.rp-person-panel__title {
    margin: 0;
    font-family: var(--rp-serif);
    font-size: clamp(1.65rem, 2.4vw, 2.1rem);
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -.02em;
}

.rp-person-panel__subtitle {
    margin: .4rem 0 0;
    font-size: .95rem;
    color: #94a3b8;
}

.rp-person-panel__grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 1100px) {
    .rp-person-panel__grid {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 1.5rem;
        align-items: start;
    }
}

.rp-person-panel__main {
    min-width: 0;
}

/* Hero inside panel: not full-bleed */
.rp-person-dash .rp-person-hero-band {
    width: 100%;
    left: auto;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.25rem;
    border-radius: 16px;
    overflow: hidden;
}

.rp-person-hero-band__inner--panel {
    width: 100%;
    padding: 1.1rem 1.15rem 1.25rem;
}

@media (min-width: 1024px) {
    .rp-person-hero-band__inner--panel {
        grid-template-columns: minmax(0, 1fr) 260px;
    }
}

/* ── Family tree — pedigree etalon ── */

.rp-ftree {
    position: relative;
}

.rp-ftree__shell {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, .14);
    background: rgba(8, 12, 14, .55);
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}

.rp-ftree--embedded .rp-ftree__shell {
    border-radius: 16px;
}

.rp-ftree__chrome {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    justify-content: space-between;
    align-items: flex-end;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(148, 163, 184, .12);
    background:
        linear-gradient(180deg, rgba(22, 28, 32, .92) 0%, rgba(12, 16, 18, .78) 100%);
}

.rp-ftree__chrome-main {
    min-width: min(100%, 240px);
}

.rp-ftree__eyebrow {
    margin: 0 0 .2rem;
    font-size: .6875rem;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
}

.rp-ftree__heading {
    display: grid;
    gap: .25rem;
}

.rp-ftree--embedded .rp-ftree__title {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.rp-ftree__chrome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 320px;
}

.rp-ftree__toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
}

.rp-ftree__toolbar-group--view {
    padding: .35rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, .14);
    background: rgba(15, 23, 42, .28);
}

.rp-ftree__canvas {
    display: flex;
    flex-direction: column;
}

.rp-ftree__canvas.is-loading {
    opacity: .55;
    pointer-events: none;
}

.rp-ftree__empty {
    padding: 1.25rem 1.15rem 1.5rem;
}

.rp-ftree__title {
    margin: 0;
    font-family: var(--rp-serif);
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -.01em;
}

.rp-ftree__meta {
    margin: 0;
    font-size: .8125rem;
    color: #94a3b8;
}

.rp-ftree__add {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-color: rgba(34, 197, 94, .35);
    color: #86efac;
    background: rgba(34, 197, 94, .06);
}

.rp-ftree__add:hover {
    border-color: rgba(34, 197, 94, .5);
    background: rgba(34, 197, 94, .12);
    color: #bbf7d0;
}

.rp-ftree__gens {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .75rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .35);
    color: #cbd5e1;
    font-size: .8125rem;
}

.rp-ftree__gens-select {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.rp-ftree__zoom {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    padding: .2rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .35);
}

.rp-ftree__zoom-btn {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #e2e8f0;
    font-size: 1.1rem;
    cursor: pointer;
}

.rp-ftree__zoom-btn:hover {
    background: rgba(148, 163, 184, .12);
}

.rp-ftree__zoom-value {
    min-width: 3rem;
    text-align: center;
    font-size: .8125rem;
    color: #cbd5e1;
}

.rp-ftree__viewport {
    overflow: auto;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(34, 80, 54, .1), transparent 58%),
        linear-gradient(180deg, rgba(14, 18, 20, .92) 0%, rgba(8, 11, 12, .96) 100%);
    padding: 1.15rem 1rem 1.35rem;
    min-height: min(56vh, 520px);
}

.rp-ftree__stage {
    transform-origin: top center;
    transition: transform .15s ease;
    width: min(100%, 920px);
    margin: 0 auto;
    position: relative;
}

.rp-ftree__stage::before {
    content: '';
    position: absolute;
    left: 118px;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(148, 163, 184, .08), rgba(148, 163, 184, .35) 15%, rgba(148, 163, 184, .35) 85%, rgba(148, 163, 184, .08));
    pointer-events: none;
}

.rp-ftree__row {
    display: grid;
    grid-template-columns: minmax(108px, 132px) 24px minmax(0, 1fr);
    gap: .65rem 0;
    align-items: center;
    padding: .85rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, .08);
}

.rp-ftree__row:last-child {
    border-bottom: 0;
}

.rp-ftree__row-gutter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    padding: .15rem 0;
}

.rp-ftree__row-num {
    display: grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: rgba(34, 80, 54, .55);
    color: #86efac;
    font-size: .75rem;
    font-weight: 700;
    box-shadow: 0 0 0 3px rgba(12, 16, 18, .85);
    position: relative;
    z-index: 1;
}

.rp-ftree__row-label {
    font-size: .625rem;
    line-height: 1.3;
    text-align: left;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
    max-width: 8.5rem;
}

.rp-ftree__row-track {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 2.5rem;
}

.rp-ftree__row-node {
    width: .65rem;
    height: .65rem;
    border-radius: 999px;
    background: rgba(134, 239, 172, .85);
    box-shadow: 0 0 0 4px rgba(12, 16, 18, .92);
    position: relative;
    z-index: 1;
}

.rp-ftree__row-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding-left: .35rem;
}

.rp-ftree__couple,
.rp-ftree__band,
.rp-ftree__people {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: .75rem;
    width: 100%;
}

.rp-ftree__couple {
    position: relative;
}

.rp-ftree__heart {
    color: #f87171;
    font-size: .85rem;
    line-height: 1;
}

.rp-ftree__stem {
    width: 2px;
    background: rgba(148, 163, 184, .35);
}

.rp-ftree__stem--down {
    height: 1.75rem;
    margin-top: .5rem;
}

.rp-ftree__stem--short {
    height: 1rem;
}

.rp-ftree__spouse-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    margin-top: .25rem;
}

.rp-ftree__band .rp-ftree-card--center {
    order: 0;
}

.rp-ftree-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .75rem;
    width: min(100%, 280px);
    min-width: min(100%, 220px);
    padding: .7rem .85rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(22, 28, 32, .95);
    color: inherit;
    text-decoration: none;
    text-align: left;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.rp-ftree-card:hover {
    border-color: rgba(134, 239, 172, .35);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

.rp-ftree-card--center {
    border-color: rgba(74, 222, 128, .5);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, .15);
}

.rp-ftree-card--center:hover {
    transform: none;
}

.rp-ftree-card--add,
.rp-ftree-card--placeholder {
    grid-template-columns: auto 1fr;
    border-style: dashed;
    border-color: rgba(148, 163, 184, .28);
    background: transparent;
    color: #94a3b8;
}

.rp-ftree-card--placeholder:hover {
    border-color: rgba(74, 222, 128, .45);
    color: #bbf7d0;
}

.rp-ftree-card__icon--placeholder {
    font-size: 1.25rem;
    font-weight: 700;
    border: 1px dashed rgba(148, 163, 184, .35);
    background: rgba(15, 23, 42, .35);
}

.rp-ftree-card__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: rgba(100, 116, 139, .18);
    color: #94a3b8;
    overflow: hidden;
    flex-shrink: 0;
}

.rp-ftree-card__icon--photo {
    border: 2px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .55);
}

.rp-ftree-card--center .rp-ftree-card__icon--photo {
    border-color: rgba(74, 222, 128, .35);
}

.rp-ftree-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.rp-ftree-card__icon--add {
    font-size: 1.1rem;
    font-weight: 600;
}

.rp-ftree-card__media {
    flex-shrink: 0;
}

.rp-ftree-card__content {
    min-width: 0;
    display: grid;
    gap: .15rem;
}

.rp-ftree-card__name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .08rem;
}

.rp-ftree-card__name--plain {
    font-family: var(--rp-serif);
    font-size: .875rem;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1.2;
}

.rp-ftree-card__surname {
    display: block;
    font-family: var(--rp-serif);
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .015em;
    color: #f8fafc;
    line-height: 1.15;
    word-break: break-word;
}

.rp-ftree-card__given {
    display: block;
    font-size: .72rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.25;
    word-break: break-word;
}

.rp-ftree-card--center .rp-ftree-card__surname {
    color: #ecfdf5;
}

.rp-ftree-card--center .rp-ftree-card__given {
    color: #a7f3d0;
}

.rp-ftree-card__dates {
    display: block;
    margin-top: .15rem;
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .02em;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.rp-ftree-card--center .rp-ftree-card__dates {
    border-top-color: rgba(74, 222, 128, .18);
    color: #86efac;
}

.rp-ftree-card--unverified {
    border-color: rgba(251, 191, 36, .28);
    background: rgba(251, 191, 36, .04);
}

.rp-ftree-card__verify {
    display: inline-flex;
    margin-top: .35rem;
    padding: .12rem .45rem;
    border-radius: 999px;
    font-size: .625rem;
    font-weight: 650;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.rp-ftree-card__verify--pending {
    background: rgba(251, 191, 36, .14);
    border: 1px solid rgba(251, 191, 36, .28);
    color: #fcd34d;
}

.rp-ftree-card__dot {
    position: absolute;
    top: .45rem;
    right: .45rem;
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
}

.rp-ftree-card__dot--bio {
    background: #60a5fa;
}

.rp-ftree-card__doc {
    position: absolute;
    bottom: .4rem;
    right: .4rem;
    color: #94a3b8;
}

.rp-ftree.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1200;
    padding: 1.25rem;
    background: #0a0f0d;
    overflow: auto;
}

.rp-ftree.is-fullscreen .rp-ftree__shell {
    border: 0;
    box-shadow: none;
    min-height: 100%;
}

.rp-ftree.is-fullscreen .rp-ftree__chrome {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #0a0f0d;
    border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.rp-ftree.is-fullscreen .rp-ftree__fullscreen {
    border-color: rgba(248, 113, 113, .35);
    color: #fca5a5;
    background: rgba(248, 113, 113, .08);
}

.rp-ftree.is-fullscreen .rp-ftree__fullscreen:hover {
    border-color: rgba(248, 113, 113, .5);
    background: rgba(248, 113, 113, .14);
    color: #fecaca;
}

body.rp-ftree-fullscreen-open {
    overflow: hidden;
}

.rp-ftree__fullscreen {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.rp-ftree__fullscreen-icon--exit,
.rp-ftree__fullscreen-label--exit {
    display: none;
}

.rp-ftree.is-fullscreen .rp-ftree__fullscreen-icon--enter,
.rp-ftree.is-fullscreen .rp-ftree__fullscreen-label--enter {
    display: none;
}

.rp-ftree.is-fullscreen .rp-ftree__fullscreen-icon--exit,
.rp-ftree.is-fullscreen .rp-ftree__fullscreen-label--exit {
    display: inline-flex;
}

.rp-ftree.is-fullscreen .rp-ftree__viewport {
    min-height: calc(100vh - 8rem);
}

.rp-ftree.is-collapsed [data-ftree-row][data-offset]:not([data-offset="0"]) {
    display: none;
}

.rp-relatives-panel__list {
    margin-top: 1.75rem;
}

.rp-relatives-panel__list-title {
    margin: 0 0 .85rem;
    font-size: 1rem;
    font-weight: 650;
    color: #e2e8f0;
}

@media (max-width: 959px) {
    .rp-person-nav {
        position: static;
    }

    .rp-person-nav__menu {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media print {
    .rp-person-nav,
    .rp-ftree__chrome-actions,
    .site-header,
    .site-footer {
        display: none !important;
    }

    .rp-person-panel[data-person-panel="relatives"] {
        display: block !important;
    }

    .rp-person-panel[hidden] {
        display: none !important;
    }
}

/* ── Chronology (Person timeline v2) ── */

.rp-chronology {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.rp-chronology__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: .25rem;
    border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.rp-chronology__tabs {
    display: flex;
    gap: .25rem;
}

.rp-chronology__tab {
    appearance: none;
    border: none;
    background: transparent;
    padding: .65rem 1rem;
    font: inherit;
    font-size: .9375rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .2s ease, border-color .2s ease;
}

.rp-chronology__tab:hover {
    color: #cbd5e1;
}

.rp-chronology__tab.is-active {
    color: #86efac;
    border-bottom-color: #22c55e;
}

.rp-chronology__add-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
}

.rp-chronology__panel[hidden] {
    display: none !important;
}

/* Timeline with icon nodes + cards */

.rp-chrono-timeline,
.rp-chrono-history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rp-chrono-timeline__item,
.rp-chrono-history__item {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.rp-chrono-timeline__item:not(:last-child)::before,
.rp-chrono-history__item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 1.35rem;
    top: 2.75rem;
    bottom: 0;
    width: 2px;
    background: rgba(148, 163, 184, .18);
    transform: translateX(-50%);
}

.rp-chrono-timeline__node,
.rp-chrono-history__node {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .65);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.rp-chrono-timeline__node .rp-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.rp-chrono-timeline__item--birth .rp-chrono-timeline__node {
    border-color: rgba(34, 197, 94, .45);
    background: rgba(34, 197, 94, .12);
    color: #86efac;
}

.rp-chrono-timeline__item--death .rp-chrono-timeline__node {
    border-color: rgba(148, 163, 184, .35);
    background: rgba(148, 163, 184, .1);
    color: #cbd5e1;
}

.rp-chrono-timeline__item--burial .rp-chrono-timeline__node,
.rp-chrono-timeline__item--reburial .rp-chrono-timeline__node {
    border-color: rgba(167, 139, 250, .4);
    background: rgba(167, 139, 250, .12);
    color: #c4b5fd;
}

.rp-chrono-timeline__item--exhumation .rp-chrono-timeline__node {
    border-color: rgba(251, 146, 60, .4);
    background: rgba(251, 146, 60, .1);
    color: #fdba74;
}

.rp-chrono-timeline__item--created .rp-chrono-timeline__node {
    border-color: rgba(56, 189, 248, .4);
    background: rgba(56, 189, 248, .1);
    color: #7dd3fc;
}

.rp-chrono-history__node {
    border-color: rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .08);
    color: #86efac;
}

/* Event card */

.rp-chrono-card {
    position: relative;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, .14);
    background: rgba(15, 23, 42, .48);
}

.rp-chrono-card--link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.rp-chrono-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .45rem;
    flex-wrap: wrap;
}

.rp-chrono-card__actor {
    font-size: .75rem;
    font-weight: 500;
    color: #64748b;
}

.rp-chrono-card__date {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .01em;
}

.rp-chrono-timeline__item--birth .rp-chrono-card__date { color: #86efac; }
.rp-chrono-timeline__item--death .rp-chrono-card__date { color: #94a3b8; }
.rp-chrono-timeline__item--burial .rp-chrono-card__date,
.rp-chrono-timeline__item--reburial .rp-chrono-card__date { color: #c4b5fd; }
.rp-chrono-timeline__item--exhumation .rp-chrono-card__date { color: #fdba74; }
.rp-chrono-timeline__item--created .rp-chrono-card__date { color: #7dd3fc; }

.rp-chrono-card__date--muted {
    color: #64748b;
    font-weight: 500;
}

.rp-chrono-card__badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.rp-chrono-card__badge--confirmed {
    background: rgba(34, 197, 94, .14);
    border: 1px solid rgba(34, 197, 94, .28);
    color: #86efac;
}

.rp-chrono-card__badge--info {
    background: rgba(56, 189, 248, .12);
    border: 1px solid rgba(56, 189, 248, .25);
    color: #7dd3fc;
}

.rp-chrono-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.35;
}

.rp-chrono-card__desc {
    margin: .35rem 0 0;
    font-size: .875rem;
    line-height: 1.5;
    color: #94a3b8;
}

.rp-chrono-card__meta {
    margin-top: .25rem;
    font-size: .8125rem;
    color: #64748b;
}

.rp-chrono-card--history {
    padding-bottom: .85rem;
}

.rp-chrono-history__expand {
    list-style: none;
    margin: .25rem 0 0 3.75rem;
    padding: 0;
}

/* Add-event placeholder card */

.rp-chrono-add-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: .5rem;
    padding: 1.15rem 1.25rem;
    border-radius: 12px;
    border: 1.5px dashed rgba(148, 163, 184, .28);
    background: transparent;
    color: inherit;
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease;
}

.rp-chrono-add-card:hover {
    border-color: rgba(34, 197, 94, .4);
    background: rgba(34, 197, 94, .04);
}

.rp-chrono-add-card__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .22);
    color: #64748b;
    flex-shrink: 0;
}

.rp-chrono-add-card:hover .rp-chrono-add-card__icon {
    border-color: rgba(34, 197, 94, .35);
    color: #86efac;
}

.rp-chrono-add-card__body {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.rp-chrono-add-card__title {
    font-size: .9375rem;
    font-weight: 600;
    color: #e2e8f0;
}

.rp-chrono-add-card__hint {
    font-size: .8125rem;
    color: #64748b;
    line-height: 1.45;
}

/* Info box */

.rp-chronology__info {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, .12);
    background: rgba(15, 23, 42, .35);
}

.rp-chronology__info-icon {
    width: 1.125rem;
    height: 1.125rem;
    color: #64748b;
    flex-shrink: 0;
    margin-top: .1rem;
}

.rp-chronology__info p {
    margin: 0;
    font-size: .8125rem;
    line-height: 1.55;
    color: #94a3b8;
}

@media (max-width: 640px) {
    .rp-chronology__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .rp-chronology__add-btn {
        justify-content: center;
    }

    .rp-chrono-timeline__item,
    .rp-chrono-history__item {
        grid-template-columns: 2.25rem minmax(0, 1fr);
        gap: .75rem;
    }

    .rp-chrono-timeline__node,
    .rp-chrono-history__node {
        width: 2.25rem;
        height: 2.25rem;
    }

    .rp-chrono-timeline__item:not(:last-child)::before,
    .rp-chrono-history__item:not(:last-child)::before {
        left: 1.125rem;
        top: 2.25rem;
    }
}

.rp-settlement-picker__wrap {
    position: relative;
}

.rp-settlement-picker__input {
    width: 100%;
}

.rp-settlement-picker__hint {
    margin: .45rem 0 0;
    font-size: .8125rem;
    color: #94a3b8;
}

.rp-settlement-picker__list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + .35rem);
    margin: 0;
    padding: .35rem 0;
    list-style: none;
    max-height: 16rem;
    overflow: auto;
    border-radius: .75rem;
    border: 1px solid rgba(255, 255, 255, .1);
    background: #111827;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}

.rp-settlement-picker__item {
    display: block;
    width: 100%;
    padding: .55rem .75rem;
    border: 0;
    background: transparent;
    color: #e2e8f0;
    text-align: left;
    cursor: pointer;
}

.rp-settlement-picker__item:hover,
.rp-settlement-picker__item:focus-visible {
    background: rgba(94, 207, 138, .12);
    outline: none;
}

.rp-settlement-picker__label {
    display: block;
    font-weight: 600;
}

.rp-settlement-picker__sub {
    display: block;
    margin-top: .15rem;
    font-size: .8125rem;
    color: #94a3b8;
}

.rp-settlement-picker__empty {
    padding: .65rem .75rem;
    color: #94a3b8;
    font-size: .875rem;
}

/* ── Person page — mobile-native (2026) ── */
@media (max-width: 768px) {
    body.person-public-page {
        overflow-x: hidden;
    }

    .person-public-page .rp-page--fluid {
        padding-bottom: calc(var(--mob-tab-h, 56px) + var(--sc-fab, 56px) + 2rem);
    }

    .person-public-page .rp-page--fluid .rp-wrap,
    .person-public-page .rp-wrap--fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .rp-person-dash {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px;
    }

    /* Compact sticky section nav — hide desktop sidebar chrome */
    .rp-person-nav {
        position: sticky;
        top: 56px;
        z-index: 45;
        margin: 0 -16px 8px;
        padding: 12px 16px;
        background: rgba(10, 15, 13, 0.94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(42, 61, 50, 0.55);
        gap: 0;
    }

    /* Menu lives inside profile card — hide chrome only, not the card */
    .rp-person-nav__card--profile {
        display: block !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .rp-person-nav__card--profile .rp-person-nav__avatar,
    .rp-person-nav__card--profile .rp-person-nav__identity {
        display: none !important;
    }

    .rp-person-nav__card--relatives,
    details.mob-accordion.rp-person-nav__card--relatives,
    .rp-person-nav__tree-btn {
        display: none !important;
    }

    .rp-person-nav__menu {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
        width: 100%;
    }

    .rp-person-nav__btn {
        min-height: 48px;
        padding: 10px 12px;
        border-radius: 14px;
        border: 1px solid rgba(42, 61, 50, 0.55);
        background: rgba(18, 26, 22, 0.92);
        justify-content: flex-start;
        font-size: 0.8125rem;
        line-height: 1.25;
        gap: 8px;
    }

    .rp-person-nav__btn.is-active {
        border-color: rgba(94, 207, 138, 0.45);
        background: rgba(34, 80, 54, 0.45);
    }

    .rp-person-nav__icon {
        width: 1rem;
        height: 1rem;
    }

    /* Hero — no horizontal bleed on mobile */
    .rp-person-hero-band,
    .rp-person-dash .rp-person-hero-band {
        width: 100% !important;
        max-width: 100%;
        left: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 12px;
        border-radius: 20px;
    }

    .rp-person-hero-band::before {
        background-position: center 22%;
    }

    .rp-person-hero-band__shade {
        background:
            linear-gradient(180deg, rgba(10, 15, 13, .12) 0%, rgba(10, 15, 13, .72) 62%, rgba(10, 15, 13, .96) 100%);
    }

    .rp-person-panel[data-person-panel="about"] > .rp-person-panel__head {
        display: none;
    }

    .rp-person-hero-band__inner,
    .rp-person-hero-band__inner--panel {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 14px;
        padding: 18px 16px 16px !important;
    }

    .rp-person-hero-band__aside {
        width: 100%;
        order: 3;
    }

    .rp-person-hero-band__main {
        order: 1;
    }

    .rp-person-hero__badge {
        display: none;
    }

    .rp-person-hero__profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .rp-person-hero__avatar,
    .rp-person-hero__avatar--photo {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }

    .rp-person-hero__tools {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .rp-person-hero__body {
        width: 100%;
    }

    .rp-person-hero__title {
        font-size: clamp(1.625rem, 7vw, 2rem) !important;
        line-height: 1.12;
        word-break: break-word;
        margin-bottom: 0.35rem;
    }

    .rp-person-hero__dates {
        justify-content: center;
        margin-bottom: 0.35rem;
        font-size: 0.9375rem;
        line-height: 1.45;
    }

    /* Строка «25.02.1940 — 16.09.2005» уже достаточна — дубли убираем */
    .rp-person-hero__events {
        display: none;
    }

    .rp-person-hero__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 10px;
        margin-top: 0.25rem;
    }

    .rp-person-hero__actions .btn--primary {
        grid-column: 1 / -1;
    }

    .rp-person-hero__actions .btn,
    .rp-person-hero__actions .btn--primary,
    .rp-person-hero__actions .btn--outline,
    .rp-person-hero__actions .btn--ghost {
        width: 100% !important;
        max-width: none !important;
        min-height: 48px;
        justify-content: center;
        border-radius: 14px;
        margin: 0;
    }

    .rp-person-memorial-card {
        padding: 16px;
        border-radius: 16px;
        background: rgba(15, 23, 42, 0.88);
    }

    .rp-person-memorial-card__text {
        font-size: 0.9375rem;
        line-height: 1.55;
    }

    .rp-person-memorial-card__actions {
        gap: 10px;
    }

    .rp-person-memorial-card__cta,
    .rp-person-memorial-card__settings {
        width: 100%;
        text-align: center;
    }

    body.person-public-page .support-chat {
        bottom: calc(var(--mob-tab-h, 56px) + 72px);
    }

    .rp-person-hero__tool {
        width: 44px;
        height: 44px;
    }

    /* Panel content */
    .rp-person-panel__head {
        margin-bottom: 16px;
    }

    .rp-person-panel__title {
        font-size: clamp(1.5rem, 6vw, 1.75rem);
    }

    .rp-person-panel__grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px;
    }

    .rp-person-panel__main {
        order: 1;
    }

    .rp-person-sidebar {
        order: 2;
        width: 100%;
    }

    .rp-person-sidebar__card,
    .rp-sidebar-tools .card {
        border-radius: 18px;
        padding: 16px;
        margin-bottom: 12px;
    }

    .rp-person-sidebar__btn {
        width: 100%;
        min-height: 48px;
    }

    .rp-person-about__grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .rp-person-about {
        border-radius: 18px;
        padding: 16px;
    }

    .rp-section,
    .rp-empty-state,
    .rp-participation {
        border-radius: 18px;
    }

    .rp-relatives--cards {
        grid-template-columns: 1fr !important;
    }

    .rp-relative-card {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
        padding: 16px;
        border-radius: 16px;
        align-items: center;
    }

    .rp-relative-card__del {
        min-width: 44px;
        min-height: 44px;
    }

    /* Family tree — contain scroll inside card */
    .rp-ftree__chrome {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .rp-ftree__chrome-actions {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
        align-items: stretch;
    }

    .rp-ftree__toolbar-group {
        width: 100%;
        justify-content: stretch;
    }

    .rp-ftree__toolbar-group--view {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .rp-ftree__chrome-actions .btn {
        min-height: 44px;
    }

    .rp-ftree__print-label {
        display: none;
    }

    .rp-ftree__stage::before {
        left: 86px;
    }

    .rp-ftree__viewport {
        max-width: 100%;
        max-height: min(62dvh, 520px);
        border-radius: 16px;
        -webkit-overflow-scrolling: touch;
    }

    .rp-ftree__stage {
        min-width: 0;
        padding: 12px 8px 16px;
    }

    .rp-ftree-card {
        min-width: 0;
        width: min(100%, 260px);
        max-width: 100%;
        padding: 0.75rem 0.85rem;
        border-radius: 14px;
    }

    .rp-ftree-card__name {
        font-size: 0.9375rem;
        line-height: 1.3;
    }

    .rp-ftree-card__dates {
        font-size: 0.8125rem;
    }

    .rp-ftree__row {
        grid-template-columns: minmax(72px, 88px) 16px minmax(0, 1fr);
        gap: 0.35rem 0;
    }

    .rp-ftree__row-label {
        font-size: 0.625rem;
        letter-spacing: 0.05em;
        max-width: 5.5rem;
    }

    .rp-ftree__row-track {
        min-height: 1.75rem;
    }

    .rp-ftree__people {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Супруги — всегда в одну линию, как на десктопе (не стопкой). */
    .rp-ftree__couple {
        flex-wrap: nowrap;
        justify-content: center;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        gap: 0.35rem;
    }

    .rp-ftree__couple .rp-ftree-card {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        max-width: none;
        padding: 0.55rem 0.45rem;
        gap: 0.45rem;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .rp-ftree__couple .rp-ftree-card__icon {
        width: 2.25rem;
        height: 2.25rem;
    }

    .rp-ftree__couple .rp-ftree-card__surname {
        font-size: 0.8125rem;
    }

    .rp-ftree__couple .rp-ftree-card__given {
        font-size: 0.6875rem;
    }

    .rp-ftree__couple .rp-ftree-card__dates {
        font-size: 0.6875rem;
        margin-top: 0.25rem;
        padding-top: 0.25rem;
    }

    .rp-ftree__couple .rp-ftree__heart {
        flex-shrink: 0;
        align-self: center;
        font-size: 0.75rem;
    }

    .rp-help-project__actions--grid {
        grid-template-columns: 1fr !important;
    }

    .rp-help-project__action,
    .rp-help-project__actions--grid form button {
        min-height: 48px;
        width: 100%;
    }

    .rp-community-hub--person {
        border-radius: 18px;
        padding: 16px;
    }

    .person-public-page .rp-proposal-modal__dialog {
        width: calc(100vw - 1.25rem);
        max-height: calc(100dvh - 1.25rem);
        border-radius: 16px;
    }

    .person-public-page .rp-proposal-modal__header,
    .person-public-page .rp-proposal-form {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .person-public-page .rp-proposal-modal__footer {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .person-public-page .rp-proposal-edit__input,
    .person-public-page .rp-proposal-edit__textarea,
    .person-public-page .rp-proposal-settlement__input {
        font-size: 16px;
    }
}

/* Share dialog — QR + ceramic print */
.rp-dialog--share {
    width: min(920px, calc(100vw - 2rem));
    max-width: min(920px, calc(100vw - 2rem));
    max-height: min(94vh, 960px);
}

.rp-share-dialog__top {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.rp-share-dialog__top .rp-share-dialog__qr {
    flex: 0 0 auto;
}

.rp-share-dialog__top .rp-share-dialog__actions {
    flex: 1 1 14rem;
    min-width: 0;
}

.rp-share-dialog__ceramic-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rp-share-dialog__ceramic-side {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.rp-share-dialog__lead {
    margin: 0 0 1.25rem;
    color: var(--rp-text-muted, #5c5c5c);
    font-size: 0.95rem;
    line-height: 1.45;
}

/* Ceramic plate — Tolmanov-style: крупный портрет 68%, текст + QR внизу (~22%) */
.rp-ceramic-plate-host {
    width: 100%;
    max-width: 360px;
    transform: translateZ(0);
    will-change: transform;
}

.rp-ceramic-plate {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 360px;
    aspect-ratio: var(--rp-plate-aspect, 9 / 12);
    box-sizing: border-box;
    container-type: inline-size; /* cqw = ширина плиты (крупная типографика, как на макете) */
    padding: 0 !important;
    margin: 0;
    border: none;
    color: #000000;
    background-color: var(--rp-plate-rim-color, #ffffff);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateZ(0);
    backface-visibility: hidden;
}

.rp-ceramic-plate--oval {
    --rp-plate-text-top: calc(var(--rp-plate-photo-height-ratio, 0.68) * 100% + var(--rp-plate-text-top-extra, 0.75%));
    overflow: visible;
    background: transparent;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.rp-ceramic-plate__vector {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: none;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: translateZ(0);
    shape-rendering: geometricPrecision;
}

.rp-ceramic-plate--oval .rp-ceramic-plate__vector--oval,
.rp-ceramic-plate--rect .rp-ceramic-plate__vector--rect {
    display: block;
}

.rp-ceramic-plate__vector--rect .rp-ceramic-plate__svg-outer-stroke,
.rp-ceramic-plate__vector--rect .rp-ceramic-plate__svg-glaze,
.rp-ceramic-plate__vector--rect .rp-ceramic-plate__svg-inner-stroke {
    fill: none;
}

.rp-ceramic-plate__svg-rim {
    fill: var(--rp-plate-rim-color, #ffffff);
}

.rp-ceramic-plate__svg-face {
    fill: var(--rp-plate-face-color, #ffffff);
}

.rp-ceramic-plate__svg-outer-stroke {
    fill: none;
    stroke: var(--rp-plate-outer-stroke, #2e2c2a);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rp-ceramic-plate__svg-glaze {
    fill: none;
    stroke: var(--rp-plate-rim-glaze-color, #f3f1ee);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rp-ceramic-plate__svg-inner-stroke {
    fill: none;
    stroke: rgba(0, 0, 0, 0.07);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rp-ceramic-plate--rect {
    --rp-plate-text-top: calc(var(--rp-plate-photo-height-ratio, 0.68) * 100% + var(--rp-plate-text-top-extra, 0.75%));
    overflow: visible;
    background: transparent;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.rp-ceramic-plate__face {
    position: absolute;
    inset: calc(var(--rp-plate-frame-ratio, 0.032) * 100cqw);
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    padding-bottom: calc(var(--rp-plate-qr-bottom-ratio, 0.02) * 100%);
    background: var(--rp-plate-face-color, #ffffff);
    box-shadow:
        inset 0 0 0 1px var(--rp-plate-rim-glaze-color, #f3f1ee),
        inset 0 0 0 2px rgba(0, 0, 0, 0.07);
}

.rp-ceramic-plate--oval .rp-ceramic-plate__face {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    clip-path: ellipse(50% 50% at 50% 50%);
    transform: translateZ(0);
    backface-visibility: hidden;
}

.rp-ceramic-plate--rect .rp-ceramic-plate__face {
    background: transparent;
    box-shadow: none;
    border-radius: 4px;
    clip-path: inset(0 round 4px);
    transform: translateZ(0);
    backface-visibility: hidden;
}

.rp-ceramic-plate--rect .rp-ceramic-plate__hole {
    display: none;
}

.rp-ceramic-plate__photo {
    position: relative;
    flex: 0 0 calc(var(--rp-plate-photo-height-ratio, 0.68) * 100%);
    width: 100% !important;
    min-height: 0;
    z-index: 1;
    padding: 0 !important;
    margin: 0;
    border: none;
    overflow: hidden;
}

.rp-ceramic-plate__photo-img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    image-rendering: auto;
    max-width: none !important;
    max-height: none !important;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center top;
    padding: 0;
    margin: 0;
    border: none;
}

.rp-ceramic-plate__photo-img--fallback {
    background: linear-gradient(180deg, #d8d2c8 0%, #b8b0a4 100%);
}

.rp-ceramic-plate__hole {
    position: absolute;
    top: calc(var(--rp-plate-hole-y-ratio, 0.36) * 100%);
    z-index: 14;
    width: calc(var(--rp-plate-hole-width-ratio, 0.025) * 100%);
    aspect-ratio: 1 / 1;
    background: #000000;
    border-radius: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.rp-ceramic-plate__hole--left {
    left: calc(var(--rp-plate-hole-inset-ratio, 0.015) * 100%);
}

.rp-ceramic-plate__hole--right {
    right: calc(var(--rp-plate-hole-inset-ratio, 0.015) * 100%);
}

.rp-ceramic-plate__text {
    position: relative;
    flex: 0 0 auto;
    z-index: 5;
    align-self: center;
    width: calc(var(--rp-plate-text-width-ratio, 0.88) * 100%);
    max-width: calc(var(--rp-plate-text-width-ratio, 0.88) * 100%);
    margin: var(--rp-plate-text-top-extra, 0.75%) 0 0;
    text-align: center;
    padding: 0 0 0.06em;
    overflow: visible;
}

.rp-ceramic-plate__flex-gap {
    flex: 1 1 0;
    min-height: calc(var(--rp-plate-text-qr-gap-ratio, 0.045) * 100%);
    width: 100%;
}

.rp-ceramic-plate__text h2,
.rp-ceramic-plate__text h3,
.rp-ceramic-plate__text p {
    margin: 0;
    padding: 0;
}

.rp-ceramic-plate__surname,
.rp-ceramic-plate__given,
.rp-ceramic-plate__dates {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow-x: clip;
    overflow-y: visible;
    text-overflow: ellipsis;
    text-align: center;
    text-transform: uppercase;
    font-family: Georgia, "Times New Roman", Times, serif;
    color: #000000;
    line-height: var(--rp-plate-line-height, 1.14);
}

.rp-ceramic-plate__surname {
    font-size: calc(var(--rp-plate-surname-cqw, 11) * 1cqw);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.rp-ceramic-plate__given {
    font-size: calc(var(--rp-plate-given-cqw, 5.2) * 1cqw);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 0.26em;
}

.rp-ceramic-plate__dates {
    font-size: calc(var(--rp-plate-dates-cqw, 4.4) * 1cqw);
    font-weight: 600;
    letter-spacing: 0;
    margin-top: 0.32em;
    padding-bottom: 0.08em;
}

.rp-ceramic-plate__qr {
    position: relative;
    flex: 0 0 auto;
    align-self: center;
    z-index: 6;
    width: calc(var(--rp-plate-qr-width-ratio, 0.16) * 100%);
    aspect-ratio: 1 / 1;
    padding: 0;
    margin: 0;
}

.rp-ceramic-plate__qr-img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    padding: 0;
    margin: 0;
    border: none;
}

.rp-share-dialog__preview-wrap {
    margin: 0;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.04);
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.rp-share-dialog__preview-wrap .rp-ceramic-plate-host {
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.rp-share-dialog__qr {
    margin: 0;
    text-align: center;
}

.rp-share-dialog__qr img {
    display: block;
    width: 220px;
    height: 220px;
    border-radius: 12px;
    border: 1px solid var(--rp-border, #e8e4de);
    background: #fff;
}

.rp-share-dialog__qr figcaption {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--rp-text-muted, #5c5c5c);
}

.rp-share-dialog__qr-download {
    display: inline-flex;
    margin-top: 0.65rem;
}

.rp-share-dialog__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.rp-share-dialog__copy {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.rp-share-dialog__copy .rp-input {
    flex: 1 1 12rem;
    min-width: 0;
    font-size: 0.85rem;
}

.rp-share-dialog__ceramic {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rp-border, #e8e4de);
}

.rp-share-dialog__format {
    width: 100%;
    font-size: 0.88rem;
}

.rp-share-dialog__format-hint {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--color-text-muted, rgba(232, 237, 242, 0.72));
}

.rp-share-dialog__ceramic-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.rp-share-dialog__preview-note {
    margin: 0;
    font-size: 0.78rem;
    color: var(--rp-text-muted, #5c5c5c);
}

.rp-share-dialog__subtitle {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.rp-share-dialog__hint {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--rp-text-muted, #5c5c5c);
}

@media (max-width: 720px) {
    .rp-share-dialog__top {
        flex-direction: column;
        align-items: center;
    }

    .rp-share-dialog__top .rp-share-dialog__actions {
        width: 100%;
    }
}

/* Living person: public/css/person-living.css */
