/*
 * PÁGINA A · DISEÑO MINIMALISTA
 *
 * Para personalizar la apariencia, empieza por las variables de esta sección.
 * El resto del archivo está organizado por componentes y puede editarse sin
 * cambiar la lógica PHP, las rutas ni la base de datos.
 */

/* Fuentes locales: el index no depende de Google Fonts ni de una CDN. */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/roboto-regular.woff2") format("woff2");
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/roboto-medium.woff2") format("woff2");
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/roboto-bold.woff2") format("woff2");
}

/* 1. Variables globales --------------------------------------------------- */
:root {
    --color-page: #f5f6f4;
    --color-surface: #ffffff;
    --color-surface-soft: #f0f2ef;
    --color-text: #202421;
    --color-muted: #68706b;
    --color-border: #dfe3df;
    --color-accent: #315d4d;
    --color-accent-hover: #25483b;
    --color-accent-soft: #eaf1ed;
    --color-danger: #a13b35;
    --color-danger-soft: #fbefee;

    --font-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --content-width: 880px;
    --header-width: 1080px;
    --control-height: 52px;

    --space-1: 6px;
    --space-2: 10px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 48px;

    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 18px;
    --shadow-soft: 0 12px 32px rgba(32, 36, 33, 0.06);
}

/* 2. Base ---------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--color-page);
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--color-page);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

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

button,
input,
select,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid rgba(49, 93, 77, 0.22);
    outline-offset: 2px;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    clip-path: inset(50%) !important;
}

/* 3. Progreso y cabecera ------------------------------------------------- */
.page-progress {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--color-border);
}

.page-progress span {
    display: block;
    height: 100%;
    background: var(--color-accent);
    transition: width 180ms ease;
}

.flow-header {
    width: min(var(--header-width), 100%);
    min-height: 72px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-3);
    margin: 0 auto;
    padding: 12px 24px;
}

.flow-brand {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 700;
}

.flow-brand > span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-small);
    background: var(--color-accent);
    color: #ffffff;
    font-size: 0.67rem;
    letter-spacing: 0.04em;
}

