/* ==========================================================================
   6oal Learn — learn.css
   Dark neon studio DNA (cyan #00e5ff / pink #ff3d81 / bg #0b0e14) but calmer
   and more spacious than the studio: 16px+ base, generous line-height,
   plenty of air, big touch targets (>=44px), full 320px -> desktop.
   © 2026 Bluefrog, Inc.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --bg:        #0b0e14;
  --bg-deep:   #070a0f;
  --panel:     #121a29;
  --panel-2:   #17223580;
  --panel-hi:  #1b2740;
  --line:      #24334e;
  --line-soft: #1b2740;

  --ink:   #e8f2ff;
  --ink-2: #a9bcd6;
  --ink-3: #74899f;

  --cyan:   #00e5ff;
  --pink:   #ff3d81;
  --violet: #7c4dff;
  --lime:   #7cffb2;
  --amber:  #ffcc66;
  --ok:     #39e08a;
  --bad:    #ff5e78;

  --grad: linear-gradient(135deg, #00e5ff 0%, #7c4dff 55%, #ff3d81 100%);

  --r-lg: 20px;
  --r:    14px;
  --r-sm: 10px;

  --shadow:    0 14px 38px rgba(0, 0, 0, .5);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .38);
  --ring:      0 0 0 3px rgba(0, 229, 255, .34);

  --tap: 44px;
  --gap: 18px;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --step: var(--cyan); /* per-lesson accent, overridden inline by learncore */
}

*, *::before, *::after { box-sizing: border-box; }

/* [hidden] must beat every display rule below (flex/grid containers included) */
[hidden] { display: none !important; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 12% -12%, rgba(0, 229, 255, .10), transparent 62%),
    radial-gradient(900px 560px at 96% 4%, rgba(255, 61, 129, .09), transparent 60%),
    radial-gradient(760px 500px at 50% 118%, rgba(124, 77, 255, .10), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 700px) { body { font-size: 18px; } }

/* --------------------------------------------------------------------------
   2. Base elements
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--ink);
}
h1 { font-size: clamp(1.7rem, 5.2vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3.8vw, 1.75rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.3rem); }
h4 { font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.35em; }
li { margin: .35em 0; }

a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(0, 229, 255, .3); }
a:hover { border-bottom-color: var(--cyan); }
a.btn, a.station, a.brand, a.foot-link, a.tab, a.choice { border-bottom: 0; }

strong, b { color: #fff; font-weight: 700; }
em { color: var(--ink); }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 1.6rem 0;
}

code, kbd, samp { font-family: var(--mono); font-size: .92em; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 8px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 60;
  background: var(--cyan); color: #04121a; padding: .7rem 1.1rem;
  border-radius: 0 0 10px 0; font-weight: 700; border: 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   3. Header
   -------------------------------------------------------------------------- */
.learn-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(12px, 3vw, 26px);
  padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(9, 12, 19, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  border: 0;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { display: inline-flex; filter: drop-shadow(0 0 12px rgba(0, 229, 255, .3)); }
.brand-mark svg { display: block; }
.brand-name {
  font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  font-weight: 900;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand-name em {
  font-style: normal;
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hdr-progress { display: flex; align-items: center; gap: 10px; }

.stars-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 4px 12px 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 204, 102, .07);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
}
.stars-badge .star-glyph { fill: var(--amber); filter: drop-shadow(0 0 8px rgba(255, 204, 102, .5)); }
.stars-badge .of { color: var(--ink-3); font-weight: 600; }

.progress-ring { position: relative; display: inline-flex; width: 44px; height: 44px; }
.progress-ring svg { display: block; }
.progress-ring .ring-bg { stroke: rgba(255, 255, 255, .10); }
.progress-ring .ring-arc {
  transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .3, 1);
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, .45));
}
.progress-ring .ring-pct {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: .62rem; font-weight: 800; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   4. Screen shell
   -------------------------------------------------------------------------- */
#screen {
  flex: 1 0 auto;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 40px) clamp(14px, 4vw, 28px) 56px;
}

