@layer app {
  .dashboard-playful .app-main > .visual-path-page { width: 100%; max-width: none; padding-inline: 0; }
  .visual-path-page > .course-section-return { margin-top: 12px; }
  .visual-path-page > turbo-frame { display: block; }
  .visual-path-heading { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 28px 0 24px; }
  .visual-path-heading-copy { min-width: 0; max-width: 52rem; }
  .visual-path-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 600; }
  .visual-path-eyebrow > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--fun-lime); font-size: 17px; }
  .visual-path-heading h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -.045em; text-wrap: balance; }
  .visual-path-heading > form { flex-shrink: 0; }
  .visual-path-heading .button { min-height: 44px; font-size: 13px; }
  .visual-path-canvas { padding: 16px; border: 1px solid var(--line); border-radius: 28px; background: #f5f5f3; overflow: hidden; }
  .generated-study-map { display: block; width: 100%; height: 44vh; min-height: 280px; max-height: 440px; border: 0; background: #f5f5f3; }
  @media (max-width: 760px) {
    .dashboard-playful .app-main > .visual-path-page { width: calc(100% - 32px); }
    .visual-path-heading { align-items: flex-start; flex-direction: column; gap: 20px; margin-block: 24px 20px; }
    .visual-path-heading > form, .visual-path-heading .button { width: 100%; }
    .visual-path-canvas { padding: 8px; border-radius: 20px; }
  }
  .study-map-waiting { display: flex; min-height: 65vh; padding: 40px 20px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
  .study-map-waiting-art { display: grid; width: 160px; height: 160px; margin-bottom: 28px; place-items: center; border-radius: 50%; background: var(--fun-lime); }
  .study-map-waiting-art img { width: 128px; height: 128px; object-fit: contain; }
  .study-map-waiting-label { color: var(--muted); font-size: 12px; }
  .study-map-waiting h1 { margin: 12px 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -.04em; }
  .study-map-waiting > p[role="status"] { max-width: 36ch; font-size: 15px; color: var(--muted); }
  .study-map-waiting-dots { display: flex; gap: 8px; margin: 28px 0; }
  .study-map-waiting-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: study-map-pulse 1.5s ease-in-out infinite; }
  .study-map-waiting-dots span:nth-child(2) { animation-delay: .2s; }
  .study-map-waiting-dots span:nth-child(3) { animation-delay: .4s; }
  .study-map-waiting-note { max-width: 38ch; color: var(--muted); font-size: 12px; }
  @keyframes study-map-pulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { .study-map-waiting-dots span { animation: none; } }
}

@layer app {
  .dashboard-playful .app-main > .visual-path-page { max-width: 960px; margin-inline: auto; }
  .visual-path-heading-copy > p:last-child { margin-top: 10px; font-size: 12px; color: var(--muted); }
  .study-path-lessons { list-style: none; padding: 0; display: grid; gap: 8px; }
  .study-path-lesson { display: flex; align-items: start; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
  .study-path-lesson.is-next { border-color: var(--primary); background: var(--blue); }
  .study-path-number { flex: 0 0 26px; padding-top: 4px; font-size: 12px; font-weight: 800; color: var(--primary); }
  .study-path-copy { flex: 1; min-width: 0; }
  .study-path-copy h2 { font-size: 15px; line-height: 1.5; }
  .study-path-copy p { margin-top: 4px; color: var(--muted); font-size: 12px; }
  .study-path-copy summary { cursor: pointer; padding-block: 6px; font-size: 12px; color: var(--muted); }
  .study-path-copy details :is(ul, a) { margin-top: 8px; font-size: 12px; }
  .study-path-lesson > form { margin: 0; flex-shrink: 0; }
  .study-path-map { margin-top: 24px; }
  .study-path-map > summary { cursor: pointer; padding-block: 14px; color: var(--muted); font-size: 13px; }
  .study-path-map-status { padding-top: 20px; color: var(--muted); font-size: 12px; }
  @media (max-width: 600px) { .study-path-lesson { gap: 10px; padding: 14px; } .study-path-lesson .button { padding-inline: 12px; font-size: 12px; } }
}
