/*
 * The family's own pages: "Mano memorialai" (dashboard) and the memorial
 * editor. Same calm look as the memorial page (memorial_page.css): the
 * Klasikinė palette in the site's light theme, Tamsi in its dark theme
 * (html[data-theme="dark"], set by layouts/base.html).
 *
 * Everything is scoped under .ac because Bootstrap 4 and Tailwind 2 are
 * loaded on the same pages.
 */

.ac {
    --ac-bg: #f4efe6;
    --ac-surface: #fffdf9;
    --ac-soft: #ece4d6;
    --ac-tint: #faf6ef;
    --ac-cover: #ddd2c1;
    --ac-line: #e2d9cb;
    --ac-ink: #2b2622;
    --ac-muted: #665d53;
    --ac-accent: #7a5a32;
    --ac-accent-text: #7a5a32;
    --ac-accent-ink: #ffffff;
    --ac-warn-bg: #fbeee0;
    --ac-warn-ink: #8a4b12;
    --ac-ok-bg: #e4efe3;
    --ac-ok-ink: #2f5a34;
    --ac-danger: #a3352a;
    --ac-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
    --ac-sans: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    --ac-radius: 16px;

    background: var(--ac-bg);
    color: var(--ac-ink);
    font-family: var(--ac-sans);
    font-size: 16px;
    line-height: 1.55;
    padding-bottom: 64px;
}

html[data-theme="dark"] .ac {
    --ac-bg: #1c2027;
    --ac-surface: #242932;
    --ac-soft: #2b3039;
    --ac-tint: #20252d;
    --ac-cover: #313742;
    --ac-line: #363c47;
    --ac-ink: #ece6dd;
    --ac-muted: #aaa298;
    --ac-accent: #d9b77e;
    --ac-accent-text: #e2c693;
    --ac-accent-ink: #1c2027;
    --ac-warn-bg: #3a2f22;
    --ac-warn-ink: #f0c48f;
    --ac-ok-bg: #233226;
    --ac-ok-ink: #a9d3ad;
    --ac-danger: #f08a7e;
}

.ac *,
.ac *::before,
.ac *::after {
    box-sizing: border-box;
}

.ac a {
    color: inherit;
    text-decoration: none;
}

.ac a:hover {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ac h1,
.ac h2,
.ac h3,
.ac h4 {
    font-family: var(--ac-serif) !important;
    font-weight: 600;
    color: var(--ac-ink);
    letter-spacing: -0.005em;
    margin: 0;
}

.ac p {
    margin: 0;
}

.ac [hidden] {
    display: none !important;
}

.ac :focus-visible {
    outline: 2px solid var(--ac-accent);
    outline-offset: 2px;
}

.ac .ac-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}

.ac .ac-eyebrow {
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ac-muted);
}

.ac .ac-muted {
    color: var(--ac-muted);
}

.ac .ac-small {
    font-size: 14px;
}

.ac .ac-link {
    font-weight: 600;
    color: var(--ac-accent-text) !important;
}

/* --- Buttons ------------------------------------------------------------ */

.ac .ac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid var(--ac-line);
    background: var(--ac-surface);
    color: var(--ac-ink) !important;
    font: 600 15px var(--ac-sans);
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none !important;
    transition: filter 0.15s ease;
}

.ac .ac-btn:hover {
    filter: brightness(0.97);
}

.ac .ac-btn--primary {
    border-color: transparent;
    background: var(--ac-accent);
    color: var(--ac-accent-ink) !important;
}

.ac .ac-btn--primary:hover {
    filter: brightness(1.08);
}

.ac .ac-btn--ghost {
    border-color: transparent;
    background: transparent;
    color: var(--ac-muted) !important;
}

.ac .ac-btn--lg {
    min-height: 48px;
    padding: 0 24px;
    font-size: 16px;
}

.ac .ac-btn--sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
}

.ac .ac-btn--icon {
    width: 44px;
    padding: 0;
}

.ac .ac-btn[disabled] {
    opacity: 0.6;
    cursor: default;
    filter: none;
}

.ac .ac-danger-link {
    border: none;
    background: none;
    padding: 0;
    color: var(--ac-danger) !important;
    font: 15px var(--ac-sans);
    cursor: pointer;
}

/* --- Cards, chips ------------------------------------------------------- */

.ac .ac-card {
    background: var(--ac-surface);
    border: 1px solid var(--ac-line);
    border-radius: var(--ac-radius);
    padding: 24px 28px;
}

.ac .ac-card--soft {
    background: var(--ac-soft);
    border-color: transparent;
}

.ac .ac-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.ac .ac-card__title {
    font-size: 26px !important;
    line-height: 1.2;
}

.ac .ac-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--ac-soft);
    color: var(--ac-muted);
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
}

.ac .ac-chip--warn {
    background: var(--ac-warn-bg);
    color: var(--ac-warn-ink);
}

.ac .ac-chip--ok {
    background: var(--ac-ok-bg);
    color: var(--ac-ok-ink);
}

.ac .ac-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--ac-line);
}

.ac .ac-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--ac-accent);
    color: var(--ac-accent-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

/* --- Form fields -------------------------------------------------------- */

.ac .ac-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ac .ac-field > label,
.ac .ac-label {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ac-ink);
}

.ac .ac-input,
.ac .ac-field input[type="text"],
.ac .ac-field input[type="number"],
.ac .ac-field input[type="email"],
.ac .ac-field select,
.ac .ac-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--ac-line);
    border-radius: 10px;
    background: var(--ac-bg);
    color: var(--ac-ink);
    font: 16px var(--ac-sans);
}

.ac .ac-hint {
    font-size: 13px;
    color: var(--ac-muted);
}

/* An on/off switch drawn on a real checkbox. */
.ac .ac-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--ac-line);
    margin: 0;
    cursor: pointer;
}

.ac .ac-switch-row__title {
    display: block;
    font-weight: 600;
}

.ac .ac-switch-row__desc {
    display: block;
    font-size: 14px;
    color: var(--ac-muted);
}

.ac .ac-switch {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    position: relative;
    width: 52px;
    height: 30px;
    margin: 0;
    border-radius: 999px;
    background: var(--ac-line);
    cursor: pointer;
    transition: background 0.15s ease;
}

.ac .ac-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.ac .ac-switch:checked {
    background: var(--ac-accent);
}

.ac .ac-switch:checked::after {
    transform: translateX(22px);
}

/* --- Narrow screens ----------------------------------------------------- */

@media (max-width: 640px) {
    .ac .ac-wrap {
        padding: 0 16px;
    }

    .ac .ac-card {
        padding: 20px;
    }

    .ac .ac-card__title {
        font-size: 23px !important;
    }
}

/* === Mano memorialai (home/dashboard.html) ============================== */

.ac .ac-dash__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 44px 0 28px;
}

.ac .ac-dash__title {
    margin-top: 6px;
    font-size: clamp(38px, 5vw, 50px);
    line-height: 1.05;
}

.ac .ac-todo {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px;
}

.ac .ac-todo__title {
    font-family: var(--ac-sans) !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ac-muted);
}

.ac .ac-todo__row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--ac-surface);
}

.ac .ac-todo__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ac-soft);
    color: var(--ac-accent-text);
}

.ac .ac-todo__text {
    flex-grow: 1;
}

.ac .ac-dash__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
    margin-top: 36px;
}

.ac .ac-dash__main,
.ac .ac-dash__side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ac .ac-dash__section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.ac .ac-dash__h2 {
    font-size: 32px;
}

/* Memorial card */
.ac .ac-mem {
    background: var(--ac-surface);
    border: 1px solid var(--ac-line);
    border-radius: var(--ac-radius);
}

.ac .ac-mem__cover {
    height: 120px;
    border-radius: var(--ac-radius) var(--ac-radius) 0 0;
    background-color: var(--ac-cover);
    background-size: cover;
    background-position: center;
}

.ac .ac-mem__id {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 22px;
    margin-top: -44px;
    padding: 0 28px 22px;
}

.ac .ac-mem__portrait {
    flex-shrink: 0;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    border: 5px solid var(--ac-surface);
    background: var(--ac-soft);
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ac-serif);
    font-size: 36px;
    color: var(--ac-muted);
}

/* The portrait overlaps the cover; the name starts just below the cover's
   edge so long or two-line names never run into the photo. */