.screen-fade { animation: screenIn .34s ease both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   5. Generic layout helpers
   -------------------------------------------------------------------------- */
.row      { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row.tight{ gap: 8px; }
.row.between { justify-content: space-between; }
.row.center  { justify-content: center; }
.col      { display: flex; flex-direction: column; gap: 12px; }
.stack > * + * { margin-top: 1rem; }
.center   { text-align: center; }
.spacer   { flex: 1 1 auto; }

.grid2, .grid3 { display: grid; gap: var(--gap); }
.grid2 { grid-template-columns: 1fr; }
.grid3 { grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
}

.muted { color: var(--ink-2); }
.dim   { color: var(--ink-3); }
.tiny  { font-size: .82rem; line-height: 1.5; color: var(--ink-3); }
.lead  { font-size: 1.08em; color: var(--ink-2); line-height: 1.7; }
.big   { font-size: 1.25em; }
.nowrap{ white-space: nowrap; }
.mono  { font-family: var(--mono); }

.tag, .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-2);
}
.tag.accent, .pill.accent {
  color: var(--step);
  border-color: color-mix(in srgb, var(--step) 45%, transparent);
  background: color-mix(in srgb, var(--step) 12%, transparent);
}

.kbd {
  display: inline-block; padding: 1px 7px; border-radius: 6px;
  border: 1px solid var(--line); border-bottom-width: 2px;
  background: #0e1522; font-family: var(--mono); font-size: .85em; color: var(--ink);
}

/* --------------------------------------------------------------------------
   6. Cards / panels / callouts
   -------------------------------------------------------------------------- */
.card, .panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: clamp(16px, 3.4vw, 26px);
  box-shadow: var(--shadow-sm);
  margin: 0 0 var(--gap);
}
.card:last-child, .panel:last-child { margin-bottom: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.accent { border-color: color-mix(in srgb, var(--step) 40%, var(--line-soft)); }
.card-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 .6rem;
  font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em;
}
.card-title .num {
  display: grid; place-items: center;
  width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--step) 22%, transparent);
  color: var(--step);
  font-size: .85rem; font-weight: 900;
}
.card-body { color: var(--ink-2); }

.callout {
  border-left: 3px solid var(--cyan);
  background: rgba(0, 229, 255, .07);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 14px 18px;
  margin: 0 0 var(--gap);
  color: var(--ink-2);
}
.callout strong { color: var(--cyan); }
.callout.tip  { border-left-color: var(--lime);  background: rgba(124, 255, 178, .07); }
.callout.tip strong { color: var(--lime); }
.callout.warn { border-left-color: var(--amber); background: rgba(255, 204, 102, .08); }
.callout.warn strong { color: var(--amber); }
.callout.fun  { border-left-color: var(--pink);  background: rgba(255, 61, 129, .08); }
.callout.fun strong { color: var(--pink); }

/* --------------------------------------------------------------------------
   7. Buttons & controls
   -------------------------------------------------------------------------- */
button, .btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #16203300;
  background-color: rgba(255, 255, 255, .05);
  color: var(--ink);
  font: inherit;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:hover, .btn:hover { background-color: rgba(255, 255, 255, .1); border-color: var(--line); }
button:active, .btn:active { transform: translateY(1px) scale(.985); }
button:disabled, .btn:disabled, .btn[aria-disabled="true"] { opacity: .42; cursor: not-allowed; transform: none; }

.btn.primary, button.primary {
  border-color: transparent;
  background-image: var(--grad);
  background-color: transparent;
  color: #05121a;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 229, 255, .22);
}
.btn.primary:hover { filter: brightness(1.08); }

.btn.accent {
  color: var(--step);
  border-color: color-mix(in srgb, var(--step) 55%, transparent);
  background-color: color-mix(in srgb, var(--step) 14%, transparent);
}
.btn.ghost { background-color: transparent; }
/* 44px is the minimum comfortable touch target — pills are small, not smaller. */
.btn.pill  { padding: 8px 14px; min-height: 44px; font-size: .9rem; }
.btn.lg    { min-height: 54px; padding: 14px 26px; font-size: 1.08rem; }
.btn.block { width: 100%; }
.btn.danger { color: var(--bad); border-color: rgba(255, 94, 120, .45); background-color: rgba(255, 94, 120, .1); }
.btn.good   { color: var(--ok);  border-color: rgba(57, 224, 138, .45); background-color: rgba(57, 224, 138, .1); }
.btn[aria-pressed="true"] {
  color: var(--cyan);
  border-color: rgba(0, 229, 255, .6);
  background-color: rgba(0, 229, 255, .16);
  box-shadow: inset 0 0 18px rgba(0, 229, 255, .16);
}
.btn-group { display: inline-flex; flex-wrap: wrap; gap: 8px; }

