


/* ── 1. Landing tokens, one block per theme ───────────────────────────────── */
body[data-ui-theme='neutral'] {
  --th-behind: #d9d9d6; --th-paper: #f4f4f3; --th-frame: #fafafa; --th-title: #141414; --th-tint: #ececeb;
  --th-accent-strong: #141414; --th-accent-strong-ink: #fff; --th-stage: #ededec;
  --th-side-ink: #141414; --th-side-soft: rgba(20, 20, 20, .68);
  --th-art: none;
  --th-side-art: none;
  --tblr-primary-rgb: 20, 20, 20;
  --th-side-glass: rgb(255 255 255 / 58%);
  --th-d-accent-strong: #f2f1ef;
  --th-d-accent-strong-ink: #141414;
  --th-d-link: #f2f1ef;
}
html[data-bs-theme='dark'] body[data-ui-theme='neutral'] { --tblr-primary-rgb: 242, 241, 239; }
body[data-ui-theme='sol'] {
  --th-behind: #93590a; --th-paper: #faf6e8; --th-frame: #fffdf6; --th-title: #2a2005; --th-tint: #f6eecf;
  --th-accent-strong: #1d1704; --th-accent-strong-ink: #ffd84a; --th-stage: #f3eedb;
  --th-side-ink: #fff; --th-side-soft: rgba(255, 255, 255, .76);
  --th-art: url(/assets/themes/bg-sol-e1e23ee7b24dda31011ac95119d9c218989dcb31d36da2d29b03c66ac1b1a1eb.webp);
  --th-side-art: url(/assets/themes/side-sol-14880d88a89bfb9fa9a36d46c4cf531780f76c6e383235136f5448980eac0df7.webp);
  --tblr-primary-rgb: 29, 23, 4;
  --th-accent: #ffd32a;
  --th-accent-ink: #2b2100;
  --th-link: #8a5a00;
  --th-mark: #e0a800;
  --th-d-accent-strong: #ffd84a;
  --th-d-accent-strong-ink: #1d1704;
  --th-d-link: #ffd32a;
}
html[data-bs-theme='dark'] body[data-ui-theme='sol'] { --tblr-primary-rgb: 255, 216, 74; }
body[data-ui-theme='ocean'] {
  --th-behind: #1a3fb8; --th-paper: #f2f5f9; --th-frame: #fbfcfd; --th-title: #0f1d3d; --th-tint: #e6edf8;
  --th-accent-strong: #2453e0; --th-accent-strong-ink: #fff; --th-stage: #e9edf2;
  --th-side-ink: #fff; --th-side-soft: rgba(255, 255, 255, .76);
  --th-art: url(/assets/themes/bg-ocean-b2f514c1fddb6088a731e6a2f7c90529f0f75ac9b3c423739d0065515a4262e4.webp);
  --th-side-art: url(/assets/themes/side-ocean-34119f7da2851af077a428f48dd031e33a4e65f5b591ebc5015c55bbc60aac94.webp);
  --tblr-primary-rgb: 36, 83, 224;
}
body[data-ui-theme='sunset'] {
  --th-behind: #d23c12; --th-paper: #f8f1e9; --th-frame: #fdf9f4; --th-title: #34170c; --th-tint: #f5e8db;
  --th-accent-strong: #e0501f; --th-accent-strong-ink: #fff; --th-stage: #f1e9df;
  --th-side-ink: #fff; --th-side-soft: rgba(255, 255, 255, .76);
  --th-art: url(/assets/themes/bg-sunset-2bc94b101cd4f471dc7fbcad9573692697afb034e5d6fc95c58df1d04cd09f92.webp);
  --th-side-art: url(/assets/themes/side-sunset-3a5257318eb5678f8673699a07824fc4f5a834c8252da85edc74b202b04f10a3.webp);
  --tblr-primary-rgb: 224, 80, 31;
}
body[data-ui-theme='teal'] {
  --th-behind: #0a6b63; --th-paper: #f3f4ec; --th-frame: #fbfbf6; --th-title: #0d2a27; --th-tint: #e5ebdf;
  --th-accent-strong: #0e8577; --th-accent-strong-ink: #fff; --th-stage: #ebece3;
  --th-side-ink: #fff; --th-side-soft: rgba(255, 255, 255, .76);
  --th-art: url(/assets/themes/bg-teal-473d750b26833e94adef4dd2b22cbd788200432d2e50d061b35a8e42614ececb.webp);
  --th-side-art: url(/assets/themes/side-teal-0ab13d2005dde6aea7819b566abdaebdb6ecaf6b533c94c7712c9c93711241e8.webp);
  --tblr-primary-rgb: 14, 133, 119;
}
body[data-ui-theme='beach_tennis'] {
  --th-behind: #0d7c8c; --th-paper: #f3f6f4; --th-frame: #fbfcfa; --th-title: #0f2f36; --th-tint: #e1eeec;
  --th-accent-strong: #f2603a; --th-accent-strong-ink: #fff; --th-stage: #e4eeed;
  --th-side-ink: #fff; --th-side-soft: rgba(255, 255, 255, .76);
  --th-art: url(/assets/themes/bg-beach_tennis-a6c69e3bdf54f53ad3d3bce3a77a002defc1bac796dae82f42cac89d0c9ae93f.webp);
  --th-side-art: url(/assets/themes/side-beach_tennis-3477c84c0fcac0b905c08a01edfd98eb118b8b2f2b7eb80ad850f49b8972aec3.webp);
  --tblr-primary-rgb: 242, 96, 58;
}
body[data-ui-theme='surf'] {
  --th-behind: #1a3fb8; --th-paper: #f2f5f9; --th-frame: #fbfcfd; --th-title: #0f1d3d; --th-tint: #e6edf8;
  --th-accent-strong: #2453e0; --th-accent-strong-ink: #fff; --th-stage: #e6eef5;
  --th-side-ink: #fff; --th-side-soft: rgba(255, 255, 255, .76);
  --th-art: url(/assets/themes/bg-surf-043fce5aaee90004e8a10cf8644b83805648a72677c205ff634f5764a199131b.webp);
  --th-side-art: url(/assets/themes/side-surf-34119f7da2851af077a428f48dd031e33a4e65f5b591ebc5015c55bbc60aac94.webp);
  --tblr-primary-rgb: 36, 83, 224;
}
body[data-ui-theme='personal'] {
  --th-behind: #3a3a3a; --th-paper: #f1f1f0; --th-frame: #fafafa; --th-title: #141414; --th-tint: #ececeb;
  --th-accent-strong: #141414; --th-accent-strong-ink: #fff; --th-stage: #e9e9e8;
  --th-side-ink: #fff; --th-side-soft: rgba(255, 255, 255, .76);
  --th-art: url(/assets/themes/bg-personal-6c0669a71b9f66921904d22ba483b94ef30dbe5392739b801d23b90277cd8a89.webp);
  --th-side-art: url(/assets/themes/side-personal-b529d78826e4fc27d59a3ade387f0dea7c07327ec9f5c53c0e5384aaab669a06.webp);
  --tblr-primary-rgb: 20, 20, 20;
  --th-d-accent-strong: #f2f1ef;
  --th-d-accent-strong-ink: #141414;
  --th-d-link: #f2f1ef;
}
html[data-bs-theme='dark'] body[data-ui-theme='personal'] { --tblr-primary-rgb: 242, 241, 239; }
body[data-ui-theme='nutri'] {
  --th-behind: #1f4a22; --th-paper: #f2f6ec; --th-frame: #fafcf7; --th-title: #13301a; --th-tint: #e3efdf;
  --th-accent-strong: #2c7a3a; --th-accent-strong-ink: #fff; --th-stage: #e8efe4;
  --th-side-ink: #fff; --th-side-soft: rgba(255, 255, 255, .76);
  --th-art: url(/assets/themes/bg-nutri-a5c66926658feb0e6febf72009f63023057fbf168abe07b1f00bd05935c5c69b.webp);
  --th-side-art: url(/assets/themes/side-nutri-9b12a368f209bcddffa4ccc1eb660f5f1c12d4fb4e697259c7f3df940760383e.webp);
  --tblr-primary-rgb: 44, 122, 58;
}
body[data-ui-theme='manicure'] {
  --th-behind: #121c4f; --th-paper: #fbf0f4; --th-frame: #fffafc; --th-title: #1b1f4d; --th-tint: #f8e1ea;
  --th-accent-strong: #e0457b; --th-accent-strong-ink: #fff; --th-stage: #f3e6ec;
  --th-side-ink: #fff; --th-side-soft: rgba(255, 255, 255, .76);
  --th-art: url(/assets/themes/bg-manicure-554658e18ffbad22e12281c00e21ad83f011145be64c7457ebbad18ac75159c7.webp);
  --th-side-art: url(/assets/themes/side-manicure-3c09666d4d993c7c60c7507343a3d4eb61f93eac9a4ceb7aded111a748156775.webp);
  --tblr-primary-rgb: 224, 69, 123;
}
body[data-ui-theme='yoga'] {
  --th-behind: #a99bce; --th-paper: #f6f3f9; --th-frame: #fcfbfe; --th-title: #2b2340; --th-tint: #ece6f5;
  --th-accent-strong: #6f9f86; --th-accent-strong-ink: #fff; --th-stage: #ece8f2;
  --th-side-ink: #2b2340; --th-side-soft: rgba(43, 35, 64, .68);
  --th-art: url(/assets/themes/bg-yoga-6b27e29ead1004ea85bd674a3a42898d0998f878cba4ff5d33e2b343695e6656.webp);
  --th-side-art: url(/assets/themes/side-yoga-b700b10852396b251609dde0718f629cfc33ffa7eaeb0f61b6a5b9bad7585d4b.webp);
  --tblr-primary-rgb: 111, 159, 134;
  --th-side-glass: rgb(255 255 255 / 46%);
}

