/* De cero a solista · estilo común (mismos colores que la guía) */
:root {
  --n1: #4f7a4a; --n2: #b8652a; --n3: #2f5f80; --n4: #9b2f2a;
  --ink: #1f1b16; --muted: #6b6259; --line: #ddd5cb; --paper: #faf6f0;
  --board: #2b241e; --accent: #d0782f; --cream: #f1e8da;
  --lc: var(--n1);
  --serif: 'Lora', Georgia, serif; --sans: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: #fff; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--lc); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .4em; }
button { font: inherit; }

/* cabecera oscura, como la portada de la guía */
.masthead { background: var(--ink); color: var(--cream); position: relative; overflow: hidden; }
.masthead .wrap { position: relative; z-index: 1; padding: 28px 20px 0; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.masthead h1 { font-size: clamp(30px, 6vw, 46px); color: var(--cream); margin: 6px 0 4px; }
.masthead p.sub { font-family: var(--serif); font-style: italic; color: #cbbfae; margin: 0 0 18px; font-size: 17px; }
.board { height: 26px; background: var(--board); position: relative; }
.board::before { content: ''; position: absolute; inset: 0; background:
  repeating-linear-gradient(90deg, transparent 0 58px, #8e8172 58px 60px),
  repeating-linear-gradient(180deg, transparent 0 3px, rgba(230,217,198,.55) 3px 4px); opacity: .7; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

nav.tools { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 20px; max-width: 980px; margin: 0 auto; }
nav.tools a { color: #cbbfae; text-decoration: none; padding: 10px 14px 12px; font-size: 14px; font-weight: 600; border-bottom: 3px solid transparent; }
nav.tools a:hover { color: var(--cream); }
nav.tools a.on { color: var(--cream); border-bottom-color: var(--accent); }

main { padding: 28px 0 60px; }
.panel { display: none; }
.panel.on { display: block; }
.section-k { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--lc); margin-bottom: 4px; }
.lead { color: var(--muted); max-width: 680px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 18px 0; }
.card > header { background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 18px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card > header b { font-family: var(--serif); font-size: 18px; }
.card > header .code { font-family: var(--serif); font-weight: 700; color: var(--lc); font-size: 18px; }
.card > header .meta { margin-left: auto; color: var(--muted); font-size: 13px; }
.card .body { padding: 16px 18px; }
.note { background: var(--paper); border-left: 4px solid var(--lc); padding: 12px 16px; border-radius: 0 4px 4px 0; margin: 16px 0; }
.note b.k { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--lc); margin-bottom: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--cream); border-radius: 4px; padding: 9px 16px; cursor: pointer; font-weight: 600; font-size: 15px; }
.btn:hover { background: #3a332b; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { background: var(--paper); }
.btn.lc { background: var(--lc); border-color: var(--lc); }
.btn:disabled { opacity: .45; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 7px 12px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--ink); color: var(--cream); }
input[type=range] { accent-color: var(--lc); width: 100%; }

/* afinador */
.tuner { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 760px) { .tuner { grid-template-columns: 1.2fr 1fr; } }
.gauge { background: var(--ink); color: var(--cream); border-radius: 6px; padding: 22px; text-align: center; }
.gauge .big { font-family: var(--serif); font-size: 84px; font-weight: 700; line-height: 1; min-height: 84px; }
.gauge .big small { font-size: 28px; color: #cbbfae; margin-left: 6px; }
.gauge .hz { color: #cbbfae; font-size: 14px; min-height: 20px; }
.meter { position: relative; height: 54px; margin: 18px 6px 6px; }
.meter .scale { position: absolute; inset: 22px 0 auto; height: 2px; background: #5a4f44; }
.meter .tick { position: absolute; top: 14px; width: 1px; height: 18px; background: #8e8172; }
.meter .tick.mid { top: 6px; height: 34px; width: 3px; margin-left: -1px; background: var(--cream); }
.meter .needle { position: absolute; top: 4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--accent); transition: left .12s linear, background .2s; top: 15px; }
.meter .needle.ok { background: #7fb377; box-shadow: 0 0 0 6px rgba(127,179,119,.25); }
.meter .lbl { position: absolute; top: 40px; font-size: 11px; color: #8e8172; transform: translateX(-50%); }
.gauge .state { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; min-height: 20px; }
.strings { display: grid; gap: 8px; }
.string-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; text-align: left; }
.string-row:hover { background: var(--paper); }
.string-row.target { border-color: var(--lc); box-shadow: inset 4px 0 0 var(--lc); }
.string-row.done .check { color: var(--lc); }
.string-row .num { font-weight: 700; color: var(--lc); }
.string-row .nm { font-family: var(--serif); font-size: 18px; }
.string-row .nm span { font-family: var(--sans); color: var(--muted); font-size: 14px; margin-left: 6px; }
.string-row .check { color: var(--line); font-size: 18px; }

/* metrónomo */
.metro { text-align: center; }
.metro .bpm { font-family: var(--serif); font-size: 96px; font-weight: 700; line-height: 1; }
.metro .bpm small { font-family: var(--sans); font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.metro .tempo-name { color: var(--muted); min-height: 24px; }
.dots { display: flex; gap: 14px; justify-content: center; margin: 22px 0; }
.dots span { width: 22px; height: 22px; border-radius: 50%; background: var(--line); transition: background .05s; }
.dots span.first { width: 28px; height: 28px; margin-top: -3px; }
.dots span.on { background: var(--lc); }
.dots span.first.on { background: var(--accent); }
.metro .controls { max-width: 520px; margin: 0 auto; }
.trainer { margin-top: 14px; }

/* tablatura */
svg.tab { display: block; max-width: min(100%, 820px); height: auto; font-family: var(--sans); }
.tab-line { stroke: #6b6259; stroke-width: .8; }
.tab-bar { stroke: var(--ink); stroke-width: 1.2; }
.tab-bar-end { stroke: var(--ink); stroke-width: 3; }
.tab-tab { font-size: 10px; font-weight: 700; fill: var(--ink); }
.tab-ts { font-size: 14px; font-weight: 700; fill: var(--ink); font-family: var(--serif); }
.tab-bg { fill: #fff; transition: fill .05s; }
.tab-num { font-size: 12px; font-weight: 700; text-anchor: middle; fill: var(--ink); }
.tab-rh { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 14px; text-anchor: middle; }
.tab-lh { font-size: 11px; font-weight: 700; text-anchor: middle; }
.tab-name { font-size: 10px; text-anchor: middle; fill: var(--ink); }
.tab-count { font-size: 10px; text-anchor: middle; fill: var(--muted); }
.tab-note.on .tab-bg { fill: var(--lc); }
.tab-note.on .tab-num { fill: #fff; }
.tab-note.hit .tab-bg { fill: #dfeadb; }
.tab-note.miss .tab-bg { fill: #f3d9d2; }
.tabwrap { overflow-x: auto; }

/* acordes */
.chords { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.chordcard { border: 1px solid var(--line); border-radius: 6px; padding: 12px 8px 8px; text-align: center; background: #fff; }
.chordcard .lvl { font-size: 11px; color: var(--muted); }
.chordcard .row { justify-content: center; gap: 6px; margin-top: 4px; }
.chordcard .btn { padding: 5px 10px; font-size: 13px; }
svg.chord { font-family: var(--sans); }
.chord-name { font-family: var(--serif); font-weight: 700; font-size: 18px; fill: var(--ink); }
.chord-x { font-size: 14px; fill: var(--muted); }
.chord-finger { font-size: 10px; font-weight: 700; fill: #fff; }
.chord-str { font-size: 10px; fill: var(--muted); }

/* diapasón */
.fretboard { overflow-x: auto; padding-bottom: 8px; }
.fretboard svg { display: block; min-width: 760px; }
.fb-note { cursor: pointer; }
.fb-note circle { transition: r .1s; }
.fb-note:hover circle { stroke: var(--accent); stroke-width: 2; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 18px 0 30px; }
.msg { padding: 10px 14px; border-radius: 4px; background: #f3e4d6; color: #6b3d16; margin: 12px 0; display: none; }
.msg.on { display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.tab-lines svg.tab { margin-bottom: 8px; }