select, input[type="text"], input[type="number"] {
  -webkit-appearance: none;
  appearance: none;
  min-height: var(--tap);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e1522;
  color: var(--ink);
  font: inherit;
  font-size: .96rem;
}
select {
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
                    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 120px;
  height: var(--tap);
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 229, 255, .55), rgba(255, 61, 129, .45)), rgba(255, 255, 255, .1);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin-top: -8px;
  border-radius: 50%; border: 2px solid #06101a;
  background: var(--ink);
  box-shadow: 0 0 12px rgba(0, 229, 255, .5);
}
input[type="range"]::-moz-range-track {
  height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .14);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #06101a;
  background: var(--ink); box-shadow: 0 0 12px rgba(0, 229, 255, .5);
}

.field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.field > label { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   8. Home — banner + six-step path
   -------------------------------------------------------------------------- */
.banner {
  text-align: center;
  padding: clamp(18px, 5vw, 40px) 16px clamp(22px, 5vw, 34px);
  margin-bottom: clamp(20px, 5vw, 36px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(80% 130% at 50% -25%, rgba(124, 77, 255, .22), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01));
  box-shadow: var(--shadow);
}
.banner-title {
  margin: 0 0 .3em;
  font-size: clamp(1.6rem, 7vw, 3.1rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.05;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}
.banner-sub { margin: 0 auto; max-width: 40ch; color: var(--ink-2); font-size: clamp(1rem, 2.8vw, 1.15rem); }
.banner-meta { margin-top: 1.1rem; }

/* the path */
.path {
  position: relative;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  padding-left: 30px;
}
.path::before {
  content: "";
  position: absolute;
  left: 13px; top: 14px; bottom: 14px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #00e5ff, #7c4dff 55%, #ff3d81);
  opacity: .5;
  box-shadow: 0 0 22px rgba(124, 77, 255, .55);
}

.station {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 92px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  opacity: .74;
  transition: transform .16s ease, border-color .18s ease, opacity .18s ease, box-shadow .18s ease;
}
.station::before {
  content: "";
  position: absolute;
  left: -23px; top: 50%;
  width: 12px; height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--step);
  box-shadow: 0 0 14px color-mix(in srgb, var(--step) 70%, transparent);
}
.station:hover, .station:focus-visible {
  opacity: 1;
  transform: translateX(3px);
  border-color: color-mix(in srgb, var(--step) 52%, transparent);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--step) 16%, transparent);
}
.station.started { opacity: .93; }
.station.done {
  opacity: 1;
  border-color: color-mix(in srgb, var(--step) 42%, var(--line-soft));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--step) 10%, transparent), rgba(255, 255, 255, .012));
}
.station.locked { cursor: pointer; opacity: .48; }
.station.locked .station-icon { filter: grayscale(.7); }

