/* ============================================================
   ChordTela Design System — "Ruang Latihan Malam"
   Mobile-first, zero framework. Tema: panggung gelap + aksen amber
   seperti lampu tuning di pedalboard. Light mode = kertas partitur.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-2: #f1efeb;
  --ink: #1d1c22;
  --muted: #6b6875;
  --accent: #b97d0e;          /* amber gelap: kontras AA di atas kertas */
  --accent-soft: rgba(185, 125, 14, .12);
  --on-accent: #ffffff;       /* teks di atas aksen (light) */
  --line: rgba(29, 28, 34, .12);
  --shadow: 0 1px 2px rgba(20, 18, 26, .06), 0 8px 24px rgba(20, 18, 26, .07);
  --glass: rgba(250, 249, 247, .82);
  --danger: #b3363d;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

html.dark {
  --bg: #101014;
  --surface: #17171d;
  --surface-2: #1d1d25;
  --ink: #f2f0ec;
  --muted: #9a97a3;
  --accent: #f5b942;          /* amber terang menyala di panggung gelap */
  --accent-soft: rgba(245, 185, 66, .14);
  --on-accent: #14120c;       /* teks di atas aksen (dark) */
  --line: rgba(242, 240, 236, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .45);
  --glass: rgba(16, 16, 20, .78);
  --danger: #ff7b7b;
}

