:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #17201a;
  --muted: #5b665f;
  --panel: #ffffff;
  --line: #e6e8e3;
  --green: #00b894;
  --green-dark: #008568;
  --mint: #dff5e8;
  --gold: #ffc83d;
  --coral: #ff5c5c;
  --teal: #16a3f5;
  --plum: #7c5cff;
  --blue: #1da1f2;
  --violet: #b66dff;
  --level1-accent: #00b894;
  --level1-bright: #00c6a7;
  --level1-soft: #e8f8f2;
  --level1-shadow: #008568;
  --trail-path: #008568;
  --trail-bed: #b8eadb;
  --level2-accent: #16a3f5;
  --level2-bright: #35c7ff;
  --level2-soft: #e9f5ff;
  --level2-shadow: #0b6ea4;
  --level3-accent: #7c5cff;
  --level3-bright: #b66dff;
  --level3-soft: #f0ebff;
  --level3-shadow: #5134b5;
  --level4-accent: #ff5c5c;
  --level4-bright: #ff9f7a;
  --level4-soft: #fff0ee;
  --level4-shadow: #c84939;
  --active-level-accent: var(--level1-accent);
  --active-level-bright: var(--level1-bright);
  --active-level-soft: var(--level1-soft);
  --active-level-shadow: var(--level1-shadow);
  --shadow: 0 16px 36px rgba(19, 31, 29, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-level="level2"] {
  --active-level-accent: var(--level2-accent);
  --active-level-bright: var(--level2-bright);
  --active-level-soft: var(--level2-soft);
  --active-level-shadow: var(--level2-shadow);
  --trail-path: #0b6ea4;
  --trail-bed: #b9e6ff;
}

body[data-level="level3"] {
  --active-level-accent: var(--level3-accent);
  --active-level-bright: var(--level3-bright);
  --active-level-soft: var(--level3-soft);
  --active-level-shadow: var(--level3-shadow);
  --trail-path: #5134b5;
  --trail-bed: #d9ceff;
}

body[data-level="level4"] {
  --active-level-accent: var(--level4-accent);
  --active-level-bright: var(--level4-bright);
  --active-level-soft: var(--level4-soft);
  --active-level-shadow: var(--level4-shadow);
  --trail-path: #c84939;
  --trail-bed: #ffd0ca;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
textarea,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 14px;
  border-right: 2px solid #ededed;
  background: #fff;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 4px 28px;
  overflow: visible;
}

.sidebar-brand[data-home-trigger],
.brand[data-home-trigger] {
  cursor: pointer;
  border-radius: 8px;
}

.sidebar-brand[data-home-trigger]:focus-visible,
.brand[data-home-trigger]:focus-visible {
  outline: 3px solid rgba(25, 166, 255, 0.45);
  outline-offset: 4px;
}

.sidebar-brand[data-home-trigger]:hover h1,
.brand[data-home-trigger]:hover h1 {
  color: var(--green-dark);
}

.sidebar-brand .brand-mark {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
}

.sidebar-brand > div {
  min-width: 0;
}

.sidebar-brand .eyebrow {
  font-size: 0.68rem;
}

.sidebar-brand h1 {
  max-width: 100%;
  margin-bottom: 0;
  color: var(--green);
  font-size: 1.32rem;
  line-height: 1;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.sidebar-nav {
  display: grid;
  gap: 12px;
}

.side-nav-button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: #666f6a;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

.side-nav-button.active {
  border-color: #8bd7ff;
  background: #eaf7ff;
  color: #1689d7;
}

.nav-glyph,
.quest-glyph {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--green);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.1);
}

.learn-glyph {
  background: #ffca3a;
}

.learn-glyph::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: #ff5c5c;
  transform: rotate(45deg);
}

.review-glyph {
  background: linear-gradient(135deg, var(--green) 0 50%, #2bdac2 50% 100%);
}

.guide-glyph {
  background: linear-gradient(135deg, #ffd33d 0 50%, #ff9f1a 50% 100%);
}

.profile-glyph {
  border: 3px dashed #b6bdb9;
  background: transparent;
}

.profile-glyph::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--coral);
  transform: translate(12px, -12px);
}

.xp-glyph {
  background: var(--gold);
}

.xp-glyph::before {
  content: "";
  width: 8px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  transform: rotate(28deg);
}

.app-main-shell {
  min-width: 0;
  padding: 18px 22px 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  line-height: 1.05;
}

.stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quick-sound-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sound-icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #dbe7e2;
  border-radius: 999px;
  background: #f7faf8;
  color: var(--green-dark);
  box-shadow: 0 3px 0 #e4ece8;
}

.sound-icon-button.active {
  border-color: #ffb7ad;
  background: #fff3f0;
  color: #a72719;
  box-shadow: 0 3px 0 #ffd1ca;
}

.sound-icon-button.active::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-38deg);
}

.sound-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
}

.speaker-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 7px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
}

.speaker-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  width: 12px;
  height: 14px;
  background: currentColor;
  clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 70%);
}

.music-icon::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 2px;
  width: 5px;
  height: 16px;
  border-radius: 999px;
  background: currentColor;
}

.music-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 2px;
  width: 12px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 9px -15px 0 -2px currentColor;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: #f7faf8;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.stat::before {
  content: "";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 3px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.stat:nth-child(1)::before {
  background: var(--teal);
  clip-path: polygon(50% 4%, 86% 24%, 86% 72%, 50% 96%, 14% 72%, 14% 24%);
}

.stat:nth-child(2)::before {
  background: var(--gold);
  border-radius: 999px 999px 999px 4px;
  transform: rotate(-24deg);
}

.stat:nth-child(3)::before {
  background: var(--green);
  border-radius: 7px;
}

.stat strong {
  color: var(--ink);
}

.hearts {
  color: var(--coral);
  font-weight: 900;
}

.hearts::before {
  content: "♥";
  width: auto;
  height: auto;
  margin-right: 4px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--coral);
  font-size: 1.45rem;
  line-height: 1;
}

@media (min-width: 721px) {
  .topbar .brand {
    display: none;
  }
}

body:not([data-view="path"]) .hero-strip,
body:not([data-view="path"]) .right-rail {
  display: none;
}

body:not([data-view="path"]) .learn-layout {
  grid-template-columns: minmax(0, 980px);
}

.learn-layout {
  display: grid;
  grid-template-columns: minmax(360px, 780px) minmax(260px, 340px);
  gap: 28px;
  justify-content: center;
  align-items: start;
}

.learn-column {
  min-width: 0;
}

.hero-strip {
  display: grid;
  gap: 28px;
  min-height: 640px;
  padding: 0 0 28px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: visible;
}

.hero-copy {
  padding: 20px 22px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--active-level-accent) 0%, var(--active-level-bright) 100%);
  color: #fff;
  box-shadow: 0 8px 0 var(--active-level-shadow);
}

.hero-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.05;
}

.hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.hero-copy p:last-child {
  max-width: 64ch;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
}

.hero-map {
  position: relative;
  min-height: var(--path-min-height, 620px);
  border-radius: 0;
  overflow: visible;
  background:
    radial-gradient(ellipse at 50% 98%, rgba(87, 60, 34, 0.06), transparent 26%),
    radial-gradient(ellipse at 42% 50%, rgba(164, 211, 194, 0.09), transparent 30%),
    radial-gradient(ellipse at 60% 18%, rgba(255, 244, 214, 0.18), transparent 22%),
    linear-gradient(180deg, #fff 0%, #fbfcfa 100%);
}

.map-art {
  display: none;
}

.trail-line {
  position: absolute;
  left: 23%;
  top: 2%;
  z-index: 1;
  width: 54%;
  height: 96%;
  overflow: visible;
  pointer-events: none;
}

.trail-line path,
.trail-line line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trail-bed {
  stroke: rgba(74, 49, 28, 0.08);
  stroke-width: 16;
  opacity: 0.88;
  filter:
    drop-shadow(0 4px 0 rgba(74, 49, 28, 0.05))
    drop-shadow(0 10px 14px rgba(74, 49, 28, 0.06))
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.96));
}