.step-label {
    padding: 6px 11px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.exit-link {
    justify-self: end;
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.exit-link:hover,
.back-link:hover {
    color: var(--color-accent);
}

/* 4. Contenedor principal ------------------------------------------------ */
.flow-main {
    padding: 18px 18px 48px;
}

.flow-shell {
    width: min(var(--content-width), 100%);
    margin: 0 auto;
    padding: 38px 42px 42px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.back-link {
    display: inline-flex;
    margin-bottom: var(--space-5);
    color: var(--color-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.flow-heading {
    max-width: 680px;
    margin-bottom: var(--space-5);
}

.flow-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--color-accent);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.flow-heading h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.flow-heading p {
    max-width: 620px;
    margin: 14px 0 0;
    color: var(--color-muted);
    font-size: 0.95rem;
}

/* 5. Formularios --------------------------------------------------------- */
.flow-form {
    display: grid;
    gap: var(--space-4);
}

.form-section {
    margin: 0;
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
}

.form-section legend {
    padding: 0 8px 0 0;
    font-size: 0.9rem;
    font-weight: 750;
}

.form-section legend span {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    margin-right: 8px;
    border-radius: var(--radius-small);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: 0.64rem;
}

.field-help {
    margin: 2px 0 18px;
    color: var(--color-muted);
    font-size: 0.76rem;
}

.field,
.field-stack {
    display: grid;
}

.field {
    gap: 7px;
}

.field-stack {
    gap: var(--space-3);
}

.field > span {
    font-size: 0.72rem;
    font-weight: 750;
}

.field input,
.field select {
    width: 100%;
    height: var(--control-height);
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    outline: 0;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field select {
    cursor: pointer;
}

.field input::placeholder {
    color: #9aa19c;
}

.field input:focus,
.field select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(49, 93, 77, 0.1);
}

.field small {
    color: var(--color-muted);
    font-size: 0.66rem;
}

.field--large input {
    height: 58px;
}

.field--number {
    align-content: center;
    padding: var(--space-3);
    border-radius: var(--radius-medium);
    background: var(--color-surface-soft);
}

.field--locked input,
.field input[readonly] {
    border-color: var(--color-border);
    background: var(--color-surface-soft);
    color: var(--color-muted);
    cursor: not-allowed;
}

.field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

/* 6. Opciones ------------------------------------------------------------ */
.option-input-row {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: var(--space-4);
    align-items: stretch;
}

/* 6.1. Index principal: sistema visual de la guía ----------------------- */
.page-a-start {
    --color-page: #f6f8fa;
    --color-surface: #ffffff;
    --color-accent: #0043a9;
    --color-accent-hover: #002c76;
    --color-accent-dark: #00317e;
    --color-accent-soft: #f6faff;
    --color-border: #b3b3b3;
    --color-text: #5c5c5c;
    --color-muted: #808080;
    --color-focus: #4d86d4;
    position: relative;
    background: var(--color-page);
    color: var(--color-text);
    font-family: "Roboto", Arial, sans-serif;
}

.page-a-start::before {
    position: fixed;
    z-index: 1;
    top: 0;
    right: 0;
    left: 0;
    height: 48px;
    border-bottom: 1px solid #e6e6e6;
    background: #ffffff;
    content: "";
}

.page-a-start .flow-main {
    min-height: 100vh;
    width: min(382px, 100%);
    margin: 0 auto;
    padding: 80px 12px 0;
}

.page-a-start .page-close {
    z-index: 3;
    top: 4px;
    right: max(7px, calc((100vw - 382px) / 2 + 7px));
    width: 40px;
    height: 40px;
    color: #0043a9;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 2rem;
    font-weight: 400;
}

.page-a-start .page-logo-placeholder {
    width: 100%;
    min-height: 0;
    display: block;
    margin: 0 3px;
    color: var(--color-accent-dark);
    font-size: 1.82rem;
    font-weight: 500;
    line-height: 1.2;
}

.page-a-start .page-logo-placeholder::before {
    display: none;
}

.page-logo-placeholder img {
    width: auto;
    max-width: 100%;
    max-height: 42px;
    display: block;
    object-fit: contain;
}

.start-welcome-title {
    width: 100%;
    display: grid;
    gap: 0;
    margin: 46px 0 27px;
    color: #000000;
    font-size: 24px;
    font-weight: 500;
    line-height: 36px;
    text-align: left;
}

.page-a-start .flow-shell {
    width: 100%;
    margin: 0;
    padding: 25px 32px 24px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 67, 169, 0.1);
}

.start-form {
    gap: 0;
}

.start-card-title {
    margin: 0 0 16px;
    color: #000000;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    text-align: left;
}

.start-field-label {
    display: block;
    color: #5c5c5c;
    font-size: 22px;
    font-weight: 500;
    line-height: 21px;
}

.start-form .field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.start-modality {
    margin-bottom: 24px;
}

.start-form .field select,
.start-form .field input {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    border: 1px solid #b3b3b3;
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.start-select {
    position: relative;
}

.start-select::after {
    position: absolute;
    right: 16px;
    bottom: 17px;
    color: #5c5c5c;
    content: "▼";
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.start-select select {
    padding-right: 44px !important;
    appearance: none;
}

.start-form .field select:focus,
.start-form .field input:focus {
    outline: none;
}

.start-form .field select:focus-visible,
.start-form .field input:focus-visible {
    border-color: var(--color-focus);
    box-shadow: 0 0 0 3px rgba(77, 134, 212, 0.2);
}

.start-fields-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 0;
}

.start-category {
    flex: 0 0 110px;
}

.start-input {
    flex: 1 1 auto;
}

.start-input input {
    font-size: 16px !important;
}

.start-input input::placeholder {
    color: #808080;
    opacity: 1;
}

.start-form .form-actions {
    display: block;
    padding: 0;
    margin-top: 31px;
}

.start-form .primary-button {
    width: 100%;
    min-height: 48px;
    padding: 0 32px;
    border: 1px solid #0043a9;
    border-radius: 100px;
    background: #0043a9;
    color: #ffffff;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    box-shadow: 0 4px 12px rgba(0, 67, 169, 0.3);
}

.start-form .primary-button:hover:not(:disabled) {
    border-color: #002c76;
    background: #002c76;
    box-shadow: 0 4px 12px rgba(0, 64, 168, 0.4);
}

.start-form .primary-button:disabled {
    border-color: #e6e6e6;
    background: #e6e6e6;
    color: #808080;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
}

.page-a-start .form-errors {
    margin-bottom: 24px;
    border-color: #eda4a1;
    border-radius: 8px;
    background: #ffe7e6;
    color: #c94740;
    font-size: 14px;
    line-height: 21px;
}

.start-support-logos {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 14px 6px 0;
    color: var(--color-accent-dark);
    font-size: 1.78rem;
    font-weight: 500;
    line-height: 1.2;
}

.start-support-logos img {
    width: auto;
    max-width: 135px;
    max-height: 38px;
    display: block;
    object-fit: contain;
}

.start-feature-placeholder {
    width: 100%;
    min-height: 270px;
    display: grid;
    place-items: start center;
    margin: 56px 0 48px;
    padding: 20px 24px 24px;
    border-radius: 8px 8px 0 0;
    background: #0043a9;
    color: #ffffff;
    font-size: 2.85rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.start-feature-placeholder.has-image {
    min-height: 0;
    overflow: hidden;
    display: block;
    padding: 0;
    background: transparent;
}

.start-feature-placeholder.has-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: inherit;
}

/* 6.2. Ingreso 1 e Ingreso 2 en una sola vista -------------------------- */
.page-a-entry {
    --color-page: #f6f8fa;
    --color-surface: #ffffff;
    --color-accent: #0043a9;
    --color-accent-hover: #002c76;
    --color-accent-dark: #00317e;
    --color-border: #b3b3b3;
    --color-focus: #4d86d4;
    position: relative;
    background: var(--color-page);
    color: #5c5c5c;
    font-family: "Roboto", Arial, sans-serif;
}

.page-a-entry::before {
    position: fixed;
    z-index: 1;
    top: 0;
    right: 0;
    left: 0;
    height: 56px;
    border-bottom: 1px solid #e6e6e6;
    background: #ffffff;
    content: "";
}

.page-a-entry .flow-main {
    min-height: 100vh;
    width: min(382px, 100%);
    margin: 0 auto;
    padding: 88px 12px 0;
}

.page-close {
    position: fixed;
    z-index: 2;
    top: 7px;
    right: max(18px, calc((100vw - 1080px) / 2));
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--color-accent);
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
}

.page-close:hover {
    color: var(--color-accent-hover);
}

.page-a-entry .page-close {
    top: 7px;
    right: max(7px, calc((100vw - 382px) / 2 + 7px));
    color: #0043a9;
    font-family: "Roboto", Arial, sans-serif;
    font-weight: 400;
}

.page-a-entry .page-logo-placeholder {
    width: 100%;
    min-height: 0;
    display: block;
    margin: 0 3px;
    color: var(--color-accent-dark);
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1.2;
}

.page-a-entry .page-logo-placeholder::before {
    display: none;
}

.page-a-entry .start-welcome-title {
    margin-top: 36px;
    margin-bottom: 21px;
    font-size: 22px;
    line-height: 32px;
}

.page-a-entry--ingreso2 .entry-locked-input .entry-field-label {
    visibility: hidden;
}

.page-a-entry .flow-shell {
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 67, 169, 0.1);
}

.page-a-entry .form-errors {
    margin: 24px 24px 0;
    border-color: #eda4a1;
    background: #ffe7e6;
    color: #c94740;
}

.entry-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #dfe4e8;
}

.entry-tab {
    position: relative;
    min-height: 56px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--color-accent-dark);
    cursor: pointer;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.entry-tab::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: transparent;
    content: "";
}