/* ---------- Reset ringkas ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  transition: background-color .25s ease, color .25s ease;
}
img, svg, iframe { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: clamp(1.55rem, 4.5vw, 2.2rem); margin: .35em 0 .4em; }
h2 { font-size: clamp(1.2rem, 3.2vw, 1.5rem); margin: 1.6em 0 .6em; }
h3 { font-size: 1.05rem; margin: 0 0 .35em; }
p { margin: .55em 0; }
button { font-family: inherit; }
::selection { background: var(--accent-soft); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #14120c;
  padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0; z-index: 100;
}
.skip:focus { left: 0; }

.wrap { width: min(1080px, 100% - 2rem); margin-inline: auto; }

/* ---------- Header kaca ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-in {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem 0;
}
.brand {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.06rem; color: var(--ink);
  letter-spacing: -.01em; white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-mark { width: 26px; height: 26px; color: var(--accent); flex: none; }

.head-search {
  display: flex; flex: 1; min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden;
}
.head-search input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  padding: .5rem .95rem; font: inherit; color: var(--ink);
}
.head-search input:focus { outline: none; }
.head-search input::placeholder { color: var(--muted); }
.head-search button {
  border: 0; background: transparent; color: var(--muted);
  padding: 0 .8rem; cursor: pointer; display: grid; place-items: center;
}
.head-search button:hover { color: var(--accent); }
.head-search:focus-within { border-color: var(--accent); }

.head-nav { display: none; gap: 1.1rem; }
.head-nav a { color: var(--ink); font-weight: 500; font-size: .93rem; }
.head-nav a:hover { color: var(--accent); text-decoration: none; }

.icon-btn {
  flex: none; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
html.dark .i-sun { display: none; }
html:not(.dark) .i-moon { display: none; }

.mobile-nav[hidden] { display: none !important; }
.mobile-nav {
  display: grid; gap: .1rem;
  padding: .5rem 1rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--glass);
}
.mobile-nav a {
  color: var(--ink); padding: .55rem .4rem; border-radius: 8px; font-weight: 500;
}
.mobile-nav a:hover { background: var(--surface-2); text-decoration: none; }

@media (min-width: 860px) {
  .head-nav { display: flex; }
  .menu-btn, .mobile-nav { display: none !important; }
  .head-search { max-width: 360px; }
  .head-in { gap: 1.2rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 2.4rem 0 2.2rem;
  background:
    radial-gradient(720px 340px at 15% -10%, var(--accent-soft), transparent 65%),
    radial-gradient(560px 300px at 95% 0%, var(--accent-soft), transparent 70%);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; }
.hero-copy {
  position: relative; overflow: hidden;
  padding: clamp(1.25rem, 4vw, 2.4rem);
  border: 1px solid var(--line); border-radius: 24px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow);
}
.hero-copy::after {
  content: "♩  ♫  ♬"; position: absolute; right: clamp(1rem, 5vw, 3.5rem); top: .6rem;
  color: var(--accent); opacity: .12; font-size: clamp(3.5rem, 11vw, 7rem);
  letter-spacing: .06em; line-height: 1; pointer-events: none;
}
.hero-copy > * { position: relative; z-index: 1; }
.hero-kicker {
  margin: 0 0 .4rem; font-size: .82rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.hero h1 { margin-top: 0; max-width: 22ch; font-size: clamp(1.75rem, 5vw, 3rem); }
.hero-sub { color: var(--muted); max-width: 58ch; }
.hero-links { font-size: .9rem; color: var(--muted); }
.hero-trust-note { color: var(--muted); font-size: .86rem; }

.hero-search {
  display: flex; gap: .5rem; margin: 1.1rem 0 .4rem; max-width: 560px;
}
.hero-search input {
  flex: 1; min-width: 0;
  padding: .78rem 1.05rem; font: inherit;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
}
.hero-search input:focus { outline: none; border-color: var(--accent); }
.hero-search button, .btn-primary {
  padding: .78rem 1.25rem; font: inherit; font-weight: 600;
  color: #14120c; background: linear-gradient(180deg, #f8c95e, #eba92a);
  border: 0; border-radius: 12px; cursor: pointer;
  display: inline-block; text-decoration: none;
  box-shadow: 0 2px 10px rgba(235, 169, 42, .35);
}
.hero-search button:hover, .btn-primary:hover { filter: brightness(1.05); text-decoration: none; }

/* ---------- Pilihan harian & social proof aktual ---------- */
.daily-pick {
  display: grid; grid-template-columns:minmax(0,1fr) minmax(250px,360px);
  gap: 1.2rem; align-items: center; margin-top: 1.5rem;
  padding: 1.25rem; border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
}
.daily-pick h2 { margin: .1rem 0 .4rem; }
.daily-pick-copy > p:last-child { color: var(--muted); max-width: 62ch; }
.daily-pick-label,.proof-eyebrow {
  margin: 0; color: var(--accent); font-size: .76rem; font-weight: 750;
  letter-spacing: .1em; text-transform: uppercase;
}
.daily-pick-card .song-card { box-shadow: var(--shadow); }
.platform-proof {
  display: grid; grid-template-columns:minmax(220px,.85fr) minmax(0,1.4fr);
  gap: 1.4rem; align-items: center;
}
.proof-head h2 { margin: .2rem 0 .35rem; }
.proof-head > p:last-child { color: var(--muted); font-size: .9rem; }
.proof-grid {
  display: grid; grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); gap: .7rem;
}
.proof-stat {
  display: grid; gap: .12rem; padding: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.proof-value { color: var(--accent); font-size: clamp(1.35rem,4vw,2rem); font-weight: 800; line-height: 1.1; }
.proof-label { color: var(--muted); font-size: .82rem; }

/* ---------- Koreksi typo pencarian ---------- */
.search-resolution {
  margin-top: .3rem; padding: 1rem 1.15rem;
  border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft);
}
.search-resolution h2 { margin: 0 0 .2rem; font-size: 1.05rem; }
.search-resolution p { color: var(--muted); font-size: .9rem; }
.search-suggestions { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: .7rem 0 0; padding: 0; }
.search-suggestions a {
  display: inline-flex; padding: .42rem .75rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); font-weight: 650; font-size: .88rem;
}

/* ---------- Blok konten ---------- */
.block { padding: 1.6rem 0 .6rem; }
.block-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.block-head h2 { margin: 1.2em 0 .6em; }
.more { font-size: .88rem; font-weight: 600; white-space: nowrap; }
.page-intro { color: var(--muted); max-width: 64ch; margin-top: -.2rem; }
.empty {
  background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 1.2rem 1.3rem; color: var(--muted);
}
.hint { color: var(--muted); font-size: .92rem; }
.center-block { text-align: center; padding: 3.2rem 0; }
.center-block .hero-search { margin-inline: auto; }
.center-block .page-intro { margin-inline: auto; }
.err-code {
  font-size: clamp(3.4rem, 12vw, 5.5rem); font-weight: 800; margin: 0;
  color: var(--accent); opacity: .9; letter-spacing: -.04em;
}

