:root {
    --shell-accent: #00bfa6;
    --shell-accent-strong: #00a693;
    --shell-accent-soft: rgba(0, 191, 166, 0.12);
    --shell-secondary: #8e61e8;
    --shell-secondary-soft: rgba(142, 97, 232, 0.14);
    --shell-sun: #f6c93c;
    --shell-sun-soft: rgba(246, 201, 60, 0.22);
    --shell-danger: #e25f67;
    --shell-success: #3cbf8c;
    --shell-shadow: 0 18px 40px rgba(16, 22, 30, 0.14);
    --shell-shadow-strong: 0 24px 52px rgba(16, 22, 30, 0.22);
    --shell-border-strong: rgba(20, 24, 32, 0.12);
    --shell-center-ring: rgba(246, 201, 60, 0.32);
    --shell-theme-color: #f7efe2;
}

:root[data-theme="light"] {
    --primary: #00a996;
    --primary-light: #00c5ad;
    --primary-dark: #007d70;
    --on-primary: #ffffff;
    --secondary: #8758e2;
    --secondary-light: #a37af3;
    --secondary-dark: #6f40cb;
    --on-secondary: #ffffff;
    --quaternary: #f6c93c;
    --on-tertiary: #ffffff;
    --surface: #f8f1e6;
    --surface-dim: #efe4d4;
    --surface-container: #fffaf3;
    --surface-container-low: #fdf7ef;
    --surface-container-lowest: #fbf3e8;
    --surface-container-high: #fffdf9;
    --surface-container-highest: #ffffff;
    --on-surface: #15202a;
    --on-surface-variant: #55616f;
    --on-surface-muted: #7b8693;
    --outline: rgba(21, 32, 42, 0.12);
    --outline-strong: rgba(21, 32, 42, 0.22);
    --outline-variant: rgba(21, 32, 42, 0.06);
    --border-glass: rgba(255, 255, 255, 0.6);
    --primary-container: rgba(0, 169, 150, 0.12);
    --primary-container-vivid: rgba(0, 169, 150, 0.18);
    --secondary-container: rgba(135, 88, 226, 0.14);
    --secondary-container-vivid: rgba(135, 88, 226, 0.18);
    --text-primary: #15202a;
    --text-secondary: rgba(21, 32, 42, 0.72);
    --text-muted: rgba(21, 32, 42, 0.48);
    --shell-bg-start: #f8f1e6;
    --shell-bg-end: #f0e4d2;
    --shell-bg-glow-1: rgba(0, 191, 166, 0.16);
    --shell-bg-glow-2: rgba(246, 201, 60, 0.15);
    --shell-bg-glow-3: rgba(142, 97, 232, 0.12);
    --shell-panel-bg: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(248, 241, 230, 0.92));
    --shell-panel-soft: rgba(255, 251, 244, 0.82);
    --shell-panel-border: rgba(21, 32, 42, 0.08);
    --shell-panel-shadow: 0 24px 50px rgba(138, 117, 89, 0.12);
    --shell-chip-bg: rgba(255, 255, 255, 0.74);
    --shell-chip-border: rgba(21, 32, 42, 0.08);
    --shell-control-bg: rgba(255, 255, 255, 0.78);
    --shell-control-border: rgba(21, 32, 42, 0.12);
    --shell-control-focus: rgba(0, 169, 150, 0.14);
    --shell-header-bg: rgba(248, 241, 230, 0.84);
    --shell-header-border: rgba(21, 32, 42, 0.08);
    --shell-bottom-nav-bg: rgba(251, 245, 235, 0.94);
    --shell-active-pill-bg: rgba(0, 169, 150, 0.16);
    --shell-active-pill-border: rgba(0, 169, 150, 0.26);
    --shell-secondary-pill-bg: rgba(135, 88, 226, 0.14);
    --shell-secondary-pill-border: rgba(135, 88, 226, 0.2);
    --shell-summary-bg: rgba(255, 250, 241, 0.96);
    --shell-summary-border: rgba(21, 32, 42, 0.08);
    --shell-center-cell: #f6c93c;
    --shell-center-cell-strong: #efb320;
    --shell-theme-color: #f7efe2;
}