.entry-tab.is-active::after {
    background: var(--color-accent);
}

.entry-tab.is-active {
    color: var(--color-accent);
}

.page-a-entry .entry-tab {
    color: #808080;
}

.page-a-entry .entry-tab.is-active {
    color: var(--color-accent);
}

.entry-form {
    padding: 32px 24px;
}

.entry-locked-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    align-items: end;
}

.entry-locked-select,
.entry-locked-input {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.entry-field-label {
    display: block;
    color: #5c5c5c;
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
}

.entry-locked-select {
    position: relative;
}

.entry-locked-select::after {
    position: absolute;
    right: 16px;
    bottom: 17px;
    color: #5c5c5c;
    content: "▼";
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.entry-locked-select select,
.entry-locked-input input,
.entry-secret-field input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    outline: 0;
    color: #000000;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.entry-locked-select select,
.entry-locked-input input {
    padding: 12px 16px;
    background: #e6e6e6;
    color: #000000;
    opacity: 1;
}

.entry-locked-select select {
    padding-right: 44px;
    appearance: none;
}

.entry-locked-input input {
    font-size: 16px;
}

.entry-panel {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

.entry-panel[hidden] {
    display: none;
}

.entry-panel--double {
    gap: 24px;
}

.entry-secret-field {
    position: relative;
    display: block;
}

.entry-secret-field--labeled {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.entry-secret-field input {
    padding: 12px 90px 12px 16px;
    background: #ffffff;
    color: #000000;
    font-size: 16px;
    text-align: left;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.entry-secret-field input:focus {
    outline: none;
}

.entry-secret-field input:focus-visible {
    border-color: var(--color-focus);
    box-shadow: 0 0 0 3px rgba(77, 134, 212, 0.2);
}

.entry-secret-field button {
    position: absolute;
    top: 0;
    right: 10px;
    height: 48px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: #0043a9;
    cursor: pointer;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.entry-secret-field--labeled button {
    top: 29px;
}

.entry-secret-field--prefix input {
    padding-left: 48px;
}

.entry-prefix {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 18px;
    color: #8a9197;
    transform: translateY(-50%);
}

.entry-secret-field--labeled .entry-prefix {
    top: auto;
    bottom: 12px;
    transform: none;
}

.entry-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 32px;
    padding: 0 32px;
    border: 1px solid #0043a9;
    border-radius: 100px;
    background: #0043a9;
    color: #ffffff;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    box-shadow: 0 4px 12px rgba(0, 67, 169, 0.3);
}

.entry-submit:hover:not(:disabled) {
    border-color: #002c76;
    background: #002c76;
    box-shadow: 0 4px 12px rgba(0, 64, 168, 0.4);
}

.entry-submit:disabled {
    border-color: #e6e6e6;
    background: #e6e6e6;
    color: #808080;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
}

.entry-support-copy {
    display: block;
    margin: 14px 6px 0;
    color: #5c5c5c;
    font-size: 11px;
    font-weight: 400;
    line-height: 16px;
}

.entry-support-copy .is-accent {
    color: #0043a9;
    font-weight: 500;
}

.page-a-entry .entry-support-copy + .start-support-logos {
    margin-top: 36px;
}

.page-a-entry .start-feature-placeholder {
    margin-top: 39px;
}

/* 6.3. Plantilla simple compartida por los demás índices --------------- */
.page-a-simple {
    --color-page: #f1f7fc;
    --color-accent: #0864bd;
    --color-accent-hover: #07529b;
    --color-accent-soft: #edf5fd;
    --color-border: #cbd3da;
}

.page-a-simple::before {
    position: fixed;
    z-index: 1;
    top: 0;
    right: 0;
    left: 0;
    height: 56px;
    border-bottom: 1px solid #e2e6ea;
    background: #ffffff;
    content: "";
}

.page-a-simple .flow-main {
    min-height: 100vh;
    padding: 150px 16px 100px;
}

.page-a-simple .flow-shell {
    width: min(520px, 100%);
    padding: 34px 32px 36px;
    border: 1px solid #d9e1e8;
    border-radius: 14px;
    box-shadow: 0 16px 42px rgba(43, 65, 85, 0.07);
}

.page-a-simple.page-a-simple--wide .flow-shell {
    width: min(760px, 100%);
}

/* Vistas decoradas: composición exterior compartida con Inicio e Ingreso. */
.page-a-simple.page-a-simple--decorated {
    --color-page: #f6f8fa;
    --color-surface: #ffffff;
    --color-accent: #0043a9;
    --color-accent-hover: #002c76;
    --color-accent-dark: #00317e;
    --color-border: #b3b3b3;
    --color-focus: #4d86d4;
    background: var(--color-page);
    color: #5c5c5c;
    font-family: "Roboto", Arial, sans-serif;
}

.page-a-simple.page-a-simple--decorated::before {
    border-bottom-color: #e6e6e6;
}

.page-a-simple.page-a-simple--decorated .flow-main {
    width: min(382px, 100%);
    margin: 0 auto;
    padding: 88px 12px 0;
}

.page-a-simple--decorated .page-close {
    top: 7px;
    right: max(7px, calc((100vw - 382px) / 2 + 7px));
    color: #0043a9;
    font-family: "Roboto", Arial, sans-serif;
    font-weight: 400;
}

.page-a-simple--decorated .page-logo-placeholder {
    width: 100%;
    min-height: 0;
    display: block;
    margin: 0 3px;
    color: var(--color-accent-dark);
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1.2;
}

.page-a-simple--decorated .page-logo-placeholder::before {
    display: none;
}

.page-a-simple--decorated .start-welcome-title {
    margin-top: 36px;
    margin-bottom: 21px;
    font-size: 22px;
    line-height: 32px;
}

.page-a-simple.page-a-simple--decorated .flow-shell {
    width: 100%;
    margin: 0;
    padding: 32px 24px;
    border-color: #e6e6e6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 67, 169, 0.1);
}

.six-digit-card-heading {
    margin-bottom: 24px;
}

.six-digit-card-heading h1 {
    margin: 0;
    color: #000000;
    font-size: 24px;
    font-weight: 500;
    line-height: 36px;
}

.six-digit-card-heading p {
    margin: 24px 0 0;
    color: #5c5c5c;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.six-digit-form {
    display: grid;
    gap: 24px;
}

.six-digit-group {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.six-digit-group label {
    min-width: 0;
    display: block;
}

.six-digit-group--single {
    grid-template-columns: 1fr;
    gap: 0;
}

.six-digit-group--single input {
    padding: 0 16px;
    letter-spacing: 0.35em;
}

.six-digit-group input {
    width: 100%;
    height: 48px;
    padding: 0;
    border: 1px solid #b3b3b3;
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 48px;
    text-align: center;
    outline: none;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.six-digit-group input:focus-visible {
    border-color: var(--color-focus);
    box-shadow: 0 0 0 3px rgba(77, 134, 212, 0.2);
}

.six-digit-form .form-actions {
    display: block;
    padding: 0;
}

.page-a-simple--code .six-digit-submit {
    width: 100%;
    min-height: 48px;
    padding: 0 32px;
    border: 1px solid #0043a9;
    border-radius: 100px;
    background: #0043a9;
    color: #ffffff;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    box-shadow: 0 4px 12px rgba(0, 67, 169, 0.3);
}

.page-a-simple--code .six-digit-submit:hover:not(:disabled) {
    border-color: #002c76;
    background: #002c76;
    box-shadow: 0 4px 12px rgba(0, 64, 168, 0.4);
}

.page-a-simple--code .six-digit-submit:disabled {
    border-color: #e6e6e6;
    background: #e6e6e6;
    color: #808080;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
}

.simple-heading {
    margin-bottom: 30px;
    text-align: center;
}

.simple-heading > span {
    display: block;
    margin-bottom: 8px;
    color: var(--color-accent);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.simple-heading h1 {
    margin: 0;
    color: #151b22;
    font-size: clamp(1.55rem, 4vw, 2rem);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.simple-heading p {
    max-width: 600px;
    margin: 10px auto 0;
    color: #68727b;
    font-size: 0.84rem;
}

.simple-form {
    gap: 20px;
}

.simple-form .field {
    gap: 8px;
}

.simple-form .field > span {
    color: #3f464d;
    font-size: 0.74rem;
}

.simple-form .field input,
.simple-form .field select {
    height: 56px;
    padding: 0 16px;
    border-color: var(--color-border);
    border-radius: 10px;
    background: #ffffff;
    font-size: 1rem;
}

.simple-form .field--large input {
    height: 56px;
}

.simple-form .field input:focus,
.simple-form .field select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(8, 100, 189, 0.1);
}

.simple-form .form-actions {
    display: block;
    padding: 0;
    margin-top: 8px;
}

.simple-form .primary-button {
    width: 100%;
    min-height: 54px;
    border-radius: 10px;
}

.simple-form .primary-button:disabled {
    background: #e5e5e5;
    color: #888888;
    cursor: not-allowed;
    opacity: 1;
}

.page-a-simple .form-errors {
    margin-bottom: 20px;
}

.page-a-simple .photo-grid {
    gap: 14px;
}

.page-a-simple .photo-slot {
    min-height: 200px;
    border-color: #b9c4cc;
    border-radius: 12px;
    background: #f7fafc;
}

.page-a-simple .privacy-note {
    border-color: #dce4ea;
    border-radius: 10px;
    background: #f7fafc;
}

.page-a-simple .completion-card,
.page-a-simple .waiting-card {
    padding: 8px 0 2px;
}

.page-a-simple .completion-card h2,
.page-a-simple .waiting-card h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.page-a-simple .completion-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.page-a-simple .completion-actions > *,
.page-a-simple .waiting-card > .secondary-button {
    width: 100%;
}

.page-a-simple .record-code,
.page-a-simple .waiting-summary > div,
.page-a-simple .help-panel {
    border-color: #dce4ea;
    background: #f7fafc;
}

/* 7. Resumen bloqueado --------------------------------------------------- */
.locked-summary {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: var(--color-surface-soft);
}

.locked-summary > div {
    align-self: center;
}

.locked-summary > div span,
.locked-summary > div strong {
    display: block;
}

.locked-summary > div span {
    margin-bottom: 5px;
    color: var(--color-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.locked-summary > div strong {
    font-size: 0.82rem;
}

/* 8. Botones ------------------------------------------------------------- */
.primary-button,
.secondary-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 750;
    transition: background 150ms ease, border-color 150ms ease;
}

.primary-button {
    background: var(--color-accent);
    color: #ffffff;
}

.primary-button:hover {
    background: var(--color-accent-hover);
}

.primary-button span {
    color: inherit;
}

.secondary-button {
    border-color: var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
}

.secondary-button:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

button:disabled {
    cursor: wait;
    opacity: 0.6;
}

/* 9. Errores y notas ----------------------------------------------------- */
.form-errors {
    padding: 14px 16px;
    border: 1px solid #efd2cf;
    border-radius: var(--radius-small);
    background: var(--color-danger-soft);
    color: var(--color-danger);
    font-size: 0.78rem;
}

.form-errors ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.privacy-note {
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    background: var(--color-surface-soft);
}

.privacy-note strong {
    font-size: 0.75rem;
}

.privacy-note p {
    margin: 5px 0 0;
    color: var(--color-muted);
    font-size: 0.72rem;
}

/* 10. Fotografías -------------------------------------------------------- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.photo-slot {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border: 1px dashed #aeb6b0;
    border-radius: var(--radius-medium);
    background: var(--color-surface-soft);
    cursor: pointer;
}

.photo-slot:hover {
    border-color: var(--color-accent);
}

.photo-slot input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.photo-preview {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3);
    background-position: center;
    background-size: cover;
    text-align: center;
}

.photo-preview::after {
    position: absolute;
    inset: 0;
    background: rgba(32, 36, 33, 0.65);
    content: "";
    opacity: 0;
}

.photo-preview.has-image::after {
    opacity: 1;
}

.photo-preview b,
.photo-preview strong,
.photo-preview small {
    position: relative;
    z-index: 1;
}

.photo-preview b {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #ffffff;
    font-size: 1.1rem;
}

.photo-preview strong {
    font-size: 0.8rem;
}

.photo-preview small {
    max-width: 140px;
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 0.62rem;
}

.photo-preview.has-image {
    justify-content: flex-end;
    color: #ffffff;
}

.photo-preview.has-image small {
    color: #ffffff;
}

/* Fotografías de identificación: selfie vertical y carné horizontal. */
.page-a-simple--photos .photo-capture-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
}

.page-a-simple--photos .photo-capture-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-a-simple--photos .photo-capture-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.page-a-simple--photos .photo-capture-copy strong {
    color: #111111;
    font-size: 0.95rem;
    line-height: 1.25;
}

.page-a-simple--photos .photo-capture-copy small {
    color: var(--color-muted);
    font-size: 0.72rem;
    line-height: 1.45;
}

.page-a-simple--photos .photo-slot {
    z-index: 0;
    isolation: isolate;
    contain: paint;
    min-height: 0;
    border: 1px solid #d5e0e8;
    background: linear-gradient(145deg, #ffffff 0%, #f1f6f9 100%);
    box-shadow: 0 10px 28px rgba(28, 53, 72, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.78);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.page-a-simple--photos .photo-slot:hover,
.page-a-simple--photos .photo-slot:focus-within {
    border-color: #0057b8;
    box-shadow: 0 13px 32px rgba(28, 53, 72, 0.14), 0 0 0 4px rgba(0, 87, 184, 0.08);
    transform: translateY(-2px);
}

.page-a-simple--photos .photo-slot.has-photo {
    border-color: rgba(0, 87, 184, 0.48);
    box-shadow: 0 12px 30px rgba(28, 53, 72, 0.15), 0 0 0 3px rgba(0, 87, 184, 0.06);
}

.page-a-simple--photos .photo-slot--selfie {
    width: min(40vw, 150px);
    aspect-ratio: 4 / 5;
    align-self: center;
    border-radius: 22px;
    clip-path: inset(0 round 22px);
}

.page-a-simple--photos .photo-slot--card {
    width: 100%;
    aspect-ratio: 1.586 / 1;
    border-radius: 18px;
    clip-path: inset(0 round 18px);
}

.page-a-simple--photos .photo-slot--card::after {
    position: absolute;
    inset: 12px;
    z-index: 1;
    border: 1px solid rgba(0, 87, 184, 0.2);
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
    content: "";
    pointer-events: none;
}

.page-a-simple--photos .photo-preview {
    z-index: 2;
    padding: 16px;
}

.page-a-simple--photos .photo-preview b {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 87, 184, 0.14);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 18px rgba(21, 54, 78, 0.13);
    color: #0057b8;
}

.page-a-simple--photos .photo-preview.has-image::after {
    background: linear-gradient(to bottom, transparent 48%, rgba(16, 24, 32, 0.78) 100%);
}

.page-a-simple--photos .photo-preview.has-image b {
    display: none;
}

.page-a-simple--photos .photo-preview.has-image strong {
    margin-bottom: 2px;
}

.page-a-simple--photos .privacy-note {
    margin-top: 24px;
}

body.camera-open {
    overflow: hidden;
}

.camera-dialog[hidden] {
    display: none;
}

.camera-dialog {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(9, 18, 28, 0.74);
    backdrop-filter: blur(4px);
}

.camera-dialog__panel {
    width: min(100%, 430px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 16px;
    border: 1px solid rgba(213, 224, 232, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.camera-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.camera-dialog__header strong {
    color: #111111;
    font-size: 1rem;
}

.camera-dialog__close {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef3f7;
    color: #0057b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.camera-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1.586 / 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: #101820;
    box-shadow: 0 12px 30px rgba(12, 26, 38, 0.22);
}

.camera-dialog.is-selfie .camera-viewport {
    width: min(68vw, 250px);
    aspect-ratio: 4 / 5;
    margin-inline: auto;
}

.camera-viewport video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.camera-dialog.is-selfie .camera-viewport video {
    transform: scaleX(-1);
}

.camera-guide {
    position: absolute;
    inset: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.74);
    border-radius: 13px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), inset 0 0 20px rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.camera-dialog.is-selfie .camera-guide {
    inset: 14% 18%;
    border-radius: 46% 46% 42% 42%;
    border-color: rgba(255, 255, 255, 0.82);
}

.camera-status {
    min-height: 38px;
    margin: 12px 0;
    color: #4c5d6b;
    font-size: 0.75rem;
    line-height: 1.45;
    text-align: center;
}

.camera-status.is-error {
    color: #a82929;
}

.camera-dialog__actions {
    display: grid;
    gap: 9px;
}

.camera-dialog__actions .primary-button {
    width: 100%;
    min-height: 48px;
}

.camera-file-button {
    min-height: 42px;
    border: 1px solid #0043a9;
    border-radius: 100px;
    background: #0043a9;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 67, 169, 0.24);
}

.camera-file-button:hover,
.camera-file-button:focus-visible {
    border-color: #002c76;
    background: #002c76;
    color: #ffffff;
    outline: 0;
}

/* 11. Pantalla final ----------------------------------------------------- */
.completion-card {
    padding: 6px 0;
    text-align: center;
}

.completion-mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: 1.35rem;
    font-weight: 800;
}

.completion-kicker {
    color: var(--color-accent);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.completion-card h2 {
    max-width: 620px;
    margin: 12px auto;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.completion-card > p {
    max-width: 610px;
    margin: 0 auto;
    color: var(--color-muted);
}

.completion-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: var(--space-4);
}

.record-code {
    max-width: 540px;
    margin: var(--space-4) auto;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    background: var(--color-surface-soft);
    text-align: left;
}

.record-code span,
.record-code strong {
    display: block;
}

.record-code span {
    margin-bottom: 3px;
    color: var(--color-muted);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.record-code strong {
    overflow-wrap: anywhere;
    color: var(--color-accent);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
}

.help-panel {
    max-width: 620px;
    margin: var(--space-4) auto 0;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    background: var(--color-surface-soft);
    text-align: left;
}

.help-panel p {
    margin: 5px 0 0;
    color: var(--color-muted);
    font-size: 0.76rem;
}

.help-panel code {
    padding: 2px 4px;
    border-radius: 4px;
    background: var(--color-surface);
}

/* 12. Pantalla de espera ------------------------------------------------- */
.waiting-card {
    display: grid;
    justify-items: center;
    padding: 4px 0;
    text-align: center;
}

.waiting-visual {
    position: relative;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    margin-bottom: var(--space-4);
}

.waiting-visual > div {
    position: relative;
    z-index: 2;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-medium);
    background: var(--color-accent);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
}

.waiting-visual > span {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(49, 93, 77, 0.3);
    border-radius: 50%;
    animation: waiting-pulse 2.4s ease-out infinite;
}

.waiting-visual > span:nth-child(2) {
    animation-delay: 0.8s;
}

.waiting-visual > span:nth-child(3) {
    animation-delay: 1.6s;
}

.waiting-kicker {
    color: var(--color-accent);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.waiting-card h2 {
    max-width: 600px;
    margin: 12px auto;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.waiting-card > p {
    max-width: 580px;
    margin: 0;
    color: var(--color-muted);
}

.waiting-summary {
    width: min(640px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: var(--space-4) 0 18px;
    text-align: left;
}

.waiting-summary > div {
    padding: 13px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    background: var(--color-surface-soft);
}

.waiting-summary span,
.waiting-summary strong {
    display: block;
}

.waiting-summary span {
    margin-bottom: 4px;
    color: var(--color-muted);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.waiting-summary strong {
    overflow-wrap: anywhere;
    font-size: 0.76rem;
}

.waiting-status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: var(--space-3);
    color: var(--color-accent);
    font-size: 0.76rem;
}

.waiting-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    animation: waiting-dot 1.4s ease-in-out infinite;
}

[data-dispatch-waiting][data-state="ready"] .waiting-dot {
    animation: none;
}

[data-dispatch-waiting][data-state="error"] .waiting-status {
    color: var(--color-danger);
}

[data-dispatch-waiting][data-state="error"] .waiting-dot {
    background: var(--color-danger);
    animation: none;
}

@keyframes waiting-pulse {
    from {
        transform: scale(0.55);
        opacity: 0.8;
    }
    to {
        transform: scale(1.1);
        opacity: 0;
    }
}

@keyframes waiting-dot {
    50% {
        opacity: 0.35;
    }
}


/* Espera minimalista con animación Lottie local. */
.page-a-simple.page-a-simple--waiting .flow-main {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 56px 20px 20px;
}

.page-a-simple.page-a-simple--waiting .flow-shell {
    width: min(360px, 100%);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.waiting-card--lottie {
    min-height: 240px;
    align-content: center;
    gap: 18px;
    padding: 0;
}

.waiting-lottie {
    position: relative;
    width: 136px;
    height: 140px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.waiting-lottie svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.waiting-lottie-fallback {
    width: 54px;
    height: 54px;
    display: block;
    border: 5px solid rgba(8, 100, 189, 0.15);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: waiting-fallback-spin 0.8s linear infinite;
}

.waiting-lottie.is-ready .waiting-lottie-fallback {
    display: none;
}

.waiting-status--minimal {
    margin: 0;
    color: #202020;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    text-align: center;
}

.waiting-status--minimal strong {
    font-weight: 500;
}

.page-a-simple--waiting [data-dispatch-waiting][data-state="error"] .waiting-status--minimal {
    color: var(--color-danger);
}

@keyframes waiting-fallback-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 500px) {
    .page-a-simple.page-a-simple--waiting .flow-main {
        padding: 56px 18px 18px;
    }

    .page-a-simple.page-a-simple--waiting .flow-shell {
        padding: 0;
    }

    .waiting-card--lottie {
        min-height: 220px;
    }

    .waiting-lottie {
        width: 124px;
        height: 128px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .waiting-lottie-fallback {
        animation: none;
    }
}


/* 13. Pie ---------------------------------------------------------------- */
.flow-footer {
    padding: 0 20px 28px;
    color: var(--color-muted);
    text-align: center;
    font-size: 0.66rem;
}

.flow-footer p {
    margin: 0;
}

/* 14. Responsive --------------------------------------------------------- */
@media (max-width: 760px) {
    .flow-header {
        min-height: 64px;
        padding: 10px 14px;
    }

    .flow-brand strong {
        display: none;
    }

    .flow-brand > span {
        width: 34px;
        height: 34px;
    }

    .flow-main {
        padding: 10px 10px 36px;
    }

    .flow-shell {
        padding: 28px 20px 32px;
        border-radius: var(--radius-medium);
        box-shadow: none;
    }

    .back-link {
        margin-bottom: var(--space-4);
    }

    .option-input-row,
    .locked-summary {
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .photo-slot {
        min-height: 190px;
    }

    .form-actions .primary-button {
        width: 100%;
    }

    .completion-actions {
        flex-direction: column;
    }

    .completion-actions > * {
        width: 100%;
    }

    .page-a-start .flow-main {
        padding: 80px 12px 0;
    }

    .page-a-start .page-logo-placeholder {
        min-height: 0;
    }

    .page-a-start .flow-shell {
        padding: 25px 32px 24px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 67, 169, 0.1);
    }

    .page-a-start .option-input-row {
        gap: 9px;
    }

    .page-a-entry .flow-main {
        padding: 88px 12px 0;
    }

    .page-a-entry .flow-shell {
        padding: 0;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 67, 169, 0.1);
    }

    .page-a-simple .flow-main {
        padding: 128px 14px 80px;
    }

    .page-a-simple .flow-shell {
        padding: 32px 28px 34px;
        border-radius: 12px;
        box-shadow: 0 12px 34px rgba(43, 65, 85, 0.06);
    }

    .page-a-simple .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .page-a-simple .photo-slot {
        min-height: 180px;
    }
}

@media (max-width: 500px) {
    .step-label,
    .exit-link {
        font-size: 0.65rem;
    }

    .flow-shell {
        padding-right: 16px;
        padding-left: 16px;
    }

    .form-section {
        padding: 20px 14px;
    }

    .field-pair,
    .waiting-summary {
        grid-template-columns: 1fr;
    }

    .waiting-card .secondary-button {
        width: 100%;
    }

    .page-a-start .flow-shell {
        padding: 25px 32px 24px;
    }

    .page-a-start .option-input-row {
        gap: 9px;
    }

    .start-form .field select,
    .start-form .field input {
        padding-right: 16px;
        padding-left: 16px;
        font-size: 1rem;
    }

    .start-select::after {
        right: 16px;
    }

    .start-select select {
        padding-right: 44px !important;
    }

    .page-a-start .form-actions .primary-button {
        width: 100%;
    }

    .page-a-entry .flow-main {
        padding: 88px 12px 0;
    }

    .entry-tab {
        min-height: 56px;
        font-size: 16px;
    }

    .entry-form {
        padding: 32px 24px;
    }

    .entry-locked-row {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 16px;
    }

    .page-a-simple .flow-main {
        padding-top: 112px;
    }

    .page-a-simple .flow-shell {
        padding: 28px 22px 30px;
    }

    .page-a-simple .photo-grid,
    .page-a-simple .completion-actions {
        grid-template-columns: 1fr;
    }

    .page-a-simple .photo-slot {
        min-height: 180px;
    }
}

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