/* ---------- Kartu lagu ---------- */
.card-grid {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.song-card {
  display: grid; gap: .15rem; align-content: start;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .85rem 1rem;
  color: var(--ink);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.song-card:hover {
  text-decoration: none; transform: translateY(-2px);
  border-color: var(--accent); box-shadow: var(--shadow);
}
.sc-title { font-weight: 650; letter-spacing: -.01em; }
.sc-artist { color: var(--muted); font-size: .88rem; }
.sc-meta { display: flex; align-items: center; gap: .5rem; margin-top: .3rem; }
.sc-diff { font-size: .78rem; color: var(--muted); }

.key-badge {
  display: inline-block; min-width: 1.9em; text-align: center;
  font-family: var(--mono); font-weight: 700; font-size: .8rem;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 7px; padding: .16em .45em; margin: 0;
}

/* ---------- Chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .42rem .95rem; font: inherit; font-size: .9rem; font-weight: 500;
  cursor: pointer;
}
.chip small { color: var(--muted); font-size: .78rem; }
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip.is-playing { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ---------- Panduan / guide cards ---------- */
.guide-grid {
  display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  margin: .9rem 0;
}
.guide-card {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.guide-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.guide-card p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Artis ---------- */
.artist-grid {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  margin: .9rem 0;
}
.artist-card {
  display: grid; gap: .1rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .8rem 1rem; color: var(--ink);
}
.artist-card:hover { text-decoration: none; border-color: var(--accent); }
.ac-name { font-weight: 600; }
.ac-count { color: var(--muted); font-size: .84rem; }

.artist-head { display: flex; gap: 1.1rem; align-items: flex-start; flex-wrap: wrap; }
.artist-photo {
  width: 112px; height: 112px; object-fit: cover;
  border-radius: 18px; border: 1px solid var(--line); flex: none;
}
.artist-bio { max-width: 70ch; color: var(--ink); }
.artist-bio p { margin: .6em 0; }

.song-list { list-style: none; margin: .8rem 0; padding: 0; display: grid; gap: .45rem; }
.song-list li { position: relative; }
.song-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: .68rem .95rem; color: var(--ink);
}
.song-list a:hover { text-decoration: none; border-color: var(--accent); }
.sl-title { font-weight: 600; }
.sl-meta { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .85rem; }
.fav-del {
  position: absolute; right: -.4rem; top: -.4rem;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--danger); font-size: 1rem; line-height: 1; cursor: pointer;
}
.fav-del:hover { border-color: var(--danger); }

/* ---------- Breadcrumbs, letter nav, pagination ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; gap: .35rem; align-items: center;
  font-size: .84rem; color: var(--muted); margin: 1rem 0 .2rem;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-current] { color: var(--ink); font-weight: 500; }

.letter-nav {
  display: flex; gap: .35rem; overflow-x: auto;
  padding: .3rem 0 .6rem; margin: .6rem 0;
  scrollbar-width: thin;
}
.letter-nav a {
  flex: none; min-width: 2.1em; text-align: center;
  padding: .34rem .5rem; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 600; font-size: .88rem;
}
.letter-nav a:hover { border-color: var(--accent); text-decoration: none; }
.letter-nav a.is-active { background: var(--accent); border-color: var(--accent); color: #14120c; }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: .8rem;
  margin: 1.6rem 0 .8rem;
}
.page-btn {
  padding: .5rem 1rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 500; font-size: .92rem;
}
.page-btn:hover { border-color: var(--accent); text-decoration: none; }
.page-btn.is-disabled { opacity: .4; pointer-events: none; }
.page-info { color: var(--muted); font-size: .88rem; }

/* ---------- Halaman chord (panggung utama) ---------- */
.song-page { padding-bottom: 108px; } /* ruang untuk pedalboard */
.song-head h1 { margin-bottom: .3rem; }
.h1-by { color: var(--muted); font-weight: 500; font-size: .72em; }
.song-intro { color: var(--muted); max-width: 68ch; }

.fact-strip {
  display: flex; flex-wrap: wrap; gap: .5rem 1.6rem;
  margin: 1rem 0; padding: .8rem 1.1rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.fact-strip div { display: grid; gap: .05rem; }
.fact-strip dt {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.fact-strip dd { margin: 0; font-weight: 600; font-size: .95rem; }

/* Lembar chord: pusat perhatian, seperti standing music stand */
.sheet-stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem;
  margin: 1.2rem 0;
  overflow-x: auto;
}
.sheet {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--sheet-size, 15px);
  line-height: 1.75;
  white-space: pre;
  font-variant-ligatures: none;
  color: var(--ink);
}
.sheet b.c {
  color: var(--accent);
  font-weight: 700;
}
.sheet b.c.has-diagram { cursor: help; text-decoration: underline dotted; text-underline-offset: .24em; }
.sheet b.c.has-diagram:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.sheet .sec {
  display: inline-block;
  margin-top: .35em;
  font-weight: 700;
  color: var(--ink);
  opacity: .85;
  letter-spacing: .02em;
}

/* ---------- Diagram chord ---------- */
.used-chords { margin-top: 1.4rem; }
.diagram-row {
  display: flex; flex-wrap: wrap; gap: .8rem; margin: .8rem 0;
}
.chord-diagram {
  margin: 0; display: grid; justify-items: center; gap: .25rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: .7rem .85rem .5rem;
  color: var(--ink);
}
.chord-diagram figcaption {
  font-family: var(--mono); font-weight: 700; font-size: .85rem; color: var(--accent);
}
.chord-diagram .dot { fill: var(--accent); }
.diagram-link { color: inherit; }
.diagram-link:hover { text-decoration: none; }
.diagram-link:hover .chord-diagram { border-color: var(--accent); }
.diagram-fig { margin: 0; display: grid; gap: .3rem; justify-items: center; }
.diagram-fig > figcaption { font-size: .82rem; color: var(--muted); }

/* Diagram yang muncul langsung dari token chord. Posisi dihitung JS agar
   tetap berada di viewport, termasuk saat lembar chord digulir horizontal. */
.chord-popover {
  position: fixed; z-index: 120; width: 176px; padding: .65rem .65rem .55rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  color: var(--ink); box-shadow: 0 16px 42px rgba(0,0,0,.24);
}
.chord-popover[hidden] { display: none; }
.chord-popover-canvas { display: grid; place-items: center; min-height: 160px; }
.chord-popover-svg { display: block; width: 148px; height: auto; overflow: visible; }
.chord-popover-svg .cp-name { fill: currentColor; font: 700 14px var(--mono); }
.chord-popover-svg .cp-grid { stroke: currentColor; stroke-width: 1; opacity: .46; }
.chord-popover-svg .cp-nut { stroke: currentColor; stroke-width: 3; opacity: .72; }
.chord-popover-svg .cp-dot { fill: var(--accent); }
.chord-popover-svg .cp-barre { stroke: var(--accent); stroke-width: 10; stroke-linecap: round; }
.chord-popover-svg .cp-open { fill: none; stroke: currentColor; stroke-width: 1.5; }
.chord-popover-svg .cp-marker,.chord-popover-svg .cp-fret-label { fill: currentColor; font: 11px var(--mono); }
.chord-popover-detail { display: block; text-align: center; font-size: .78rem; color: var(--muted); }
.chord-popover-detail:hover { color: var(--accent); }
.chord-popover-close {
  position: absolute; z-index: 1; top: 5px; right: 6px; width: 30px; height: 30px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font: 22px/1 sans-serif; cursor: pointer;
}
.chord-popover-close:hover,.chord-popover-close:focus-visible { background: var(--surface-2); color: var(--ink); }
@media (hover:hover) and (pointer:fine) { .chord-popover-close { display: none; } }

/* ---------- Video ---------- */
.video-frame {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- FAQ & shortcuts ---------- */
.faq { margin: 1.6rem 0; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 0; margin: .5rem 0; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; padding: .75rem 1rem;
  list-style: none; position: relative; padding-right: 2.2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 1rem; top: .62rem;
  color: var(--accent); font-size: 1.15rem; font-weight: 700;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 1rem .85rem; color: var(--muted); }

.shortcuts { margin: 1.2rem 0; color: var(--muted); font-size: .92rem; }
.shortcuts summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.shortcuts ul { margin: .5rem 0 0; padding-left: 1.2rem; }
kbd {
  font-family: var(--mono); font-size: .82em;
  background: var(--surface-2); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 6px; padding: .1em .45em;
}

.artist-cta {
  display: block; text-align: center;
  margin: 1.6rem 0 0; padding: .9rem 1.1rem;
  background: var(--accent-soft); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); font-size: .98rem;
}
.artist-cta:hover { text-decoration: none; border-color: var(--accent); }
.artist-cta strong { color: var(--accent); }

/* ---------- Pedalboard (bilah alat lengket) ---------- */
.pedalboard {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; justify-content: center; align-items: center;
  gap: .55rem; flex-wrap: nowrap; overflow-x: auto;
  padding: .55rem .8rem calc(.55rem + env(safe-area-inset-bottom));
  background: var(--glass);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-top: 1px solid var(--line);
}
.pb-group {
  display: flex; align-items: center; gap: .3rem; flex: none;
  padding: .22rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface);
}
.pb-btn {
  min-width: 38px; height: 38px; padding: 0 .55rem;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--ink); font: inherit; font-weight: 700; font-size: .95rem;
  cursor: pointer; white-space: nowrap;
}
.pb-btn:hover { background: var(--accent-soft); color: var(--accent); }
.pb-btn[aria-pressed="true"] { background: var(--accent); color: #14120c; }
.pb-key {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 38px; padding: 0 .6rem;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-weight: 700; font-size: .95rem;
}
.pb-shift {
  position: absolute; top: -7px; right: -4px;
  min-width: 20px; padding: 0 .3em;
  background: var(--accent); color: #14120c;
  border-radius: 999px; font-size: .68rem; line-height: 1.5; text-align: center;
}
.pb-more-toggle {
  display: none; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 800; cursor: pointer;
}
.pb-more-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

/* ---------- Tools: transpose ---------- */
.transpose-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin: 1rem 0 .7rem;
}
.transpose-bar .pb-btn {
  border: 1px solid var(--line); background: var(--surface);
}
.transpose-bar .pb-key { min-width: 110px; cursor: default; }
.tp-area {
  width: 100%; resize: vertical;
  font-family: var(--mono); font-size: 14px; line-height: 1.7;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.tp-area:focus { outline: none; border-color: var(--accent); }
.steps { padding-left: 1.3rem; }
.steps li { margin: .35rem 0; }

/* ---------- Tools: tuner ---------- */
.tuner {
  display: grid; justify-items: center; gap: .8rem; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--accent); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.2rem; margin: 1.2rem 0;
}
.tuner-note { display: grid; gap: .1rem; }
#tn-name {
  font-family: var(--mono); font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 3.6rem); line-height: 1; color: var(--ink);
}
#tn-name.in-tune { color: var(--accent); }
#tn-freq { color: var(--muted); font-size: .9rem; }
.tuner-scale {
  position: relative; width: min(340px, 90%); height: 52px;
  border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--line); overflow: hidden;
}
.tuner-scale::before {
  content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px;
  width: 2px; background: var(--muted); opacity: .55; transform: translateX(-50%);
}
.tuner-needle {
  position: absolute; left: 50%; top: 4px; bottom: 4px; width: 4px;
  background: var(--accent); border-radius: 4px;
  transform: translateX(-50%);
  transition: transform .1s linear, background-color .15s ease;
}
.ts-mark { position: absolute; bottom: 3px; font-size: .66rem; color: var(--muted); }
.ts-l { left: 8px; } .ts-c { left: 50%; transform: translateX(-50%); } .ts-r { right: 8px; }
.tuner-cents { min-height: 1.3em; margin: 0; font-family: var(--mono); color: var(--muted); }
.tuner-err { color: var(--danger); font-size: .9rem; }

