/* PAGES Music — 노래가 되는 하루. 밤하늘(night)과 종이(paper) 면이 번갈아 나오는 감성 스타일.
   모든 페이지(index · songs · song · free · make · 404)가 함께 쓴다. */
:root {
  --night: #15122b; --night2: #1f1a3d; --plum: #2c2152; --dusk: #4a2f63; --line: #3a3166;
  --peach: #ffb38a; --rose: #f58fa6; --lav: #b9a7ff; --mint: #8ee3c8; --gold: #ffd58a;
  --paper: #f5ede2; --paper2: #ece1d1; --ink: #2b2540; --ink2: #5b5170; --rule: #d9cbb8;
  --muted: #b7b0d1; --dim: #8a83a8;
  --serif: 'Gowun Batang', 'Nanum Myeongjo', 'Noto Serif KR', serif;
  --sans: 'IBM Plex Sans KR', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'Noto Sans KR', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; touch-action: pan-x pan-y; }
body { margin: 0; background: var(--night); color: #fff; font-family: var(--sans); line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .wrap { padding: 0 2rem; } }
.serif { font-family: var(--serif); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── 상단바 ── */
header.top { position: fixed; inset: 0 0 auto 0; z-index: 60; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
header.top.solid { background: rgba(21,18,43,.86); backdrop-filter: blur(14px); border-color: rgba(255,255,255,.06); }
header.top .bar { display: flex; align-items: center; justify-content: space-between; height: 3.75rem; gap: .5rem; }
@media (min-width: 640px) { header.top .bar { height: 4.25rem; } }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; white-space: nowrap; }
.brand .mk { width: 2.1rem; height: 2.1rem; border-radius: .65rem; background: linear-gradient(140deg, var(--lav), var(--rose) 55%, var(--peach)); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(245,143,166,.6); flex: none; }
.brand .mk svg { width: 1.15rem; height: 1.15rem; }
.brand small { font-family: var(--sans); font-weight: 400; font-size: .72rem; color: var(--muted); display: none; }
@media (min-width: 900px) { .brand small { display: inline; } }
nav.menu { display: flex; align-items: center; gap: .1rem; }
nav.menu a { font-size: .82rem; padding: .45rem .55rem; border-radius: .6rem; color: #e6e1f5; min-height: 34px; display: inline-flex; align-items: center; white-space: nowrap; }
nav.menu a:hover, nav.menu a[aria-current="page"] { background: rgba(255,255,255,.08); color: #fff; }
nav.menu a.ext { margin-left: .2rem; border: 1px solid rgba(255,255,255,.2); }
nav.menu .wide { display: none; }
@media (max-width: 519px) { nav.menu a.ext { display: none; } .brand { font-size: 1rem; gap: .45rem; } .brand .mk { width: 1.9rem; height: 1.9rem; } nav.menu a { padding: .4rem .45rem; } }
@media (min-width: 720px) { nav.menu { gap: .2rem; } nav.menu a { font-size: .9rem; padding: .5rem .8rem; } nav.menu .wide { display: inline-flex; } }

/* ── 밤하늘 히어로 ── */
.sky { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; overflow: hidden; padding: 5.5rem 0 4rem;
  background: radial-gradient(70rem 40rem at 80% 110%, rgba(255,179,138,.35), transparent 60%), radial-gradient(50rem 30rem at 10% 0%, rgba(185,167,255,.22), transparent 60%), linear-gradient(180deg, #100d24 0%, #1d1740 45%, #3b2756 80%, #5a3560 100%); }
.stars, .stars::after { position: absolute; inset: 0; pointer-events: none; content: '';
  background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent), radial-gradient(1px 1px at 28% 42%, #fff 50%, transparent), radial-gradient(1.4px 1.4px at 47% 12%, #fff 50%, transparent),
    radial-gradient(1px 1px at 63% 30%, #fff 50%, transparent), radial-gradient(1.3px 1.3px at 78% 16%, #fff 50%, transparent), radial-gradient(1px 1px at 88% 44%, #fff 50%, transparent),
    radial-gradient(1px 1px at 8% 60%, #fff 50%, transparent), radial-gradient(1.2px 1.2px at 36% 70%, #fff 50%, transparent), radial-gradient(1px 1px at 55% 55%, #fff 50%, transparent), radial-gradient(1px 1px at 93% 68%, #fff 50%, transparent);
  animation: twinkle 5s ease-in-out infinite; }
.stars::after { transform: translate(3%, 6%) scale(1.1); animation-delay: 2.5s; opacity: .7; }
@keyframes twinkle { 50% { opacity: .35; } }
.moon { position: absolute; top: 12%; right: 9%; width: 5.5rem; height: 5.5rem; border-radius: 999px; background: radial-gradient(circle at 35% 35%, #fff8e7, #ffe0b0 55%, #f6c48f); box-shadow: 0 0 60px 18px rgba(255,213,138,.25); }
@media (min-width: 768px) { .moon { width: 7.5rem; height: 7.5rem; } }
@media (max-width: 767px) { .moon { width: 3.2rem; height: 3.2rem; top: 4.6rem; right: 1.25rem; box-shadow: 0 0 30px 8px rgba(255,213,138,.2); } }
.moon::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 70% 60%, rgba(0,0,0,.08) 0 10%, transparent 11%), radial-gradient(circle at 40% 70%, rgba(0,0,0,.06) 0 7%, transparent 8%); }
.wave { position: absolute; left: 0; right: 0; bottom: 0; height: 9rem; pointer-events: none; }
.wave path { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 8 10; animation: flow 18s linear infinite; }
.wave path:nth-child(2) { animation-duration: 26s; opacity: .6; } .wave path:nth-child(3) { animation-duration: 34s; opacity: .4; }
@keyframes flow { to { stroke-dashoffset: -600; } }
.drift { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.drift span { position: absolute; bottom: -3rem; font-size: 1.3rem; color: rgba(255,255,255,.22); animation: rise linear infinite; }
@keyframes rise { to { transform: translateY(-115vh) rotate(30deg); opacity: 0; } }
.sky .wrap { position: relative; z-index: 3; width: 100%; }
.hero { display: grid; gap: 2.75rem; align-items: center; }
@media (min-width: 1024px) { .hero { grid-template-columns: 1.1fr .9fr; gap: 3.5rem; } }
.hero .copy { text-align: center; } @media (min-width: 1024px) { .hero .copy { text-align: left; } }
.kicker { display: inline-flex; align-items: center; gap: .55rem; padding: .32rem .9rem; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); font-size: .78rem; color: #f3ecff; letter-spacing: .04em; margin-bottom: 1.4rem; }
.kicker i { width: .45rem; height: .45rem; border-radius: 999px; background: var(--peach); box-shadow: 0 0 10px var(--peach); animation: twinkle 2.4s infinite; }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: 2.3rem; line-height: 1.25; margin: 0 0 1.1rem; letter-spacing: -.01em; }
@media (min-width: 640px) { .hero h1 { font-size: 3rem; } } @media (min-width: 1024px) { .hero h1 { font-size: 3.9rem; } }
.glow { background: linear-gradient(110deg, var(--lav) 0%, var(--rose) 45%, var(--peach) 90%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .sub { font-size: .95rem; color: #e9e3fb; letter-spacing: .18em; margin: 0 0 1rem; }
.hero .lead { color: var(--muted); max-width: 34rem; margin: 0 auto 2rem; font-size: .95rem; }
@media (min-width: 640px) { .hero .lead { font-size: 1.05rem; } } @media (min-width: 1024px) { .hero .lead { margin-left: 0; } }
.ctas { display: flex; flex-direction: column; gap: .75rem; justify-content: center; }
@media (min-width: 640px) { .ctas { flex-direction: row; flex-wrap: wrap; } } @media (min-width: 1024px) { .hero .ctas { justify-content: flex-start; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; padding: .75rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .95rem; transition: transform .2s, background .2s, box-shadow .2s; cursor: pointer; border: 0; }
.btn:hover { transform: translateY(-2px); }
.btn.warm { background: linear-gradient(120deg, var(--rose), var(--peach)); color: #2b1630; box-shadow: 0 14px 30px -12px rgba(245,143,166,.7); }
.btn.glass { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); color: #fff; }
.btn.glass:hover { background: rgba(255,255,255,.16); }
.btn.ink { background: var(--ink); color: var(--paper); } .btn.ink:hover { background: #3b3456; }
.btn.line { background: transparent; border: 1px solid var(--ink); color: var(--ink); } .btn.line:hover { background: rgba(43,37,64,.06); }

/* 히어로 오른쪽 — 노랫말 종이 */
.sheet-wrap { position: relative; max-width: 25rem; width: 100%; margin: 0 auto; }
.lyric-paper { position: relative; z-index: 2; color: var(--ink); background: var(--paper); border-radius: 1.1rem; padding: 1.6rem 1.5rem 1.4rem; transform: rotate(-2.2deg);
  background-image: repeating-linear-gradient(180deg, transparent 0 1.85rem, rgba(140,118,90,.22) 1.85rem calc(1.85rem + 1px)); background-position: 0 3.2rem;
  box-shadow: 0 40px 70px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(0,0,0,.04); }
.lyric-paper::before { content: ''; position: absolute; top: -.7rem; left: 50%; width: 5rem; height: 1.4rem; transform: translateX(-50%) rotate(3deg); background: rgba(255,213,138,.65); border-radius: .2rem; }
.lyric-paper .tag { font-size: .7rem; letter-spacing: .14em; color: var(--ink2); }
.lyric-paper h3 { font-family: var(--serif); font-size: 1.35rem; margin: .2rem 0 .9rem; }
.lyric-paper p { font-family: var(--serif); font-size: 1.02rem; line-height: 1.85rem; margin: 0; white-space: pre-line; }
.lyric-paper .by { margin-top: 1rem; font-size: .8rem; color: var(--ink2); display: flex; justify-content: space-between; gap: .5rem; }
.lyric-paper .by a { font-weight: 600; color: #9b3a5c; }
.sheet-wrap .disc { position: absolute; z-index: 1; right: -2.5rem; bottom: -2.5rem; width: 10rem; height: 10rem; border-radius: 999px; background: repeating-radial-gradient(circle, #141127 0 2px, #241e44 2px 4px); animation: spin 10s linear infinite; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.sheet-wrap .disc::after { content: ''; position: absolute; inset: 36%; border-radius: 999px; background: linear-gradient(135deg, var(--rose), var(--peach)); box-shadow: 0 0 0 3px #0e0b1e; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 639px) { .sheet-wrap .disc { width: 7rem; height: 7rem; right: -1rem; bottom: -1.5rem; } }
.scroll-hint { position: absolute; z-index: 3; left: 50%; bottom: 1.25rem; transform: translateX(-50%); font-size: .72rem; color: var(--muted); letter-spacing: .2em; }

/* ── 면 (밤 · 종이 · 노을) ── */
.band { padding: 4rem 0; position: relative; }
@media (min-width: 640px) { .band { padding: 5rem 0; } } @media (min-width: 1024px) { .band { padding: 6.5rem 0; } }
.band.paper { background: var(--paper); color: var(--ink); }
.band.paper2 { background: var(--paper2); color: var(--ink); }
.band.night { background: var(--night); }
.band.plum { background: linear-gradient(180deg, var(--night2), var(--plum)); }
.band.dusk { background: linear-gradient(135deg, #3b2756, #6b3a63 60%, #8a4a5f); }
.head { text-align: center; max-width: 42rem; margin: 0 auto 2.5rem; }
@media (min-width: 1024px) { .head { margin-bottom: 3.25rem; } }
.eyebrow { font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; color: var(--rose); margin-bottom: .6rem; }
.paper .eyebrow, .paper2 .eyebrow { color: #b0466a; }
.head h2, h2.t { font-family: var(--serif); font-size: 1.75rem; line-height: 1.3; margin: 0 0 .8rem; font-weight: 700; }
@media (min-width: 640px) { .head h2, h2.t { font-size: 2.2rem; } } @media (min-width: 1024px) { .head h2, h2.t { font-size: 2.6rem; } }
.head p { margin: 0; color: var(--muted); font-size: .95rem; }
.paper .head p, .paper2 .head p { color: var(--ink2); }

/* 네 갈래 */
.paths { display: grid; gap: 1rem; } @media (min-width: 640px) { .paths { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } } @media (min-width: 1100px) { .paths { grid-template-columns: repeat(4, 1fr); } }
.path { display: flex; flex-direction: column; gap: .6rem; background: #fffaf3; border: 1px solid var(--rule); border-radius: 1.25rem; padding: 1.5rem; transition: transform .25s, box-shadow .25s; min-height: 100%; }
.path:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(43,37,64,.45); }
.path .orb { width: 3.2rem; height: 3.2rem; border-radius: 999px; display: grid; place-items: center; font-size: 1.45rem; }
.path h3 { font-family: var(--serif); font-size: 1.25rem; margin: .2rem 0 0; }
.path p { margin: 0; font-size: .9rem; color: var(--ink2); flex: 1; }
.path .go { font-size: .85rem; font-weight: 600; color: #9b3a5c; }
.o1 { background: #ffe4d4; } .o2 { background: #e9e2ff; } .o3 { background: #ffe1ea; } .o4 { background: #dcf5ea; }

/* 관점으로 듣기 */
.lens-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; max-width: 28rem; margin: 0 auto 1.75rem; }
.lens-tabs button { min-height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05); font-weight: 600; cursor: pointer; }
.lens-tabs button[aria-pressed="true"] { background: linear-gradient(120deg, var(--lav), var(--rose)); color: #23163a; border-color: transparent; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 1rem; } } @media (min-width: 1024px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 8.5rem; padding: 1rem 1.1rem; border-radius: 1.1rem; overflow: hidden; color: #fff; isolation: isolate; transition: transform .25s; }
.tile:hover { transform: translateY(-3px); }
.tile .em { position: absolute; top: .65rem; right: .8rem; font-size: 2rem; opacity: .9; }
.tile b { font-family: var(--serif); font-size: 1.25rem; } .tile small { font-size: .78rem; opacity: .85; }
.tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.25)); }

/* 그라데이션 표지 — songs.json 의 cover · 관점 타일 */
.g-dusk { background: linear-gradient(140deg, #5a3a7a, #c0607a 70%, #f0a07a); }
.g-night { background: linear-gradient(140deg, #1d1a44, #3b3478 60%, #6a5aa8); }
.g-moon { background: linear-gradient(140deg, #2b2a52, #6b5c8f 55%, #e6c48f); }
.g-spring { background: linear-gradient(140deg, #f29bb5, #f7c6a3 60%, #f8e3a0); }
.g-meadow { background: linear-gradient(140deg, #2f8f7a, #79c4a0 60%, #d9eaa0); }
.g-sea { background: linear-gradient(140deg, #1e5a8a, #3fa0c4 60%, #9fe0e0); }
.g-autumn { background: linear-gradient(140deg, #8a3b2a, #d07a3a 60%, #f0c070); }
.g-snow { background: linear-gradient(140deg, #5a6d94, #a7b8d6 60%, #eef2fb); }
.g-rose { background: linear-gradient(140deg, #8a2f55, #e06a8f 65%, #ffb38a); }
.g-lav { background: linear-gradient(140deg, #4a3c8a, #9a86e0 65%, #e2d8ff); }
.g-ember { background: linear-gradient(140deg, #6b1f2a, #d0503a 60%, #ffb35a); }
.g-mist { background: linear-gradient(140deg, #4c5566, #8b93a3 60%, #d8dce4); }
.g-dawn { background: linear-gradient(140deg, #f08a6a, #f6b98a 50%, #fde2b0); }
.g-forest { background: linear-gradient(140deg, #1f4a3a, #3f7a5a 60%, #9ec89a); }

/* 노래 카드 */
.songs { display: grid; gap: 1rem; } @media (min-width: 640px) { .songs { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } } @media (min-width: 1024px) { .songs { grid-template-columns: repeat(3, 1fr); } }
.song { display: flex; flex-direction: column; border-radius: 1.2rem; overflow: hidden; background: #fffaf3; color: var(--ink); border: 1px solid var(--rule); transition: transform .25s, box-shadow .25s; }
.night .song, .plum .song { background: var(--night2); color: #fff; border-color: var(--line); }
.song:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -26px rgba(0,0,0,.55); }
.song .art { position: relative; height: 7.5rem; padding: .9rem 1rem; display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; color: #fff; }
.song .art .nt { position: absolute; right: .9rem; bottom: -.4rem; font-family: var(--serif); font-size: 3.4rem; opacity: .35; }
.pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.pl { font-size: .7rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: rgba(0,0,0,.25); color: #fff; backdrop-filter: blur(4px); }
.pl.free { background: rgba(142,227,200,.92); color: #0d3a2c; }
.pl.sample { background: rgba(255,213,138,.95); color: #4a2d00; }
.song .bd { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.song h3 { margin: 0; font-family: var(--serif); font-size: 1.15rem; }
.song .who { font-size: .8rem; color: var(--ink2); } .night .song .who, .plum .song .who { color: var(--muted); }
.song .sum { font-size: .86rem; margin: .2rem 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: .9; }
.song .tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: auto; padding-top: .5rem; }
.tg { font-size: .7rem; padding: .1rem .5rem; border-radius: 999px; background: rgba(43,37,64,.07); color: var(--ink2); }
.night .tg, .plum .tg { background: rgba(255,255,255,.07); color: #d9d3ef; }

/* 목록 도구 (songs.html) */
.filters { display: grid; gap: .9rem; margin-bottom: 1.75rem; }
.frow { display: flex; flex-direction: column; gap: .4rem; }
@media (min-width: 768px) { .frow { flex-direction: row; align-items: flex-start; gap: .9rem; } }
.frow > span { font-size: .78rem; font-weight: 600; color: var(--ink2); min-width: 3.5rem; padding-top: .55rem; }
.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; flex: 1; }
@media (min-width: 640px) { .chips { display: flex; flex-wrap: wrap; } }
.chip { min-height: 38px; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--rule); background: #fffaf3; color: var(--ink); font-size: .85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .n { font-size: .7rem; opacity: .65; }
.search { position: relative; flex: 1; }
.search input { width: 100%; min-height: 42px; border-radius: 999px; border: 1px solid var(--rule); background: #fffaf3; color: var(--ink); padding: .55rem 1rem .55rem 2.4rem; font-size: .92rem; }
.search input:focus { outline: 2px solid #c98aa0; outline-offset: 1px; }
.search svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--ink2); }
.count { font-size: .82rem; color: var(--ink2); margin: 0 0 1rem; }
.empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--rule); border-radius: 1.2rem; color: var(--ink2); }
.empty b { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); margin-bottom: .3rem; }
.more { display: flex; justify-content: center; margin-top: 2rem; }

/* 곡 상세 */
.page { padding: 5.5rem 0 4rem; min-height: 100vh; min-height: 100dvh; }
@media (min-width: 640px) { .page { padding-top: 6.5rem; } }
.page.paper { background: var(--paper); color: var(--ink); }
.back { display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; font-size: .88rem; color: var(--ink2); margin-bottom: 1.25rem; }
.back:hover { color: var(--ink); }
.detail { display: grid; gap: 1.75rem; } @media (min-width: 1024px) { .detail { grid-template-columns: 21rem 1fr; gap: 3rem; align-items: start; } }
.aside { display: flex; flex-direction: column; gap: 1rem; } @media (min-width: 1024px) { .aside { position: sticky; top: 6rem; } }
.cover-big { aspect-ratio: 1; border-radius: 1.4rem; color: #fff; position: relative; overflow: hidden; padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 30px 60px -30px rgba(43,37,64,.7); }
.cover-big .nt { position: absolute; right: -.4rem; bottom: -2.2rem; font-family: var(--serif); font-size: 10rem; opacity: .25; }
.cover-big .t { font-family: var(--serif); font-size: 1.55rem; line-height: 1.3; position: relative; }
.box { background: #fffaf3; border: 1px solid var(--rule); border-radius: 1.1rem; padding: 1.1rem 1.2rem; }
.box h3 { margin: 0 0 .7rem; font-size: .95rem; }
dl.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem .9rem; font-size: .86rem; }
dl.kv dt { color: var(--ink2); white-space: nowrap; } dl.kv dd { margin: 0; }
.license { border-radius: 1.1rem; padding: 1rem 1.15rem; font-size: .86rem; }
.license.free { background: #dcf5ea; border: 1px solid #a7e0c8; color: #124a37; }
.license.kept { background: #f3e9f7; border: 1px solid #dcc6e6; color: #4b2b5c; }
.license b { display: block; margin-bottom: .25rem; }
.license small { display: block; margin-top: .4rem; opacity: .8; }
audio { width: 100%; }
.links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
.links a { min-height: 36px; display: inline-flex; align-items: center; padding: .35rem .9rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .82rem; font-weight: 600; }
.article h1 { font-family: var(--serif); font-size: 2rem; line-height: 1.25; margin: 0 0 .3rem; } @media (min-width: 768px) { .article h1 { font-size: 2.8rem; } }
.article .by { color: var(--ink2); margin: 0 0 1rem; }
.article .lede { font-size: 1.02rem; margin: 0 0 1.25rem; }
.article .lens { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; }
.article .lens a { font-size: .8rem; padding: .25rem .7rem; border-radius: 999px; background: #fffaf3; border: 1px solid var(--rule); }
.article .lens a:hover { border-color: var(--ink2); }
.notice { font-size: .85rem; border-radius: .9rem; padding: .75rem 1rem; background: #fff1d6; border: 1px solid #f0d49a; color: #6b4a00; margin-bottom: 1.5rem; }
.sec { font-family: var(--serif); font-size: 1.3rem; margin: 2.25rem 0 1rem; }
.verses { display: grid; gap: 1.4rem; background: #fffaf3; border: 1px solid var(--rule); border-radius: 1.2rem; padding: 1.5rem 1.4rem;
  }
.verse .lb { font-size: .72rem; letter-spacing: .16em; font-weight: 700; color: #7a5fb0; margin-bottom: .2rem; }
.verse.ch .lb { color: #b0466a; }
.verse p { margin: 0; font-family: var(--serif); font-size: 1.08rem; line-height: 2rem; white-space: pre-line; }
.story { white-space: pre-line; color: var(--ink2); }
.steps-tl { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--rule); display: grid; gap: .9rem; }
.steps-tl li { position: relative; font-size: .9rem; }
.steps-tl li::before { content: ''; position: absolute; left: -1.42rem; top: .45rem; width: .7rem; height: .7rem; border-radius: 999px; background: var(--rose); box-shadow: 0 0 0 3px var(--paper); }
.steps-tl .d { font-size: .78rem; color: var(--ink2); display: block; }
.missing { text-align: center; padding: 6rem 1rem; color: var(--ink2); }
.missing b { display: block; font-family: var(--serif); font-size: 1.4rem; color: var(--ink); margin-bottom: .4rem; }

/* 자유 이용 */
.rules { display: grid; gap: 1rem; } @media (min-width: 768px) { .rules { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.rule { background: #fffaf3; border: 1px solid var(--rule); border-radius: 1.2rem; padding: 1.4rem; }
.rule .ic { font-size: 1.6rem; } .rule h3 { font-family: var(--serif); font-size: 1.15rem; margin: .5rem 0 .35rem; } .rule p { margin: 0; font-size: .9rem; color: var(--ink2); }
.caution { margin-top: 1.5rem; border-radius: 1.2rem; padding: 1.25rem 1.4rem; background: #2b2540; color: #f0e9ff; font-size: .9rem; }
.caution b { display: block; font-family: var(--serif); font-size: 1.05rem; margin-bottom: .4rem; color: var(--gold); }
.caution ul { margin: .4rem 0 0; padding-left: 1.1rem; } .caution li { margin: .2rem 0; }
.caution a { color: var(--peach); text-decoration: underline; text-underline-offset: 3px; }

/* 만들어 보기 */
.flow { display: grid; gap: 1rem; counter-reset: s; } @media (min-width: 640px) { .flow { grid-template-columns: repeat(2, 1fr); } } @media (min-width: 1024px) { .flow { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.fstep { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 1.2rem; padding: 1.4rem; position: relative; }
.fstep::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--serif); font-size: 1.8rem; color: var(--rose); opacity: .8; }
.fstep h3 { font-family: var(--serif); font-size: 1.15rem; margin: .2rem 0 .4rem; } .fstep p { margin: 0; color: var(--muted); font-size: .9rem; }
.fstep .tip { display: block; margin-top: .7rem; font-size: .8rem; color: var(--gold); }
.tool { background: #fffaf3; color: var(--ink); border: 1px solid var(--rule); border-radius: 1.4rem; padding: 1.25rem; }
@media (min-width: 640px) { .tool { padding: 1.75rem; } }
.tool h3 { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 .3rem; } .tool > p { margin: 0 0 1rem; color: var(--ink2); font-size: .9rem; }
.notebook { display: grid; gap: 1rem; } @media (min-width: 900px) { .notebook { grid-template-columns: 1.2fr .8fr; } }
.notebook textarea { width: 100%; min-height: 18rem; resize: vertical; border: 1px solid var(--rule); border-radius: 1rem; padding: 1rem 1.1rem; font-family: var(--serif); font-size: 1.05rem; line-height: 2rem; color: var(--ink); background: #fffdf8;
  background-image: repeating-linear-gradient(180deg, transparent 0 2rem, rgba(140,118,90,.18) 2rem calc(2rem + 1px)); background-attachment: local; background-position: 0 .95rem; }
.notebook textarea:focus { outline: 2px solid #c98aa0; outline-offset: 1px; }
.nb-side { display: flex; flex-direction: column; gap: .75rem; }
.prompt { border-radius: 1rem; padding: 1rem; background: linear-gradient(135deg, #ffe4d4, #ffe1ea); }
.prompt small { font-size: .72rem; letter-spacing: .14em; color: #9b3a5c; } .prompt p { margin: .3rem 0 .6rem; font-family: var(--serif); font-size: 1.05rem; }
.lines { list-style: none; margin: 0; padding: 0; max-height: 14rem; overflow: auto; border: 1px solid var(--rule); border-radius: 1rem; background: #fffdf8; }
.lines li { display: flex; justify-content: space-between; gap: .75rem; padding: .4rem .8rem; font-size: .82rem; border-bottom: 1px dashed var(--rule); }
.lines li:last-child { border-bottom: 0; } .lines li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lines li .c { color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines li.rep { background: #ffeef3; } .lines li.rep .c::after { content: ' · 반복'; color: #b0466a; }
.nb-stats { font-size: .82rem; color: var(--ink2); }
.small-btns { display: flex; flex-wrap: wrap; gap: .45rem; }
.sbtn { min-height: 36px; padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--rule); background: #fffaf3; color: var(--ink); font-size: .82rem; font-weight: 600; cursor: pointer; }
.sbtn:hover { border-color: var(--ink2); }
.chords { display: grid; gap: 1rem; } @media (min-width: 900px) { .chords { grid-template-columns: .9fr 1.1fr; align-items: start; } }
.ctl { display: grid; gap: .75rem; }
.ctl label { font-size: .8rem; font-weight: 600; color: var(--ink2); display: grid; gap: .3rem; }
.ctl select, .ctl input[type="range"] { min-height: 40px; border-radius: .75rem; border: 1px solid var(--rule); background: #fffdf8; padding: .4rem .7rem; color: var(--ink); width: 100%; }
.prog { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.prog .ch { aspect-ratio: 1.25; border-radius: 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f1e7da; border: 1px solid var(--rule); transition: transform .15s, background .15s; }
.prog .ch b { font-family: var(--serif); font-size: 1.5rem; } .prog .ch small { font-size: .72rem; color: var(--ink2); }
.prog .ch.on { background: linear-gradient(140deg, var(--rose), var(--peach)); color: #2b1630; transform: scale(1.05); border-color: transparent; }
.prog-note { font-size: .82rem; color: var(--ink2); margin: .75rem 0 0; }
.check { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.check li { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: .9rem; padding: .75rem .9rem; }
.check li::before { content: '✓'; color: var(--mint); font-weight: 700; }
.check a { color: var(--peach); text-decoration: underline; text-underline-offset: 3px; }

/* 함께하기 띠 · 바닥글 */
.together { text-align: center; padding: 4.5rem 0; background: linear-gradient(120deg, #f58fa6, #ffb38a 70%, #ffd58a); color: #2b1630; position: relative; overflow: hidden; }
@media (min-width: 1024px) { .together { padding: 6rem 0; } }
.together .bg-note { position: absolute; font-family: var(--serif); font-size: 12rem; opacity: .12; line-height: 1; }
.together .bg-note.a { left: -1rem; top: -2rem; transform: rotate(-14deg); } .together .bg-note.b { right: -1rem; bottom: -4rem; transform: rotate(12deg); }
.together .in { position: relative; max-width: 44rem; margin: 0 auto; padding: 0 1rem; }
.together h2 { font-family: var(--serif); font-size: 1.9rem; margin: 0 0 .8rem; } @media (min-width: 640px) { .together h2 { font-size: 2.6rem; } }
.together p { margin: 0 auto 2rem; font-size: 1rem; max-width: 34rem; }
.together .ctas { justify-content: center; }
footer.foot { background: #0f0c20; color: var(--dim); padding: 2.5rem 0; font-size: .85rem; }
footer.foot .row { display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: space-between; text-align: center; }
@media (min-width: 768px) { footer.foot .row { flex-direction: row; text-align: left; } }
footer.foot .fm { display: flex; align-items: center; gap: .6rem; color: #fff; font-family: var(--serif); font-weight: 700; }
footer.foot nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; justify-content: center; }
footer.foot nav a { min-height: 32px; display: inline-flex; align-items: center; color: var(--muted); } footer.foot nav a:hover { color: #fff; }

/* 페이지 머리 (목록·자유 이용·만들어 보기) */
.phead { padding: 7rem 0 3rem; text-align: center; position: relative; overflow: hidden; background: linear-gradient(180deg, #100d24, #2c2152 70%, #4a2f63); }
@media (min-width: 640px) { .phead { padding: 8rem 0 3.5rem; } }
.phead .stars { opacity: .7; }
.phead .in { position: relative; z-index: 2; max-width: 44rem; margin: 0 auto; padding: 0 1rem; }
.phead h1 { font-family: var(--serif); font-size: 2.1rem; margin: 0 0 .7rem; } @media (min-width: 640px) { .phead h1 { font-size: 2.9rem; } }
.phead p { margin: 0; color: var(--muted); }