.bridge-deck-shadow {
  stroke: rgba(50, 32, 18, 0.11);
  stroke-width: 8;
  opacity: 0.62;
  transform: translate(1.2px, 1px);
  filter: blur(0.2px);
}

.bridge-planks {
  filter:
    drop-shadow(0 0.8px 0 rgba(82, 55, 33, 0.56))
    drop-shadow(0 3px 5px rgba(80, 50, 22, 0.14));
}

.bridge-plank {
  opacity: 0.82;
}

.bridge-plank-body {
  stroke-width: 3.8;
  stroke-linecap: round;
}

.bridge-wood-a {
  stroke: url("#bridgeWoodA");
}

.bridge-wood-b {
  stroke: url("#bridgeWoodB");
}

.bridge-plank-grain {
  stroke: rgba(70, 48, 32, 0.34);
  stroke-width: 0.48;
  stroke-linecap: round;
}

.bridge-knot {
  fill: #5f452f;
  stroke: rgba(214, 178, 132, 0.64);
  stroke-width: 0.34;
  transform: scale(0.68);
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0.5px 0 rgba(48, 28, 14, 0.2));
}

.bridge-rope {
  stroke: url("#bridgeRopeGradient");
  stroke-width: 2.4;
  opacity: 0.84;
  filter: drop-shadow(0 1.5px 0 rgba(60, 37, 20, 0.12));
}

.bridge-rope-left {
  opacity: 0.98;
}

.bridge-rope-right {
  opacity: 0.94;
}

.bridge-rope-texture {
  stroke: rgba(218, 190, 151, 0.46);
  stroke-width: 0.62;
  stroke-dasharray: 1 4;
  opacity: 0.72;
}

.trail-dots {
  stroke: rgba(73, 43, 22, 0.42);
  stroke-width: 1.05;
  stroke-dasharray: 0.3 7.7;
  opacity: 0.62;
  filter: drop-shadow(0 0.5px 0 rgba(255, 230, 178, 0.48));
}

.trail-coach {
  position: absolute;
  right: 12%;
  top: 35%;
  width: 132px;
  height: 166px;
  pointer-events: none;
  filter: drop-shadow(0 14px 0 rgba(23, 32, 26, 0.08));
}

.trail-coach::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 20px;
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: linear-gradient(145deg, #19d3b0, #19a6ff 62%, #7c5cff);
  box-shadow:
    inset 0 -10px 0 rgba(0, 0, 0, 0.13),
    0 0 0 8px #eaf9f6;
}

.trail-coach::after {
  content: "";
  position: absolute;
  left: 43px;
  top: 48px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    34px 0 0 #fff,
    17px 28px 0 3px rgba(255, 255, 255, 0.9),
    17px -36px 0 -2px var(--gold);
}

.coach-spark {
  position: absolute;
  left: 16px;
  bottom: 18px;
  width: 98px;
  height: 42px;
  border-radius: 999px;
  background: #eaf9f6;
  box-shadow:
    -12px 18px 0 -9px var(--gold),
    62px 12px 0 -8px var(--coral);
}

.picture-path {
  --level-accent: var(--active-level-accent);
  --level-soft: var(--active-level-soft);
  --node-shadow: var(--active-level-shadow);
  position: absolute;
  inset: 0;
  z-index: 2;
}

.picture-step {
  --level-accent: var(--active-level-accent);
  --level-soft: var(--active-level-soft);
  --node-shadow: var(--active-level-shadow);
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: clamp(40px, 3.2vw, 50px);
  height: clamp(40px, 3.2vw, 50px);
  border: 4px solid #fff;
  border-radius: 999px;
  background: var(--level-accent);
  color: #fff;
  z-index: 3;
  transform: translate(-50%, -50%);
  box-shadow:
    0 6px 0 var(--node-shadow),
    0 11px 20px rgba(23, 32, 26, 0.14);
  font-weight: 900;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.picture-step[data-level="level2"] {
  --level-accent: var(--level2-accent);
  --level-soft: var(--level2-soft);
  --node-shadow: var(--level2-shadow);
}

.picture-step[data-level="level3"] {
  --level-accent: var(--level3-accent);
  --level-soft: var(--level3-soft);
  --node-shadow: var(--level3-shadow);
}

.picture-step[data-level="level4"] {
  --level-accent: var(--level4-accent);
  --level-soft: var(--level4-soft);
  --node-shadow: var(--level4-shadow);
}

.path-node-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 42%;
  height: 42%;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  clip-path: polygon(50% 3%, 61% 35%, 95% 35%, 67% 55%, 78% 90%, 50% 69%, 22% 90%, 33% 55%, 5% 35%, 39% 35%);
  box-shadow: none;
}

.picture-step:hover {
  transform: translate(-50%, calc(-50% - 3px));
  filter: saturate(1.08);
  box-shadow:
    0 7px 0 var(--node-shadow),
    0 13px 22px rgba(23, 32, 26, 0.18);
}

.picture-step.completed {
  background: var(--level-accent);
}

.picture-step.completed .path-node-core {
  width: 42%;
  height: 42%;
  border-radius: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.96);
  clip-path: polygon(50% 3%, 61% 35%, 95% 35%, 67% 55%, 78% 90%, 50% 69%, 22% 90%, 33% 55%, 5% 35%, 39% 35%);
  box-shadow: none;
  transform: none;
}

.picture-step.current {
  border-color: #fff;
  background: var(--level-accent);
  z-index: 4;
  box-shadow:
    0 0 0 5px var(--level-soft),
    0 6px 0 var(--node-shadow),
    0 12px 24px rgba(23, 32, 26, 0.18);
}

.picture-step.current .path-node-core {
  width: 42%;
  height: 42%;
  margin-left: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  clip-path: polygon(50% 3%, 61% 35%, 95% 35%, 67% 55%, 78% 90%, 50% 69%, 22% 90%, 33% 55%, 5% 35%, 39% 35%);
  box-shadow: none;
}

.path-start-label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  bottom: auto;
  min-width: 66px;
  padding: 8px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--active-level-shadow);
  transform: translateY(-50%);
  box-shadow: 0 4px 0 #dfe5dc;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
}

.path-start-label::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  bottom: auto;
  width: 12px;
  height: 12px;
  border-left: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: #fff;
  transform: translateY(-50%) rotate(45deg);
}

.path-node-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 8;
  display: grid;
  gap: 3px;
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 8px 10px;
  border: 1px solid rgba(65, 79, 71, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(23, 32, 26, 0.14);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 6px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.path-tooltip-meta {
  color: var(--active-level-shadow);
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.path-tooltip-title {
  color: var(--ink);
  font-size: 0.82rem;
}

.path-node-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  width: 8px;
  height: 8px;
  border-right: 1px solid rgba(65, 79, 71, 0.18);
  border-bottom: 1px solid rgba(65, 79, 71, 0.18);
  background: rgba(255, 255, 255, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.picture-step:hover .path-node-tooltip,
.picture-step:focus-visible .path-node-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.picture-step.locked {
  background: #9aa39c;
  --node-shadow: #6e7770;
  filter: saturate(0.55);
}

.picture-step.locked .path-node-core {
  width: 12px;
  height: 11px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.picture-step.locked .path-node-core::before {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  transform: translateY(-10px);
}

.right-rail {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 18px;
}

.rail-card {
  padding: 18px;
  border: 2px solid #ececec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 0 #eeeeee;
}

.rail-card h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.rail-card p {
  color: var(--muted);
  line-height: 1.45;
}

.coach-card {
  background:
    radial-gradient(circle at 88% 18%, rgba(124, 92, 255, 0.22), transparent 18%),
    #fff;
}

.rail-pill {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rail-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2ef;
}

.rail-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 180ms ease;
}

.rail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rail-card-header h2 {
  margin-bottom: 0;
}

.quest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 0;
  color: var(--ink);
}

.view-tabs {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
}

.tab.active {
  border-color: var(--green);
  background: var(--mint);
  color: var(--green-dark);
  box-shadow: inset 0 -3px 0 rgba(23, 154, 105, 0.2);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.module-band {
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
}

.lesson-drawer {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 0 #e5e9e3;
}

.lesson-drawer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 900;
  list-style: none;
}

.lesson-drawer-summary::-webkit-details-marker {
  display: none;
}

.lesson-drawer-summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #eef8f7;
  color: var(--green-dark);
  font-size: 1.2rem;
}

.lesson-drawer[open] .lesson-drawer-summary::after {
  content: "-";
}

.lesson-drawer > .jump-panel,
.lesson-drawer > .module-band,
.lesson-drawer > .progress-list {
  margin-right: 16px;
  margin-left: 16px;
}

.lesson-drawer > .module-band:last-child,
.lesson-drawer > .progress-list:last-child {
  margin-bottom: 16px;
}

.level-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.level-tab {
  --level-accent: var(--level1-accent);
  --level-soft: var(--level1-soft);
  --level-shadow: var(--level1-shadow);
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--level-accent);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 900;
  text-align: left;
}