.seg-toggle {
  display: inline-flex; gap: .25rem; margin: .4rem 0 1rem;
  padding: .25rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface);
}
.seg-toggle a {
  padding: .42rem 1.1rem; border-radius: 999px;
  color: var(--ink); font-weight: 600; font-size: .92rem;
}
.seg-toggle a:hover { text-decoration: none; color: var(--accent); }
.seg-toggle a.is-active { background: var(--accent); color: #14120c; }
.dict-group h2 { margin-top: 1.3em; }

/* ---------- Artikel ---------- */
.article-page { max-width: 760px; }
.byline { color: var(--muted); font-size: .9rem; }
.article-body { font-size: 1.02rem; }
.article-body h2 { margin-top: 1.5em; }
.article-body ul, .article-body ol { padding-left: 1.35rem; }
.article-body li { margin: .3rem 0; }
.article-body code {
  font-family: var(--mono); font-size: .9em;
  background: var(--surface-2); border-radius: 6px; padding: .1em .4em;
}
.article-body blockquote {
  margin: 1em 0; padding: .2em 1.1em;
  border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 10px 10px 0; color: var(--muted);
}

/* ---------- Footer ---------- */
.site-foot {
  margin-top: 3rem; padding: 2.2rem 0 1.4rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.foot-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.foot-brand { font-weight: 700; font-size: 1.05rem; margin: 0 0 .2rem; }
.foot-tag { color: var(--muted); font-size: .88rem; margin: 0; max-width: 30ch; }
.foot-h {
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .5rem;
}
.foot-grid nav { display: grid; gap: .3rem; align-content: start; }
.foot-grid nav a { color: var(--ink); font-size: .92rem; }
.foot-grid nav a:hover { color: var(--accent); }
.foot-note {
  margin-top: 1.6rem; padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: .82rem;
}

/* ---------- Gerak & aksesibilitas ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Cetak / PDF ---------- */
@media print {
  .site-head, .site-foot, .pedalboard, .related, .video, .faq,
  .shortcuts, .artist-cta, .crumbs, .used-chords, .hero-search { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .wrap { width: 100%; }
  .song-page { padding-bottom: 0; }
  .sheet-stage { border: 0; box-shadow: none; padding: 0; }
  .sheet { color: #000; font-size: 11pt; }
  .sheet b.c { color: #000; text-decoration: underline; }
  .fact-strip { border: 1px solid #999; }
  a { color: #000; text-decoration: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   Fitur lanjutan: pemilih chord, saran capo, laporan, request, setlist
   ═══════════════════════════════════════════════════════════════════ */

/* ── Pemilih chord ─────────────────────────────────────────────── */
.chord-picker{border:1px solid var(--line);border-radius:var(--radius);padding:18px;background:var(--surface)}
.chord-picker fieldset{border:0;padding:0;margin:0}
.picker-legend{font-weight:600;margin-bottom:12px;padding:0}
.picker-grid{display:flex;flex-wrap:wrap;gap:8px}
.picker-chip{position:relative;display:inline-flex}
.picker-chip input{position:absolute;opacity:0;width:0;height:0}
.picker-chip span{display:inline-block;padding:7px 14px;border:1px solid var(--line);border-radius:999px;
  font-family:var(--mono);font-size:.9rem;cursor:pointer;transition:background .15s,border-color .15s,color .15s;
  user-select:none;background:var(--bg)}
.picker-chip input:checked + span{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:600}
.picker-chip input:focus-visible + span{outline:2px solid var(--accent);outline-offset:2px}
.picker-chip span:hover{border-color:var(--accent)}
.picker-toggle{display:flex;gap:9px;align-items:flex-start;margin-top:16px;font-size:.92rem;
  color:var(--muted);cursor:pointer;line-height:1.45}
.picker-toggle input{margin-top:3px;flex:none;accent-color:var(--accent)}
.picker-actions{display:flex;gap:14px;align-items:center;margin-top:18px;flex-wrap:wrap}
.picker-reset{font-size:.9rem;color:var(--muted)}
.selected-chords{margin-top:14px}
.chip.is-static{background:var(--accent-soft);border-color:var(--accent);font-family:var(--mono);cursor:default}
.chip-edit{border-style:dashed}
.missing-chord{flex:none;margin-left:auto;font-family:var(--mono);font-size:.85rem;font-weight:600;
  color:var(--accent);padding:3px 10px;border:1px dashed var(--accent);border-radius:999px;white-space:nowrap}

/* ── Saran capo ────────────────────────────────────────────────── */
.capo-tip{display:flex;gap:14px;align-items:flex-start;margin-top:18px;padding:14px 16px;
  border:1px solid var(--accent);border-left-width:3px;border-radius:var(--radius);background:var(--accent-soft)}
.capo-tip p{margin:0;font-size:.94rem;line-height:1.6}
.capo-badge{flex:none;font-family:var(--mono);font-weight:700;font-size:.85rem;letter-spacing:.03em;
  padding:5px 11px;border-radius:999px;background:var(--accent);color:var(--on-accent);white-space:nowrap}

/* ── Formulir masukan (laporan, request, 2FA) ──────────────────── */
.feedback-form{display:flex;flex-direction:column;gap:14px;margin-top:16px;max-width:620px}
.feedback-form label{display:flex;flex-direction:column;gap:6px;font-size:.92rem;font-weight:600}
.feedback-form label em{font-weight:400;color:var(--muted);font-style:normal}
.feedback-form input[type=text],.feedback-form textarea,.feedback-form select{
  font:inherit;font-weight:400;padding:10px 12px;border:1px solid var(--line);border-radius:10px;
  background:var(--bg);color:var(--ink);width:100%}
.feedback-form input:focus,.feedback-form textarea:focus,.feedback-form select:focus{
  outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}
.feedback-form textarea{resize:vertical;min-height:76px}
.feedback-form button{align-self:flex-start}
.ff-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.ff-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.ff-error{color:var(--danger);font-size:.88rem;margin:0}
.flash-ok{margin:14px 0 0;padding:11px 15px;border-radius:10px;font-size:.93rem;
  background:var(--accent-soft);border:1px solid var(--accent)}
.report-block{margin-top:38px;padding-top:26px;border-top:1px solid var(--line)}
.report-details summary{cursor:pointer;padding:10px 0;font-weight:600;color:var(--accent)}
.report-details summary:hover{text-decoration:underline}

/* ── Antrean request ───────────────────────────────────────────── */
.request-list{list-style:none;padding:0;margin:0;counter-reset:rq}
.request-list li{display:flex;gap:14px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.rq-main{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.rq-title{font-weight:600}
.rq-artist{font-size:.88rem;color:var(--muted)}
.rq-status{font-size:.78rem;font-weight:600;color:var(--accent);text-transform:uppercase;letter-spacing:.04em}
.rq-vote{flex:none;display:flex;flex-direction:column;align-items:center;gap:1px;min-width:56px;
  padding:7px 10px;border:1px solid var(--line);border-radius:10px;background:var(--bg);
  color:var(--ink);font:inherit;font-size:.8rem;cursor:pointer;line-height:1.1}
.rq-vote span{font-weight:700;font-size:.95rem}
.rq-vote:hover{border-color:var(--accent);color:var(--accent)}

/* ── Pengelola setlist ─────────────────────────────────────────── */
.sm-create{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:24px}
.sm-create input{flex:1;min-width:220px;font:inherit;padding:10px 13px;border:1px solid var(--line);
  border-radius:10px;background:var(--bg);color:var(--ink)}
.sm-create input:focus{outline:2px solid var(--accent);outline-offset:1px}
.sm-card{border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:var(--radius);
  padding:18px;margin-bottom:18px;background:var(--surface)}
.sm-head{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.sm-head h2{margin:0;font-size:1.1rem}
.sm-count{font-size:.85rem;color:var(--muted)}
.sm-songs{margin:0 0 16px;padding-left:22px;display:flex;flex-direction:column;gap:8px}
.sm-songs li{display:flex;gap:10px;align-items:center}
.sm-songs a{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-tools{display:flex;gap:4px;flex:none}
.sm-move,.sm-del{border:1px solid var(--line);background:var(--bg);color:var(--muted);
  border-radius:7px;width:28px;height:28px;cursor:pointer;font:inherit;line-height:1;padding:0}
.sm-move:hover,.sm-del:hover{border-color:var(--accent);color:var(--accent)}
.sm-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.sm-share,.sm-rename,.sm-del-set{font:inherit;font-size:.88rem;padding:8px 14px;border-radius:999px;
  border:1px solid var(--line);background:var(--bg);color:var(--ink);cursor:pointer}
.sm-share:hover,.sm-rename:hover{border-color:var(--accent);color:var(--accent)}
.sm-del-set{color:var(--muted)}
.sm-del-set:hover{border-color:var(--danger);color:var(--danger)}
.setlist-view .sl-num{display:inline-block;min-width:26px;font-family:var(--mono);color:var(--accent);font-weight:700}

/* ── Bilah mode manggung ───────────────────────────────────────── */
.setbar{position:fixed;left:0;right:0;bottom:0;z-index:60;display:grid;
  grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  background:var(--glass);backdrop-filter:blur(12px);border-top:1px solid var(--line);font-size:.9rem}
.setbar a{font-weight:600;color:var(--accent);white-space:nowrap}
.setbar-next{text-align:right}
.setbar-mid{text-align:center;color:var(--muted);font-size:.84rem;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.has-setbar .pedalboard{bottom:52px}
body.has-setbar .song-page{padding-bottom:168px}

/* ── Tombol setlist di pedalboard ──────────────────────────────── */
.pb-set{font-size:.8rem;font-weight:600;letter-spacing:.01em;white-space:nowrap}

/* ── Kartu autentikasi ─────────────────────────────────────────── */
.auth-card{max-width:430px;margin:0 auto;text-align:left}
.auth-card h1{text-align:center}
.auth-card .feedback-form{max-width:none}
.auth-card .feedback-form input[name=code]{font-family:var(--mono);font-size:1.35rem;
  letter-spacing:.28em;text-align:center;padding:13px}
.auth-card .feedback-form button{align-self:stretch;text-align:center}
.logout-form{margin-top:22px;text-align:center}
.link-button{background:none;border:0;color:var(--muted);font:inherit;font-size:.88rem;
  cursor:pointer;text-decoration:underline;padding:0}
.link-button:hover{color:var(--accent)}

@media (max-width:560px){
  .ff-row{grid-template-columns:1fr}
  .setbar{font-size:.84rem}
  .hero{padding:1rem 0 1.35rem}
  .hero-copy{padding:1.15rem;border-radius:18px}
  .hero-copy::after{font-size:3.2rem;right:.6rem;top:.8rem}
  .hero-search{align-items:stretch}
  .hero-search button{padding-inline:.9rem}
  .daily-pick,.platform-proof{grid-template-columns:1fr}
  .daily-pick{margin-top:1rem;padding:1rem}
  .proof-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

  /* Empat kontrol utama selalu pas selebar layar. Aksi sekunder tetap
     tersedia lewat tombol lainnya, bukan dipotong/keluar viewport. */
  .pedalboard{
    display:grid; grid-template-columns:minmax(0,1.22fr) minmax(0,1fr) minmax(0,.72fr) 38px;
    gap:4px; justify-content:stretch; overflow:visible;
    padding:6px 7px calc(6px + env(safe-area-inset-bottom));
  }
  .pedalboard > .pb-group:not(.pb-extras){
    width:100%; min-width:0; justify-content:space-between; gap:0; padding:2px;
  }
  .pedalboard .pb-btn{min-width:28px;height:34px;padding:0 5px;font-size:.82rem}
  .pedalboard .pb-key{min-width:38px;height:34px;padding:0 5px;font-size:.84rem}
  .pb-more-toggle{display:inline-grid;place-items:center;align-self:center}
  .pedalboard .pb-extras{
    position:absolute; right:7px; bottom:calc(100% + 8px);
    display:none; max-width:calc(100vw - 14px); padding:5px;
    flex-wrap:wrap; justify-content:flex-end;
    border-radius:18px; box-shadow:var(--shadow); z-index:2;
  }
  .pedalboard.extras-open .pb-extras{display:flex}
  .pedalboard .pb-extras .pb-btn{min-width:36px;height:36px}
  .pedalboard .pb-extras .pb-set{font-size:0}
  .pedalboard .pb-extras .pb-set::after{content:'+ Set';font-size:.76rem}
}

@media print{
  .capo-tip{border-color:#999;background:none}
  .report-block,.setbar,.chord-picker,.chord-popover{display:none!important}
}
