/* ============================================================
   Skaii Meals — Final Production Theme
   Dark: Phantom glass elegance
   Light: Wire structured comfort
   Fonts: IBM Plex Mono (chrome) + Outfit (content)
   ============================================================ */

/* ═══════════════════════════════════════════════════════════════
   ONBOARDING INFO SHEET — shared bottom-sheet popover
   ═══════════════════════════════════════════════════════════════
   These rules MUST live in the global stylesheet, not in scoped SCSS.
   The OnboardingInfoSheet shared component renders a fixed-position
   bottom sheet that's used by both the multiselect steps (Allergens /
   Dietary) and the Review step. Blazor's component-scoped CSS attribute
   (`[b-XYZ]`) is set on rendered DOM, but consumers in different
   contexts may render the sheet under varying scope-attribute owners,
   so global rules are the simplest portable contract.

   The sheet is fixed-bottom slide-up on all viewports — mobile-first
   posture means we don't need a desktop-callout treatment; the wizard
   itself is constrained to ≤720px so a bottom sheet works visually
   at all sizes.

   Animation triggers off the `.is-open` class (set by the component
   when IsOpen=true). CSS isn't sensitive to mount/unmount — the @if
   guard in the component takes the element out of the DOM when closed,
   and the slide-up keyframe runs on each remount. */

.onboarding-info-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 16, 0.55);
    backdrop-filter: blur(2px);
    z-index: 109;
    animation: onboarding-info-sheet-backdrop-in 200ms ease forwards;
}

.onboarding-info-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    padding: 18px 22px 28px;
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--surface-2) 96%, transparent),
            color-mix(in srgb, var(--surface-1) 96%, transparent));
    border-top: 1px solid color-mix(in srgb, var(--accent-500) 38%, transparent);
    border-radius: 16px 16px 0 0;
    box-shadow:
        0 -14px 44px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 color-mix(in srgb, var(--accent-500) 14%, transparent);
    animation: onboarding-info-sheet-slide-up 240ms cubic-bezier(0.32, 0.72, 0.24, 1) both;
}

.onboarding-info-sheet-eyebrow {
    display: block;
    font-family: var(--font-display);
    font-size: 0.65rem;
    color: var(--text-tertiary);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
}

.onboarding-info-sheet-title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 4px 0;
}

.onboarding-info-sheet-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.55rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.onboarding-info-sheet-body {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Action row — Close + (toggle | Remove from list) pair. Slotted by
   the consuming component; the Actions RenderFragment in
   OnboardingInfoSheet plugs into this wrapper. */
.onboarding-info-sheet-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.multiselect-sheet-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-default);
    background: transparent;
    color: var(--text-primary);
    transition: transform 80ms ease, background 150ms ease, border-color 150ms ease;
    -webkit-tap-highlight-color: transparent;
}
.multiselect-sheet-btn:hover {
    border-color: color-mix(in srgb, var(--main-500) 60%, var(--border-default));
}
.multiselect-sheet-btn:focus-visible {
    outline: 2px solid var(--main-500);
    outline-offset: 2px;
}
.multiselect-sheet-btn:active {
    transform: scale(0.98);
}
.multiselect-sheet-btn.primary {
    background: linear-gradient(135deg, var(--main-500), var(--main-600));
    border-color: var(--main-500);
    color: white;
    font-weight: 600;
}
.multiselect-sheet-btn.primary.is-selected {
    background: var(--accent-500);
    border-color: var(--accent-500);
    color: var(--bg-base);
}

/* Shared sheet button — both the multiselect's Close + Add/Remove toggle
   AND the Review step's Close + Remove buttons share the same chrome.
   The class name is `multiselect-sheet-btn` for backwards-compat with
   existing multiselect markup; Review consumers use the same class.
   `.danger` modifier fills in red for destructive actions (Review's
   "Remove from list" / "Remove last allergen"). */
.multiselect-sheet-btn {
    padding: 12px 16px;
    font-size: 0.95rem;
}

