/*
 * Memoriez Maglan Profiles — unified public / live-edit profile.
 *
 * This stylesheet is deliberately isolated behind .mzmp-live-profile. The
 * public page and the editor share the same markup and geometry; edit mode
 * merely adds .is-editing and exposes the controls defined below.
 */

body.mzmp-live-drawer-open,
body.mzmp-live-content-edit-open,
body.mzmp-live-candle-open,
body.mzmp-candle-modal-open,
body.mzmp-candle-open,
body.mzmp-collection-manager-open,
body.mzmp-destructive-dialog-open {
    overflow: hidden;
}

.mmw-title,
.mmw-subtitle{display:none !important;}

.mzmp-live-profile {
    --mzmp-live-navy: var(--mzmp-navy, #020b4a);
    --mzmp-live-navy-2: #0b1f63;
    --mzmp-live-blue: #193f8f;
    --mzmp-live-blue-bright: #2473bd;
    --mzmp-live-gold: var(--mzmp-gold, #cca75a);
    --mzmp-live-gold-dark: #a97921;
    --mzmp-live-ink: #07143f;
    --mzmp-live-muted: #667085;
    --mzmp-live-line: #e2e7ef;
    --mzmp-live-canvas: #f3f5f8;
    --mzmp-live-white: #fff;
    --mzmp-live-danger: #c8102e;
    --mzmp-live-success: #087a4b;
    --mzmp-live-shadow: 0 16px 46px rgba(2, 11, 74, .12);
    --mzmp-live-header-height: 64px;
    --mzmp-live-gutter: clamp(20px, 4.3vw, 46px);
    --mzmp-live-gutter-negative: clamp(-46px, -4.3vw, -20px);
    position: relative;
    width: min(100%, 1240px);
    min-width: 0;
    min-height: 100svh;
    margin-inline: auto;
    direction: rtl;
    background: var(--mzmp-live-white);
    box-shadow: 0 0 0 1px rgba(2, 11, 74, .05), var(--mzmp-live-shadow);
    color: var(--mzmp-live-ink);
    font-family: "Heebo", "Assistant", Arial, sans-serif;
    line-height: 1.55;
    text-align: right;
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.mzmp-live-profile,
.mzmp-live-profile *,
.mzmp-live-profile *::before,
.mzmp-live-profile *::after {
    box-sizing: border-box;
}

.mzmp-live-profile img,
.mzmp-live-profile video,
.mzmp-live-profile iframe {
    display: block;
    max-width: 100%;
}

.mzmp-live-profile button,
.mzmp-live-profile input,
.mzmp-live-profile textarea,
.mzmp-live-profile select {
    font: inherit;
}

.mzmp-live-profile button,
.mzmp-live-profile a,
.mzmp-live-profile label {
    -webkit-tap-highlight-color: transparent;
}

.mzmp-live-profile [hidden] {
    display: none !important;
}

.mzmp-live-profile :focus-visible {
    outline: 3px solid var(--mzmp-live-gold);
    outline-color: color-mix(in srgb, var(--mzmp-live-gold) 78%, #fff);
    outline-offset: 3px;
}

.mzmp-live-profile .mzmp-live-profile__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Top bar */
.mzmp-live-profile .mzmp-live-profile__topbar {
    position: relative;
    z-index: 80;
    display: grid;
    min-height: var(--mzmp-live-header-height);
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    padding: 4px 14px;
    background: var(--mzmp-live-navy);
    color: #fff;
}

.mzmp-live-profile .mzmp-live-profile__topbar-title {
    grid-column: 2;
    overflow: hidden;
    margin: 0;
    color: #fff;
    font-size: clamp(19px, 2.2vw, 24px);
    font-weight: 900;
    letter-spacing: -.015em;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mzmp-live-profile .mzmp-live-profile__topbar-action {
    appearance: none;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background-color .18s ease, transform .18s ease;
}

.mzmp-live-profile .mzmp-live-profile__topbar-action:hover {
    background: rgba(255, 255, 255, .13);
}

.mzmp-live-profile .mzmp-live-profile__topbar-action:active {
    transform: scale(.96);
}

.mzmp-live-profile .mzmp-live-profile__topbar-action svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.mzmp-live-profile .mzmp-live-profile__topbar-action--close {
    grid-column: 1;
    display: none;
}

.mzmp-live-profile .mzmp-live-profile__topbar-action--menu {
    grid-column: 3;
}

.mzmp-live-profile:not(.is-editing) .mzmp-live-profile__topbar-action--menu {
    visibility: hidden;
}

/* Cover and memorial candle */
.mzmp-live-profile .mzmp-live-profile__hero {
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 0;
    box-shadow: none;
}

.mzmp-live-profile .mzmp-live-profile__cover {
    position: relative;
    height: clamp(300px, 32vw, 410px);
    overflow: hidden;
    background-color: var(--mzmp-live-navy);
    background-image:
        linear-gradient(180deg, rgba(2, 11, 74, .02) 45%, rgba(2, 11, 74, .52) 100%),
        var(--mzmp-live-cover, linear-gradient(135deg, #31578c, var(--mzmp-live-navy)));
    background-position:
        var(--mzmp-cover-x, var(--mzmp-cover-position-x, 50%))
        var(--mzmp-cover-y, var(--mzmp-cover-position-y, 50%));
    background-size: cover;
}

.mzmp-live-profile .mzmp-live-profile__cover::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .3), transparent 42%, rgba(0, 0, 0, .06));
    content: "";
    pointer-events: none;
}

.mzmp-live-profile .mzmp-live-profile__candle-stack {
    position: absolute;
    z-index: 4;
    inset: auto auto 42px 25px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    direction: rtl;
}

.mzmp-live-profile .mzmp-live-profile__light-candle,
.mzmp-live-profile .mzmp-live-profile__candle-count {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 8px 20px;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
}

.mzmp-live-profile .mzmp-live-profile__light-candle {
    min-width: 168px;
    min-height: 52px;
    background: linear-gradient(135deg, #ddb85f, var(--mzmp-live-gold));
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}

.mzmp-live-profile .mzmp-live-profile__light-candle:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.mzmp-live-profile .mzmp-live-profile__light-candle.is-lit,
.mzmp-live-profile .mzmp-live-profile__light-candle[aria-pressed="true"] {
    background: #f5e4b4;
    color: var(--mzmp-live-navy);
}

.mzmp-live-profile .mzmp-live-profile__light-candle:disabled {
    cursor: default;
    opacity: .92;
    transform: none;
}

.mzmp-live-profile .mzmp-live-profile__light-candle svg,
.mzmp-live-profile .mzmp-live-profile__candle-count svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.mzmp-live-profile .mzmp-live-profile__candle-count {
    min-width: 165px;
    background: var(--mzmp-live-navy);
    color: #fff;
    font-size: 16px;
}

/* White identity sheet */
.mzmp-live-profile .mzmp-live-profile__identity-sheet {
    position: relative;
    z-index: 5;
    min-height: 400px;
    display: block;
    width: 100%;
    grid-template-columns: none;
    align-items: initial;
    gap: 0;
    margin: 0;
    padding: 96px clamp(28px, 6vw, 74px) 22px;
    border-radius: 28px 28px 0 0;
    border: 0;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
}

.mzmp-live-profile .mzmp-live-profile__portrait {
    position: absolute;
    z-index: 6;
    top: 0;
    left: 50%;
    display: grid;
    width: clamp(190px, 21.5vw, 220px);
    height: clamp(190px, 21.5vw, 220px);
    place-items: center;
    overflow: visible;
    border: 9px solid var(--mzmp-live-blue);
    border-radius: 50%;
    background: #eef3f9;
    box-shadow: 0 9px 25px rgba(2, 11, 74, .2);
    color: var(--mzmp-live-blue);
    transform: translate(-50%, -62%);
}

.mzmp-live-profile .mzmp-live-profile__portrait-media {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #eef3f9;
}

.mzmp-live-profile .mzmp-live-profile__portrait-media > img,
.mzmp-live-profile .mzmp-live-profile__portrait > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 50%;
    object-fit: cover;
    object-position:
        var(--mzmp-profile-x, var(--mzmp-profile-position-x, 50%))
        var(--mzmp-profile-y, var(--mzmp-profile-position-y, 18%));
}

.mzmp-live-profile .mzmp-live-profile__portrait-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
}

.mzmp-live-profile .mzmp-live-profile__portrait-placeholder svg {
    width: 42%;
    height: 42%;
}

.mzmp-live-profile .mzmp-live-profile__side-logo {
    position: absolute;
    z-index: 5;
    top: 22px;
    display: grid;
    width: 118px;
    height: 74px;
    place-items: center;
    padding: 4px;
}

.mzmp-live-profile .mzmp-live-profile__side-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mzmp-live-profile .mzmp-live-profile__side-logo--unit {
    left: clamp(26px, 4vw, 46px);
}

.mzmp-live-profile .mzmp-live-profile__side-logo--partner {
    right: clamp(26px, 4vw, 46px);
}

.mzmp-live-profile .mzmp-live-profile__identity {
    width: min(100%, 680px);
    margin-inline: auto;
    text-align: center;
}

.mzmp-live-profile .mzmp-live-service-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin:10px 0px;
    color: var(--mzmp-live-muted);
    font-size: 21px;
    font-weight: 800;
    text-align: center;
}

.mzmp-live-profile .mzmp-live-service-line input {
    width: min(42%, 190px);
    padding: 5px 8px;
    color: inherit;
    text-align: center;
}

.mzmp-live-profile .mzmp-live-profile__name,
.mzmp-live-profile .mzmp-live-profile__name-input {
    width: 100%;
    margin: 0;
    color: var(--mzmp-live-ink);
    font-size: clamp(32px, 4.1vw, 42px);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.08;
    text-align: center;
}

.mzmp-live-profile .mzmp-live-profile__rank,
.mzmp-live-profile .mzmp-live-profile__rank-input {
    display: block;
    width: 100%;
    margin: 14px 0 0;
    color: #111;
    font-size: 17px;
    font-weight: 900;
    text-align: center;
}

.mzmp-live-profile .mzmp-live-profile__summary,
.mzmp-live-profile .mzmp-live-profile__summary-input {
    display: block;
    width: 100%;
    max-width: 650px;
    min-height: 0;
    margin: 8px auto 0;
    color: #171717;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.58;
    text-align: center;
    white-space: pre-line;
}

.mzmp-live-profile .mzmp-live-profile__inline-field {
    border: 1px dashed transparent;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    outline: 0;
    resize: none;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.mzmp-live-profile.is-editing .mzmp-live-profile__inline-field {
    border-color: rgba(25, 63, 143, .32);
    background: rgba(245, 248, 252, .72);
}

.mzmp-live-profile.is-editing .mzmp-live-profile__inline-field:hover {
    border-color: rgba(25, 63, 143, .62);
}

.mzmp-live-profile.is-editing .mzmp-live-profile__inline-field:focus {
    border-color: var(--mzmp-live-gold);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(204, 167, 90, .15);
}

.mzmp-live-profile .mzmp-live-profile__date-row {
    display: grid;
    width: min(100%, 480px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px auto 0;
}

.mzmp-live-profile .mzmp-live-profile__date-card {
    display: grid;
    min-width: 0;
    min-height: 82px;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    padding: 10px 16px;
    border: 1px solid #e7e9ed;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(2, 11, 74, .08);
    text-align: right;
}

.mzmp-live-profile .mzmp-live-profile__date-card > svg {
    width: 34px;
    height: 34px;
    grid-row: 1 / 3;
    fill: none;
    stroke: var(--mzmp-live-navy);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.mzmp-live-profile .mzmp-live-profile__date-card small {
    overflow: hidden;
    color: #7a7d86;
    font-size: 14px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mzmp-live-profile .mzmp-live-profile__date-card strong,
.mzmp-live-profile .mzmp-live-profile__date-card input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--mzmp-live-ink);
    font-size: 17px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    text-align: right;
}

/* Live-edit controls: hidden without .is-editing. Image-position controls use
 * the same visual primitive, but have their own data hook so replacing and
 * repositioning an image remain two unambiguous actions. */
.mzmp-live-profile .mzmp-live-profile__edit-control,
.mzmp-live-profile [data-mzmp-position-image],
.mzmp-live-profile [data-mzmp-position-toggle] {
    position: absolute;
    z-index: 12;
    appearance: none;
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 50%;
    background: var(--mzmp-live-navy);
    box-shadow: 0 7px 20px rgba(2, 11, 74, .28);
    color: #fff;
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease;
}

.mzmp-live-profile.is-editing .mzmp-live-profile__edit-control,
.mzmp-live-profile.is-editing [data-mzmp-position-image],
.mzmp-live-profile.is-editing [data-mzmp-position-toggle] {
    display: grid;
}

.mzmp-live-profile .mzmp-live-profile__edit-control:hover,
.mzmp-live-profile [data-mzmp-position-image]:hover,
.mzmp-live-profile [data-mzmp-position-image][aria-pressed="true"],
.mzmp-live-profile [data-mzmp-position-toggle]:hover,
.mzmp-live-profile [data-mzmp-position-toggle][aria-pressed="true"] {
    background: var(--mzmp-live-blue);
    transform: translateY(-1px);
}

.mzmp-live-profile .mzmp-live-profile__edit-control svg,
.mzmp-live-profile [data-mzmp-position-image] svg,
.mzmp-live-profile [data-mzmp-position-toggle] svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.mzmp-live-profile .mzmp-live-profile__edit-control--cover {
    inset: 18px 18px auto auto;
}

.mzmp-live-profile .mzmp-live-profile__edit-control--portrait {
    inset: auto -3px 9px auto;
}

.mzmp-live-profile .mzmp-live-profile__edit-control--logo {
    width: 36px;
    height: 36px;
    inset: auto 0 0 auto;
}

.mzmp-live-profile [data-mzmp-position-image="cover"],
.mzmp-live-profile [data-mzmp-position-toggle="cover"] {
    inset: 18px 70px auto auto;
}

.mzmp-live-profile [data-mzmp-position-image="profile"],
.mzmp-live-profile [data-mzmp-position-toggle="profile"] {
    inset: auto -3px 57px auto;
}

.mzmp-live-profile [data-mzmp-position-image][aria-pressed="true"],
.mzmp-live-profile [data-mzmp-position-toggle][aria-pressed="true"] {
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, .78),
        0 8px 24px rgba(2, 11, 74, .32);
    color: #fff;
}

.mzmp-live-profile [data-mzmp-position-surface],
.mzmp-live-profile [data-mzmp-image-preview="cover_image"],
.mzmp-live-profile [data-mzmp-profile-image-preview] {
    -webkit-user-select: none;
    user-select: none;
}

.mzmp-live-profile.is-positioning-cover .mzmp-live-profile__cover,
.mzmp-live-profile.is-positioning-profile .mzmp-live-profile__portrait-media,
.mzmp-live-profile [data-mzmp-position-surface].is-positioning,
.mzmp-live-profile [data-mzmp-position-surface][data-positioning="true"],
.mzmp-live-profile [data-mzmp-position-surface][data-active="true"] {
    cursor: grab;
    touch-action: none;
}

.mzmp-live-profile.is-positioning-cover .mzmp-live-profile__cover:active,
.mzmp-live-profile.is-positioning-profile .mzmp-live-profile__portrait-media:active,
.mzmp-live-profile [data-mzmp-position-surface].is-dragging,
.mzmp-live-profile [data-mzmp-position-surface][data-dragging="true"] {
    cursor: grabbing;
}

.mzmp-live-profile.is-positioning-cover .mzmp-live-profile__cover {
    box-shadow: inset 0 0 0 4px rgba(204, 167, 90, .9);
}

.mzmp-live-profile.is-positioning-profile .mzmp-live-profile__portrait-media {
    box-shadow: inset 0 0 0 4px rgba(204, 167, 90, .92);
}

.mzmp-live-profile [data-mzmp-position-toolbar] {
    position: absolute;
    z-index: 24;
    right: 50%;
    bottom: 18px;
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: max-content;
    max-width: calc(100% - 28px);
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(2, 11, 74, .94);
    box-shadow: 0 12px 30px rgba(2, 11, 74, .28);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    transform: translateX(50%);
    backdrop-filter: blur(12px);
}

.mzmp-live-profile [data-mzmp-position-toolbar][hidden] {
    display: none !important;
}

.mzmp-live-profile [data-mzmp-position-toolbar] button {
    appearance: none;
    min-width: 44px;
    min-height: 44px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 999px;
    background: #fff;
    color: var(--mzmp-live-navy);
    cursor: pointer;
    font-weight: 900;
}

.mzmp-live-profile .mzmp-live-profile__portrait [data-mzmp-position-toolbar],
.mzmp-live-profile [data-mzmp-position-surface="profile"] [data-mzmp-position-toolbar] {
    right: 50%;
    bottom: -68px;
    max-width: min(320px, calc(100vw - 24px));
}

/* Three profile sections */
.mzmp-live-profile .mzmp-live-profile__section-tabs {
    position: sticky;
    z-index: 55;
    top: 0;
    display: grid;
    width: 100%;
    min-height: 58px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    margin: 0;
    border-bottom: 1px solid #e9ecf1;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 4px 12px rgba(2, 11, 74, .035);
    backdrop-filter: blur(12px);
}

.mzmp-live-profile .mzmp-live-profile__section-tab {
    position: relative;
    appearance: none;
    min-width: 0;
    min-height: 58px;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: #2f3544;
    cursor: pointer;
    font-size: 17px;
    font-weight: 800;
}

.mzmp-live-profile .mzmp-live-profile__section-tab::after {
    position: absolute;
    right: 23%;
    bottom: -1px;
    left: 23%;
    height: 2px;
    border-radius: 999px;
    background: transparent;
    content: "";
}

.mzmp-live-profile .mzmp-live-profile__section-tab:hover,
.mzmp-live-profile .mzmp-live-profile__section-tab.is-active,
.mzmp-live-profile .mzmp-live-profile__section-tab[aria-selected="true"] {
    color: var(--mzmp-live-navy);
}

.mzmp-live-profile .mzmp-live-profile__section-tab.is-active::after,
.mzmp-live-profile .mzmp-live-profile__section-tab[aria-selected="true"]::after {
    background: var(--mzmp-live-navy);
}

.mzmp-live-profile .mzmp-live-profile__section-tab-badge {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    margin-inline-start: 5px;
    padding-inline: 5px;
    border-radius: 999px;
    background: var(--mzmp-live-danger);
    color: #fff;
    font-size: 11px;
}

/* The reference tabs are deliberately textual; the media hierarchy below
 * carries the visual icons. */
.mzmp-live-profile .mzmp-live-profile__section-tab > svg {
    display: none;
}

.mzmp-live-profile .mzmp-live-profile__body {
    width: 100%;
    min-height: 420px;
    margin: 0;
    padding: 6px var(--mzmp-live-gutter) 112px;
    background: #fff;
}

.mzmp-live-profile .mzmp-live-profile__panel {
    min-width: 0;
    animation: mzmp-live-fade-in .24s ease both;
}

/* Fixed first-level media types. Track is LTR so the requested visual order is
 * left→right: Memorials, Audio, Posts, Videos, Texts, Photos. Each button is RTL.
 */
.mzmp-live-profile .mzmp-live-profile__media-types-wrap {
    position: relative;
    margin: -1px var(--mzmp-live-gutter-negative) 0;
}

.mzmp-live-profile .mzmp-live-profile__media-types-wrap::before,
.mzmp-live-profile .mzmp-live-profile__media-types-wrap::after {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 8px;
    width: 25px;
    content: "";
    pointer-events: none;
}

.mzmp-live-profile .mzmp-live-profile__media-types-wrap::before {
    left: 0;
    background: linear-gradient(90deg, #fff, transparent);
}

.mzmp-live-profile .mzmp-live-profile__media-types-wrap::after {
    right: 0;
    background: linear-gradient(270deg, #fff, transparent);
}

.mzmp-live-profile .mzmp-live-profile__media-types {
    display: flex;
    width: 100%;
    align-items: stretch;
    gap: 2px;
    padding: 0 max(26px, calc((100% - 1120px) / 2)) 10px;
    overflow-x: auto;
    direction: ltr;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 26px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(2, 11, 74, .28) transparent;
}

.mzmp-live-profile .mzmp-live-profile__media-type {
    appearance: none;
    display: flex;
    min-width: 126px;
    min-height: 84px;
    flex: 1 0 126px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 10px 8px;
    border: 1px solid #edf0f4;
    border-radius: 10px;
    background: #fff;
    color: var(--mzmp-live-navy);
    cursor: pointer;
    direction: rtl;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.1;
    scroll-snap-align: start;
    transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.mzmp-live-profile .mzmp-live-profile__media-type:hover {
    background: #f5f7fb;
    transform: translateY(-1px);
}

.mzmp-live-profile .mzmp-live-profile__media-type.is-active,
.mzmp-live-profile .mzmp-live-profile__media-type[aria-selected="true"] {
    border-color: var(--mzmp-live-navy);
    background: var(--mzmp-live-navy);
    box-shadow: 0 8px 18px rgba(2, 11, 74, .2);
    color: #fff;
}

.mzmp-live-profile .mzmp-live-profile__media-type svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
}

/* Second-level fixed categories */
.mzmp-live-profile .mzmp-live-profile__subcategories {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 12px 0 14px;
    padding: 4px 2px 13px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 2px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(2, 11, 74, .25) transparent;
}

.mzmp-live-profile .mzmp-live-profile__subcategory {
    appearance: none;
    display: flex;
    width: 96px;
    min-width: 96px;
    align-items: center;
    flex-direction: column;
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #252c3d;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.22;
    scroll-snap-align: start;
    text-align: center;
}

.mzmp-live-profile .mzmp-live-profile__subcategory-mark {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    padding: 10px;
    border: 3px solid var(--mzmp-live-blue-bright);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 5px 13px rgba(2, 11, 74, .08);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.mzmp-live-profile .mzmp-live-profile__subcategory-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mzmp-live-profile .mzmp-live-profile__subcategory:hover .mzmp-live-profile__subcategory-mark,
.mzmp-live-profile .mzmp-live-profile__subcategory.is-active .mzmp-live-profile__subcategory-mark,
.mzmp-live-profile .mzmp-live-profile__subcategory[aria-pressed="true"] .mzmp-live-profile__subcategory-mark {
    border-color: var(--mzmp-live-gold);
    box-shadow: 0 7px 18px rgba(204, 167, 90, .25);
    transform: translateY(-2px);
}

.mzmp-live-profile .mzmp-live-profile__subcategory.is-active,
.mzmp-live-profile .mzmp-live-profile__subcategory[aria-pressed="true"] {
    color: var(--mzmp-live-navy);
}

/* Multi-file live uploader */
.mzmp-live-profile .mzmp-live-profile__upload-panel {
    display: none;
    margin: 4px 0 24px;
}

.mzmp-live-profile.is-editing .mzmp-live-profile__upload-panel {
    display: block;
}

.mzmp-live-profile .mzmp-live-profile__upload-label {
    display: block;
    margin: 0 0 7px;
    color: #1f2937;
    font-size: 16px;
    font-weight: 800;
}

.mzmp-live-profile .mzmp-live-profile__dropzone {
    position: relative;
    display: grid;
    min-height: 112px;
    place-items: center;
    padding: 18px;
    border: 1px dashed #c9d2df;
    border-radius: 2px;
    background: #fff;
    color: #253858;
    cursor: pointer;
    text-align: center;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.mzmp-live-profile .mzmp-live-profile__dropzone:hover,
.mzmp-live-profile .mzmp-live-profile__dropzone.is-dragover {
    border-color: var(--mzmp-live-blue);
    background: #f5f8fd;
    box-shadow: 0 0 0 4px rgba(25, 63, 143, .09);
}

.mzmp-live-profile .mzmp-live-profile__dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.mzmp-live-profile .mzmp-live-profile__dropzone-content {
    display: grid;
    place-items: center;
    gap: 5px;
}

.mzmp-live-profile .mzmp-live-profile__dropzone-content svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    color: var(--mzmp-live-navy);
}

.mzmp-live-profile .mzmp-live-profile__dropzone-content strong {
    font-size: 15px;
}

.mzmp-live-profile .mzmp-live-profile__dropzone-content u {
    color: var(--mzmp-live-gold-dark);
    font-weight: 900;
    text-underline-offset: 3px;
}

.mzmp-live-profile .mzmp-live-profile__dropzone-content small {
    color: var(--mzmp-live-muted);
    font-size: 12px;
}

.mzmp-live-profile .mzmp-live-profile__upload-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.mzmp-live-profile .mzmp-live-profile__upload-save {
    appearance: none;
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 28px;
    border: 0;
    border-radius: 4px;
    background: #162a42;
    box-shadow: 0 5px 14px rgba(2, 11, 74, .15);
    color: #e2b54d;
    cursor: pointer;
    font-weight: 900;
    transition: filter .18s ease, opacity .18s ease, transform .18s ease;
}

.mzmp-live-profile .mzmp-live-profile__upload-save:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.mzmp-live-profile .mzmp-live-profile__upload-save:disabled {
    cursor: default;
    opacity: .55;
    transform: none;
}

.mzmp-live-profile .mzmp-live-profile__upload-progress {
    display: grid;
    min-width: 0;
    gap: 5px;
    color: var(--mzmp-live-muted);
    font-size: 13px;
    font-weight: 700;
}

.mzmp-live-profile .mzmp-live-composer-shell {
    margin-top: 16px;
    border: 1px solid var(--mzmp-live-line);
    border-radius: 12px;
    background: #fff;
}

.mzmp-live-profile .mzmp-live-composer-shell[hidden],
.mzmp-live-profile [data-mzmp-composer-shell][hidden],
.mzmp-live-profile .mzmp-live-content-composer[hidden] {
    display: none !important;
}

.mzmp-live-profile .mzmp-live-composer-shell > summary {
    padding: 13px 16px;
    color: var(--mzmp-live-navy);
    cursor: pointer;
    font-weight: 900;
}

.mzmp-live-profile .mzmp-live-content-composer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 12px;
    padding: 0 16px 16px;
}

.mzmp-live-profile .mzmp-live-content-composer .mzmp-field--full,
.mzmp-live-profile .mzmp-live-content-composer .mzmp-form-status,
.mzmp-live-profile .mzmp-live-content-composer > button {
    grid-column: 1 / -1;
}

.mzmp-live-profile .mzmp-live-content-composer > button {
    justify-self: end;
}

.mzmp-live-profile .mzmp-live-content-composer[data-field-count="1"],
.mzmp-live-profile .mzmp-live-content-composer[data-layout="single"] {
    grid-template-columns: 1fr;
}

.mzmp-live-profile .mzmp-live-content-composer .mzmp-field {
    min-width: 0;
}

.mzmp-live-profile .mzmp-live-queue-item {
    position: relative;
    min-width: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 9px;
    background: #e8edf4;
}

.mzmp-live-profile .mzmp-live-queue-item > img,
.mzmp-live-profile .mzmp-live-queue-item > video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mzmp-live-profile .mzmp-live-queue-item__file {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    padding: 10px;
    overflow-wrap: anywhere;
    color: var(--mzmp-live-navy);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.mzmp-live-profile .mzmp-live-remove {
    position: absolute;
    z-index: 12;
    top: -6px;
    left: -6px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 23px;
    line-height: 1;
}

.mzmp-live-profile .mzmp-live-remove::before {
    position: absolute;
    z-index: -1;
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--mzmp-live-danger);
    box-shadow: 0 3px 9px rgba(0, 0, 0, .24);
    content: "";
}

.mzmp-live-profile .mzmp-live-profile__progress-track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf4;
}

.mzmp-live-profile .mzmp-live-profile__progress-bar {
    display: block;
    width: var(--mzmp-live-progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--mzmp-live-blue), var(--mzmp-live-gold));
    transition: width .22s ease;
}

/* Media gallery and edit overlays */
.mzmp-live-profile .mzmp-live-profile__gallery {
    display: grid;
    min-height: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 16px 18px;
}

.mzmp-live-profile .mzmp-live-profile__media-item {
    position: relative;
    min-width: 0;
    overflow: visible;
    border: 0;
    border-radius: 9px;
    background: #eef1f5;
    box-shadow: none;
    animation: mzmp-live-tile-in .24s ease both;
}

.mzmp-live-profile .mzmp-live-profile__media-item:hover {
    box-shadow: none;
    transform: none;
}

.mzmp-live-profile .mzmp-live-profile__media-trigger {
    position: relative;
    appearance: none;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 9px;
    background: #e6eaf0;
    color: #fff;
    cursor: zoom-in;
}

.mzmp-live-profile .mzmp-live-profile__media-item--photo .mzmp-live-profile__media-trigger,
.mzmp-live-profile .mzmp-live-profile__media-item--memorial .mzmp-live-profile__media-trigger,
.mzmp-live-profile .mzmp-live-profile__media-item--text-image .mzmp-live-profile__media-trigger,
.mzmp-live-profile .mzmp-media-card--texts.is-image .mzmp-live-profile__media-trigger,
.mzmp-live-profile [data-type="texts"][data-mzmp-image-backed] .mzmp-live-profile__media-trigger {
    aspect-ratio: 2.15 / 1;
}

.mzmp-live-profile .mzmp-live-profile__media-trigger img,
.mzmp-live-profile .mzmp-live-profile__media-trigger video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto;
    transition: transform .3s ease;
}

.mzmp-live-profile .mzmp-live-profile__media-trigger > span {
    display: none;
}

.mzmp-live-profile .mzmp-live-profile__media-trigger:hover img {
    transform: scale(1.025);
}

.mzmp-live-profile .mzmp-live-profile__media-item--video .mzmp-live-profile__media-trigger {
    aspect-ratio: 16 / 9;
    background: #203244;
    cursor: pointer;
}

.mzmp-live-profile .mzmp-live-profile__media-item--video {
    overflow: visible;
    background: #101c2d;
    box-shadow: 0 7px 20px rgba(2, 11, 74, .12);
}

.mzmp-live-profile .mzmp-live-profile__media-item--video .mzmp-live-profile__media-trigger > video,
.mzmp-live-profile .mzmp-live-profile__video-preview {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    aspect-ratio: 16 / 9;
    background: #101c2d;
    object-fit: cover;
    pointer-events: none;
}

.mzmp-live-profile .mzmp-live-profile__video-preview > video.is-preview-fallback {
    object-fit: contain;
    object-position: center;
    transform: none;
}

.mzmp-live-profile .mzmp-live-profile__video-preview > video.is-preview-loading {
    opacity: 0;
}

.mzmp-live-profile .mzmp-live-profile__video-preview > video.is-preview-ready {
    opacity: 1;
    object-fit: cover;
}

/* The preview is a direct span, so it must explicitly win over the generic
 * thumbnail-caption hiding rule above. */
.mzmp-live-profile .mzmp-live-profile__media-trigger > .mzmp-live-profile__video-preview {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.mzmp-live-profile .mzmp-live-profile__media-item--video .mzmp-live-profile__media-trigger:hover > video,
.mzmp-live-profile .mzmp-live-profile__media-item--video .mzmp-live-profile__media-trigger:hover .mzmp-live-profile__video-preview > video {
    transform: scale(1.025);
}

.mzmp-live-profile .mzmp-live-profile__video-title,
.mzmp-live-profile .mzmp-live-profile__media-item--video .mzmp-live-profile__media-trigger > .mzmp-live-profile__media-caption {
    position: absolute;
    z-index: 3;
    inset: auto 0 0;
    display: block;
    padding: 34px 13px 10px;
    overflow: hidden;
    background: linear-gradient(transparent, rgba(2, 11, 34, .92));
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mzmp-live-profile .mzmp-live-profile__video-fallback {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: clamp(28px, 12%, 68px);
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .14), transparent 42%),
        linear-gradient(145deg, #1d3552, #071629);
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 7px 16px rgba(0, 0, 0, .24));
    pointer-events: none;
    transform: none;
}

.mzmp-live-profile .mzmp-live-profile__video-preview > img.mzmp-live-profile__video-fallback {
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    transform: none;
}

.mzmp-live-profile .mzmp-live-profile__media-trigger:hover .mzmp-live-profile__video-preview > video.is-preview-fallback,
.mzmp-live-profile .mzmp-live-profile__media-trigger:hover .mzmp-live-profile__video-preview > img.mzmp-live-profile__video-fallback {
    transform: none;
}

.mzmp-live-profile .mzmp-live-profile__video-fallback[hidden] {
    display: none !important;
}

.mzmp-live-profile .mzmp-live-profile__play-mark {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
    background: rgba(2, 11, 74, .72);
    color: #fff;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.mzmp-live-profile .mzmp-live-profile__media-trigger > .mzmp-live-profile__play-mark {
    display: grid;
}

.mzmp-live-profile .mzmp-live-profile__video-preview > .mzmp-live-profile__video-fallback:not([hidden]) {
    display: block;
}

.mzmp-live-profile .mzmp-live-profile__play-mark svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.mzmp-live-profile .mzmp-live-profile__media-delete {
    position: absolute;
    z-index: 19;
    top: -9px;
    left: -9px;
    appearance: none;
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.mzmp-live-profile.is-editing .mzmp-live-profile__media-delete {
    display: grid;
}

.mzmp-live-profile .mzmp-live-profile__media-delete::before {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--mzmp-live-danger);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
    content: "";
}

.mzmp-live-profile .mzmp-live-profile__media-delete::after {
    position: relative;
    z-index: 1;
    content: "\00d7";
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.mzmp-live-profile .mzmp-live-profile__media-delete:hover::before {
    background: #a80721;
    transform: scale(1.07);
}

.mzmp-live-profile .mzmp-live-profile__media-state {
    position: absolute;
    z-index: 5;
    inset: auto 6px 6px auto;
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 3px 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(2, 11, 74, .85);
    color: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
}

.mzmp-live-profile .mzmp-live-profile__media-item--video .mzmp-live-profile__media-state {
    inset: 7px 7px auto auto;
}

.mzmp-live-profile .mzmp-live-profile__media-item.is-uploading {
    opacity: .72;
}

.mzmp-live-profile .mzmp-live-profile__media-item.is-uploading::after {
    position: absolute;
    z-index: 6;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, .7);
    border-top-color: var(--mzmp-live-navy);
    border-radius: 50%;
    content: "";
    animation: mzmp-live-spin .7s linear infinite;
    transform: translate(-50%, -50%);
}

.mzmp-live-profile .mzmp-live-profile__media-item.is-error {
    box-shadow: 0 0 0 3px rgba(200, 16, 46, .3);
}

.mzmp-live-profile .mzmp-live-profile__content-card {
    min-width: 0;
    min-height: 176px;
    padding: 18px;
    border: 1px solid var(--mzmp-live-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(2, 11, 74, .06);
    color: #344054;
    overflow-wrap: anywhere;
}

.mzmp-live-profile .mzmp-live-profile__content-card h3 {
    margin: 0 0 8px;
    color: var(--mzmp-live-navy);
    font-size: 18px;
}

.mzmp-live-profile .mzmp-live-profile__content-card p {
    margin: 0 0 10px;
}

.mzmp-live-profile .mzmp-live-profile__content-card audio {
    width: 100%;
}

.mzmp-live-profile .mzmp-live-profile__media-item--post .mzmp-live-profile__content-card,
.mzmp-live-profile [data-mzmp-media-item][data-type="links"] .mzmp-live-profile__content-card {
    min-height: 148px;
    padding: 16px;
}

.mzmp-live-profile .mzmp-live-profile__media-item--post .mzmp-live-profile__content-card p,
.mzmp-live-profile [data-mzmp-media-item][data-type="links"] .mzmp-live-profile__content-card p {
    display: none;
}

/* Video titles belong to the thumbnail, not to a tall white card beneath it. */
.mzmp-live-profile .mzmp-live-profile__media-item--video > .mzmp-live-profile__content-card {
    position: absolute;
    z-index: 3;
    inset: auto 0 0;
    min-height: 0;
    padding: 34px 13px 10px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(transparent, rgba(2, 11, 34, .92));
    box-shadow: none;
    color: #fff;
    pointer-events: none;
}

.mzmp-live-profile .mzmp-live-profile__media-item--video > .mzmp-live-profile__content-card h3 {
    margin: 0;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mzmp-live-profile .mzmp-live-profile__media-item--video > .mzmp-live-profile__content-card p,
.mzmp-live-profile .mzmp-live-profile__media-item--video > .mzmp-live-profile__content-card .mzmp-card-icon {
    display: none;
}

/* YouTube songs are intentionally a full-width, one-per-row listening surface. */
.mzmp-live-profile .mzmp-live-profile__media-item--song,
.mzmp-live-profile [data-mzmp-media-item][data-type="audio"][data-collection="שירים"] {
    overflow: visible;
    background: #fff;
    box-shadow: 0 8px 24px rgba(2, 11, 74, .1);
}

.mzmp-live-profile .mzmp-live-profile__media-item--song .mzmp-live-profile__content-card,
.mzmp-live-profile [data-mzmp-media-item][data-type="audio"][data-collection="שירים"] .mzmp-live-profile__content-card {
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
}

.mzmp-live-profile .mzmp-live-profile__media-item--song .mzmp-live-profile__media-state,
.mzmp-live-profile [data-mzmp-media-item][data-type="audio"][data-collection="שירים"] .mzmp-live-profile__media-state {
    inset: 8px 8px auto auto;
}

.mzmp-live-profile .mzmp-live-profile__media-item--song .mzmp-card-icon,
.mzmp-live-profile [data-mzmp-media-item][data-type="audio"][data-collection="שירים"] .mzmp-card-icon {
    display: none;
}

.mzmp-live-profile .mzmp-live-profile__media-item--song h3,
.mzmp-live-profile [data-mzmp-media-item][data-type="audio"][data-collection="שירים"] h3 {
    margin: 0;
    padding: 14px 18px;
    font-size: clamp(16px, 2vw, 20px);
}

.mzmp-live-profile .mzmp-live-profile__media-item--song .mzmp-oembed,
.mzmp-live-profile [data-mzmp-media-item][data-type="audio"][data-collection="שירים"] .mzmp-oembed {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    background: #050b16;
}

.mzmp-live-profile .mzmp-live-profile__song-player iframe,
.mzmp-live-profile .mzmp-live-profile__media-item--song .mzmp-oembed iframe,
.mzmp-live-profile [data-mzmp-media-item][data-type="audio"][data-collection="שירים"] .mzmp-oembed iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.mzmp-live-profile .mzmp-live-profile__empty {
    grid-column: 1 / -1;
    display: grid;
    min-height: 170px;
    place-items: center;
    padding: 24px;
    border: 1px dashed #c9d2df;
    background: #fafbfd;
    color: var(--mzmp-live-muted);
    text-align: center;
}

/* Media-management controls. These are deliberately independent of the
 * gallery's column rules: photos keep their three-column mosaic while video,
 * audio and link collections retain the one-column player/card layout. */
.mzmp-live-profile .mzmp-live-profile__media-actions {
    display: none;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 14px;
    padding: 7px 9px;
    border: 1px solid var(--mzmp-live-line);
    border-radius: 14px;
    background: #f8faff;
    box-shadow: 0 5px 16px rgba(2, 11, 74, .06);
}

.mzmp-live-profile.is-editing .mzmp-live-profile__media-actions {
    display: flex;
}

.mzmp-live-profile .mzmp-live-profile__media-actions[hidden] {
    display: none !important;
}

.mzmp-live-profile .mzmp-live-profile__media-actions-group {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.mzmp-live-profile .mzmp-live-profile__media-action,
.mzmp-live-profile .mzmp-live-profile__mode-action,
.mzmp-live-profile [data-mzmp-media-select-mode],
.mzmp-live-profile [data-mzmp-media-reorder-mode],
.mzmp-live-profile [data-mzmp-manage-collections] {
    appearance: none;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid rgba(25, 63, 143, .22);
    border-radius: 10px;
    background: #fff;
    color: var(--mzmp-live-navy);
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    touch-action: manipulation;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

.mzmp-live-profile .mzmp-live-profile__media-action:hover,
.mzmp-live-profile .mzmp-live-profile__mode-action:hover,
.mzmp-live-profile [data-mzmp-media-select-mode]:hover,
.mzmp-live-profile [data-mzmp-media-reorder-mode]:hover,
.mzmp-live-profile [data-mzmp-manage-collections]:hover,
.mzmp-live-profile .mzmp-live-profile__media-action[aria-pressed="true"],
.mzmp-live-profile .mzmp-live-profile__mode-action[aria-pressed="true"] {
    border-color: var(--mzmp-live-blue);
    background: #eef4ff;
    color: var(--mzmp-live-blue);
    transform: translateY(-1px);
}

.mzmp-live-profile .mzmp-live-profile__media-action svg,
.mzmp-live-profile .mzmp-live-profile__mode-action svg,
.mzmp-live-profile [data-mzmp-media-select-mode] svg,
.mzmp-live-profile [data-mzmp-media-reorder-mode] svg,
.mzmp-live-profile [data-mzmp-manage-collections] svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.mzmp-live-profile .mzmp-live-profile__selection-count {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--mzmp-live-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Selection is opt-in so ordinary gallery taps continue to open media. */
.mzmp-live-profile .mzmp-live-profile__item-select,
.mzmp-live-profile [data-mzmp-select-item] {
    position: absolute;
    z-index: 18;
    top: 5px;
    right: 5px;
    appearance: none;
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(2, 11, 74, .88);
    box-shadow: 0 5px 15px rgba(2, 11, 74, .24);
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
}

.mzmp-live-profile.is-selection-mode .mzmp-live-profile__item-select,
.mzmp-live-profile.is-selection-mode [data-mzmp-select-item],
.mzmp-live-profile.is-media-selecting .mzmp-live-profile__item-select,
.mzmp-live-profile.is-media-selecting [data-mzmp-select-item] {
    display: grid;
}

.mzmp-live-profile.is-selection-mode .mzmp-live-profile__media-delete,
.mzmp-live-profile.is-selection-mode .mzmp-live-profile__media-state,
.mzmp-live-profile.is-selection-mode .mzmp-live-profile__visibility-toggle,
.mzmp-live-profile.is-selection-mode [data-mzmp-toggle-visibility],
.mzmp-live-profile.is-media-selecting .mzmp-live-profile__media-delete,
.mzmp-live-profile.is-media-selecting .mzmp-live-profile__media-state,
.mzmp-live-profile.is-media-selecting .mzmp-live-profile__visibility-toggle,
.mzmp-live-profile.is-media-selecting [data-mzmp-toggle-visibility] {
    display: none;
}

.mzmp-live-profile .mzmp-live-profile__item-select svg,
.mzmp-live-profile [data-mzmp-select-item] svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.mzmp-live-profile .mzmp-live-profile__media-item.is-selected,
.mzmp-live-profile .mzmp-live-profile__media-item[aria-selected="true"],
.mzmp-live-profile .mzmp-live-profile__media-item[data-selected="true"] {
    z-index: 2;
    box-shadow:
        0 0 0 4px var(--mzmp-live-gold),
        0 9px 24px rgba(2, 11, 74, .18);
}

.mzmp-live-profile .mzmp-live-profile__media-item.is-selected .mzmp-live-profile__item-select,
.mzmp-live-profile .mzmp-live-profile__media-item[aria-selected="true"] [data-mzmp-select-item],
.mzmp-live-profile .mzmp-live-profile__media-item[data-selected="true"] [data-mzmp-select-item] {
    border-color: #fff;
    background: var(--mzmp-live-gold-dark);
}

/* Visibility is persisted separately from the existing DOM hidden attribute,
 * which remains reserved for active type/collection filtering. */
.mzmp-live-profile .mzmp-live-profile__visibility-toggle,
.mzmp-live-profile [data-mzmp-toggle-visibility] {
    position: absolute;
    z-index: 17;
    top: -9px;
    right: -9px;
    appearance: none;
    display: none;
    width: 22px;
    height: 22px;
    place-items: center;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--mzmp-live-navy);
    box-shadow: 0 5px 15px rgba(2, 11, 74, .25);
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.mzmp-live-profile.is-editing .mzmp-live-profile__visibility-toggle,
.mzmp-live-profile.is-editing [data-mzmp-toggle-visibility] {
    display: grid;
}

.mzmp-live-profile .mzmp-live-profile__visibility-toggle:hover,
.mzmp-live-profile [data-mzmp-toggle-visibility]:hover {
    background: var(--mzmp-live-blue);
    transform: translateY(-1px);
}

.mzmp-live-profile .mzmp-live-profile__visibility-toggle svg,
.mzmp-live-profile [data-mzmp-toggle-visibility] svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.mzmp-live-profile .mzmp-live-profile__media-item.is-public-hidden .mzmp-live-profile__visibility-toggle,
.mzmp-live-profile .mzmp-live-profile__media-item.is-public-hidden [data-mzmp-toggle-visibility],
.mzmp-live-profile .mzmp-live-profile__media-item[data-public-hidden="true"] [data-mzmp-toggle-visibility],
.mzmp-live-profile .mzmp-live-profile__media-item[data-public-visible="0"] [data-mzmp-toggle-visibility] {
    background: #5f6878;
    color: #fff;
}

.mzmp-live-profile .mzmp-live-profile__media-item.is-public-hidden > .mzmp-live-profile__media-trigger,
.mzmp-live-profile .mzmp-live-profile__media-item.is-public-hidden > .mzmp-live-profile__content-card,
.mzmp-live-profile .mzmp-live-profile__media-item[data-public-hidden="true"] > .mzmp-live-profile__media-trigger,
.mzmp-live-profile .mzmp-live-profile__media-item[data-public-hidden="true"] > .mzmp-live-profile__content-card,
.mzmp-live-profile .mzmp-live-profile__media-item[data-public-visible="0"] > .mzmp-live-profile__media-trigger,
.mzmp-live-profile .mzmp-live-profile__media-item[data-public-visible="0"] > .mzmp-live-profile__content-card {
    opacity: .54;
    filter: grayscale(.42);
}

.mzmp-live-profile .mzmp-live-profile__public-hidden-badge,
.mzmp-live-profile [data-mzmp-public-hidden-badge] {
    position: absolute;
    z-index: 16;
    bottom: 8px;
    left: 8px;
    display: none;
    min-height: 28px;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 999px;
    background: rgba(35, 42, 56, .92);
    box-shadow: 0 4px 12px rgba(2, 11, 34, .2);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    pointer-events: none;
}

.mzmp-live-profile .mzmp-live-profile__media-item.is-public-hidden .mzmp-live-profile__public-hidden-badge,
.mzmp-live-profile .mzmp-live-profile__media-item.is-public-hidden [data-mzmp-public-hidden-badge],
.mzmp-live-profile .mzmp-live-profile__media-item[data-public-hidden="true"] [data-mzmp-public-hidden-badge],
.mzmp-live-profile .mzmp-live-profile__media-item[data-public-visible="0"] [data-mzmp-public-hidden-badge] {
    display: inline-flex;
}

.mzmp-live-profile .mzmp-live-profile__public-hidden-badge svg,
.mzmp-live-profile [data-mzmp-public-hidden-badge] svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Reordering is isolated behind an explicit mode. Only the handle and the
 * active fixed ghost disable touch scrolling; cards and the grid never do. */
.mzmp-live-profile .mzmp-live-profile__reorder-handle,
.mzmp-live-profile [data-mzmp-reorder-handle] {
    position: absolute;
    z-index: 20;
    top: 50%;
    left: 50%;
    appearance: none;
    display: none;
    width: 48px;
    height: 48px;
    place-items: center;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--mzmp-live-navy);
    box-shadow: 0 8px 22px rgba(2, 11, 74, .34);
    color: #fff;
    cursor: grab;
    touch-action: none;
    transform: translate(-50%, -50%);
}

.mzmp-live-profile.is-reorder-mode .mzmp-live-profile__reorder-handle,
.mzmp-live-profile.is-reorder-mode [data-mzmp-reorder-handle],
.mzmp-live-profile.is-media-reordering .mzmp-live-profile__reorder-handle,
.mzmp-live-profile.is-media-reordering [data-mzmp-reorder-handle] {
    display: grid;
}

.mzmp-live-profile .mzmp-live-profile__reorder-handle:active,
.mzmp-live-profile [data-mzmp-reorder-handle]:active {
    cursor: grabbing;
    background: var(--mzmp-live-blue);
}

.mzmp-live-profile .mzmp-live-profile__reorder-handle svg,
.mzmp-live-profile [data-mzmp-reorder-handle] svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.mzmp-live-profile.is-reorder-mode .mzmp-live-profile__media-item,
.mzmp-live-profile.is-media-reordering .mzmp-live-profile__media-item {
    box-shadow: 0 0 0 1px rgba(25, 63, 143, .2), 0 7px 18px rgba(2, 11, 74, .08);
}

.mzmp-live-profile.is-reorder-mode .mzmp-live-profile__media-trigger,
.mzmp-live-profile.is-reorder-mode .mzmp-live-profile__content-card,
.mzmp-live-profile.is-media-reordering .mzmp-live-profile__media-trigger,
.mzmp-live-profile.is-media-reordering .mzmp-live-profile__content-card {
    pointer-events: none;
    user-select: none;
}

.mzmp-live-profile.is-reorder-mode .mzmp-live-profile__media-delete,
.mzmp-live-profile.is-reorder-mode .mzmp-live-profile__media-state,
.mzmp-live-profile.is-reorder-mode .mzmp-live-profile__visibility-toggle,
.mzmp-live-profile.is-reorder-mode [data-mzmp-toggle-visibility],
.mzmp-live-profile.is-media-reordering .mzmp-live-profile__media-delete,
.mzmp-live-profile.is-media-reordering .mzmp-live-profile__media-state,
.mzmp-live-profile.is-media-reordering .mzmp-live-profile__visibility-toggle,
.mzmp-live-profile.is-media-reordering [data-mzmp-toggle-visibility] {
    display: none;
}

.mzmp-live-profile .mzmp-live-profile__interaction-shield,
.mzmp-live-profile [data-mzmp-interaction-shield] {
    position: absolute;
    z-index: 19;
    inset: 0;
    display: none;
    border-radius: inherit;
    background: rgba(255, 255, 255, .06);
    cursor: grab;
}

.mzmp-live-profile.is-reorder-mode .mzmp-live-profile__interaction-shield,
.mzmp-live-profile.is-reorder-mode [data-mzmp-interaction-shield],
.mzmp-live-profile.is-media-reordering .mzmp-live-profile__interaction-shield,
.mzmp-live-profile.is-media-reordering [data-mzmp-interaction-shield] {
    display: block;
}

.mzmp-live-profile .mzmp-live-profile__media-item.is-reorder-dragging,
.mzmp-live-profile .mzmp-live-profile__media-item[aria-grabbed="true"] {
    opacity: .25;
}

.mzmp-live-profile .mzmp-live-profile__reorder-placeholder,
.mzmp-live-profile [data-mzmp-reorder-placeholder] {
    min-width: 0;
    min-height: var(--mzmp-reorder-placeholder-height, 112px);
    border: 3px dashed var(--mzmp-live-gold);
    border-radius: 11px;
    background: rgba(204, 167, 90, .12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9);
}

.mzmp-live-profile .mzmp-live-profile__reorder-ghost,
.mzmp-live-profile [data-mzmp-reorder-ghost] {
    position: fixed !important;
    z-index: 10060;
    top: var(--mzmp-reorder-ghost-y, 0);
    left: var(--mzmp-reorder-ghost-x, 0);
    width: var(--mzmp-reorder-ghost-width, 260px);
    max-width: calc(100vw - 24px);
    margin: 0 !important;
    opacity: .94;
    box-shadow: 0 22px 58px rgba(2, 11, 74, .38) !important;
    pointer-events: none;
    touch-action: none;
    transform: translate3d(-50%, -50%, 0) rotate(.8deg);
    will-change: top, left, transform;
}

/* Fixed save/cancel surface for selection and reorder transactions. */
.mzmp-live-profile .mzmp-live-profile__mode-bar {
    position: fixed;
    z-index: 190;
    right: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    display: none;
    width: min(calc(100% - 24px), 680px);
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 18px;
    background: rgba(2, 11, 74, .96);
    box-shadow: 0 18px 48px rgba(2, 11, 74, .3);
    color: #fff;
    transform: translateX(50%);
    backdrop-filter: blur(14px);
}

.mzmp-live-profile.is-selection-mode [data-mzmp-selection-bar],
.mzmp-live-profile.is-media-selecting [data-mzmp-selection-bar],
.mzmp-live-profile.is-reorder-mode [data-mzmp-reorder-bar],
.mzmp-live-profile.is-media-reordering [data-mzmp-reorder-bar],
.mzmp-live-profile .mzmp-live-profile__mode-bar.is-active {
    display: flex;
}

.mzmp-live-profile.is-selection-mode .mzmp-live-profile__edit-toolbar,
.mzmp-live-profile.is-media-selecting .mzmp-live-profile__edit-toolbar,
.mzmp-live-profile.is-reorder-mode .mzmp-live-profile__edit-toolbar,
.mzmp-live-profile.is-media-reordering .mzmp-live-profile__edit-toolbar {
    visibility: hidden;
    pointer-events: none;
}

.mzmp-live-profile .mzmp-live-profile__mode-bar-copy {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mzmp-live-profile .mzmp-live-profile__mode-bar-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
}

.mzmp-live-profile .mzmp-live-profile__mode-bar button {
    appearance: none;
    min-width: 92px;
    min-height: 44px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 11px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    touch-action: manipulation;
}

.mzmp-live-profile .mzmp-live-profile__mode-bar button[data-mzmp-save-selection],
.mzmp-live-profile .mzmp-live-profile__mode-bar button[data-mzmp-save-reorder],
.mzmp-live-profile .mzmp-live-profile__mode-bar .is-primary {
    border-color: #fff;
    background: #fff;
    color: var(--mzmp-live-navy);
}

/* Per-profile collection manager. It is centered on desktop and becomes a
 * bottom sheet on narrow touch screens without changing the media grid. */
.mzmp-live-profile .mzmp-collection-manager,
.mzmp-live-profile [data-mzmp-collection-manager] {
    position: fixed;
    z-index: 10030;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    direction: rtl;
}

.mzmp-live-profile .mzmp-collection-manager[hidden],
.mzmp-live-profile [data-mzmp-collection-manager][hidden] {
    display: none !important;
}

.mzmp-live-profile .mzmp-collection-manager__backdrop,
.mzmp-live-profile [data-mzmp-collection-manager-backdrop] {
    position: absolute;
    inset: 0;
    background: rgba(2, 11, 34, .7);
    backdrop-filter: blur(4px);
}

.mzmp-live-profile .mzmp-collection-manager__panel,
.mzmp-live-profile [data-mzmp-collection-manager-panel] {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 640px);
    max-height: min(780px, calc(100svh - 36px));
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: auto;
    border: 1px solid var(--mzmp-live-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(2, 11, 74, .36);
}

.mzmp-live-profile .mzmp-collection-manager__header,
.mzmp-live-profile [data-mzmp-collection-manager-header] {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--mzmp-live-line);
    background: rgba(255, 255, 255, .97);
}

.mzmp-live-profile .mzmp-collection-manager__header h2,
.mzmp-live-profile [data-mzmp-collection-manager-header] h2 {
    margin: 0;
    color: var(--mzmp-live-navy);
    font-size: 22px;
    line-height: 1.25;
}

.mzmp-live-profile .mzmp-collection-manager__close,
.mzmp-live-profile [data-mzmp-close-collection-manager] {
    appearance: none;
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #edf1f7;
    color: var(--mzmp-live-navy);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    touch-action: manipulation;
}

.mzmp-live-profile .mzmp-collection-manager__body,
.mzmp-live-profile [data-mzmp-collection-manager-body] {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 16px 18px;
    overflow-y: auto;
}

.mzmp-live-profile .mzmp-collection-manager__list,
.mzmp-live-profile [data-mzmp-collection-list] {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mzmp-live-profile .mzmp-collection-manager__item,
.mzmp-live-profile [data-mzmp-collection-row] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 7px 8px 7px 12px;
    border: 1px solid var(--mzmp-live-line);
    border-radius: 12px;
    background: #fff;
}

.mzmp-live-profile .mzmp-collection-manager__item-name,
.mzmp-live-profile [data-mzmp-collection-row] input {
    min-width: 0;
}

.mzmp-live-profile .mzmp-collection-manager__item-actions {
    display: flex;
    gap: 5px;
}

.mzmp-live-profile .mzmp-collection-manager__item-actions button,
.mzmp-live-profile [data-mzmp-collection-row] button {
    appearance: none;
    min-width: 44px;
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid var(--mzmp-live-line);
    border-radius: 9px;
    background: #fff;
    color: var(--mzmp-live-navy);
    cursor: pointer;
    font-weight: 800;
    touch-action: manipulation;
}

.mzmp-live-profile .mzmp-collection-manager__item-actions .is-danger,
.mzmp-live-profile [data-mzmp-delete-collection] {
    color: var(--mzmp-live-danger);
}

.mzmp-live-profile .mzmp-collection-manager__form,
.mzmp-live-profile [data-mzmp-collection-form] {
    position: sticky;
    z-index: 2;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 14px 18px;
    border-top: 1px solid var(--mzmp-live-line);
    background: rgba(255, 255, 255, .98);
}

.mzmp-live-profile .mzmp-collection-manager__form input,
.mzmp-live-profile [data-mzmp-collection-form] input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 9px 12px;
    border: 1px solid #cbd4e2;
    border-radius: 10px;
    background: #fff;
    color: var(--mzmp-live-ink);
}

.mzmp-live-profile .mzmp-collection-manager__form button,
.mzmp-live-profile [data-mzmp-collection-form] button {
    min-width: 108px;
    min-height: 46px;
}

/* Destructive collection deletion stays centered on every viewport. */
.mzmp-live-profile .mzmp-destructive-dialog,
.mzmp-live-profile [data-mzmp-destructive-dialog] {
    position: fixed;
    z-index: 10050;
    inset: 0;
    display: grid;
    place-items: center;
    padding:
        max(18px, env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
    direction: rtl;
}

.mzmp-live-profile .mzmp-destructive-dialog[hidden],
.mzmp-live-profile [data-mzmp-destructive-dialog][hidden] {
    display: none !important;
}

.mzmp-live-profile .mzmp-destructive-dialog__backdrop,
.mzmp-live-profile [data-mzmp-destructive-backdrop] {
    position: absolute;
    inset: 0;
    background: rgba(28, 4, 12, .78);
    backdrop-filter: blur(5px);
}

.mzmp-live-profile .mzmp-destructive-dialog__panel,
.mzmp-live-profile [data-mzmp-destructive-panel] {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    max-height: calc(100svh - 36px);
    overflow: auto;
    padding: 28px clamp(20px, 4vw, 34px) 24px;
    border: 2px solid rgba(200, 16, 46, .28);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 32px 90px rgba(28, 4, 12, .46);
    text-align: center;
}

.mzmp-live-profile .mzmp-destructive-dialog__icon,
.mzmp-live-profile [data-mzmp-destructive-icon] {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    margin: 0 auto 13px;
    border-radius: 50%;
    background: #fff0f3;
    color: var(--mzmp-live-danger);
}

.mzmp-live-profile .mzmp-destructive-dialog__panel h2,
.mzmp-live-profile [data-mzmp-destructive-panel] h2 {
    margin: 0 0 9px;
    color: #641126;
    font-size: clamp(22px, 4vw, 28px);
    line-height: 1.25;
}

.mzmp-live-profile .mzmp-destructive-dialog__panel p,
.mzmp-live-profile [data-mzmp-destructive-panel] p {
    margin: 0 0 12px;
    color: #5f3440;
    line-height: 1.7;
}

.mzmp-live-profile .mzmp-destructive-dialog__summary,
.mzmp-live-profile [data-mzmp-destructive-summary] {
    margin: 15px 0;
    padding: 11px 13px;
    border: 1px solid #f3c8d2;
    border-radius: 11px;
    background: #fff7f9;
    color: #641126;
    font-weight: 900;
}

.mzmp-live-profile .mzmp-destructive-dialog__actions,
.mzmp-live-profile [data-mzmp-destructive-actions] {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 19px;
}

.mzmp-live-profile .mzmp-destructive-dialog__actions button,
.mzmp-live-profile [data-mzmp-destructive-actions] button {
    appearance: none;
    min-width: 132px;
    min-height: 46px;
    padding: 9px 15px;
    border: 1px solid var(--mzmp-live-line);
    border-radius: 11px;
    background: #fff;
    color: var(--mzmp-live-navy);
    cursor: pointer;
    font-weight: 900;
    touch-action: manipulation;
}

.mzmp-live-profile .mzmp-destructive-dialog__actions .is-danger,
.mzmp-live-profile [data-mzmp-confirm-destructive] {
    border-color: var(--mzmp-live-danger);
    background: var(--mzmp-live-danger);
    color: #fff;
}

.mzmp-live-profile .mzmp-collection-manager :focus-visible,
.mzmp-live-profile [data-mzmp-collection-manager] :focus-visible,
.mzmp-live-profile .mzmp-destructive-dialog :focus-visible,
.mzmp-live-profile [data-mzmp-destructive-dialog] :focus-visible {
    outline: 3px solid var(--mzmp-live-gold);
    outline-offset: 3px;
}

/* Consistent pending feedback for all new asynchronous media operations. */
.mzmp-live-profile .mzmp-live-profile__media-actions .is-busy,
.mzmp-live-profile .mzmp-live-profile__mode-bar .is-busy,
.mzmp-live-profile .mzmp-collection-manager .is-busy,
.mzmp-live-profile [data-mzmp-collection-manager] [aria-busy="true"],
.mzmp-live-profile .mzmp-destructive-dialog .is-busy,
.mzmp-live-profile [data-mzmp-destructive-dialog] [aria-busy="true"],
.mzmp-live-profile [data-mzmp-toggle-visibility][aria-busy="true"] {
    cursor: wait;
    opacity: .68;
    pointer-events: none;
}

.mzmp-live-profile .mzmp-live-profile__media-actions button[aria-busy="true"],
.mzmp-live-profile .mzmp-live-profile__mode-bar button[aria-busy="true"],
.mzmp-live-profile .mzmp-collection-manager button[aria-busy="true"],
.mzmp-live-profile [data-mzmp-collection-manager] button[aria-busy="true"],
.mzmp-live-profile .mzmp-destructive-dialog button[aria-busy="true"],
.mzmp-live-profile [data-mzmp-destructive-dialog] button[aria-busy="true"],
.mzmp-live-profile [data-mzmp-toggle-visibility][aria-busy="true"] {
    position: relative;
}

.mzmp-live-profile .mzmp-live-profile__media-actions button[aria-busy="true"]::after,
.mzmp-live-profile .mzmp-live-profile__mode-bar button[aria-busy="true"]::after,
.mzmp-live-profile .mzmp-collection-manager button[aria-busy="true"]::after,
.mzmp-live-profile [data-mzmp-collection-manager] button[aria-busy="true"]::after,
.mzmp-live-profile .mzmp-destructive-dialog button[aria-busy="true"]::after,
.mzmp-live-profile [data-mzmp-destructive-dialog] button[aria-busy="true"]::after,
.mzmp-live-profile [data-mzmp-toggle-visibility][aria-busy="true"]::after {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    animation: mzmp-live-control-spin .7s linear infinite;
}

/* Empty navigation is an editor action state, not an empty public gallery. */
.mzmp-live-profile .mzmp-live-profile__zero-collections,
.mzmp-live-profile [data-mzmp-zero-collections] {
    display: grid;
    min-height: 176px;
    place-items: center;
    gap: 10px;
    margin: 10px 0 18px;
    padding: 24px;
    border: 2px dashed #bdc9da;
    border-radius: 14px;
    background: #f8faff;
    color: var(--mzmp-live-muted);
    text-align: center;
}

.mzmp-live-profile .mzmp-live-profile__zero-collections h3,
.mzmp-live-profile [data-mzmp-zero-collections] h3 {
    margin: 0;
    color: var(--mzmp-live-navy);
    font-size: 20px;
}

.mzmp-live-profile .mzmp-live-profile__zero-collections p,
.mzmp-live-profile [data-mzmp-zero-collections] p {
    max-width: 48ch;
    margin: 0;
}

.mzmp-live-profile .mzmp-live-profile__zero-collections button,
.mzmp-live-profile [data-mzmp-zero-collections] button {
    appearance: none;
    min-height: 46px;
    padding: 9px 18px;
    border: 0;
    border-radius: 11px;
    background: var(--mzmp-live-navy);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    touch-action: manipulation;
}

/* About and memories keep the same visual surface in both modes. */
.mzmp-live-profile .mzmp-live-profile__about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(250px, .65fr);
    align-items: start;
    gap: 20px;
    padding-top: 12px;
}

.mzmp-live-profile .mzmp-live-profile__prose,
.mzmp-live-profile .mzmp-live-profile__service-card {
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid var(--mzmp-live-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(2, 11, 74, .06);
}

.mzmp-live-profile .mzmp-live-profile__prose {
    color: #344054;
    font-size: 17px;
    line-height: 1.9;
}

.mzmp-live-profile .mzmp-live-profile__prose textarea,
.mzmp-live-profile .mzmp-live-profile__service-card textarea {
    width: 100%;
    min-height: 260px;
    padding: 14px;
    border: 1px dashed rgba(25, 63, 143, .45);
    border-radius: 10px;
    color: inherit;
    line-height: inherit;
    resize: vertical;
}

.mzmp-live-profile .mzmp-live-profile__service-card textarea {
    min-height: 150px;
}

/* Sticky dirty-state toolbar */
.mzmp-live-profile .mzmp-live-profile__edit-toolbar {
    position: fixed;
    z-index: 160;
    right: 50%;
    bottom: max(14px, env(safe-area-inset-bottom));
    display: none;
    width: min(calc(100% - 28px), 900px);
    min-height: 62px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 11px 9px 18px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(2, 11, 74, .96);
    box-shadow: 0 18px 42px rgba(2, 11, 74, .28);
    color: #fff;
    transform: translateX(50%);
    backdrop-filter: blur(16px);
}

.mzmp-live-profile .mzmp-live-toolbar__profile,
.mzmp-live-profile .mzmp-live-toolbar__actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.mzmp-live-profile .mzmp-live-toolbar__profile label {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    font-weight: 800;
}

.mzmp-live-profile .mzmp-live-toolbar__profile select {
    width: min(100%, 190px);
    min-height: 40px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.mzmp-live-profile .mzmp-live-toolbar__profile select option {
    color: #111;
}

.mzmp-live-profile .mzmp-live-toolbar__actions {
    white-space: nowrap;
}

.mzmp-live-profile .mzmp-live-toolbar__actions .mzmp-button,
.mzmp-live-profile .mzmp-live-toolbar__actions .mzmp-link-button {
    min-height: 40px;
    padding: 7px 12px;
    font-size: 12px;
}

.mzmp-live-profile.is-editing .mzmp-live-profile__edit-toolbar {
    display: grid;
}

.mzmp-live-profile .mzmp-live-profile__save-status {
    min-width: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mzmp-live-profile .mzmp-live-profile__save-status.is-saved {
    color: #a8efca;
}

.mzmp-live-profile .mzmp-live-profile__save-status.is-success {
    color: #a8efca;
}

.mzmp-live-profile .mzmp-live-profile__save-status.is-error {
    color: #ffc6cf;
}

.mzmp-live-profile .mzmp-live-profile__toolbar-button {
    appearance: none;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}

.mzmp-live-profile .mzmp-live-profile__toolbar-button--save {
    border-color: var(--mzmp-live-gold);
    background: var(--mzmp-live-gold);
    color: var(--mzmp-live-navy);
}

.mzmp-live-profile .mzmp-live-profile__toolbar-button:disabled {
    cursor: default;
    opacity: .55;
}

/* Public sharing pill */
.mzmp-live-profile .mzmp-live-profile__share-bar {
    position: fixed;
    z-index: 145;
    right: 50%;
    bottom: max(0px, env(safe-area-inset-bottom));
    display: flex;
    width: min(calc(100% - 28px), 440px);
    min-height: 64px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 9px 21px;
    border-radius: 999px 999px 0 0;
    background: var(--mzmp-live-navy);
    box-shadow: 0 -8px 28px rgba(2, 11, 74, .2);
    color: #fff;
    transform: translateX(50%);
}

.mzmp-live-profile.is-editing .mzmp-live-profile__share-bar {
    display: none;
}

.mzmp-live-profile .mzmp-live-profile__share-label {
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.mzmp-live-profile .mzmp-live-profile__share-link {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    text-decoration: none;
    transition: background-color .18s ease, transform .18s ease;
}

.mzmp-live-profile .mzmp-live-remove-image {
    position: absolute;
    z-index: 13;
    display: none !important;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--mzmp-live-danger);
    box-shadow: 0 5px 14px rgba(0, 0, 0, .25);
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.mzmp-live-profile .mzmp-live-profile__cover > .mzmp-live-remove-image {
    top: 21px;
    right: 70px;
}

.mzmp-live-profile .mzmp-live-remove-image--portrait {
    right: -8px;
    bottom: 48px;
}

.mzmp-live-profile .mzmp-live-profile__share-link:hover {
    background: rgba(255, 255, 255, .14);
    transform: translateY(-1px);
}

.mzmp-live-profile .mzmp-live-profile__share-link svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Editor utility drawer */
.mzmp-live-profile .mzmp-live-profile__drawer-backdrop {
    position: fixed;
    z-index: 198;
    inset: 0;
    visibility: hidden;
    background: rgba(2, 11, 34, .56);
    opacity: 0;
    transition: opacity .2s ease, visibility 0s linear .2s;
}

.mzmp-live-profile .mzmp-live-profile__drawer-backdrop.is-open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.mzmp-live-profile .mzmp-live-profile__drawer {
    position: fixed;
    z-index: 200;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(92vw, 390px);
    padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    overflow-y: auto;
    background: #fff;
    box-shadow: -18px 0 50px rgba(2, 11, 74, .22);
    transform: translateX(104%);
    transition: transform .24s ease;
}

.mzmp-live-profile .mzmp-live-profile__drawer.is-open {
    transform: translateX(0);
}

/* Inline content editor opened from a media-card pencil control. */
.mzmp-live-profile .mzmp-live-content-edit-dialog {
    position: fixed;
    z-index: 10020;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
}

.mzmp-live-profile .mzmp-live-content-edit-dialog[hidden] {
    display: none !important;
}

.mzmp-live-profile .mzmp-live-content-edit-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 11, 74, .72);
    backdrop-filter: blur(3px);
}

.mzmp-live-profile .mzmp-live-content-edit-dialog__panel {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 560px);
    max-height: min(760px, calc(100svh - 36px));
    gap: 16px;
    overflow: auto;
    padding: 24px;
    border: 1px solid var(--mzmp-live-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(2, 11, 74, .3);
}

.mzmp-live-profile .mzmp-live-content-edit-dialog__panel > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.mzmp-live-profile .mzmp-live-content-edit-dialog__panel > header h2 {
    margin: 0;
    color: var(--mzmp-live-navy);
    font-size: 24px;
}

.mzmp-live-profile .mzmp-live-content-edit-dialog__panel > header button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #eef1f7;
    color: var(--mzmp-live-navy);
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
}

.mzmp-live-profile .mzmp-live-profile__drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--mzmp-live-line);
}

.mzmp-live-profile .mzmp-live-profile__drawer-head h2 {
    margin: 0;
    color: var(--mzmp-live-navy);
    font-size: 22px;
}

.mzmp-live-profile .mzmp-live-profile__drawer-close {
    appearance: none;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef2f7;
    color: var(--mzmp-live-navy);
    cursor: pointer;
    font-size: 28px;
}

.mzmp-live-profile .mzmp-live-profile__drawer-menu {
    display: grid;
    gap: 8px;
    margin: 18px 0;
}

.mzmp-live-profile .mzmp-live-profile__drawer-link {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid var(--mzmp-live-line);
    border-radius: 11px;
    background: #fff;
    color: var(--mzmp-live-ink);
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
}

.mzmp-live-profile .mzmp-live-profile__drawer-link:hover {
    border-color: rgba(25, 63, 143, .4);
    background: #f5f8fd;
}

/* Full-screen media lightbox */
.mzmp-live-profile .mzmp-live-profile__lightbox {
    position: fixed;
    z-index: 260;
    inset: 0;
    visibility: hidden;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    grid-template-rows: 64px minmax(0, 1fr) 54px;
    place-items: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: rgba(1, 6, 31, .96);
    color: #fff;
    opacity: 0;
    transition: opacity .2s ease, visibility 0s linear .2s;
}

.mzmp-live-profile .mzmp-live-profile__lightbox.is-open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.mzmp-live-profile .mzmp-live-profile__lightbox-stage {
    display: grid;
    width: 100%;
    height: 100%;
    grid-column: 2;
    grid-row: 2;
    place-items: center;
    overflow: hidden;
}

.mzmp-live-profile .mzmp-live-profile__lightbox-stage img,
.mzmp-live-profile .mzmp-live-profile__lightbox-stage video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.mzmp-live-profile .mzmp-live-profile__lightbox-button {
    appearance: none;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
    font-size: 38px;
    line-height: 1;
}

.mzmp-live-profile .mzmp-live-profile__lightbox-close {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

.mzmp-live-profile .mzmp-live-profile__lightbox-prev {
    grid-column: 1;
    grid-row: 2;
}

.mzmp-live-profile .mzmp-live-profile__lightbox-next {
    grid-column: 3;
    grid-row: 2;
}

.mzmp-live-profile .mzmp-live-profile__lightbox-caption {
    max-width: 80ch;
    grid-column: 1 / -1;
    grid-row: 3;
    overflow: hidden;
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Respectful candle confirmation. The modal may be appended to <body>, so its
 * unique prefix intentionally does not depend on a .mzmp-live-profile ancestor. */
.mzmp-candle-modal,
[data-mzmp-candle-modal] {
    position: fixed;
    z-index: 1000001;
    inset: 0;
    visibility: hidden;
    display: grid;
    place-items: center;
    padding:
        max(18px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
    direction: rtl;
    opacity: 0;
    color: #07143f;
    font-family: "Heebo", "Assistant", Arial, sans-serif;
    text-align: center;
    transition: opacity .24s ease, visibility 0s linear .24s;
}

.mzmp-candle-modal[hidden],
[data-mzmp-candle-modal][hidden] {
    display: none !important;
}

.mzmp-candle-modal.is-open,
[data-mzmp-candle-modal].is-open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.mzmp-candle-modal__backdrop,
[data-mzmp-candle-backdrop] {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(204, 167, 90, .2), transparent 38%),
        rgba(1, 7, 27, .8);
    backdrop-filter: blur(6px);
}

.mzmp-candle-modal__dialog,
.mzmp-candle-modal__panel,
[data-mzmp-candle-dialog] {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    max-height: calc(100svh - 36px);
    overflow: auto;
    padding: 34px clamp(22px, 5vw, 42px) 30px;
    border: 1px solid rgba(204, 167, 90, .42);
    border-radius: 26px;
    background:
        radial-gradient(circle at 50% 0, rgba(255, 239, 196, .64), transparent 42%),
        #fff;
    box-shadow: 0 30px 90px rgba(1, 7, 27, .42);
    opacity: 0;
    transform: translateY(14px) scale(.965);
    transition: opacity .28s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
}

.mzmp-candle-modal.is-open .mzmp-candle-modal__dialog,
.mzmp-candle-modal.is-open .mzmp-candle-modal__panel,
[data-mzmp-candle-modal].is-open [data-mzmp-candle-dialog] {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.mzmp-candle-modal__close,
[data-mzmp-close-candle-modal],
[data-mzmp-candle-modal-close] {
    position: absolute;
    top: 12px;
    left: 12px;
    appearance: none;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(7, 20, 63, .07);
    color: #07143f;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 28px;
    line-height: 1;
}

.mzmp-candle-modal__close:hover,
[data-mzmp-close-candle-modal]:hover,
[data-mzmp-candle-modal-close]:hover {
    background: rgba(7, 20, 63, .13);
}

.mzmp-candle-modal :focus-visible,
[data-mzmp-candle-modal] :focus-visible {
    outline: 3px solid rgba(204, 167, 90, .76);
    outline-offset: 3px;
}

.mzmp-candle-modal__flame,
[data-mzmp-candle-flame] {
    position: relative;
    display: grid;
    width: 82px;
    height: 96px;
    place-items: end center;
    margin: 0 auto 14px;
}

.mzmp-candle-modal__flame::before,
[data-mzmp-candle-flame]::before {
    position: absolute;
    top: 7px;
    width: 31px;
    height: 48px;
    border-radius: 68% 32% 62% 38% / 72% 42% 58% 28%;
    background: linear-gradient(145deg, #fff6c9 8%, #f5c24e 48%, #d9801d 100%);
    box-shadow:
        0 0 17px rgba(245, 194, 78, .8),
        0 0 38px rgba(217, 128, 29, .42);
    content: "";
    transform: rotate(7deg);
    transform-origin: 50% 100%;
    animation: mzmp-candle-flicker 2.3s ease-in-out infinite;
}

.mzmp-candle-modal__flame::after,
[data-mzmp-candle-flame]::after {
    width: 42px;
    height: 49px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(90deg, #f4ead2, #fff 48%, #e7d7b6);
    box-shadow: 0 8px 18px rgba(7, 20, 63, .14);
    content: "";
}

.mzmp-candle-modal__dialog h2,
.mzmp-candle-modal__panel h2,
[data-mzmp-candle-dialog] h2 {
    margin: 0 0 9px;
    color: #07143f;
    font-size: clamp(24px, 5vw, 32px);
    line-height: 1.2;
}

.mzmp-candle-modal__dialog p,
.mzmp-candle-modal__panel p,
[data-mzmp-candle-dialog] p {
    margin: 0;
    color: #556176;
    font-size: clamp(15px, 3.5vw, 18px);
    line-height: 1.75;
}

.mzmp-candle-modal__name,
[data-mzmp-candle-profile-name] {
    color: #a97921;
    font-weight: 900;
}

@keyframes mzmp-candle-flicker {
    0%, 100% { transform: rotate(7deg) scale(1); }
    35% { transform: rotate(-4deg) scale(.96, 1.04); }
    68% { transform: rotate(3deg) scale(1.04, .98); }
}

@keyframes mzmp-live-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes mzmp-live-tile-in {
    from { opacity: 0; transform: scale(.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes mzmp-live-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes mzmp-live-control-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1023px) {
    .mzmp-live-profile {
        width: 100%;
        box-shadow: none;
    }

    .mzmp-live-profile .mzmp-live-profile__cover {
        height: clamp(270px, 38vw, 340px);
    }

    .mzmp-live-profile .mzmp-live-profile__identity-sheet {
        min-height: 400px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-type {
        min-width: 118px;
        flex-basis: 118px;
    }
}

@media (max-width: 767px) {
	/* The controller mirrors the active selection onto the grid. These hooks keep
 * player-like content readable while preserving the compact image mosaic. */
.mzmp-live-profile [data-mzmp-media-grid][data-active-type="audio"][data-active-collection="שירים"],
.mzmp-live-profile [data-mzmp-media-grid][data-mzmp-active-type="audio"][data-mzmp-active-collection="שירים"],
.mzmp-live-profile [data-mzmp-media-grid].is-song-grid {
    grid-template-columns: minmax(0, 1fr);
}
/* YouTube songs are intentionally a full-width, one-per-row listening surface. */
.mzmp-live-profile .mzmp-live-profile__media-item--song,
.mzmp-live-profile [data-mzmp-media-item][data-type="audio"][data-collection="שירים"] {
    grid-column: 1 / -1;
}
    .mzmp-live-profile {
        --mzmp-live-header-height: 54px;
        --mzmp-live-gutter: 12px;
        --mzmp-live-gutter-negative: -12px;
        min-height: 100svh;
    }

    .mzmp-live-profile .mzmp-live-profile__topbar {
        grid-template-columns: 46px minmax(0, 1fr) 46px;
        padding-inline: 5px;
    }

    .mzmp-live-profile .mzmp-live-profile__topbar-title {
        font-size: 17px;
    }

    .mzmp-live-profile .mzmp-live-profile__topbar-action svg {
        width: 25px;
        height: 25px;
    }

    .mzmp-live-profile .mzmp-live-profile__cover {
        height: clamp(190px, 51vw, 230px);
    }

    .mzmp-live-profile .mzmp-live-profile__candle-stack {
        inset: auto auto 18px 10px;
        gap: 5px;
    }

    .mzmp-live-profile .mzmp-live-profile__light-candle,
    .mzmp-live-profile .mzmp-live-profile__candle-count {
        min-width: 116px;
        min-height: 34px;
        gap: 5px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .mzmp-live-profile .mzmp-live-profile__light-candle {
        min-height: 44px;
    }

    .mzmp-live-profile .mzmp-live-profile__light-candle svg,
    .mzmp-live-profile .mzmp-live-profile__candle-count svg {
        width: 17px;
        height: 17px;
    }

    .mzmp-live-profile .mzmp-live-profile__identity-sheet {
        min-height: 365px;
        padding: 67px 14px 14px;
        border-radius: 20px 20px 0 0;
    }

    .mzmp-live-profile .mzmp-live-profile__portrait {
        width: clamp(112px, 29vw, 128px);
        height: clamp(112px, 29vw, 128px);
        border-width: 6px;
        transform: translate(-50%, -58%);
    }

    .mzmp-live-profile .mzmp-live-profile__portrait-media {
        border-width: 3px;
    }

    .mzmp-live-profile .mzmp-live-profile__side-logo {
        top: 12px;
        width: 66px;
        height: 50px;
        padding: 2px;
    }

    .mzmp-live-profile .mzmp-live-profile__side-logo--unit {
        left: 14px;
    }

    .mzmp-live-profile .mzmp-live-profile__side-logo--partner {
        right: 14px;
    }

    .mzmp-live-profile .mzmp-live-profile__name,
    .mzmp-live-profile .mzmp-live-profile__name-input {
        font-size: 28px;
    }

    .mzmp-live-profile .mzmp-live-profile__rank,
    .mzmp-live-profile .mzmp-live-profile__rank-input {
        margin-top: 10px;
        font-size: 14px;
    }

    .mzmp-live-profile .mzmp-live-profile__summary,
    .mzmp-live-profile .mzmp-live-profile__summary-input {
        margin-top: 6px;
        padding-inline: 8px;
        font-size: 13px;
        line-height: 1.5;
    }

    .mzmp-live-profile .mzmp-live-profile__date-row {
        width: min(100%, 350px);
        gap: 7px;
        margin-top: 14px;
    }

    .mzmp-live-profile .mzmp-live-profile__date-card {
        min-height: 70px;
        grid-template-columns: 30px minmax(0, 1fr);
        column-gap: 6px;
        padding: 8px 9px;
        border-radius: 10px;
    }

    .mzmp-live-profile .mzmp-live-profile__date-card > svg {
        width: 27px;
        height: 27px;
    }

    .mzmp-live-profile .mzmp-live-profile__date-card small {
        font-size: 11px;
    }

    .mzmp-live-profile .mzmp-live-profile__date-card strong,
    .mzmp-live-profile .mzmp-live-profile__date-card input {
        font-size: 13px;
    }

    .mzmp-live-profile .mzmp-live-profile__edit-control--cover {
        inset: 10px 10px auto auto;
    }

    .mzmp-live-profile .mzmp-live-profile__edit-control--portrait {
        inset: auto -8px 0 auto;
    }

    .mzmp-live-profile [data-mzmp-position-image="cover"],
    .mzmp-live-profile [data-mzmp-position-toggle="cover"] {
        inset: 10px 62px auto auto;
    }

    .mzmp-live-profile [data-mzmp-position-image="profile"],
    .mzmp-live-profile [data-mzmp-position-toggle="profile"] {
        inset: auto -8px 49px auto;
    }

    .mzmp-live-profile [data-mzmp-position-toolbar] {
        bottom: 10px;
        min-height: 44px;
        max-width: calc(100% - 20px);
        padding: 7px 10px;
        font-size: 12px;
    }

    .mzmp-live-profile .mzmp-live-profile__portrait [data-mzmp-position-toolbar],
    .mzmp-live-profile [data-mzmp-position-surface="profile"] [data-mzmp-position-toolbar] {
        bottom: -62px;
    }

    .mzmp-live-profile .mzmp-live-profile__section-tabs,
    .mzmp-live-profile .mzmp-live-profile__section-tab {
        min-height: 50px;
    }

    .mzmp-live-profile .mzmp-live-profile__section-tab {
        padding: 8px 6px;
        font-size: 14px;
    }

    .mzmp-live-profile .mzmp-live-profile__body {
        padding: 8px 12px 100px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-types-wrap {
        margin-inline: -12px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-types {
        gap: 2px;
        padding: 0 14px 9px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-type {
        min-width: 86px;
        min-height: 75px;
        flex: 0 0 86px;
        gap: 5px;
        padding: 8px 5px;
        font-size: 11px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-type svg {
        width: 26px;
        height: 26px;
    }

    .mzmp-live-profile .mzmp-live-profile__subcategories {
        gap: 4px;
        margin: 7px 0 11px;
        padding-bottom: 9px;
    }

    .mzmp-live-profile .mzmp-live-profile__subcategory {
        width: 78px;
        min-width: 78px;
        gap: 5px;
        font-size: 11px;
    }

    .mzmp-live-profile .mzmp-live-profile__subcategory-mark {
        width: 61px;
        height: 61px;
        padding: 8px;
        border-width: 2px;
    }

    .mzmp-live-profile .mzmp-live-profile__upload-panel {
        margin: 1px 0 24px;
    }

    .mzmp-live-profile .mzmp-live-profile__upload-label {
        font-size: 14px;
    }

    .mzmp-live-profile .mzmp-live-profile__dropzone {
        min-height: 94px;
        padding: 12px;
    }

    .mzmp-live-profile .mzmp-live-profile__dropzone-content {
        gap: 3px;
    }

    .mzmp-live-profile .mzmp-live-profile__dropzone-content svg {
        width: 27px;
        height: 27px;
    }

    .mzmp-live-profile .mzmp-live-profile__upload-actions {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 20px;
    }

    .mzmp-live-profile .mzmp-live-content-composer {
        grid-template-columns: 1fr;
        padding-inline: 12px;
    }

    .mzmp-live-profile .mzmp-live-content-composer > * {
        grid-column: 1;
    }

    .mzmp-live-profile .mzmp-live-profile__upload-save {
        width: 100%;
        min-height: 44px;
        grid-row: 1;
    }

    /* Queued upload previews remain a compact three-column strip. The actual
     * gallery switches layout by active media type so players are never
     * squeezed into a phone-sized third of the screen. */
    .mzmp-live-profile .mzmp-live-profile__gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3px;
        margin-inline: -12px;
    }

    .mzmp-live-profile [data-mzmp-media-grid] {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-inline: 0;
    }

    .mzmp-live-profile [data-mzmp-media-grid][data-active-type="photos"],
    .mzmp-live-profile [data-mzmp-media-grid][data-active-type="recommendations"],
    .mzmp-live-profile [data-mzmp-media-grid][data-active-type="texts"],
    .mzmp-live-profile [data-mzmp-media-grid][data-mzmp-active-type="photos"],
    .mzmp-live-profile [data-mzmp-media-grid][data-mzmp-active-type="recommendations"],
    .mzmp-live-profile [data-mzmp-media-grid][data-mzmp-active-type="texts"],
    .mzmp-live-profile [data-mzmp-media-grid].is-tile-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3px;
        margin-inline: -12px;
    }

    .mzmp-live-profile [data-mzmp-media-grid][data-active-type="audio"][data-active-collection="שירים"],
    .mzmp-live-profile [data-mzmp-media-grid][data-mzmp-active-type="audio"][data-mzmp-active-collection="שירים"],
    .mzmp-live-profile [data-mzmp-media-grid].is-song-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-inline: 0;
    }

    .mzmp-live-profile .mzmp-live-queue-item {
        border-radius: 0;
    }

    .mzmp-live-profile .mzmp-live-profile__media-item,
    .mzmp-live-profile .mzmp-live-profile__media-trigger {
        border-radius: 0;
    }

    .mzmp-live-profile .mzmp-live-profile__media-item--photo .mzmp-live-profile__media-trigger,
    .mzmp-live-profile .mzmp-live-profile__media-item--memorial .mzmp-live-profile__media-trigger,
    .mzmp-live-profile .mzmp-live-profile__media-item--text-image .mzmp-live-profile__media-trigger,
    .mzmp-live-profile .mzmp-media-card--texts.is-image .mzmp-live-profile__media-trigger,
    .mzmp-live-profile [data-type="texts"][data-mzmp-image-backed] .mzmp-live-profile__media-trigger {
        aspect-ratio: 1 / 1;
    }

    .mzmp-live-profile .mzmp-live-profile__media-delete {
        top: -8px;
        left: -7px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-delete::before {
        width: 27px;
        height: 27px;
    }

    .mzmp-live-profile .mzmp-live-profile__content-card {
        min-height: 128px;
        padding: 10px;
        border-radius: 0;
        font-size: 12px;
    }

    .mzmp-live-profile .mzmp-live-profile__content-card h3 {
        font-size: 14px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-item--video,
    .mzmp-live-profile .mzmp-live-profile__media-item--video .mzmp-live-profile__media-trigger {
        border-radius: 10px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-item--video > .mzmp-live-profile__content-card {
        padding: 30px 11px 9px;
        border-radius: 0 0 10px 10px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-item--video > .mzmp-live-profile__content-card h3,
    .mzmp-live-profile .mzmp-live-profile__video-title {
        font-size: 13px;
    }

    .mzmp-live-profile .mzmp-live-profile__about-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mzmp-live-profile .mzmp-live-profile__prose,
    .mzmp-live-profile .mzmp-live-profile__service-card {
        padding: 18px 15px;
        border-radius: 12px;
    }

    .mzmp-live-profile .mzmp-live-profile__prose {
        font-size: 15px;
    }

    .mzmp-live-profile .mzmp-live-profile__edit-toolbar {
        bottom: max(8px, env(safe-area-inset-bottom));
        width: calc(100% - 16px);
        min-height: 58px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
        padding: 7px 8px 7px 13px;
        border-radius: 18px;
    }

    .mzmp-live-profile .mzmp-live-toolbar__profile label,
    .mzmp-live-profile .mzmp-live-profile__save-status,
    .mzmp-live-profile .mzmp-live-toolbar__actions > .mzmp-link-button {
        display: none;
    }

    .mzmp-live-profile .mzmp-live-toolbar__profile select {
        width: 100%;
        max-width: 150px;
    }

    .mzmp-live-profile .mzmp-live-toolbar__actions {
        justify-content: flex-end;
    }

    .mzmp-live-profile .mzmp-live-profile__toolbar-button:not(.mzmp-live-profile__toolbar-button--save) {
        display: none;
    }

    .mzmp-live-profile .mzmp-live-profile__toolbar-button--save {
        min-width: 112px;
    }

    .mzmp-live-profile .mzmp-live-profile__share-bar {
        width: calc(100% - 24px);
        min-height: 58px;
        gap: 9px;
        padding: 7px 14px;
    }

    .mzmp-live-profile .mzmp-live-profile__share-label {
        overflow: hidden;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mzmp-live-profile .mzmp-live-profile__share-link {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .mzmp-live-profile .mzmp-live-profile__lightbox {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 56px minmax(0, 1fr) 62px 42px;
        padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
    }

    .mzmp-live-profile .mzmp-live-profile__lightbox-stage {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .mzmp-live-profile .mzmp-live-profile__lightbox-close {
        grid-column: 1;
        grid-row: 1;
    }

    .mzmp-live-profile .mzmp-live-profile__lightbox-prev {
        grid-column: 1;
        grid-row: 3;
        justify-self: start;
    }

    .mzmp-live-profile .mzmp-live-profile__lightbox-next {
        grid-column: 2;
        grid-row: 3;
        justify-self: end;
    }

    .mzmp-live-profile .mzmp-live-profile__lightbox-caption {
        grid-column: 1 / -1;
        grid-row: 4;
    }
}

@media (max-width: 767px) {
    .mzmp-live-profile .mzmp-live-profile__media-actions {
        align-items: stretch;
        flex-direction: column;
        margin-inline: 0;
        padding: 7px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-actions-group {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 1px;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    .mzmp-live-profile .mzmp-live-profile__media-action,
    .mzmp-live-profile .mzmp-live-profile__mode-action,
    .mzmp-live-profile [data-mzmp-media-select-mode],
    .mzmp-live-profile [data-mzmp-media-reorder-mode],
    .mzmp-live-profile [data-mzmp-manage-collections] {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .mzmp-live-profile .mzmp-live-profile__mode-bar {
        bottom: max(7px, env(safe-area-inset-bottom));
        width: calc(100% - 14px);
        min-height: 60px;
        gap: 7px;
        padding: 7px;
        border-radius: 16px;
    }

    .mzmp-live-profile .mzmp-live-profile__mode-bar-copy {
        padding-inline: 4px;
        font-size: 12px;
    }

    .mzmp-live-profile .mzmp-live-profile__mode-bar-actions {
        gap: 5px;
    }

    .mzmp-live-profile .mzmp-live-profile__mode-bar button {
        min-width: 76px;
        min-height: 46px;
        padding-inline: 9px;
        font-size: 13px;
    }

    .mzmp-live-profile .mzmp-live-profile__public-hidden-badge,
    .mzmp-live-profile [data-mzmp-public-hidden-badge] {
        bottom: 5px;
        left: 5px;
        min-height: 24px;
        max-width: calc(100% - 54px);
        padding: 3px 7px;
        overflow: hidden;
        font-size: 9px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mzmp-live-profile .mzmp-collection-manager,
    .mzmp-live-profile [data-mzmp-collection-manager] {
        align-items: end;
        justify-items: stretch;
        padding: 0;
    }

    .mzmp-live-profile .mzmp-collection-manager__panel,
    .mzmp-live-profile [data-mzmp-collection-manager-panel] {
        width: 100%;
        max-height: min(88svh, 780px);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 24px 24px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -22px 68px rgba(2, 11, 74, .32);
    }

    .mzmp-live-profile .mzmp-collection-manager__header,
    .mzmp-live-profile [data-mzmp-collection-manager-header] {
        min-height: 62px;
        padding: 10px 13px;
        border-radius: 24px 24px 0 0;
    }

    .mzmp-live-profile .mzmp-collection-manager__header::before,
    .mzmp-live-profile [data-mzmp-collection-manager-header]::before {
        position: absolute;
        top: 7px;
        left: 50%;
        width: 42px;
        height: 4px;
        border-radius: 999px;
        background: #d6dce6;
        content: "";
        transform: translateX(-50%);
    }

    .mzmp-live-profile .mzmp-collection-manager__header h2,
    .mzmp-live-profile [data-mzmp-collection-manager-header] h2 {
        font-size: 19px;
    }

    .mzmp-live-profile .mzmp-collection-manager__body,
    .mzmp-live-profile [data-mzmp-collection-manager-body] {
        padding: 12px;
    }

    .mzmp-live-profile .mzmp-collection-manager__item,
    .mzmp-live-profile [data-mzmp-collection-row] {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        padding: 8px;
    }

    .mzmp-live-profile .mzmp-collection-manager__item-actions {
        justify-content: flex-end;
    }

    .mzmp-live-profile .mzmp-collection-manager__form,
    .mzmp-live-profile [data-mzmp-collection-form] {
        grid-template-columns: 1fr;
        padding: 11px 12px;
    }

    .mzmp-live-profile .mzmp-collection-manager__form button,
    .mzmp-live-profile [data-mzmp-collection-form] button {
        width: 100%;
    }

    .mzmp-live-profile .mzmp-destructive-dialog__panel,
    .mzmp-live-profile [data-mzmp-destructive-panel] {
        width: min(100%, 460px);
        padding: 24px 17px 18px;
        border-radius: 18px;
    }

    .mzmp-live-profile .mzmp-destructive-dialog__actions,
    .mzmp-live-profile [data-mzmp-destructive-actions] {
        flex-direction: column-reverse;
    }

    .mzmp-live-profile .mzmp-destructive-dialog__actions button,
    .mzmp-live-profile [data-mzmp-destructive-actions] button {
        width: 100%;
    }

    .mzmp-live-profile .mzmp-live-profile__zero-collections,
    .mzmp-live-profile [data-mzmp-zero-collections] {
        min-height: 156px;
        margin-inline: 0;
        padding: 19px 14px;
    }
}

@media (max-width: 359px) {
    .mzmp-live-profile .mzmp-live-profile__identity-sheet {
        padding-inline: 10px;
    }

    .mzmp-live-profile .mzmp-live-profile__side-logo {
        width: 56px;
        height: 44px;
    }

    .mzmp-live-profile .mzmp-live-profile__name,
    .mzmp-live-profile .mzmp-live-profile__name-input {
        font-size: 25px;
    }

    .mzmp-live-profile .mzmp-live-profile__date-card {
        padding-inline: 6px;
    }

    .mzmp-live-profile .mzmp-live-profile__media-type {
        min-width: 78px;
        flex-basis: 78px;
    }

    .mzmp-live-profile .mzmp-live-profile__subcategory {
        width: 72px;
        min-width: 72px;
    }

    .mzmp-live-profile .mzmp-live-profile__subcategory-mark {
        width: 56px;
        height: 56px;
    }

    .mzmp-live-profile .mzmp-live-profile__candle-stack {
        inset: auto auto 66px 7px;
    }

    .mzmp-live-profile .mzmp-live-profile__light-candle,
    .mzmp-live-profile .mzmp-live-profile__candle-count {
        min-width: 105px;
        padding-inline: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mzmp-live-profile *,
    .mzmp-live-profile *::before,
    .mzmp-live-profile *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .mzmp-candle-modal *,
    .mzmp-candle-modal *::before,
    .mzmp-candle-modal *::after,
    [data-mzmp-candle-modal] *,
    [data-mzmp-candle-modal] *::before,
    [data-mzmp-candle-modal] *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (forced-colors: active) {
    .mzmp-live-profile .mzmp-live-profile__media-type.is-active,
    .mzmp-live-profile .mzmp-live-profile__subcategory-mark,
    .mzmp-live-profile .mzmp-live-profile__portrait,
    .mzmp-live-profile .mzmp-live-profile__dropzone {
        border: 2px solid CanvasText;
    }
}
