/* Barangay Certificate dashboard theme, adapted for the working GHL4B portal. */
:root {
  color-scheme: dark;
  --ink: #fbf5fd;
  --ink-soft: #dccce4;
  --muted: #bba8c7;
  --line: #4b3357;
  --canvas: #160d1f;
  --surface: #281732;
  --surface-lilac: #382342;
  --purple: #ad54d2;
  --purple-dark: #db9af1;
  --purple-deep: #1e1129;
  --purple-soft: #3a2148;
  --lilac: #e5a4f2;
  --gold: #ffc86a;
  --gold-light: #fbe7b8;
  --green: #64be92;
  --green-soft: #254534;
  --shadow: 0 20px 50px #0b061480;
}

body { background: var(--canvas); color: var(--ink); }
.app-shell { padding: 16px; }
.sidebar {
  inset: 16px auto 16px 16px;
  width: 240px;
  padding: 30px 16px 20px;
  border: 0;
  border-radius: 24px;
  background: #24142e;
}
.brand { margin: 0 5px 36px; align-items: center; gap: 10px; }
.brand-eagle { display: grid; width: 62px; height: 62px; flex: 0 0 62px; place-items: center; overflow: hidden; border: 1px solid #a64fd1; border-radius: 17px; background: radial-gradient(circle at 50% 20%, #f6d9ff, #ce76e9 65%, #9330bc); }
.brand-eagle img { display: block; width: 58px; height: 58px; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: .05em; line-height: .93; }
.brand-name span { font-family: var(--font-body); font-size: 11px; letter-spacing: .27em; }
.brand-caption { margin-top: 10px; color: #c4b3d1; font-size: 11px; }
.nav-label { color: #ab94ba; }
.nav-link { color: #d6c4e0; border-radius: 12px; }
.nav-link:hover, .nav-link[aria-current="page"] { background: #3a2348; color: #fff; }
.nav-link[aria-current="page"] svg { color: #df9bed; }
.cohort-note { border: 1px solid #52355f; border-radius: 16px; background: #321d3e; }
.cohort-note strong { color: #fff; }
.cohort-note span { color: #c6b4d0; }
.workspace { min-height: calc(100dvh - 32px); margin-left: 256px; overflow: hidden; border-radius: 24px; background: #21122d; }
.topbar { min-height: 70px; border-bottom-color: #493354; background: #21122dee; }
.breadcrumbs, .breadcrumbs strong { color: #dfcde8; }
.theme-switch { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; border: 1px solid #694a76; border-radius: 11px; background: #321e3e; }
.theme-switch button { min-width: 53px; min-height: 32px; padding: 4px 9px; border: 0; border-radius: 8px; background: transparent; color: #d9c4e3; font-size: 11px; font-weight: 900; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: #b766d1; color: #21122d; }
.search-input, .icon-button { border-color: #624570; border-radius: 10px; background: #321e3e; color: #fff; }
.search-input::placeholder { color: #c0aaca; }
.profile-caption { color: #cbb7d5; }
.profile-chip .avatar { color: #32163e; }
main { width: min(100%, 1640px); padding: 32px; }
.page-intro { margin-bottom: 24px; }
.eyebrow { color: #db9af1; }
h1 { font-size: clamp(29px, 2.8vw, 38px); }
.intro-copy { color: #cbb9d5; }
.sample-flag { border-color: #6e4d78; border-radius: 10px; background: #3a2545; color: #f4d1a1; }
.section-heading h2 { font-size: 22px; }
.section-heading p, .section-heading a { color: #cbb4d6; }

#studentDashboard { display: grid; grid-template-columns: minmax(0, 1fr) 292px; align-items: start; gap: 20px 22px; }
#studentDashboard > .course-hero { grid-column: 1; grid-row: 1; }
#studentDashboard > .pace-overview { grid-column: 1; grid-row: 2; }
#studentDashboard > .egg-reminder { grid-column: 1; grid-row: 3; margin: 0; }
#studentDashboard > .demo-panel { grid-column: 1; grid-row: 4; margin: 0; }
#studentDashboard > .learning-grid { display: contents; }
#studentDashboard .content-column { grid-column: 1; grid-row: 5; }
#studentDashboard .side-column { grid-column: 2; grid-row: 1 / span 5; display: grid; align-content: start; gap: 18px; }
#studentDashboard > .profile-rank-panel { grid-column: 1 / -1; grid-row: 6; }
#studentDashboard .side-column .checkin-panel { order: -1; }

.course-hero {
  min-height: 390px;
  grid-template-columns: minmax(210px, .43fr) minmax(0, .57fr);
  border: 0;
  border-radius: 26px;
  background: linear-gradient(130deg, #edcef6, #f2e4f7 55%, #e8d3f0);
  color: #271333;
}
.course-copy { grid-column: 2; grid-row: 1; padding: 34px 36px 34px 10px; }
.hero-art { grid-column: 1; grid-row: 1; min-height: 390px; }
.mascot { width: min(300px, 88%); }
.egg-state-image { width: min(280px, 88%); }
.course-meta { margin-bottom: 18px; }
.meta-tag { border-color: #d4aadf; border-radius: 7px; background: #fff8; color: #4e255e; }
.course-kicker { color: #733d8a; }
.course-title { font-size: clamp(25px, 2vw, 34px); }
.course-description { color: #5f4568; font-size: 13px; }
.progress-labels span:last-child, .egg-health-copy span:last-child { color: #652677; }
.progress-track, .egg-health-track { background: #ddc4e4; }
.progress-fill, .egg-health-fill { background: #8b2eae; }
.course-hero .activity-sub { color: #67476f; }
.course-cta { border-radius: 10px; background: #8a30ab; color: white; }
.course-cta:hover { background: #6e208d; }
.btn-primary { color: #fff; }
.journey-markers span { background: #d9b8e3; }
.journey-markers span.is-current { background: #8b2eae; }
.mascot-caption { color: #63416e; }

.pace-overview .section-heading { align-items: baseline; margin: 6px 0 12px; }
.pace-overview .section-heading span { color: #cbb4d6; font-size: 12px; }
.activity-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border: 0; background: transparent; }
.activity-item { min-height: 138px; padding: 18px; border: 1px solid #4b3357 !important; border-radius: 20px; background: #32203d; }
.activity-label { color: #d9c4e3; font-size: 11px; }
.activity-label svg { width: 26px; height: 26px; margin-right: 7px; color: #d988ed; }
.activity-value { margin-top: 12px; font-size: 29px; }
.activity-sub { color: #c3b0ce; }
.activity-item .activity-sub { font-size: 11px; }

.profile-rank-panel { padding: 22px 18px; border: 0; border-radius: 22px; background: #281832; }
.profile-rank-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-eagle { width: 76px; height: 76px; object-fit: contain; border: 2px solid #e7a4f2; border-radius: 20px; background: #f5e6f8; box-shadow: 0 0 22px #d65fe870; }
.profile-rank-header h2 { margin: 4px 0; font-size: 25px; }
.profile-rank-header p { font-size: 12px; }
.profile-rank-content { display: grid; grid-template-columns: minmax(190px, .32fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.profile-rank-summary { display: flex; flex-direction: column; justify-content: center; padding: 22px; border-radius: 16px; background: #3b2546; }
.profile-rank-summary small { color: #d6bfdf; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.profile-rank-summary strong { display: block; margin: 7px 0; color: #fff; font: 600 40px/1.1 var(--font-display); }
.profile-rank-summary p { margin: 0; color: #c6b2d0; font-size: 12px; }
.profile-ranks { gap: 7px; }
.profile-rank { padding: 10px; border-radius: 12px; background: #3b2546; text-align: center; }
.profile-rank small { color: #d6bfdf; }
.profile-rank strong { font-size: 17px; }
.profile-rank-note { color: #ad98ba; }
.street-preview { padding: 16px; border: 1px solid #4e345c; border-radius: 16px; }
.street-preview-head strong, .street-preview-head small { display: block; }
.street-preview-head strong { font-size: 14px; }
.street-preview-head small { margin-top: 3px; color: #c6b2d0; font-size: 11px; }
.street-preview ol { display: grid; gap: 7px; margin: 13px 0 0; padding: 0; list-style: none; }
.street-preview li { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(40px, 120px) 42px; align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px; border-radius: 11px; background: #35213f; font-size: 12px; }
.street-preview li.is-you { background: #4a2d55; }
.street-preview-rank { color: #d5bde0; font-weight: 900; }
.street-preview-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.street-preview-bar { height: 5px; overflow: hidden; border-radius: 99px; background: #5e436a; }
.street-preview-bar span { display: block; height: 100%; border-radius: inherit; background: #a33cc1; }
.street-preview li strong { text-align: right; }

.checkin-panel, .lesson-focus, .module-row, .course-completion, .manager-stat, .tracker-section { border-color: #4b3357; border-radius: 16px; background: #2f1b3a; }
.module-row:hover { border-color: #9d67af; background: #3a2445; }
.module-number, .practice-step b { background: #4c2c5a; color: #f1b3fa; }
.student-lessons summary, .text-button { color: #e4a2f2; }
.student-lesson-track, .tracker-progress { background: #553861; }
.lesson-focus .practice-step { border-color: #543b5e; background: #382443; }
.lesson-focus .activity-sub { color: #c4b1cf; }
.community-panel { border: 1px solid #4b3357; border-radius: 18px; background: #2c1a36; color: #fff; }
.community-panel .street-status.open { background: #624078; color: white; }
.demo-panel { border: 1px solid #664577; border-radius: 16px; background: #40244c; color: #fff; }
.demo-panel .btn { color: #2b1437; }
.demo-panel-note { color: #dbc8e2; }
.egg-reminder { border-radius: 12px; }
.btn-secondary { border-color: #795486; background: #452a50; color: #fff; }
.btn-secondary:hover { background: #573364; }
.section-heading a { color: #e5a3f4; }
.empty-search { border-color: #795486; color: #d2bcdb; }
.tracker-table th { color: #cbb7d5; }
.tracker-table td small, .tracker-hint, .tracker-disclaimer, .manager-stat span, .manager-stat small { color: #c0aacc; }
.portal-admin { border-color: #60436b !important; background: #2c1a36 !important; }
.portal-admin h2, .portal-admin label { color: #fff !important; }
.portal-admin p { color: #cbb7d5 !important; }
.portal-admin input, .portal-admin select { background: #fff !important; color: #24142e !important; }
.portal-access-row { border-color: #50335d !important; }
.portal-access-row small { color: #cbb7d5 !important; }
.portal-view-switcher span { color: #d8c1e3 !important; }
.portal-view-switcher button { border-color: #80598e !important; background: #3d254a !important; color: #fff !important; }
.portal-view-switcher button[aria-pressed="true"] { background: #a845c8 !important; }
.portal-account button { background: #4c2c5a !important; color: #fff !important; }
.portal-gate { color: #24142e; }
.portal-card input, .portal-card select { color: #24142e !important; }
.portal-live .pace-overview, .portal-live .community-panel, .portal-live .course-completion { display: none; }
.portal-live #studentDashboard { grid-template-columns: minmax(0, 1fr); }
.portal-live #studentDashboard .side-column { display: none; }
.portal-live:not(.portal-demo):not(.admin-student-preview) #studentDashboard > .demo-panel { display: none; }
.portal-live #studentDashboard > .egg-reminder { grid-row: 2; }
.portal-live #studentDashboard .content-column { grid-row: 3; }
.admin-home-switcher { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: -2px 0 22px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.admin-home-switcher strong, .admin-home-switcher span { display: block; }
.admin-home-switcher strong { font: 600 18px/1.2 var(--font-display); }
.admin-home-switcher span { margin-top: 4px; color: var(--ink-soft); font-size: 12px; }
.admin-home-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-home-actions button { min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-lilac); color: var(--ink); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.admin-home-actions button[aria-pressed="true"] { border-color: var(--purple); background: var(--purple); color: white; }
.portal-live.admin-student-preview .pace-overview, .portal-live.admin-student-preview .community-panel, .portal-live.admin-student-preview .course-completion { display: block; }
.portal-live.admin-student-preview #studentDashboard { grid-template-columns: minmax(0, 1fr) 300px; }
.portal-live.admin-student-preview #studentDashboard .side-column { display: grid; }
.portal-live.admin-student-preview #studentDashboard > .egg-reminder, .portal-live.admin-student-preview #studentDashboard .content-column { grid-row: auto; }
.portal-live.admin-student-preview #studentDashboard .student-lesson-toggle { cursor: not-allowed; }
.konsi-eagle-preview { display: flex; align-items: center; gap: 20px; min-height: 150px; padding: 14px 22px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(115deg, var(--surface-lilac), var(--surface)); }
.konsi-eagle-preview img { width: 112px; height: 112px; object-fit: contain; }
.konsi-eagle-preview strong { font: 600 21px/1.2 var(--font-display); }
.konsi-eagle-preview p { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; }

@media (max-width: 1280px) {
  .portal-live.admin-student-preview #studentDashboard { grid-template-columns: minmax(0, 1fr); }
  #studentDashboard { grid-template-columns: minmax(0, 1fr); }
  #studentDashboard > .course-hero, #studentDashboard > .pace-overview, #studentDashboard > .egg-reminder, #studentDashboard > .demo-panel, #studentDashboard .content-column, #studentDashboard .side-column { grid-column: 1; grid-row: auto; }
  #studentDashboard > .learning-grid { display: contents; }
  #studentDashboard .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #studentDashboard > .profile-rank-panel { grid-column: 1; grid-row: auto; }
}
@media (max-width: 820px) {
  .app-shell { padding: 0; }
  .workspace { min-height: 100dvh; margin: 0; border-radius: 0; }
  .topbar { background: #21122d; }
  #studentDashboard .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-hero { grid-template-columns: minmax(190px, .4fr) minmax(0, .6fr); }
}
@media (max-width: 600px) {
  body { background: var(--canvas); }
  main { padding: 22px 16px calc(92px + env(safe-area-inset-bottom)); }
  .course-hero { display: grid; min-height: 0; grid-template-columns: 1fr; }
  .hero-art { grid-column: 1; grid-row: 1; min-height: 215px; }
  .course-copy { grid-column: 1; grid-row: 2; padding: 0 20px 22px; }
  .course-hero .mascot { width: 185px; }
  .course-hero .egg-state-image { width: 200px; }
  .pace-overview .section-heading { display: block; }
  .pace-overview .section-heading span { display: block; margin-top: 3px; }
  .activity-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .activity-item { min-height: 110px; padding: 12px 9px; border-radius: 13px; }
  .activity-label { font-size: 9px; }
  .activity-label svg { display: none; }
  .activity-value { font-size: 20px; }
  .activity-item .activity-sub { font-size: 9px; }
  #studentDashboard .side-column { grid-template-columns: 1fr; }
  .profile-rank-panel { grid-row: auto; }
  .profile-rank-content { grid-template-columns: 1fr; }
  .mobile-nav { border-top-color: #4b3357; background: #24142e; }
  .mobile-nav a { color: #cfb9d9; }
  .mobile-nav a[aria-current="page"] { background: #442950; color: #fff; }
  .theme-switch button { min-width: 43px; min-height: 31px; padding: 3px 6px; font-size: 10px; }
  .topbar .icon-button { display: none; }
}

/* Light is the default; the same layout can switch back to the dark reference. */
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #2e2037;
  --ink-soft: #604f69;
  --muted: #76647f;
  --line: #e5d7ea;
  --canvas: #f6eff9;
  --surface: #fff;
  --surface-lilac: #f4e8f8;
  --purple: #8333a6;
  --purple-dark: #662982;
  --purple-deep: #32203d;
  --purple-soft: #f3e6f8;
  --lilac: #e5b5ef;
  --green: #368061;
  --green-soft: #e5f3e9;
  --shadow: 0 16px 40px #3a204014;
}
:root[data-theme="light"] .sidebar { background: #fff; box-shadow: 0 10px 32px #4e315114; }
:root[data-theme="light"] .brand-caption, :root[data-theme="light"] .nav-label { color: #72617b; }
:root[data-theme="light"] .nav-link { color: #5d4a66; }
:root[data-theme="light"] .nav-link:hover, :root[data-theme="light"] .nav-link[aria-current="page"] { background: #f2e4f7; color: #572470; }
:root[data-theme="light"] .nav-link[aria-current="page"] svg { color: #8a3fa8; }
:root[data-theme="light"] .cohort-note { border-color: #ead9f0; background: #f6e9fa; }
:root[data-theme="light"] .cohort-note strong { color: #31203a; }
:root[data-theme="light"] .cohort-note span { color: #76647f; }
:root[data-theme="light"] .workspace { background: #fdfafe; box-shadow: 0 10px 38px #4e315112; }
:root[data-theme="light"] .topbar { border-bottom-color: #e9dced; background: #fdfafeed; }
:root[data-theme="light"] .breadcrumbs, :root[data-theme="light"] .breadcrumbs strong { color: #594863; }
:root[data-theme="light"] .theme-switch { border-color: #dfcce6; background: #f3e8f6; }
:root[data-theme="light"] .theme-switch button { color: #644d70; }
:root[data-theme="light"] .theme-switch button[aria-pressed="true"] { background: #fff; color: #62287d; box-shadow: 0 1px 5px #45274c21; }
:root[data-theme="light"] .search-input, :root[data-theme="light"] .icon-button { border-color: #dfd0e5; background: #fff; color: #34203c; }
:root[data-theme="light"] .search-input::placeholder, :root[data-theme="light"] .profile-caption { color: #76647f; }
:root[data-theme="light"] .eyebrow { color: #7a388f; }
:root[data-theme="light"] .intro-copy, :root[data-theme="light"] .section-heading p, :root[data-theme="light"] .section-heading a { color: #6b5974; }
:root[data-theme="light"] .sample-flag { border-color: #e4c991; background: #fff5dc; color: #71511e; }
:root[data-theme="light"] .pace-overview .section-heading span { color: #786783; }
:root[data-theme="light"] .activity-item { border-color: #e9dcec !important; background: #fff; box-shadow: 0 7px 20px #3920440a; }
:root[data-theme="light"] .activity-label, :root[data-theme="light"] .activity-sub { color: #74617e; }
:root[data-theme="light"] .activity-label svg { color: #8e43a7; }
:root[data-theme="light"] .profile-rank-panel { border: 1px solid #eadceb; background: #fff; box-shadow: 0 7px 20px #3920440a; }
:root[data-theme="light"] .profile-rank-summary { background: #f4eaf7; }
:root[data-theme="light"] .profile-rank-summary small, :root[data-theme="light"] .profile-rank-summary p { color: #76647f; }
:root[data-theme="light"] .profile-rank-summary strong { color: #40264c; }
:root[data-theme="light"] .profile-rank { background: #f4eaf7; }
:root[data-theme="light"] .profile-rank small, :root[data-theme="light"] .profile-rank-note, :root[data-theme="light"] .street-preview-head small { color: #76647f; }
:root[data-theme="light"] .street-preview { border-top-color: #eadceb; }
:root[data-theme="light"] .street-preview li { background: #f7eff9; }
:root[data-theme="light"] .street-preview li.is-you { background: #ecd8f2; }
:root[data-theme="light"] .street-preview-rank { color: #72577d; }
:root[data-theme="light"] .street-preview-bar { background: #e2d1e8; }
:root[data-theme="light"] .checkin-panel, :root[data-theme="light"] .lesson-focus, :root[data-theme="light"] .module-row, :root[data-theme="light"] .course-completion, :root[data-theme="light"] .manager-stat, :root[data-theme="light"] .tracker-section { border-color: #e6d8eb; background: #fff; }
:root[data-theme="light"] .module-row:hover { border-color: #c7a7d2; background: #fcf7fe; }
:root[data-theme="light"] .module-number, :root[data-theme="light"] .practice-step b { background: #f1e2f7; color: #692b83; }
:root[data-theme="light"] .student-lessons summary, :root[data-theme="light"] .text-button { color: #722f91; }
:root[data-theme="light"] .student-lesson-track, :root[data-theme="light"] .tracker-progress { background: #ecdfef; }
:root[data-theme="light"] .lesson-focus .practice-step { border-color: #e9dcec; background: #faf5fc; }
:root[data-theme="light"] .lesson-focus .activity-sub { color: #76647f; }
:root[data-theme="light"] .btn-secondary { border-color: #d9c4e3; background: #fff; color: #642d7e; }
:root[data-theme="light"] .btn-secondary:hover { background: #f3e6f8; }
:root[data-theme="light"] .empty-search { border-color: #d9c4e3; color: #76647f; }
:root[data-theme="light"] .tracker-table th, :root[data-theme="light"] .tracker-table td small, :root[data-theme="light"] .tracker-hint, :root[data-theme="light"] .tracker-disclaimer, :root[data-theme="light"] .manager-stat span, :root[data-theme="light"] .manager-stat small { color: #76647f; }
:root[data-theme="light"] .portal-admin { border-color: #e5d7ea !important; background: #fff !important; }
:root[data-theme="light"] .portal-admin h2, :root[data-theme="light"] .portal-admin label { color: #31203a !important; }
:root[data-theme="light"] .portal-admin p, :root[data-theme="light"] .portal-access-row small { color: #6c5876 !important; }
:root[data-theme="light"] .portal-access-row { border-color: #e7daeb !important; }
:root[data-theme="light"] .portal-view-switcher span { color: #6c5876 !important; }
:root[data-theme="light"] .portal-view-switcher button { border-color: #d6c0df !important; background: #fff !important; color: #572470 !important; }
:root[data-theme="light"] .portal-view-switcher button[aria-pressed="true"] { background: #8333a6 !important; color: #fff !important; }
:root[data-theme="light"] .portal-account button { background: #f2e2f7 !important; color: #572470 !important; }
:root[data-theme="light"] .mobile-nav { border-top-color: #e4d5ea; background: #fff; }
:root[data-theme="light"] .mobile-nav a { color: #76647f; }
:root[data-theme="light"] .mobile-nav a[aria-current="page"] { background: #f2e4f7; color: #662982; }

.mobile-brand, .mobile-progress-value, .mobile-progress-mood, .mobile-hero-facts,
.mobile-module-collection > summary { display: none; }

@media (max-width: 600px) {
  .portal-demo main { display: flex; flex-direction: column; }
  .portal-demo main > .demo-session-notice { order: 3; margin-top: 18px; }
  .portal-account { padding: 4px 16px; background: #261530; }
  .portal-account button { min-height: 30px; padding: 5px 10px; font-size: 10px; }
  .topbar { min-height: 70px; align-items: center; justify-content: space-between; background: #261530; }
  .topbar .breadcrumbs { display: none; }
  .mobile-brand { display: grid; width: max-content; color: white; font: 900 17px/1 var(--font-display); letter-spacing: .035em; text-decoration: none; }
  .mobile-brand small { margin-top: 3px; font: 900 9px/1.1 var(--font-display); letter-spacing: .34em; text-align: center; }
  .topbar-actions { margin-left: auto; }
  .topbar .portal-help-button { min-height: 32px; }
  .topbar .profile-chip { display: none; }
  main { padding-top: 14px; }
  .page-intro { margin-bottom: 12px; }
  .page-intro .eyebrow { display: none; }
  .page-intro h1 { font-size: 20px; }
  .page-intro .intro-copy { font-size: 11px; }
  #studentDashboard > .course-hero { order: -2; }
  #studentDashboard > #studentNeighborhood { order: -1; }

  #studentDashboard .course-hero { gap: 0; overflow: hidden; border-radius: 25px; background: linear-gradient(180deg, #f7eafb 0 49%, #ecdcf5 49% 100%); }
  #studentDashboard .course-hero .hero-art { min-height: 278px; padding: 8px 0 0; }
  #studentDashboard .course-hero .mascot { width: min(305px, 82vw); max-height: 260px; object-fit: contain; }
  #studentDashboard .course-hero .bird-stage:not([hidden]) { scale: 1.25; }
  #studentDashboard .course-hero .egg-state-image { width: min(240px, 72vw); }
  #studentDashboard .course-hero .journey-markers { bottom: 9px; left: 18px; }
  #studentDashboard .course-hero .mascot-caption { right: 14px; bottom: 6px; max-width: 150px; }
  #studentDashboard .course-copy { display: flex; flex-direction: column; align-items: stretch; padding: 15px 18px 21px; text-align: center; }
  #studentDashboard .course-progress { order: -2; max-width: none; margin: 0 0 18px; padding: 0; }
  #studentDashboard .mobile-progress-value { display: block; margin-bottom: 2px; color: #2c1538; font: 900 clamp(55px, 18vw, 80px)/.95 var(--font-display); letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
  #studentDashboard .mobile-progress-mood { display: -webkit-box; overflow: hidden; max-width: 34ch; margin: 9px auto 18px; color: #793798; font-size: 12px; font-weight: 900; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  #studentDashboard .course-progress .progress-labels { justify-content: center; margin: 0 0 7px; color: #5c3d69; font-size: 10px; }
  #studentDashboard .course-progress .progress-labels span:first-child { display: none; }
  #studentDashboard .course-progress .progress-track { height: 17px; border: 2px solid #d8c1e3; background: white; }
  #studentDashboard .course-progress .progress-fill { background: #8b2eae; }
  #studentDashboard .mobile-hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; order: -1; margin-bottom: 19px; }
  #studentDashboard .mobile-hero-facts > div { display: flex; min-width: 0; min-height: 111px; flex-direction: column; align-items: center; padding: 10px 5px; border-radius: 20px; background: #fffafc; }
  #studentDashboard .mobile-hero-facts span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #f2e4f8; color: #9139b0; font-size: 20px; }
  #studentDashboard .mobile-hero-facts strong { margin-top: 5px; color: #2c1538; font: 900 21px/1 var(--font-display); }
  #studentDashboard .mobile-hero-facts small { max-width: 10ch; margin-top: 4px; color: #786081; font-size: 9px; font-weight: 800; line-height: 1.15; }
  #studentDashboard .course-meta { justify-content: center; }
  #studentDashboard .course-kicker { margin-top: 2px; }
  #studentDashboard .course-title { font-size: 23px; }
  #studentDashboard .course-description { max-width: 38ch; margin-right: auto; margin-left: auto; }
  #studentDashboard .egg-health { text-align: left; }
  #studentDashboard .course-cta { justify-content: center; min-height: 48px; margin-top: 14px; }

  .mobile-module-collection > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 900; list-style: none; }
  .mobile-module-collection > summary::-webkit-details-marker { display: none; }
  .mobile-module-collection > summary::after { content: "⌄"; margin-left: auto; color: var(--purple-dark); font-size: 19px; transition: transform .2s ease; }
  .mobile-module-collection[open] > summary::after { transform: rotate(180deg); }
  .mobile-module-collection .module-collection-hint { color: var(--muted); font-size: 10px; font-weight: 700; }
  .module-section .student-lessons { grid-column: 1 / -1; }
  .module-section .module-footer .text-button { display: none; }
  .mobile-nav { right: 12px; bottom: max(9px, env(safe-area-inset-bottom)); left: 12px; gap: 3px; padding: 7px; border: 1px solid #5b3d68; border-radius: 22px; box-shadow: 0 8px 28px #1a0a2680; }
  .mobile-nav a { min-height: 55px; border-radius: 16px; font-size: 10px; }
  .mobile-nav svg { width: 20px; height: 20px; }
  :root[data-theme="light"] .topbar { background: #f8edfb; }
  :root[data-theme="light"] .mobile-brand { color: #302039; }
  :root[data-theme="light"] .portal-account { background: #f8edfb; }
  :root[data-theme="light"] .mobile-nav { border-color: #e8d9ee; box-shadow: 0 8px 28px #3e205021; }
}