:root[data-theme="dark"] {
    --text-primary: #f4f7fb;
    --text-secondary: rgba(244, 247, 251, 0.76);
    --text-muted: rgba(244, 247, 251, 0.48);
    --shell-bg-start: #111722;
    --shell-bg-end: #0c1018;
    --shell-bg-glow-1: rgba(0, 191, 166, 0.22);
    --shell-bg-glow-2: rgba(246, 201, 60, 0.16);
    --shell-bg-glow-3: rgba(142, 97, 232, 0.18);
    --shell-panel-bg: linear-gradient(180deg, rgba(26, 31, 42, 0.96), rgba(16, 19, 28, 0.94));
    --shell-panel-soft: rgba(24, 29, 40, 0.82);
    --shell-panel-border: rgba(255, 255, 255, 0.08);
    --shell-panel-shadow: 0 24px 52px rgba(0, 0, 0, 0.24);
    --shell-chip-bg: rgba(255, 255, 255, 0.06);
    --shell-chip-border: rgba(255, 255, 255, 0.08);
    --shell-control-bg: rgba(255, 255, 255, 0.05);
    --shell-control-border: rgba(255, 255, 255, 0.1);
    --shell-control-focus: rgba(0, 229, 204, 0.12);
    --shell-header-bg: rgba(14, 18, 26, 0.82);
    --shell-header-border: rgba(255, 255, 255, 0.08);
    --shell-bottom-nav-bg: rgba(16, 20, 29, 0.94);
    --shell-active-pill-bg: rgba(0, 229, 204, 0.18);
    --shell-active-pill-border: rgba(0, 229, 204, 0.26);
    --shell-secondary-pill-bg: rgba(183, 148, 246, 0.16);
    --shell-secondary-pill-border: rgba(183, 148, 246, 0.22);
    --shell-summary-bg: rgba(12, 16, 24, 0.94);
    --shell-summary-border: rgba(255, 255, 255, 0.08);
    --shell-center-cell: #ffd348;
    --shell-center-cell-strong: #ffbf1f;
    --shell-theme-color: #111722;
}

html,
body {
    background-color: var(--surface);
}

body.page-shell {
    color: var(--text-primary);
    background:
        radial-gradient(circle at 14% 10%, var(--shell-bg-glow-1), transparent 28%),
        radial-gradient(circle at 84% 12%, var(--shell-bg-glow-2), transparent 26%),
        radial-gradient(circle at 84% 82%, var(--shell-bg-glow-3), transparent 30%),
        linear-gradient(180deg, var(--shell-bg-start) 0%, var(--shell-bg-end) 100%);
}

body.page-shell::before {
    opacity: 0.52;
}

body.page-shell .app-container {
    padding: 0 18px 146px;
}

body.page-shell .app-main {
    gap: 20px;
    padding-top: 18px;
}

body.page-shell .app-header,
body.page-shell .workflow-rail,
body.page-shell .summary-panel,
body.page-shell .page-surface,
body.page-search .search-strip,
body.page-search .state-panel,
body.page-search .result-panel,
body.page-generate .model-card,
body.page-generate .selected-model-panel,
body.page-generate .count-card,
body.page-bingo-plus .info-card,
body.page-bingo-plus .analysis-card,
body.page-bingo-plus .grid-panel,
body.page-bingo-plus .summary-strip,
body.page-winners .verify-panel,
body.page-winners .state-card,
body.page-winners .meta-card {
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
}

body.page-shell .page-surface,
body.page-search .search-strip,
body.page-search .state-panel,
body.page-search .result-panel,
body.page-generate .model-card,
body.page-generate .selected-model-panel,
body.page-generate .count-card,
body.page-bingo-plus .info-card,
body.page-bingo-plus .analysis-card,
body.page-bingo-plus .grid-panel,
body.page-bingo-plus .summary-strip,
body.page-winners .verify-panel,
body.page-winners .state-card,
body.page-winners .meta-card {
    background: var(--shell-panel-bg);
    border-color: var(--shell-panel-border);
    box-shadow: var(--shell-panel-shadow);
}

