/* Universe canvas parity: extends the existing ambient-background and surface-translucency
   systems only. Preserve status, answer feedback, modal surfaces and media. */
:root[data-pf-theme="dark"] {
  --pf-universe-surface:rgba(30,40,78,.27);
  --pf-universe-inner:rgba(40,52,92,.20);
  --pf-universe-line:rgba(174,210,255,.15);
}
:root[data-pf-theme="light"] {
  --pf-universe-surface:rgba(255,255,255,.35);
  --pf-universe-inner:rgba(255,255,255,.23);
  --pf-universe-line:rgba(104,143,205,.20);
}
/* Section and structural frames must never act as an opaque second full-width canvas. */
:root[data-pf-theme] body[data-controller="pf-shell"] .peak-main :is(
  #page-discover .pf47-page,#page-discover .pf47-dashboard,#page-discover .pf41-dashboard,
  #page-discover .pf-d-home,#page-discover .pf-d-content,#page-discover .pf-d-dashboard,
  #page-lessons .pf69-layout,#page-lessons .pf69-content,#page-lessons .pf-lesson-grid,
  #page-chunking .pf100-catalog,#page-chunking .pf-ls-catalog,#page-chunking .pf-ls-workspace,
  #page-chunking .pf100-layout,#page-chunking .pf-ls-practice-column,
  #page-dictation .pf20-workspace,#page-dictation .pf24-catalog-layout,
  #page-dictation .dictation-workspace,#page-dictation .dictation-main,#page-dictation .dictation-study,
  #page-grammar .pf-grammar-page,#page-grammar .pf-grammar-layout,
  #page-vocabulary .pf-d3-workspace,#page-vocabulary .pf-d4-workspace,#page-vocabulary .pf-d3-results-section,
  #page-shadowing .pfs-content,#page-shadowing .pfs-layout,#page-shadowing .pfs-catalog-layout,
  #page-profile .pf85-profile-shell,#page-profile .pf-profile-dashboard,
  #page-numbers .numbers-layout,#page-alphabet .pf-alpha-grid,
  #page-listening .contrast-layout,#page-pronunciation .pf-pronunciation-layout
) {
  background-color:transparent!important;background-image:none!important;
  box-shadow:none!important;
}
/* Large visual boxes that were solid dark navy now inherit a luminous reverse-universe glass.
   These are semantic surfaces, not interactive choices or correctness results. */
:root[data-pf-theme] body[data-controller="pf-shell"] .peak-main :is(
  #page-discover .pf41-feature,#page-discover .pf47-summary,#page-discover .pf-d-card,
  #page-discover .pf47-resume,#page-discover .pf-i-journey,
  #page-lessons .pf69-hero,#page-lessons .pf-directory-section,
  #page-chunking .pf100-topics-panel,#page-chunking .pf100-lessons-panel,
  #page-chunking .pf-ls-heading,#page-chunking .pf-ls-context-panel,
  #page-chunking .pf-chunk-session-content,
  #page-dictation .pf24-topic-chooser,#page-dictation .pf24-lesson-list,
  #page-dictation .pf20-workspace-panel,#page-dictation .pf28-script-player,
  #page-dictation .pf28-script-list,#page-dictation .pf28-current-line,
  #page-vocabulary .vocab-list-shell,#page-vocabulary .vocab-detail-shell,
  #page-grammar .pf-grammar-detail,#page-grammar .pf-grammar-card,
  #page-shadowing .pfs-library,#page-shadowing .pfs-player-panel,
  #page-profile .pf85-widget,#page-profile .pf85-attendance,
  #page-listening .ipa-inventory-group,#page-listening .phoneme-learning-card,
  #page-numbers .numbers-catalog,#page-numbers .numbers-stage
) {
  background:var(--pf-universe-surface)!important;
  border-color:var(--pf-universe-line)!important;
  box-shadow:0 6px 20px rgba(2,10,29,.07)!important;
  backdrop-filter:blur(7px) saturate(1.1)!important;
  -webkit-backdrop-filter:blur(7px) saturate(1.1)!important;
}
/* Named wide hero/secondary panels found in the existing style sheets were
   painted solid navy; use a luminous gradient that still reveals the same canvas. */
:root[data-pf-theme] body[data-controller="pf-shell"] .peak-main :is(
  #page-discover .pf17-hero,#page-discover .pf-d-featured,
  #page-discover .pf-d-featured-visual,#page-discover .pf17-skill-card,
  #page-lessons .pf-academic-card-wrap,#page-lessons .pf-hub-welcome,
  #page-profile .pf-profile-identity,#page-profile .pf-profile-panel,
  #page-profile .pf-v63-insight-grid > div,#page-profile .pf-test-stage,
  #page-shadowing .pf56-transcript-panel,#page-shadowing .pf56-dictation-panel,
  #page-shadowing .pfs-video-shell,
  #page-dictation .pf36-card,#page-dictation .pf36-visual,
  #page-recall .pf43-bank,#page-listening-cloze .pf36-card,
  #page-guess .pf53-guess-library
) {
  background:var(--pf-universe-surface)!important;
  border-color:var(--pf-universe-line)!important;
  box-shadow:0 6px 22px rgba(2,10,29,.08)!important;
}
/* Keep video surfaces dark enough during playback to maintain subtitle contrast. */
:root[data-pf-theme] body[data-controller="pf-shell"] #page-shadowing .pfs-video-shell:has(video) {
  background:rgba(6,12,27,.62)!important;
}
/* Nested information cards get more transparency to prevent dark-on-dark stacking. */
:root[data-pf-theme] body[data-controller="pf-shell"] .peak-main :is(
  #page-chunking .pf100-lesson-card,#page-chunking .pfv2-card,
  #page-dictation .dictation-lesson-card,#page-dictation .dictation-history-item,
  #page-discover .pf47-task,#page-discover .pf-d-topic,
  #page-lessons .pf-directory-card,#page-shadowing .pfs-clip-card,
  #page-vocabulary .pf-d4-result-card,#page-profile .pf85-skills-grid article
) {
  background:var(--pf-universe-inner)!important;
  border-color:var(--pf-universe-line)!important;
}
/* Do not turn disabled/error, correctness, or open modal/utility dialogs translucent. */
@media(prefers-reduced-transparency:reduce){
  :root[data-pf-theme="dark"]{--pf-universe-surface:rgba(25,35,72,.91);--pf-universe-inner:rgba(27,39,77,.86);}
  :root[data-pf-theme="light"]{--pf-universe-surface:rgba(255,255,255,.92);--pf-universe-inner:rgba(255,255,255,.86);}
}