.ac .ac-mem__name {
    flex: 1 1 0;
    min-width: 0;
    align-self: flex-start;
    margin-top: 56px;
    overflow-wrap: anywhere;
}

.ac .ac-mem__name h3 {
    font-size: 30px;
    line-height: 1.1;
}

.ac .ac-mem__chips {
    display: flex;
    flex-wrap: wrap;
    flex-basis: 100%;
    gap: 8px;
}

.ac .ac-mem__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--ac-line);
}

.ac .ac-mem__stats > div {
    display: flex;
    flex-direction: column-reverse;
    padding: 14px 28px;
    border-right: 1px solid var(--ac-line);
}

.ac .ac-mem__stats > div:last-child {
    border-right: none;
}

.ac .ac-mem__stats dt {
    font-size: 14px;
    font-weight: 400;
    color: var(--ac-muted);
}

.ac .ac-mem__stats dd {
    margin: 0;
    font-family: var(--ac-serif);
    /* The serif defaults to old-style figures, where 0 and 1 read as O and I */
    font-variant-numeric: lining-nums tabular-nums;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
}

.ac .ac-mem__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-top: 1px solid var(--ac-line);
    background: var(--ac-tint);
    border-radius: 0 0 var(--ac-radius) var(--ac-radius);
}

.ac .ac-mem__spacer {
    flex-grow: 1;
}

/* "…" menu */
.ac .ac-menu {
    position: relative;
}

.ac .ac-menu > summary {
    list-style: none;
}

.ac .ac-menu > summary::-webkit-details-marker {
    display: none;
}

.ac .ac-menu__list {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 20;
    min-width: 230px;
    padding: 6px;
    border: 1px solid var(--ac-line);
    border-radius: 12px;
    background: var(--ac-surface);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.ac .ac-menu__list a,
.ac .ac-menu__list button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: none;
    text-align: left;
    font: 15px var(--ac-sans);
    color: var(--ac-ink);
    cursor: pointer;
}

.ac .ac-menu__list a:hover,
.ac .ac-menu__list button:hover {
    background: var(--ac-soft);
    text-decoration: none;
}

.ac .ac-menu__list .ac-menu__danger {
    color: var(--ac-danger);
}

.ac .ac-menu__list form {
    margin: 0;
}

.ac .ac-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 32px;
}

.ac .ac-empty h3 {
    font-size: 28px;
}

/* Pending tributes */
.ac .ac-pending {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--ac-line);
}

.ac .ac-pending__text {
    margin-top: 4px !important;
    white-space: pre-line;
}

.ac .ac-pending__img {
    display: block;
    max-width: 200px;
    margin-top: 10px;
    border-radius: 10px;
}

.ac .ac-pending__actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.ac .ac-pending__actions form {
    margin: 0;
}

.ac .ac-account-nav {
    display: flex;
    flex-direction: column;
    margin-top: 12px;
}

.ac .ac-account-nav a {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--ac-line);
}

.ac .ac-account-nav a span {
    color: var(--ac-muted);
}

@media (max-width: 960px) {
    .ac .ac-dash__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .ac .ac-dash__head {
        padding: 28px 0 20px;
    }

    .ac .ac-dash__head .ac-btn {
        width: 100%;
    }

    .ac .ac-todo__row {
        flex-wrap: wrap;
    }

    .ac .ac-todo__text {
        flex-basis: calc(100% - 50px);
    }

    .ac .ac-mem__id {
        padding: 0 20px 18px;
        margin-top: -40px;
    }

    .ac .ac-mem__portrait {
        width: 88px;
        height: 88px;
    }

    .ac .ac-mem__name {
        margin-top: 52px;
    }

    .ac .ac-mem__name h3 {
        font-size: 26px;
    }

    .ac .ac-mem__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ac .ac-mem__stats > div {
        padding: 12px 20px;
        border-bottom: 1px solid var(--ac-line);
    }

    .ac .ac-mem__stats > div:nth-child(2n) {
        border-right: none;
    }

    /* One row on phones: the three buttons share the width, "…" keeps its size */
    .ac .ac-mem__actions {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 14px 16px;
    }

    .ac .ac-mem__actions > .ac-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 10px;
        font-size: 14px;
    }

    .ac .ac-mem__spacer {
        display: none;
    }

    .ac .ac-pending {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* === Memorial editor (memorial/edit_memorial.html) ======================
 * The editor's widgets (uploads, rich text, timeline, AI helper) keep their
 * own markup and scripts; these rules give them the account look and turn
 * the old tabs into one page with a section menu.
 */

.ac.ac-edit {
    padding-bottom: 80px;
}

.ac .ac-edit__bar {
    position: sticky;
    top: 80px; /* below the site's fixed menu bar (layouts/base.html) */
    z-index: 30;
    background: var(--ac-surface);
    border-bottom: 1px solid var(--ac-line);
}

.ac .ac-edit__bar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.ac .ac-edit__back {
    flex-shrink: 0;
    font-size: 15px;
    color: var(--ac-muted) !important;
}

.ac .ac-edit__title {
    flex-grow: 1;
    min-width: 0;
}

.ac .ac-edit__title .page-title {
    font-size: 28px !important;
    line-height: 1.15;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ac-ink) !important;
}

.ac .ac-edit__layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    padding-top: 32px;
}

.ac .ac-edit__nav {
    position: sticky;
    top: 184px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ac .ac-edit__nav .tab-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    border: none !important;
    background: transparent;
    color: var(--ac-muted) !important;
    font-size: 15px;
    text-decoration: none !important;
}

.ac .ac-edit__nav .tab-link:hover {
    background: var(--ac-tint);
    color: var(--ac-ink) !important;
}

.ac .ac-edit__nav .tab-link.active {
    background: var(--ac-soft);
    color: var(--ac-ink) !important;
    font-weight: 600;
}

.ac .ac-edit__main,
.ac .ac-edit__main > form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* Every section shows; it is no longer a tab. */
.ac .ac-edit__main .tab-content {
    display: block !important;
    scroll-margin-top: 190px;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    animation: none !important;
}

.ac .ac-edit__main .card {
    background: var(--ac-surface) !important;
    border: 1px solid var(--ac-line) !important;
    border-radius: var(--ac-radius) !important;
    box-shadow: none !important;
    padding: 28px !important;
    color: var(--ac-ink);
}

.ac .ac-edit__h2 {
    font-size: 28px !important;
    margin: 0 0 18px !important;
}

.ac .ac-edit__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ac .ac-edit__head .ac-edit__h2 {
    margin: 0 !important;
}

.ac .ac-edit__main .section-title {
    font-family: var(--ac-sans) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--ac-ink) !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: none !important;
}

.ac .ac-edit__main .section-title::after,
.ac .ac-edit__main .section-title::before {
    display: none !important;
}

/* Fields */
.ac .ac-edit__main .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    margin-bottom: 18px;
}

.ac .ac-edit__main .form-group {
    margin: 0 0 18px;
}

.ac .ac-edit__main .form-grid .form-group {
    margin: 0;
}

.ac .ac-edit__main .form-label,
.ac .ac-edit__main .form-group > label {
    display: block;
    margin: 0 0 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--ac-ink) !important;
}

.ac .ac-edit__main .form-control,
.ac .ac-edit__main .media-title-input,
.ac .ac-edit__main .media-caption-input {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px !important;
    border: 1px solid var(--ac-line) !important;
    border-radius: 10px !important;
    background: var(--ac-bg) !important;
    color: var(--ac-ink) !important;
    font: 16px var(--ac-sans) !important;
    box-shadow: none !important;
}

.ac .ac-edit__main .form-control:focus,
.ac .ac-edit__main .media-title-input:focus,
.ac .ac-edit__main .media-caption-input:focus {
    outline: 2px solid var(--ac-accent);
    outline-offset: 0;
}

/* Buttons from the old markup */
.ac .ac-edit__main .btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px !important;
    border-radius: 999px !important;
    border: 1px solid var(--ac-line) !important;
    background: var(--ac-surface) !important;
    color: var(--ac-ink) !important;
    font: 600 15px var(--ac-sans) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

.ac .ac-edit__main .btn-custom.btn-success,
.ac .ac-edit__main #save-improved-bio,
.ac .ac-edit__main .timeline-form > .btn-custom,
.ac .ac-edit__main .upload-form-container > .btn-custom {
    border-color: transparent !important;
    background: var(--ac-accent) !important;
    color: var(--ac-accent-ink) !important;
}