body.page-shell .page-surface::before {
    opacity: 0.48;
}

body.page-shell .page-surface,
body.page-search .result-panel,
body.page-search .state-panel,
body.page-generate .selected-model-panel,
body.page-generate .count-card,
body.page-bingo-plus .info-card,
body.page-bingo-plus .analysis-card,
body.page-bingo-plus .grid-panel,
body.page-bingo-plus .summary-strip,
body.page-winners .verify-panel,
body.page-winners .state-card {
    border-radius: 28px 14px 30px 16px;
}

body.page-shell .app-shell-header {
    position: sticky;
    top: 0;
    z-index: 60;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    background: linear-gradient(180deg, var(--shell-header-bg), rgba(0, 0, 0, 0));
    border-bottom: none;
}

body.page-shell .app-shell-header .header-inner {
    display: grid;
    gap: 14px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 18px 16px;
    background: color-mix(in srgb, var(--shell-header-bg) 86%, transparent);
    border: 1px solid var(--shell-header-border);
    border-radius: 0 0 26px 20px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.08);
    transition:
        padding 180ms ease,
        gap 180ms ease,
        border-radius 180ms ease,
        background 180ms ease;
}

body.page-shell .header-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

body.page-shell .app-logo {
    min-width: 0;
}

body.page-shell .logo-icon {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

body.page-shell .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.page-shell .header-badge,
body.page-shell .header-theme-toggle,
body.page-shell .workflow-chip,
body.page-search .mode-pill,
body.page-bingo-plus .mode-pill,
body.page-search .quick-hint,
body.page-generate .model-tag,
body.page-bingo-plus .analysis-stats span,
body.page-bingo-plus .analysis-footer span,
body.page-winners .btn-link {
    background: var(--shell-chip-bg);
    border-color: var(--shell-chip-border);
    color: var(--text-secondary);
}

body.page-shell .header-badge {
    min-height: 44px;
    padding: 0 14px;
    letter-spacing: 0.08em;
}

body.page-shell .header-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--shell-chip-border);
    cursor: pointer;
    font-weight: 800;
    transition:
        transform 160ms ease,
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

body.page-shell .header-theme-toggle:hover,
body.page-shell .header-theme-toggle:focus-visible {
    background: var(--shell-active-pill-bg);
    border-color: var(--shell-active-pill-border);
    color: var(--text-primary);
    transform: translateY(-1px);
}

body.page-shell .header-theme-toggle__icon {
    font-size: 1rem;
    line-height: 1;
}

body.page-shell[data-header-state="compact"] .app-shell-header .header-inner {
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 12px;
    border-radius: 0 0 22px 16px;
}

body.page-shell .workflow-rail {
    position: relative;
    top: auto;
    z-index: 20;
    margin-top: 10px;
    padding: 8px;
    border-radius: 999px;
    background: var(--shell-panel-soft);
    border: 1px solid var(--shell-panel-border);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 8px;
}

