/* PeakFour | shared glass surfaces. Single final component skin owned by ui-theme.
   The Universe/Aurora scene is drawn once at body level by ambient-background.css.
   Layout wrappers stay clear; one thin glass surface per semantic panel; inset
   cards keep minimal blur so nested surfaces do not add up to an opaque slab. */

:root[data-pf-theme="dark"] {
  --pf-glass-main: rgba(255,255,255,.066);
  --pf-glass-inset: rgba(255,255,255,.032);
  --pf-glass-practice: rgba(255,255,255,.095);
  --pf-glass-selected: rgba(92,134,233,.19);
  --pf-glass-border: rgba(222,235,255,.145);
  --pf-glass-border-subtle: rgba(219,235,255,.10);
  --pf-glass-shadow: 0 8px 28px rgba(1,7,28,.085), inset 0 1px 0 rgba(255,255,255,.025);
}
:root[data-pf-theme="light"] {
  --pf-glass-main: rgba(255,255,255,.32);
  --pf-glass-inset: rgba(255,255,255,.16);
  --pf-glass-practice: rgba(255,255,255,.42);
  --pf-glass-selected: rgba(125,158,255,.26);
  --pf-glass-border: rgba(109,140,195,.18);
  --pf-glass-border-subtle: rgba(103,135,190,.13);
  --pf-glass-shadow: 0 8px 28px rgba(39,74,151,.06), inset 0 1px 0 rgba(255,255,255,.15);
}

/* Never paint a second background behind card columns or lesson frames. */
:root[data-pf-theme] body[data-controller="pf-shell"] :is(.app-shell,.peak-layout,.peak-main),
:root[data-pf-theme] body[data-controller="pf-shell"] .peak-main > :is(
  #page-discover,#page-lessons,#page-chunking,#page-dictation,#page-vocabulary,
  #page-grammar,#page-profile,#page-shadowing,#page-alphabet,#page-listening,
  #page-pronunciation,#page-numbers,#page-counting,#page-recall,#page-guess,
  #page-cloze,#page-sentence-writing,#page-word-guess,#page-listening-cloze,
  #page-writing,#page-visual-guess,#page-cms
),
:root[data-pf-theme] body[data-controller="pf-shell"] .peak-main :is(
  #page-discover .pf41-dashboard,#page-discover .pf41-grid,
  #page-discover .pf41-main,#page-discover .pf41-side,#page-discover .pf41-upper,
  #page-discover .pf47-master,#page-discover .pf-d-workspace,
  #page-lessons .pf-directory-section,#page-lessons .pf-directory-card-grid,
  #page-lessons .pf-academic-section,
  #page-chunking .pf100-layout,#page-chunking .pf100-grid,#page-chunking .pf100-main,
  #page-chunking .pf100-side,#page-chunking .pf-ls-workspace-grid,
  #page-chunking .pf-ls-practice-column,#page-chunking .pfv2-content,
  #page-chunking #chunk-workspace,#page-chunking .pf-ls-sessionbar,
  #page-chunking .pf-ls-progress-wrap,
  #page-shadowing .pfs-layout,#page-shadowing .pfs-grid,
  #page-dictation .dictation-layout,
  #page-profile .pf85-profile-shell,#page-profile .pf85-profile-core,
  #page-vocabulary .pf-d3-results-section,
  #page-grammar .pf-grammar-layout,
  #page-numbers .numbers-layout,#page-listening .contrast-layout
) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* A primary panel is the ONE glass pane for each module. The long explicit
   class registry intentionally does not include icons, banner images, action
   buttons, quiz correctness surfaces or form widgets. */
