:root {
  color-scheme: dark;
  --bg: #0c0b12;
  --bg-raised: #111019;
  --surface: #14131d;
  --surface-2: #191824;
  --surface-3: #222030;
  --line: rgba(198, 188, 227, .12);
  --line-strong: rgba(198, 188, 227, .2);
  --text: #f5f3ff;
  --muted: #a1a1b5;
  --muted-2: #9695aa;
  --violet-deep: #4c1d95;
  --violet: #8b5cf6;
  --lavender: #a78bfa;
  --mint: #6ee7b7;
  --warning: #f5c67a;
  --content-width: 1240px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --header-height: 74px;
  font-synthesis: none;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f2fa;
  --bg-raised: #f9f8fc;
  --surface: #fff;
  --surface-2: #f3f0fa;
  --surface-3: #eae5f7;
  --line: rgba(47, 33, 79, .1);
  --line-strong: rgba(47, 33, 79, .17);
  --text: #201a2d;
  --muted: #625c72;
  --muted-2: #817b8f;
  --violet-deep: #4c1d95;
  --violet: #7042d2;
  --lavender: #7854c8;
  --mint: #167e62;
  --warning: #8b5a0b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 22px); }
body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(ellipse at 76% 0%, rgba(76, 29, 149, .19), transparent 34rem),
    radial-gradient(ellipse at 9% 38%, rgba(33, 112, 129, .1), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
::selection { color: #fff; background: var(--violet-deep); }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; }
a { color: inherit; }
.skip-link {
  position: fixed;
  z-index: 30;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.skip-link:focus { transform: translateY(0); }

.app-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(22px) saturate(140%);
}
.header-inner {
  display: flex;
  width: min(var(--content-width), calc(100% - 56px));
  min-height: var(--header-height);
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark { color: var(--lavender); font-size: 30px; line-height: 1; font-weight: 700; }
.brand-name { font-size: 16px; line-height: 1.1; font-weight: 760; letter-spacing: -.035em; }
.brand-name span { color: var(--muted); font-weight: 540; }
.primary-nav { display: flex; align-self: stretch; align-items: center; gap: 5px; }
.nav-link {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 640;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.nav-link:hover, .nav-link.is-current { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.nav-link.is-current { box-shadow: inset 0 0 0 1px rgba(167,139,250,.07); }
.appearance-control {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
  margin: 0 0 0 auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.appearance-control legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.appearance-control button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  transition: background-color .18s ease, color .18s ease;
}
.appearance-control button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.appearance-control button:hover { color: var(--text); }
.appearance-control button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.learner-label { display: inline-flex; flex: none; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.learner-dot, .signal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint);  }

.site-main { width: min(var(--content-width), calc(100% - 56px)); min-height: calc(100vh - 160px); margin: 0 auto; padding: 44px 0 88px; }
.dashboard-overview {
  position: relative;
  display: grid;
  min-height: 368px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  align-items: center;
  gap: clamp(26px, 5vw, 72px);
  padding: 18px 28px 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(112deg, color-mix(in srgb, var(--surface) 94%, var(--violet-deep)), color-mix(in srgb, var(--surface-2) 89%, #152331));
}
.dashboard-overview::before, .dashboard-overview::after {
  position: absolute;
  z-index: 0;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(167,139,250,.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.dashboard-overview::before { top: -220px; right: 18%; box-shadow: 0 0 0 38px rgba(167,139,250,.025), 0 0 0 78px rgba(167,139,250,.018); }
.dashboard-overview::after { right: -220px; bottom: -240px; box-shadow: 0 0 0 48px rgba(110,231,183,.018), 0 0 0 98px rgba(110,231,183,.012); }
.dashboard-copy { position: relative; z-index: 1; max-width: 640px; padding: 20px 0; }
.dashboard-copy h1 {
  max-width: 13ch;
  margin: 0 0 15px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -.058em;
  font-weight: 710;
  text-wrap: balance;
}
.dashboard-copy > p:not(.self-paced-note) { max-width: 59ch; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.72; }
.dashboard-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 680;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { border-color: #9a76f6; background: linear-gradient(120deg, #7651db, #6545bb 74%, #5d40a9); color: #fff; box-shadow: 0 8px 26px rgba(91, 54, 168, .3), inset 0 1px 0 rgba(255,255,255,.2); }
.button-primary:hover { box-shadow: 0 12px 30px rgba(91, 54, 168, .38), inset 0 1px 0 rgba(255,255,255,.24); }
.button-secondary { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.button-secondary:hover:not(:disabled) { border-color: color-mix(in srgb, var(--lavender) 42%, var(--line)); background: var(--surface-3); }
.button-quiet { border-color: var(--line); background: rgba(255,255,255,.025); color: var(--text); }
.button-quiet:hover { background: var(--surface-3); }
.self-paced-note { margin: 15px 0 0; color: var(--muted-2); font-size: 12px; }
.hero-visual { position: relative; z-index: 1; display: grid; min-height: 290px; place-items: center; isolation: isolate; }
.hero-glow {
  position: absolute;
  z-index: -1;
  width: min(92%, 410px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 51% 47%, rgba(139,92,246,.31), rgba(79,56,144,.14) 38%, rgba(20,19,29,0) 72%);
  filter: blur(11px);
}
.hero-camera { width: min(100%, 400px); aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line-strong); border-radius: 20px; box-shadow: 0 16px 38px rgba(0,0,0,.2); animation: camera-float 6s ease-in-out infinite; }
.hero-art-label { position: absolute; right: 12px; bottom: 8px; display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 99px; background: color-mix(in srgb, var(--surface) 78%, transparent); color: var(--muted); font-size: 12px; backdrop-filter: blur(12px); }
.signal-dot { width: 6px; height: 6px; }

.progress-panel {
  display: grid;
  grid-template-columns: minmax(230px, .82fr) minmax(310px, 1.18fr);
  align-items: center;
  gap: clamp(25px, 5vw, 72px);
  margin-top: 16px;
  padding: 23px 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(115deg, color-mix(in srgb, var(--surface) 92%, var(--violet-deep)), color-mix(in srgb, var(--surface-2) 94%, #172635));
}
.panel-overline { display: block; margin-bottom: 4px; color: var(--lavender); font-size: 12px; font-weight: 730; letter-spacing: .11em; text-transform: uppercase; }
.progress-panel h2 { margin: 0; font-size: 21px; font-weight: 690; letter-spacing: -.035em; }
.progress-panel-copy > p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.progress-panel-copy > p strong { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.progress-divider { color: var(--muted-2); padding: 0 3px; }
.progress-meter, .lesson-progress-meter { height: 6px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.progress-meter { margin-top: 14px; }
#progressBar, #lessonTaskBar { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--lavender), var(--mint)); transition: width .8s cubic-bezier(.16,1,.3,1); }
.progress-footnote { margin-top: 8px !important; color: var(--muted-2) !important; font-size: 12px !important; }
.route-wrap { min-width: 0; }
.course-route { display: block; width: 100%; height: 42px; overflow: visible; }
.route-track, .route-active { fill: none; stroke-linecap: round; stroke-width: 2; }
.route-track { stroke: var(--line-strong); }
.route-active { stroke: var(--lavender); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .8s cubic-bezier(.16,1,.3,1); }
.route-stop circle { fill: var(--surface-2); stroke: var(--muted-2); stroke-width: 1.5; transition: fill .25s ease, stroke .25s ease, r .25s ease; }
.route-stop.is-complete circle { fill: var(--mint); stroke: var(--mint); }
.route-caption { display: block; margin-top: -4px; color: var(--muted-2); font-size: 12px; text-align: right; }

.course-section { margin-top: 44px; scroll-margin-top: calc(var(--header-height) + 16px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 1px 16px; }
.section-heading h2 { margin: 0 0 4px; font-size: clamp(24px, 3vw, 31px); line-height: 1.2; letter-spacing: -.045em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.activity-total { flex: none; padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.activity-path-wrap { position: relative; }
.activity-path { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.activity-row { min-width: 0; }
.activity-row:first-child { grid-column: 1 / -1; }
.activity-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 21px 22px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(140deg, var(--surface-2), color-mix(in srgb, var(--surface) 82%, #243040));
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.activity-row:first-child .activity-card { min-height: 168px; padding: 25px 28px 22px; border-color: rgba(167,139,250,.24); background: radial-gradient(ellipse at 95% 8%, rgba(139,92,246,.15), transparent 37%), linear-gradient(120deg, color-mix(in srgb, var(--surface-2) 90%, var(--violet-deep)), var(--surface)); }
.activity-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.activity-row.is-complete .activity-card { border-color: color-mix(in srgb, var(--mint) 42%, var(--line)); }
.activity-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 680; letter-spacing: .02em; }
.activity-step { color: var(--lavender); font-variant-numeric: tabular-nums; }
.activity-type, .completion-status {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(139,92,246,.22);
  border-radius: 99px;
  background: rgba(139,92,246,.1);
  color: var(--lavender);
  font-size: 12px;
  font-weight: 670;
  letter-spacing: 0;
}
.activity-type.is-overview { border-color: var(--line); background: rgba(255,255,255,.025); color: var(--muted); }
.completion-status { border-color: rgba(110,231,183,.23); background: rgba(110,231,183,.1); color: var(--mint); }
.completion-status:empty { display: none; }
.activity-card h3 { max-width: 48ch; margin: 0; font-size: 17px; line-height: 1.35; letter-spacing: -.025em; font-weight: 690; }
.activity-row:first-child .activity-card h3 { max-width: 54ch; font-size: 20px; }
.activity-card > p { max-width: 72ch; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.62; }
.activity-link {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  margin: auto 0 0 -8px;
  padding: 9px 9px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--lavender);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  transition: color .18s ease, background-color .18s ease;
}
.activity-row:first-child .activity-link { margin-top: 7px; }
.activity-link:hover { color: var(--text); background: rgba(139,92,246,.1); }
.activity-link::after { content: "→"; font-size: 15px; transition: transform .18s ease; }
.activity-link:hover::after { transform: translateX(3px); }
.course-note { margin: 28px 0 0; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 12px; }

.lesson-view { width: min(100%, 970px); margin: 0 auto; }
.hidden { display: none !important; }
.lesson-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.back-link { min-height: 40px; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--lavender); font-size: 12px; font-weight: 670; }
.back-link:hover { border-color: var(--line); background: var(--surface-2); }
.lesson-index { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.lesson-heading { padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.lesson-heading h1 { max-width: 25ch; margin: 0; font-size: clamp(31px, 4.2vw, 47px); line-height: 1.09; letter-spacing: -.05em; text-wrap: balance; }
.lesson-heading p { max-width: 70ch; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.lesson-progress-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 16px 0 6px; padding: 14px 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.lesson-progress-card[hidden] { display: none; }
.lesson-progress-copy strong { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.lesson-progress-copy .panel-overline { margin-bottom: 2px; font-size: 12px; }
.lesson-progress-meter { width: min(38%, 220px); }
.lesson-sections {
  position: sticky;
  z-index: 4;
  top: calc(var(--header-height) + 7px);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 12px -4px 0;
  padding: 7px 4px 9px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 89%, transparent);
  scrollbar-width: thin;
  scrollbar-color: var(--muted-2) transparent;
  backdrop-filter: blur(14px);
}
.lesson-sections[hidden] { display: none; }
.lesson-sections a { flex: none; max-width: 24ch; min-height: 34px; overflow: hidden; padding: 7px 10px; border: 1px solid transparent; border-radius: 99px; color: var(--muted); font-size: 12px; font-weight: 630; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.lesson-sections a:hover, .lesson-sections a.is-active { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.lesson-content { min-width: 0; padding: 8px 0 0; }
#lessonContent > h2, #lessonContent > h3, #lessonContent > h4 { margin: 32px 0 9px; color: var(--text); font-weight: 690; letter-spacing: -.03em; scroll-margin-top: calc(var(--header-height) + 65px); }
#lessonContent > h2 { font-size: 24px; }
#lessonContent > h3 { font-size: 19px; }
#lessonContent > h4 { font-size: 15px; }
#lessonContent > p { max-width: 70ch; margin: 8px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.75; }
#lessonContent > img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line) !important; border-radius: 14px !important; cursor: zoom-in; }
#lessonContent .component-list details, #lessonContent details { margin: 10px 0 !important; padding: 14px 17px !important; border: 1px solid var(--line) !important; border-radius: 12px !important; background: var(--surface) !important; }
#lessonContent details[open] { border-color: color-mix(in srgb, var(--lavender) 42%, var(--line)) !important; background: var(--surface-2) !important; }
#lessonContent details summary { color: var(--text) !important; font-weight: 650; line-height: 1.5; cursor: pointer; }
#lessonContent details p { max-width: 70ch; color: var(--muted); line-height: 1.65; }
#lessonContent details img { max-width: 100%; height: auto; border: 1px solid var(--line) !important; border-radius: 10px !important; cursor: zoom-in; }
#lessonContent .procedure-card { margin: 10px 0 !important; padding: 16px 18px !important; border: 1px solid var(--line) !important; border-radius: 12px !important; background: var(--surface) !important; }
#lessonContent .procedure-card h4 { color: var(--text) !important; }
#lessonContent .procedure-card p { color: var(--muted) !important; line-height: 1.65; }
#lessonContent textarea, #lessonContent input, #lessonContent select { max-width: 100%; border: 1px solid var(--line-strong) !important; border-radius: 9px !important; background: var(--bg-raised) !important; color: var(--text) !important; font: inherit; }
#lessonContent textarea { min-height: 96px; }
#lessonContent textarea::placeholder { color: var(--muted-2); }
#lessonContent #componentQuiz, #lessonContent .sequence-game { border: 1px solid var(--line) !important; border-radius: 15px !important; background: var(--surface) !important; }
#lessonContent #componentQuiz h3, #lessonContent .sequence-game h3, #lessonContent #wiringGame h3 { color: var(--text) !important; }
#lessonContent .sequence-game, #lessonContent #wiringGame { color: var(--text) !important; }
#lessonContent .sequence-slot, #lessonContent .sequence-action, #lessonContent #wiringCables, #lessonContent #wiringWorkspace { border-color: var(--line-strong) !important; background: var(--surface-2) !important; color: var(--text) !important; }
#lessonContent .sequence-number { border-color: var(--line); background: var(--surface-3); color: var(--text); }
#lessonContent .sequence-status, #lessonContent #wiringStatus, #lessonContent #componentQuizStatus { border-color: var(--line) !important; background: var(--surface-2); color: var(--muted) !important; }
#lessonContent .sequence-controls button, #lessonContent #componentQuiz button, #lessonContent #wiringGame button, #lessonContent #activity2Reflection button, #lessonContent #activity3Content button { min-height: 40px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-3); color: var(--text); font-size: 12px; font-weight: 650; }
#lessonContent .sequence-controls button:hover, #lessonContent #componentQuiz button:hover, #lessonContent #wiringGame button:hover { border-color: var(--lavender); }
#lessonContent .sequence-remove { color: #ffaaa7; }
#lessonContent label { color: var(--text); }
#lessonContent [style*="color:#102b55"], #lessonContent [style*="color: #102b55"], #lessonContent [style*="color:#617694"], #lessonContent [style*="color: #617694"] { color: var(--muted) !important; }
#lessonContent [style*="background:white"], #lessonContent [style*="background: white"], #lessonContent [style*="background:#fff"], #lessonContent [style*="background: #fff"], #lessonContent [style*="background:#fafcff"], #lessonContent [style*="background: #fafcff"], #lessonContent [style*="background:#f8fbff"], #lessonContent [style*="background: #f8fbff"], #lessonContent [style*="background:#eef5ff"], #lessonContent [style*="background: #eef5ff"], #lessonContent [style*="background:#f0f7ff"], #lessonContent [style*="background: #f0f7ff"] { background: var(--surface-2) !important; color: var(--text); }
#lessonContent [style*="border:1px solid #dbe5f3"], #lessonContent [style*="border: 1px solid #dbe5f3"], #lessonContent [style*="border:1px dashed #d9e5f5"], #lessonContent [style*="border: 1px dashed #d9e5f5"] { border-color: var(--line-strong) !important; }
.notice { margin: 26px 0; padding: 19px 21px; border: 1px solid color-mix(in srgb, var(--warning) 30%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--warning) 7%, var(--surface)); color: var(--text); }
.notice h2 { margin: 0 0 5px; font-size: 16px; }
.notice p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.lesson-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 38px; padding-top: 17px; border-top: 1px solid var(--line); }
.lesson-pagination span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.toast-region { position: fixed; z-index: 20; right: 24px; bottom: 22px; display: grid; gap: 8px; pointer-events: none; }
.toast-message { max-width: min(390px, calc(100vw - 32px)); padding: 13px 16px; transform: translateY(10px); border: 1px solid color-mix(in srgb, var(--mint) 34%, var(--line)); border-radius: 13px; background: var(--surface-2); color: var(--text); font-size: 12px; box-shadow: 0 14px 42px rgba(0,0,0,.25); opacity: 0; animation: toast-in .25s ease forwards, toast-out .3s ease 4.2s forwards; }
.confetti-layer { position: fixed; z-index: 19; inset: 0; overflow: hidden; pointer-events: none; }
.confetti-piece { position: absolute; top: 40%; left: var(--x); width: 7px; height: 12px; border-radius: 2px; background: var(--color); animation: confetti-fall 1.35s cubic-bezier(.18,.64,.32,1) var(--delay) forwards; }

.image-viewer { width: min(1000px, calc(100vw - 30px)); max-width: none; max-height: min(92vh, 900px); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); color: var(--text); }
.image-viewer::backdrop { background: rgba(5,4,10,.82); backdrop-filter: blur(8px); }
.image-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.image-viewer-toolbar h2 { margin: 0; font-size: 13px; font-weight: 660; }
.image-viewer-controls { display: flex; align-items: center; gap: 5px; }
.image-viewer-controls button { min-width: 36px; min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 12px; }
.image-viewer-controls button:hover { border-color: var(--lavender); }
.image-viewer-canvas { display: grid; max-height: calc(92vh - 108px); place-items: center; overflow: auto; padding: 18px; background: var(--bg); }
.image-viewer-canvas img { display: block; width: auto; max-width: 100%; max-height: calc(92vh - 150px); object-fit: contain; transform-origin: center; }
.image-viewer-caption { margin: 0; padding: 10px 16px 13px; color: var(--muted); font-size: 12px; }
.app-footer { display: flex; width: min(var(--content-width), calc(100% - 56px)); align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 0 auto; padding: 18px 0 27px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.app-footer strong { color: var(--text); }
.footer-note { margin-left: auto; color: var(--muted-2); }

@keyframes camera-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(0deg); } }
@keyframes toast-in { to { transform: translateY(0); opacity: 1; } }
@keyframes toast-out { to { transform: translateY(8px); opacity: 0; } }
@keyframes confetti-fall { 0% { transform: translateY(-15vh) rotate(0deg); opacity: 1; } 100% { transform: translateY(62vh) rotate(680deg); opacity: 0; } }

@media (max-width: 900px) {
  .header-inner, .site-main, .app-footer { width: min(var(--content-width), calc(100% - 40px)); }
  .header-inner { gap: 16px; }
  .learner-label { display: none; }
  .dashboard-overview { min-height: 340px; grid-template-columns: 1.05fr .95fr; gap: 20px; padding-inline: 22px; }
  .dashboard-copy h1 { font-size: clamp(38px, 6vw, 54px); }
  .progress-panel { gap: 28px; }
}
@media (max-width: 680px) {
  :root { --header-height: 64px; }
  .header-inner, .site-main, .app-footer { width: min(var(--content-width), calc(100% - 30px)); }
  .header-inner { min-height: var(--header-height); flex-wrap: wrap; gap: 7px 12px; padding: 9px 0; }
  .brand { gap: 7px; }
  .brand-mark { font-size: 26px; }
  .brand-name { font-size: 14px; }
  .primary-nav { margin-left: auto; }
  .nav-link { min-height: 36px; padding: 6px 9px; font-size: 12px; }
  .appearance-control { order: 3; width: 100%; justify-content: center; margin: 0; }
  .appearance-control button { flex: 1; min-height: 30px; }
  .site-main { padding-top: 25px; padding-bottom: 55px; }
  .dashboard-overview { grid-template-columns: 1fr; gap: 0; padding: 23px 20px 12px; }
  .dashboard-copy { padding: 0; }
  .dashboard-copy h1 { max-width: 12ch; font-size: clamp(38px, 11vw, 52px); }
  .dashboard-copy > p:not(.self-paced-note) { font-size: 14px; }
  .dashboard-actions { gap: 8px; margin-top: 18px; }
  .button { min-height: 42px; padding: 9px 12px; font-size: 12px; }
  .self-paced-note { margin-top: 11px; font-size: 12px; }
  .hero-visual { height: min(80vw, 300px); min-height: 240px; margin: 8px 0 0; }
  .hero-camera { width: min(76vw, 280px); }
  .hero-art-label { right: 0; bottom: 0; }
  .progress-panel { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; padding: 18px; }
  .progress-panel h2 { font-size: 19px; }
  .route-wrap { margin-top: 3px; }
  .route-caption { text-align: left; }
  .course-section { margin-top: 34px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .section-heading h2 { font-size: 25px; }
  .section-heading p { max-width: 42ch; font-size: 12px; }
  .activity-path { grid-template-columns: 1fr; gap: 9px; }
  .activity-row:first-child { grid-column: auto; }
  .activity-card, .activity-row:first-child .activity-card { min-height: auto; padding: 18px; }
  .activity-row:first-child .activity-card h3 { font-size: 17px; }
  .activity-card h3 { font-size: 16px; }
  .activity-card > p { font-size: 12px; }
  .activity-link { margin-top: 6px; }
  .course-note { font-size: 12px; }
  .lesson-topline { margin-bottom: 15px; }
  .lesson-heading h1 { font-size: clamp(30px, 8.5vw, 40px); }
  .lesson-heading p { font-size: 13px; }
  .lesson-progress-card { align-items: flex-start; flex-direction: column; gap: 9px; }
  .lesson-progress-meter { width: 100%; }
  .lesson-sections { margin-right: -15px; padding-right: 15px; }
  .lesson-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .lesson-pagination span { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .lesson-pagination button { width: 100%; padding-inline: 7px; }
  .app-footer { align-items: flex-start; flex-direction: column; }
  .footer-note { margin-left: 0; }
  .image-viewer { width: calc(100vw - 18px); }
  .image-viewer-toolbar { align-items: flex-start; flex-direction: column; }
  .image-viewer-controls { width: 100%; }
  .image-viewer-controls button:last-child { margin-left: auto; }
  .image-viewer-canvas { padding: 10px; }
  .toast-region { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Reference-inspired, data-led dashboard shell */
:root { --header-height:68px; }
html { scroll-padding-top:calc(var(--header-height) + 18px); scrollbar-color:var(--surface-3) var(--bg); }
body { min-height:100vh; padding:20px; background:radial-gradient(ellipse at 72% 13%,rgba(39,89,115,.22),transparent 36rem),radial-gradient(ellipse at 18% 78%,rgba(76,29,149,.28),transparent 40rem),var(--bg); }
::selection { color:#fff; background:#6545bb; }
.app-shell { display:grid; width:100%; max-width:none; min-height:calc(100vh - 40px); grid-template-columns:226px minmax(0,1fr); margin:0; overflow:clip; border:1px solid var(--line-strong); border-radius:26px; background:color-mix(in srgb,var(--bg-raised) 90%,transparent); box-shadow:0 26px 80px rgba(0,0,0,.24),0 1px 0 rgba(255,255,255,.035) inset; }
.app-sidebar { position:sticky; top:20px; display:flex; height:calc(100vh - 40px); min-height:620px; flex-direction:column; padding:27px 17px 17px; border-right:1px solid var(--line); background:radial-gradient(ellipse at 0% 100%,rgba(39,106,126,.15),transparent 60%),color-mix(in srgb,var(--surface) 87%,transparent); }
.brand { min-height:44px; gap:9px; padding:3px 7px; }
.brand-mark { font-size:29px; }
.brand-name { font-size:15px; }
.sidebar-nav { display:grid; gap:6px; margin-top:44px; }
.sidebar-nav .nav-link { display:flex; width:100%; min-height:42px; align-items:center; justify-content:flex-start; gap:12px; padding:9px 11px; border:1px solid transparent; border-radius:11px; background:transparent; color:var(--muted); font-size:13px; font-weight:620; text-align:left; }
.sidebar-nav .nav-link svg { width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:1.55; stroke-linecap:round; stroke-linejoin:round; }
.sidebar-nav .nav-link:hover,.sidebar-nav .nav-link.is-current { border-color:var(--line); background:color-mix(in srgb,var(--violet-deep) 19%,var(--surface-2)); color:var(--text); }
.sidebar-nav .nav-link.is-current { box-shadow:0 1px 0 rgba(255,255,255,.035) inset; }
.sidebar-bottom { display:grid; gap:15px; margin-top:auto; padding:15px 3px 0; border-top:1px solid var(--line); }
.sidebar-bottom .learner-label { padding:0 6px; font-size:11px; }
.appearance-control { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; margin:0; padding:3px; border:1px solid var(--line); border-radius:12px; background:color-mix(in srgb,var(--surface-2) 83%,transparent); }
.appearance-control button { min-height:36px; flex-direction:column; gap:2px; padding:4px 2px; font-size:10px; }
.appearance-control button svg { width:14px; height:14px; }
.sidebar-note { margin:0 4px; color:var(--muted-2); font-size:11px; line-height:1.45; }
.app-stage { min-width:0; }
.topbar { position:sticky; z-index:8; top:0; display:flex; min-height:var(--header-height); align-items:center; gap:20px; padding:12px clamp(20px,3vw,38px); border-bottom:1px solid var(--line); background:color-mix(in srgb,var(--bg-raised) 82%,transparent); backdrop-filter:blur(18px) saturate(130%); }
.search-control { display:flex; width:min(460px,66%); min-height:42px; align-items:center; gap:10px; padding:0 12px; border:1px solid var(--line); border-radius:13px; background:color-mix(in srgb,var(--surface-2) 75%,transparent); color:var(--muted); transition:border-color .18s ease,background-color .18s ease; }
.search-control:focus-within { border-color:color-mix(in srgb,var(--lavender) 55%,var(--line)); background:var(--surface); }
.search-control svg { width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; }
.search-control input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--text); font-size:13px; }
.search-control input::placeholder { color:var(--muted); opacity:1; }
.search-control kbd { padding:2px 6px; border:1px solid var(--line); border-radius:5px; color:var(--muted-2); font:11px ui-monospace,monospace; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.topbar-audience { margin-left:auto; color:var(--muted); font-size:12px; text-align:right; }
.site-main { width:100%; min-height:calc(100vh - 150px); margin:0; padding:31px clamp(20px,3.1vw,42px) 48px; }
.dashboard-intro { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(245px,.7fr); align-items:stretch; gap:17px; }
.dashboard-copy { max-width:70ch; padding:17px 3px; }
.dashboard-copy h1 { max-width:21ch; margin:0 0 13px; font-size:clamp(30px,3.5vw,43px); line-height:1.08; letter-spacing:-.045em; font-weight:720; }
.dashboard-copy > p:not(.self-paced-note) { max-width:68ch; margin:0; color:var(--muted); font-size:14px; line-height:1.7; }
.dashboard-actions { gap:9px; margin-top:19px; }
.dashboard-actions .button { min-height:42px; }
.dashboard-promo { position:relative; display:flex; min-height:188px; align-items:flex-start; padding:22px; overflow:hidden; border:1px solid color-mix(in srgb,var(--lavender) 24%,var(--line)); border-radius:19px; background:radial-gradient(ellipse at 80% 75%,rgba(139,92,246,.17),transparent 48%),linear-gradient(130deg,color-mix(in srgb,var(--surface-2) 92%,var(--violet-deep)),var(--surface)); }
.dashboard-promo::after { position:absolute; inset:0; border-radius:inherit; box-shadow:0 1px 0 rgba(255,255,255,.05) inset; content:""; pointer-events:none; }
.promo-copy { position:relative; z-index:1; max-width:70%; }
.dashboard-promo h2 { max-width:16ch; margin:0; font-size:clamp(17px,2vw,22px); line-height:1.2; letter-spacing:-.035em; }
.dashboard-promo img { position:absolute; right:-8px; bottom:-28px; width:52%; height:145px; object-fit:contain; opacity:.9; filter:drop-shadow(0 10px 18px rgba(0,0,0,.27)); }
.button-promo { position:relative; z-index:2; min-height:36px; margin-top:15px; padding:7px 12px; border-color:rgba(167,139,250,.35); background:linear-gradient(110deg,#7042bd,#3e9b9a); color:#fff; font-size:12px; box-shadow:0 7px 18px rgba(47,36,91,.24); }
.dashboard-bento { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr); align-items:stretch; gap:13px; margin-top:16px; }
.progress-panel { display:flex; min-width:0; min-height:180px; flex-direction:column; align-items:stretch; justify-content:space-between; gap:13px; margin:0; padding:20px 22px 15px; border:1px solid var(--line); border-radius:18px; background:radial-gradient(ellipse at 90% 0%,rgba(82,57,141,.17),transparent 52%),linear-gradient(135deg,var(--surface-2),color-mix(in srgb,var(--surface) 88%,#152331)); }
.progress-panel h2 { margin:0; font-size:19px; font-weight:690; letter-spacing:-.035em; }
.progress-panel-copy > p { margin:6px 0 0; color:var(--muted); font-size:12px; }
.progress-panel-copy > p strong { font-size:13px; }
.progress-meter { height:7px; margin-top:12px; }
.progress-footnote { margin-top:6px !important; }
.route-wrap { margin-top:auto; }
.course-route { height:32px; }
.route-caption { font-size:11px; }
.activity-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.stat-card { display:flex; min-height:82px; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; padding:13px 16px; border:1px solid var(--line); border-radius:16px; background:linear-gradient(145deg,color-mix(in srgb,var(--surface-2) 91%,var(--violet-deep)),var(--surface)); }
.stat-card strong { color:var(--text); font-size:clamp(23px,2.4vw,30px); line-height:1; font-weight:720; letter-spacing:-.045em; font-variant-numeric:tabular-nums; }
.stat-card span { color:var(--muted); font-size:11px; }
.stat-card-complete strong { color:var(--mint); }
.stat-card-progress strong { color:var(--lavender); }
.course-section { margin-top:37px; scroll-margin-top:calc(var(--header-height) + 17px); }
.section-heading { align-items:end; margin:0 1px 13px; }
.section-heading h2 { margin:0 0 3px; font-size:clamp(23px,2.6vw,29px); letter-spacing:-.04em; }
.section-heading p { max-width:70ch; font-size:12px; }
.activity-total { padding:5px 9px; }
.search-status { min-height:18px; margin:-4px 1px 10px; color:var(--muted-2); font-size:11px; }
.activity-groups { display:grid; gap:27px; }
.activity-group[hidden] { display:none; }
.activity-group-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 1px 10px; }
.activity-group-heading h3 { margin:0; color:var(--text); font-size:15px; font-weight:680; letter-spacing:-.02em; }
.activity-group-heading span { color:var(--muted-2); font-size:11px; font-variant-numeric:tabular-nums; }
.activity-path { grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; margin:0; padding:0; list-style:none; }
.activity-row { min-width:0; }
.activity-row[hidden] { display:none !important; }
.activity-row:first-child { grid-column:auto; }
.activity-card { min-width:0; min-height:100%; gap:0; padding:0; border-radius:16px; background:linear-gradient(145deg,var(--surface-2),color-mix(in srgb,var(--surface) 88%,#222b3b)); transition:border-color .2s ease,background-color .2s ease,transform .2s ease; }
.activity-row:first-child .activity-card { min-height:100%; padding:0; border-color:var(--line); background:linear-gradient(145deg,var(--surface-2),color-mix(in srgb,var(--surface) 88%,#222b3b)); }
.activity-card-interactive { display:grid; grid-template-columns:minmax(105px,.62fr) minmax(0,1fr); }
.activity-thumb { min-height:100%; overflow:hidden; border-radius:15px 0 0 15px; background:var(--surface-3); }
.activity-thumb img { display:block; width:100%; height:100%; min-height:178px; object-fit:cover; }
.activity-card-copy { display:flex; min-width:0; flex-direction:column; align-items:flex-start; padding:14px 15px 13px; }
.activity-meta { gap:6px; margin-bottom:7px; font-size:10px; }
.activity-type,.completion-status { min-height:20px; padding:2px 7px; font-size:10px; }
.completion-status { border-color:var(--line); background:color-mix(in srgb,var(--surface-3) 52%,transparent); color:var(--muted); }
.activity-row.is-complete .completion-status { border-color:rgba(110,231,183,.23); background:rgba(110,231,183,.1); color:var(--mint); }
.activity-row[data-state="in-progress"] .completion-status { border-color:rgba(167,139,250,.32); background:rgba(139,92,246,.12); color:var(--lavender); }
.activity-card h3,.activity-card h4 { max-width:34ch; margin:0; color:var(--text); font-size:13px; line-height:1.35; letter-spacing:-.02em; font-weight:680; }
.activity-card p { margin:6px 0 9px; color:var(--muted); font-size:11px; line-height:1.45; }
.activity-progress { display:flex; width:100%; align-items:center; gap:8px; margin:auto 0 9px; }
.activity-progress-track { display:block; width:100%; height:5px; overflow:hidden; border-radius:99px; background:var(--surface-3); }
.activity-progress-fill { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--violet),var(--lavender),var(--mint)); transition:width .45s cubic-bezier(.2,.8,.2,1); }
.activity-progress-count { flex:none; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
.activity-link { display:inline-flex; min-height:32px; align-items:center; gap:7px; margin-top:1px; padding:6px 10px; border:1px solid var(--line); border-radius:9px; background:color-mix(in srgb,var(--surface-3) 50%,transparent); color:var(--text); font-size:11px; font-weight:640; text-decoration:none; transition:border-color .18s ease,background-color .18s ease; }
.activity-link:hover { border-color:color-mix(in srgb,var(--lavender) 45%,var(--line)); background:var(--surface-3); }
.activity-link span { color:var(--lavender); font-size:14px; }
.activity-card-overview { min-height:112px; }
.activity-card-overview .activity-card-copy { padding:13px 15px; }
.activity-card-overview .activity-meta { margin-bottom:5px; }
.activity-card-overview p { margin-bottom:8px; }
.course-note { margin:22px 1px 0; color:var(--muted-2); font-size:11px; line-height:1.6; }
.lesson-view { width:min(100%,970px); }
.app-footer { display:flex; width:100%; align-items:center; flex-wrap:wrap; gap:6px 14px; margin:0; padding:16px clamp(20px,3.1vw,42px) 21px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.footer-note { margin-left:auto; }
@media (max-width:1080px) {
  .app-shell { grid-template-columns:205px minmax(0,1fr); }
  .app-sidebar { padding-inline:13px; }
  .dashboard-intro { grid-template-columns:minmax(0,1.1fr) minmax(220px,.9fr); }
  .dashboard-bento { grid-template-columns:minmax(0,1fr) minmax(250px,.88fr); }
  .activity-card-interactive { grid-template-columns:minmax(88px,.48fr) minmax(0,1fr); }
  .activity-card-copy { padding:12px; }
}
@media (max-width:820px) {
  body { padding:12px; }
  .app-shell { min-height:calc(100vh - 24px); grid-template-columns:180px minmax(0,1fr); border-radius:22px; }
  .app-sidebar { top:12px; height:calc(100vh - 24px); min-height:570px; padding:19px 10px 13px; }
  .brand-name { font-size:13px; }
  .sidebar-nav { margin-top:30px; }
  .sidebar-nav .nav-link { gap:8px; padding-inline:8px; font-size:12px; }
  .topbar { gap:11px; padding-inline:17px; }
  .topbar-audience { max-width:175px; font-size:10px; }
  .site-main { padding:24px 17px 38px; }
  .dashboard-intro,.dashboard-bento { grid-template-columns:1fr; }
  .dashboard-copy { padding:9px 2px 5px; }
  .dashboard-promo { min-height:135px; }
  .dashboard-promo img { height:130px; }
  .progress-panel { min-height:160px; }
  .activity-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .stat-card { min-height:77px; padding:11px; }
  .stat-card strong { font-size:22px; }
}
@media (max-width:600px) {
  body { padding:0; }
  .app-shell { display:flex; width:100%; min-height:100vh; flex-direction:column; border:0; border-radius:0; }
  .app-sidebar { position:relative; top:auto; height:auto; min-height:0; flex-direction:row; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 12px; padding:13px 15px 10px; border-right:0; border-bottom:1px solid var(--line); }
  .brand { min-height:37px; padding:0 3px; }
  .sidebar-nav { display:flex; width:100%; gap:5px; order:3; margin:0; overflow-x:auto; scrollbar-width:thin; }
  .sidebar-nav .nav-link { width:auto; min-width:max-content; min-height:38px; gap:7px; padding:7px 10px; }
  .sidebar-bottom { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:7px; margin:0; padding:0; border:0; }
  .sidebar-bottom .learner-label,.sidebar-note { display:none; }
  .appearance-control { display:flex; width:auto; gap:1px; padding:2px; }
  .appearance-control button { min-width:34px; min-height:33px; flex-direction:row; padding:5px; }
  .appearance-control button span { display:none; }
  .topbar { position:relative; min-height:57px; padding:8px 15px; }
  .search-control { width:100%; min-height:40px; }
  .topbar-audience { display:none; }
  .site-main { padding:21px 15px 33px; }
  .dashboard-copy h1 { font-size:clamp(29px,8vw,37px); }
  .dashboard-copy > p:not(.self-paced-note) { font-size:13px; line-height:1.62; }
  .dashboard-actions { gap:8px; margin-top:15px; }
  .dashboard-actions .button { min-height:40px; padding-inline:12px; font-size:12px; }
  .dashboard-promo { min-height:126px; padding:17px; }
  .dashboard-promo h2 { font-size:18px; }
  .dashboard-promo img { right:-14px; width:48%; height:116px; }
  .dashboard-bento { margin-top:12px; }
  .progress-panel { min-height:153px; padding:16px; }
  .progress-panel h2 { font-size:17px; }
  .route-caption { font-size:10px; }
  .activity-stats { gap:7px; }
  .stat-card { min-height:70px; padding:10px; border-radius:13px; }
  .stat-card strong { font-size:20px; }
  .stat-card span { font-size:10px; line-height:1.25; }
  .course-section { margin-top:29px; }
  .section-heading { gap:10px; align-items:start; }
  .section-heading h2 { font-size:22px; }
  .section-heading p { max-width:39ch; font-size:11px; line-height:1.45; }
  .activity-total { padding:4px 7px; font-size:10px; }
  .activity-groups { gap:21px; }
  .activity-path { grid-template-columns:1fr; gap:9px; }
  .activity-card-interactive { grid-template-columns:minmax(96px,.4fr) minmax(0,1fr); }
  .activity-thumb img { min-height:183px; }
  .activity-card-copy { padding:11px; }
  .activity-card h4 { font-size:12px; }
  .activity-card p { font-size:10px; }
  .activity-card-overview { min-height:0; }
  .activity-card-overview .activity-card-copy { padding:12px; }
  .app-footer { padding:14px 15px 20px; }
  .footer-note { width:100%; margin-left:0; }
  .lesson-view { width:100%; }
}
@media (max-width:380px) {
  .app-sidebar { padding-inline:10px; }
  .brand-name { font-size:12px; }
  .sidebar-bottom { gap:4px; }
  .appearance-control button { min-width:30px; }
  .activity-card-interactive { grid-template-columns:82px minmax(0,1fr); }
}

/* Refined signal-path interactions */
.dashboard-copy h1 { max-width:19ch; text-wrap:balance; letter-spacing:-.048em; }
.dashboard-copy > p strong { color:var(--text); font-weight:650; }
.dashboard-promo { isolation:isolate; }
.dashboard-promo img { right:-15px; bottom:-34px; width:62%; height:calc(100% + 18px); max-height:212px; object-position:center; mix-blend-mode:screen; opacity:.72; }
.activity-path-all { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; margin:0; padding:0; list-style:none; }
.activity-row { animation:activity-arrive .36s cubic-bezier(.16,1,.3,1) both; animation-delay:calc(var(--row-order, 0) * 28ms); }
.activity-row[hidden] { display:none !important; }
.activity-card { transform:none; }
.activity-row:first-child .activity-card { transform:none; }
.activity-card:hover { transform:none; border-color:color-mix(in srgb,var(--lavender) 42%,var(--line)); }
.activity-card .activity-card-copy { transition:transform .2s cubic-bezier(.16,1,.3,1); }
.activity-card:hover .activity-card-copy { transform:translateY(-2px); }
.activity-card h4 { font-size:14px; line-height:1.34; letter-spacing:-.027em; }
.activity-card p { font-size:12px; line-height:1.53; }
.activity-step { color:var(--lavender); font-size:10px; letter-spacing:.045em; }
.activity-progress-track { height:6px; }
.activity-progress-fill { box-shadow:0 0 11px color-mix(in srgb,var(--lavender) 50%,transparent); }
.completion-status { transition:background-color .2s ease,color .2s ease,border-color .2s ease; }
.activity-link { transition:background-color .18s ease,border-color .18s ease,color .18s ease; }
.activity-link:hover { transform:none; }
.activity-stats .stat-card strong { transition:color .2s ease; }
.stat-card.is-changing { animation:metric-confirm .42s cubic-bezier(.16,1,.3,1); }
.course-route { overflow:visible; }
.route-track,.route-active { stroke-linecap:round; stroke-linejoin:round; }
.route-track { stroke:color-mix(in srgb,var(--muted-2) 42%,transparent); stroke-width:1.5; }
.route-active { stroke:var(--lavender); stroke-width:2.4; filter:drop-shadow(0 0 3px rgba(167,139,250,.4)); transition:stroke-dashoffset .78s cubic-bezier(.16,1,.3,1); }
.route-stop circle { transform-box:fill-box; transform-origin:center; transition:fill .22s ease,stroke .22s ease,transform .22s ease; }
.route-stop.is-complete circle { fill:var(--mint); stroke:var(--mint); }
.route-stop.is-current circle { fill:var(--surface); stroke:var(--lavender); stroke-width:2.2; animation:route-stop-pulse 1.65s ease-in-out infinite; }
.route-signal { fill:var(--mint); filter:drop-shadow(0 0 4px rgba(110,231,183,.75)); pointer-events:none; }
.route-entering { animation:view-signal-enter .44s cubic-bezier(.16,1,.3,1) both; }
.sidebar-nav .nav-link,.theme-toggle,.theme-toggle-track,.theme-toggle-track > span { transition:all .2s cubic-bezier(.16,1,.3,1); }
.theme-toggle {
  display:flex; width:100%; min-height:42px; align-items:center; gap:10px; padding:8px 10px;
  border:1px solid var(--line); border-radius:11px; background:color-mix(in srgb,var(--surface-2) 83%,transparent);
  color:var(--muted); font-size:12px; font-weight:640; text-align:left;
}
.theme-toggle:hover { border-color:var(--line-strong); background:var(--surface-3); color:var(--text); }
.theme-toggle svg { width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.theme-toggle-label { flex:1; }
.theme-toggle-track { position:relative; display:block; width:35px; height:20px; flex:none; padding:2px; border:1px solid var(--line-strong); border-radius:99px; background:var(--surface-3); }
.theme-toggle-track > span { display:block; width:14px; height:14px; border-radius:50%; background:var(--muted); box-shadow:0 1px 3px rgba(0,0,0,.22); }
.theme-toggle[data-current-theme="light"] .theme-toggle-track { border-color:color-mix(in srgb,var(--violet) 55%,var(--line)); background:color-mix(in srgb,var(--violet) 40%,var(--surface-3)); }
.theme-toggle[data-current-theme="light"] .theme-toggle-track > span { transform:translateX(15px); background:#fff; }
@media (hover:hover) and (min-width:821px) {
  .app-shell { grid-template-columns:72px minmax(0,1fr); }
  .app-sidebar { z-index:20; width:72px; padding:24px 13px 15px; overflow:hidden; transition:width .22s cubic-bezier(.16,1,.3,1),box-shadow .22s ease,background-color .22s ease; }
  .app-sidebar:hover,.app-sidebar:focus-within { width:226px; overflow:visible; border-right-color:var(--line-strong); background:var(--surface); box-shadow:18px 8px 36px rgba(0,0,0,.26); }
  .app-sidebar .brand { justify-content:center; gap:10px; padding-inline:0; }
  .app-sidebar:not(:hover):not(:focus-within) .brand-name { width:0; max-width:0; overflow:hidden; opacity:0; }
  .sidebar-nav { margin-top:39px; }
  .sidebar-nav .nav-link { width:44px; min-width:44px; justify-content:center; gap:12px; padding-inline:0; }
  .sidebar-nav .nav-link span { width:0; max-width:0; overflow:hidden; opacity:0; white-space:nowrap; transition:opacity .13s ease .04s,width .2s ease; }
  .app-sidebar:hover .sidebar-nav .nav-link,.app-sidebar:focus-within .sidebar-nav .nav-link { width:100%; justify-content:flex-start; padding-inline:11px; }
  .app-sidebar:hover .sidebar-nav .nav-link span,.app-sidebar:focus-within .sidebar-nav .nav-link span { width:auto; max-width:150px; opacity:1; }
  .app-sidebar:not(:hover):not(:focus-within) .sidebar-bottom { align-items:center; }
  .app-sidebar:not(:hover):not(:focus-within) .sidebar-bottom .learner-label,.app-sidebar:not(:hover):not(:focus-within) .sidebar-note { width:0; height:0; overflow:hidden; opacity:0; }
  .app-sidebar:not(:hover):not(:focus-within) .theme-toggle { width:42px; justify-content:center; gap:0; padding-inline:0; }
  .app-sidebar:not(:hover):not(:focus-within) .theme-toggle-label,.app-sidebar:not(:hover):not(:focus-within) .theme-toggle-track { width:0; height:0; overflow:hidden; opacity:0; }
  .app-sidebar:hover .theme-toggle,.app-sidebar:focus-within .theme-toggle { width:100%; }
}
@media (max-width:820px) {
  .activity-path-all { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-promo img { width:58%; }
}
@media (max-width:600px) {
  .activity-path-all { grid-template-columns:1fr; }
  .theme-toggle { width:auto; min-height:36px; gap:7px; padding:6px 8px; font-size:11px; }
  .theme-toggle-track { width:32px; height:18px; }
  .theme-toggle-track > span { width:12px; height:12px; }
  .theme-toggle[data-current-theme="light"] .theme-toggle-track > span { transform:translateX(14px); }
  .dashboard-promo img { right:-7px; bottom:-18px; width:54%; height:calc(100% + 12px); }
  .activity-card-interactive { grid-template-columns:minmax(90px,.36fr) minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce) {
  .activity-row { animation:none !important; opacity:1 !important; transform:none !important; }
  .route-signal { display:none !important; }
  .route-stop.is-current circle { animation:none !important; }
  .activity-card .activity-card-copy { transition:color .15s ease; }
  .route-entering { animation:reduced-route-enter .15s ease-out both; }
}
@keyframes activity-arrive { from { opacity:0; transform:translateY(9px); } to { opacity:1; transform:translateY(0); } }
@keyframes metric-confirm { 0% { transform:scale(.94); color:var(--lavender); } 70% { transform:scale(1.06); } 100% { transform:scale(1); } }
@keyframes route-stop-pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.28); } }
@keyframes view-signal-enter { from { clip-path:inset(0 0 100% 0 round 18px); } to { clip-path:inset(0 0 0 0 round 18px); } }
@keyframes reduced-route-enter { from { opacity:.82; } to { opacity:1; } }

/* Legibility and deliberate image framing */
.dashboard-promo img { right:14px; bottom:14px; width:142px; height:142px; max-height:none; border:1px solid var(--line-strong); border-radius:15px; object-fit:cover; mix-blend-mode:normal; opacity:1; filter:drop-shadow(0 10px 18px rgba(0,0,0,.24)); }
.button-promo { background:linear-gradient(110deg,#4c1d95,#246963); }
.button-primary { box-shadow:0 8px 18px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.2); }
.button-primary:hover { box-shadow:0 12px 26px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.24); }
.activity-progress-fill { box-shadow:none; }
.route-active { filter:none; }
.route-signal { filter:none; }
.activity-meta { font-size:11px; }
.activity-type,.completion-status { min-height:22px; padding:3px 8px; font-size:11px; }
.activity-progress-count { font-size:11px; }
.search-status { font-size:12px; }
.sidebar-note { font-size:12px; }
body { caret-color:var(--lavender); }
@media (max-width:600px) {
  .dashboard-promo img { right:12px; bottom:12px; width:112px; height:112px; }
}


/* Full-viewport app frame and text-free EduCCTV camera mark */
body { padding:0; }
.app-shell { width:100%; max-width:none; min-height:100vh; margin:0; border:0; border-radius:0; box-shadow:none; }
.app-footer { width:100%; max-width:none; margin:0; padding-inline:clamp(20px,3vw,42px); }
@media (min-width:601px) { .app-sidebar { top:0; height:100vh; min-height:100vh; } }
.brand-mark { display:inline-flex; width:31px; height:31px; flex:0 0 31px; overflow:hidden; align-items:center; border-radius:7px; }
.brand-mark img { display:block; width:100%; height:100%; max-width:none; object-fit:contain; }
.brand-logo-hover,.brand-hover-name { display:none; }
@media (hover:hover) and (min-width:821px) {
  .app-sidebar:hover .brand-mark,.app-sidebar:focus-within .brand-mark { display:inline-flex; }
  .app-sidebar:hover .brand-logo-hover,.app-sidebar:focus-within .brand-logo-hover { display:block; width:44px; height:44px; flex:none; object-fit:contain; animation:brand-arrive .2s ease-out both; }
}
@keyframes brand-arrive { from { opacity:0; transform:scale(.92); } to { opacity:1; transform:scale(1); } }
@media (max-width:820px) { .brand-mark { width:26px; height:26px; flex-basis:26px; } }

/* Minimum one-second reusable loading view */
body.app-is-loading #appShell { visibility:hidden; }
.app-loading-screen { position:fixed; z-index:10000; inset:0; display:grid; grid-template-rows:72px minmax(0,1fr); gap:16px; padding:0 16px 18px; overflow:auto; background:var(--bg); color:var(--text); opacity:1; transition:opacity .2s ease; }
.app-loading-screen.is-leaving { opacity:0; pointer-events:none; }
.loading-header { display:grid; grid-template-columns:minmax(170px,270px) minmax(140px,1fr) auto; align-items:center; gap:clamp(12px,2vw,25px); border-bottom:1px solid var(--line-strong); }
.loading-brand { display:flex; align-items:center; gap:10px; min-width:0; font-weight:650; }
.loading-brand img { width:42px; height:42px; object-fit:contain; }
.loading-search { height:38px; border:1px solid var(--line); border-radius:12px; }
.loading-header-actions { display:flex; gap:9px; }
.loading-header-actions i { width:66px; height:36px; border:1px solid var(--line-strong); border-radius:11px; }
.loading-header-actions i.is-current { width:98px; border-color:color-mix(in srgb,var(--lavender) 50%,var(--line)); }
.loading-layout { display:grid; grid-template-columns:clamp(165px,18vw,245px) minmax(0,1fr); gap:17px; min-height:0; }
.loading-sidebar { display:flex; flex-direction:column; gap:13px; padding:20px 12px; border:1px solid var(--line-strong); border-radius:18px; background:var(--surface); }
.loading-nav { display:flex; min-height:43px; align-items:center; gap:12px; padding:7px 10px; border:1px solid transparent; border-radius:10px; }
.loading-nav.is-current { border-color:color-mix(in srgb,var(--lavender) 42%,var(--line)); background:color-mix(in srgb,var(--violet) 18%,var(--surface)); }
.loading-nav i { width:18px; height:18px; flex:none; border:1.5px solid var(--lavender); border-radius:5px; }
.loading-nav b { width:68%; height:10px; border-radius:99px; }
.loading-account { display:flex; align-items:center; gap:10px; margin-top:auto; padding:10px 7px; border:1px solid var(--line); border-radius:12px; }
.loading-account>i { width:34px; height:34px; border-radius:50%; }
.loading-account span { flex:1; }
.loading-account b { display:block; width:80%; height:8px; margin:5px; border-radius:99px; }
.loading-content { display:grid; grid-template-columns:minmax(0,1fr) minmax(210px,.3fr); grid-template-rows:minmax(220px,.8fr) minmax(270px,1fr); gap:14px; min-height:0; }
.loading-panel { border:1px solid color-mix(in srgb,var(--lavender) 40%,var(--line)); border-radius:18px; background:linear-gradient(145deg,color-mix(in srgb,var(--violet-deep) 15%,var(--surface)),var(--surface)); }
.loading-hero { display:flex; min-width:0; align-items:center; justify-content:space-between; gap:25px; padding:clamp(17px,3vw,34px); overflow:hidden; }
.loading-hero-copy { display:flex; width:58%; flex-direction:column; align-items:flex-start; gap:13px; }
.loading-bar { display:block; height:11px; border-radius:99px; }
.loading-bar.title { width:83%; height:30px; }
.loading-bar.wide { width:94%; }
.loading-bar.mid { width:72%; }
.loading-bar.short { width:49%; }
.loading-button { width:145px; height:36px; margin-top:6px; border:1px solid color-mix(in srgb,var(--mint) 55%,var(--line)); border-radius:999px; }
.loading-hero-art { width:35%; min-width:130px; height:76%; min-height:135px; border:1px solid var(--line); border-radius:21px; }
.loading-progress { display:flex; min-width:0; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:18px; }
.loading-ring { width:min(54%,148px); aspect-ratio:1; margin-bottom:4px; border:12px solid color-mix(in srgb,var(--violet) 70%,var(--surface-3)); border-right-color:var(--mint); border-radius:50%; }
.loading-progress .loading-bar { height:9px; }
.loading-grid { grid-column:1/-1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(112px,1fr)); gap:11px; min-height:0; }
.loading-card { display:flex; min-width:0; flex-direction:column; justify-content:center; gap:10px; padding:12px; }
.loading-card-image { display:block; width:100%; height:58%; min-height:54px; border:1px solid var(--line); border-radius:12px; }
.loading-card .loading-bar { height:9px; }
.skeleton-shimmer { background:linear-gradient(108deg,color-mix(in srgb,var(--lavender) 18%,var(--surface-3)) 20%,color-mix(in srgb,var(--lavender) 60%,var(--surface-3)) 43%,color-mix(in srgb,var(--violet) 48%,var(--surface-3)) 54%,color-mix(in srgb,var(--lavender) 18%,var(--surface-3)) 78%); background-size:230% 100%; animation:skeleton-sweep 1.55s ease-in-out infinite; }
@keyframes skeleton-sweep { 0% { background-position:100% 50%; } 100% { background-position:-130% 50%; } }
@media (max-width:760px) {
  .app-loading-screen { grid-template-rows:60px minmax(0,1fr); gap:9px; padding:0 9px 9px; }
  .loading-header { grid-template-columns:minmax(120px,1fr) auto; gap:7px; }
  .loading-brand img { width:34px; height:34px; }
  .loading-search { display:none; }
  .loading-header-actions { gap:4px; }
  .loading-header-actions i { width:34px; height:30px; }
  .loading-header-actions i.is-current { width:47px; }
  .loading-layout { grid-template-columns:1fr; gap:8px; }
  .loading-sidebar { display:none; }
  .loading-content { grid-template-columns:1fr; grid-template-rows:minmax(180px,.7fr) 94px minmax(290px,1fr); gap:8px; }
  .loading-hero { padding:13px; }
  .loading-hero-copy { width:60%; gap:9px; }
  .loading-bar.title { height:21px; }
  .loading-hero-art { width:32%; min-width:82px; min-height:100px; height:80%; }
  .loading-progress { display:grid; grid-template-columns:62px 1fr; grid-template-rows:1fr 1fr; justify-items:start; gap:6px 10px; padding:10px; }
  .loading-ring { grid-row:1/3; width:58px; margin:0; border-width:8px; }
  .loading-grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(4,minmax(108px,1fr)); gap:7px; }
  .loading-card { padding:8px; gap:7px; }
}

/* Ctrl/Command-K command palette */
.search-trigger { cursor:pointer; text-align:left; font:inherit; }
.search-trigger span { flex:1; color:var(--muted); }
.command-palette { position:fixed; inset:auto; top:min(8vh,64px); left:50%; width:min(660px,calc(100vw - 24px)); max-width:none; max-height:min(78vh,690px); margin:0; padding:0; overflow:hidden; transform:translateX(-50%); border:1px solid var(--line-strong); border-radius:16px; background:var(--surface); color:var(--text); box-shadow:0 28px 90px rgba(0,0,0,.55); }
.command-palette::backdrop { background:rgba(5,4,10,.68); backdrop-filter:blur(3px); }
.command-palette-inner { display:flex; max-height:min(78vh,690px); flex-direction:column; }
.command-search-row { display:flex; min-height:54px; align-items:center; gap:11px; padding:0 15px; border-bottom:1px solid var(--line); }
.command-search-row svg { width:18px; height:18px; flex:none; fill:none; stroke:var(--muted); stroke-width:1.6; stroke-linecap:round; }
.command-search-row input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--text); font-size:14px; }
.command-search-row input::placeholder { color:var(--muted-2); }
.command-search-row kbd,.command-footer kbd { padding:2px 5px; border:1px solid var(--line); border-radius:5px; color:var(--muted); font:10px ui-monospace,monospace; }
.command-results { min-height:80px; overflow:auto; padding:8px; }
.command-group { margin:2px 0 9px; }
.command-group[hidden] { display:none; }
.command-group h3 { margin:9px 10px 5px; color:var(--muted-2); font-size:11px; font-weight:650; letter-spacing:.02em; }
.command-result { display:flex; width:100%; min-height:37px; align-items:center; gap:10px; padding:7px 10px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--text); text-align:left; cursor:pointer; }
.command-result:hover,.command-result.is-active { border-color:var(--line); background:var(--surface-3); }
.command-result-icon { display:grid; width:22px; height:22px; flex:none; place-items:center; border-radius:6px; background:color-mix(in srgb,var(--violet) 20%,var(--surface)); color:var(--lavender); font-size:11px; }
.command-result-copy { display:flex; min-width:0; flex:1; flex-direction:column; }
.command-result-copy strong { font-size:12px; font-weight:650; }
.command-result-copy small { overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.command-empty { margin:0; padding:22px 18px; color:var(--muted); font-size:12px; }
.command-footer { display:flex; align-items:center; gap:14px; padding:9px 13px; border-top:1px solid var(--line); color:var(--muted-2); font-size:10px; }
.command-footer span { display:flex; align-items:center; gap:4px; }
@media (max-width:600px) { .command-palette { top:8px; width:calc(100vw - 16px); max-height:82vh; border-radius:13px; } .command-palette-inner { max-height:82vh; } .command-footer { justify-content:space-between; gap:5px; } }
@media (prefers-reduced-motion:reduce) { .skeleton-shimmer,.brand-logo-hover { animation:none !important; background-position:50% 50%; } .app-loading-screen { transition:none; } }

/* Keep the visible brand mark bounded and text-free. */
.brand-mark { width:32px; height:32px; flex:0 0 32px; overflow:hidden; border-radius:0; }
.brand-mark img { display:block; width:100%; height:100%; max-width:100%; max-height:100%; object-fit:contain; }
.brand-logo-hover,.brand-hover-name { display:none !important; }
.brand-name { color:var(--text); font-size:14px; font-weight:680; letter-spacing:-.02em; }

/* Classroom placement preview: orientation only, with manual-grounded component details. */
.classroom-preview { display:block; margin:clamp(20px,3vw,34px) 0; padding:clamp(14px,2.2vw,24px); border:1px solid var(--line-strong); border-radius:20px; background:linear-gradient(145deg,color-mix(in srgb,var(--violet-deep) 18%,var(--surface)),var(--surface)); box-shadow:0 18px 44px rgba(0,0,0,.16); }
.classroom-preview[hidden],#wiringGame[hidden] { display:none !important; }
.preview-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.preview-header h3 { margin:3px 0 5px; color:var(--text); font-size:clamp(20px,2vw,27px); letter-spacing:-.035em; }
.preview-eyebrow { margin:0; color:var(--lavender); font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.preview-lede { margin:0; color:var(--muted); font-size:13px; }
.preview-mode-badge { display:flex; min-height:31px; align-items:center; gap:7px; flex:none; padding:6px 10px; border:1px solid var(--line); border-radius:999px; background:color-mix(in srgb,var(--violet) 12%,var(--surface)); color:var(--muted); font-size:10px; white-space:nowrap; }
.preview-mode-badge i,.preview-detail-heading i { width:7px; height:7px; border-radius:50%; background:var(--mint); box-shadow:0 0 12px color-mix(in srgb,var(--mint) 40%,transparent); }
.preview-source-note { display:flex; align-items:flex-start; gap:10px; margin:0 0 12px; padding:10px 12px; border:1px solid color-mix(in srgb,var(--lavender) 25%,var(--line)); border-radius:11px; background:color-mix(in srgb,var(--violet) 8%,var(--surface)); color:var(--muted); font-size:11px; line-height:1.5; }
.preview-source-note strong { flex:none; color:var(--lavender); font-size:10px; text-transform:uppercase; letter-spacing:.045em; }
.preview-prompt-strip { display:flex; min-height:43px; align-items:center; gap:11px; margin-bottom:12px; padding:7px 12px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); }
.preview-prompt-strip>span { display:grid; width:25px; height:25px; flex:none; place-items:center; border:1px solid color-mix(in srgb,var(--lavender) 40%,var(--line)); border-radius:8px; background:color-mix(in srgb,var(--violet) 20%,var(--surface)); color:var(--lavender); font:700 10px ui-monospace,monospace; }
.preview-prompt-strip p { margin:0; color:var(--text); font-size:12px; font-weight:620; }
.preview-stage-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(225px,.3fr); gap:12px; align-items:stretch; }
.preview-scene { position:relative; min-width:0; align-self:start; overflow:hidden; aspect-ratio:960/580; border:1px solid var(--line-strong); border-radius:15px; background:#13121a; box-shadow:0 12px 28px rgba(0,0,0,.18); }
.classroom-illustration { display:block; width:100%; height:100%; }
.preview-camera-device { opacity:0; transition:opacity .24s ease; }
.classroom-preview.has-preview-camera .preview-camera-device { opacity:1; }
.preview-hotspot { position:absolute; z-index:2; display:flex; min-width:112px; min-height:42px; align-items:center; justify-content:center; gap:7px; padding:6px 10px; border:1px solid color-mix(in srgb,var(--lavender) 76%,white); border-radius:999px; background:color-mix(in srgb,var(--violet-deep) 88%,transparent); color:var(--text); box-shadow:0 0 0 3px color-mix(in srgb,var(--violet) 26%,transparent),0 0 25px color-mix(in srgb,var(--lavender) 40%,transparent); cursor:pointer; animation:preview-target-arrive .18s ease-out both; }
.preview-hotspot-camera { top:21%; left:50%; transform:translate(-50%,-50%); }
.preview-hotspot-workbench { top:69%; left:75%; transform:translate(-50%,-50%); }
.preview-hotspot>span { width:8px; height:8px; flex:none; border-radius:50%; background:var(--mint); box-shadow:0 0 12px var(--mint); }
.preview-hotspot b { font-size:10px; font-weight:700; white-space:nowrap; }
.preview-hotspot[hidden] { display:none !important; }
.preview-placed-items { position:absolute; z-index:3; right:10px; bottom:10px; left:10px; display:flex; flex-wrap:wrap; gap:6px; pointer-events:none; }
.preview-placed-tag { display:flex; align-items:center; gap:5px; padding:4px 8px 4px 5px; border:1px solid color-mix(in srgb,var(--mint) 45%,var(--line)); border-radius:999px; background:color-mix(in srgb,var(--surface) 88%,transparent); color:var(--mint); font-size:10px; font-weight:650; box-shadow:0 4px 12px rgba(0,0,0,.2); animation:preview-target-arrive .2s ease-out both; }
.preview-placed-tag img { width:28px; height:22px; border-radius:5px; object-fit:contain; background:var(--surface-2); }
.preview-detail-panel { display:flex; min-width:0; flex-direction:column; padding:15px; border:1px solid var(--line); border-radius:15px; background:linear-gradient(165deg,var(--surface-2),color-mix(in srgb,var(--violet-deep) 10%,var(--surface))); }
.preview-detail-heading { display:flex; align-items:center; gap:8px; color:var(--muted-2); font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.preview-detail-heading p { margin:0; }
.preview-detail-panel h4 { margin:14px 0 9px; color:var(--text); font-size:16px; line-height:1.25; letter-spacing:-.02em; }
.preview-detail-panel>img { display:block; width:100%; max-height:108px; margin:0 0 10px; border:1px solid var(--line); border-radius:10px; background:var(--surface); object-fit:contain; }
.preview-detail-panel>img[hidden] { display:none; }
.preview-detail-purpose,.preview-detail-connection { margin:0; color:var(--muted); font-size:11px; line-height:1.55; }
.preview-detail-divider { height:1px; margin:13px 0 10px; background:var(--line); }
.preview-detail-label { margin-bottom:5px; color:var(--lavender); font-size:9px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.preview-placement-status { margin:auto 0 0; padding-top:13px; color:var(--mint); font-size:10px; font-weight:650; }
.preview-tray { margin-top:13px; padding:13px; border:1px solid var(--line); border-radius:14px; background:color-mix(in srgb,var(--surface-2) 75%,var(--surface)); }
.preview-tray-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.preview-tray-heading>div { display:flex; align-items:center; gap:9px; }
.preview-tray-heading>div>span { color:var(--lavender); font-size:20px; line-height:1; }
.preview-tray-heading h4 { margin:0; color:var(--text); font-size:13px; }
.preview-tray-heading>p { margin:0; color:var(--muted-2); font-size:10px; text-align:right; }
.preview-component-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr)); gap:7px; }
.preview-component { display:grid; min-width:0; min-height:56px; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:7px; padding:8px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); text-align:left; cursor:pointer; transition:border-color .16s ease,background-color .16s ease,transform .16s ease; }
.preview-component:hover { border-color:color-mix(in srgb,var(--lavender) 55%,var(--line)); transform:translateY(-1px); }
.preview-component[aria-pressed="true"] { border-color:var(--lavender); background:color-mix(in srgb,var(--violet) 18%,var(--surface)); box-shadow:0 0 0 2px color-mix(in srgb,var(--violet) 18%,transparent); }
.preview-component>img { display:block; width:28px; height:28px; padding:2px; border-radius:8px; background:color-mix(in srgb,var(--violet) 18%,var(--surface-2)); object-fit:contain; }
.preview-component>span { display:grid; width:27px; height:27px; place-items:center; border-radius:8px; background:color-mix(in srgb,var(--violet) 18%,var(--surface-2)); color:var(--lavender); font-size:11px; font-weight:750; }
.preview-component>b { overflow:hidden; font-size:10px; line-height:1.3; text-overflow:ellipsis; }
.preview-component>i { color:var(--muted-2); font-size:8px; font-style:normal; }
.preview-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; }
.preview-footer p { margin:0; color:var(--muted-2); font-size:10px; }
.preview-start-button { display:flex; min-height:44px; align-items:center; gap:12px; padding:9px 16px; border:1px solid color-mix(in srgb,var(--lavender) 72%,white); border-radius:11px; background:linear-gradient(110deg,var(--violet),color-mix(in srgb,var(--mint) 54%,#26313a)); color:#fff; font-size:12px; font-weight:700; cursor:pointer; box-shadow:0 6px 20px color-mix(in srgb,var(--violet) 22%,transparent); }
.preview-start-button span { font-size:16px; transition:transform .16s ease; }
.preview-start-button:hover span { transform:translateX(3px); }
.preview-review-button { min-height:38px; margin-left:auto; padding:7px 11px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); color:var(--text); font-size:11px; cursor:pointer; }
.preview-hotspot:focus-visible,.preview-component:focus-visible,.preview-start-button:focus-visible,.preview-review-button:focus-visible { outline:3px solid var(--mint); outline-offset:3px; }
@keyframes preview-target-arrive { from { opacity:0; scale:.96; } to { opacity:1; scale:1; } }
@media (max-width:900px) { .preview-stage-grid { grid-template-columns:minmax(0,1fr) minmax(190px,.36fr); } .preview-detail-panel { padding:12px; } }
@media (max-width:680px) { .classroom-preview { padding:13px; border-radius:16px; } .preview-header { flex-direction:column; gap:9px; } .preview-mode-badge { order:-1; } .preview-source-note { flex-direction:column; gap:3px; } .preview-stage-grid { grid-template-columns:1fr; } .preview-detail-panel { min-height:0; } .preview-detail-panel h4 { margin-top:8px; } .preview-detail-panel>img { max-height:90px; } .preview-placement-status { margin-top:8px; } .preview-tray-heading { align-items:flex-start; flex-direction:column; } .preview-tray-heading>p { text-align:left; } .preview-component-list { grid-template-columns:repeat(2,minmax(0,1fr)); } .preview-component { min-height:54px; } .preview-footer { align-items:stretch; flex-direction:column; } .preview-start-button { justify-content:center; } }
@media (max-width:380px) { .preview-component-list { grid-template-columns:1fr; } .preview-hotspot { min-width:95px; padding:5px 8px; } .preview-hotspot b { font-size:9px; } }
@media (prefers-reduced-motion:reduce) { .preview-camera-device,.preview-component,.preview-hotspot,.preview-placed-tag,.preview-start-button span { transition:none !important; animation:none !important; } .preview-component:hover,.preview-start-button:hover span { transform:none; } }