.level-tab[data-level="level2"] {
  --level-accent: var(--level2-accent);
  --level-soft: var(--level2-soft);
  --level-shadow: var(--level2-shadow);
}

.level-tab[data-level="level3"] {
  --level-accent: var(--level3-accent);
  --level-soft: var(--level3-soft);
  --level-shadow: var(--level3-shadow);
}

.level-tab[data-level="level4"] {
  --level-accent: var(--level4-accent);
  --level-soft: var(--level4-soft);
  --level-shadow: var(--level4-shadow);
}

.level-tab strong,
.level-subtitle {
  display: block;
}

.level-subtitle {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.25;
}

.level-tab small {
  color: var(--muted);
  font-weight: 800;
}

.level-tab.active {
  border-color: var(--level-accent);
  background: var(--level-soft);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--level-shadow) 20%, transparent);
}

.level-progress {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebe2;
}

.level-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--level-accent);
}

.jump-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #c8e2df;
  border-radius: 8px;
  background: #eef8f7;
  box-shadow: 0 6px 16px rgba(20, 40, 28, 0.08);
}

.jump-panel h2 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.jump-panel p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.jump-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.jump-controls select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.module-heading {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.module-number {
  --level-accent: var(--active-level-accent);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--level-accent);
  color: white;
  font-weight: 900;
}

.module-band[data-level="level2"] .module-number {
  --level-accent: var(--level2-accent);
}

.module-band[data-level="level3"] .module-number {
  --level-accent: var(--level3-accent);
}

.module-band[data-level="level4"] .module-number {
  --level-accent: var(--level4-accent);
}

.module-heading h2 {
  margin-bottom: 4px;
  font-size: 1.12rem;
}

.module-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.lesson-path {
  display: grid;
  gap: 12px;
}

.lesson-node {
  --level-accent: var(--active-level-accent);
  --level-soft: var(--active-level-soft);
  --level-shadow: var(--active-level-shadow);
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  width: min(620px, 100%);
  min-height: 76px;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--panel);
  text-align: left;
  box-shadow: 0 5px 0 #cfd7cc;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.lesson-node:nth-child(even) {
  margin-left: min(14vw, 96px);
}

.lesson-node:nth-child(3n) {
  margin-left: min(7vw, 46px);
}

.lesson-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #c2d5ca;
  border-color: var(--level-accent);
}

.lesson-node.locked {
  background: #eef1ec;
  box-shadow: 0 5px 0 #d7ddd5;
}

.lesson-node.completed {
  background: var(--level-soft);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--level-shadow) 30%, #cfd7cc);
}

.lesson-node.current {
  border-color: var(--level-accent);
  background: var(--level-soft);
}

.lesson-node.current::after {
  content: "Next";
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--level-accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
}

.node-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--level-accent);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.14);
}

.lesson-node[data-level="level2"] {
  --level-accent: var(--level2-accent);
  --level-soft: var(--level2-soft);
  --level-shadow: var(--level2-shadow);
}

.lesson-node[data-level="level3"] {
  --level-accent: var(--level3-accent);
  --level-soft: var(--level3-soft);
  --level-shadow: var(--level3-shadow);
}

.lesson-node[data-level="level4"] {
  --level-accent: var(--level4-accent);
  --level-soft: var(--level4-soft);
  --level-shadow: var(--level4-shadow);
}

.lesson-node.locked .node-icon {
  background: #8b958d;
}

.node-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.98rem;
}

.node-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.profile-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}

.profile-main-column,
.profile-side-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.profile-hero-card {
  display: grid;
  gap: 12px;
}

.profile-cover {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 220px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 52% 28%, rgba(255, 255, 255, 0.95) 0 9%, transparent 10%),
    linear-gradient(135deg, #dff5ff 0%, #c9f0ff 54%, #e7f8f2 100%);
}

.profile-cover.custom-cover {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.02), rgba(23, 32, 26, 0.22)),
    var(--profile-cover-image) center / cover no-repeat;
}

.profile-cover::before {
  content: "";
  position: absolute;
  inset: 24px 22% -36px;
  border: 4px dashed #27a9ef;
  border-bottom: 0;
  border-radius: 46% 46% 0 0;
  opacity: 0.9;
}

.profile-cover.custom-cover::before,
.profile-cover.custom-cover .profile-neural-cloud {
  display: none;
}

.profile-neural-cloud {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 168px;
  height: 118px;
  border-radius: 60px;
  background: #76cdf0;
  transform: translateX(-50%);
  box-shadow:
    -56px 56px 0 -28px #76cdf0,
    54px 56px 0 -28px #76cdf0,
    -28px 20px 0 3px #76cdf0,
    32px 18px 0 7px #76cdf0;
}

.profile-neural-cloud::before,
.profile-neural-cloud::after {
  content: "";
  position: absolute;
  display: none;
  background: #fff;
}

.profile-neural-cloud::before {
  left: 76px;
  top: 44px;
  width: 6px;
  height: 36px;
  border-radius: 999px;
  box-shadow: 0 0 0 0 #fff;
}

.profile-neural-cloud::after {
  left: 61px;
  top: 59px;
  width: 36px;
  height: 6px;
  border-radius: 999px;
}

.profile-cover-upload-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  color: #fff;
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
  transform: translate(-50%, -50%);
  text-shadow: 0 2px 0 rgba(23, 32, 26, 0.08);
}

.profile-cover-upload-button:hover,
.profile-cover-upload-button:focus-visible {
  background: rgba(255, 255, 255, 0.45);
  outline: 3px solid rgba(39, 169, 239, 0.45);
  cursor: pointer;
}

.profile-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-bottom: -32px;
  border: 6px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--active-level-accent), var(--active-level-bright));
  color: #fff;
  box-shadow: 0 8px 0 rgba(23, 32, 26, 0.1);
  font-size: 2.4rem;
  font-weight: 1000;
}

.profile-avatar-button {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.profile-avatar-button::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 3px 0 rgba(23, 32, 26, 0.16);
}

.profile-avatar-button:hover,
.profile-avatar-button:focus-visible {
  outline: 3px solid rgba(39, 169, 239, 0.5);
  outline-offset: 4px;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.profile-edit-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 3px solid rgba(23, 32, 26, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: transparent;
  box-shadow: inset 0 -4px 0 rgba(23, 32, 26, 0.06);
}

.profile-edit-button:hover,
.profile-edit-button:focus-visible {
  background: rgba(255, 255, 255, 0.82);
  outline: 3px solid rgba(39, 169, 239, 0.45);
  cursor: pointer;
}

.profile-edit-button::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 15px;
  width: 9px;
  height: 28px;
  border-radius: 999px;
  background: #4b5550;
  transform: rotate(42deg);
}