body.page-shell .workflow-chip {
    min-height: 42px;
    padding: 0 16px;
    font-weight: 800;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

body.page-shell .workflow-chip.active {
    background: var(--shell-active-pill-bg);
    border-color: var(--shell-active-pill-border);
    color: var(--text-primary);
    box-shadow: none;
}

body.page-shell .app-shell-bottom-nav {
    display: none;
}

body.page-shell .app-shell-bottom-nav__item {
    text-decoration: none;
}

body.page-shell .section-title,
body.page-shell .text-title-lg,
body.page-winners .state-title,
body.page-winners .meta-value {
    color: var(--text-primary);
}

body.page-shell .section-copy,
body.page-shell .section-subtitle,
body.page-shell .field-help,
body.page-search .state-panel p,
body.page-search .result-model,
body.page-search .lot-list-item p,
body.page-bingo-plus .info-card p,
body.page-bingo-plus .analysis-footer,
body.page-bingo-plus .analysis-error,
body.page-winners .verify-note,
body.page-winners .meta-label {
    color: var(--text-secondary);
}

body.page-shell .search-input,
body.page-shell .number-input,
body.page-shell .digit-select,
body.page-shell .select-like,
body.page-winners .verify-input,
body.page-shell .text-input {
    background: var(--shell-control-bg);
    border-color: var(--shell-control-border);
    color: var(--text-primary);
}

body.page-shell .search-input:focus,
body.page-shell .number-input:focus,
body.page-shell .digit-select:focus,
body.page-shell .select-like:focus,
body.page-winners .verify-input:focus,
body.page-shell .text-input:focus {
    box-shadow: 0 0 0 4px var(--shell-control-focus);
}

body.page-search .search-icon,
body.page-winners .verify-hash {
    color: var(--text-secondary);
}

body.page-search .result-header,
body.page-shell .search-strip,
body.page-search .notice-panel,
body.page-search .lot-summary-card,
body.page-generate .preview-stat,
body.page-generate .preview-mini-card,
body.page-generate .preview-cluster,
body.page-bingo-plus .summary-metric,
body.page-bingo-plus .tool-form-panel,
body.page-winners .check-table th,
body.page-winners .check-table td {
    background: var(--shell-panel-soft);
    border-color: var(--shell-panel-border);
}

body.page-shell .mini-cell.center,
body.page-generate .mini-grid-sm .mini-cell.center,
body.page-search .preview-mini-grid .mini-cell.center {
    background: linear-gradient(135deg, var(--shell-center-cell), var(--shell-center-cell-strong));
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 14px var(--shell-center-ring);
}

body.page-composer .game-card,
body.page-composer .game-card:hover,
body.page-composer .game-card.selected,
body.page-composer .game-card.selected-petit {
    transform: none !important;
}

body.page-composer .game-card {
    transition:
        border-color 160ms ease,
        background 180ms ease,
        box-shadow 180ms ease,
        filter 160ms ease;
}

body.page-composer .game-card:hover {
    border-color: color-mix(in srgb, var(--shell-accent) 42%, var(--shell-panel-border));
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

body.page-composer .game-card.selected {
    border-color: rgba(0, 229, 204, 0.42);
    background: linear-gradient(180deg, rgba(0, 229, 204, 0.14), rgba(255, 255, 255, 0.04));
    box-shadow: 0 0 0 1px rgba(0, 229, 204, 0.2), 0 18px 38px rgba(0, 191, 166, 0.14);
}

body.page-composer .game-card.selected-petit {
    border-color: rgba(183, 148, 246, 0.42);
    background: linear-gradient(180deg, rgba(183, 148, 246, 0.16), rgba(255, 255, 255, 0.04));
    box-shadow: 0 0 0 1px rgba(183, 148, 246, 0.18), 0 18px 38px rgba(142, 97, 232, 0.14);
}

body.page-composer .game-card .mini-grid-container {
    background: var(--shell-panel-soft);
    border-color: var(--shell-panel-border);
}

body.page-composer .game-card.selected .mini-grid-container {
    background: rgba(0, 229, 204, 0.12);
    border-color: rgba(0, 229, 204, 0.24);
}

body.page-composer .game-card.selected-petit .mini-grid-container {
    background: rgba(183, 148, 246, 0.14);
    border-color: rgba(183, 148, 246, 0.24);
}

body.page-composer .card-glow {
    mix-blend-mode: normal;
}

body.page-composer .selection-indicator {
    opacity: 0;
    transform: scale(0.84);
    transition:
        opacity 140ms ease,
        transform 180ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

body.page-composer .game-card.selected .selection-indicator,
body.page-composer .game-card.selected-petit .selection-indicator {
    opacity: 1;
    transform: scale(1);
}

body.page-composer .card-order-badge {
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

body.page-composer .card-order-badge.visible {
    transform: scale(1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

@keyframes shellCardSelectGrand {
    0% {
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
        filter: saturate(1);
    }
    55% {
        border-color: rgba(0, 229, 204, 0.44);
        box-shadow:
            0 0 0 2px rgba(0, 229, 204, 0.12),
            0 18px 34px rgba(0, 191, 166, 0.16);
        filter: saturate(1.08);
    }
    100% {
        border-color: rgba(0, 229, 204, 0.42);
        box-shadow:
            0 0 0 1px rgba(0, 229, 204, 0.2),
            0 18px 38px rgba(0, 191, 166, 0.14);
        filter: saturate(1);
    }
}

@keyframes shellCardDeselectGrand {
    0% {
        border-color: rgba(0, 229, 204, 0.42);
        box-shadow:
            0 0 0 1px rgba(0, 229, 204, 0.2),
            0 18px 38px rgba(0, 191, 166, 0.14);
    }
    100% {
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    }
}

@keyframes shellCardSelectPetit {
    0% {
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
        filter: saturate(1);
    }
    55% {
        border-color: rgba(183, 148, 246, 0.44);
        box-shadow:
            0 0 0 2px rgba(183, 148, 246, 0.14),
            0 18px 34px rgba(142, 97, 232, 0.14);
        filter: saturate(1.08);
    }
    100% {
        border-color: rgba(183, 148, 246, 0.42);
        box-shadow:
            0 0 0 1px rgba(183, 148, 246, 0.18),
            0 18px 38px rgba(142, 97, 232, 0.14);
        filter: saturate(1);
    }
}

@keyframes shellCardDeselectPetit {
    0% {
        border-color: rgba(183, 148, 246, 0.42);
        box-shadow:
            0 0 0 1px rgba(183, 148, 246, 0.18),
            0 18px 38px rgba(142, 97, 232, 0.14);
    }
    100% {
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    }
}

@keyframes shellCenterPulse {
    0% {
        box-shadow: 0 0 0 0 var(--shell-center-ring);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(246, 201, 60, 0);
    }
}

body.page-composer .game-card.morphing-select-grand {
    animation: shellCardSelectGrand 220ms ease-out forwards;
}

body.page-composer .game-card.morphing-deselect-grand {
    animation: shellCardDeselectGrand 180ms ease-out forwards;
}

body.page-composer .game-card.morphing-select-petit {
    animation: shellCardSelectPetit 220ms ease-out forwards;
}

body.page-composer .game-card.morphing-deselect-petit {
    animation: shellCardDeselectPetit 180ms ease-out forwards;
}

body.page-composer .game-card.morphing-select-grand .mini-cell.center,
body.page-composer .game-card.morphing-select-petit .mini-cell.center {
    animation: shellCenterPulse 220ms ease-out;
}

body.page-composer .composer-action-shell {
    padding: 22px;
}

body.page-composer .composer-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

body.page-composer .composer-action-copy {
    display: grid;
    gap: 8px;
    max-width: 640px;
}

body.page-composer .composer-action-copy p {
    margin: 0;
    color: var(--text-secondary);
}

body.page-composer .composer-action-cta {
    flex: 0 0 auto;
}

body.page-composer .composer-action-cta .btn-primary {
    min-height: 54px;
    padding: 0 22px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

body.page-generate .panel-sticky {
    top: 92px;
}

body.page-search .result-actions,
body.page-bingo-plus .action-row,
body.page-winners .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.page-bingo-plus .analysis-disclosure {
    display: grid;
    gap: 0;
}

body.page-bingo-plus .analysis-disclosure > summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
}

body.page-bingo-plus .analysis-disclosure > summary::-webkit-details-marker {
    display: none;
}

body.page-bingo-plus .analysis-summary-copy {
    display: grid;
    gap: 6px;
}

body.page-bingo-plus .analysis-summary-copy h3 {
    margin: 0;
}

body.page-bingo-plus .analysis-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--shell-chip-bg);
    border: 1px solid var(--shell-chip-border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

body.page-bingo-plus .analysis-disclosure[open] .analysis-toggle {
    background: var(--shell-active-pill-bg);
    border-color: var(--shell-active-pill-border);
    color: var(--text-primary);
}

body.page-bingo-plus .analysis-body {
    display: grid;
    gap: 18px;
    padding-top: 18px;
}

body.page-bingo-plus .analysis-card.blocked .analysis-toggle {
    background: rgba(226, 95, 103, 0.12);
    border-color: rgba(226, 95, 103, 0.24);
}

body.page-winners .verify-panel {
    padding: 20px;
}

@media (max-width: 780px) {
    body.page-shell .app-container {
        padding: 0 14px calc(96px + env(safe-area-inset-bottom, 0px));
    }

    body.page-shell .app-main {
        gap: 16px;
        padding-top: 14px;
    }

    body.page-shell .workflow-rail {
        display: none;
    }

    body.page-shell .app-shell-header .header-inner {
        padding: 10px 12px 12px;
        border-radius: 0 0 22px 16px;
    }

    body.page-shell .logo-text,
    body.page-shell .header-badge {
        display: none;
    }

    body.page-shell .header-topbar {
        gap: 10px;
    }

    body.page-shell .app-shell-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 70;
        display: flex;
        gap: 4px;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
        background: var(--shell-bottom-nav-bg);
        border-top: 1px solid var(--shell-panel-border);
        backdrop-filter: blur(26px) saturate(160%);
        -webkit-backdrop-filter: blur(26px) saturate(160%);
        box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.14);
    }

    body.page-shell .app-shell-bottom-nav__item {
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 4px;
        align-items: center;
        justify-content: center;
        min-height: 56px;
        padding: 6px 2px;
        border-radius: 18px;
        color: var(--text-secondary);
        background: transparent;
        text-align: center;
        transition:
            background 160ms ease,
            color 160ms ease,
            transform 160ms ease;
    }

    body.page-shell .app-shell-bottom-nav__item.is-active {
        background: var(--shell-active-pill-bg);
        color: var(--text-primary);
    }

    body.page-shell .app-shell-bottom-nav__icon {
        font-size: 1rem;
        line-height: 1;
    }

    body.page-shell .app-shell-bottom-nav__label {
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.03em;
    }

    body.page-composer .app-container {
        /* padding-bottom = bottom nav (~80px) + marge confort */
        padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
    }

    body.page-generate .generate-layout {
        display: flex;
        flex-direction: column;
    }

    body.page-generate .panel-sticky {
        order: -1;
        position: static;
    }

    body.page-generate .panel-scroll {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    body.page-generate .selected-model-panel,
    body.page-generate .count-card,
    body.page-search .search-strip,
    body.page-winners .verify-panel {
        padding: 18px;
    }

    body.page-generate .preview-inline-grid {
        flex-direction: column;
    }

    body.page-search .search-form,
    body.page-search .result-header,
    body.page-search .result-actions,
    body.page-search .inline-actions.compact,
    body.page-bingo-plus .action-row,
    body.page-winners .actions {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    body.page-search .lot-a4-preview {
        display: none;
    }

    body.page-search .lot-list-item,
    body.page-bingo-plus .analysis-card-head,
    body.page-bingo-plus .analysis-disclosure > summary {
        flex-direction: column;
        align-items: stretch;
    }

    body.page-search .print-frame {
        min-height: 420px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-shell .app-shell-header *,
    body.page-shell .app-shell-bottom-nav,
    body.page-composer .game-card,
    body.page-composer .selection-indicator,
    body.page-composer .card-order-badge,
    body.page-composer .game-card.morphing-select-grand,
    body.page-composer .game-card.morphing-deselect-grand,
    body.page-composer .game-card.morphing-select-petit,
    body.page-composer .game-card.morphing-deselect-petit {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
