/* Guitar Wiki — "Warm tech"
   Layout idea: a piece of hardware. Warm grey casing, solid white rounded modules, one black control
   strip (the search bar), and a single coral accent used like an LED: buttons, scores, the active item.
   Numbers (votes, frets, counts) stay in mono like readouts. */
:root {
  --bg: #f1efe8;
  --surface: #ffffff;
  --ink: #23221f;
  --muted: #6f6d66;
  --line: #e4e1d8;
  --line-strong: #cfcbc0;
  --accent: #c64f2a;
  --accent-ink: #ffffff;
  --accent-soft: #faece7;
  --accent-strong: #8a3418;
  --panel: #2c2c2a;
  --panel-ink: #f1efe8;
  --panel-muted: #b4b2a9;
  --good: #3b6d11;
  --warn: #854f0b;
  --bad: #a32d2d;
  --sheet: #ffffff;
  --card-radius: 16px;
  --display: 'Bricolage Grotesque', 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Hiragino Sans', 'Yu Gothic', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --body: 'IBM Plex Sans', 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Hiragino Sans', 'Yu Gothic', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --radius: 10px;
  color-scheme: light;
}
/* 기기 설정을 따라갑니다: 밝은 모드면 웜톤, 다크 모드면 그라파이트.
   페이지 맨 위의 짧은 스크립트가 기기 설정을 보고 <html data-theme="dark|light"> 를 붙입니다. */
/* 다크 테마 "그라파이트": 연필심 같은 중성 회색. 카드 대신 가는 선으로 구분하고 산호색은 숫자·버튼에만. */
:root[data-theme='dark'] {
  --bg: #161718;
  --surface: #1d1e20;
  --ink: #e6e6e3;
  --muted: #8f9195;
  --line: #2a2c2f;
  --line-strong: #3a3c40;
  --accent: #e8825a;
  --accent-ink: #161718;
  --accent-soft: #2c221d;
  --accent-strong: #f2a483;
  --panel: #232426;
  --panel-ink: #e6e6e3;
  --panel-muted: #8f9195;
  --good: #8fc48a;
  --warn: #e3b35a;
  --bad: #ef8f8f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  overflow-wrap: anywhere;
}
:lang(ko) body, body:lang(ko) { word-break: keep-all; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:not(:hover) { text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); }
h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; }
p { margin: 0 0 1rem; }
code, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -40px; background: var(--accent); color: var(--accent-ink); padding: 6px 10px; z-index: 30; border-radius: var(--radius); }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main.wrap { padding-block: 28px 64px; min-height: 70vh; }

