    .err-wrap {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem 1.25rem;
        background: var(--bg);
    }

    .err-card {
        width: 100%;
        max-width: 440px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r-lg);
        box-shadow: var(--shadow-2);
        padding: 2.25rem 2rem;
        text-align: center;
    }

    /* ── Full-page variant (ErrorDisplay FullPage=true, /error) ──────────
       Same body as the inline panel, centred in the viewport card. The card
       is wider than 440px and left-aligned: the meta row and action buttons
       need the room, and centred text reads poorly at this length. */
    .err-card--full {
        max-width: 560px;
        text-align: left;
    }

    .err-card--full .err-inline__actions {
        justify-content: flex-start;
    }

    /* ── ErrorDisplay ───────────────────────────────────────────────
       Renders inside the error boundary (Routes.razor), which is the
       normal authenticated shell, so this is left-aligned and card-like
       rather than the centred full-viewport treatment of .err-wrap. */

    .err-inline {
        max-width: 720px;
        margin: 0 auto;
        padding: 2rem 1.5rem;
    }

    .err-inline__head {
        display: flex;
        align-items: flex-start;
        gap: .75rem;
        margin-bottom: .85rem;
    }

    .err-inline__badge {
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 11px;
        color: var(--danger);
        background: var(--danger-soft);
        border: 1px solid var(--danger-line);
    }

    .err-inline__badge svg.lucide { width: 20px; height: 20px; }

    .err-inline__title {
        font-family: var(--display);
        font-weight: 600;
        font-size: 1.2rem;
        line-height: 1.35;
        color: var(--ink);
        margin: 0;
        padding-top: .35rem;
    }

    .err-inline__message {
        font-size: .92rem;
        line-height: 1.6;
        color: var(--ink-2);
        margin: 0 0 1.1rem;
    }

    /* The code and timestamp are the actionable part: monospaced and
       selectable so a user can copy them into a support ticket. */
    .err-inline__meta {
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
        margin: 0 0 .5rem;
        padding: .85rem 1rem;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r-md);
    }

    .err-inline__meta-row {
        display: flex;
        align-items: baseline;
        gap: .5rem;
        margin: 0;
    }

    .err-inline__meta dt {
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--ink-3);
        margin: 0;
    }

    .err-inline__meta dd { margin: 0; }

    .err-inline__code,
    .err-inline__ts {
        font-family: var(--mono);
        font-size: .85rem;
        color: var(--ink);
        user-select: all;
    }

    .err-inline__code { font-weight: 600; }

    .err-inline__hint {
        font-size: .78rem;
        color: var(--ink-3);
        margin: 0 0 1.4rem;
    }

    .err-inline__detail {
        margin: 0 0 1.25rem;
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        background: var(--surface);
    }

    .err-inline__detail summary {
        cursor: pointer;
        padding: .6rem .9rem;
        font-size: .8rem;
        font-weight: 600;
        color: var(--ink-2);
        border-bottom: 1px solid var(--line);
    }

    /* Non-Production only. Wraps rather than scrolling horizontally so a long
       stack trace cannot push the page into sideways scroll on a phone. */
    .err-inline__pre {
        margin: 0;
        padding: .9rem;
        font-family: var(--mono);
        font-size: .76rem;
        line-height: 1.5;
        color: var(--ink-2);
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        max-height: 420px;
        overflow-y: auto;
    }

    .err-inline__actions {
        display: flex;
        gap: .6rem;
        flex-wrap: wrap;
    }

    /* ── AiImageGen empty state ──────────────────────────────────── */

    .ig-empty__text {
        font-size: .92rem;
        line-height: 1.6;
        color: var(--ink-2);
        margin: 0 0 1rem;
    }

    .ig-empty__steps {
        font-size: .9rem;
        line-height: 1.7;
        color: var(--ink-2);
        margin: 0 0 1rem;
        padding-left: 1.25rem;
    }

    .ig-empty__steps code {
        font-family: var(--mono);
        font-size: .85rem;
        color: var(--ink);
    }

    .ig-empty__meta {
        font-size: .8rem;
        color: var(--ink-3);
        margin: 0;
    }