.ac .ac-edit__main .btn-icon,
.ac .ac-edit__main .delete-tribute-btn,
.ac .ac-edit__main .delete-event-btn {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    border: 1px solid var(--ac-line) !important;
    background: var(--ac-surface) !important;
    color: var(--ac-muted) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ac .ac-edit__main .delete-media:hover,
.ac .ac-edit__main .delete-tribute-btn:hover,
.ac .ac-edit__main .delete-event-btn:hover {
    color: var(--ac-danger) !important;
}

/* Portrait and cover side by side, then the gallery */
.ac .ac-edit__pics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.ac .ac-edit__pics > .mb-8 {
    margin: 0 !important;
}

.ac .ac-edit__main .file-input-wrapper {
    border: 1px dashed var(--ac-line) !important;
    border-radius: 14px !important;
    background: var(--ac-tint) !important;
    padding: 20px !important;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.ac .ac-edit__main .file-input-wrapper:hover,
.ac .ac-edit__main .file-input-wrapper.drag-over {
    border-color: var(--ac-accent) !important;
}

.ac .ac-edit__main .upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.ac .ac-edit__main .upload-icon {
    font-size: 30px !important;
    color: var(--ac-muted) !important;
}

.ac .ac-edit__main .upload-text h4 {
    font-family: var(--ac-sans) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 0 2px !important;
}

.ac .ac-edit__main .upload-text p,
.ac .ac-edit__main .upload-hint {
    display: block;
    margin: 0;
    font-size: 13px !important;
    color: var(--ac-muted) !important;
}

.ac .ac-edit__main .preview-image {
    max-height: 180px !important;
    border-radius: 12px !important;
    margin: 0 auto !important;
}

.ac .ac-edit__main .upload-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.ac .ac-edit__main .upload-buttons.hidden,
.ac .ac-edit__main .selection-feedback.hidden {
    display: none !important;
}

.ac .ac-edit__main .media-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.ac .ac-edit__main .media-item-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--ac-line) !important;
    border-radius: 14px !important;
    background: var(--ac-tint) !important;
    box-shadow: none !important;
}

.ac .ac-edit__main .media-preview-col {
    width: 140px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ac-soft);
}

.ac .ac-edit__main .media-preview-image,
.ac .ac-edit__main .media-preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ac .ac-edit__main .media-info-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ac .ac-edit__main .media-meta {
    display: flex;
    gap: 14px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--ac-muted);
}

.ac .ac-edit__main .media-actions {
    display: flex;
    gap: 8px;
}

/* Timeline */
.ac .ac-edit__main .timeline-form {
    padding: 18px;
    border-radius: 14px;
    background: var(--ac-tint);
    margin-bottom: 18px;
    border: none !important;
}

.ac .ac-edit__main .timeline-form-grid {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 14px;
}

.ac .ac-edit__main .timeline-form-grid .form-group {
    margin: 0 0 14px;
}

.ac .ac-edit__main .timeline-events {
    display: flex;
    flex-direction: column;
}

.ac .ac-edit__main .timeline-event {
    padding: 14px 0 !important;
    margin: 0 !important;
    border: none !important;
    border-top: 1px solid var(--ac-line) !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

.ac .ac-edit__main .timeline-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ac .ac-edit__main .timeline-event-date {
    font-family: var(--ac-serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--ac-accent-text) !important;
    background: none !important;
    padding: 0 !important;
}

.ac .ac-edit__main .timeline-event-text {
    margin: 2px 0 0 !important;
    color: var(--ac-ink) !important;
}

/* Tributes */
.ac .ac-edit__main .tribute-list {
    display: flex;
    flex-direction: column;
}

.ac .ac-edit__main .tribute-card {
    padding: 16px 0 !important;
    margin: 0 !important;
    border: none !important;
    border-top: 1px solid var(--ac-line) !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.ac .ac-edit__main .tribute-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ac .ac-edit__main .tribute-name {
    display: inline;
    font-family: var(--ac-sans) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 8px 0 0 !important;
}

.ac .ac-edit__main .tribute-date {
    font-size: 14px;
    color: var(--ac-muted);
    margin-right: 8px;
}

.ac .ac-edit__main .tribute-content {
    margin-top: 6px;
    white-space: pre-line;
    color: var(--ac-ink);
}

.ac .ac-edit__main .tribute-image img {
    max-width: 240px;
    margin-top: 10px;
}

.ac .ac-edit__tribute-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Theme cards */
.ac .ac-edit__main .template-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
}

.ac .ac-edit__main .template-card {
    display: block;
    border: 1px solid var(--ac-line) !important;
    border-radius: 14px !important;
    overflow: hidden;
    background: var(--ac-surface) !important;
    box-shadow: none !important;
    cursor: pointer;
    transform: none !important;
}

.ac .ac-edit__main .template-option input[type="radio"]:checked + .template-card {
    border: 2px solid var(--ac-accent) !important;
    box-shadow: none !important;
}

.ac .ac-edit__main .template-option input[type="radio"]:focus-visible + .template-card {
    outline: 2px solid var(--ac-accent);
    outline-offset: 2px;
}

.ac .ac-edit__main .template-preview {
    height: 110px !important;
    border-radius: 0 !important;
}

.ac .ac-edit__main .template-info {
    padding: 12px 14px !important;
    background: var(--ac-surface) !important;
    border-top: 1px solid var(--ac-line) !important;
}

.ac .ac-edit__main .template-info h3 {
    font-family: var(--ac-sans) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 0 2px !important;
    color: var(--ac-ink) !important;
}

.ac .ac-edit__main .template-info p {
    font-size: 13px !important;
    color: var(--ac-muted) !important;
}

.ac .ac-edit__danger {
    padding-top: 16px;
    border-top: 1px solid var(--ac-line);
}

@media (max-width: 960px) {
    .ac .ac-edit__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding-top: 16px;
    }

    .ac .ac-edit__nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .ac .ac-edit__nav .tab-link {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .ac .ac-edit__bar-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .ac .ac-edit__title {
        order: -1;
        flex-basis: 100%;
    }

    .ac .ac-edit__title .page-title {
        font-size: 24px !important;
    }

    .ac .ac-edit__back {
        display: none;
    }

    .ac .ac-edit__bar-inner .ac-btn {
        flex: 1 1 0;
    }

    .ac .ac-edit__main .card {
        padding: 20px !important;
    }

    .ac .ac-edit__pics,
    .ac .ac-edit__main .form-grid,
    .ac .ac-edit__main .timeline-form-grid,
    .ac .ac-edit__main .template-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .ac .ac-edit__main .media-item-row {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .ac .ac-edit__main .media-preview-col {
        width: 96px;
        height: 96px;
    }

    .ac .ac-edit__main .tribute-header {
        flex-direction: column;
    }
}

/* Editor polish: widgets whose own sheets fight the layout */
.ac .ac-edit__main .tribute-header {
    flex-direction: row !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.ac .ac-edit__main .tribute-header > div:first-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
}

.ac .ac-edit__main .tribute-header > div:first-child > * {
    margin: 0 !important;
}

.ac .ac-edit__tribute-actions {
    flex-direction: row !important;
}

.ac .ac-edit__main .tribute-content {
    margin: 6px 0 0 !important;
    padding: 0 !important;
    border: none !important;
}

.ac .ac-edit__main .timeline-event-header {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.ac .ac-edit__main .timeline-event-text {
    padding: 0 !important;
}

.ac .ac-edit__main .custom-editor-container,
.ac .ac-edit__main .custom-editor {
    border: 1px solid var(--ac-line) !important;
    border-radius: 12px !important;
    background: var(--ac-surface) !important;
    overflow: hidden;
    box-shadow: none !important;
}

.ac .ac-edit__main .custom-editor .custom-editor,
.ac .ac-edit__main .custom-editor-container .custom-editor {
    border: none !important;
    border-radius: 0 !important;
}

.ac .ac-edit__main .custom-editor-toolbar,
.ac .ac-edit__main .editor-toolbar,
.ac .ac-edit__main .custom-editor-status {
    background: var(--ac-tint) !important;
    border-color: var(--ac-line) !important;
    color: var(--ac-muted) !important;
}

.ac .ac-edit__main .custom-editor-btn {
    background: var(--ac-surface) !important;
    border-color: var(--ac-line) !important;
    color: var(--ac-ink) !important;
}

.ac .ac-edit__main .custom-editor-content,
.ac .ac-edit__main .editor-content {
    background: var(--ac-surface) !important;
    color: var(--ac-ink) !important;
    font: 16px/1.6 var(--ac-sans) !important;
    min-height: 220px;
}

.ac .ac-switch-row .ac-switch-row__title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--ac-ink) !important;
}

.ac .ac-switch-row .ac-switch-row__desc {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--ac-muted) !important;
}