/* ── 2. Derived tokens ────────────────────────────────────────────────────── */
body[data-ui-theme] {
  --th-page: var(--th-paper);
  --th-surface: #fff;
  --th-ttl: var(--th-title);
  --th-tint-c: var(--th-tint);
  --th-inset: color-mix(in srgb, var(--th-tint) 55%, #fff);
  --th-stage-c: var(--th-stage);
  --th-frame-c: var(--th-frame);
  --th-hl: var(--th-accent, var(--th-accent-strong));
  --th-hl-ink: var(--th-accent-ink, var(--th-accent-strong-ink));
  --th-btn: var(--th-accent-strong);
  --th-btn-ink: var(--th-accent-strong-ink);
  --th-text: var(--th-link, var(--th-accent-strong));
  --th-mark-c: var(--th-mark, var(--th-hl));
  --th-veil: linear-gradient(to bottom, var(--th-page) 30%, color-mix(in srgb, var(--th-page) 72%, transparent));
  --th-card-shadow: 0 0 0 1px rgb(13 13 12 / 5%), 0 10px 28px -18px rgb(13 13 12 / 28%);
  --th-soft-shadow: 0 0 0 1px rgb(13 13 12 / 6%), 0 1px 2px rgb(13 13 12 / 5%);
  --th-glass-fill: color-mix(in srgb, var(--th-frame-c) 68%, transparent);
  --th-glass-fill-strong: color-mix(in srgb, var(--th-frame-c) 80%, transparent);
  --th-glass-sheen: linear-gradient(135deg, rgb(255 255 255 / 36%), rgb(255 255 255 / 5%) 62%);
  --th-glass-strong-sheen: linear-gradient(135deg, rgb(255 255 255 / 46%), rgb(255 255 255 / 8%) 62%);
  --th-glass: var(--th-glass-sheen), var(--th-glass-fill);
  --th-glass-strong: var(--th-glass-strong-sheen), var(--th-glass-fill-strong);
  --th-glass-blur: blur(8px) saturate(150%);
  --th-glass-edge: color-mix(in srgb, var(--th-ttl) 8%, transparent);
  --th-glass-shadow: inset 0 1px 0 rgb(255 255 255 / 66%), 0 0 0 1px color-mix(in srgb, var(--th-ttl) 6%, transparent), 0 12px 30px -16px rgb(13 13 12 / 26%);
  --th-overlay-fill: color-mix(in srgb, var(--th-frame-c) 92%, transparent);
  --th-overlay-sheen: linear-gradient(135deg, rgb(255 255 255 / 34%), rgb(255 255 255 / 4%) 62%);
  --th-overlay-blur: blur(12px) saturate(145%);
  --th-overlay-shadow: inset 0 1px 0 rgb(255 255 255 / 66%), 0 0 0 1px color-mix(in srgb, var(--th-ttl) 8%, transparent), 0 18px 48px -22px rgb(13 13 12 / 38%);
  --th-rim: linear-gradient(140deg, rgb(255 255 255 / 78%), rgb(255 255 255 / 12%) 30%, rgb(255 255 255 / 0%) 50%, rgb(255 255 255 / 12%) 70%, rgb(255 255 255 / 58%));
  --th-selected: color-mix(in srgb, var(--th-hl) 16%, var(--th-surface));
  --th-art-opacity: 1;
}
html[data-bs-theme='dark'] body[data-ui-theme] {
  --th-page: color-mix(in srgb, var(--th-behind) 9%, #111112);
  --th-surface: color-mix(in srgb, var(--th-behind) 7%, #1c1c1e);
  --th-ttl: color-mix(in srgb, var(--th-tint) 26%, #f4f3f1);
  --th-tint-c: color-mix(in srgb, var(--th-behind) 22%, #232325);
  --th-inset: color-mix(in srgb, var(--th-behind) 10%, #252527);
  --th-stage-c: color-mix(in srgb, var(--th-behind) 7%, #0b0b0c);
  --th-frame-c: color-mix(in srgb, var(--th-behind) 10%, #18181a);
  --th-hl: var(--th-d-accent-strong, var(--th-accent, var(--th-accent-strong)));
  --th-hl-ink: var(--th-d-accent-strong-ink, var(--th-accent-ink, var(--th-accent-strong-ink)));
  --th-btn: var(--th-d-accent-strong, var(--th-accent-strong));
  --th-btn-ink: var(--th-d-accent-strong-ink, var(--th-accent-strong-ink));
  --th-text: var(--th-d-link, color-mix(in srgb, var(--th-accent-strong) 60%, #fff));
  --th-veil: linear-gradient(to bottom, var(--th-page) 30%, color-mix(in srgb, var(--th-page) 86%, transparent));
  --th-card-shadow: 0 0 0 1px rgb(255 255 255 / 7%), 0 12px 30px -18px rgb(0 0 0 / 70%);
  --th-soft-shadow: 0 0 0 1px rgb(255 255 255 / 8%);
  --th-glass-fill: color-mix(in srgb, var(--th-frame-c) 74%, transparent);
  --th-glass-fill-strong: color-mix(in srgb, var(--th-frame-c) 84%, transparent);
  --th-glass-sheen: linear-gradient(135deg, rgb(255 255 255 / 9%), rgb(255 255 255 / 0%) 60%);
  --th-glass-strong-sheen: linear-gradient(135deg, rgb(255 255 255 / 12%), rgb(255 255 255 / 0%) 60%);
  --th-glass: var(--th-glass-sheen), var(--th-glass-fill);
  --th-glass-strong: var(--th-glass-strong-sheen), var(--th-glass-fill-strong);
  --th-glass-blur: blur(5px) saturate(140%);
  --th-glass-edge: rgb(255 255 255 / 10%);
  --th-glass-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), 0 0 0 1px rgb(255 255 255 / 8%), 0 12px 30px -16px rgb(0 0 0 / 60%);
  --th-overlay-fill: color-mix(in srgb, var(--th-frame-c) 90%, transparent);
  --th-overlay-sheen: linear-gradient(135deg, rgb(255 255 255 / 15%), rgb(255 255 255 / 0%) 60%);
  --th-overlay-blur: blur(10px) saturate(140%);
  --th-overlay-shadow: inset 0 1px 0 rgb(255 255 255 / 16%), 0 0 0 1px rgb(255 255 255 / 10%), 0 18px 48px -22px rgb(0 0 0 / 70%);
  --th-rim: linear-gradient(140deg, rgb(255 255 255 / 30%), rgb(255 255 255 / 4%) 30%, rgb(255 255 255 / 0%) 50%, rgb(255 255 255 / 4%) 70%, rgb(255 255 255 / 20%));
  --th-selected: color-mix(in srgb, var(--th-hl) 20%, var(--th-surface));
  --th-art-opacity: .14;
}
@media (prefers-reduced-transparency: reduce) {
  body[data-ui-theme] {
    --th-glass: var(--th-frame-c);
    --th-glass-strong: var(--th-frame-c);
    --th-glass-fill: var(--th-frame-c);
    --th-glass-fill-strong: var(--th-frame-c);
    --th-glass-sheen: none;
    --th-glass-strong-sheen: none;
    --th-rim: linear-gradient(140deg, var(--th-frame-c), var(--th-frame-c));
    --th-overlay-fill: var(--th-frame-c);
    --th-overlay-sheen: none;
    --th-overlay-blur: none;
  }
}

/* ── 3. Onto the app's token systems ──────────────────────────────────────── */
body[data-ui-theme] {
  /* chat-first workspace (broder_agents.css); body.bk-frame (broder_classic.css) derives
     --background, --surface, --brand-* … from these, so the classic screens follow */
  --bc-bg: var(--th-stage-c);
  --bc-canvas: var(--th-page);
  --bc-surface: var(--th-surface);
  --bc-inset: var(--th-inset);
  --bc-accent: var(--th-hl);
  --bc-accent-hover: color-mix(in srgb, var(--th-hl) 86%, #fff);
  --bc-accent-ink: var(--th-hl-ink);
  --bc-link: var(--th-text);
  --bc-shadow-card: var(--th-card-shadow);
  /* liquid glass (broder_liquid.css): neutral glass takes the theme frame, the former
     yellow glass becomes the theme's primary colour */
  --lg-bg: var(--th-glass);
  --lg-bg-strong: var(--th-glass-strong);
  --lg-field: var(--th-inset);
  --lg-field-focus: var(--th-surface);
  --lg-shadow: var(--th-card-shadow);
  --lg-shadow-soft: var(--th-soft-shadow);
  --lg-blur: var(--th-glass-blur);
  --lg-hover: color-mix(in srgb, var(--th-tint-c) 70%, transparent);
  --lgy-bg: var(--th-btn);
  --lgy-bg-hover: color-mix(in srgb, var(--th-btn) 88%, #fff);
  --lgy-soft: var(--th-selected);
  --lgy-shadow: 0 0 0 1px color-mix(in srgb, var(--th-hl) 22%, transparent), 0 8px 20px -14px color-mix(in srgb, var(--th-hl) 70%, transparent);
  --lgy-ink: var(--th-btn-ink);
  --lg-ambient-a: transparent; --lg-ambient-b: transparent; --lg-ambient-c: transparent;
  /* reusable glass (broder_glass.css) */
  --broder-glass-tint: color-mix(in srgb, var(--th-frame-c) 62%, transparent);
  --broder-glass-fallback: var(--th-frame-c);
  --broder-glass-blur: 10px;
  --broder-glass-saturation: 160%;
  /* broder.css: the tokens body.bk-frame does not remap */
  --broder-state-border: color-mix(in srgb, var(--th-hl) 32%, transparent);
  --sidebar-glass: var(--th-frame-c);
  /* Tabler */
  --tblr-primary: var(--th-btn);
  --tblr-primary-fg: var(--th-btn-ink);
  --tblr-primary-lt: color-mix(in srgb, var(--th-hl) 14%, transparent);
  --tblr-link-color: var(--th-text);
  --tblr-link-hover-color: var(--th-ttl);
  --tblr-heading-color: var(--th-ttl);
  --tblr-body-bg: var(--th-page);
  --tblr-bg-surface: var(--th-surface);
}
/* Screens outside the robin frame read broder.css's tokens directly. */
body[data-ui-theme]:not(.bk-frame) {
  --background: var(--th-page);
  --surface: var(--th-surface);
  --surface-secondary: var(--th-inset);
  --surface-strong: var(--th-tint-c);
  --brand-primary: var(--th-hl);
  --brand-primary-hover: color-mix(in srgb, var(--th-hl) 86%, #fff);
  --brand-primary-deep: var(--th-text);
  --brand-primary-soft: color-mix(in srgb, var(--th-hl) 14%, transparent);
  --brand-primary-quiet: color-mix(in srgb, var(--th-hl) 6%, transparent);
  --brand-link: var(--th-text);
  --brand-accent: var(--th-hl);
}
body[data-ui-theme].bk-frame { --brand-accent: var(--th-hl); }

/* ── 4. Materials ─────────────────────────────────────────────────────────── */
/* Headings take the theme's title ink (lowest specificity: coloured surfaces keep theirs). */
body[data-ui-theme] :where(.robin-content, .bs-content, .bc-app, .b2-onboarding-main, .page-center, .bs-sheet) :where(h1, h2, h3, .bs-title) { color: var(--th-ttl); }

/* Cards use the landing's tinted glass. Repeated rows keep the sheen and tint without blur. */
:root body[data-ui-theme] :is(
  .robin-panel, .b2-panel, .b2-card, .card, .robin-operation-card, .b3-card, .b2-shortcut, .b2-day-plan, .b2-metric,
  .b2-finance-summary, .b2-lesson-card, .b2-create-panel, .b2-selected-student, .b2-empty, .b2-attention,
  .robin-group-card, .robin-student-card, .robin-lesson-card, .robin-discover-card, .robin-empty-card, .robin-code-card, .robin-auth-card,
  .assistant-data-card, .bc-card, .bc-task, .bc-ap-card, .bc-connect, .bc-team-card,
  .bs-tile, .bs-card, .bs-group-result, .bs-group-card,
  .bsh-panel, .bsh-rhythm, .bsh-moment, .broder-settings-section, .b2-onboarding-form, .broder-tour-card
) {
  background-color: var(--th-frame-c);
  border: 1px solid transparent;
  background-image: var(--th-glass-sheen), var(--th-rim);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  background-color: var(--th-glass-fill);
  box-shadow: var(--th-glass-shadow);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root body[data-ui-theme] :is(.robin-panel, .robin-auth-card, .robin-code-card, .b2-onboarding-form, .b2-finance-summary, .b2-selected-student, .broder-settings-section, .broder-tour-card) {
  -webkit-backdrop-filter: var(--th-glass-blur); backdrop-filter: var(--th-glass-blur);
}
/* Real overlays need enough tint to keep page copy from competing with the modal. */
:root body[data-ui-theme] :is(.bc-sheet, .bc-sheet--glass, .broder-tour-card) {
  border: 1px solid transparent;
  background-color: var(--th-overlay-fill);
  background-image: var(--th-overlay-sheen), var(--th-rim);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  box-shadow: var(--th-overlay-shadow);
  -webkit-backdrop-filter: var(--th-overlay-blur);
  backdrop-filter: var(--th-overlay-blur);
}
:root body[data-ui-theme] .bc-sheet::backdrop {
  background: rgb(20 24 30 / 42%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
:root body[data-ui-theme] :is(.b2-shortcut, .b2-day-plan, .b2-metric, .b2-finance-summary, .b2-lesson-card, .b2-create-panel, .robin-group-card, .robin-discover-card, .bs-tile, .bs-card, .bs-group-result):hover {
  background-color: var(--th-glass-fill-strong);
  background-image: var(--th-glass-strong-sheen), var(--th-rim);
}
:root body[data-ui-theme] :is(.b2-metric--featured, .b2-lesson-card--live, .bsh-home--focused .bsh-moment, .bsh-rhythm--met) { background-color: color-mix(in srgb, var(--th-hl) 12%, var(--th-glass-fill)); }
:root body[data-ui-theme] :is(.b2-lesson-card--live, .bsh-rhythm--met) { box-shadow: inset 0 0 0 1px var(--broder-state-border), var(--th-glass-shadow); }
:root body[data-ui-theme] .b2-attention.b2-attention--active {
  background-color: color-mix(in srgb, var(--th-hl) 12%, var(--th-glass-fill));
  background-image: var(--th-glass-sheen), var(--th-rim);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--th-hl) 26%, transparent), var(--th-glass-shadow);
}
:root body[data-ui-theme] :is(.bs-tile.is-on, .bs-tile[aria-pressed='true'], .bs-tile[aria-checked='true'], .bs-card.is-on) {
  background-color: color-mix(in srgb, var(--th-hl) 15%, var(--th-glass-fill));
  box-shadow: inset 0 0 0 2px var(--th-hl), var(--th-glass-shadow);
}

@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  :root body[data-ui-theme] :is(.robin-panel, .robin-auth-card, .robin-code-card, .b2-onboarding-form, .b2-finance-summary, .b2-selected-student, .broder-settings-section, .broder-tour-card) {
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root body[data-ui-theme] .bc-sheet::backdrop { background: rgb(20 24 30 / 58%); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@supports not (backdrop-filter: blur(1px)) {
  :root body[data-ui-theme] :is(.bc-sheet, .bc-sheet--glass, .broder-tour-card) {
    --th-overlay-fill: color-mix(in srgb, var(--th-frame-c) 96%, transparent);
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root body[data-ui-theme] :is(.bc-sheet, .bc-sheet--glass, .broder-tour-card) {
    --th-overlay-fill: var(--th-frame-c);
    --th-overlay-sheen: none;
    --th-overlay-blur: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (forced-colors: active) {
  :root body[data-ui-theme] :is(
    .robin-panel, .b2-panel, .b2-card, .card, .robin-operation-card, .b3-card, .b2-shortcut, .b2-day-plan, .b2-metric,
    .b2-finance-summary, .b2-lesson-card, .b2-create-panel, .b2-selected-student, .b2-empty, .b2-attention,
    .robin-group-card, .robin-student-card, .robin-lesson-card, .robin-discover-card, .robin-empty-card, .robin-code-card, .robin-auth-card,
    .assistant-data-card, .bc-card, .bc-task, .bc-ap-card, .bc-connect, .bc-team-card,
    .bs-tile, .bs-card, .bs-group-result, .bs-group-card, .bsh-panel, .bsh-rhythm, .bsh-moment, .broder-settings-section
  ) {
    color: CanvasText; background: Canvas; border: 1px solid CanvasText; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

/* Small controls: solid paper chips instead of blurred glass (many of them scroll). */
:root body[data-ui-theme] :is(.bc-chip, .bc-iconbtn--ring, .bc-avatar, .b3-student-level-nav a, .b2-status, .bc-badge, .b2-icon-button, .bc-pill--muted, .b2-today-button, .b2-week-day, .btn-outline-secondary, .btn-secondary, .btn-outline-primary, .robin-check, .robin-count, .bc-bubble, .fw-month, .fw-filter > summary) {
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root body[data-ui-theme].bk-frame :is(.bc-chip, .bc-iconbtn--ring, .b2-icon-button, .bc-pill--muted, .b2-today-button, .b2-week-day, .btn-outline-secondary, .btn-secondary, .btn-outline-primary, .robin-check, .robin-count, .fw-month, .fw-filter > summary) {
  background: var(--th-surface); box-shadow: var(--th-soft-shadow);
}
:root body[data-ui-theme].bk-frame :is(.bc-chip, .b2-icon-button, .btn-outline-secondary, .btn-secondary, .btn-outline-primary):hover { background: color-mix(in srgb, var(--th-tint-c) 55%, var(--th-surface)); }
:root body[data-ui-theme].bk-frame :is(.bc-avatar, .b2-avatar) { background: var(--th-tint-c); box-shadow: none; color: var(--th-ttl); }
:root body[data-ui-theme].bk-frame .bc-bubble { background: var(--th-surface); box-shadow: var(--th-soft-shadow); }
:root body[data-ui-theme].bk-frame :is(.b2-student-row, .b2-group-row):hover { background: color-mix(in srgb, var(--th-tint-c) 55%, transparent); }

/* Fields: solid inlays (no blur), the theme's ring on focus. */
:root body[data-ui-theme] :is(.form-control, .form-select, input[type='text'], input[type='email'], input[type='search'], input[type='tel'], input[type='number'], input[type='date'], input[type='time'], input[type='datetime-local'], input[type='password'], select, textarea, .bc-search-input, .bc-rename-row input, .bs-input) {
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root body[data-ui-theme].bk-frame :is(.form-control, .form-select, input, select, textarea, .bc-search-input):not(.bc-input) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--th-ttl) 7%, transparent); }
:root body[data-ui-theme] :is(.form-control, .form-select, input, select, textarea, .bc-search-input, .bs-input):not(.bc-input):focus {
  background-color: var(--th-surface) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--th-hl) 75%, transparent), 0 0 0 3px color-mix(in srgb, var(--th-hl) 14%, transparent);
}
:root body[data-ui-theme].bk-frame .bc-composer:focus-within { box-shadow: var(--th-glass-shadow), 0 0 0 1px color-mix(in srgb, var(--th-hl) 70%, transparent); }
:root body[data-ui-theme] :is(input[type='checkbox'], input[type='radio']) { accent-color: var(--th-btn); }
:root body[data-ui-theme] :is(a, button, input, select, textarea, summary):focus-visible { outline-color: var(--th-text); }

/* Segmented controls: tint track, white active segment (nova .seg). */
:root body[data-ui-theme] :is(.b2-segmented, .bc-theme, .bs-summary) { background: var(--th-tint-c); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root body[data-ui-theme] .b2-segmented a { color: var(--bc-ink-2, var(--text-secondary)); }
:root body[data-ui-theme] .b2-segmented a.is-selected {
  background: var(--th-surface); color: var(--th-ttl); box-shadow: 0 1px 4px -1px rgb(0 0 0 / 18%);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root body[data-ui-theme] .b2-segmented a.is-selected .broder-icon { color: var(--th-text); }
html[data-bs-theme='dark'] body[data-ui-theme] .b2-segmented a.is-selected { box-shadow: 0 0 0 1px rgb(255 255 255 / 8%); }

/* Primary buttons: accent-strong / accent-strong-ink (nova .go, ViewInicio .ask button). */
:root body[data-ui-theme] :is(.btn-primary, .robin-button.btn-primary, .b2-button:not(.btn-outline-secondary):not(.btn-secondary), .bc-btn--primary, .bc-send, .bc-iconbtn--plus, .broder-send, .assistant-start-button, .assistant-send, .assistant-confirm) {
  background: var(--th-btn) !important; border-color: var(--th-btn) !important; color: var(--th-btn-ink) !important;
  box-shadow: 0 8px 20px -14px color-mix(in srgb, var(--th-btn) 80%, transparent) !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root body[data-ui-theme] :is(.btn-primary, .robin-button.btn-primary, .b2-button:not(.btn-outline-secondary):not(.btn-secondary), .bc-btn--primary, .bc-iconbtn--plus):not(:disabled):hover {
  background: color-mix(in srgb, var(--th-btn) 88%, #fff) !important; border-color: color-mix(in srgb, var(--th-btn) 88%, #fff) !important; color: var(--th-btn-ink) !important;
}
html[data-bs-theme='dark'] body[data-ui-theme] :is(.btn-primary, .robin-button.btn-primary, .b2-button:not(.btn-outline-secondary):not(.btn-secondary), .bc-btn--primary, .bc-iconbtn--plus):not(:disabled):hover {
  background: color-mix(in srgb, var(--th-btn) 86%, #000) !important; border-color: color-mix(in srgb, var(--th-btn) 86%, #000) !important;
}
:root body[data-ui-theme] :is(.btn-primary, .robin-button.btn-primary, .b2-button):is(:focus, :focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-btn) 22%, transparent) !important; }
:root body[data-ui-theme] .bc-send[disabled] { background: var(--th-inset) !important; border-color: transparent !important; color: var(--bc-ink-3) !important; box-shadow: none !important; }
:root body[data-ui-theme] .bc-send.is-stop { background: var(--th-surface) !important; color: var(--bc-ink) !important; box-shadow: var(--th-soft-shadow) !important; }
:root body[data-ui-theme].bs-body .bc-btn--primary:disabled { background: var(--th-inset) !important; border-color: transparent !important; color: var(--bc-ink-3) !important; box-shadow: none !important; }

/* Strong selections: the theme's primary colour. Soft ones: a tint of the highlight + ring. */
:root body[data-ui-theme] :is(.b2-week-day.is-selected, .b3-student-level-nav a.is-selected, .bsd-tab.is-active, .bsd-chip.is-active) {
  background: var(--th-btn); border-color: var(--th-btn); color: var(--th-btn-ink); box-shadow: none;
}
:root body[data-ui-theme] :is(.b2-week-day.is-selected, .b3-student-level-nav a.is-selected) * { color: inherit; }
:root body[data-ui-theme].bk-frame :is(.bs-tile.is-on, .bs-card.is-on) { background: var(--th-selected); color: var(--bc-ink); box-shadow: inset 0 0 0 2px var(--th-hl); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root body[data-ui-theme] :is(.b2-attention-heading > span, .b2-chat-mark, .robin-agent-orbit, .robin-sun-mark, .robin-settings-sun, .robin-auth-mark, .robin-code-mark, .bs-promises .bs-check) { background: var(--th-hl); color: var(--th-hl-ink); }
:root body[data-ui-theme] .b2-attention-icon { background: var(--th-selected); color: var(--th-text); }
:root body[data-ui-theme] .bc-dot { box-shadow: 0 0 0 2px var(--th-page), 0 0 0 3px color-mix(in srgb, var(--th-hl) 40%, transparent); }

/* Status pills keep their meaning, not the theme (nova .pill). */
:root body[data-ui-theme] :is(.b2-status--live, .b2-status--receipt, .b2-status--reported_receipt) { background: #dcf5e7; color: #157347; box-shadow: none; }
:root body[data-ui-theme] :is(.b2-status--charge) { background: #fff1d1; color: #9a5b00; box-shadow: none; }
:root body[data-ui-theme] :is(.b2-status--cancelled) { background: #ffe1db; color: #b42318; box-shadow: none; }
html[data-bs-theme='dark'] body[data-ui-theme] :is(.b2-status--live, .b2-status--receipt, .b2-status--reported_receipt) { background: rgb(79 207 147 / 14%); color: #4fcf93; }
html[data-bs-theme='dark'] body[data-ui-theme] .b2-status--charge { background: rgb(255 190 60 / 14%); color: #ffc15a; }
html[data-bs-theme='dark'] body[data-ui-theme] .b2-status--cancelled { background: rgb(240 120 109 / 14%); color: #f0786d; }
:root body[data-ui-theme] .personal-status-pending { background: #fff1d1; color: #9a5b00; }
html[data-bs-theme='dark'] body[data-ui-theme] .personal-status-pending { background: rgb(255 190 60 / 14%); color: #ffc15a; }

/* Glass: the landing's 1px gradient rim (ShellNova .gl::after) on the floating glass. */
:root body[data-ui-theme] :is(.broder-bottom-nav, .bc-composer, .bc-chat-pill)::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; padding: 1px;
  background: var(--th-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
:root body[data-ui-theme] :is(.bc-composer, .bc-chat-pill) { position: relative; }
:root body[data-ui-theme].bc-body.bk-frame :is(.bc-composer, .bc-chat-pill, .dropdown-menu) {
  background: var(--th-glass-strong); box-shadow: var(--th-glass-shadow);
  -webkit-backdrop-filter: var(--th-glass-blur); backdrop-filter: var(--th-glass-blur);
}
:root body[data-ui-theme] .bc-sheet { --bc-surface: color-mix(in srgb, var(--th-surface) 70%, transparent); }

/* Navigation (structure untouched): theme glass, theme active item. */
:root body[data-ui-theme].bc-body.bk-frame .personal-sidebar {
  background: var(--th-glass-strong); border-right: 1px solid color-mix(in srgb, var(--th-ttl) 7%, transparent);
  box-shadow: inset -1px 0 0 rgb(255 255 255 / 40%);
  -webkit-backdrop-filter: var(--th-glass-blur); backdrop-filter: var(--th-glass-blur);
}
html[data-bs-theme='dark'] body[data-ui-theme].bc-body.bk-frame .personal-sidebar { box-shadow: inset -1px 0 0 rgb(255 255 255 / 5%); }
:root body[data-ui-theme].bc-body.bk-frame :is(.broder-toolbar, .bk-topbar) {
  background: var(--th-glass); box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--th-ttl) 7%, transparent);
  -webkit-backdrop-filter: var(--th-glass-blur); backdrop-filter: var(--th-glass-blur);
}
:root body[data-ui-theme] .broder-bottom-nav.broder-glass-material {
  background: var(--th-glass-strong); border-color: transparent; box-shadow: var(--th-glass-shadow);
  -webkit-backdrop-filter: var(--th-glass-blur); backdrop-filter: var(--th-glass-blur);
}
:root body[data-ui-theme] .personal-nav-link:not(.active):hover { background: color-mix(in srgb, var(--th-tint-c) 70%, transparent); }
:root body[data-ui-theme] :is(.personal-sidebar, .broder-bottom-nav) .personal-nav-link.active,
:root body[data-ui-theme] :is(.personal-sidebar, .broder-bottom-nav) .personal-nav-link.active:hover {
  background: var(--th-selected) !important; color: var(--th-ttl) !important; border-color: transparent;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--th-hl) 24%, transparent), 0 6px 16px -12px color-mix(in srgb, var(--th-hl) 80%, transparent);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root body[data-ui-theme] :is(.personal-sidebar, .broder-bottom-nav) .personal-nav-link.active .broder-icon { color: var(--th-text); }
:root body[data-ui-theme] .broder-bottom-nav .personal-nav-link { position: relative; z-index: 1; }
:root body[data-ui-theme] :is(.broder-account-avatar, .personal-account-avatar, .personal-mobile-profile) { background: var(--th-tint-c); color: var(--th-ttl); }

/* ── 5. The page stage: paper, the theme art at the bottom, a paper veil ──── */
html:has(> body[data-ui-theme]) { background: var(--bc-canvas); }
html:has(> body[data-ui-theme='neutral']) { background: #f4f4f3; }
html:has(> body[data-ui-theme='sol']) { background: #faf6e8; }
html:has(> body[data-ui-theme='ocean']) { background: #f2f5f9; }
html:has(> body[data-ui-theme='sunset']) { background: #f8f1e9; }
html:has(> body[data-ui-theme='teal']) { background: #f3f4ec; }
html:has(> body[data-ui-theme='beach_tennis']) { background: #f3f6f4; }
html:has(> body[data-ui-theme='surf']) { background: #f2f5f9; }
html:has(> body[data-ui-theme='personal']) { background: #f1f1f0; }
html:has(> body[data-ui-theme='nutri']) { background: #f2f6ec; }
html:has(> body[data-ui-theme='manicure']) { background: #fbf0f4; }
html:has(> body[data-ui-theme='yoga']) { background: #f6f3f9; }
html[data-bs-theme='dark']:has(> body[data-ui-theme]) { background: #121213; }
/* One fixed layer (broder_liquid.css's ambient stage): it never repaints on scroll. The art
   behaves like the landing's .p-art (cover of a full-width box 76% of the stage tall, anchored
   bottom): 103.93 = 76 × 1600 / 1170. */
:root body[data-ui-theme]:is(.bk-frame, .brand-simple, .robin-app)::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; z-index: -1; pointer-events: none;
  background-color: var(--th-page);
  background-image: var(--th-veil), var(--th-art);
  background-repeat: no-repeat;
  background-position: 0 0, center bottom;
  background-size: 100% 100%, cover;
  background-size: 100% 100%, max(100%, 103.93vh) auto;
  background-size: 100% 100%, max(100%, 103.93lvh) auto;
}
:root body[data-ui-theme]:is(.brand-simple, .robin-app):not(.bk-frame) { position: relative; isolation: isolate; min-height: 100%; background: transparent; }
:root body[data-ui-theme]:is(.brand-simple, .robin-app):not(.bk-frame) .page { background: transparent; }
/* Dark: the art stays as a faint glow under a deeper veil. */
html[data-bs-theme='dark'] body[data-ui-theme]:is(.bk-frame, .brand-simple, .robin-app)::before { filter: saturate(.7); }

/* Onboarding (/start): the stage around the card, the art behind each question screen. */
:root body[data-ui-theme].bs-body { background: var(--th-stage-c); }
:root body[data-ui-theme] .bs-screen:not(.bs-screen--intro) {
  background-color: var(--th-page);
  background-image: var(--th-veil), var(--th-art);
  background-repeat: no-repeat;
  background-position: 0 0, center bottom;
  background-size: 100% 100%, max(100%, calc(76% * 1600 / 1170)) auto;
}
:root body[data-ui-theme] .bs-foot { background: linear-gradient(transparent, color-mix(in srgb, var(--th-page) 88%, transparent) 30%); }
:root body[data-ui-theme] :is(.bs-tile, .bs-card, .bs-agent, .bs-rhythm-option, .bs-day, .bs-group-result, .bs-promises li, .bs-chip) { background: color-mix(in srgb, var(--th-surface) 82%, transparent); box-shadow: var(--th-soft-shadow); }
:root body[data-ui-theme] :is(.bs-tile.is-on, .bs-card.is-on, .bs-rhythm-option.is-on, .bs-day.is-on, .bs-tile[aria-pressed='true']) { background: var(--th-selected); box-shadow: inset 0 0 0 2px var(--th-hl); }
:root body[data-ui-theme] .bs-agent.is-on { background: var(--th-selected); }
:root body[data-ui-theme] :is(.bs-card.is-on .bs-check, .bs-agent.is-on .bs-check) { background: var(--th-btn); color: var(--th-btn-ink); }
:root body[data-ui-theme] :is(.bs-tile.is-on .broder-icon) { color: var(--th-text); }
:root body[data-ui-theme] .bs-group-card { background: var(--th-selected); box-shadow: inset 0 0 0 2px var(--th-hl); }
:root body[data-ui-theme] .bs-input { background-color: var(--th-inset); }
/* the phone intro sits on a dark photo: its title stays white (the theme's title ink above
   would make it unreadable there) */
@media (max-width: 899.98px) {
  :root body[data-ui-theme] .bs-screen--intro .bs-intro-copy :is(h1, h2) { color: #fff; }
}
@media (min-width: 900px) {
  :root body[data-ui-theme] .bs-screen--intro {
    background-color: var(--th-page);
    background-image: var(--th-veil), var(--th-art);
    background-repeat: no-repeat;
    background-position: 0 0, center bottom;
    background-size: 100% 100%, max(100%, calc(76% * 1600 / 1170)) auto;
  }
  :root body[data-ui-theme] .bs-screen--intro .bs-btn-glass { background: var(--th-tint-c); color: var(--th-ttl); }
}

/* Home hero. sol keeps the footvolley photos (data-hero=photo, the original dark court
   hero); themes with art get a light hero over their art; neutral a clean paper surface. */
:root body[data-ui-theme] .b2-next-lesson:not([data-hero='photo']) {
  color: var(--th-ttl); background: var(--th-surface); box-shadow: var(--th-card-shadow);
}
:root body[data-ui-theme] .b2-next-lesson[data-hero='art'] { background: var(--th-page); }
:root body[data-ui-theme] .b2-next-lesson:not([data-hero='photo'])::after {
  background: linear-gradient(90deg, var(--th-page) 0%, color-mix(in srgb, var(--th-page) 88%, transparent) 40%, color-mix(in srgb, var(--th-page) 20%, transparent) 78%, transparent);
}
:root body[data-ui-theme] .b2-next-lesson[data-hero='plain']::after {
  background: radial-gradient(70% 90% at 100% 100%, color-mix(in srgb, var(--th-tint-c) 70%, transparent), transparent 70%);
}
:root body[data-ui-theme] .b2-next-lesson .b2-hero-art { object-position: center bottom; opacity: var(--th-art-opacity); }
:root body[data-ui-theme].broder-ui2 .b2-next-lesson:not([data-hero='photo']) :is(h2, .b2-hero-greeting, .b2-hero-time) { color: var(--th-ttl); }
:root body[data-ui-theme] .b2-next-lesson:not([data-hero='photo']) .b2-kicker { color: var(--th-text); }
:root body[data-ui-theme] .b2-next-lesson:not([data-hero='photo']) :is(.b2-hero-time span, .b2-hero-meta, .b2-hero-roster, p) { color: var(--bc-ink-2, var(--text-secondary)); }
:root body[data-ui-theme] .b2-next-lesson:not([data-hero='photo']) .b2-hero-court-label { color: var(--th-ttl); opacity: .35; }
/* On the dark photo the primary button stays the sol yellow so it reads. */
:root body[data-ui-theme='sol'] .b2-next-lesson[data-hero='photo'] .btn-primary { background: var(--th-hl) !important; border-color: var(--th-hl) !important; color: var(--th-hl-ink) !important; }
@media (max-width: 991.98px) {
  :root body[data-ui-theme] .b2-next-lesson:not([data-hero='photo'])::after {
    background: linear-gradient(to bottom, var(--th-page) 30%, color-mix(in srgb, var(--th-page) 70%, transparent) 70%, color-mix(in srgb, var(--th-page) 30%, transparent));
  }
  :root body[data-ui-theme] .b2-next-lesson[data-hero='plain']::after { background: none; }
}

/* ── 6. Former hard-coded Broder yellow ───────────────────────────────────── */
:root body[data-ui-theme] { --ag-dot: var(--th-mark-c); }
:root body[data-ui-theme] :is(.ag-kicker, .ag-next-kicker, .ag-moon, .ag-day-dots b) { color: var(--th-text); }
:root body[data-ui-theme] .ag-day-dots i { background: var(--th-mark-c); }
:root body[data-ui-theme] .fw-dot { stroke: var(--th-mark-c); }
:root body[data-ui-theme] :is(.fw-dot.is-current, .fw-filter-dot) { fill: var(--th-hl); background: var(--th-hl); }
:root body[data-ui-theme] .fw-curve-line { stroke: var(--th-mark-c); }
:root body[data-ui-theme] #fw-curve-fill stop { stop-color: var(--th-mark-c); }
:root body[data-ui-theme].bc-body.bk-frame .fw-month.is-current { background: var(--th-selected); box-shadow: inset 0 0 0 2px var(--th-hl), var(--th-soft-shadow); animation-name: fw-rise, th-halo; }
@keyframes th-halo {
  0% { box-shadow: inset 0 0 0 2px var(--th-hl), 0 0 0 0 color-mix(in srgb, var(--th-hl) 55%, transparent); }
  100% { box-shadow: inset 0 0 0 2px var(--th-hl), 0 0 0 14px color-mix(in srgb, var(--th-hl) 0%, transparent); }
}
:root body[data-ui-theme] .st-stat.has-attention:not(.is-selected)::after { background: var(--th-hl); box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-hl) 28%, transparent); }
:root body[data-ui-theme] .st { --st-amber: var(--th-mark-c); }
:root body[data-ui-theme] .personal-calendar-page .fc .fc-day-today { background: color-mix(in srgb, var(--th-hl) 6%, transparent); }
:root body[data-ui-theme] .bsh-arrival { background: var(--th-selected); border-color: var(--broder-state-border); }
:root body[data-ui-theme].brand-app .page-wrapper .footer.personal-footer { border-top-color: color-mix(in srgb, var(--th-hl) 30%, transparent); background: color-mix(in srgb, var(--th-tint-c) 70%, transparent); color: var(--bc-ink-2, var(--text-secondary)); }
:root body[data-ui-theme] .broder-tour-spotlight { box-shadow: 0 0 0 100vmax rgb(10 12 14 / 55%), 0 0 0 2px var(--th-hl); }
:root body[data-ui-theme].brand-simple.border-primary { border-color: var(--th-btn) !important; }

@media (prefers-reduced-motion: reduce) {
  :root body[data-ui-theme].bc-body.bk-frame .fw-month.is-current { animation: none; }
}

/* ── 7. Theme switch (broder_theme.js): the new look opens as a circle from the control
   that chose it (landing ThemeShowcase). Only the root group animates, and only while
   html.th-switching is set, so no other navigation gets a view transition. ───────── */
:root.th-switching::view-transition-group(root) { animation-duration: .95s; }
:root.th-switching::view-transition-old(root) { animation: none; }
:root.th-switching::view-transition-new(root) { animation: th-reveal .95s cubic-bezier(.65, 0, .25, 1) both; }
@keyframes th-reveal {
  from { clip-path: circle(0 at var(--th-vt-x, 50%) var(--th-vt-y, 50%)); }
  to { clip-path: circle(var(--th-vt-r, 150%) at var(--th-vt-x, 50%) var(--th-vt-y, 50%)); }
}
/* Fallback without view transitions: a short crossfade of colours. */
:root.th-fading body, :root.th-fading body *, :root.th-fading body::before {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, fill .35s ease, stroke .35s ease !important;
}
@media (prefers-reduced-motion: reduce) {
  :root.th-switching::view-transition-new(root) { animation: none; }
  :root.th-fading body, :root.th-fading body *, :root.th-fading body::before { transition: none !important; }
}
