.akf-memorial {
    --memorial-ink: #13263b;
    --memorial-muted: #597086;
    --memorial-line: rgba(18, 77, 112, .16);
    --memorial-surface: rgba(255, 255, 255, .88);
    --memorial-accent: #b18a3e;
    position: relative;
    isolation: isolate;
    width: min(1180px, calc(100% - 32px));
    margin: clamp(24px, 4vw, 54px) auto;
    color: var(--memorial-ink);
}
.akf-memorial::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -20px -5vw auto auto;
    width: clamp(220px, 34vw, 440px);
    aspect-ratio: 1.63;
    background: var(--akf-memorial-flower) center / contain no-repeat;
    opacity: .075;
    pointer-events: none;
    filter: saturate(.78);
}
.akf-memorial__hero {
    position: relative;
    max-width: 920px;
    margin-bottom: clamp(24px, 4vw, 44px);
    padding: clamp(22px, 3.5vw, 38px) clamp(20px, 4vw, 44px);
    overflow: hidden;
    border: 1px solid var(--memorial-line);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(237,246,252,.82));
    box-shadow: 0 18px 55px rgba(20, 59, 91, .09);
}
.akf-memorial__hero::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(#09a9d4, var(--memorial-accent), #00a85a);
}
.akf-memorial__eyebrow,
.akf-memorial-father > header span {
    display: block;
    margin-bottom: 9px;
    color: #35708f;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.akf-memorial__hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 3.35rem);
    line-height: 1.06;
    letter-spacing: -.035em;
}
.akf-memorial__hero p {
    max-width: 800px;
    margin: 18px 0 0;
    color: var(--memorial-muted);
    font-size: clamp(.98rem, 1.4vw, 1.12rem);
    line-height: 1.75;
}
.akf-memorial__line { display: block; width: min(180px, 40%); height: 2px; margin-top: 22px; background: linear-gradient(90deg, var(--memorial-accent), transparent); }
.akf-memorial-filters { display: grid; gap: 12px; margin-bottom: clamp(18px, 3vw, 28px); padding: 14px; border: 1px solid var(--memorial-line); border-radius: 16px; background: var(--memorial-surface); box-shadow: 0 12px 30px rgba(19, 59, 89, .06); }
.akf-memorial-filters form { display: flex; align-items: center; gap: 9px; min-width: 0; }
.akf-memorial-filters form label { position: relative; flex: 1 1 340px; min-width: 0; }
.akf-memorial-filters form label > svg { position: absolute; top: 50%; left: 12px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--memorial-muted); stroke: currentColor; pointer-events: none; }
.akf-memorial-filters input[type="search"] { width: 100%; min-width: 0; min-height: 42px; box-sizing: border-box; padding: 9px 12px 9px 39px; border: 1px solid var(--memorial-line); border-radius: 11px; color: var(--memorial-ink); font: inherit; background: color-mix(in srgb, var(--memorial-surface) 96%, #d8edf8); }
.akf-memorial-filters button,
.akf-memorial-filters form > a { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 9px 14px; border: 1px solid #1c6c93; border-radius: 11px; color: #fff; font: inherit; font-weight: 800; text-decoration: none; background: #1c6c93; cursor: pointer; white-space: nowrap; }
.akf-memorial-filters form > a { border-color: var(--memorial-line); color: var(--memorial-ink); background: transparent; }
.akf-memorial-filter-count { margin: 0; color: var(--memorial-muted); font-size: .78rem; font-weight: 700; }
.akf-memorial__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.akf-memorial-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--memorial-line);
    border-radius: 19px;
    background: var(--memorial-surface);
    box-shadow: 0 16px 38px rgba(19, 59, 89, .09);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.akf-memorial-card:hover { transform: translateY(-3px); border-color: rgba(177,138,62,.5); box-shadow: 0 22px 45px rgba(19,59,89,.14); }
.akf-memorial-card__photo { display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: #dce9f0; }
.akf-memorial-card__photo img,
.akf-memorial-profile__photo img,
.akf-memorial-father__portrait img { width: 100%; height: 100%; display: block; object-fit: cover; }
.akf-memorial-photo-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: #59768a; background: linear-gradient(145deg, #edf5f9, #dbe9f1); }
.akf-memorial-photo-fallback svg { width: 34%; height: 34%; stroke: currentColor; }
.akf-memorial-card__body { padding: 19px; }
.akf-memorial-card h2 { margin: 0 0 14px; font-size: clamp(1.05rem, 2vw, 1.28rem); line-height: 1.25; overflow-wrap: anywhere; }
.akf-memorial-card dl,
.akf-memorial-profile__identity dl { display: grid; gap: 9px; margin: 0; }
.akf-memorial-card dl > div,
.akf-memorial-profile__identity dl > div { display: grid; grid-template-columns: minmax(80px, .75fr) minmax(0, 1.25fr); gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--memorial-line); }
.akf-memorial dt { color: var(--memorial-muted); font-size: .78rem; }
.akf-memorial dd { min-width: 0; margin: 0; font-size: .84rem; font-weight: 700; overflow-wrap: anywhere; }
.akf-memorial dd a { color: #195b7c; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.akf-memorial-button,
.akf-memorial-back { display: inline-flex; align-items: center; gap: 8px; color: #195b7c; font-weight: 800; text-decoration: none; }
.akf-memorial-button { margin-top: 17px; }
.akf-memorial-button svg,
.akf-memorial-back svg { width: 18px; height: 18px; stroke: currentColor; }
.akf-memorial-button svg { transform: rotate(180deg); }
.akf-memorial__empty { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 12px; padding: 32px; text-align: center; color: var(--memorial-muted); border: 1px dashed var(--memorial-line); border-radius: 20px; background: var(--memorial-surface); }
.akf-memorial__empty svg { width: 36px; height: 36px; stroke: currentColor; }
.akf-memorial-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 30px; }
.akf-memorial-pagination a { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--memorial-line); border-radius: 10px; color: var(--memorial-ink); text-decoration: none; background: var(--memorial-surface); }
.akf-memorial-pagination a.is-active { border-color: #1c6c93; color: #fff; background: #1c6c93; }

.akf-memorial-profile { width: 100%; max-width: none; }
.akf-memorial-profile::before { display: none; }
.akf-memorial-profile > .akf-memorial-back,
.akf-memorial-profile > .akf-memorial-preview-note { width: min(1040px, calc(100% - 32px)); margin-inline: auto; }
.akf-memorial-back { margin-bottom: 22px; }
.akf-memorial-profile__hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(210px, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 58px); align-items: center; padding-block: clamp(28px, 5vw, 58px); padding-inline: max(20px, calc((100% - 1040px) / 2)); overflow: hidden; border-block: 1px solid var(--memorial-line); background: linear-gradient(130deg, rgba(249,253,255,.97), rgba(225,241,249,.88)); box-shadow: 0 18px 55px rgba(20,59,91,.09); }
.akf-memorial-profile__hero::before,
.akf-memorial-profile__hero::after { content: none; }
.akf-memorial-profile__photo { aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--memorial-line); border-radius: 17px; background: #dce9f0; box-shadow: 0 14px 34px rgba(19,59,89,.14); }
.akf-memorial-profile__identity { min-width: 0; }
.akf-memorial-profile__identity h1 { margin: 0; font-size: clamp(1.8rem, 4.5vw, 3.5rem); line-height: 1.04; overflow-wrap: anywhere; }
.akf-memorial-profile__role { margin: 9px 0 20px; color: var(--memorial-accent); font-size: .82rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.akf-memorial-profile__identity dl { max-width: 600px; }
.akf-memorial-profile__identity dl > div { padding: 10px 0; }
.akf-memorial-profile__identity dt,
.akf-memorial-profile__identity dd { font-size: .95rem; }
.akf-memorial-father { position: relative; isolation: isolate; width: min(1040px, calc(100% - 32px)); box-sizing: border-box; margin: clamp(24px, 4vw, 44px) auto 0; padding: clamp(23px, 4vw, 44px); overflow: hidden; border: 1px solid rgba(177,138,62,.27); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(247,242,230,.74)); }
.akf-memorial-father::before { content: ""; position: absolute; z-index: -2; inset: 0; background: var(--akf-memorial-flower) center / cover no-repeat; opacity: .58; filter: saturate(1.06) contrast(1.03); pointer-events: none; }
.akf-memorial-father::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.94), rgba(250,247,238,.82) 58%, rgba(247,242,230,.62)); pointer-events: none; }
.akf-memorial-father > * { position: relative; z-index: 1; }
.akf-memorial-father > header h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2.25rem); }
.akf-memorial-father__layout { display: grid; grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: clamp(22px, 4vw, 42px); margin-top: 26px; align-items: start; }
.akf-memorial-father__portrait { aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid rgba(177,138,62,.35); border-radius: 15px; background: #e7e8e4; }
.akf-memorial-father__portrait.is-circle { aspect-ratio: 1; border-radius: 50%; }
.akf-memorial-father__copy { min-width: 0; }
.akf-memorial-father__copy h3 { margin: 0 0 16px; font-size: clamp(1.25rem, 2.5vw, 1.8rem); overflow-wrap: anywhere; }
.akf-memorial-father__bio { color: var(--memorial-muted); font-size: .99rem; line-height: 1.8; overflow-wrap: anywhere; white-space: normal; }
.akf-memorial-preview-note { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; padding: 11px 14px; border: 1px solid rgba(177,138,62,.35); border-radius: 12px; color: #725916; background: rgba(255,247,221,.9); }
.akf-memorial-preview-note svg { width: 18px; height: 18px; stroke: currentColor; }

html[data-theme="dark"] .akf-memorial,
body[data-theme="dark"] .akf-memorial,
html.public-original .akf-memorial,
html[data-theme="public-original"] .akf-memorial,
body[data-theme="public-original"] .akf-memorial {
    --memorial-ink: #f3f7fb;
    --memorial-muted: #b5c5d5;
    --memorial-line: rgba(151, 197, 226, .18);
    --memorial-surface: rgba(8, 24, 39, .88);
}
html[data-theme="dark"] .akf-memorial__hero,
body[data-theme="dark"] .akf-memorial__hero,
html.public-original .akf-memorial__hero,
html[data-theme="public-original"] .akf-memorial__hero,
body[data-theme="public-original"] .akf-memorial__hero { background: linear-gradient(135deg, rgba(7,23,39,.96), rgba(14,47,69,.86)); }
html[data-theme="dark"] .akf-memorial-profile__hero,
body[data-theme="dark"] .akf-memorial-profile__hero,
html.public-original .akf-memorial-profile__hero,
html[data-theme="public-original"] .akf-memorial-profile__hero,
body[data-theme="public-original"] .akf-memorial-profile__hero { background: linear-gradient(125deg, rgba(5,20,34,.98), rgba(11,45,65,.94)); }
html[data-theme="dark"] .akf-memorial-father,
body[data-theme="dark"] .akf-memorial-father,
html.public-original .akf-memorial-father,
html[data-theme="public-original"] .akf-memorial-father,
body[data-theme="public-original"] .akf-memorial-father { background: linear-gradient(145deg, rgba(8,24,39,.96), rgba(43,38,28,.84)); }
html[data-theme="dark"] .akf-memorial-father::after,
body[data-theme="dark"] .akf-memorial-father::after,
html.public-original .akf-memorial-father::after,
html[data-theme="public-original"] .akf-memorial-father::after,
body[data-theme="public-original"] .akf-memorial-father::after { background: linear-gradient(90deg, rgba(5,20,34,.95), rgba(10,30,42,.83) 58%, rgba(34,32,25,.66)); }
html[data-theme="dark"] .akf-memorial__eyebrow,
body[data-theme="dark"] .akf-memorial__eyebrow,
html.public-original .akf-memorial__eyebrow,
html[data-theme="public-original"] .akf-memorial__eyebrow,
body[data-theme="public-original"] .akf-memorial__eyebrow,
html[data-theme="dark"] .akf-memorial-father > header span,
body[data-theme="dark"] .akf-memorial-father > header span,
html.public-original .akf-memorial-father > header span,
html[data-theme="public-original"] .akf-memorial-father > header span,
body[data-theme="public-original"] .akf-memorial-father > header span { color: #84c7e8; }
html[data-theme="dark"] .akf-memorial dd a,
body[data-theme="dark"] .akf-memorial dd a,
html.public-original .akf-memorial dd a,
html[data-theme="public-original"] .akf-memorial dd a,
body[data-theme="public-original"] .akf-memorial dd a { color: #8ed8fa; }
html[data-theme="dark"] .akf-memorial-button,
html[data-theme="dark"] .akf-memorial-back,
html.public-original .akf-memorial-button,
html.public-original .akf-memorial-back,
html[data-theme="public-original"] .akf-memorial-button,
html[data-theme="public-original"] .akf-memorial-back { color: #8ed8fa; }

@media (max-width: 900px) { .akf-memorial__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) {
    .akf-memorial { width: min(100% - 20px, 1180px); margin-block: 18px 30px; }
    .akf-memorial-profile { width: 100%; }
    .akf-memorial::before { width: 230px; opacity: .055; }
    .akf-memorial__hero { padding: 22px 18px; border-radius: 17px; }
    .akf-memorial-filters { margin-inline: 0; padding: 10px; border-radius: 13px; }
    .akf-memorial-filters form { flex-wrap: wrap; }
    .akf-memorial-filters form label { flex-basis: 100%; }
    .akf-memorial-filters button,
    .akf-memorial-filters form > a { flex: 1 1 calc(50% - 5px); min-width: 0; white-space: normal; }
    .akf-memorial__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .akf-memorial-card { display: block; padding-top: 14px; border-radius: 15px; }
    .akf-memorial-card__photo { width: 132px; margin-inline: auto; aspect-ratio: 3 / 4; border-radius: 12px; }
    .akf-memorial-card__body { min-width: 0; padding: 14px; }
    .akf-memorial-card h2 { text-align: center; }
    .akf-memorial-card h2 { margin-bottom: 10px; }
    .akf-memorial-card dl { gap: 5px; }
    .akf-memorial-card dl > div { grid-template-columns: 1fr; gap: 1px; padding-bottom: 5px; }
    .akf-memorial-button { margin-top: 10px; font-size: .83rem; }
    .akf-memorial-profile > .akf-memorial-back,
    .akf-memorial-profile > .akf-memorial-preview-note,
    .akf-memorial-father { width: calc(100% - 20px); }
    .akf-memorial-profile__hero { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px 16px; align-items: start; }
    .akf-memorial-father::before { background-position: 49% center; opacity: .5; }
    .akf-memorial-profile__photo { width: min(56vw, 200px); margin-inline: auto; border-radius: 12px; }
    .akf-memorial-profile__identity { width: min(100%, 520px); margin-inline: auto; }
    .akf-memorial-profile__identity h1 { font-size: clamp(1.55rem, 8vw, 2.15rem); text-align: center; }
    .akf-memorial-profile__identity .akf-memorial__eyebrow,
    .akf-memorial-profile__role { text-align: center; }
    .akf-memorial-profile__identity dl > div { grid-template-columns: 1fr; gap: 2px; padding: 5px 0; }
    .akf-memorial-profile__identity dt, .akf-memorial-profile__identity dd { font-size: .79rem; }
    .akf-memorial-father { padding: 20px 17px; border-radius: 18px; }
    .akf-memorial-father > header { text-align: center; }
    .akf-memorial-father__layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .akf-memorial-father__portrait { width: min(54vw, 190px); margin-inline: auto; }
    .akf-memorial-father__copy { width: min(100%, 78ch); margin-inline: auto; }
    .akf-memorial-father__copy h3 { text-align: center; }
    .akf-memorial-father__bio { font-size: .9rem; line-height: 1.7; }
}
@media (max-width: 390px) {
    .akf-memorial-card__body { padding: 12px; }
    .akf-memorial-profile__hero { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { .akf-memorial-card { transition: none; } }