.ac .ac-edit__main .tribute-header,
.ac .ac-edit__main .tribute-header > div:first-child,
.ac .ac-edit__main .tribute-content {
    text-align: left !important;
}

.ac .ac-edit__main .tribute-header > div:first-child > * {
    padding: 0 !important;
}

@media (max-width: 640px) {
    .ac .ac-edit__title .ac-small {
        display: none;
    }
}

/* === Grave page (home/view_grave.html) ================================= */

.ac .ac-grave__cover {
    height: 260px;
    margin-top: 32px;
    border-radius: 20px;
    background-color: var(--ac-cover);
    background-size: cover;
    background-position: center;
}

.ac .ac-grave__head {
    text-align: center;
    padding: 32px 0 8px;
}

.ac .ac-grave__title {
    margin-top: 8px !important;
    font-size: clamp(36px, 5vw, 54px) !important;
    line-height: 1.1;
}

.ac .ac-grave__place {
    margin-top: 8px !important;
    font-size: 18px;
    color: var(--ac-muted);
}

.ac .ac-grave__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.ac .ac-grave__section {
    margin-top: 44px;
}

.ac .ac-grave__h2 {
    font-size: 32px !important;
    margin-bottom: 18px !important;
    text-align: center;
}

.ac .ac-grave__people {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.ac .ac-person {
    flex: 0 1 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 28px 24px 22px;
    border: 1px solid var(--ac-line);
    border-radius: var(--ac-radius);
    background: var(--ac-surface);
    text-align: center;
    text-decoration: none !important;
    transition: border-color 0.15s ease;
}

.ac .ac-person:hover {
    border-color: var(--ac-accent);
}

.ac .ac-person__portrait {
    width: 132px;
    height: 132px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: var(--ac-soft);
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ac-serif);
    font-size: 44px;
    color: var(--ac-muted);
}

.ac .ac-person__name {
    font-family: var(--ac-serif);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.15;
}

.ac .ac-person__candles {
    font-size: 14px;
    color: var(--ac-muted);
}

.ac .ac-person__open {
    margin-top: 10px;
    font-weight: 600;
    color: var(--ac-accent-text);
}

.ac .ac-grave__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 44px;
}

.ac .ac-grave__details {
    margin: 0;
}

.ac .ac-grave__details > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--ac-line);
}

.ac .ac-grave__details dt {
    font-weight: 400;
    color: var(--ac-muted);
}

.ac .ac-grave__details dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.ac .ac-grave__notes {
    padding-top: 12px !important;
    border-top: 1px solid var(--ac-line);
    white-space: pre-line;
}

.ac .ac-grave__map-card {
    padding: 0;
    overflow: hidden;
    min-height: 300px;
}

.ac .ac-grave__map {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.ac .ac-grave__photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.ac .ac-grave__photo img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
}

@media (max-width: 640px) {
    .ac .ac-grave__cover {
        height: 180px;
        margin-top: 16px;
    }

    .ac .ac-grave__actions .ac-btn {
        flex: 1 1 100%;
    }

    .ac .ac-person {
        flex-basis: 100%;
    }
}

/* === QR code page (home/user_qr_dashboard.html) ========================= */

.ac .ac-qr__grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.ac .ac-qr__img {
    padding: 18px;
    border-radius: 12px;
    background: #ffffff;
}

.ac .ac-qr__img img {
    display: block;
    width: 100%;
    height: auto;
}

.ac .ac-qr__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.ac .ac-qr__periods {
    display: flex;
    gap: 6px;
}

.ac .ac-qr__period {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--ac-line);
    font-size: 14px;
    text-decoration: none !important;
}

.ac .ac-qr__period.is-active {
    border-color: transparent;
    background: var(--ac-ink);
    color: var(--ac-bg) !important;
    font-weight: 600;
}

.ac .ac-qr__numbers {
    display: flex;
    gap: 40px;
}

.ac .ac-qr__big {
    font-family: var(--ac-serif);
    font-size: 44px;
    font-weight: 600;
    line-height: 1;
}

.ac .ac-qr__chart {
    margin: 24px 0 0;
}

.ac .ac-qr__bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 160px;
    padding-bottom: 1px;
    border-bottom: 1px solid var(--ac-line);
}

.ac .ac-qr__bar {
    position: relative;
    flex: 1 1 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    cursor: default;
}

.ac .ac-qr__bar span {
    display: block;
    width: 100%;
    min-height: 0;
    border-radius: 4px 4px 0 0;
    background: var(--ac-accent);
}

.ac .ac-qr__bar:hover span,
.ac .ac-qr__bar:focus span {
    filter: brightness(1.15);
}

.ac .ac-qr__bar:hover::after,
.ac .ac-qr__bar:focus::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--ac-ink);
    color: var(--ac-bg);
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
}

.ac .ac-qr__axis {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

@media (max-width: 860px) {
    .ac .ac-qr__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* === Photo and video library (media/dashboard.html) ===================== */

.ac .ac-lib__drop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px 16px;
    border: 1px dashed var(--ac-line);
    border-radius: 14px;
    background: var(--ac-tint);
    color: var(--ac-muted);
    font-size: 15px;
    text-align: center;
}

.ac .ac-lib__drop.is-over {
    border-color: var(--ac-accent);
    color: var(--ac-ink);
}

.ac .ac-lib__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 20px;
}

.ac .ac-lib__chip {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--ac-line);
    background: var(--ac-surface);
    color: var(--ac-ink);
    font: 600 14px var(--ac-sans);
    cursor: pointer;
}

.ac .ac-lib__chip span {
    font-weight: 400;
    opacity: 0.75;
}

.ac .ac-lib__chip.is-active {
    border-color: transparent;
    background: var(--ac-ink);
    color: var(--ac-bg);
}

.ac .ac-lib__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.ac .ac-lib__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    border: none;
    background: none;
    text-align: left;
    color: var(--ac-ink);
    font: 15px var(--ac-sans);
    cursor: pointer;
}

.ac .ac-lib__item[hidden] {
    display: none !important;
}

.ac .ac-lib__thumb {
    position: relative;
    display: block;
    aspect-ratio: 1;
    margin-bottom: 8px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--ac-soft);
}

.ac .ac-lib__thumb.is-broken::after {
    content: 'Nuotrauka neįkelta';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--ac-muted);
}

.ac .ac-lib__thumb img,
.ac .ac-lib__thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.ac .ac-lib__item:hover .ac-lib__thumb img,
.ac .ac-lib__item:hover .ac-lib__thumb video {
    transform: scale(1.03);
}

.ac .ac-lib__item:focus-visible .ac-lib__thumb {
    outline: 2px solid var(--ac-accent);
    outline-offset: 2px;
}

.ac .ac-lib__play {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(28, 32, 39, 0.78);
    color: #ffffff;
    font-size: 13px;
}

.ac .ac-lib__caption {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ac .ac-lib__caption.is-empty {
    color: var(--ac-muted);
}

.ac .ac-lib__where {
    font-size: 13px;
    color: var(--ac-muted);
}

.ac .ac-lib__scrim {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(20, 18, 16, 0.35);
}

.ac .ac-lib__panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    width: min(420px, 100%);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 28px;
    background: var(--ac-surface);
    border-left: 1px solid var(--ac-line);
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.12);
}

.ac .ac-lib__panel[hidden],
.ac .ac-lib__scrim[hidden] {
    display: none !important;
}

.ac .ac-lib__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ac .ac-lib__preview img,
.ac .ac-lib__preview video {
    display: block;
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--ac-soft);
}

.ac .ac-lib__panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ac .ac-lib__panel-actions .ac-btn--primary {
    flex-grow: 1;
}

.ac .ac-lib__panel .ac-danger-link {
    align-self: flex-start;
}