.multiselect-sheet-btn.danger {
    color: #ff5050;
    border-color: color-mix(in srgb, #ff5050 50%, transparent);
}
.multiselect-sheet-btn.danger:hover {
    background: rgba(255, 80, 80, 0.12);
    border-color: #ff5050;
}
.multiselect-sheet-btn.danger:active {
    background: rgba(255, 80, 80, 0.18);
}

@keyframes onboarding-info-sheet-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0);    }
}
@keyframes onboarding-info-sheet-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .onboarding-info-sheet,
    .onboarding-info-sheet-backdrop { animation: none !important; }
}


html, body {
    /* Standard browser-reset: zero out the default 8px body margin so
       #app's 100vh can occupy the document without overflow. Page-level
       overflow is intentionally left at default (visible) — page scroll,
       when needed, is owned by per-layout scroll containers (MudMainContent
       in DesktopLayout, .wizard-card-content inside the onboarding wizard).
       Forcing overflow:hidden here would suppress the document scrollbar
       app-wide and rob sighted-keyboard users of the "is there more
       content?" affordance on every page. */
    margin: 0;
    padding: 0;
    /* iOS Safari bumps fonts ~10% in landscape orientation by default;
       text-size-adjust: 100% pins the rendered size to what we authored.
       Affects MobileLayout the most (where landscape orientation is
       common); harmless on desktop where the property is a no-op. */
    /* S2-5: vendor-prefixed property before unprefixed (CSS convention). */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.35s ease, color 0.25s ease;
}

#app { height: 100vh; }

/* MinimalLayout pages (onboarding wizard, auth ceremonies, etc.) own
   their full viewport via 100dvh + overflow:hidden containment — there's
   nothing to scroll at the document level, so suppress the page-level
   scrollbar specifically on those layouts. Without this, the layout's
   `100dvh` resolves slightly larger than the visible area inside fixed-
   viewport iframes (responsive-design preview tools, embedded WebViews,
   PWA installers), which causes a 10px ghost scrollbar to flash on
   cursor-near-edge.

   `:has()` keeps the rule narrow: DesktopLayout (which renders an AppBar
   and does NOT use `.skaii-main--no-appbar`) keeps its document scroll
   affordance, preserving the sighted-keyboard "is there more content?"
   cue per the round-1 gauntlet BLOCKER on the previous global override.
   Browser support: Chrome 105+, Safari 15.4+, Firefox 121+ — well above
   the WASM PWA's baseline. */
html:has(.skaii-main--no-appbar),
html:has(.skaii-main--no-appbar) body {
    overflow: hidden;
}


/* ═══════════════════════════════════════════════════════════════
   APPBAR
   ═══════════════════════════════════════════════════════════════ */

.skaii-appbar {
    transition: all 0.35s ease;
}

.skaii-dark .skaii-appbar {
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-bottom: 2px solid transparent;
    background-image: linear-gradient(rgba(12, 12, 20, 0.85), rgba(12, 12, 20, 0.85)),
                      linear-gradient(90deg, #FF00EE, rgba(252, 254, 1, 0.4));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.skaii-light .skaii-appbar {
    border-bottom: 2px solid rgba(128, 128, 128, 0.12);
}

/* Brand mark + text */
.skaii-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
}

.skaii-brand-mark {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF00EE, #A855F7);
    color: #FFFFFF;
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
}

.skaii-brand-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    white-space: nowrap;
}