:root[data-pf-theme] body[data-controller="pf-shell"] .peak-main :is(
  #page-discover .pf41-panel,#page-discover .pf47-panel,
  #page-discover .pf47-onboarding-panel,#page-discover .pf-d-intro,
  #page-discover .pf-d-path,#page-discover .pf-d-related,
  #page-discover .pf17-skill-card,#page-discover .pf17-sample-card,
  #page-discover .pf17-profile-link,
  #page-discover .pf-i-journey,
  #page-lessons .pf-lesson-directory-head,#page-lessons .pf-directory-card,
  #page-lessons .pf-academic-card,#page-lessons .pf-hub-skills,
  #page-lessons .pf-hub-welcome,#page-lessons .pf-hub-skill,
  #page-chunking .pf100-topics-panel,#page-chunking .pf100-lessons-panel,
  #page-chunking .pf-ls-heading,#page-chunking .pf-ls-context-panel,
  #page-chunking .pf-ch94-chapter,#page-chunking .pf-ls-catalog-summary,
  #page-chunking .pf-chunk-session-content,#page-chunking .pf-chunk-practice-model,
  #page-chunking .pf-chunk-practice-transcript,
  #page-dictation .dictation-catalog,#page-dictation .dictation-scene,
  #page-dictation .dictation-dialogue,#page-dictation .dictation-speaking,
  #page-dictation .dictation-writing,#page-dictation .dictation-audio-card,
  #page-vocabulary .pf-d3-welcome,#page-vocabulary .pf-d3-results-panel,
  #page-vocabulary .pf-d3-info-card,#page-vocabulary .vocab-detail-shell,
  #page-vocabulary .pf-d4-search-panel,
  #page-grammar .pf-grammar-card,#page-grammar .pf-grammar-detail,
  #page-grammar .pf-grammar-concept,#page-grammar .pf-grammar-example,
  #page-grammar .pf-grammar-practice,#page-grammar .pf-grammar-quiz,
  #page-profile .pf-profile-panel,#page-profile .pf-profile-identity,
  #page-profile .pf-profile-settings,#page-profile .pf85-profile-nav,
  #page-profile .pf85-widget,#page-profile .pf85-attendance,
  #page-profile .pf-profile-overview article,#page-profile .pf85-skills-grid article,
  #page-shadowing .pfs-library,#page-shadowing .pfs-player-panel,
  #page-alphabet .pf-alpha-intro,#page-alphabet .pf-alpha-card,
  #page-alphabet .pf-alpha-practice,#page-alphabet .pf-alpha-letter-card,
  #page-listening .contrast-card,#page-listening .contrast-sound-card,
  #page-listening .contrast-lesson-overview,#page-listening .phoneme-study,
  #page-listening .phoneme-heading,#page-listening .listening-config,
  #page-pronunciation .panel:not(.error-panel),#page-pronunciation .steps-panel,
  #page-pronunciation .record-panel,#page-pronunciation .sentence-card,
  #page-numbers .numbers-catalog,#page-numbers .numbers-stage,
  #page-numbers .numbers-exercise,
  #page-counting .counting-panel,#page-counting .counting-card,
  #page-recall .pf106-everyday,#page-recall .pf106-practice,
  #page-guess .pf53-guess-library,#page-guess .pf77-scene-pack,
  #page-cloze .pf36-card,#page-sentence-writing .pf-mode-panel,
  #page-word-guess .pf-mode-panel,#page-listening-cloze .pf-mode-panel,
  #page-writing .pf-standalone-card,#page-visual-guess .pf-mode-card,
  #page-cms .pfc-panel,#page-cms .pfc-card
) {
  background: var(--pf-glass-main) !important;
  background-image: none !important;
  border-color: var(--pf-glass-border) !important;
  box-shadow: var(--pf-glass-shadow) !important;
  -webkit-backdrop-filter: blur(11px) saturate(1.16) !important;
  backdrop-filter: blur(11px) saturate(1.16) !important;
}

/* Inset cards have a white 3% tint and almost no blur: no compound black stacks. */
:root[data-pf-theme] body[data-controller="pf-shell"] .peak-main :is(
  #page-discover .pf41-action,#page-discover .pf41-skill,
  #page-discover .pf41-day:not(.is-active),#page-discover .pf47-stat,
  #page-discover .pf47-task,#page-discover .pf47-resume,
  #page-discover .pf-d-topic,#page-discover .pf-i-topic-card,
  #page-lessons .pf-directory-search,#page-lessons .pf-academic-card-footer,
  #page-lessons .pf-directory-meta,
  #page-chunking .pf100-topic-card:not(.is-selected),
  #page-chunking .pf100-lesson-card,#page-chunking .pf100-topic-search,
  #page-chunking .pfv2-card,#page-chunking .pfv2-option-preview,
  #page-chunking .pfv2-chat,#page-chunking .pfv2-choice:not(.is-correct):not(.is-wrong),
  #page-chunking .pf-ls-context-section,#page-chunking .pf-chunk-mainphrase,
  #page-chunking .pf-chunk-slot,#page-chunking .pf-chunk-status,
  #page-dictation .dictation-lesson-card,#page-dictation .dictation-dialogue-card,
  #page-dictation .dictation-history-item,
  #page-vocabulary .pf-d4-result-card,#page-vocabulary .pf-d4-definition-card,
  #page-vocabulary .pf-d4-dictionary-card,#page-vocabulary .vocab-context-card,
  #page-grammar .pf-grammar-subtopic,
  #page-profile .pf-test-stage,#page-profile .pf-test-passage,
  #page-shadowing .pfs-clip-card,#page-shadowing .pfs-lesson-card,
  #page-shadowing .pfs-cue,#page-shadowing .pfs-hidden-hint,
  #page-listening .phoneme-study-detail,#page-listening .phoneme-study-example,
  #page-listening .phoneme-study-card,
  #page-numbers .numbers-hint,
  #page-recall .pf106-topic-card,#page-recall .pf106-prompt,
  #page-guess .pf53-guess-tile,#page-guess .pf77-scene-tile,
  #page-cloze .pf38-lesson-card,#page-cloze .pf38-topic-card
) {
  background: var(--pf-glass-inset) !important;
  background-image: none !important;
  border-color: var(--pf-glass-border-subtle) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* The lower action bar beneath Chunking practice was a second opaque slab. */
:root[data-pf-theme] body[data-controller="pf-shell"] #page-chunking :is(
  .pf-chunk-session-actions,.pf-chunk-sessionbar,
  .pf-ls-practice-column .pf-chunk-session-actions,
  .pf-ls-practice-column .pf-chunk-session-content > .pfv2-content
) {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
/* Non-semantic frames that only provide visual spacing must not mask the scene. */
:root[data-pf-theme] body[data-controller="pf-shell"] #page-shadowing :is(
  .pfs-library-shell,.pfs-video-grid,.pfs-list-grid,.pfs-catalog-layout
) {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Selected item: translucent blue, retains clear focus and active status. */
:root[data-pf-theme] body[data-controller="pf-shell"] #page-chunking .pf100-topic-card.is-selected {
  background: var(--pf-glass-selected) !important;
  border-color: #85b1ff !important;
  box-shadow: inset 3px 0 0 #85b1ff !important;
  -webkit-backdrop-filter: blur(1.5px) !important;
  backdrop-filter: blur(1.5px) !important;
}