.profile-edit-button::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 14px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #4b5550;
  transform: rotate(42deg);
}

.profile-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: -2px;
  padding-top: 0;
}

.profile-name-block h2 {
  margin-bottom: 4px;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  line-height: 1;
}

.profile-handle,
.profile-joined {
  margin-bottom: 3px;
  color: #8b918e;
  font-weight: 800;
}

.profile-skill-chips {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.profile-skill-chips span {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--active-level-soft);
  color: var(--active-level-shadow);
  font-size: 0.82rem;
  font-weight: 1000;
}

.profile-completion-line {
  display: grid;
  gap: 8px;
  padding-top: 6px;
  border-top: 2px solid #ecefec;
  color: var(--muted);
  font-weight: 900;
}

.profile-completion-meter {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2ef;
}

.profile-completion-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--active-level-accent);
}

.profile-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-media-status {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 900;
}

.profile-media-status:empty {
  display: none;
}

.profile-media-status.good {
  color: var(--green);
}

.profile-media-status.bad {
  color: #b3261e;
}

.profile-media-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.profile-media-dialog::backdrop {
  background: rgba(23, 32, 26, 0.36);
}

.profile-media-dialog-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 2px solid #ecefec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 0 rgba(23, 32, 26, 0.12);
}

.profile-media-dialog-card h2 {
  margin-bottom: 0;
}

.profile-media-dialog-card p {
  margin-bottom: 2px;
  color: var(--muted);
  line-height: 1.45;
}

.profile-media-dialog-card .secondary-button,
.profile-media-dialog-card .ghost-button {
  width: 100%;
}

.ghost-button {
  border: 2px solid #e3e7e4;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  box-shadow: 0 4px 0 #edf0ed;
  font-weight: 1000;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  color: var(--ink);
  outline: 3px solid rgba(39, 169, 239, 0.3);
}

.profile-stat-section h2 {
  margin-bottom: 10px;
  font-size: 1.55rem;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-stat-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  gap: 3px 12px;
  align-items: center;
  min-height: 82px;
  padding: 14px;
  border: 2px solid #ecefec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 0 #edf0ed;
}

.profile-stat-icon {
  position: relative;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-radius: 14px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.75) 0 9px, transparent 10px),
    var(--active-level-soft);
  color: var(--active-level-accent);
  box-shadow:
    0 4px 0 color-mix(in srgb, var(--active-level-accent) 28%, transparent),
    0 8px 14px rgba(23, 32, 26, 0.1);
}

.profile-stat-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
}

.profile-stat-icon.streak::before {
  border-radius: 60% 60% 60% 8px;
  transform: rotate(-35deg);
}

.profile-stat-icon.xp::before {
  clip-path: polygon(48% 0, 80% 0, 62% 39%, 94% 39%, 34% 100%, 48% 55%, 16% 55%);
}

.profile-stat-icon.time::before {
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px #fff;
}

.profile-stat-icon.time::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 11px;
  border-radius: 999px;
  background: #fff;
  transform: translate(3px, -2px) rotate(36deg);
  transform-origin: bottom center;
}

.profile-stat-icon.league::before {
  border-radius: 7px;
  clip-path: polygon(50% 0, 88% 14%, 80% 74%, 50% 100%, 20% 74%, 12% 14%);
}

.profile-stat-icon.perfect::before {
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px #fff;
}

.profile-stat-icon.lessons::before {
  border-radius: 4px;
  box-shadow: 7px 7px 0 -2px currentColor;
}

.profile-stat-icon.hearts::before {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  transform: rotate(45deg);
  box-shadow:
    -7px 0 0 currentColor,
    0 -7px 0 currentColor;
}

.profile-stat-card strong {
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
}

.profile-stat-card small {
  color: #8b918e;
  font-weight: 900;
}

.profile-rail-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 2px solid #ecefec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 0 #f0f1ef;
}

.visually-hidden-file {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.profile-tools-heading {
  margin: 10px 0 14px;
  padding: 14px 16px;
  border: 2px solid #dcebe6;
  border-radius: 12px;
  background:
    radial-gradient(circle at 96% 20%, rgba(39, 169, 239, 0.12) 0 36px, transparent 37px),
    #f7fbfa;
  box-shadow: 0 4px 0 #dfece8;
}

.profile-tools-heading h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.profile-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.profile-tool-card {
  position: relative;
  overflow: hidden;
  border-width: 2px;
  border-radius: 12px;
  box-shadow: 0 5px 0 #edf0ed, 0 12px 24px rgba(20, 40, 28, 0.08);
}

.profile-tool-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--active-level-accent);
  opacity: 0.82;
}

.profile-tool-card > * {
  position: relative;
}

.account-panel::before {
  background: #1689d8;
}

.share-panel::before {
  background: #008568;
}

.feedback-panel::before {
  background: #f5a400;
}

.sound-panel::before {
  background: #6a4bd4;
}

.progress-actions-panel::before {
  background: #c84939;
}

.lesson-score-panel::before {
  background: #27a9ef;
}

.profile-tools-grid .feedback-panel,
.profile-tools-grid .lesson-score-panel {
  grid-column: 1 / -1;
}

.profile-panel-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.profile-panel-title {
  min-width: 0;
}

.profile-panel-title .eyebrow {
  margin-bottom: 2px;
}

.profile-panel-header h2 {
  margin-bottom: 0;
}

.profile-panel-icon {
  --panel-icon-bg-start: #e8f8f2;
  --panel-icon-bg-end: #b9f0dc;
  --panel-icon-color: var(--green-dark);
  --panel-icon-shadow: rgba(0, 133, 104, 0.24);
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 3px solid #fff;
  border-radius: 18px 22px 18px 20px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.82) 0 10px, transparent 11px),
    linear-gradient(135deg, var(--panel-icon-bg-start), var(--panel-icon-bg-end));
  color: var(--panel-icon-color);
  box-shadow:
    0 6px 0 var(--panel-icon-shadow),
    0 10px 18px rgba(23, 32, 26, 0.12);
  transform: rotate(-2deg);
}

.profile-panel-icon::before,
.profile-panel-icon::after {
  content: "";
  position: absolute;
  display: block;
  background: currentColor;
}

.profile-panel-icon.account {
  --panel-icon-bg-start: #e9f5ff;
  --panel-icon-bg-end: #9ed7f8;
  --panel-icon-color: #1673b8;
  --panel-icon-shadow: rgba(22, 115, 184, 0.22);
}