@media (max-width: 960px) {
    .ac .ac-lib__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ac .ac-lib__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .ac .ac-lib__chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-left: -16px;
        margin-right: -16px;
        padding: 0 16px;
        scrollbar-width: none;
    }

    .ac .ac-lib__chip {
        flex-shrink: 0;
    }

    .ac .ac-lib__panel {
        padding: 20px;
    }
}

/* === Shop front page (shop/index.html) ================================= */

.ac .ac-shop__head {
    padding: 44px 0 28px;
    max-width: 720px;
}

.ac .ac-shop__lead {
    margin-top: 10px !important;
    font-size: 18px;
}

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

.ac .ac-product {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ac-line);
    border-radius: var(--ac-radius);
    background: var(--ac-surface);
    overflow: hidden;
    text-decoration: none !important;
    transition: border-color 0.15s ease;
}

.ac .ac-product:hover {
    border-color: var(--ac-accent);
}

.ac .ac-product__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background: var(--ac-soft);
}

.ac .ac-product__image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.ac .ac-product__badge {
    position: absolute;
    top: 14px;
    left: 14px;
}

.ac .ac-product__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 24px 24px;
}

.ac .ac-product__name {
    font-family: var(--ac-serif);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.15;
}

.ac .ac-product__price {
    font-family: var(--ac-serif);
    font-size: 28px;
    font-weight: 600;
}

.ac .ac-product__price s {
    font-size: 18px;
    margin-left: 6px;
}

.ac .ac-product__cta {
    align-self: flex-start;
    margin-top: 6px;
}

/* One product: show it large, picture beside the text. */
.ac .ac-shop__grid--one {
    grid-template-columns: minmax(0, 1fr);
}

.ac .ac-shop__grid--one .ac-product {
    flex-direction: row;
}

.ac .ac-shop__grid--one .ac-product__image {
    flex: 0 0 46%;
    aspect-ratio: auto;
    min-height: 380px;
}

.ac .ac-shop__grid--one .ac-product__body {
    justify-content: center;
    padding: 36px 40px;
}

.ac .ac-shop__grid--one .ac-product__name {
    font-size: 36px;
}

.ac .ac-shop__pages {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
}

.ac .ac-shop__promise {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 40px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--ac-line);
    list-style: none;
}

.ac .ac-shop__promise li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

@media (max-width: 760px) {
    .ac .ac-shop__grid--one .ac-product {
        flex-direction: column;
    }

    .ac .ac-shop__grid--one .ac-product__image {
        min-height: 260px;
    }

    .ac .ac-shop__grid--one .ac-product__body {
        padding: 22px;
    }

    .ac .ac-shop__grid--one .ac-product__name {
        font-size: 28px;
    }

    .ac .ac-shop__promise {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
}

.ac .ac-grave__section {
    padding: 0 !important;
}

.ac .ac-grave__head--plain {
    padding-top: 56px;
}

/* === Basket, checkout, orders (shop/cart, checkout, orders, order_detail) == */

.ac .ac-buy__head {
    padding: 8px 0 24px;
}

.ac .ac-buy__head--top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 44px;
}

.ac .ac-buy__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    align-items: start;
}

.ac .ac-buy__main,
.ac .ac-buy__side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ac .ac-buy__empty {
    max-width: 560px;
}

.ac .ac-buy__empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ac .ac-buy__continue {
    display: inline-block;
    margin-top: 16px;
}

.ac .ac-buy__signin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ac .ac-buy__notes {
    margin-top: 18px;
}

.ac .ac-buy__note {
    margin-top: 8px;
    font-style: italic;
}

.ac .ac-buy__help {
    padding: 0 4px;
}

/* Steps: basket -> details -> done, and the order's own progress. */
.ac .ac-steps {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 36px 0 20px;
    list-style: none;
}

.ac .ac-steps__item {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--ac-muted);
    font-size: 15px;
}

.ac .ac-steps__item:not(:last-child)::after {
    content: '';
    flex: 1;
    min-width: 12px;
    height: 1px;
    background: var(--ac-line);
}

.ac .ac-steps__num {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--ac-line);
    background: var(--ac-surface);
    font-size: 14px;
    font-weight: 600;
}

.ac .ac-steps__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac .ac-steps__item.is-done .ac-steps__num {
    border-color: transparent;
    background: var(--ac-ok-bg);
    color: var(--ac-ok-ink);
}

.ac .ac-steps__item.is-current {
    color: var(--ac-ink);
    font-weight: 600;
}

.ac .ac-steps__item.is-current .ac-steps__num {
    border-color: transparent;
    background: var(--ac-accent);
    color: var(--ac-accent-ink);
}

.ac .ac-steps--track {
    padding: 0 0 16px;
}

/* A product line in the basket and on the order page. */
.ac .ac-line {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px solid var(--ac-line);
}

.ac .ac-line:first-child,
.ac .ac-card__title + .ac-line {
    border-top: none;
    padding-top: 4px;
}

.ac .ac-line__img,
.ac .ac-sum__img,
.ac .ac-order__img {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: var(--ac-cover);
    aspect-ratio: 1;
}

.ac .ac-line__img img,
.ac .ac-sum__img img,
.ac .ac-order__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ac .ac-line__name {
    display: block;
    font-weight: 600;
    font-size: 17px;
    line-height: 1.3;
}

.ac .ac-line__controls {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
}

.ac .ac-line__total {
    font-weight: 600;
    white-space: nowrap;
}

.ac .ac-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ac-line);
    border-radius: 999px;
    background: var(--ac-surface);
}

.ac .ac-qty__btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--ac-ink);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.ac .ac-qty__btn[disabled] {
    color: var(--ac-line);
    cursor: default;
}

.ac .ac-qty__input {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--ac-ink);
    font: 600 16px var(--ac-sans);
    text-align: center;
    -moz-appearance: textfield;
}

.ac .ac-qty__input::-webkit-outer-spin-button,
.ac .ac-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* The total card beside the basket and the checkout form. */
.ac .ac-sum {
    position: sticky;
    top: 104px;
}

.ac .ac-sum .ac-card__title {
    margin-bottom: 14px;
}

.ac .ac-sum__row,
.ac .ac-sum__total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
}

.ac .ac-sum__row--first {
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid var(--ac-line);
}

.ac .ac-sum__total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--ac-line);
    font-size: 20px;
    font-weight: 600;
}

.ac .ac-sum__cta {
    width: 100%;
    margin-top: 14px;
}

.ac .ac-sum__promises {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.ac .ac-sum__promises li {
    padding: 2px 0 2px 22px;
    position: relative;
}

.ac .ac-sum__promises li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--ac-ok-ink);
}

.ac .ac-sum__items {
    margin: 0 0 12px;
    padding: 0 0 12px;
    list-style: none;
    border-bottom: 1px solid var(--ac-line);
}

.ac .ac-sum__items li {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 6px 0;
}

.ac .ac-sum__name {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    line-height: 1.3;
}

.ac .ac-sum__error {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--ac-warn-bg);
    color: var(--ac-warn-ink);
    font-size: 15px;
}

/* Checkout fields and the parcel locker search. */
.ac .ac-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
    margin-top: 14px;
}

.ac .ac-field input[type="tel"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--ac-line);
    border-radius: 10px;
    background: var(--ac-bg);
    color: var(--ac-ink);
    font: 16px var(--ac-sans);
}

.ac .ac-field input:focus,
.ac .ac-field textarea:focus {
    outline: 2px solid var(--ac-accent);
    outline-offset: 1px;
}

.ac .ac-term {
    position: relative;
}

.ac .ac-term__list {
    position: absolute;
    z-index: 30;
    top: 76px;
    left: 0;
    right: 0;
    max-height: 320px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
    background: var(--ac-surface);
    border: 1px solid var(--ac-line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(43, 38, 34, 0.14);
}

.ac .ac-term__option {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.ac .ac-term__option:hover,
.ac .ac-term__option:focus {
    background: var(--ac-tint);
    outline: none;
}

.ac .ac-term__none {
    padding: 10px 12px;
    color: var(--ac-muted);
}

.ac .ac-term__picked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--ac-accent);
    border-radius: 12px;
    background: var(--ac-tint);
}

.ac .ac-term__picked[hidden],
.ac .ac-term[hidden] {
    display: none;
}

.ac .ac-term__name {
    font-weight: 600;
}