/* ---------- header ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.top-in { display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; padding-block: 10px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.02em; }
.logo-mark { color: var(--ink); flex: none; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: var(--radius); white-space: nowrap; font-weight: 500; font-size: .95rem; position: relative; }
.nav a:hover { color: var(--ink); background: var(--bg); text-decoration: none; }
.nav a[aria-current='page'] { color: var(--ink); }
.nav a[aria-current='page']::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -11px; height: 2px; background: var(--accent); }
.search { flex: 1 1 180px; max-width: 320px; margin-left: auto; }
.search input { width: 100%; }
.me { display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.menu { position: relative; }
.menu summary { cursor: pointer; list-style: none; color: var(--ink); font-weight: 500; padding: 4px 2px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ' ▾'; color: var(--muted); font-size: .8em; }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px; min-width: 170px; display: grid; box-shadow: 0 8px 24px rgb(10 20 40 / .12); }
.menu-list a, .menu-list .linkish { padding: 8px 10px; color: var(--ink); text-align: left; border-radius: 4px; }
.menu-list a:hover, .menu-list .linkish:hover { background: var(--bg); text-decoration: none; }
.menu-list form { margin: 0; display: grid; }

/* ---------- controls ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input[type='search'], input:not([type]), input[type='text'], select, textarea {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 10px;
  max-width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 7px 14px; cursor: pointer; line-height: 1.3; font-weight: 500; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: var(--line-strong); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: .88rem; }
.btn:disabled { opacity: .45; cursor: default; }
.btn .num { font-weight: 500; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: .9rem; }
.linkish:hover { color: var(--bad); }

/* ---------- page heads ---------- */
.page-title { margin-bottom: 18px; }
.page-head { padding-bottom: 20px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.page-head .sub { margin: 6px 0 0; }
.eyebrow { font-size: .85rem; color: var(--muted); margin: 0 0 6px; font-weight: 500; }
.eyebrow a { color: var(--muted); }
.eyebrow a:hover { color: var(--accent); }
.sub { color: var(--muted); }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.actions form { margin: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 12px; }
.section-head h2 { margin: 0; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .9rem; }
.desc { white-space: pre-wrap; max-width: 70ch; }
.label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 8px 0 28px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); line-height: 1.08; letter-spacing: -0.025em; margin-bottom: 14px; }
.hero p { color: var(--muted); max-width: 52ch; font-size: 1.05rem; }
.hero-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-weight: 500; }
.hero-links a::after { content: ' →'; }
.hero-staff { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 18px 10px; font-family: var(--mono); }
.hs-line { display: flex; align-items: center; height: 26px; }
.hs-name { width: 22px; text-align: center; color: var(--muted); font-size: .8rem; flex: none; }
.hs-track { flex: 1; display: grid; grid-template-columns: repeat(8, 1fr); background: linear-gradient(var(--line-strong), var(--line-strong)) center / 100% 1px no-repeat; border-left: 3px double var(--line-strong); border-right: 1px solid var(--line-strong); height: 100%; }
.hs-cell { display: grid; place-items: center; }
.hs-cell b { background: var(--surface); color: var(--accent); padding: 0 4px; font-weight: 500; font-size: .95rem; line-height: 1; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 20px 0 12px; }
.choice { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.choice a { padding: 5px 12px; color: var(--muted); font-size: .9rem; }
.choice a + a { border-left: 1px solid var(--line); }
.choice a:hover { color: var(--ink); text-decoration: none; }
.choice a[aria-current='true'] { background: var(--ink); color: var(--surface); }
/* dropdown filters: click to open a list below */
.dd { position: relative; }
.dd > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 7px 12px; font-size: .92rem; user-select: none; white-space: nowrap;
}
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary:hover { border-color: var(--ink); }
.dd-label { color: var(--muted); }
.dd-value { font-weight: 600; }
.dd.set > summary { border-color: var(--accent); background: var(--accent-soft); }
.dd.set .dd-value { color: var(--accent); }
.dd-caret { color: var(--muted); transition: transform .15s; }
.dd[open] .dd-caret { transform: rotate(180deg); }
.dd-list {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 15; min-width: 100%;
  list-style: none; margin: 0; padding: 6px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 10px 28px rgb(10 20 40 / .14);
}
.dd-list a { display: block; padding: 7px 12px 7px 28px; border-radius: 4px; color: var(--ink); white-space: nowrap; position: relative; }
.dd-list a:hover { background: var(--bg); text-decoration: none; }
.dd-list a[aria-current='true'] { font-weight: 600; color: var(--accent); }
.dd-list a[aria-current='true']::before { content: '✓'; position: absolute; left: 10px; }