/* Critical learning text and correct/incorrect answers MUST remain distinguishable.
   Accent blocks, thumbnails, hero art and primary CTAs are intentionally unstyled. */
:root[data-pf-theme] body[data-pf-area="practice"] #page-chunking .pf-chunk-session-content,
:root[data-pf-theme] body[data-pf-area="practice"] #page-dictation :is(.dictation-writing,.dictation-speaking),
:root[data-pf-theme] body[data-pf-area="practice"] #page-pronunciation :is(.sentence-card,.record-panel) {
  background: var(--pf-glass-practice) !important;
}

/* Low-transparency OS mode: maintain legibility rather than forcing translucency. */
@media (prefers-reduced-transparency:reduce) {
  :root[data-pf-theme="dark"] {
    --pf-glass-main:rgba(13,22,50,.82);
    --pf-glass-inset:rgba(13,22,50,.76);
    --pf-glass-practice:rgba(13,22,50,.90);
  }
  :root[data-pf-theme="light"] {
    --pf-glass-main:rgba(255,255,255,.91);
    --pf-glass-inset:rgba(255,255,255,.84);
    --pf-glass-practice:rgba(255,255,255,.95);
  }
}
@media print {
  :root[data-pf-theme] body[data-controller="pf-shell"] .peak-main :is(
    .pf41-panel,.pf100-topics-panel,.pf100-lessons-panel,.pf-directory-card,
    .pfs-library,.pfs-clip-card,.pfv2-card,.pf-profile-panel
  ) {
    background:#fff !important;
    color:#111 !important;
    -webkit-backdrop-filter:none !important;
    backdrop-filter:none !important;
  }
}


/* 2026-11-12: stronger dark-mode glass parity between left and right content columns. */
:root[data-pf-theme="dark"] body[data-controller="pf-shell"] .peak-main :is(
  #page-chunking .pf100-topics-panel,#page-chunking .pf100-lessons-panel,
  #page-chunking .pf100-lesson-card,#page-chunking .pf100-topic-search,
  #page-chunking .pf-ls-practice-column,#page-chunking .pf-ls-context-panel,
  #page-chunking .pf-ls-practice-column .pf-chunk-session-content,
  #page-discover .pf17-skill-card,#page-discover .pf17-sample-card,
  #page-discover .pf-d-path,#page-discover .pf-d-related,#page-discover .pf-d-topic,
  #page-lessons .pf-directory-card,#page-lessons .pf-hub-skill
){
  background:rgba(255,255,255,.066) !important;
  border-color:rgba(222,235,255,.145) !important;
  box-shadow:0 8px 28px rgba(1,7,28,.085), inset 0 1px 0 rgba(255,255,255,.025) !important;
  -webkit-backdrop-filter:blur(11px) saturate(1.16) !important;
  backdrop-filter:blur(11px) saturate(1.16) !important;
}
:root[data-pf-theme="dark"] body[data-controller="pf-shell"] .peak-main :is(
  #page-chunking .pf100-topic-card:not(.is-selected),#page-chunking .pf-ls-context-section,
  #page-chunking .pfv2-choice:not(.is-correct):not(.is-wrong),
  #page-discover .pf17-profile-link,#page-discover .pf-d-topic-marker
){
  background:rgba(255,255,255,.032) !important;
  border-color:rgba(219,235,255,.10) !important;
}
/* Light mode: the active Chunking learning canvas should be a clean white stage. */
:root[data-pf-theme="light"] body[data-controller="pf-shell"] .peak-main :is(
  #page-chunking .pf-ls-practice-column,#page-chunking .pf-ls-practice-column .pf-chunk-session-content,
  #page-chunking .pf-ls-context-panel,#page-chunking .pf-ls-context-section
){
  background:#fff !important;
  border-color:#dfe7f1 !important;
  box-shadow:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}