/* Orders list and the order page. */
.ac .ac-orders {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ac .ac-order {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
}

.ac .ac-order__top,
.ac .ac-order__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ac .ac-order__meta {
    margin-top: 10px;
}

.ac .ac-order__no {
    font-weight: 600;
    font-size: 17px;
}

.ac .ac-order__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.ac .ac-order__total {
    font-size: 19px;
    font-weight: 600;
}

.ac .ac-order__actions {
    display: flex;
    gap: 8px;
}

.ac .ac-track {
    margin-bottom: 24px;
}

.ac .ac-track__next {
    margin: 0;
    font-size: 17px;
}

.ac .ac-track__no {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    color: var(--ac-muted);
}

@media (max-width: 960px) {
    .ac .ac-buy__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ac .ac-sum {
        position: static;
    }
}

@media (max-width: 640px) {
    .ac .ac-steps {
        padding-top: 24px;
    }

    .ac .ac-steps__item:not(.is-current) .ac-steps__label {
        display: none;
    }

    .ac .ac-steps__item {
        flex: 0 1 auto;
    }

    .ac .ac-steps__item.is-current {
        flex: 1;
    }

    .ac .ac-buy__head--top {
        padding-top: 28px;
    }

    .ac .ac-line {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .ac .ac-line__total {
        grid-column: 2;
    }

    .ac .ac-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ac .ac-order {
        grid-template-columns: 56px minmax(0, 1fr);
        padding: 16px;
    }

    .ac .ac-order__side {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Message shown after a basket change fails; sits outside .ac. */
.ac-toast {
    position: fixed;
    z-index: 2000;
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: 420px;
    margin-left: auto;
    padding: 14px 18px;
    border-radius: 12px;
    background: #2b2622;
    color: #ffffff;
    font: 15px 'Source Sans 3', system-ui, sans-serif;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.ac .ac-buy__layout > .ac-card > .ac-card__title,
.ac .ac-buy__side .ac-card__title {
    margin-bottom: 10px;
}

/* === New memorial (memorial/create_memorial.html) ===================== */

.ac .ac-create__head {
    padding: 40px 0 24px;
    max-width: 720px;
}

.ac .ac-create__lead {
    margin-top: 8px !important;
    font-size: 17px;
}

.ac .ac-create__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
}

.ac .ac-create__main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ac .ac-create__alert {
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--ac-warn-bg);
    color: var(--ac-warn-ink);
    font-weight: 600;
}

.ac .ac-create__part {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.ac .ac-create__num {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ac-soft);
    font-size: 14px;
    font-weight: 600;
    transform: translateY(-3px);
}

.ac .ac-create__num.is-on {
    background: var(--ac-accent);
    color: var(--ac-accent-ink);
}

.ac .ac-create__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.ac .ac-field.has-error input,
.ac .ac-field.has-error textarea {
    border-color: var(--ac-danger);
}

.ac .ac-field__error {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: var(--ac-danger);
}

.ac .ac-create__photo {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 20px 0 0;
    padding: 16px;
    border: 1px dashed var(--ac-line);
    border-radius: 14px;
    background: var(--ac-tint);
    cursor: pointer;
    position: relative;
}

.ac .ac-create__photo.has-error {
    border-color: var(--ac-danger);
}

.ac .ac-create__photo-img {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--ac-cover) center / cover no-repeat;
}

.ac .ac-create__photo-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.ac .ac-create__photo-text .ac-small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac .ac-create__file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.ac .ac-create__photo:focus-within {
    outline: 2px solid var(--ac-accent);
    outline-offset: 2px;
}

.ac .ac-create__themes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ac .ac-theme {
    position: relative;
    display: block;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--ac-line);
    border-radius: 14px;
    background: var(--ac-surface);
    cursor: pointer;
}

.ac .ac-theme input {
    position: absolute;
    opacity: 0;
}

.ac .ac-theme:has(input:checked) {
    border-color: var(--ac-accent);
    box-shadow: inset 0 0 0 1px var(--ac-accent);
}

.ac .ac-theme:has(input:focus-visible) {
    outline: 2px solid var(--ac-accent);
    outline-offset: 2px;
}

.ac .ac-theme__swatch {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 5px;
    height: 96px;
    padding: 14px;
    border-radius: 10px;
}

.ac .ac-theme__swatch span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.ac .ac-theme__swatch i {
    display: block;
    width: 70%;
    height: 7px;
    border-radius: 4px;
}

.ac .ac-theme__name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px 2px;
    font-weight: 600;
}

.ac .ac-theme__name::after {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--ac-line);
    box-sizing: border-box;
}

.ac .ac-theme:has(input:checked) .ac-theme__name::after {
    border: 6px solid var(--ac-accent);
}

.ac .ac-create__search {
    margin-top: 18px;
}

.ac .ac-create__submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.ac .ac-create__side {
    position: sticky;
    top: 104px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ac .ac-preview {
    --pv-bg: var(--ac-surface);
    --pv-cover: var(--ac-cover);
    --pv-ink: var(--ac-ink);
    --pv-muted: var(--ac-muted);
    --pv-accent: var(--ac-accent);
    --pv-accent-ink: var(--ac-accent-ink);
    --pv-soft: var(--ac-soft);
    overflow: hidden;
    border: 1px solid var(--ac-line);
    border-radius: 16px;
    background: var(--pv-bg);
    color: var(--pv-ink);
    transition: background 0.2s ease;
}

.ac .ac-preview__cover {
    height: 110px;
    background: var(--pv-cover);
}

.ac .ac-preview__body {
    padding: 0 22px 22px;
    text-align: center;
}

.ac .ac-preview__portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    margin: -48px auto 0;
    border-radius: 50%;
    border: 4px solid var(--pv-bg);
    background: var(--pv-soft) center / cover no-repeat;
    color: var(--pv-muted);
    font-family: var(--ac-serif);
    font-size: 34px;
}

.ac .ac-preview__portrait.has-photo span {
    display: none;
}

.ac .ac-preview__name {
    margin-top: 10px;
    font-family: var(--ac-serif);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.ac .ac-preview__years {
    color: var(--pv-muted);
}

.ac .ac-preview__bio {
    margin: 12px 0 0;
    font-size: 14px;
    text-align: left;
    white-space: pre-line;
}

.ac .ac-preview__candle {
    margin-top: 14px;
    padding: 10px;
    border-radius: 999px;
    background: var(--pv-accent);
    color: var(--pv-accent-ink);
    font-size: 14px;
    font-weight: 600;
}

.ac .ac-create__later {
    padding: 14px 16px;
}

@media (max-width: 960px) {
    .ac .ac-create__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ac .ac-create__side {
        position: static;
        order: -1;
    }

    .ac .ac-create__side .ac-preview,
    .ac .ac-create__later {
        display: none;
    }

    .ac .ac-create__side .ac-eyebrow {
        display: none;
    }
}

@media (max-width: 640px) {
    .ac .ac-create__head {
        padding-top: 24px;
    }

    .ac .ac-create__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ac .ac-create__photo {
        flex-wrap: wrap;
    }

    .ac .ac-create__photo .ac-btn {
        width: 100%;
    }

    .ac .ac-theme {
        padding: 6px;
    }

    .ac .ac-theme__swatch {
        height: 60px;
        padding: 10px;
    }

    .ac .ac-theme__swatch span {
        width: 20px;
        height: 20px;
    }

    .ac .ac-create__submit .ac-btn {
        width: 100%;
    }

    .ac .ac-create__submit {
        justify-content: center;
        text-align: center;
    }
}

/* "Ką toliau?" on the editor right after a memorial is created */
.ac .ac-next {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    margin: 0 0 24px;
    padding: 24px 26px;
    border-radius: 16px;
    background: var(--ac-ok-bg);
}

.ac .ac-next__done {
    color: var(--ac-ok-ink);
    font-weight: 600;
}

.ac .ac-next__title {
    margin: 4px 0 14px;
    font-size: 28px !important;
}

.ac .ac-next__row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--ac-surface);
    color: var(--ac-ink) !important;
    text-decoration: none !important;
}

.ac a.ac-next__row:hover {
    box-shadow: inset 0 0 0 1px var(--ac-line);
}

.ac .ac-next__mark {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ac-soft);
    font-size: 14px;
    font-weight: 600;
}

.ac .ac-next__row--done .ac-next__mark {
    background: var(--ac-ok-bg);
    color: var(--ac-ok-ink);
}

