/* comp.css — 페이지별 부품 */

/* 홈 히어로 */
.hero { padding-block: 64px var(--s-section); }
.hero-grid { display: grid; gap: var(--s-xxl); align-items: center; }
.hero-grid > * { min-width: 0; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.today-card { display: flex; flex-direction: column; gap: var(--s-md); padding: var(--s-xl); }
.today-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.today-composer { font-size: 17px; }
.today-composer b { font-weight: 640; }

/* 홈 모듈 */
.home-mod { display: grid; gap: var(--s-xxl); align-items: center; }
@media (min-width: 960px) { .home-mod { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.tempo-pair { display: flex; flex-wrap: wrap; gap: var(--s-xl); }
.tempo-pair figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tempo-svg { max-width: 100%; height: auto; overflow: visible; }
.svg-k { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }
.svg-k2 { font-family: var(--sans); font-size: 12px; font-weight: 500; }
.tempo-solo { color: var(--ink); padding: 8px 0; }

.era-strip { display: flex; gap: 4px; min-height: 150px; }
.era-seg { flex-basis: 0; min-width: 0; color: var(--on-block); text-decoration: none; border-radius: var(--r-md); padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; transition: transform .15s ease; }
.era-seg:hover { transform: translateY(-3px); }
.era-seg b { font-weight: 620; font-size: 17px; line-height: 1.25; }
.era-strip-note { margin-top: 12px; }
@media (max-width: 767px) {
  .era-strip { flex-direction: column; min-height: 0; }
  .era-seg { flex-grow: 0 !important; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
}

.decoder { display: flex; flex-direction: column; gap: 10px; }
.decoder-row { display: flex; gap: 8px; }
.decoder-row .input { flex: 1; min-width: 0; }
.decode-out:empty { display: none; }
.decode-card { gap: 10px; }
.decode-sys { border-top: 1px solid var(--hairline); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.block-navy .decode-sys { border-top-color: rgba(255,255,255,.18); }
.decode-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.decode-days a { text-decoration: none; font-size: 15px; }
.decode-days a:hover { text-decoration: underline; }

.badge-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.badge { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-md); border: 1px dashed var(--hairline); background: var(--canvas); }
.badge.on { background: var(--b); border: 1px solid transparent; color: var(--on-block); }
.badge-mark { flex: none; width: 36px; height: 36px; border-radius: var(--r-full); border: 1.5px dashed currentColor; display: inline-flex; align-items: center; justify-content: center; opacity: .5; }
.badge.on .badge-mark { opacity: 1; border: 0; background: var(--on-block); color: #fff; }
.badge-name { font-weight: 620; font-size: 17px; line-height: 1.3; }
.badge.compact { flex-direction: column; gap: 10px; }
.badge > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.dots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; align-self: center; justify-self: center; width: 100%; max-width: 400px; }
.dot { aspect-ratio: 1; border-radius: var(--r-xs); background: rgba(0,0,0,.08); max-width: 100%; }
.dot.on { background: var(--on-block); }
.dot:hover { outline: 2px solid var(--on-block); outline-offset: 1px; }

/* 페이지 머리 */
.page-head { padding-block: 72px 48px; }
.measure-wide { max-width: 980px; }

/* 입문 101 */
.compare th[scope="row"] { font-family: var(--mono); font-size: 12px; }
.compare td { min-width: 200px; }
.mv-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.sonata-wrap { display: grid; gap: var(--s-xl); }
@media (min-width: 1024px) { .sonata-wrap { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; } }
.svg-scroll { overflow-x: auto; }
.sonata-svg { width: 100%; min-width: 520px; height: auto; display: block; }
.svg-t { font-family: var(--sans); font-size: 13px; font-weight: 600; }
.svg-stage { font-family: var(--sans); font-size: 14px; font-weight: 420; fill: #000; opacity: .6; }
.svg-stage.on { font-weight: 700; opacity: 1; }
.sonata-svg .svg-k { fill: #000; }
.sonata-text .card-title { font-size: 24px; }
.lineage { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.seat-wrap { display: grid; gap: var(--s-xl); }
@media (min-width: 1024px) { .seat-wrap { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }
.seat-fig { min-width: 0; }
.seat-svg { width: 100%; height: auto; display: block; }
.seat-svg .svg-lab { font-family: var(--mono); font-size: 12px; fill: var(--on-navy); letter-spacing: .04em; }
.seat-svg path + .svg-lab { fill: #000; }
.svg-sec { font-family: var(--sans); font-size: 14px; font-weight: 640; fill: #000; }
.svg-pod { font-family: var(--sans); font-size: 10px; font-weight: 700; fill: #1f1d3d; }
.seat-order { margin: 0; padding-left: 1.4em; font-size: 18px; font-weight: 520; display: flex; flex-direction: column; gap: 2px; }

/* 음악사 */
.tl-scroll { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--hairline); -webkit-overflow-scrolling: touch; }
.tl-svg { display: block; max-width: none; }
.tl-era { font-family: var(--sans); font-size: 15px; font-weight: 680; fill: #000; }
.tl-yr { font-family: var(--mono); font-size: 11px; fill: #000; }
.tl-tick { font-family: var(--mono); font-size: 11px; fill: var(--ink); }
.tl-name { font-family: var(--sans); font-size: 13px; font-weight: 560; fill: #000; }
.tl-svg a:hover rect { fill: var(--magenta); }
.tl-svg a:focus-visible rect { fill: var(--magenta); }
.tl-hint { margin-top: 10px; }
.era-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.era-days a { display: block; text-decoration: none; padding: 8px 0; border-top: 1px solid rgba(0,0,0,.12); font-size: 15px; line-height: 1.45; }
.era-days a:hover { text-decoration: underline; }
.era-days b { font-weight: 620; }

/* 거장 */
.table-note { margin-top: 12px; max-width: 60em; }
.story-list { display: grid; gap: 0; }
.story { display: grid; gap: 10px; padding: var(--s-xl) 0; border-top: 1px solid var(--hairline); }
@media (min-width: 960px) { .story { grid-template-columns: 180px minmax(0, 1fr); column-gap: var(--s-xxl); } .story > :not(.caption) { grid-column: 2; } .story > .caption { grid-row: 1 / span 6; padding-top: 6px; } }

/* 퀴즈 */
.quiz-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.quiz-q { font-size: clamp(22px, 2.6vw, 30px); font-weight: 480; max-width: 32em; }
.options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.option { text-align: left; border: 0; border-radius: var(--r-md); background: rgba(255,255,255,.75); color: #000; padding: 16px 18px; font-size: 18px; font-weight: 440; cursor: pointer; min-height: 56px; line-height: 1.4; }
.option:hover { background: #fff; }
.option[aria-disabled="true"] { cursor: default; }
.option.correct { background: #000; color: #fff; }
.option.wrong { background: rgba(255,255,255,.4); text-decoration: line-through; }
.quiz-ex { font-size: 16px; }

.gl-filter { margin-bottom: var(--s-lg); }
.gl-filter .tab { background: var(--surface-soft); }
.gl-search { max-width: 480px; }
.gl-list { margin: 0; display: grid; gap: 0 var(--s-xl); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.gl-item { padding: 14px 0; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 4px; }
.gl-item dt { font-weight: 640; font-size: 17px; }
.gl-item dd { margin: 0; font-size: 16px; }

/* 1일 1클래식 */
.daily-bar { display: flex; flex-wrap: wrap; gap: var(--s-lg); align-items: center; margin-bottom: var(--s-lg); }
.part-tabs { margin-top: 4px; }
.part { padding-block: var(--s-xl); }
.part-head { display: flex; align-items: center; gap: 14px; margin-bottom: var(--s-md); }
.swatch { width: 28px; height: 28px; border-radius: var(--r-sm); flex: none; }
.part-count { margin-left: auto; }
.day-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.day-cell { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--hairline); text-decoration: none; min-height: 118px; background: var(--canvas); transition: transform .12s ease; }
.day-cell:hover { transform: translateY(-2px); border-color: var(--ink); }
.day-cell.on { background: var(--b); border-color: transparent; color: var(--on-block); }
.day-no { font-family: var(--mono); font-size: 13px; font-weight: 560; letter-spacing: .02em; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.day-comp { font-weight: 640; font-size: 16px; }
.day-title { font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.crumbs { padding-top: 24px; gap: 8px; font-size: 15px; }
.day-hero { padding-block: 56px; }
.day-hero .display-lg { font-size: clamp(32px, 4.6vw, 56px); }
.day-nav { display: flex; justify-content: space-between; gap: 12px; }

/* 알림 */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--canvas); padding: 12px 20px; border-radius: var(--r-pill); font-size: 15px; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.gl-filter .tab[aria-selected="true"] { background: var(--ink); color: var(--canvas); }
.block-navy .note { background: rgba(255,255,255,.12); color: var(--on-navy); }