.station-num {
  display: grid; place-items: center;
  width: 54px; height: 54px; flex: 0 0 54px;
  border-radius: 17px;
  border: 1px solid color-mix(in srgb, var(--step) 45%, transparent);
  background: color-mix(in srgb, var(--step) 14%, transparent);
  color: var(--step);
  font-size: 1.5rem; font-weight: 900; line-height: 1;
}
.station-icon {
  display: grid; place-items: center;
  font-size: 1.55rem; line-height: 1;
}
.station-icon svg { width: 30px; height: 30px; display: block; }
.station-body { min-width: 0; }
.station-step {
  font-size: .72rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.station-title {
  margin: 0; font-size: 1.16rem; font-weight: 800; letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.station-tag { margin: 2px 0 0; color: var(--ink-2); font-size: .95rem; line-height: 1.45; }
.station-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

@media (min-width: 760px) {
  .path { grid-template-columns: 1fr 1fr; column-gap: 22px; padding-left: 30px; }
  .path::before { bottom: 14px; }
  .station:nth-child(even) { transform: translateY(18px); }
  .station:nth-child(even):hover, .station:nth-child(even):focus-visible { transform: translateY(18px) translateX(3px); }
  .station:nth-child(even)::before { display: none; }
}

/* stars */
.stars { display: inline-flex; align-items: center; gap: 3px; }
.stars .star { width: 20px; height: 20px; display: block; fill: rgba(255, 255, 255, .16); }
.stars .star.on { fill: var(--amber); filter: drop-shadow(0 0 7px rgba(255, 204, 102, .55)); }
.stars.lg .star { width: 34px; height: 34px; }
.stars.xl .star { width: 46px; height: 46px; }

/* --------------------------------------------------------------------------
   9. Lesson shell — head, tabs, panels, footer
   -------------------------------------------------------------------------- */
.lesson-head {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 16px;
}
.lesson-head .station-num { width: 58px; height: 58px; flex: 0 0 58px; }
.lesson-title { margin: 0; font-size: clamp(1.5rem, 5.4vw, 2.15rem); letter-spacing: -.02em; }
.lesson-tagline { margin: 2px 0 0; color: var(--ink-2); }
.lesson-crumbs { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }

.tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 22px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .035);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 1 0;
  min-width: 96px;
  min-height: var(--tap);
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 800;
  font-size: .96rem;
  white-space: nowrap;
}
.tab:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
.tab.active {
  color: #05121a;
  background-image: var(--grad);
  box-shadow: 0 6px 18px rgba(0, 229, 255, .2);
}
.tab .tab-num { opacity: .65; font-weight: 900; margin-right: 4px; }
@media (max-width: 470px) { .tab .tab-num { display: none; } }
.tab.done::after { content: "★"; margin-left: 6px; color: var(--amber); }
.tab.active.done::after { color: #05121a; }

.tabpanel { animation: screenIn .28s ease both; }
.tabpanel[hidden] { display: none; }

.lesson-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 30px; padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.btn-next { margin-left: auto; }

/* result card after a challenge */
.result-card {
  text-align: center;
  padding: clamp(20px, 5vw, 32px);
  margin-bottom: var(--gap);
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--step) 45%, transparent);
  background:
    radial-gradient(70% 120% at 50% -20%, color-mix(in srgb, var(--step) 22%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012));
  box-shadow: var(--shadow);
}
.result-stars { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.result-title { margin: 0 0 .3em; font-size: clamp(1.3rem, 4.6vw, 1.9rem); }
.result-msg { color: var(--ink-2); margin: 0 auto 1.2rem; max-width: 46ch; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.star-pop { animation: starPop .5s cubic-bezier(.18, .9, .3, 1.4) both; }
@keyframes starPop {
  0%   { transform: scale(.2) rotate(-25deg); opacity: 0; }
  70%  { transform: scale(1.18) rotate(4deg); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* --------------------------------------------------------------------------
   10. Widget — keyboard  (.lk*)
   -------------------------------------------------------------------------- */
.lk {
  --lk-key-w: 36px;
  --lk-h: 132px;
  position: relative;
  margin: 0 0 var(--gap);
  border-radius: var(--r);
  background: linear-gradient(180deg, #0a0f1a, #060a12);
  border: 1px solid var(--line);
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), var(--shadow-sm);
}
@media (min-width: 560px) { .lk { --lk-key-w: 46px; --lk-h: 160px; } }

.lk-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.lk-scroll::-webkit-scrollbar { height: 6px; }
.lk-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

.lk-keys {
  position: relative;
  display: flex;
  height: var(--lk-h);
  align-items: stretch;
  user-select: none;
  -webkit-user-select: none;
}

.lk-key {
  position: relative;
  min-height: 0;
  padding: 0;
  border-radius: 0 0 7px 7px;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .07s linear, box-shadow .12s ease, transform .07s ease;
}
.lk-key.white {
  flex: 1 0 auto;
  border: 1px solid #0b1220;
  border-top: 0;
  background: linear-gradient(180deg, #f2f7ff 0%, #dbe6f5 78%, #b9c8de 100%);
  color: #40506a;
  z-index: 1;
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .12);
}
.lk-key.black {
  position: absolute;
  top: 0;
  height: 62%;
  border: 1px solid #000;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #2b3547 0%, #131a26 62%, #070b12 100%);
  color: #cfe0f5;
  z-index: 3;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .6);
}
.lk-key.white:hover  { background: linear-gradient(180deg, #ffffff, #e6effc 80%, #c5d3e7); }
.lk-key.black:hover  { background: linear-gradient(180deg, #3a465c, #1a2231 70%, #0a1018); }

.lk-key.on, .lk-key.white.on {
  background: linear-gradient(180deg, #b9f6ff, #6fe6ff 70%, #2fd0f0);
  box-shadow: 0 0 22px rgba(0, 229, 255, .6), inset 0 -4px 8px rgba(0, 0, 0, .18);
  transform: translateY(1px);
}
.lk-key.black.on {
  background: linear-gradient(180deg, #2ecfee, #0d97b8 70%, #075f76);
  box-shadow: 0 0 20px rgba(0, 229, 255, .6);
}

.lk-key.hl, .lk-key.white.hl {
  background: linear-gradient(180deg, #fff0f6, #ffbcd6 74%, #ff8fbc);
  box-shadow: inset 0 0 0 2px var(--pink), 0 0 18px rgba(255, 61, 129, .45);
}
.lk-key.black.hl {
  background: linear-gradient(180deg, #ff6ea5, #c22764 70%, #7c1440);
  box-shadow: 0 0 18px rgba(255, 61, 129, .55);
}

.lk-key.root, .lk-key.white.root {
  background: linear-gradient(180deg, #eafff4, #a8f5cf 74%, #6fe0ae);
  box-shadow: inset 0 0 0 2px var(--ok), 0 0 18px rgba(57, 224, 138, .4);
}
.lk-key.black.root { background: linear-gradient(180deg, #46e6a1, #1a9c68 70%, #0d5d3e); }

.lk-key.good, .lk-key.white.good { background: linear-gradient(180deg, #e9fff4, #8ef0c1 80%, #4fd79c); }
.lk-key.bad,  .lk-key.white.bad  { background: linear-gradient(180deg, #ffecef, #ffa3b2 80%, #ef6b80); }
.lk-key.black.good { background: linear-gradient(180deg, #3ddb9b, #12805a); }
.lk-key.black.bad  { background: linear-gradient(180deg, #ff6e85, #93233a); }

.lk-key.dimmed { opacity: .42; }
.lk-key[aria-disabled="true"] { cursor: default; }

.lk-label {
  position: absolute;
  left: 0; right: 0; bottom: 7px;
  text-align: center;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .01em;
  pointer-events: none;
}
.lk-key.black .lk-label { bottom: 5px; font-size: .62rem; color: #d5e6fb; }
.lk-oct { display: block; font-size: .6rem; font-weight: 700; opacity: .55; }
.lk-key.white .lk-note-c { color: var(--pink); }

.lk-nav {
  position: absolute;
  top: 50%;
  width: 34px; height: 46px;
  min-height: 46px;
  margin-top: -23px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 20, .88);
  color: var(--ink);
  z-index: 5;
  font-size: 1rem;
}
.lk-nav.prev { left: 3px; }
.lk-nav.next { right: 3px; }
.lk-nav[hidden] { display: none; }
/* when the arrows are needed, pad the frame so they never cover a key */
.lk.has-nav { padding-left: 42px; padding-right: 42px; }

.lk-legend {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 10px; font-size: .8rem; color: var(--ink-3);
}
.lk-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* --------------------------------------------------------------------------
   11. Widget — staff  (.lstaff*)
   -------------------------------------------------------------------------- */
.lstaff {
  margin: 0 0 var(--gap);
  padding: 8px 6px;
  border-radius: var(--r);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.lstaff::-webkit-scrollbar { height: 6px; }
.lstaff::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.lstaff-svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }

.lstaff-line   { stroke: rgba(232, 242, 255, .42); stroke-width: 1.4; }
.lstaff-ledger { stroke: rgba(232, 242, 255, .55); stroke-width: 1.6; stroke-linecap: round; }
.lstaff-bar    { stroke: rgba(232, 242, 255, .38); stroke-width: 1.6; }
.lstaff-bar.end{ stroke-width: 4; }
.lstaff-clef   { stroke: var(--cyan); fill: none; stroke-linecap: round; stroke-linejoin: round;
                 filter: drop-shadow(0 0 5px rgba(0, 229, 255, .45)); }
.lstaff-clef.solid { fill: var(--cyan); stroke: none; }
.lstaff-ts     { fill: var(--ink); font-family: var(--sans); font-weight: 900; text-anchor: middle; }

.lstaff-note   { cursor: pointer; }
.lstaff-note.static { cursor: default; }
.lstaff-head   { fill: var(--ink); stroke: none; transition: fill .15s ease; }
.lstaff-head.hollow { fill: none; stroke: var(--ink); stroke-width: 2.3; }
.lstaff-stem, .lstaff-flag { stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; }
.lstaff-flag   { stroke-width: 2.4; }
.lstaff-acc    { stroke: var(--ink); stroke-width: 1.8; fill: none; stroke-linecap: round; }
.lstaff-dot    { fill: var(--ink); }
.lstaff-rest   { fill: var(--ink-2); stroke: var(--ink-2); }
.lstaff-name   { fill: var(--ink-2); font-family: var(--sans); font-size: 13px; font-weight: 800; text-anchor: middle; }
.lstaff-hit    { fill: transparent; }

.lstaff-note:hover .lstaff-head { fill: var(--cyan); }
.lstaff-note:hover .lstaff-head.hollow { fill: none; stroke: var(--cyan); }

.lstaff-note.hl .lstaff-head { fill: var(--cyan); }
.lstaff-note.hl .lstaff-head.hollow { fill: none; stroke: var(--cyan); }
.lstaff-note.hl .lstaff-stem,
.lstaff-note.hl .lstaff-flag { stroke: var(--cyan); }
.lstaff-note.hl .lstaff-name { fill: var(--cyan); }
.lstaff-note.hl { filter: drop-shadow(0 0 8px rgba(0, 229, 255, .7)); }

.lstaff-note.good .lstaff-head { fill: var(--ok); }
.lstaff-note.good .lstaff-head.hollow { fill: none; stroke: var(--ok); }
.lstaff-note.good .lstaff-stem, .lstaff-note.good .lstaff-flag { stroke: var(--ok); }
.lstaff-note.good { filter: drop-shadow(0 0 8px rgba(57, 224, 138, .75)); }

.lstaff-note.bad .lstaff-head { fill: var(--bad); }
.lstaff-note.bad .lstaff-head.hollow { fill: none; stroke: var(--bad); }
.lstaff-note.bad .lstaff-stem, .lstaff-note.bad .lstaff-flag { stroke: var(--bad); }
.lstaff-note.bad { filter: drop-shadow(0 0 8px rgba(255, 94, 120, .75)); }

.lstaff-note.ghost { opacity: .28; }

/* --------------------------------------------------------------------------
   12. Widget — rhythm bar  (.rbar*)
   -------------------------------------------------------------------------- */
.rbar {
  margin: 0 0 var(--gap);
  padding: 14px;
  border-radius: var(--r);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01));
}
.rbar-track { position: relative; }
.rbar-steps {
  display: grid;
  gap: 6px;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}
.rbar-step {
  position: relative;
  min-height: 58px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--ink-3);
  font-size: .74rem;
  font-weight: 800;
  overflow: hidden;
  touch-action: manipulation;
}
@media (min-width: 560px) { .rbar-step { min-height: 68px; } }
.rbar-step.beat { border-color: var(--line); background: rgba(255, 255, 255, .07); }
.rbar-step.beat::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: rgba(0, 229, 255, .45);
}
.rbar-step.on {
  border-color: transparent;
  background-image: linear-gradient(180deg, #00e5ff, #0aa6c9);
  color: #04121a;
  box-shadow: 0 0 16px rgba(0, 229, 255, .35);
}
.rbar-step.on.accent { background-image: linear-gradient(180deg, #ff8ab6, #ff3d81); box-shadow: 0 0 16px rgba(255, 61, 129, .4); }
.rbar-step.cur { box-shadow: 0 0 0 2px var(--ink) inset, 0 0 20px rgba(255, 255, 255, .25); }
.rbar-step.locked { pointer-events: none; }
.rbar-step .rbar-num { position: absolute; left: 6px; top: 4px; opacity: .7; }

.rbar-head {
  position: absolute;
  top: -6px; bottom: -6px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, .9);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
.rbar.playing .rbar-head { opacity: .95; }
.rbar-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.rbar-bpm { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   13. Widget — meter  (.meter*)
   -------------------------------------------------------------------------- */
.meter {
  position: relative;
  height: 30px;
  margin: 0 0 var(--gap);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  overflow: hidden;
}
.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff3d81, #ffcc66 55%, #39e08a);
  transition: width .28s cubic-bezier(.2, .8, .3, 1);
}
.meter-label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: .84rem; font-weight: 800;
  color: var(--ink);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
  font-variant-numeric: tabular-nums;
}
.meter.slim { height: 12px; }
.meter.slim .meter-label { display: none; }
/* meter.set() toggles .mid at >=50% and .good at >=80% */
.meter.mid { border-color: rgba(255, 204, 102, .5); }
.meter.good {
  border-color: var(--ok);
  box-shadow: 0 0 16px rgba(57, 224, 138, .22);
}
.score-meter { margin-bottom: 8px; }
.score-meter + .tiny { margin-top: -8px; }

/* --------------------------------------------------------------------------
   14. Widget — quiz  (.quiz*)
   -------------------------------------------------------------------------- */
.quiz {
  padding: clamp(16px, 3.6vw, 26px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  box-shadow: var(--shadow-sm);
}
.quiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.quiz-count { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.quiz-dots { display: flex; gap: 5px; margin-left: auto; flex-wrap: wrap; }
.quiz-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.quiz-dot.right { background: var(--ok); box-shadow: 0 0 8px rgba(57, 224, 138, .6); }
.quiz-dot.wrong { background: var(--bad); }
.quiz-dot.cur   { outline: 2px solid var(--cyan); outline-offset: 2px; }

.quiz-prompt { font-size: 1.16rem; font-weight: 700; line-height: 1.45; margin: 0 0 14px; }
.quiz-visual { margin: 0 0 14px; }
.quiz-visual:empty { display: none; }
.quiz-play { margin-bottom: 16px; }

.quiz-choices { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .quiz-choices.cols2 { grid-template-columns: 1fr 1fr; } }

.choice {
  justify-content: flex-start;
  text-align: left;
  min-height: 54px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  width: 100%;
}
.choice .choice-key {
  display: grid; place-items: center;
  width: 26px; height: 26px; flex: 0 0 26px;
  margin-right: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  font-size: .8rem; font-weight: 900; color: var(--ink-2);
}
.choice.correct {
  border-color: var(--ok);
  background-color: rgba(57, 224, 138, .16);
  color: #dcfff0;
  box-shadow: 0 0 18px rgba(57, 224, 138, .22);
}
.choice.wrong {
  border-color: var(--bad);
  background-color: rgba(255, 94, 120, .14);
  color: #ffe2e7;
}
.choice.locked { pointer-events: none; }
.choice.faded { opacity: .45; }
/* the quiz engine wraps every answer in .choice-label — let it wrap instead of
   pushing the button wider than a 320px screen */
.choice .choice-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.quiz-fb {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--r);
  font-weight: 700;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
}
.quiz-fb.right { border-color: rgba(57, 224, 138, .5); background: rgba(57, 224, 138, .1); color: #c9ffe6; }
.quiz-fb.wrong { border-color: rgba(255, 94, 120, .5); background: rgba(255, 94, 120, .1); color: #ffdbe1; }
.quiz-explain { display: block; margin-top: 6px; font-weight: 500; color: var(--ink-2); }
.quiz-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.quiz-next { margin-left: auto; }
.quiz-done { text-align: center; }
.quiz-done .quiz-score { font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 900; line-height: 1; }
.quiz-done .quiz-score .of { color: var(--ink-3); font-size: .45em; }

/* --------------------------------------------------------------------------
   15. Certificate
   -------------------------------------------------------------------------- */
.certificate {
  position: relative;
  text-align: center;
  padding: clamp(24px, 6vw, 46px) clamp(18px, 5vw, 40px);
  border-radius: var(--r-lg);
  border: 2px solid transparent;
  background:
    linear-gradient(#0d1320, #0d1320) padding-box,
    var(--grad) border-box;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.certificate::before {
  content: "";
  position: absolute; inset: 10px;
  border: 1px dashed rgba(232, 242, 255, .16);
  border-radius: 14px;
  pointer-events: none;
}
.cert-seal {
  width: 74px; height: 74px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #05121a;
  font-size: 1.9rem; font-weight: 900;
  box-shadow: 0 0 30px rgba(124, 77, 255, .5);
}
.cert-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-3); }
.cert-title {
  margin: .3em 0 .1em;
  font-size: clamp(1.5rem, 6vw, 2.4rem);
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cert-name {
  margin: .5rem 0;
  font-size: clamp(1.2rem, 4.6vw, 1.7rem);
  font-weight: 800;
  border-bottom: 1px solid var(--line);
  display: inline-block;
  padding: 0 1.2rem .3rem;
  min-width: 12ch;
}
.cert-line { color: var(--ink-2); margin: .6rem auto; max-width: 44ch; }
.cert-stars { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0; }
.cert-foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: .82rem; color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   16. Footer, toast, sound nag
   -------------------------------------------------------------------------- */
.learn-footer {
  flex: 0 0 auto;
  text-align: center;
  padding: 26px 18px calc(30px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
  background: rgba(7, 10, 15, .6);
  color: var(--ink-3);
  font-size: .9rem;
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 14px; }
.foot-nav .foot-link {
  display: inline-flex; align-items: center;
  min-height: var(--tap);
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--ink-2);
  font-weight: 700;
}
.foot-nav .foot-link:hover { color: var(--cyan); border-color: rgba(0, 229, 255, .45); }
.foot-credit { margin: 0 0 4px; }
.foot-credit a { border-bottom-color: rgba(0, 229, 255, .25); }
.foot-sep { margin: 0 6px; opacity: .5; }
.foot-motto { margin: 0; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; opacity: .55; }

#toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(94vw, 460px);
}
.ltoast {
  pointer-events: auto;
  max-width: 100%;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(14, 20, 32, .96);
  color: var(--ink);
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
  box-shadow: var(--shadow);
  animation: toastIn .26s ease both;
}
.ltoast.out { animation: toastOut .3s ease both; }
.ltoast.good { border-color: rgba(57, 224, 138, .55); color: #d4ffe9; }
.ltoast.bad  { border-color: rgba(255, 94, 120, .55); color: #ffdde2; }
.ltoast.star { border-color: rgba(255, 204, 102, .6); color: #fff1d2; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to   { opacity: 0; transform: translateY(10px) scale(.97); } }

#learn-sound-nag {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 70;
  border-color: transparent;
  background-image: var(--grad);
  color: #05121a;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
#learn-sound-nag[hidden] { display: none; }

/* --------------------------------------------------------------------------
   17. Misc lesson helpers
   -------------------------------------------------------------------------- */
.beat-dots { display: flex; gap: 10px; flex-wrap: wrap; }
.beat-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line2, var(--line));
  background: rgba(255, 255, 255, .05);
  transition: transform .09s ease, background-color .09s ease, box-shadow .12s ease;
}
.beat-dot.on {
  background: var(--cyan);
  border-color: var(--cyan);
  transform: scale(1.22);
  box-shadow: 0 0 18px rgba(0, 229, 255, .6);
}
.beat-dot.accent.on { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 18px rgba(255, 61, 129, .6); }

.note-value-bar {
  display: flex; align-items: center;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(0, 229, 255, .55), rgba(124, 77, 255, .45));
  border: 1px solid rgba(0, 229, 255, .5);
  color: #04121a;
  font-weight: 900;
  padding: 0 10px;
  min-width: 44px;
}

.big-number {
  font-size: clamp(2.4rem, 11vw, 4rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.flash-good { animation: flashGood .5s ease both; }
.flash-bad  { animation: flashBad .5s ease both; }
@keyframes flashGood { 0%, 100% { box-shadow: none; } 40% { box-shadow: 0 0 0 3px var(--ok), 0 0 26px rgba(57, 224, 138, .55); } }
@keyframes flashBad  { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 60% { transform: translateX(5px); } }

.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* --------------------------------------------------------------------------
   18. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .station:hover, .station:focus-visible { transform: none; }
  .path::before, .progress-ring .ring-arc { box-shadow: none; }
}

/* --------------------------------------------------------------------------
   19. Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  :root { --gap: 14px; }
  body { font-size: 16px; }
  .learn-header { padding-left: 10px; padding-right: 10px; }
  .brand-name em { display: none; }
  .station { padding: 13px 13px; gap: 11px; min-height: 84px; }
  .station-num { width: 46px; height: 46px; flex-basis: 46px; font-size: 1.25rem; border-radius: 14px; }
  .tab { min-width: 76px; font-size: .9rem; padding: 8px 8px; }
  .btn, button { padding: 10px 14px; font-size: .93rem; }
}

@media print {
  .learn-header, .learn-footer, .tabs, .lesson-foot, #toast-root, #learn-sound-nag { display: none !important; }
  body { background: #fff; color: #000; }
  .certificate { border-color: #333; background: #fff; color: #000; }
  .cert-title, .banner-title { color: #000 !important; -webkit-text-fill-color: #000; }
}
