/* Shared form readability and document scrolling; story slides keep their own layout. */
html:has(body.info-preview[data-section-mode="flow"]) {
    height: auto; overflow-x: clip; overflow-y: auto; scroll-behavior: auto;
}
body.is-inner.info-preview[data-section-mode="flow"] {
    height: auto; min-height: 100dvh; overflow: visible;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
body.info-preview[data-section-mode="flow"] .info-top-logo {
    position: sticky; inset: auto; top: 0; z-index: 20;
    background: linear-gradient(180deg, rgba(213,239,252,.96) 0%, rgba(213,239,252,.88) 75%, rgba(213,239,252,0));
}
body.is-inner.info-preview[data-section-mode="flow"] .site-main {
    position: relative; top: auto; bottom: auto; inset-inline: auto;
    height: auto; min-height: 0; overflow: visible; margin: 0;
    padding: 20px 16px 100px;
    -webkit-mask-image: none; mask-image: none;
}
body.info-preview[data-section-mode="flow"] .site-main .container { min-width: 0; }
body.info-preview[data-section-mode="flow"] .site-main > .section > .container { padding-inline: 0; }
body.info-preview[data-section-mode="flow"] :is(.auth-card, .reg-card, form.glass, .glass:has(form), .aframe:has(form)) {
    background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(232,247,255,.94));
    border: 1px solid rgba(198,155,61,.75); border-radius: 24px;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: 0 12px 32px rgba(12,63,91,.14), inset 0 1px 0 #fff;
    opacity: 1; transform: none;
}
body.info-preview .aframe:has(form)::before,
body.info-preview .aframe:has(form)::after { content: none; }
body.info-preview .aframe:has(form) { overflow: visible; }
body.info-preview[data-section-mode="flow"] .auth-wrap { display: block; }
body.info-preview[data-section-mode="flow"] .auth-card { margin-inline: auto; width: 100%; }
body.is-inner .site-main form,
body.is-inner .site-main :is(.field, .form-grid, .reg-grid, .field-row) { min-width: 0; }
body.is-inner .site-main :is(.field input, .field select, .field textarea, input.input, .lookup-form input):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    max-width: 100%; min-width: 0; background-color: #f7fbfe; color: #153e55;
    border-color: #a3becd; font-size: 16px; min-height: 46px;
    scroll-margin-block-start: calc(var(--info-logo-height, 84px) + 24px);
}
body.is-inner .site-main .field textarea { min-height: 130px; line-height: 1.7; }
body.is-inner .site-main select option { background: #fff; color: #153e55; }
body.is-inner .site-main :is(.field > label, .field > .label) { color: #244e64; line-height: 1.6; }
body.is-inner .site-main :is(.field .hint, .field .opt) { color: #526b7a; line-height: 1.6; }
body.is-inner .site-main :is(input, select, textarea):focus-visible { outline: 2px solid #ab802b; outline-offset: 2px; }
body.is-inner .site-main .radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
body.is-inner .site-main .radio-pill { min-height: 44px; background: rgba(255,255,255,.9); color: #244e64; }
body.is-inner .site-main .radio-pill:has(input:checked) { background: #fff4d9; border-color: #ae8025; }
body.is-inner .site-main :is(.radio-pill input, .check-row input) { accent-color: #a77a23; }
body.info-preview[data-section-mode="flow"] .reg-card { padding: clamp(20px, 4vw, 34px); }
body.info-preview[data-section-mode="flow"] .reg-code { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 640px) {
    body.is-inner .site-main :is(.form-grid, .reg-grid, .field-row) { grid-template-columns: minmax(0, 1fr); }
    body.info-preview .cm-photo-pick { flex-wrap: wrap; }
    body.info-preview .site-main .btn { max-width: 100%; white-space: normal; }
}
@media (min-width: 821px) {
    body.is-inner.info-preview[data-section-mode="flow"] { padding-bottom: 0; }
    body.is-inner.info-preview[data-section-mode="flow"] .site-main {
        padding-inline: max(24px, calc((100vw - 1100px) / 2));
    }
}
@media print {
    html:has(body.info-preview[data-section-mode="flow"]), body.is-inner.info-preview[data-section-mode="flow"] { height: auto; overflow: visible; padding: 0; }
    body.info-preview[data-section-mode="flow"] .info-top-logo { position: static; background: none; }
    body.is-inner.info-preview[data-section-mode="flow"] .site-main { position: static; padding: 0; }
}
