:is(.script-entry-wizard, .wizard-method-gallery) mivo-mode-gallery {display:block;min-width:0}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery {
    display:flex;flex-direction:column;gap:7px;width:100%;height:clamp(292px,39vh,358px);
    --gallery-radius:clamp(8px,var(--beauty-radius,12px),16px);
}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-panel {
    position:relative;isolation:isolate;display:block;flex:1 1 0%;min-width:0;min-height:0;margin:0;
    color:white;background:#12151c;border-radius:var(--gallery-radius);cursor:pointer;touch-action:manipulation;
}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-panel input {position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-frame {
    position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;
    background:#12151c var(--mode-preview) center/cover;
}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-art {
    position:absolute;right:0;top:0;display:block;height:100%;width:72%;max-width:none;
    object-fit:cover;object-position:center;opacity:.65;transition:opacity .25s;
}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="column"] .mode-gallery-frame::before {
    content:"";position:absolute;inset:-12px;background:inherit;filter:blur(12px);
}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="column"] [data-expanded="true"] .mode-gallery-art {object-fit:contain;object-position:right center}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="column"] .mode-gallery-art {
    -webkit-mask-image:linear-gradient(to right,transparent,#000 18%);
    mask-image:linear-gradient(to right,transparent,#000 18%);
}
:is(.script-entry-wizard, .wizard-method-gallery) [data-expanded="true"] .mode-gallery-art {opacity:1}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-frame::after {
    content:"";position:absolute;inset:0;border-radius:inherit;
    background:linear-gradient(90deg,rgba(8,10,15,.97) 0%,rgba(8,10,15,.91) 22%,rgba(8,10,15,.40) 42%,transparent 62%);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.22);
}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-panel input:checked + .mode-gallery-frame::after {box-shadow:inset 0 0 0 2px var(--entry-accent)}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-panel input:focus-visible + .mode-gallery-frame::after {outline:2px solid white;outline-offset:-4px}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-caption {
    position:absolute;left:15px;top:50%;transform:translateY(-50%);display:grid;gap:2px;
    pointer-events:none;text-align:left;color:white;text-shadow:0 1px 4px #090b12;
}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-title {white-space:nowrap;font-family:inherit;font-size:16px;font-weight:650;line-height:1.4}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-summary {
    display:block;font-size:12px;line-height:1.55;white-space:nowrap;color:#f3ede6;
    max-height:0;overflow:hidden;opacity:0;transition:max-height .25s,opacity .25s;
}
:is(.script-entry-wizard, .wizard-method-gallery) [data-expanded="true"] .mode-gallery-summary {max-height:24px;opacity:1}
:is(.script-entry-wizard, .wizard-method-gallery, .wizard-tone-choice) .mode-gallery-mark {
    position:absolute;top:9px;right:10px;width:17px;height:17px;border-radius:50%;
    background:rgba(9,11,16,.72);border:1px solid rgba(255,255,255,.78);pointer-events:none;
}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-panel input:checked ~ .mode-gallery-mark,
.wizard-tone-choice[aria-pressed="true"] > .mode-gallery-mark {background:var(--entry-accent);border-color:var(--entry-accent);color:var(--entry-on-accent)}
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery-panel input:checked ~ .mode-gallery-mark::after,
.wizard-tone-choice[aria-pressed="true"] > .mode-gallery-mark::after {content:"";position:absolute;left:5px;top:2px;width:5px;height:9px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg)}

/* Three clipped panels share their sloping edges on wide screens. */
:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery[data-layout="row"] {
    --cut:24px;flex-direction:row;gap:2px;height:clamp(202px,28vh,244px);
    overflow:hidden;border-radius:var(--gallery-radius);background:var(--entry-accent);
}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="row"] .mode-gallery-panel {border-radius:0}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="row"] .mode-gallery-panel + .mode-gallery-panel {margin-left:calc(-1 * var(--cut))}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="row"] .mode-gallery-panel:first-child {clip-path:polygon(0 0,100% 0,calc(100% - var(--cut)) 100%,0 100%)}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="row"] .mode-gallery-panel:nth-child(2) {clip-path:polygon(var(--cut) 0,calc(100% - var(--cut)) 0,100% 100%,0 100%)}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="row"] .mode-gallery-panel:last-child {clip-path:polygon(0 0,100% 0,100% 100%,var(--cut) 100%)}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="row"] .mode-gallery-art {width:100%}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="row"] .mode-gallery-frame::after {background:linear-gradient(to top,rgba(6,8,13,.97),rgba(6,8,13,.58) 19%,transparent 42%)}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="row"] .mode-gallery-caption {top:auto;bottom:9px;left:50%;transform:translateX(-50%);text-align:center}
:is(.script-entry-wizard, .wizard-method-gallery) [data-layout="row"] .mode-gallery-panel:nth-child(2) .mode-gallery-mark {right:calc(8px + var(--cut))}
@media(prefers-reduced-motion:reduce) {
    :is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery *,:is(.script-entry-wizard, .wizard-method-gallery) .mode-gallery *::before {transition:none!important}
}
.script-entry-wizard .mode-specific-settings {display:grid;gap:clamp(18px,2.8vh,28px);min-width:0}