/* Quick-add button — the primary CTA */
.skaii-quick-add {
    clip-path: polygon(6% 0%, 100% 0%, 94% 100%, 0% 100%) !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* User avatar ring */
.skaii-user-avatar {
    cursor: pointer;
    border: 2px solid #FF00EE !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-weight: 700 !important;
    font-size: 0.65rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.skaii-user-avatar:hover {
    border-color: #FCFE01 !important;
    box-shadow: 0 0 12px rgba(252, 254, 1, 0.25);
}

/* Menu toggle pulse on hover */
.skaii-menu-btn:hover {
    color: #FF00EE !important;
}


/* ═══════════════════════════════════════════════════════════════
   DRAWER
   ═══════════════════════════════════════════════════════════════ */

.skaii-drawer {
    transition: all 0.35s ease;
}

.skaii-dark .skaii-drawer {
    border-right: 1px solid rgba(255, 0, 238, 0.06);
}

.skaii-light .skaii-drawer {
    border-right: 1px solid rgba(128, 128, 128, 0.12);
}

/* Drawer header — user profile card */
.skaii-drawer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
}

.skaii-drawer-avatar {
    border: 2px solid #FF00EE !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    background: linear-gradient(135deg, rgba(255, 0, 238, 0.15), rgba(168, 85, 247, 0.10)) !important;
}

.skaii-drawer-user {
    overflow: hidden;
}

.skaii-drawer-user .mud-typography-body2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Streak indicator */
.skaii-streak {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.skaii-streak-icon {
    color: #F97316 !important;
}

/* Email-unverified indicator. Shown next to the display name in both the
   appbar user-menu and the drawer header when the principal's
   email_verified claim is not true. Uses warning color (orange #F97316)
   to signal "needs attention" without being alarming. The display name
   itself is shown in normal weight; the badge carries the signal. */
.skaii-unverified {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    color: #F97316 !important;
    font-weight: 500;
}

.skaii-unverified .mud-icon-root {
    color: #F97316 !important;
}

/* User-card wrapper inside the appbar menu — stack name, unverified
   badge, and tier label vertically with consistent padding. */
.skaii-user-card {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Section headers — aggressive uppercase */
.skaii-nav-section {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 16px 16px 6px;
    color: var(--mud-palette-text-disabled);
}

/* Nav links */
.mud-nav-link {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.83rem;
    letter-spacing: 0.01em;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.mud-nav-link .mud-nav-link-icon {
    transition: color 0.15s ease;
}

/* Active: magenta bar + icon glow */
.mud-nav-link.active {
    border-left: 3px solid #FF00EE !important;
}

.skaii-dark .mud-nav-link.active {
    background: rgba(255, 0, 238, 0.06) !important;
}

.skaii-dark .mud-nav-link.active .mud-nav-link-icon {
    color: #FF00EE !important;
}

.skaii-light .mud-nav-link.active {
    background: rgba(214, 0, 199, 0.04) !important;
}

.skaii-light .mud-nav-link.active .mud-nav-link-icon {
    color: #D600C7 !important;
}

/* Hover: subtle magenta tint */
.skaii-dark .mud-nav-link:hover:not(.active) {
    background: rgba(255, 0, 238, 0.03) !important;
}

.skaii-dark .mud-nav-link:hover .mud-nav-link-icon {
    color: #FF00EE !important;
}

/* Disabled nav links — dimmed */
.mud-nav-link.mud-disabled {
    opacity: 0.35;
}


/* ═══════════════════════════════════════════════════════════════
   BUTTONS — Gradient primary in dark, clean in light
   ═══════════════════════════════════════════════════════════════ */

.skaii-dark .mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, #FF00EE 0%, #D600C7 50%, #A855F7 100%) !important;
    box-shadow: 0 2px 12px rgba(255, 0, 238, 0.25);
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.skaii-dark .mud-button-filled.mud-button-filled-primary:hover {
    box-shadow: 0 4px 24px rgba(255, 0, 238, 0.40);
    transform: translateY(-1px);
}

.skaii-light .mud-button-filled.mud-button-filled-primary:hover {
    box-shadow: 0 0 0 2px rgba(214, 0, 199, 0.20);
}


/* ═══════════════════════════════════════════════════════════════
   CHIPS & ALERTS — Bolder text (feedback: "too thin")
   ═══════════════════════════════════════════════════════════════ */

.mud-chip .mud-chip-content {
    font-weight: 600;
}

.mud-alert-message {
    font-weight: 500;
    font-size: 0.875rem;
}


/* ═══════════════════════════════════════════════════════════════
   TABS — No rounding. No pink. Clean underline.
   ═══════════════════════════════════════════════════════════════ */

.mud-tab {
    border-radius: 0 !important;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Tab active text: default color, not pink */
.mud-tabs-toolbar .mud-tab-active {
    color: var(--mud-palette-text-primary) !important;
}

/* Tab slider: magenta→violet→yellow gradient instead of flat pink */
.mud-tab-slider {
    background: linear-gradient(90deg, #FF00EE, #A855F7, #FCFE01) !important;
    height: 2px !important;
    opacity: 0.7;
}


/* ═══════════════════════════════════════════════════════════════
   CARDS — Hover highlight
   ═══════════════════════════════════════════════════════════════ */

.mud-card {
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.skaii-dark .mud-card:hover {
    border-color: rgba(255, 0, 238, 0.12);
    box-shadow: 0 8px 32px rgba(255, 0, 238, 0.06);
}

.skaii-light .mud-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}


/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */

.mud-table-head th {
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Dark: glass table */
.skaii-dark .mud-table-root {
    background: rgba(16, 16, 26, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.skaii-dark .mud-table-row:hover {
    background: rgba(255, 0, 238, 0.04) !important;
}

/* Light: distinct hover vs stripe (feedback: "no contrast") */
.skaii-light .mud-table-row:hover {
    background: rgba(214, 0, 199, 0.06) !important;
}


/* ═══════════════════════════════════════════════════════════════
   DARK MODE ELEVATION — Visible borders per level
   Previous attempts used attribute selectors that didn't match.
   Target the actual MudBlazor elevation classes directly.
   ═══════════════════════════════════════════════════════════════ */

.skaii-dark .mud-elevation-0 { background: rgba(16, 16, 26, 0.40) !important; }
.skaii-dark .mud-elevation-1 {
    background: rgba(22, 22, 36, 0.70) !important;
    border: 1px solid rgba(255, 0, 238, 0.06) !important;
    box-shadow: 0 0 8px rgba(255, 0, 238, 0.04), 0 0 2px rgba(255, 0, 238, 0.06) !important;
}
.skaii-dark .mud-elevation-2 {
    background: rgba(28, 28, 44, 0.75) !important;
    border: 1px solid rgba(255, 0, 238, 0.09) !important;
    box-shadow: 0 0 14px rgba(255, 0, 238, 0.06), 0 0 4px rgba(255, 0, 238, 0.08) !important;
}
.skaii-dark .mud-elevation-3 {
    background: rgba(34, 34, 52, 0.80) !important;
    border: 1px solid rgba(255, 0, 238, 0.12) !important;
    box-shadow: 0 0 20px rgba(255, 0, 238, 0.08), 0 0 6px rgba(255, 0, 238, 0.10) !important;
}
.skaii-dark .mud-elevation-4 {
    background: rgba(40, 40, 60, 0.85) !important;
    border: 1px solid rgba(255, 0, 238, 0.15) !important;
    box-shadow: 0 0 28px rgba(255, 0, 238, 0.10), 0 0 8px rgba(255, 0, 238, 0.14) !important;
}
.skaii-dark .mud-elevation-5,
.skaii-dark .mud-elevation-6 {
    background: rgba(46, 46, 68, 0.90) !important;
    border: 1px solid rgba(255, 0, 238, 0.18) !important;
    box-shadow: 0 0 36px rgba(255, 0, 238, 0.12), 0 0 10px rgba(255, 0, 238, 0.18) !important;
}


/* ═══════════════════════════════════════════════════════════════
   DIALOGS — Blur backdrop, glass surface in dark
   Scoped to dialogs ONLY — NOT menus, selects, tooltips
   ═══════════════════════════════════════════════════════════════ */

.mud-dialog-container > .mud-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.skaii-dark .mud-dialog .mud-paper {
    background: rgba(16, 16, 26, 0.92) !important;
    backdrop-filter: blur(32px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 0, 238, 0.06);
}

.skaii-light .mud-dialog .mud-paper {
    box-shadow: 4px 4px 0 rgba(214, 0, 199, 0.20);
}


/* ═══════════════════════════════════════════════════════════════
   INPUTS — Focus ring
   ═══════════════════════════════════════════════════════════════ */

.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    box-shadow: 0 0 0 2px rgba(255, 0, 238, 0.12);
}

.skaii-light .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--mud-palette-primary) !important;
    box-shadow: 0 0 0 1px var(--mud-palette-primary);
}


/* ═══════════════════════════════════════════════════════════════
   DARK MODE SURFACES — Glass effect
   ═══════════════════════════════════════════════════════════════ */

.skaii-dark .mud-paper {
    background: rgba(16, 16, 26, 0.55) !important;
}

/* Light mode: clean white, no glass */
.skaii-light .mud-paper {
    background: #FFFFFF !important;
    border: 1px solid rgba(128, 128, 128, 0.10);
}


/* ═══════════════════════════════════════════════════════════════
   BACKGROUNDS
   ═══════════════════════════════════════════════════════════════ */

/* MinimalLayout has no AppBar — drop MudMainContent's default
   var(--mud-appbar-height) padding-top so onboarding/auth ceremonies
   don't render a black gap above the wizard card. DesktopLayout keeps the
   stock offset since it actually shows an AppBar. The doubled class
   lifts specificity above MudBlazor's own .mud-main-content rule. */
.skaii-main--no-appbar.mud-main-content {
    padding-top: 0;
}

/* Dark: ambient magenta glow */
.skaii-dark .skaii-main {
    background: radial-gradient(ellipse at 30% 20%, rgba(255, 0, 238, 0.025) 0%, transparent 55%),
                radial-gradient(ellipse at 70% 80%, rgba(168, 85, 247, 0.015) 0%, transparent 55%);
}

/* Light: subtle grid texture */
.skaii-light .skaii-main {
    background-image:
        linear-gradient(rgba(0,0,0,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.012) 1px, transparent 1px);
    background-size: 24px 24px;
}


/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }

.skaii-dark ::-webkit-scrollbar-thumb { background: rgba(255, 0, 238, 0.15); border-radius: 3px; }
.skaii-dark ::-webkit-scrollbar-thumb:hover { background: rgba(255, 0, 238, 0.30); }

.skaii-light ::-webkit-scrollbar-thumb { background: rgba(128, 128, 128, 0.25); border-radius: 3px; }
.skaii-light ::-webkit-scrollbar-thumb:hover { background: rgba(214, 0, 199, 0.30); }


/* ═══════════════════════════════════════════════════════════════
   WASM LOADING & ERROR
   ═══════════════════════════════════════════════════════════════ */

.loading-progress {
    position: relative; display: block;
    width: 8rem; height: 8rem;
    margin: 20vh auto 1rem auto;
}
.loading-progress circle {
    fill: none; stroke: #1F1F30;
    stroke-width: 0.6rem; transform-origin: 50% 50%; transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: #FF00EE;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute; text-align: center; font-weight: bold;
    color: #EEEDF5;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }

#blazor-error-ui {
    background: #3A1020; color: #FF8FA4;
    bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,0.4);
    display: none; left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem;
}

/* ============================================================
   Authentication ceremony — used by Authentication.razor under MinimalLayout.
   The framework's <RemoteAuthenticatorView> emits raw text fragments;
   wrap them in a centered card so the OIDC round-trip looks branded.
   ============================================================ */
.skaii-auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Full viewport — Authentication.razor mounts under MinimalLayout which
       has NO MudAppBar, so the previous `100dvh - 64px` (subtracting the
       app-bar height) pushed the auth card visibly off-center. */
    min-height: 100dvh;
    padding-block: 2rem;
}
.skaii-auth-paper {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    min-width: min(420px, 100%);
}

/* Global SR-only utility — visible to assistive tech, visually hidden.
   Standard a11y pattern (clip-rect recipe; preserves accessibility tree).
   See https://www.w3.org/WAI/tutorials/forms/labels/#hiding
   Used by Authentication.razor's H1 landmark, OnboardingMultiSelectStep's
   aria-live results-count region, meal swap connectors, and any future
   SR-only label/region. .sr-only is the canonical name (matches Bootstrap
   and ARIA authoring practices); .visually-hidden is kept as an alias for
   existing callers. */
.sr-only,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ═══════════════════════════════════════════════════════════════
   AUTHORIZING / SETTING-UP-ACCOUNT CURTAIN
   ═══════════════════════════════════════════════════════════════
   Shared by App.razor's <Authorizing> slot (auth-state-loading
   window) AND AuthGate's first-probe blocking curtain. Both render
   under ChromeShell's MudThemeProvider so MudBlazor CSS variables
   are seeded; the curtain itself uses --mud-palette-* so it
   respects the user's dark/light preference.

   Full-viewport flex column, centred. The element is the topmost
   render-tree node during cold-mount (before any layout mounts),
   so position:fixed + inset:0 covers the entire viewport. z-index
   sits above MudOverlay (1100) and below dialogs (1400). */
.skaii-authorizing {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--mud-palette-background, #08080E);
    color: var(--mud-palette-text-primary, #F2F1F4);
}
.skaii-authorizing__message {
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.04em;
    color: var(--mud-palette-text-primary, #F2F1F4);
}
