/* ChessOpeningSmith design system — visual identity (2025-11).
   Loaded after the historical stylesheets and before the component (scoped) styles.
   Original ChessOpeningSmith palette and backgrounds (blue primary); colour is carried by buttons and feature cards,
   cards clearly separated from the page by surface, border and shadow,
   generous spacing, one obvious main action, large targets (≥ 44 px), icon + short label buttons. */

:root {
    --cos-radius-xl: 24px;
    --cos-radius-lg: 20px;
    --cos-radius: 16px;
    --cos-radius-sm: 12px;
    --cos-space-1: .5rem;
    --cos-space-2: .75rem;
    --cos-space-3: 1rem;
    --cos-space-4: 1.5rem;
    --cos-space-5: 2rem;
    --cos-space-6: 3rem;
    --cos-card-pad: clamp(1.15rem, 2.4vw, 1.6rem);
    --cos-section-gap: clamp(1.5rem, 3vw, 2.25rem);
    --cos-target: 44px;
    --cos-surface: var(--mud-palette-surface);
    --cos-surface-2: color-mix(in srgb, var(--mud-palette-surface) 93%, var(--mud-palette-text-primary));
    --cos-surface-tint: color-mix(in srgb, var(--mud-palette-surface) 90%, var(--mud-palette-primary));
    --cos-border: color-mix(in srgb, var(--mud-palette-lines-default) 70%, var(--mud-palette-primary) 12%);
    --cos-border-strong: color-mix(in srgb, var(--mud-palette-primary) 45%, transparent);
    --cos-shadow: 0 10px 30px rgba(15, 23, 42, .10);
    --cos-shadow-lg: 0 24px 60px rgba(2, 6, 23, .32);
    --cos-hero: var(--mud-palette-surface);
    /* One calm accent per domain. */
    --cos-accent-openings: #3b82f6;
    --cos-accent-training: #14b8a6;
    --cos-accent-courses: #0ea5e9;
    --cos-accent-games: #f59e0b;
    --cos-accent-stats: #ec4899;
    --cos-accent-account: #8b93b5;
    --cos-accent-admin: #0ea5e9;
    --cos-tile-openings: linear-gradient(135deg, #1d4ed8, #3b82f6);
    --cos-tile-training: linear-gradient(135deg, #0f9488, #26c6a6);
    --cos-tile-courses: linear-gradient(135deg, #0369a1, #0ea5e9);
    --cos-tile-games: linear-gradient(135deg, #d97706, #f59e0b);
    --cos-tile-stats: linear-gradient(135deg, #be185d, #f472b6);
    --cos-tile-admin: linear-gradient(135deg, #0277bd, #26a69a);
}

/* ---------- Buttons: sentence case, rounded, bold, comfortable ---------- */
.mud-button-root.mud-button {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
    border-radius: var(--cos-radius-sm);
}
.mud-button-root.mud-button-filled:not(.mud-button-filled-size-small) { box-shadow: 0 6px 16px color-mix(in srgb, var(--mud-palette-primary) 22%, transparent); }
.mud-button-root.mud-button-filled:not(.mud-button-filled-size-small):hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--mud-palette-primary) 30%, transparent); }
/* Comfortable targets on content pages; the board workspaces keep their compact Lichess-style toolbars. */
:is(.mud-main-content, .mud-dialog, .responsive-modal) .mud-button-root.mud-button:not([class*="size-small"]):not(:is(.analysis-workspace, .board-shell, .chess-board, .board-shell-sheet, .otb-entry) *) {
    min-height: var(--cos-target);
    padding-inline: 1.1rem;
}
.mud-button-root.mud-button:not(:is(.mud-appbar, .mud-drawer) *) .mud-button-icon-start { margin-inline-end: .5rem; }
.mud-chip { border-radius: 999px; }

/* ---------- Inputs ---------- */
.mud-input.mud-input-outlined .mud-input-outlined-border { border-radius: var(--cos-radius-sm); }
.mud-input.mud-input-outlined:not(.mud-disabled):not(.mud-input-error):hover .mud-input-outlined-border { border-color: var(--cos-border-strong); }

/* ---------- Cards ---------- */
.mud-paper:not(.mud-appbar):not(.mud-drawer) { border-radius: var(--cos-radius-lg); }
.mud-main-content .mud-paper.mud-elevation-0:not(.mud-popover):not(.mud-appbar):not(.mud-drawer),
.mud-main-content .mud-paper.mud-paper-outlined,
.mud-main-content .mud-card {
    border: 1px solid var(--cos-border);
    background-color: var(--cos-surface);
}
.mud-main-content .mud-card { border-radius: var(--cos-radius-lg); box-shadow: var(--cos-shadow); }

/* Reusable card + section header for every page. */
.cos-card {
    padding: var(--cos-card-pad);
    border: 1px solid var(--cos-border);
    border-radius: var(--cos-radius-lg);
    background: var(--cos-surface);
    box-shadow: var(--cos-shadow);
}
.cos-section-heading { display: flex; align-items: center; gap: .9rem; margin: 0 0 1.25rem; }
.cos-section-heading h2, .cos-section-heading h3 { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.cos-section-heading p { margin: .15rem 0 0; color: var(--mud-palette-text-secondary); }
.cos-tile {
    display: grid; place-items: center; flex: 0 0 auto;
    width: 48px; height: 48px; border-radius: 15px; color: #fff;
    background: var(--cos-tile-openings);
}
.cos-tile.training { background: var(--cos-tile-training); }
.cos-tile.courses { background: var(--cos-tile-courses); }
.cos-tile.games { background: var(--cos-tile-games); }
.cos-tile.stats { background: var(--cos-tile-stats); }
.cos-tile.admin { background: var(--cos-tile-admin); }
.cos-tile.danger { background: linear-gradient(135deg, #b91c1c, #f87171); }

/* ---------- Alerts: rounded, airy ---------- */
.mud-main-content .mud-alert { border-radius: var(--cos-radius); padding: .85rem 1.1rem; }

/* ---------- Modals & dialogs: always a real card, centered, with a calm backdrop ---------- */
.mud-overlay-dialog .mud-overlay-scrim,
.responsive-modal-overlay,
.game-edit-overlay,
.folder-share-overlay,
.games-import-overlay,
.otb-meta-overlay,
.otb-tool-overlay,
.feedback-editor-overlay,
.feedback-export-overlay {
    background: rgba(2, 6, 23, .62) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.responsive-modal-overlay { align-items: center; padding: 24px 16px; }

.mud-dialog,
.responsive-modal,
.admin-modal,
.game-edit-card,
.folder-share-card,
.games-import-dialog,
.otb-meta-dialog,
.otb-tool-dialog,
.feedback-editor,
.feedback-export-modal,
.training-picker-modal,
.language-modal,
.recovery-secret-dialog,
.free-analysis-modal,
.otb-entry-modal > section {
    border: 1px solid var(--cos-border) !important;
    border-radius: var(--cos-radius-xl) !important;
    background-color: var(--mud-palette-surface) !important;
    box-shadow: var(--cos-shadow-lg) !important;
}
.responsive-modal {
    width: min(520px, 100%);
    max-height: calc(100dvh - 48px);
    padding: clamp(1.35rem, 3vw, 1.9rem) !important;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.responsive-modal > .mud-typography-h5:first-child,
.responsive-modal > .mud-typography-h6:first-child {
    display: flex; align-items: center; gap: .75rem;
    margin-bottom: .75rem !important;
    font-weight: 800;
    letter-spacing: -.01em;
}
.responsive-modal > .mud-typography-h5:first-child::before,
.responsive-modal > .mud-typography-h6:first-child::before {
    content: ""; flex: 0 0 auto; width: 6px; height: 1.4em; border-radius: 999px;
    background: linear-gradient(180deg, var(--mud-palette-primary), #0ea5e9);
}
.responsive-modal .mud-input-control { margin-block: .35rem .5rem; }
/* Modal action rows: right-aligned, spaced, big targets. */
.responsive-modal > .d-flex.justify-end,
.responsive-modal .cos-dialog-actions,
.mud-dialog .mud-dialog-actions {
    gap: .75rem !important;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cos-border);
    flex-wrap: wrap;
}
.mud-dialog .mud-dialog-title { padding: 1.4rem 1.6rem .6rem; }
.mud-dialog .mud-dialog-title .mud-typography { font-weight: 800; }
.mud-dialog .mud-dialog-content { padding: .5rem 1.6rem 1rem; }
.mud-dialog .mud-dialog-actions { margin: 0; padding: 1rem 1.6rem 1.4rem; }
.responsive-modal select,
.responsive-modal .opening-folder-parent select {
    min-height: var(--cos-target) !important;
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: var(--cos-radius-sm);
    background: var(--cos-surface-2);
    color: var(--mud-palette-text-primary);
    padding-inline: .75rem;
}

@media (max-width: 600px) {
    .responsive-modal-overlay { align-items: flex-end; padding: 8px; }
    .responsive-modal {
        width: 100% !important;
        max-height: calc(100dvh - 16px);
        border-radius: 22px !important;
        padding: 1.25rem !important;
    }
    .responsive-modal > .d-flex.justify-end > .mud-button-root,
    .responsive-modal .cos-dialog-actions > .mud-button-root { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .mud-button-root.mud-button { transition: none; }
}

/* Shared dialog header (Components/DialogHeader.razor). */
.cos-dialog-header { display: flex; align-items: flex-start; gap: 1rem; margin: 0 0 1.1rem; }
.cos-dialog-heading { flex: 1 1 auto; min-width: 0; }
.cos-dialog-heading small { display: block; margin-bottom: .15rem; color: var(--mud-palette-primary); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cos-dialog-heading h2 { margin: 0; font-size: 1.3rem; font-weight: 800; line-height: 1.25; letter-spacing: -.015em; overflow-wrap: anywhere; }
.cos-dialog-heading p { margin: .3rem 0 0; color: var(--mud-palette-text-secondary); font-size: .92rem; line-height: 1.45; }
.cos-dialog-header .cos-dialog-close { flex: 0 0 auto; width: 44px; height: 44px; margin: -4px -6px 0 0; }
.cos-dialog-field { display: grid; gap: .4rem; margin: .5rem 0; font-size: .9rem; font-weight: 700; color: var(--mud-palette-text-secondary); }
.cos-dialog-field select { width: 100%; }
.cos-dialog-actions { display: flex; justify-content: flex-end; align-items: center; }
@media (max-width: 600px) { .cos-dialog-header .cos-tile { width: 42px; height: 42px; border-radius: 13px; } }

/* Page « Info » help (native <dialog> built by page-info.js): same card language. */
.page-info-dialog { border-color: var(--cos-border, rgba(127,127,127,.25)); border-radius: 24px; box-shadow: 0 24px 60px rgba(2, 6, 23, .35); }
.page-info-dialog::backdrop { background: rgba(2, 6, 23, .62); backdrop-filter: blur(6px); }
.page-info-header { align-items: center; gap: 14px; padding: 20px 24px; }
.page-info-header::before {
    content: "i"; display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px;
    color: #fff; background: var(--cos-tile-openings); font: 700 22px Georgia, serif;
}
.page-info-header h2 { flex: 1 1 auto; margin: 0; font-weight: 800; }
.page-info-close { display: inline-flex; align-items: center; gap: .4rem; border-radius: 12px; border-color: var(--cos-border, currentColor); font-weight: 700; }
.page-info-close::before { content: "✕"; font-size: .9em; }
.page-info-body section { padding: 16px 18px; border-radius: 16px; background: var(--cos-surface-2, rgba(127,127,127,.08)); }

/* =====================================================================
   Wave 2 (2025-11): user pages, app bar, side navigation, page heroes.
   ===================================================================== */

/* « Color.Secondary » on text was historically used for calm helper text:
   keep it calm (muted) now that the secondary palette is a pink accent. */
.mud-typography.mud-secondary-text { color: var(--mud-palette-text-secondary) !important; }

/* Every content-page action is at least 44 px, small variants included.
   Board workspaces (BoardShell, analysis workspace) keep their compact toolbars. */
:is(.mud-main-content, .mud-dialog, .responsive-modal) .mud-button-root.mud-button[class*="size-small"]:not(:is(.analysis-workspace, .board-shell, .chess-board, .board-shell-sheet, .otb-entry) *) {
    min-height: var(--cos-target);
    padding-inline: .9rem;
}
:is(.mud-main-content, .mud-dialog, .responsive-modal) .mud-icon-button:not(:is(.analysis-workspace, .board-shell, .chess-board, .board-shell-sheet, .otb-entry, .mud-input-adornment, .mud-input-control) *):not(.mud-input-adornment *) {
    min-width: var(--cos-target);
    min-height: var(--cos-target);
}
.mud-input-adornment .mud-icon-button { min-width: var(--cos-target); min-height: var(--cos-target); }
.mud-toggle-group .mud-toggle-item { min-height: var(--cos-target); }

/* Menus and pop-overs: comfortable rows. */
.mud-popover .mud-list-item,
.mud-popover .mud-menu-item { min-height: var(--cos-target); border-radius: 10px; }
.mud-popover .mud-list { padding: 6px; }
.mud-popover.mud-popover-open:has(.mud-list) { border-radius: var(--cos-radius); border: 1px solid var(--cos-border); box-shadow: var(--cos-shadow-lg); }

/* App bar and side navigation keep their original look (Lucas, 2026-11-26). */

/* ---------- Page hero: calm title card on the original background (Lucas: colour on buttons and feature cards) ---------- */
.cos-page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.25rem, 3.2vw, 2.25rem) clamp(1.15rem, 3.4vw, 2.5rem);
    border: 1px solid var(--cos-border);
    border-radius: var(--cos-radius-xl);
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-surface);
    box-shadow: var(--cos-shadow);
}
body .cos-page-hero :is(h1, .mud-typography-h3, .mud-typography-h2) { margin: .15rem 0 .45rem; color: var(--mud-palette-text-primary); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-size: clamp(1.75rem, 4.2vw, 2.6rem); }
body .cos-page-hero p:not(.eyebrow), body .cos-page-hero .mud-typography-body1 { max-width: 62ch; color: var(--mud-palette-text-secondary); }
body .cos-page-hero :is(.eyebrow, .mud-typography-overline, .otb-kicker) {
    display: inline-flex; align-items: center; width: fit-content;
    padding: .3rem .75rem; border-radius: 999px;
    color: var(--mud-palette-primary); background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    font-size: .72rem; font-weight: 800; letter-spacing: .1em; line-height: 1.4;
}
body .cos-page-hero > .mud-icon-button { border: 1px solid var(--cos-border); }
body .cos-page-hero a.secondary-action {
    display: inline-flex; align-items: center; gap: .5rem; min-height: var(--cos-target); padding: 0 1.1rem; margin: 0;
    border: 1px solid var(--cos-border-strong); border-radius: 12px; color: var(--mud-palette-primary); font-weight: 700; text-decoration: none;
}
body .cos-page-hero small { color: var(--mud-palette-text-secondary); }

/* Calm empty states shown as a real card. */
.cos-empty-card {
    display: grid; justify-items: center; gap: .6rem; padding: clamp(2rem, 5vw, 3.5rem) 1.25rem;
    border: 1px dashed var(--cos-border-strong); border-radius: var(--cos-radius-xl);
    background: var(--cos-surface-tint); text-align: center;
}
.cos-empty-card > .mud-icon-root:first-child,
.cos-empty-card > svg:first-child { width: 56px; height: 56px; padding: 14px; border-radius: 18px; color: #fff; background: var(--cos-tile-openings); box-sizing: border-box; }

@media (max-width: 600px) {
    .cos-page-hero { border-radius: var(--cos-radius-lg); }
    body .cos-page-hero .mud-button-root.mud-button { width: 100%; }
}

/* Page-specific hero fit. */
.cos-page-hero.cos-hero-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.board-settings-header.cos-page-hero { max-width: none; align-items: center; }
.preparation-heading.cos-page-hero { margin-bottom: var(--cos-section-gap); }
.opening-page-header.cos-page-hero { align-items: center; margin-bottom: var(--cos-section-gap); }
@media (max-width: 700px) {
    .preparation-heading.cos-page-hero, .opening-page-header.cos-page-hero { flex-direction: column; align-items: stretch; }
}
/* Board colour suggestions: real 44 px swatches. */
.board-color-suggestions button { width: 44px; height: 44px; border-radius: 12px; }
body .cos-page-hero .otb-kicker { gap: .4rem; }
body .cos-page-hero .otb-kicker .mud-icon-root { font-size: 1rem; }
body .cos-page-hero .otb-tip { padding: .9rem 1.1rem; border: 1px solid var(--cos-border); border-radius: var(--cos-radius); background: var(--cos-surface-tint); }
body .cos-page-hero .otb-tip span { color: var(--mud-palette-text-secondary); }
.otb-hero.cos-page-hero, .course-hero.cos-page-hero { margin-bottom: var(--cos-section-gap); align-items: center; }
body .cos-page-hero .otb-tip strong { color: var(--mud-palette-primary); }

/* Pre-existing dark banners (colours unchanged): their text stays light in light mode too. */
body :is(.premium-hero, .security-hero) { color: #fff; }
body .security-hero p { color: rgba(255, 255, 255, .84); }

/* ---------- Button hierarchy (Lucas: the colour is on the buttons) ----------
   1. Filled = the one main action: solid colour, soft shadow, gentle lift.
   2. Outlined = secondary: clear 1.5 px border on the card surface.
   3. Text / icon = tertiary: quiet until hovered. */
.mud-main-content .mud-button-root.mud-button-filled:not(.mud-disabled) { transition: transform .14s ease, box-shadow .14s ease, filter .14s ease; }
.mud-main-content .mud-button-root.mud-button-filled:not(.mud-disabled):hover { transform: translateY(-1px); filter: brightness(1.05); }
.mud-button-root.mud-button-outlined { border-width: 1.5px; }
.mud-button-root.mud-button-outlined:not(.mud-disabled):hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.mud-button-root.mud-button-text:not(.mud-disabled):hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.mud-button-root.mud-disabled { box-shadow: none !important; }
.mud-main-content .mud-icon-button:not(.mud-disabled):hover { background: color-mix(in srgb, currentColor 10%, transparent); }

/* ---------- Feature cards: a clickable card says so ---------- */
.mud-main-content :is(a.mud-paper, a.mud-card, a.cos-card, button.cos-card) {
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.mud-main-content :is(a.mud-paper, a.mud-card, a.cos-card, button.cos-card):hover {
    border-color: var(--cos-border-strong);
    box-shadow: var(--cos-shadow), 0 0 0 3px color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
    .mud-main-content .mud-button-root.mud-button-filled:hover,
    .mud-main-content :is(a.mud-paper, a.mud-card, a.cos-card, button.cos-card):hover { transform: none; }
}

/* ---------- Soft tinted card actions (one pattern site-wide) ----------
   Same size, shape and spacing everywhere; colour says what the action does:
   blue edit, teal view, red delete — always a soft tint, never a heavy fill. */
.cos-action {
    --cos-action-fg: var(--mud-palette-primary);
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    box-sizing: border-box; min-width: var(--cos-target); min-height: var(--cos-target); padding: 0 .75rem;
    border: 1px solid color-mix(in srgb, var(--cos-action-fg) 24%, transparent); border-radius: 12px;
    color: var(--cos-action-fg); background: color-mix(in srgb, var(--cos-action-fg) 11%, transparent);
    font: inherit; font-size: .86rem; font-weight: 700; line-height: 1.15; text-decoration: none; white-space: nowrap;
    cursor: pointer; transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.cos-action .mud-icon-root { width: 20px; height: 20px; font-size: 20px; flex: 0 0 auto; }
.cos-action:hover:not(:disabled) { background: color-mix(in srgb, var(--cos-action-fg) 19%, transparent); border-color: color-mix(in srgb, var(--cos-action-fg) 40%, transparent); }
.cos-action:focus-visible { outline: 3px solid color-mix(in srgb, var(--cos-action-fg) 55%, transparent); outline-offset: 2px; }
.cos-action:disabled, .cos-action[aria-disabled="true"] { cursor: not-allowed; opacity: .42; }
.cos-action.view { --cos-action-fg: color-mix(in srgb, #14b8a6 72%, var(--mud-palette-text-primary)); }
.cos-action.danger { --cos-action-fg: color-mix(in srgb, var(--mud-palette-error) 86%, var(--mud-palette-text-primary)); }
.cos-action.neutral { --cos-action-fg: var(--mud-palette-text-secondary); }

/* ---------- Main action: a deep, rich brand blue with white text (both themes) ----------
   No flat pastel fill with dark text: the primary button is a deep blue with a soft
   top light, a coloured edge and a coloured glow. White on #1d4ed8 = 6.7:1 (AA). */
:root {
    --cos-primary-fill: linear-gradient(180deg, #3170ee 0%, #1d4ed8 100%);
    --cos-primary-fill-hover: linear-gradient(180deg, #3b7bf5 0%, #2152e0 100%);
    --cos-primary-edge: #1e40af;
    --cos-primary-glow: rgba(29, 78, 216, .30);
}
body .mud-button-root.mud-button-filled.mud-button-filled-primary:not(.mud-disabled),
body .mud-chip.mud-chip-filled.mud-chip-color-primary,
body .mud-fab.mud-fab-primary:not(.mud-disabled) {
    color: #fff !important; background: var(--cos-primary-fill) !important;
    border: 1px solid var(--cos-primary-edge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .20), 0 6px 16px var(--cos-primary-glow) !important;
}
body .mud-button-root.mud-button-filled.mud-button-filled-primary:not(.mud-disabled):hover,
body .mud-fab.mud-fab-primary:not(.mud-disabled):hover {
    background: var(--cos-primary-fill-hover) !important; filter: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 8px 22px var(--cos-primary-glow) !important;
}
body .mud-button-root.mud-button-filled.mud-button-filled-primary:not(.mud-disabled) .mud-icon-root,
body .mud-chip.mud-chip-filled.mud-chip-color-primary .mud-icon-root { color: #fff; }
body .mud-button-root.mud-button-filled.mud-button-filled-primary:focus-visible { outline: 3px solid color-mix(in srgb, #3b82f6 60%, transparent); outline-offset: 2px; }
/* Page rules like ".bar span { colour: muted }" must never dim the label of a main action. */
body .mud-button-root.mud-button-filled.mud-button-filled-primary:not(.mud-disabled) .mud-button-label { color: #fff !important; }

/* Card/list icon actions outside board pages follow the soft-tint pattern:
   a red delete icon button is a soft red tile, never a bare red glyph or a heavy fill. */
body .mud-main-content .mud-icon-button.mud-error-text:not(.mud-disabled):not(:is(.analysis-workspace, .board-shell, .chess-board, .board-shell-sheet, .otb-entry) *),
body .responsive-modal .mud-icon-button.mud-error-text:not(.mud-disabled) {
    border: 1px solid color-mix(in srgb, var(--mud-palette-error) 26%, transparent);
    border-radius: 12px;
    color: color-mix(in srgb, var(--mud-palette-error) 86%, var(--mud-palette-text-primary)) !important;
    background: color-mix(in srgb, var(--mud-palette-error) 10%, transparent);
}
body .mud-main-content .mud-icon-button.mud-error-text:not(.mud-disabled):not(:is(.analysis-workspace, .board-shell, .chess-board, .board-shell-sheet, .otb-entry) *):hover,
body .responsive-modal .mud-icon-button.mud-error-text:not(.mud-disabled):hover {
    background: color-mix(in srgb, var(--mud-palette-error) 18%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-error) 45%, transparent);
}
.friends-card-actions .friends-card-edit { margin-inline-start: auto; }

/* Full verification wave: legacy orange pill actions and bare status pages adopt the shared style. */
body .primary-action { min-height: var(--cos-target); align-items: center; justify-content: center; gap: .5rem; border: 1px solid var(--cos-primary-edge); border-radius: 12px; color: #fff; background: var(--cos-primary-fill); box-shadow: 0 4px 14px var(--cos-primary-glow); }
body .primary-action:hover:not(:disabled) { background: var(--cos-primary-fill-hover); }
body .primary-action:focus-visible { outline: 3px solid color-mix(in srgb, var(--mud-palette-primary) 55%, transparent); outline-offset: 2px; }
body .secondary-action { min-height: var(--cos-target); align-items: center; color: var(--mud-palette-text-primary); }
body .status-page { width: min(760px, calc(100% - 2rem)); margin: clamp(1.5rem, 5vw, 3.5rem) auto; padding: clamp(1.5rem, 4vw, 2.75rem); border: 1px solid var(--cos-border); border-radius: var(--cos-radius-xl); background: var(--mud-palette-surface); box-shadow: var(--cos-shadow); }
body .status-page h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.02em; color: var(--mud-palette-text-primary); }
body .status-page p:not(.eyebrow) { color: var(--mud-palette-text-secondary); }
body .status-page .eyebrow { color: var(--mud-palette-primary); }
body .account-card label:not(.check-row) { color: var(--mud-palette-text-primary); }
body .account-card label span, body .field-help { color: var(--mud-palette-text-secondary); }
body .account-card :is(input, textarea, select) { min-height: var(--cos-target); border-color: var(--mud-palette-lines-inputs); color: var(--mud-palette-text-primary); background: color-mix(in srgb, var(--mud-palette-text-primary) 3%, var(--mud-palette-surface)); }
body .account-card :is(input, textarea, select):focus { outline-color: var(--mud-palette-primary); }
body .account-card input[type="checkbox"], body .account-card input[type="radio"] { min-height: 0; }
body .recovery-secret-value { color: color-mix(in srgb, #f97316 70%, var(--mud-palette-text-primary)); background: color-mix(in srgb, #f97316 7%, var(--mud-palette-surface)); }
body .recovery-secret-confirmation { background: color-mix(in srgb, var(--mud-palette-text-primary) 4%, transparent); }
body .signup-password-guidance { border-color: var(--cos-border); background: color-mix(in srgb, var(--mud-palette-text-primary) 4%, var(--mud-palette-surface)); }
body .signup-password-recommendation { color: color-mix(in srgb, #f59e0b 72%, var(--mud-palette-text-primary)); }
body .signup-password-recommendation strong { color: var(--mud-palette-text-primary); }
body .promotion-picker { border-color: var(--cos-border); color: var(--mud-palette-text-primary); background: var(--mud-palette-surface); border-radius: var(--cos-radius-lg); }
body .promotion-picker > div:first-child span { color: var(--mud-palette-text-secondary); }
body :is(.promotion-choices button, .promotion-cancel, .training-help-actions button, .training-coach-panel button:not(.primary-action)) { border-color: var(--cos-border); background: color-mix(in srgb, var(--mud-palette-text-primary) 4%, var(--mud-palette-surface)); }
body :is(.promotion-choices button, .promotion-cancel):hover { border-color: color-mix(in srgb, var(--mud-palette-primary) 50%, transparent); }