/* Sticker art occupies its own space above the caption or beside the mobile label. */
.wizard-method-gallery .mode-gallery-panel { overflow: hidden; color: var(--creator-text); background: var(--creator-panel); }
.wizard-method-gallery .mode-gallery .mode-gallery-frame { background: var(--creator-panel); }
.wizard-method-gallery .mode-gallery .mode-gallery-frame::before { content: none; }
.wizard-method-gallery .mode-gallery .mode-gallery-frame::after { background: none; box-shadow: inset 0 0 0 1px var(--creator-line); }
.wizard-method-gallery .mode-gallery-panel input:focus-visible + .mode-gallery-frame::after { outline-color: var(--creator-text); }
:is(.wizard-method-gallery, .wizard-tone-choice) .mode-gallery-mark { background: var(--creator-panel); border-color: var(--creator-muted); }
.wizard-method-gallery .mode-gallery[data-layout] .mode-gallery-panel .mode-gallery-art {
    object-fit: contain;
    object-position: center;
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none;
}
.wizard-method-gallery .mode-gallery[data-layout="row"] { height: clamp(212px, 30vh, 284px); background: var(--muted-4-color); }
.wizard-method-gallery [data-layout="row"] .mode-gallery-frame .mode-gallery-art {
    inset: 12px 8% auto;
    width: 84%;
    height: calc(100% - 76px);
}
.wizard-method-gallery .mode-gallery[data-layout="row"] .mode-gallery-caption { bottom: 16px; }
.wizard-method-gallery .mode-gallery[data-layout="row"] [data-expanded="true"] .mode-gallery-caption {
    width: calc(100% - 2 * var(--cut) - 12px);
    max-width: 34em;
}
.wizard-method-gallery [data-layout="row"] [data-expanded="true"] .mode-gallery-art { height: calc(100% - 108px); }
.wizard-method-gallery .mode-gallery[data-layout="column"] { height: clamp(274px, 42vh, 368px); gap: 8px; }
.wizard-method-gallery [data-layout="column"] .mode-gallery-frame .mode-gallery-art {
    top: 8%;
    right: 5%;
    width: 43%;
    height: 84%;
}
.wizard-method-gallery .mode-gallery-title {font-size:14px;line-height:1.35}
.wizard-method-gallery .mode-gallery .mode-gallery-summary {line-height:1.45}
.wizard-method-gallery .mode-gallery .mode-gallery-caption { color: inherit; text-shadow: none; }
.wizard-method-gallery .mode-gallery[data-layout="column"] .mode-gallery-caption { width: calc(52% - 15px); }
.wizard-method-gallery .mode-gallery .mode-gallery-summary {
    color: var(--wizard-muted);
    white-space: normal;
    overflow-wrap: anywhere;
    font-weight: 400;
}
.wizard-method-gallery .mode-gallery [data-expanded="true"] .mode-gallery-summary {
    margin-top: 3px;
    max-height: none;
}
/* The paper-and-pencil illustration has an opaque matte. Clip to its sticker edge in the original viewBox. */
.wizard-method-gallery .mode-gallery[data-layout] [data-mode="blank"] .mode-gallery-art {
    --blank-sticker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-67.5 -30.4 903 602'%3E%3Cpath d='M111 8H417Q441 8 460 28L541 112Q564 135 564 160V253L645 166Q665 145 691 145C745 144 777 204 748 252Q744 262 734 273L566 451Q558 460 550 465Q528 529 464 532H109C50 533 9 485 9 432V111C9 54 55 9 111 8Z'/%3E%3C/svg%3E");
    -webkit-mask: var(--blank-sticker) center / contain no-repeat;
    mask: var(--blank-sticker) center / contain no-repeat;
}