/* Dark card hierarchy: section is glass, nested lesson cards are almost clear. */
:root[data-pf-theme="dark"] body[data-controller="pf-shell"] .peak-main #page-chunking.pf100-chunking #chunk-lessons .pf100-lesson-card {
  background:var(--pf-glass-inset) !important;
  background-image:none !important;
  border-color:var(--pf-glass-border-subtle) !important;
  box-shadow:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}

/* Skill Library uses a card wrapper (not the inner navigation link) as its single pane.
   Its earlier dark background contained 90% opaque navy and a second dark footer. */
:root[data-pf-theme="dark"] body[data-controller="pf-shell"] .peak-main #page-lessons :is(.pf-directory-group,.pf-directory-section,.pf-directory-section-head) {
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
}
:root[data-pf-theme="dark"] body[data-controller="pf-shell"] .peak-main #page-lessons .pf-academic-card-wrap {
  background:var(--pf-glass-main) !important;
  background-color:var(--pf-glass-main) !important;
  background-image:none !important;
  border-color:var(--pf-glass-border) !important;
  box-shadow:var(--pf-glass-shadow) !important;
  -webkit-backdrop-filter:blur(10px) saturate(1.13) !important;
  backdrop-filter:blur(10px) saturate(1.13) !important;
}
:root[data-pf-theme="dark"] body[data-controller="pf-shell"] .peak-main #page-lessons .pf-academic-card-wrap :is(.pf-directory-card,.pf-academic-card-footer,.pf-directory-foot) {
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}

/* Make the practice panel one uninterrupted WHITE surface in Light Mode.
   The content and action footer stay unpainted so they inherit the single pane. */
:root[data-pf-theme="light"] body[data-controller="pf-shell"] .peak-main #page-chunking.pf100-chunking #chunk-workspace .pf-ls-practice-column {
  background:#fff !important;
  background-image:none !important;
  border-color:#dfe7f1 !important;
  box-shadow:0 8px 28px rgba(39,74,151,.05) !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}
:root[data-pf-theme="light"] body[data-controller="pf-shell"] .peak-main #page-chunking.pf100-chunking #chunk-workspace .pf-ls-practice-column :is(#chunk-session-content,.pf-chunk-session-actions) {
  background:transparent !important;
  background-image:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}
/* Preserve correctness colors in light multiple-choice after the white-card rule. */
:root[data-pf-theme="light"] body[data-controller="pf-shell"] #page-chunking.pf100-chunking .pfv2-content .pfv2-choice.is-correct {
  background:#dcfce7 !important;border:2px solid #22a06b !important;color:#166534 !important;
}
:root[data-pf-theme="light"] body[data-controller="pf-shell"] #page-chunking.pf100-chunking .pfv2-content .pfv2-choice.is-wrong {
  background:#ffe4e6 !important;border:2px solid #e25a68 !important;color:#9f1239 !important;
}


/* Highlight the translated target itself; do not introduce another opaque box. */
:root[data-pf-theme="dark"] body[data-controller="pf-shell"] .peak-main #page-chunking.pf100-chunking #chunk-session-content.pfv2-content .pfv2-translation.pfv2-target-vi {
  color:#84e1d6 !important;
  font-weight:790 !important;
  background:transparent !important;
  border:0 !important;
}
:root[data-pf-theme="light"] body[data-controller="pf-shell"] .peak-main #page-chunking.pf100-chunking #chunk-session-content.pfv2-content .pfv2-translation.pfv2-target-vi {
  color:#0a7d98 !important;
  font-weight:790 !important;
  background:transparent !important;
  border:0 !important;
}
/* True white MCQ cards with a light visible edge in Light Mode; feedback states remain untouched. */
:root[data-pf-theme="light"] body[data-controller="pf-shell"] .peak-main #page-chunking.pf100-chunking #chunk-session-content.pfv2-content .pfv2-choice:not(.is-correct):not(.is-wrong) {
  background:#fff !important;
  border:1px solid #c9d9ec !important;
  color:#173451 !important;
}
