:root {
  color-scheme: light;
  --paper: #fff7ed;
  --surface: #fff;
  --ink: #29263a;
  --muted: #5f5e70;
  --line: #e2d9ec;
  --stage: #6e4aa8;
  --stage-deep: #52347f;
  --stage-tint: #eee7f6;
  --rhythm: #f4c84a;
  --rest: #3c9a91;
  --rest-deep: #21645e;
  --focus: #38245f;
  --font-scale: 1;
}
* { box-sizing: border-box; }
html { font-size: calc(16px * var(--font-scale)); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Noto Sans KR", sans-serif;
}
button, input { font: inherit; }
button { color: inherit; }
.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 30;
  padding: .7rem 1rem;
  border: 2px solid var(--focus);
  border-radius: .8rem;
  background: white;
}
.skip-link:focus { top: 1rem; }
.site-header, .site-footer, main { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.site-header { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: var(--stage);
  color: white;
  font-size: 1.7rem;
  font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .78rem; }
.quiet-button, .secondary-button, .primary-button, .danger-button, .text-button, .level-chip, .filter-chip {
  min-height: 56px;
  padding: .75rem 1rem;
  border: 2px solid transparent;
  border-radius: 1rem;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
}
.quiet-button { min-height: 48px; padding: .6rem .9rem; border-color: var(--line); background: white; color: var(--stage-deep); }
.secondary-button { border-color: #cdbde0; background: #f8f4fb; color: var(--stage-deep); }
.primary-button { background: var(--stage); color: white; box-shadow: 0 4px 0 var(--stage-deep); }
.danger-button { background: #942b3b; color: white; }
.text-button { background: transparent; color: var(--stage-deep); text-decoration: underline; text-underline-offset: .2em; }
button:hover:not(:disabled) { filter: brightness(.97); }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button:disabled { opacity: .55; cursor: not-allowed; }
main { min-height: calc(100vh - 9rem); padding-block: 1rem 3rem; }
.page { max-width: 52rem; margin: auto; }
h1 { max-width: 22ch; margin: .25rem 0 .7rem; color: var(--stage-deep); font-size: clamp(2rem, 6vw, 3.3rem); line-height: 1.13; letter-spacing: -.035em; }
h2 { margin: .3rem 0 .65rem; font-size: clamp(1.2rem, 4vw, 1.65rem); line-height: 1.3; }
p { line-height: 1.65; }
.eyebrow { margin: .2rem 0; color: var(--stage-deep); font-size: .84rem; font-weight: 850; }
.lead { max-width: 44rem; margin: .4rem 0 1.3rem; color: var(--muted); font-size: 1.05rem; }
.review-label, .status-pill {
  display: inline-flex;
  align-items: center;
  padding: .4rem .75rem;
  border: 1px solid #d8b644;
  border-radius: 99px;
  background: #fff4c9;
  color: #493813;
  font-size: .8rem;
  font-weight: 850;
}
.home-page > .review-label { margin-block: 0 .8rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(13rem, .8fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(1.2rem, 5vw, 2.7rem);
  border: 1px solid #4d3379;
  border-radius: 1.6rem;
  background: linear-gradient(125deg, var(--stage) 0%, var(--stage-deep) 100%);
  color: white;
  box-shadow: 0 7px 0 rgba(65, 42, 99, .16);
}
.hero h1 { max-width: 15ch; color: white; font-size: clamp(2rem, 5vw, 3.15rem); }
.hero .eyebrow { color: #ffe28a; }
.hero-lead { max-width: 42rem; color: #fff; font-size: clamp(1.02rem, 2vw, 1.16rem); line-height: 1.65; }
.hero .primary-button { background: var(--rhythm); color: #362944; box-shadow: 0 4px 0 #b08725; }
.hero-secondary { min-height: 56px; display: inline-flex; align-items: center; padding: .75rem 1rem; border: 2px solid #ded2ef; border-radius: 1rem; color: white; font-weight: 800; text-decoration: none; }
.hero-art-panel {
  min-width: 0;
  padding: .75rem;
  border-radius: 1.35rem;
  background: #fff7ed;
  color: var(--stage-deep);
  text-align: center;
}
.stage-art { display: block; width: 100%; height: auto; max-height: 17rem; }
.hero-art-panel p { margin: .15rem .4rem .3rem; color: var(--stage-deep); font-size: .92rem; font-weight: 800; }
.button-row, .footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.quiet-box, .reader-card, .detail-card, .dance-card, .parent-card, .done-card, .license-row {
  margin: 1rem 0;
  padding: clamp(1rem, 4vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: var(--surface);
  box-shadow: 0 4px 0 rgba(67, 45, 89, .06);
}
.quiet-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; border-left: 5px solid var(--rhythm); }
.quiet-box h2 { margin-top: 0; }
.quiet-box p:last-child { margin-bottom: 0; }
.quiet-icon { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 50%; background: #fff1b8; color: var(--stage-deep); font-size: 1.5rem; }
.small-note, .notice, .song-count { color: var(--muted); font-size: .9rem; }
.notice { padding: .9rem 1rem; border: 1px solid #dfc46e; border-radius: 1rem; background: #fff8db; color: #493813; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-top: 2rem; }
.section-head h2 { margin: 0 0 .35rem; }
.section-head .eyebrow { margin: 0 0 .3rem; }
.song-count { margin: .45rem 0 .7rem; }
.song-filters { display: flex; flex-wrap: wrap; gap: .65rem; margin: .2rem 0 1rem; }
.filter-chip { border-color: #cdbde0; background: white; color: var(--stage-deep); }
.filter-chip.selected { border-color: var(--stage); background: var(--stage-tint); box-shadow: inset 0 0 0 1px var(--stage); }
.song-list, .library-list, .playlist-list, .license-list { display: grid; gap: .85rem; }
.song-list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.song-list-item { min-width: 0; }
.song-card {
  width: 100%;
  min-height: 9rem;
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: .45rem .9rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: white;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(67, 45, 89, .06);
}
.song-card:hover, .library-card:hover { border-color: var(--stage); }
.song-art { display: block; height: auto; }
.song-art--card { width: 5.25rem; grid-column: 1; grid-row: 1 / span 2; }
.song-card-copy { min-width: 0; display: grid; justify-items: start; gap: .35rem; align-content: center; }
.song-card-copy strong { color: var(--stage-deep); font-size: 1.12rem; line-height: 1.35; }
.song-card-copy small { color: var(--muted); }
.song-card .status-pill { max-width: 100%; white-space: normal; }
.card-arrow { grid-column: 2; color: var(--stage-deep); font-size: .86rem; font-weight: 800; }
.card-arrow b { margin-left: .2rem; color: var(--rest-deep); font-size: 1rem; }
.footer-actions { margin-top: 1.2rem; }
.library-card {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: white;
}
.song-art--library { width: 6rem; padding: .35rem; border-radius: 1rem; background: #f5f0fa; }
.library-card h2 { margin: .2rem 0; color: var(--stage-deep); }
.library-card p:not(.eyebrow) { color: var(--muted); }
.library-card .lyric-preview { margin: .4rem 0; color: var(--ink); font-size: 1.05rem; }
.detail-heading { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.song-art--detail { width: 6rem; flex: 0 0 6rem; padding: .5rem; border-radius: 1.1rem; background: #f5f0fa; }
.detail-prompt { margin: .5rem 0 0; color: var(--muted); }
.lyric-list, .reader-lines { display: grid; gap: .65rem; padding: 0; list-style: none; }
.lyric-list li {
  display: grid;
  grid-template-columns: 2.3rem minmax(0, 1fr);
  gap: .8rem;
  align-items: center;
  min-height: 4.25rem;
  padding: .75rem 1rem;
  border-radius: .9rem;
  background: #fbf8fd;
}
.lyric-list li span { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: #e9def5; color: var(--stage-deep); font-weight: 850; }
.lyric-list li p { margin: .2rem 0; color: var(--ink); font-size: clamp(1.5rem, 4vw, 1.75rem); line-height: 1.5; word-break: keep-all; }
.reader-lines li {
  padding: 1rem 1.1rem;
  border-left: 6px solid transparent;
  border-radius: .9rem;
  background: #faf8fc;
  color: var(--ink);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.45;
  word-break: keep-all;
}
.reader-lines .current-line {
  border-left-color: var(--stage);
  background: #fff8dc;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: var(--rhythm);
  text-decoration-thickness: .14em;
  text-underline-offset: .18em;
}
.reader-lines .past-line { color: var(--muted); }
.progress-line { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .95rem; font-weight: 750; }
progress { width: 100%; height: .8rem; margin: .5rem 0 1rem; accent-color: var(--stage); }
.safety-box { padding: .9rem 1rem; border: 1px solid #9ecbbd; border-radius: 1rem; background: #eff9f5; color: #234f49; }
.mode-group { margin: 1rem 0; padding: .7rem 1rem 1rem; border: 1px solid var(--line); border-radius: 1rem; }
.mode-group legend { padding-inline: .3rem; color: var(--stage-deep); font-weight: 850; }
.mode-row { gap: .75rem; }
.level-chip { min-width: 7rem; border-color: #cdbde0; background: white; color: var(--stage-deep); }
.level-chip.selected { border-color: var(--stage); background: var(--stage-tint); box-shadow: inset 0 0 0 1px var(--stage); }
.step-card {
  max-width: 36rem;
  min-height: 19rem;
  margin: 1rem auto;
  padding: 1.25rem;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: #fbf8fd;
  text-align: center;
}
.step-card .eyebrow { margin: 0; }
.movement-figure { width: 8rem; height: 7.6rem; margin: .25rem auto; overflow: visible; }
.step-copy { max-width: 27ch; margin: .3rem 0; color: var(--stage-deep); font-size: clamp(1.35rem, 4vw, 1.7rem); font-weight: 850; line-height: 1.45; }
.done-card { max-width: 42rem; margin: 1.5rem auto; text-align: center; }
.done-mark { width: 4rem; height: 4rem; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; background: #e5f4ec; color: var(--rest-deep); font-size: 1.7rem; font-weight: 900; }
.completion-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1.2rem; }
.completion-choice { min-height: 5rem; border: 2px solid #cdbde0; border-radius: 1rem; background: white; color: var(--stage-deep); font-weight: 850; cursor: pointer; }
.completion-choice:hover { border-color: var(--stage); background: var(--stage-tint); }
.playlist-row { min-height: 3.5rem; display: flex; align-items: center; gap: .8rem; padding: .65rem; border-top: 1px solid var(--line); cursor: pointer; }
.playlist-row input { width: 1.4rem; height: 1.4rem; accent-color: var(--stage); }
.playlist-row strong, .playlist-row small { display: block; }
.playlist-row small { color: var(--muted); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.license-row dl { display: grid; grid-template-columns: minmax(6rem, .5fr) minmax(0, 1fr); gap: .45rem 1rem; }
.license-row dt { color: var(--muted); }
.license-row dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.plain-list { padding-left: 1.3rem; }
.plain-list li { margin: .65rem 0; line-height: 1.6; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 1rem; background: rgba(40, 34, 48, .56); }
.modal { width: min(100%, 34rem); max-height: min(90vh, 44rem); overflow: auto; padding: 1.4rem; border-radius: 1.3rem; background: white; box-shadow: 0 20px 60px #22181155; }
.modal input { display: block; width: 100%; min-height: 3.25rem; margin: .5rem 0 1rem; padding: .6rem .8rem; border: 2px solid #8d7a9f; border-radius: .7rem; }
.site-footer { min-height: 4rem; display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem; color: var(--muted); font-size: .8rem; }
.noscript { max-width: 42rem; margin: auto; padding: 2rem 1rem; }
@media (max-width: 820px) {
  .song-list { grid-template-columns: 1fr; }
  .library-card { grid-template-columns: 5rem minmax(0, 1fr); }
  .library-card .song-art--library { width: 5rem; }
  .library-card button { grid-column: 2; justify-self: start; }
}
@media (max-width: 620px) {
  .site-header, main, .site-footer { width: min(100% - 1.1rem, 72rem); }
  .hero { grid-template-columns: 1fr; }
  .hero-art-panel { width: min(100%, 23rem); justify-self: end; }
  .stage-art { max-height: 13rem; }
  .section-head { align-items: start; flex-direction: column; gap: .2rem; }
  .section-head h2 { margin-bottom: .25rem; }
  .completion-choices { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .site-header { min-height: 4.3rem; }
  .site-header, main, .site-footer { width: min(100% - 1rem, 72rem); }
  .hero { padding: 1rem; }
  .hero-art-panel { width: 100%; }
  .quiet-box { grid-template-columns: 1fr; gap: .5rem; }
  .quiet-icon { width: 2.5rem; height: 2.5rem; }
  .song-card { grid-template-columns: 4.25rem minmax(0, 1fr); gap: .4rem .65rem; padding: .8rem; }
  .song-art--card { width: 4.25rem; }
  .song-card-copy strong { font-size: 1.02rem; }
  .song-card-copy .status-pill { font-size: .72rem; padding: .3rem .5rem; }
  .card-arrow { font-size: .82rem; }
  .library-card { grid-template-columns: 4rem minmax(0, 1fr); gap: .75rem; }
  .library-card .song-art--library { width: 4rem; }
  .detail-heading { align-items: flex-start; }
  .song-art--detail { width: 4.5rem; flex-basis: 4.5rem; }
  .lyric-list li { grid-template-columns: 1.8rem minmax(0, 1fr); gap: .5rem; padding: .65rem; }
  .lyric-list li span { width: 1.8rem; height: 1.8rem; }
  .lyric-list li p { font-size: 1.75rem; word-break: normal; }
  .reader-lines li { padding: .8rem; font-size: 1.75rem; word-break: normal; }
  .site-footer { flex-direction: column; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