.ac .ac-next__text {
    flex: 1;
}

.ac .ac-next__share {
    align-self: start;
    padding: 18px;
    border-radius: 14px;
    background: var(--ac-surface);
}

.ac .ac-next__url {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--ac-bg);
    color: var(--ac-muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.ac .ac-next__actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.ac .ac-next__actions .ac-btn {
    flex: 1;
}

@media (max-width: 860px) {
    .ac .ac-next {
        grid-template-columns: minmax(0, 1fr);
        padding: 20px;
    }
}

.ac .ac-theme,
.ac .ac-create__photo {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--ac-ink);
}

.ac .ac-theme__name {
    font-size: 16px;
}

.ac .ac-field > label.ac-muted {
    font-weight: 400;
    font-size: 15px;
    color: var(--ac-muted);
}

@media (max-width: 640px) {
    .ac .ac-theme__name {
        justify-content: center;
        padding: 8px 0 2px;
        font-size: 14px;
    }

    .ac .ac-theme__name::after {
        display: none;
    }
}

/* === Help centre (pagalba/*) ========================================== */

.ac .ac-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.ac .ac-help__hero {
    max-width: 720px;
    padding: 44px 0 28px;
}

.ac .ac-help__lead {
    margin-top: 8px !important;
    font-size: 18px;
}

.ac .ac-help__search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 0 18px;
    height: 54px;
    border: 1px solid var(--ac-line);
    border-radius: 999px;
    background: var(--ac-surface);
    color: var(--ac-muted);
}

.ac .ac-help__search:focus-within {
    outline: 2px solid var(--ac-accent);
    outline-offset: 2px;
}

.ac .ac-help__search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--ac-ink);
    font: 17px var(--ac-sans);
    outline: none;
}

.ac .ac-help__results {
    margin: 12px 0 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--ac-line);
    border-radius: 16px;
    background: var(--ac-surface);
}

.ac .ac-help__results a {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    border-radius: 10px;
}

.ac .ac-help__results a:hover {
    background: var(--ac-tint);
    text-decoration: none;
}

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

.ac .ac-help__cat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ac .ac-help__cat .ac-card__title a:hover {
    text-decoration: none;
    color: var(--ac-accent-text);
}

.ac .ac-help__list {
    margin: 4px 0 6px;
    padding: 0;
    list-style: none;
}

.ac .ac-help__list li {
    padding: 7px 0;
    border-top: 1px solid var(--ac-line);
}

.ac .ac-help__list li:first-child {
    border-top: none;
}

.ac .ac-help__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin-top: 32px;
}

.ac .ac-help__contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ac .ac-help__narrow {
    max-width: 860px;
}

.ac .ac-help__crumbs {
    padding: 40px 0 8px;
    font-size: 14px;
    color: var(--ac-muted);
}

.ac .ac-help__crumbs a {
    color: var(--ac-accent-text);
}

.ac .ac-help__articles {
    margin-top: 24px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.ac .ac-help__article-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    border-top: 1px solid var(--ac-line);
}

.ac .ac-help__article-row:first-child {
    border-top: none;
}

.ac .ac-help__article-row > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ac .ac-help__article-row:hover {
    text-decoration: none;
}

.ac .ac-help__article-row:hover b {
    color: var(--ac-accent-text);
}

.ac .ac-help__layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) 240px;
    gap: 56px;
    align-items: start;
}

.ac .ac-help__title {
    margin: 4px 0 4px;
    font-size: clamp(34px, 4.5vw, 46px) !important;
    line-height: 1.1;
}

.ac .ac-help__toc {
    position: sticky;
    top: 104px;
    padding-left: 18px;
    border-left: 1px solid var(--ac-line);
}

