:root {
  color-scheme: dark;
  --achtergrond: #1b1613;
  --vlak: #2a221d;
  --rand: #4a3c32;
  --tekst: #f3ebe2;
  --tekst-zacht: #b9a999;
  --accent: #f0a93b;
  --accent-tekst: #2a1a05;
  --hals: #3b2417;
  --fret: #c9c5bd;
  --snaar: #e2d6c3;
  --inleg: #d9cdb8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--achtergrond);
  color: var(--tekst);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 16px;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 10px;
  background: var(--vlak);
}

.tabs button {
  padding: 8px 18px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--tekst-zacht);
}

.tabs button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-tekst);
  font-weight: 600;
}

.bediening {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 16px;
}

.bediening[hidden] { display: none; }

.schakelaar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.schakelaar input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.akkoorden {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.akkoorden button {
  min-width: 48px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--vlak);
  font-weight: 600;
}

.akkoorden button small {
  display: block;
  font-size: 0.75em;
  font-weight: 400;
}

.akkoorden button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-tekst);
}

/* Vaste maten, zodat de bediening niet verspringt als de lijst met ladders per akkoord verandert. */
#bediening-akkoorden { justify-content: flex-start; }
#toonladder { width: 240px; max-width: 100%; }

.keuzes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.toonsoort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toonsoort[hidden] { display: none; }

.toonsoort select {
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--vlak);
  color: inherit;
  font: inherit;
}

.speel {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: none;
  color: var(--accent);
  font-weight: 600;
}

.speel:disabled {
  border-color: var(--rand);
  color: var(--tekst-zacht);
  cursor: not-allowed;
}

.hals-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
}

#hals {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
}

.info {
  min-height: 3em;
  margin: 16px 0 0;
  font-size: 1.15rem;
}

.info strong {
  color: var(--accent);
  font-size: 1.4em;
}

.info small {
  display: block;
  color: var(--tekst-zacht);
  font-size: 0.85em;
}

/* Gitaarhals */
.hout { fill: var(--hals); }
.topkam { fill: var(--inleg); }
.fret { stroke: var(--fret); stroke-width: 3; }
.inleg { fill: var(--inleg); opacity: 0.55; }
.snaar { stroke: var(--snaar); }
.label { fill: var(--tekst-zacht); font-size: 15px; text-anchor: middle; }

.cel {
  fill: transparent;
  cursor: pointer;
  outline: none;
}

.cel:hover { fill: rgba(255, 255, 255, 0.08); }
.cel:focus-visible { stroke: var(--accent); stroke-width: 2; }

.markering { pointer-events: none; }
.stip { fill: var(--accent); }
.stip-zacht { fill: var(--vlak); stroke: var(--rand); }
.stip-grond { fill: var(--vlak); stroke: var(--accent); stroke-width: 2.5; }
.barre { fill: var(--accent); }

.stip-tekst {
  fill: var(--accent-tekst);
  font-size: 15px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.stip-zacht-tekst,
.stip-grond-tekst {
  fill: var(--tekst);
  font-size: 12px;
  text-anchor: middle;
  dominant-baseline: central;
}

.open-teken {
  fill: var(--accent);
  font-size: 20px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.gedempt-teken {
  fill: var(--tekst-zacht);
  font-size: 20px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}