.profile-panel-icon.account::before {
  top: 12px;
  left: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.profile-panel-icon.account::after {
  left: 13px;
  bottom: 11px;
  width: 28px;
  height: 18px;
  border-radius: 18px 18px 8px 8px;
}

.profile-panel-icon.share {
  --panel-icon-bg-start: #e8f8f2;
  --panel-icon-bg-end: #9ce8cd;
  --panel-icon-color: #008568;
  --panel-icon-shadow: rgba(0, 133, 104, 0.22);
}

.profile-panel-icon.share::before {
  left: 15px;
  top: 14px;
  width: 29px;
  height: 25px;
  clip-path: polygon(0 44%, 100% 0, 68% 100%, 48% 62%, 26% 82%);
}

.profile-panel-icon.share::after {
  left: 23px;
  top: 22px;
  width: 15px;
  height: 4px;
  border-radius: 999px;
  background: #fff;
  transform: rotate(-24deg);
}

.profile-panel-icon.feedback {
  --panel-icon-bg-start: #fff7d7;
  --panel-icon-bg-end: #ffd56f;
  --panel-icon-color: #b77900;
  --panel-icon-shadow: rgba(183, 121, 0, 0.22);
}

.profile-panel-icon.feedback::before {
  left: 12px;
  top: 15px;
  width: 31px;
  height: 22px;
  border-radius: 12px 12px 12px 5px;
}

.profile-panel-icon.feedback::after {
  left: 19px;
  top: 24px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 9px 0 0 #fff, 18px 0 0 #fff;
}

.profile-panel-icon.sound {
  --panel-icon-bg-start: #f3efff;
  --panel-icon-bg-end: #c8b7ff;
  --panel-icon-color: #6a4bd4;
  --panel-icon-shadow: rgba(106, 75, 212, 0.22);
}

.profile-panel-icon.sound::before {
  left: 13px;
  top: 21px;
  width: 22px;
  height: 16px;
  clip-path: polygon(0 25%, 35% 25%, 100% 0, 100% 100%, 35% 75%, 0 75%);
}

.profile-panel-icon.sound::after {
  right: 10px;
  top: 16px;
  width: 18px;
  height: 22px;
  border: 4px solid currentColor;
  border-left: 0;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 0 999px 999px 0;
  background: transparent;
}

.profile-panel-icon.controls {
  --panel-icon-bg-start: #fff1ee;
  --panel-icon-bg-end: #ffb7ad;
  --panel-icon-color: #c84939;
  --panel-icon-shadow: rgba(200, 73, 57, 0.22);
}

.profile-panel-icon.controls::before {
  left: 15px;
  top: 12px;
  width: 24px;
  height: 31px;
  border-radius: 7px;
  background: currentColor;
}

.profile-panel-icon.controls::after {
  left: 21px;
  top: 22px;
  width: 15px;
  height: 9px;
  border: 4px solid #fff;
  border-top: 0;
  border-right: 0;
  background: transparent;
  transform: rotate(-45deg);
}

.profile-panel-icon.scores {
  --panel-icon-bg-start: #eef8ff;
  --panel-icon-bg-end: #a9ddff;
  --panel-icon-color: #1689d8;
  --panel-icon-shadow: rgba(22, 137, 216, 0.22);
}

.profile-panel-icon.scores::before {
  left: 16px;
  top: 12px;
  width: 23px;
  height: 23px;
  border: 4px solid currentColor;
  border-radius: 50%;
  background: #fff;
}

.profile-panel-icon.scores::after {
  left: 20px;
  top: 18px;
  width: 15px;
  height: 15px;
  background: currentColor;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 92%, 50% 71%, 21% 92%, 32% 57%, 2% 35%, 39% 35%);
}

.profile-panel-icon:hover {
  transform: translateY(-1px) rotate(1deg);
}

@media (max-width: 1120px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-tools-grid {
    grid-template-columns: 1fr;
  }

  .profile-tools-grid .feedback-panel,
  .profile-tools-grid .lesson-score-panel {
    grid-column: auto;
  }

  .profile-side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .profile-cover {
    min-height: 180px;
  }

  .profile-cover::before {
    inset: 24px 14% -28px;
  }

  .profile-identity {
    grid-template-columns: 1fr;
    margin-top: 0;
    padding-top: 0;
  }

  .profile-skill-chips {
    justify-content: flex-start;
  }

  .profile-stat-grid,
  .profile-side-column {
    grid-template-columns: 1fr;
  }

}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

.info-panel,
.review-card,
.guide-card,
.concept-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 6px 16px rgba(20, 40, 28, 0.08);
}

.info-panel h2,
.review-card h2,
.guide-card h2,
.concept-card h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.info-panel p,
.review-card p,
.guide-card p,
.concept-card p {
  color: var(--muted);
  line-height: 1.5;
}

.account-panel {
  display: grid;
  gap: 12px;
}

.account-panel p {
  margin-bottom: 0;
}

.google-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dcebe6;
  border-radius: 8px;
  background: #fbfcfa;
}

.google-user-card strong,
.google-user-card small {
  display: block;
}

.google-user-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.google-avatar,
.google-avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 999px;
}

.google-avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.google-signin-slot {
  min-height: 44px;
}

.google-disabled-login {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #dbe7e2;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  box-shadow: 0 3px 0 #e4ece8;
}

.google-disabled-login:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.account-status {
  font-size: 0.9rem;
}

.google-setup-box {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #f1d58a;
  border-radius: 8px;
  background: #fff8df;
  color: var(--ink);
  line-height: 1.4;
}

.google-setup-box summary {
  cursor: pointer;
  font-weight: 900;
}

.google-setup-box span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.google-setup-box code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #fff;
  color: var(--green-dark);
  font-size: 0.88em;
}

.share-panel,
.feedback-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.share-panel p,
.feedback-panel p {
  margin-bottom: 0;
}

.share-url-preview {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #dbe7e2;
  border-radius: 8px;
  background: #f7fbfa;
}

.share-url-preview span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.share-url-preview strong {
  overflow: hidden;
  color: var(--green-dark);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
}

.share-button {
  min-height: 60px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 14px;
  box-shadow: 0 5px 0 #edf0ed, 0 9px 18px rgba(18, 33, 27, 0.07);
  text-decoration: none;
  line-height: 1.1;
}

.share-icon {
  width: 48px;
  height: 48px;
  border: 3px solid #fff;
  border-radius: 17px 14px 18px 14px;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  box-shadow:
    0 4px 0 rgba(18, 33, 27, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transform: rotate(-3deg);
}

.share-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.share-icon.linkedin svg,
.share-icon.facebook svg {
  fill: currentColor;
  stroke: none;
}

.share-button-label {
  min-width: 0;
}

.share-button:hover,
.share-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 5px 0 rgba(22, 163, 245, 0.16);
}

.share-button:hover .share-icon,
.share-button:focus-visible .share-icon {
  transform: rotate(2deg) scale(1.04);
}

.share-button.copy .share-icon {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.85) 0 9px, transparent 10px),
    linear-gradient(135deg, #e9f5ff, #9ed7f8);
  color: #1689d8;
}

.share-button.whatsapp .share-icon {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.85) 0 9px, transparent 10px),
    linear-gradient(135deg, #dcfce7, #65d89d);
  color: #128c7e;
}

.share-button.linkedin .share-icon {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.85) 0 9px, transparent 10px),
    linear-gradient(135deg, #e7f2fb, #8dc8f2);
  color: #0a66c2;
}

.share-button.facebook .share-icon {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.85) 0 9px, transparent 10px),
    linear-gradient(135deg, #e8f0ff, #9db8ff);
  color: #1877f2;
}

.feedback-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding-top: 2px;
}

.feedback-field {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 900;
}

.feedback-field span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.feedback-field select,
.feedback-field input,
.feedback-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.feedback-field textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.45;
}

.feedback-field.message-field {
  grid-column: 1 / -1;
}

.feedback-submit {
  grid-column: 1 / -1;
  width: 100%;
}

.engagement-status {
  grid-column: 1 / -1;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.engagement-status.good {
  color: var(--green-dark);
  font-weight: 900;
}

.engagement-status.bad {
  color: #a72719;
  font-weight: 900;
}

.honeypot {
  display: none !important;
}

@media (max-width: 720px) {
  .feedback-form {
    grid-template-columns: 1fr;
  }

  .feedback-field.message-field,
  .feedback-submit,
  .engagement-status {
    grid-column: auto;
  }
}

.sound-panel {
  background:
    linear-gradient(135deg, rgba(22, 163, 245, 0.1), rgba(76, 191, 143, 0.12)),
    #fff;
}

.sound-controls {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.sound-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 4px 12px;
  min-height: 72px;
  padding: 12px;
  border: 2px solid #dbe7e2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 0 #e4ece8;
}

.sound-toggle::before {
  content: "";
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  width: 44px;
  height: 44px;
  border: 3px solid #fff;
  border-radius: 16px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.8) 0 8px, transparent 9px),
    linear-gradient(135deg, #f3efff, #c8b7ff);
  box-shadow: 0 4px 0 rgba(106, 75, 212, 0.18);
}

.sound-toggle::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 28px;
  width: 20px;
  height: 16px;
  background: #6a4bd4;
  clip-path: polygon(0 25%, 35% 25%, 100% 0, 100% 100%, 35% 75%, 0 75%);
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: var(--green);
  outline: none;
}