.ac .ac-help__toc ul {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.ac .ac-help__toc li {
    padding: 4px 0;
}

.ac .ac-help__toc a {
    color: var(--ac-muted);
}

.ac .ac-help__toc a:hover {
    color: var(--ac-ink);
}

.ac section.ac-help__related {
  padding: 0;
    margin-top: 36px;
}

/* Article text */
.ac .ac-prose {
    margin-top: 20px;
    font-size: 17px;
    line-height: 1.7;
}

.ac .ac-prose h2 {
    margin: 36px 0 10px;
    font-size: 30px !important;
    line-height: 1.2;
    scroll-margin-top: 100px;
}

.ac .ac-prose h3 {
    margin: 24px 0 8px;
    font-family: var(--ac-sans) !important;
    font-size: 18px;
    font-weight: 600;
}

.ac .ac-prose p {
    margin: 0 0 14px;
}

.ac .ac-prose ul,
.ac .ac-prose ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.ac .ac-prose li {
    margin: 4px 0;
}

.ac .ac-prose a {
    color: var(--ac-accent-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ac .ac-prose b,
.ac .ac-prose strong {
    font-weight: 600;
}

.ac .ac-prose blockquote {
    margin: 18px 0;
    padding: 14px 18px;
    border-left: none;
    border-radius: 12px;
    background: var(--ac-soft);
    font-size: 16px;
}

.ac .ac-prose blockquote p:last-child {
    margin-bottom: 0;
}

@media (max-width: 960px) {
    .ac .ac-help__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ac .ac-help__toc {
        display: none;
    }
}

@media (max-width: 640px) {
    .ac .ac-help__hero {
        padding-top: 28px;
    }

    .ac .ac-help__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ac .ac-help__crumbs {
        padding-top: 24px;
    }

    .ac .ac-prose {
        font-size: 16px;
    }

    .ac .ac-prose h2 {
        font-size: 26px !important;
    }
}

/* Checkout: which memorial the plate is for */
.ac .ac-buy__memorials { display: grid; gap: 8px; margin-top: 12px; }
.ac .ac-buy__memorial {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0;
  border: 1px solid var(--ac-line); border-radius: 12px; cursor: pointer; font-weight: 400; font-size: 16px;
}
.ac .ac-buy__memorial:has(input:checked) { border-color: var(--ac-accent); background: var(--ac-soft); }
.ac .ac-buy__memorial input { accent-color: var(--ac-accent); width: 18px; height: 18px; flex: none; }

/* Contact page */
.ac .ac-contact__layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.ac .ac-contact__form, .ac .ac-contact__sent { padding: 28px; }
.ac .ac-contact__form .ac-card__title { margin-bottom: 18px; }
.ac .ac-contact__form .ac-create__grid { margin-bottom: 0; }
.ac .ac-contact__form .ac-field { margin-bottom: 16px; }
.ac .ac-contact__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ac .ac-contact__submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.ac .ac-contact__side { display: grid; gap: 16px; }
.ac .ac-contact__side .ac-card { padding: 22px; }
.ac .ac-contact__side .ac-card__title { font-size: 22px !important; margin-bottom: 8px; }
.ac .ac-contact__email { display: inline-block; font-size: 20px; font-weight: 600; color: var(--ac-accent); margin-bottom: 8px; text-decoration: none; }
.ac .ac-contact__email:hover { text-decoration: underline; }
.ac .ac-contact__company { padding: 4px 6px; line-height: 1.6; }
.ac .ac-contact__sent { text-align: center; }
.ac .ac-contact__sent-mark { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--ac-soft); color: var(--ac-accent); font-size: 24px; }
.ac .ac-contact__sent p { margin: 8px auto 18px; max-width: 460px; }
.ac [hidden] { display: none !important; }
@media (max-width: 960px) { .ac .ac-contact__layout { grid-template-columns: 1fr; } }

/* Grave editor (home/edit_grave.html) and grave wizard (home/create_grave.html).
   Class names the page scripts read (tab-link, tab-content, hidden,
   file-input-wrapper, image-item...) are kept; the look is set here. */
.ac .hidden { display: none !important; }
.ac .ac-ge__tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0 16px; padding: 4px; border-radius: 999px; background: var(--ac-soft); width: fit-content; }
.ac .ac-ge__tabs .tab-link { padding: 9px 18px; border-radius: 999px; color: var(--ac-muted); font-weight: 600; font-size: 15px; text-decoration: none; }
.ac .ac-ge__tabs .tab-link.active { background: var(--ac-surface); color: var(--ac-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ac .ac-ge__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--ac-accent); color: var(--ac-accent-ink); font-size: 12px; }
.ac.ac-grave-edit .tab-content { padding: 28px; }
.ac.ac-grave-edit .ac-field { margin-bottom: 18px; }
.ac .ac-ge__three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ac .ac-ge__sub { font-family: 'Source Sans 3', system-ui, sans-serif !important; font-size: 15px !important; font-weight: 600; margin: 22px 0 12px; color: var(--ac-ink); }
.ac .ac-ge__drop { display: block; padding: 28px; border: 2px dashed var(--ac-line); border-radius: 14px; text-align: center; cursor: pointer; background: var(--ac-tint); transition: border-color .15s ease, background .15s ease; }
.ac .ac-ge__drop:hover, .ac .ac-ge__drop.drag-over { border-color: var(--ac-accent); }
.ac .ac-ge__drop .upload-content { display: grid; justify-items: center; gap: 6px; }
.ac .ac-ge__drop-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ac-soft); color: var(--ac-accent); font-size: 20px; margin-bottom: 4px; }
.ac .selected-files { display: grid; gap: 6px; width: 100%; max-width: 420px; margin-top: 8px; }
.ac .selected-file-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--ac-surface); border: 1px solid var(--ac-line); font-size: 14px; text-align: left; }
.ac .selected-file-item .selected-filename { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac .upload-buttons { display: flex; gap: 8px; margin-top: 10px; }
.ac .image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.ac .image-item { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--ac-soft); }
.ac .image-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac .image-item .image-actions { position: absolute; top: 8px; right: 8px; }
.ac .image-item .image-actions .btn { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }
.ac .image-item .image-actions .btn:hover { background: #b3261e; }
.ac .ac-ge__search { position: relative; }
.ac .ac-ge__search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ac-muted); }
.ac .ac-ge__search input { padding-left: 40px !important; }
.ac .ac-ge__map { position: relative; height: 420px; margin-top: 6px; border-radius: 14px; overflow: hidden; border: 1px solid var(--ac-line); background: var(--ac-soft); }
.ac .ac-ge__map #map { width: 100%; height: 100%; }
.ac .ac-ge__map #map-loading { position: absolute; inset: 0; display: grid; place-items: center; background: var(--ac-soft); z-index: 2; }
.ac .ac-ge__map .spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ac-line); border-top-color: var(--ac-accent); animation: ac-spin 0.9s linear infinite; }
@keyframes ac-spin { to { transform: rotate(360deg); } }
.ac .ac-ge__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 640px) {
  .ac .ac-ge__three { grid-template-columns: 1fr; gap: 0; }
  .ac.ac-grave-edit .tab-content { padding: 20px; }
  .ac .ac-ge__tabs { width: 100%; }
  .ac .ac-ge__tabs .tab-link { flex: 1; text-align: center; padding: 9px 10px; font-size: 14px; white-space: nowrap; }
  .ac .ac-ge__map { height: 340px; }
  .ac .ac-ge__actions .ac-btn { flex: 1; }
}
.ac .ac-gn__back { background: none; border: 0; padding: 0; cursor: pointer; }
.ac .ac-gn__card { padding: 28px; }
.ac .ac-gn__steps { list-style: none; display: flex; gap: 8px; margin: 0 0 24px; padding: 0 0 18px; border-bottom: 1px solid var(--ac-line); flex-wrap: wrap; }
.ac .ac-gn__steps .step-indicator { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; color: var(--ac-muted); font-weight: 600; font-size: 14px; }
.ac .ac-gn__steps .step-indicator span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ac-soft); color: var(--ac-muted); font-size: 13px; }
.ac .ac-gn__steps .step-indicator.active { color: var(--ac-ink); background: var(--ac-soft); }
.ac .ac-gn__steps .step-indicator.active span, .ac .ac-gn__steps .step-indicator.completed span { background: var(--ac-accent); color: var(--ac-accent-ink); }
.ac .ac-gn__lead { margin: -2px 0 18px; }
.ac.ac-grave-new .ac-field { margin-bottom: 18px; }
.ac .ac-gn__nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.ac .ac-gn__picked { margin: 10px 0 0; }
.ac .ac-gn__coords { opacity: .7; }
.ac .ac-gn__drop { position: relative; }
.ac .file-upload-wrapper input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ac .file-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-top: 6px; border-radius: 10px; background: var(--ac-surface); border: 1px solid var(--ac-line); font-size: 14px; }
.ac .error-message { display: none; color: #b3261e; font-size: 14px; margin-top: 6px; }
.ac .error-message.visible { display: block; }
html[data-theme="dark"] .ac .error-message { color: #f08a7e; }
.ac input.error { border-color: #b3261e !important; }
@media (max-width: 640px) { .ac .ac-gn__card { padding: 20px; } .ac .ac-gn__steps .step-indicator { font-size: 13px; } }
/* A global label rule paints these dark; in dark mode they vanished. */
.ac .ac-buy__memorial, .ac .ac-buy__memorial > span, .ac .ac-buy__memorial b { color: var(--ac-ink) !important; }
.ac .ac-buy__memorial .ac-muted { color: var(--ac-muted) !important; }

/* Account page (accounts/user_account.html) */
.ac .ac-acct__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.ac .ac-acct__main, .ac .ac-acct__side { display: grid; gap: 16px; }
.ac .ac-acct__side { position: sticky; top: 104px; }
.ac .ac-acct__card { padding: 26px; scroll-margin-top: 100px; }
.ac .ac-acct__card .ac-card__title { margin-bottom: 6px; }
.ac .ac-acct__lead { margin-bottom: 16px; }
.ac .ac-acct__card .ac-field { margin-bottom: 16px; }
.ac .ac-acct__card .ac-create__grid { margin-bottom: 0; }
.ac .ac-acct__card form > p { margin: -4px 0 14px; }
.ac .ac-acct__google { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin: 6px 0 16px; border-radius: 10px; background: var(--ac-soft); color: var(--ac-ink); font-size: 14px; }
.ac .ac-acct__order { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--ac-line); color: var(--ac-ink); text-decoration: none; }
.ac .ac-acct__order:first-of-type { border-top: 0; }
.ac .ac-acct__order > span { display: grid; gap: 2px; }
.ac .ac-acct__order:hover b { text-decoration: underline; }
.ac .ac-acct__facts { margin: 8px 0 12px; display: grid; gap: 0; }
.ac .ac-acct__facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--ac-line); }
.ac .ac-acct__facts > div:first-child { border-top: 0; }
.ac .ac-acct__facts dt { color: var(--ac-muted); font-weight: 400; }
.ac .ac-acct__facts dd { margin: 0; color: var(--ac-ink); font-weight: 600; }
.ac .ac-acct__out { color: #b3261e !important; }
html[data-theme="dark"] .ac .ac-acct__out { color: #f08a7e !important; }
@media (max-width: 960px) { .ac .ac-acct__layout { grid-template-columns: 1fr; } .ac .ac-acct__side { position: static; } }
@media (max-width: 640px) { .ac .ac-acct__card { padding: 20px; } }

/* Legal and info pages (privacy, terms, how to buy) */
.ac .ac-legal__card { padding: 32px 36px; margin: 8px 0 24px; }
.ac .ac-legal__card > h2:first-child { margin-top: 0; }
.ac .ac-htb__steps { list-style: none; padding: 0; margin: 8px 0 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ac .ac-htb__steps li { padding: 18px; display: grid; gap: 4px; }
.ac .ac-htb__num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ac-accent); color: var(--ac-accent-ink); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.ac .ac-htb__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
@media (max-width: 760px) { .ac .ac-htb__steps { grid-template-columns: 1fr 1fr; } .ac .ac-legal__card { padding: 22px; } }
.ac .ac-msg__card { text-align: center; padding: 44px 28px; margin: 24px 0 48px; }
.ac .ac-msg__icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--ac-soft); color: var(--ac-accent); font-size: 22px; }
.ac .ac-msg__card p { max-width: 460px; margin: 8px auto 20px; }
.ac .ac-msg__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ac .ac-share__media { margin: 8px 0 16px; padding: 12px; text-align: center; }
.ac .ac-share__media img, .ac .ac-share__media video { max-width: 100%; max-height: 74vh; border-radius: 10px; display: block; margin: 0 auto; background: #000; }
.ac .ac-share__media figcaption { margin-top: 12px; color: var(--ac-muted); }
.ac .ac-share__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 32px; }