/* home search */
.search-spacer { flex: 1; }
.finder { margin: 8px 0 22px; }
.hero .finder { margin: 20px 0 18px; }
.hero { align-items: start; }
.hero .hero-staff { margin-top: 8px; }
.finder-form { margin: 0; }
.finder-box { position: relative; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 6px 6px 6px 14px; }
.finder-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.finder-icon { color: var(--muted); flex: none; }
.finder-box input[type='search'] { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.08rem; padding: 10px 4px; box-shadow: none; }
.finder-box input[type='search']:focus { box-shadow: none; }
.finder-box .btn { padding: 10px 20px; font-size: 1rem; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 16; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 12px 32px rgb(10 20 40 / .16); }
.suggest a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 9px 12px; border-radius: 6px; color: var(--ink); }
.suggest a span { color: var(--muted); font-size: .88rem; }
.suggest a:hover, .suggest li[aria-selected='true'] a { background: var(--bg); text-decoration: none; }
.finder-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.finder-reset { font-size: .9rem; margin-left: 4px; }
.finder-tip { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
.results-title { font-size: 1.25rem; margin: 0 0 12px; }
.results-title .muted { font-family: var(--body); font-weight: 400; font-size: 1rem; }
form.inline { display: flex; gap: 8px; margin: 0 0 8px; max-width: 520px; }
form.inline input { flex: 1; min-width: 0; }

/* ---------- rows (tab lists): drawn like strings on a staff ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.rows > li { border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 4px; color: var(--ink); }
a.row:hover { background: var(--surface); text-decoration: none; }
a.row:hover strong { color: var(--accent); }
.score { display: grid; justify-items: center; line-height: 1.1; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.score b { font-size: 1.25rem; font-weight: 500; color: var(--ink); }
.score small { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-family: var(--body); }
.main { display: grid; gap: 4px; min-width: 0; }
.titleline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.titleline strong { font-size: 1.05rem; font-weight: 600; }
.artist { color: var(--muted); }
.sub-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .85rem; }
.chordline { font-family: var(--mono); color: var(--muted); font-size: .82rem; white-space: pre; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 7px; color: var(--muted); white-space: nowrap; line-height: 1.6; }
.badge.kind { border-color: var(--good); color: var(--good); }
.pips { display: inline-flex; gap: 2px; }
.pips i { width: 4px; height: 10px; border-radius: 1px; background: var(--line-strong); }
.pips i.on { background: var(--ink); }
.badge.d3 .pips i.on { background: var(--bad); }
.empty { color: var(--muted); padding: 40px 0; text-align: center; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.empty p { margin-bottom: 12px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--muted); font-size: .92rem; }
.history { margin-top: 28px; color: var(--muted); font-size: .9rem; }
.history summary { cursor: pointer; }
.plain-list { padding-left: 1.2em; }

/* ---------- forms ---------- */
.narrow { max-width: 600px; }
.narrow-left { max-width: 480px; }
.notice-page { padding: 32px 0; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 5px; font-weight: 600; font-size: .95rem; }
.form label small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.form input, .form select, .form textarea { font-weight: 400; width: 100%; }
.form .btn { justify-self: start; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { margin: 0; font-size: .92rem; }
.check.ok { color: var(--good); }
.check.bad { color: var(--bad); }
.hp { position: absolute; left: -9999px; }
.notice { border-left: 3px solid var(--line-strong); padding: 8px 12px; color: var(--muted); font-size: .92rem; background: var(--surface); }
.error { color: var(--bad); font-weight: 600; }

/* ---------- tab page ---------- */
.tab-head .desc { margin-top: 12px; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; }
.chip-row .label { margin-right: 4px; }
.chip { font-family: var(--mono); border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 8px; font-size: .88rem; color: var(--ink); background: var(--surface); }
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.player { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.controls, .downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.controls { position: sticky; top: calc(57px + env(safe-area-inset-top, 0px)); background: var(--surface); z-index: 5; border-radius: var(--radius) var(--radius) 0 0; }
.controls label { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.controls select { padding: 3px 8px; }
.keybox { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.keybox output { min-width: 5.5em; text-align: center; color: var(--ink); font-family: var(--mono); font-size: .85rem; }
.keybox .btn.small { padding: 2px 9px; font-family: var(--mono); }
.check-label { cursor: pointer; }
.downloads { font-size: .9rem; }
.time { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.status { margin: 0; padding: 10px 16px; color: var(--muted); font-size: .9rem; border-bottom: 1px solid var(--line); }
/* 악보는 종이처럼 항상 흰 바탕에 그립니다. */
.sheet { background: var(--sheet); color: #000; border-radius: 0 0 var(--radius) var(--radius); overflow-x: auto; padding: 8px; min-height: 220px; }
.at-cursor-bar { background: rgb(37 82 163 / .1); }
.at-cursor-beat { background: rgb(37 82 163 / .8); width: 3px; }
.at-highlight * { fill: #2552a3; stroke: #2552a3; }

/* chord panel */
.chords { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chords-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.chords-head h2 { margin: 0; font-size: 1rem; }
.chords-head .hint { color: var(--muted); font-size: .88rem; }
.chords-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.chords-tools label { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }
.chords-tools select { padding: 3px 8px; }
.capo-hint { margin: -4px 0 12px; font-size: .9rem; color: var(--accent); font-family: var(--mono); }
.chord-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.chord-card, .alt {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 6px; cursor: pointer; font: inherit; flex: 0 0 auto; scroll-snap-align: start;
}
.chord-card:hover, .alt:hover { border-color: var(--ink); }
.chord-card.open, .alt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chord-card.changed .chord-name::after { content: '•'; color: var(--accent); margin-left: 3px; }
.chord-name { font-family: var(--mono); font-weight: 500; font-size: 1rem; }
.chord-tag, .alt-level, .lvl { font-size: .72rem; border-radius: 3px; padding: 0 6px; border: 1px solid var(--line-strong); color: var(--muted); }
.lv1 { border-color: var(--good); color: var(--good); }
.lv2 { border-color: var(--warn); color: var(--warn); }
.lv3 { border-color: var(--bad); color: var(--bad); }
.chord-alts { margin-top: 10px; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.alts-head { margin: 0 0 10px; font-weight: 600; font-size: .9rem; }
.alts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; }
.alt-label { font-size: .76rem; color: var(--muted); text-align: center; line-height: 1.3; }

/* comments */
.comments { margin-top: 36px; max-width: 760px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 18px; border-top: 1px solid var(--line-strong); }
.comment-list li { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .88rem; color: var(--muted); margin: 0 0 4px; }
.comment-meta strong { color: var(--ink); }
.comment-meta form { margin: 0 0 0 auto; }
.comment-body { white-space: pre-wrap; margin: 0; }

/* ---------- requests ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 76px; }
.panel h2 { margin: 0 0 14px; font-size: 1.1rem; }
.req-row { padding-inline: 4px; }
.score-form { margin: 0; display: grid; justify-items: center; }
.score.vote { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 4px 10px; cursor: pointer; min-width: 52px; }
.score.vote:hover:not(:disabled) { border-color: var(--accent); }
.score.vote.on { background: var(--accent-soft); border-color: var(--accent); }
.score.vote.on b { color: var(--accent); }
.score.vote:disabled { cursor: default; opacity: .7; }
.req-note { color: var(--muted); }
.req-actions { align-items: center; }
.req-actions form { margin: 0; }
.admin-row { grid-template-columns: minmax(0, 1fr) auto; }

/* ---------- long text ---------- */
.prose { max-width: 70ch; }
.prose.wide { max-width: none; }
.prose h1 { margin-bottom: 14px; }
.prose h2 { font-size: 1.2rem; margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1rem; }
.prose li + li { margin-top: 6px; }
.prose .lead { margin-bottom: 1.5rem; }
.next-guide { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line-strong); display: grid; gap: 2px; }
.next-guide span { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.next-guide a { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1rem; }
.table-wrap table { border-collapse: collapse; background: var(--surface); font-size: .9rem; min-width: 100%; }
.table-wrap th, .table-wrap td { border: 1px solid var(--line); padding: 6px 10px; text-align: center; white-space: nowrap; font-family: var(--mono); }
.table-wrap thead th { background: var(--bg); font-family: var(--body); font-weight: 600; }

/* chord dictionary */
.chord-table-wrap { margin: 20px 0 28px; }
.chord-table td a { display: block; color: var(--ink); }
.chord-table td a:hover { color: var(--accent); }
.chord-table tbody th { color: var(--accent); }
.defs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 28px; margin: 0; }
.defs div { border-top: 1px solid var(--line); padding-top: 10px; }
.defs dt { font-weight: 600; }
.defs dt code { color: var(--muted); font-size: .85em; margin-left: 4px; }
.defs dd { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.chord-head h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 12px; }
.chord-big { font-family: var(--mono); font-weight: 500; font-size: clamp(2.4rem, 1.8rem + 3vw, 3.6rem); letter-spacing: -0.03em; color: var(--accent); }
.chord-sub { font-size: 1.1rem; color: var(--muted); font-weight: 500; }
.notes-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.note-pill { font-family: var(--mono); background: var(--ink); color: var(--surface); border-radius: 50%; width: 2.2em; height: 2.2em; display: grid; place-items: center; font-size: .85rem; }
.voicing-grid { list-style: none; padding: 0; margin: 20px 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line); }
.voicing { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 18px 12px; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.voicing strong { font-size: .9rem; font-weight: 600; }
.voicing code { color: var(--muted); font-size: .85rem; }
.voicing-svg { color: var(--ink); }

/* guides */
.guide-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line-strong); }
.guide-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.guide-list h2 { margin: 0; font-size: 1.2rem; }
.guide-list p { grid-column: 2; margin: 0; color: var(--muted); }
.guide-step { font-family: var(--mono); font-size: .82rem; color: var(--muted); padding-top: 4px; }

/* ---------- footer ---------- */
.foot { background: var(--surface); border-top: 1px solid var(--line); padding-block: 36px 40px; font-size: .9rem; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 24px 48px; }
.foot-brand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 8px; font-family: var(--display); font-weight: 700; }
.foot-brand p { grid-column: 1 / -1; font-family: var(--body); font-weight: 400; color: var(--muted); margin: 6px 0 0; max-width: 40ch; }
.foot-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 20px; align-content: start; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--ink); }
.langs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.langs a { color: var(--muted); }
.langs a[aria-current='true'] { color: var(--ink); font-weight: 600; }
.copy { grid-column: 1 / -1; color: var(--muted); margin: 0; font-size: .85rem; }

/* ---------- warm tech: shapes ---------- */
/* header sits on the casing color; the current section is a white pill */
.top { background: var(--bg); border-bottom: 0; }
.nav a { border-radius: 999px; padding: 6px 12px; }
.nav a:hover { background: var(--surface); }
.nav a[aria-current='page'] { background: var(--surface); color: var(--ink); }
.nav a[aria-current='page']::after { content: none; }
.btn { border-radius: var(--radius); }
.btn.primary:hover { filter: brightness(1.06); }
input[type='search'], input:not([type]), input[type='text'], select, textarea { border-radius: var(--radius); }

/* hero: tight, heavy headline */
.hero { border-bottom: 0; padding-bottom: 12px; }
.hero h1 { letter-spacing: -0.035em; line-height: 1.04; }
.hero-staff { border: 0; border-radius: var(--card-radius); padding: 22px 18px 22px 12px; }
.page-head { border-bottom: 0; }

/* the black control strip */
.finder-box { background: var(--panel); color: var(--panel-ink); border: 0; border-radius: var(--card-radius); padding: 7px 7px 7px 16px; }
.finder-box:focus-within { box-shadow: 0 0 0 4px var(--accent-soft); }
.finder-icon { color: var(--panel-muted); }
.finder-box input[type='search'] { color: var(--panel-ink); }
.finder-box input[type='search']::placeholder { color: var(--panel-muted); }
.finder-box .btn.primary { border-radius: 12px; }

/* dropdown buttons: soft white keys */
.dd > summary { border-color: transparent; border-radius: var(--radius); }
.dd > summary:hover { border-color: var(--line-strong); }
.dd.set > summary { background: var(--accent-soft); border-color: transparent; }
.dd.set .dd-label { color: var(--accent-strong); }
.dd-list, .suggest, .menu-list { border: 0; border-radius: 14px; box-shadow: 0 14px 36px rgb(35 34 31 / .18); }
.dd-list a, .suggest a, .menu-list a, .menu-list .linkish { border-radius: 8px; }

/* lists are stacks of white modules */
.rows { border-top: 0; display: grid; gap: 8px; }
.rows > li { border-bottom: 0; }
.row { background: var(--surface); border-radius: var(--card-radius); padding: 14px 18px 14px 14px; }
a.row:hover { background: var(--surface); box-shadow: 0 0 0 1.5px var(--line-strong); }
.score { background: var(--accent-soft); border-radius: 12px; padding: 7px 4px 6px; }
.score b { color: var(--accent-strong); }
.score small { color: var(--accent-strong); opacity: .8; }
.score.vote { border: 0; background: var(--accent-soft); }
.score.vote.on { background: var(--accent); }
.score.vote.on b, .score.vote.on small { color: var(--accent-ink); }
.badge { border: 0; background: var(--bg); border-radius: 8px; padding: 1px 8px; }
.badge.kind { background: var(--accent-soft); color: var(--accent-strong); }
.empty { background: var(--surface); border: 0; border-radius: var(--card-radius); }
.notice { border-left: 0; border-radius: var(--radius); }

/* tab page */
.chip { border: 0; border-radius: 8px; }
.chip:hover { background: var(--accent-soft); color: var(--accent-strong); }
.player { border: 0; border-radius: var(--card-radius); }
.controls { border-radius: var(--card-radius) var(--card-radius) 0 0; }
.sheet { border-radius: 0 0 var(--card-radius) var(--card-radius); }
.at-cursor-bar { background: rgb(198 79 42 / .1); }
.at-cursor-beat { background: rgb(198 79 42 / .85); }
.at-highlight * { fill: #c64f2a; stroke: #c64f2a; }
.chord-card, .alt { border-radius: 12px; }
.chord-alts { border: 0; border-radius: 14px; }
.lv1, .lv2, .lv3 { border-radius: 6px; }
.comment-list { border-top: 0; display: grid; gap: 8px; }
.comment-list li { background: var(--surface); border-radius: 14px; border-bottom: 0; padding: 12px 16px; }
.panel { border: 0; border-radius: var(--card-radius); }

/* dictionary and guides */
.table-wrap table { border-radius: 12px; overflow: hidden; }
.note-pill { background: var(--accent); color: var(--accent-ink); }
.voicing-grid { border: 0; gap: 8px; }
.voicing { border: 0; border-radius: 14px; }
.defs div { background: var(--surface); border-top: 0; border-radius: 12px; padding: 12px 14px; }
.guide-list { border-top: 0; display: grid; gap: 8px; }
.guide-list li { background: var(--surface); border-bottom: 0; border-radius: var(--card-radius); padding: 20px; }
.next-guide { border-top: 0; background: var(--surface); border-radius: 14px; padding: 16px 18px; }

/* footer: a light module at the bottom */
.foot { background: var(--surface); border-top: 0; }
.langs { border-top-color: var(--line); }

/* ---------- graphite (dark) shapes: lines instead of cards ---------- */
[data-theme='dark'] .top { background: var(--bg); border-bottom: 1px solid var(--line); }
[data-theme='dark'] .nav a[aria-current='page'] { background: transparent; color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
[data-theme='dark'] .nav a:hover { background: transparent; color: var(--ink); }
[data-theme='dark'] .btn.primary.small { background: transparent; color: var(--accent); border-color: var(--accent); }
[data-theme='dark'] .finder-box { border: 1px solid #34363a; }
[data-theme='dark'] .dd > summary { background: transparent; border-color: var(--line-strong); }
[data-theme='dark'] .dd.set > summary { background: transparent; border-color: var(--accent); }
[data-theme='dark'] .dd.set .dd-label, [data-theme='dark'] .dd.set .dd-value { color: var(--accent); }
[data-theme='dark'] .dd-list, [data-theme='dark'] .suggest, [data-theme='dark'] .menu-list { background: var(--panel); box-shadow: 0 14px 36px rgb(0 0 0 / .5); border: 1px solid var(--line-strong); }
[data-theme='dark'] .rows { gap: 0; border-top: 1px solid var(--line); }
[data-theme='dark'] .rows > li { border-bottom: 1px solid var(--line); }
[data-theme='dark'] .row { background: transparent; border-radius: 0; padding-inline: 4px; }
[data-theme='dark'] a.row:hover { background: var(--surface); box-shadow: none; }
[data-theme='dark'] .score { background: transparent; }
[data-theme='dark'] .score b { color: var(--accent); }
[data-theme='dark'] .score small { color: var(--muted); }
[data-theme='dark'] .score.vote { border: 1px solid var(--line-strong); }
[data-theme='dark'] .score.vote.on { background: var(--accent-soft); border-color: var(--accent); }
[data-theme='dark'] .score.vote.on b { color: var(--accent); }
[data-theme='dark'] .badge { background: transparent; border: 1px solid var(--line-strong); }
[data-theme='dark'] .badge.kind { border-color: var(--accent); color: var(--accent); background: transparent; }
[data-theme='dark'] .empty, [data-theme='dark'] .guide-list li, [data-theme='dark'] .comment-list li, [data-theme='dark'] .defs div, [data-theme='dark'] .next-guide { background: transparent; border-radius: 0; border-bottom: 1px solid var(--line); }
[data-theme='dark'] .guide-list, [data-theme='dark'] .comment-list { gap: 0; border-top: 1px solid var(--line); }
[data-theme='dark'] .player, [data-theme='dark'] .panel, [data-theme='dark'] .voicing, [data-theme='dark'] .chord-card, [data-theme='dark'] .alt { border: 1px solid var(--line); }
[data-theme='dark'] .chip { background: transparent; border: 1px solid var(--line-strong); }
[data-theme='dark'] .note-pill { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
[data-theme='dark'] .foot { background: var(--bg); border-top: 1px solid var(--line); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .panel { position: static; }
  .hero { grid-template-columns: 1fr; }
  .hero-staff { display: none; }
}
@media (max-width: 640px) {
  .top { position: static; }
  .top-in { gap: 8px 12px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -6px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a[aria-current='page']::after { bottom: -2px; }
  .search { order: 4; flex-basis: 100%; max-width: none; margin-left: 0; }
  .me { margin-left: auto; }
  .controls { position: static; }
  .row { grid-template-columns: 52px minmax(0, 1fr); }
  .row .meta { grid-column: 2; justify-content: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
  .guide-list li { grid-template-columns: 1fr; }
  .guide-list p { grid-column: 1; }
  .chords-tools { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