.sound-toggle.active {
  border-color: #ffb7ad;
  background: #fff3f0;
  box-shadow: 0 4px 0 #ffd1ca;
}

.sound-toggle-copy {
  grid-column: 2;
  grid-row: 1;
  font-weight: 900;
}

.sound-toggle small {
  grid-column: 2 / -1;
  grid-row: 2;
  color: var(--muted);
  line-height: 1.35;
}

.sound-toggle-state {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f8f2;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.cartoon-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.cartoon-action-icon {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.cartoon-action-icon::before,
.cartoon-action-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.cartoon-action-button.export .cartoon-action-icon::before {
  width: 14px;
  height: 16px;
  border-radius: 3px;
  background: currentColor;
}

.cartoon-action-button.export .cartoon-action-icon::after {
  width: 9px;
  height: 9px;
  border: 3px solid #fff;
  border-left: 0;
  border-top: 0;
  transform: translateY(-2px) rotate(45deg);
}

.cartoon-action-button.unlock .cartoon-action-icon::before {
  top: 8px;
  width: 17px;
  height: 13px;
  border: 4px solid currentColor;
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
}

.cartoon-action-button.unlock .cartoon-action-icon::after {
  bottom: 7px;
  width: 18px;
  height: 14px;
  border-radius: 4px;
  background: currentColor;
}

.cartoon-action-button.reset .cartoon-action-icon::before {
  width: 19px;
  height: 19px;
  border: 4px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.cartoon-action-button.reset .cartoon-action-icon::after {
  right: 4px;
  top: 7px;
  width: 9px;
  height: 9px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.sound-toggle.active .sound-toggle-state {
  background: #ffdfda;
  color: #a72719;
}

.sound-start-prompt {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid #c8e2df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 40, 28, 0.18);
}

.sound-start-prompt span {
  color: var(--ink);
  font-weight: 900;
}

.concept-library {
  display: grid;
  gap: 18px;
}

.guide-tools {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid #c8e2df;
  border-radius: 8px;
  background: #eef8f7;
  box-shadow: 0 5px 0 #d6e9e5;
}

.guide-tools h2 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.guide-tools p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-filter-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.guide-search-input,
.guide-term-select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #c8e2df;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.guide-search-input:focus,
.guide-term-select:focus {
  outline: 3px solid rgba(22, 163, 245, 0.16);
  border-color: var(--teal);
}

.guide-filter-status {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark) !important;
  font-weight: 900;
}

.guide-result-shortcuts {
  display: grid;
  gap: 10px;
}

.guide-result-shortcuts:empty {
  display: none;
}

.guide-result-shortcuts h3 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.guide-result-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.guide-result-button {
  display: grid;
  gap: 7px;
  min-height: 116px;
  padding: 12px;
  border: 1px solid #c8e2df;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 3px 0 #dbecea;
}

.guide-result-button:hover,
.guide-result-button:focus-visible {
  border-color: var(--teal);
  outline: 3px solid rgba(22, 163, 245, 0.16);
  transform: translateY(-1px);
}

.guide-result-button strong {
  font-size: 0.95rem;
  line-height: 1.1;
}

.guide-result-level {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.guide-result-phrase {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.guide-search-highlight {
  padding: 0 2px;
  border-radius: 4px;
  background: #fff0a8;
  color: #845300;
  font-weight: 1000;
}

.guide-result-focus {
  border-color: var(--teal) !important;
  box-shadow:
    0 0 0 4px rgba(22, 163, 245, 0.14),
    0 8px 24px rgba(20, 40, 28, 0.12) !important;
}

.guide-visual-gallery {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e1ded5;
  border-radius: 8px;
  background: #fffaf0;
}

.guide-visual-heading h2 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.guide-visual-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

.guide-visual-card {
  margin: 10px 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 0 #e7eee9;
}

.guide-visual-card-large {
  margin: 0;
}

.concept-visual-card {
  background: #fbfcfa;
}

.guide-visual-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f7faf8;
  color: var(--ink);
  cursor: zoom-in;
}

.guide-visual-trigger:focus-visible {
  outline: 3px solid rgba(22, 163, 245, 0.24);
  outline-offset: -3px;
}

.guide-visual-trigger img,
.guide-visual-card img {
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  background: #f7faf8;
}

.visual-enlarge-pill {
  position: absolute;
  display: grid;
  place-items: center;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  background: rgba(20, 33, 26, 0.9);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 3px 10px rgba(20, 33, 26, 0.2);
}

.concept-visual-card img {
  max-height: 240px;
}

.guide-visual-card figcaption {
  padding: 9px 10px 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.guide-image-dialog {
  width: min(94vw, 1100px);
  max-width: 1100px;
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.guide-image-dialog::backdrop {
  background: rgba(12, 20, 16, 0.68);
  backdrop-filter: blur(4px);
}

.guide-image-dialog-card {
  display: grid;
  gap: 12px;
  max-height: 92vh;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(12, 20, 16, 0.32);
}

.guide-image-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.guide-image-dialog-header h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.guide-image-dialog-img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.guide-image-dialog-caption {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-deep-explanation {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #dcebe6;
  border-radius: 8px;
  background: #fbfcfa;
}

.guide-examples {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  border-radius: 8px;
  background: #eef8f7;
}

.guide-examples h3 {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.guide-examples p {
  margin-bottom: 0;
}

.concept-section {
  display: grid;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.concept-section-heading {
  max-width: 760px;
}

.concept-section-heading h2 {
  margin-bottom: 6px;
}

.concept-section-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.level-guide,
.guide-level-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.level-guide-card,
.guide-level-button {
  --level-accent: var(--green);
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--level-accent);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 6px 16px rgba(20, 40, 28, 0.08);
}

.level-guide-card[data-level="level2"],
.guide-level-button[data-level="level2"] {
  --level-accent: var(--teal);
}

.level-guide-card[data-level="level3"],
.guide-level-button[data-level="level3"] {
  --level-accent: var(--plum);
}

.level-guide-card[data-level="level4"],
.guide-level-button[data-level="level4"] {
  --level-accent: var(--coral);
}

.guide-level-button {
  min-height: 88px;
  color: var(--ink);
  text-align: left;
}

.guide-level-button.active {
  border-color: var(--level-accent);
  background: #f4fffb;
  box-shadow:
    inset 0 -3px 0 rgba(0, 184, 148, 0.14),
    0 6px 16px rgba(20, 40, 28, 0.08);
}

.guide-level-button span,
.guide-level-button small {
  color: var(--muted);
  line-height: 1.3;
}

.level-guide-card h2,
.level-guide-card p {
  margin-bottom: 0;
}

.level-guide-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
}

.guide-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebe2;
}

.guide-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--level-accent);
}

.guide-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.guide-stat-row span {
  display: grid;
  gap: 2px;
  min-height: 52px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.guide-stat-row strong {
  color: var(--ink);
  font-size: 1rem;
}

.source-card {
  background: #eef8f7;
  border-color: #c8e2df;
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.concept-card {
  border-left: 5px solid var(--teal);
}

.concept-card strong {
  color: var(--ink);
}

.guide-empty {
  padding: 16px;
  border: 1px dashed #c8e2df;
  border-radius: 8px;
  background: #fbfcfa;
}

.guide-empty h2 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.guide-empty p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.glossary-title {
  margin: 8px 0 0;
  font-size: 1rem;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.term-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.term-card h3 {
  margin-bottom: 6px;
  font-size: 0.96rem;
}

.term-card p {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.term-card p:last-child {
  margin-bottom: 0;
}

.term-card strong {
  color: var(--ink);
}

.primary-button,
.secondary-button,
.danger-button,
.mini-button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-button {
  border: 0;
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 0 var(--green-dark);
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.danger-button {
  border: 1px solid #f3b4ac;
  background: #fff1ef;
  color: #a72719;
}

.mini-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #c8e2df;
  background: #eef8f7;
  color: var(--teal);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled,
.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.lesson-dialog {
  width: min(720px, calc(100% - 24px));
  border: 0;
  padding: 0;
  border-radius: 8px;
  background: transparent;
}

.lesson-dialog::backdrop {
  background: rgba(10, 20, 14, 0.55);
  backdrop-filter: blur(4px);
}

.dialog-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.lesson-meter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-right: 42px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.meter-track-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.meter-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ece4;
}

.meter-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.lesson-progress-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  background: var(--active-level-soft);
  box-shadow:
    0 5px 0 var(--active-level-shadow),
    0 8px 16px rgba(23, 32, 26, 0.14);
  font-size: 1.25rem;
  line-height: 1;
  transform-origin: center bottom;
  animation: lesson-icon-bob 2.2s ease-in-out infinite;
}

.lesson-progress-icon[data-level="level1"],
.lesson-status-icon[data-level="level1"] {
  background: #e2fbef;
}

.lesson-progress-icon[data-level="level2"],
.lesson-status-icon[data-level="level2"] {
  background: #e9f4ff;
}

.lesson-progress-icon[data-level="level3"],
.lesson-status-icon[data-level="level3"] {
  background: #fff4ce;
}

.lesson-progress-icon[data-level="level4"],
.lesson-status-icon[data-level="level4"] {
  background: #ffe9e7;
}

@keyframes lesson-icon-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-4px) rotate(3deg);
  }
}

.challenge-prompt {
  margin: 6px 0 14px;
  font-size: 1.12rem;
  line-height: 1.4;
}

.option-grid {
  display: grid;
  gap: 10px;
}

.choice-option,
.sequence-option,
.word-chip,
.match-row {
  width: 100%;
  min-height: 50px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.choice-option.selected,
.sequence-option.selected,
.word-chip.selected {
  border-color: var(--teal);
  background: #e8f6f7;
  box-shadow: inset 0 -3px 0 rgba(20, 124, 131, 0.18);
}

.blank-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  font-weight: 900;
}

.blank-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid #cfd8d0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.blank-input:focus,
.reflection-input:focus,
.match-row select:focus {
  outline: 3px solid rgba(20, 124, 131, 0.18);
  border-color: var(--teal);
}

.match-grid {
  display: grid;
  gap: 10px;
}

.match-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  align-items: center;
}

.match-row strong {
  line-height: 1.3;
}

.match-row select,
.reflection-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
}

.match-row select {
  min-height: 42px;
  padding: 8px;
}

.sequence-tray {
  min-height: 50px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px dashed #b5c0b7;
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--muted);
}

.word-tray {
  min-height: 54px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px dashed #b5c0b7;
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.35;
}

.sequence-tray.has-items,
.word-tray.has-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink);
}

.ordered-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid #c8e2df;
  border-radius: 8px;
  background: #eef8f7;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 3px 0 #d5e8e4;
}

.ordered-chip-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 0.76rem;
}

.ordered-chip-text {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.ordered-chip-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.order-chip-control,
.order-chip-remove {
  display: grid;
  place-items: center;
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #c8e2df;
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font-weight: 900;
}

.order-chip-control:disabled {
  opacity: 0.35;
}

.order-chip-remove {
  border-color: #ffc4bd;
  color: #b73425;
}

.ordered-chip-separator {
  color: var(--muted);
  font-weight: 900;
}

.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.word-chip {
  width: auto;
  min-height: 42px;
  padding: 9px 12px;
  font-weight: 900;
}

.reflection-input {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.evaluation-rules {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.completion-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #c8e2df;
  border-radius: 8px;
  background: #eef8f7;
}

.completion-card h2 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.completion-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.completion-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.completion-stats span {
  display: grid;
  gap: 2px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.completion-stats strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(245, 247, 241, 0.76);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.celebration-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.celebration-bursts {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.celebration-bursts-front {
  z-index: 4;
}

.celebration-bursts span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--spark-color);
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--spark-color) 22%, transparent),
    26px -18px 0 -3px var(--spark-color),
    -24px -12px 0 -4px var(--spark-color),
    18px 23px 0 -4px var(--spark-color),
    -18px 21px 0 -5px var(--spark-color);
  animation: spark-pop 900ms ease-out var(--delay) both;
}

.celebration-card {
  position: relative;
  z-index: 3;
  width: min(430px, 100%);
  padding: 28px;
  border: 2px solid #d9c06d;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 0 22px 52px rgba(20, 40, 28, 0.24);
  text-align: center;
  animation: card-pop 420ms cubic-bezier(0.2, 1.1, 0.32, 1) both;
}

.celebration-card h2 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 8vw, 3rem);
}

.celebration-card p:not(.eyebrow) {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.celebration-card .motivation-line {
  color: var(--ink);
  font-weight: 900;
}

.ai-coach {
  --coach-size: 108px;
  position: relative;
  display: block;
  width: var(--coach-size);
  height: calc(var(--coach-size) * 1.05);
  margin: 0 auto 14px;
  transform-origin: center bottom;
  animation: coach-bounce 1.55s ease-in-out infinite;
}

.ai-coach-level {
  --coach-size: 122px;
}

.ai-coach-mini {
  --coach-size: 44px;
  flex: 0 0 auto;
  margin: 0 2px 0 0;
  animation:
    coach-mini-pop 520ms cubic-bezier(0.2, 1.45, 0.42, 1),
    coach-mini-idle 1.8s ease-in-out 520ms 2;
}

.ai-coach-shadow,
.ai-coach-antenna,
.ai-coach-arm,
.ai-coach-body,
.ai-coach-head,
.ai-coach-eye,
.ai-coach-smile,
.ai-coach-spark {
  position: absolute;
  display: block;
}

.ai-coach-shadow {
  left: 22%;
  bottom: 0;
  width: 56%;
  height: 10%;
  border-radius: 999px;
  background: rgba(23, 32, 26, 0.16);
  filter: blur(1px);
  animation: coach-shadow-pulse 1.55s ease-in-out infinite;
}

.ai-coach-body {
  left: 27%;
  bottom: 8%;
  width: 46%;
  height: 34%;
  border: 3px solid #fff;
  border-radius: 22% 22% 32% 32%;
  background: linear-gradient(150deg, #16d4b1, #19a6ff 72%);
  box-shadow: 0 6px 0 rgba(0, 137, 118, 0.22);
}

.ai-coach-head {
  left: 14%;
  top: 7%;
  width: 72%;
  height: 58%;
  border: 3px solid #fff;
  border-radius: 31% 31% 36% 36%;
  background: linear-gradient(145deg, #ffffff 0 34%, #dff8ff 34% 100%);
  box-shadow:
    inset 0 -8px 0 rgba(25, 166, 255, 0.13),
    0 8px 0 rgba(22, 163, 245, 0.18);
  animation: coach-head-nod 1.9s ease-in-out infinite;
}

.ai-coach-antenna {
  left: 47%;
  top: 0;
  width: 6%;
  height: 14%;
  border-radius: 999px;
  background: #0f8d78;
}

.ai-coach-antenna::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -55%;
  width: 250%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffc83d;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(255, 200, 61, 0.22);
}

.ai-coach-eye {
  top: 42%;
  width: 13%;
  height: 13%;
  border-radius: 50%;
  background: #14211a;
  animation: coach-blink 4.4s ease-in-out infinite;
}

.ai-coach-eye-left {
  left: 30%;
}

.ai-coach-eye-right {
  right: 30%;
}

.ai-coach-smile {
  left: 36%;
  top: 60%;
  width: 28%;
  height: 15%;
  border-bottom: 4px solid #14211a;
  border-radius: 0 0 999px 999px;
}

.ai-coach-arm {
  bottom: 28%;
  width: 18%;
  height: 9%;
  border-radius: 999px;
  background: #13bfa2;
}

.ai-coach-arm-left {
  left: 12%;
  transform: rotate(30deg);
}

.ai-coach-arm-right {
  right: 9%;
  transform-origin: 10% 50%;
  animation: coach-wave 850ms ease-in-out infinite;
}

.ai-coach-spark {
  width: 10%;
  aspect-ratio: 1;
  border-radius: 40% 60% 50% 50%;
  background: #ffc83d;
  box-shadow: 0 0 0 5px rgba(255, 200, 61, 0.2);
  animation: coach-sparkle 1.2s ease-in-out infinite;
}

.ai-coach-spark-one {
  right: 3%;
  top: 9%;
}

.ai-coach-spark-two {
  left: 3%;
  top: 24%;
  width: 7%;
  background: #ff5c5c;
  animation-delay: 280ms;
}

@keyframes coach-bounce {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-7px) rotate(1.5deg);
  }
}

@keyframes coach-mini-pop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.55) rotate(-10deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes coach-mini-idle {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-3px) rotate(4deg);
  }
}

@keyframes coach-shadow-pulse {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.16;
  }

  50% {
    transform: scaleX(0.78);
    opacity: 0.1;
  }
}

@keyframes coach-head-nod {
  0%,
  100% {
    transform: rotate(0);
  }

  50% {
    transform: rotate(2deg);
  }
}

@keyframes coach-wave {
  0%,
  100% {
    transform: rotate(-38deg);
  }

  50% {
    transform: rotate(-72deg) translateY(-3px);
  }
}

@keyframes coach-blink {
  0%,
  93%,
  100% {
    transform: scaleY(1);
  }

  96% {
    transform: scaleY(0.12);
  }
}

@keyframes coach-sparkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.75) rotate(0);
  }

  50% {
    opacity: 1;
    transform: scale(1.15) rotate(18deg);
  }
}

@keyframes spark-pop {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }

  32% {
    opacity: 1;
    transform: scale(1.1);
  }

  100% {
    opacity: 0;
    transform: scale(1.9) translateY(22px);
  }
}

@keyframes card-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.feedback {
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f8f4;
  color: var(--muted);
  line-height: 1.45;
}

.feedback.good {
  background: #e7f8ed;
  color: #0f6f50;
}

.lesson-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0;
}

.lesson-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #d6e7df;
  border-radius: 999px;
  background: #f4fbf7;
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 900;
}

.lesson-focus-pill {
  border-color: #c9eadc;
  background: #f2fcf6;
  color: #0f6f50;
}

.lesson-status-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: -4px;
  border-radius: 9px;
  background: #e2fbef;
  font-size: 0.9rem;
  line-height: 1;
}

.lesson-xp-pill {
  border-color: #cde8ff;
  background: #eef8ff;
  color: #1673b8;
}

.correct-feedback {
  border: 1px solid #b8ecd0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-weight: 850;
}

.encouragement-pop {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 2px solid rgba(15, 111, 80, 0.18);
  border-radius: 999px;
  background: #fff;
  color: #0f6f50;
  box-shadow: 0 4px 0 rgba(15, 111, 80, 0.16);
  font-weight: 1000;
  animation:
    encouragement-pop-in 520ms cubic-bezier(0.2, 1.45, 0.42, 1),
    encouragement-wiggle 1.8s ease-in-out 520ms 2;
}

.encouragement-icon-only {
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 14px;
  font-size: 1.35rem;
}

.feedback-explanation {
  flex: 1 1 220px;
  min-width: 0;
}

@keyframes encouragement-pop-in {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.62) rotate(-7deg);
  }

  72% {
    opacity: 1;
    transform: translateY(-3px) scale(1.08) rotate(3deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes encouragement-wiggle {
  0%,
  100% {
    transform: rotate(0);
  }

  30% {
    transform: rotate(-2.4deg) translateY(-1px);
  }

  62% {
    transform: rotate(2deg) translateY(1px);
  }
}

.thumbs-up-feedback {
  font-size: 1.04rem;
}

.hard-correct {
  position: relative;
  border: 2px solid #f5c84c;
  background: #fff8d8;
  color: #654200;
  animation: hard-correct-pulse 720ms ease-out;
}

@keyframes hard-correct-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 200, 76, 0.58);
    transform: scale(0.985);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(245, 200, 76, 0);
    transform: scale(1.01);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 200, 76, 0);
    transform: scale(1);
  }
}

.feedback.bad {
  background: #fff0ed;
  color: #a72719;
}

.feedback.answer {
  border-color: #d9c06d;
  background: #fff8db;
  color: #513a00;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.hidden {
  display: none !important;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf4ef;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.progress-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  max-height: min(56vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.progress-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.progress-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.progress-item small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.progress-item em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mistake-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.mistake-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.25;
}

.mistake-item .mini-button {
  align-self: start;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .sidebar-brand {
    gap: 10px;
    padding-right: 4px;
    padding-left: 4px;
  }

  .sidebar-brand .brand-mark {
    width: 48px;
    height: 48px;
  }

  .sidebar-brand h1 {
    font-size: 1.2rem;
  }

  .learn-layout {
    grid-template-columns: minmax(0, 780px);
    justify-content: center;
  }

  .right-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 24px;
  }

  .rail-card {
    min-width: 0;
  }

  .trail-coach {
    right: 6%;
    opacity: 0.82;
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
    min-height: auto;
    padding: 0 10px 18px;
  }

  .app-sidebar {
    display: none;
  }

  .app-main-shell {
    padding: 10px 0 22px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 6px 0 10px;
  }

  .topbar .brand {
    display: flex;
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
  }

  .quick-sound-controls {
    width: 100%;
    justify-content: flex-end;
  }

  .stat {
    min-height: 36px;
    padding: 6px 8px;
    justify-content: center;
    font-size: 0.78rem;
  }

  .stat::before {
    width: 22px;
    height: 22px;
  }

  .learn-layout {
    display: block;
  }

  .hero-strip {
    gap: 14px;
    min-height: auto;
    padding: 0 0 14px;
  }

  .hero-copy {
    padding: 16px;
    box-shadow: 0 5px 0 var(--active-level-shadow);
  }

  .hero-copy h2 {
    font-size: 1.35rem;
  }

  .hero-map {
    min-height: var(--path-min-height, 620px);
  }

  .trail-line {
    left: 12%;
    top: 3%;
    width: 76%;
    height: 94%;
  }

  .bridge-plank-body {
    stroke-width: 3.5;
  }

  .bridge-rope {
    stroke-width: 2.2;
  }

  .trail-coach {
    display: none;
  }

  .picture-step {
    width: clamp(34px, 9.5vw, 42px);
    height: clamp(34px, 9.5vw, 42px);
    border-width: 3px;
    box-shadow:
      0 4px 0 var(--node-shadow),
      0 8px 14px rgba(23, 32, 26, 0.14);
  }

  .path-start-label {
    left: calc(100% + 8px);
    min-width: 58px;
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .path-start-label::before {
    left: -7px;
  }

  .path-node-tooltip {
    max-width: min(220px, 78vw);
    font-size: 0.72rem;
  }

  .view-tabs {
    display: grid;
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
  }

  .tab {
    min-height: 42px;
    font-size: 0.86rem;
  }

  .lesson-node:nth-child(even),
  .lesson-node:nth-child(3n) {
    margin-left: 0;
  }

  .lesson-node {
    grid-template-columns: 52px 1fr;
  }

  .right-rail {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
  }

  .rail-card {
    padding: 15px;
  }

  .jump-panel,
  .jump-controls,
  .level-tabs,
  .right-rail,
  .guide-filter-controls {
    grid-template-columns: 1fr;
  }

  .node-icon {
    width: 48px;
    height: 48px;
  }

  .match-row {
    grid-template-columns: 1fr;
  }

  .lesson-meter {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .lesson-status-strip {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .lesson-progress-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    font-size: 1.05rem;
  }

  .progress-item {
    grid-template-columns: 1fr;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .dialog-actions .primary-button:last-child {
    grid-column: 1 / -1;
  }
}
