/* Shiron hub - look follows disneytributecircle.com/sing: deep purple night, gold + violet accents, Rubik. */
:root {
  --bg-0: #1a0b2e;
  --bg-1: #2a1150;
  --bg-2: #311b92;
  --card: rgba(255, 255, 255, 0.07);
  --card-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f7f3ff;
  --muted: #c9bde6;
  --chord: #ffd166;
  --gold-a: #ffd700;
  --gold-b: #ffa500;
  --violet-a: #8b5cf6;
  --violet-b: #3b82f6;
  --section: #b69cff;
  --page-bg: linear-gradient(135deg, rgba(26, 11, 46, 0.92) 0%, rgba(74, 20, 140, 0.85) 50%, rgba(49, 27, 146, 0.92) 100%),
    url("https://static.wixstatic.com/media/833a1f_e00b98a750bc4bfa8ab6ea01291ece87~mv2.png/v1/fill/w_1600,h_1151,al_c,q_80,enc_auto/bg.png") center / cover fixed;
  --lyric-size: 20px;
  --radius: 16px;
}
:root[data-theme="night"] {
  /* dark-room mode: near black, low glare, warm chords */
  --bg-0: #07040d; --bg-1: #0b0714; --bg-2: #0b0714;
  --card: rgba(255, 255, 255, 0.04); --card-strong: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.08); --text: #d9d2e6; --muted: #8f86a3; --chord: #e0a458; --section: #9b86d1;
  --page-bg: #07040d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: "Rubik", system-ui, sans-serif; color: var(--text);
  background: var(--page-bg); background-color: var(--bg-0);
}
button { font: inherit; color: inherit; }
a { color: inherit; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(26, 11, 46, 0.72); border-bottom: 1px solid var(--line);
}
:root[data-theme="night"] .topbar { background: rgba(7, 4, 13, 0.9); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { height: 36px; width: auto; }
.topbar-actions { margin-inline-start: auto; display: flex; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: transparent; cursor: pointer;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--card-strong); outline: none; }
.icon-btn.active { color: var(--chord); }

main { max-width: 900px; margin: 0 auto; padding: 16px 16px 40px; outline: none; }

/* home */
.hero { text-align: center; padding: 18px 0 8px; }
.hero h1 { margin: 0; font-size: clamp(28px, 7vw, 44px); text-shadow: 0 0 10px rgba(255, 255, 255, 0.35), 0 0 22px rgba(255, 255, 255, 0.18); }
.hero p { margin: 6px 0 0; color: var(--muted); }
.search {
  display: block; width: 100%; margin: 18px 0 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 17px;
}
.search::placeholder { color: var(--muted); }
.song-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.song-item a {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; text-decoration: none;
  background: var(--card); border: 1px solid transparent;
}
.song-item a:hover, .song-item a:focus-visible { border-color: var(--line); background: var(--card-strong); outline: none; }
.song-num { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 215, 0, 0.14); color: var(--chord); font-weight: 700; font-size: 14px; }
.song-meta { display: flex; flex-direction: column; min-width: 0; }
.song-title { font-weight: 700; font-size: 17px; }
.song-movie { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; font-weight: 700; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(45deg, var(--gold-a), var(--gold-b)); color: #1a0b2e; }
.btn-gold:hover { box-shadow: 0 8px 25px rgba(255, 215, 0, 0.45); }
.btn-violet { background: linear-gradient(45deg, var(--violet-a), var(--violet-b)); color: #fff; }
.btn-violet:hover { box-shadow: 0 8px 25px rgba(139, 92, 246, 0.45); }
.btn-ghost { background: var(--card-strong); }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* song page */
.song-head { text-align: center; padding: 6px 0 12px; }
.song-head h1 { margin: 0; font-size: clamp(28px, 7vw, 40px); }
.song-head .movie { color: var(--chord); font-weight: 500; margin-top: 2px; }
.song-head .credits { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.6; }

.toolbar-unused {
  position: sticky; top: calc(env(safe-area-inset-top) + 61px); z-index: 10; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
  padding: 8px; margin: 0 -8px 14px; border-radius: var(--radius); background: rgba(26, 11, 46, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line);
}
:root[data-theme="night"] .toolbar-unused { background: rgba(7, 4, 13, 0.92); }
.seg-ctl { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); }
.seg-ctl button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-size: 14px; font-weight: 500; }
.seg-ctl button[aria-pressed="true"] { background: linear-gradient(45deg, var(--violet-a), var(--violet-b)); color: #fff; }
.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card); font-size: 14px; }
.stepper button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 18px; }
.stepper button:hover { background: var(--card-strong); }
.stepper .val { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.inst select { appearance: none; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; padding: 0 14px; min-height: 38px; cursor: pointer; }
.inst select option { color: #1a0b2e; }
.capo-note { width: 100%; text-align: center; font-size: 13px; color: var(--chord); }

.lyrics { font-size: var(--lyric-size); line-height: 1.25; padding-inline: 0.6em; }
.l-line { display: flex; flex-wrap: wrap; align-items: flex-end; margin: 0 0 0.25em; min-height: 1.3em; row-gap: 0; }
.l-line.ltr { direction: ltr; }
.l-word { display: inline-flex; white-space: nowrap; }
.l-seg { position: relative; display: inline-block; padding-top: 1.05em; }
.l-anchor { position: relative; }
.l-anchor > .l-ch { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); }
.l-ch { color: var(--chord); font-weight: 500; font-size: 0.78em; line-height: 1.25em; direction: ltr; unicode-bidi: isolate; cursor: pointer; white-space: nowrap; }
.l-line.no-chords .l-seg { padding-top: 0; }
.l-line.no-chords .l-ch { display: none; }
.l-tx { font-weight: 700; white-space: pre; }
.l-tail { position: relative; display: inline-block; padding-top: 1.05em; margin-inline-start: 0.6em; }
.l-tail .l-ch { position: static; display: block; margin-top: -1.05em; }
.l-gap { height: 0.9em; }
.l-section { color: var(--section); font-weight: 700; font-size: 0.8em; margin: 0.6em 0 0.2em; letter-spacing: 0.02em; }
.l-bars { color: var(--chord); font-size: 0.8em; margin: 0 0 0.2em; white-space: pre-wrap; }
.l-bars > span { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.l-note { color: var(--muted); font-size: 0.8em; }
.ltr-song .l-section, .ltr-song .l-bars, .ltr-song .l-note { direction: ltr; text-align: left; }
.hide-chords .l-ch, .hide-chords .l-bars, .hide-chords .l-tail { display: none; }
.hide-chords .l-seg { padding-top: 0; }

/* bottom sheet (chord diagrams, room) */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; background: rgba(0, 0, 0, 0.5); }
.sheet[hidden] { display: none; }
.sheet-card { position: relative; width: min(640px, 100%); margin: 0 auto; max-height: 80vh; overflow: auto; padding: 22px 18px calc(env(safe-area-inset-bottom) + 22px); border-radius: 22px 22px 0 0; background: #221040; border: 1px solid var(--line); }
:root[data-theme="night"] .sheet-card { background: #0d0916; }
.sheet-close { position: absolute; top: 8px; inset-inline-start: 8px; }
.sheet h2 { margin: 0 0 12px; font-size: 20px; text-align: center; }
.diagrams { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; color: var(--text); }
.diagram { padding: 6px; border-radius: 12px; background: var(--card); }
.field { display: block; width: 100%; padding: 14px; margin: 8px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 20px; text-align: center; letter-spacing: 0.2em; text-transform: uppercase; }
.qr { display: grid; place-items: center; margin: 12px auto; padding: 12px; width: 220px; border-radius: 16px; background: #fff; }
.room-code { font-size: 34px; font-weight: 700; letter-spacing: 0.25em; text-align: center; color: var(--chord); direction: ltr; }
.hint { color: var(--muted); font-size: 13.5px; text-align: center; margin: 8px 0; }

/* live room banner */
.room-banner { position: sticky; top: calc(env(safe-area-inset-top) + 61px); z-index: 15; display: flex; align-items: center; gap: 10px; justify-content: center; padding: 8px 12px; font-size: 14px; background: linear-gradient(45deg, rgba(139, 92, 246, 0.95), rgba(59, 130, 246, 0.95)); }
.room-banner[hidden] { display: none; }
.room-banner button { border: 0; border-radius: 999px; padding: 6px 12px; background: rgba(255, 255, 255, 0.2); cursor: pointer; font-size: 13px; }
.room-banner .dot { width: 9px; height: 9px; border-radius: 50%; background: #7CFC9A; box-shadow: 0 0 8px #7CFC9A; }
body.in-room .toolbar-unused { top: calc(env(safe-area-inset-top) + 101px); }

/* projection mode: lyrics only, huge, for a screen behind the band */
body.projector .topbar, body.projector .toolbar, body.projector .footnote, body.projector .room-banner { display: none; }
body.projector main { max-width: none; padding: 4vh 6vw; }
body.projector .song-head h1 { font-size: 7vh; }
body.projector .song-head .credits { display: none; }
body.projector .lyrics { --lyric-size: 5vh; }
body.projector .l-ch, body.projector .l-bars, body.projector .l-tail { display: none; }

.footnote { max-width: 900px; margin: 0 auto; padding: 18px 16px 40px; color: var(--muted); font-size: 11.5px; text-align: center; line-height: 1.6; }
@media (max-width: 480px) { .brand span { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ================= hub (home) ================= */
.hub-hero { text-align: center; padding: 6px 0 4px; }
.hub-logo { width: min(240px, 60vw); height: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45)); }
.hub-tag { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.book-card {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 190px; margin: 18px 0 12px; padding: 20px;
  border-radius: 22px; overflow: hidden; text-decoration: none; isolation: isolate; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  background: linear-gradient(to top, rgba(18, 6, 40, 0.92) 0%, rgba(18, 6, 40, 0.35) 55%, rgba(18, 6, 40, 0.05) 100%), var(--img) center 22% / cover;
  transition: transform 0.25s ease;
}
.book-card:hover { transform: translateY(-2px); }
.book-card-title { display: block; font-size: 34px; font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.book-card-sub { color: #ffe08a; font-weight: 500; }
.book-card-go { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(45deg, var(--gold-a), var(--gold-b)); color: #1a0b2e; font-size: 22px; font-weight: 700; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; font-weight: 500; font-size: 14.5px; }
.quick-btn:hover { background: var(--card-strong); }
.quick-btn .dot, .room-banner .dot { width: 9px; height: 9px; border-radius: 50%; background: #7cfc9a; box-shadow: 0 0 8px #7cfc9a; }
.section-title { margin: 26px 0 12px; font-size: 20px; }
.movie-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .movie-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .movie-grid { grid-template-columns: repeat(4, 1fr); } }
.movie-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 3 / 4; padding: 12px; border-radius: 18px; overflow: hidden; text-decoration: none;
  background: linear-gradient(to top, rgba(18, 6, 40, 0.9) 0%, rgba(18, 6, 40, 0.1) 55%), var(--img) center 88% / cover;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); transition: transform 0.2s ease;
}
.movie-card:hover { transform: translateY(-2px) scale(1.01); }
.movie-name { font-weight: 700; font-size: 18px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
.movie-count { color: #ffe08a; font-size: 13px; }

/* ================= song lists ================= */
.list-hero {
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 150px; margin: 0 -16px 4px; padding: 20px 16px;
  background: linear-gradient(to top, var(--bg-0) 0%, rgba(26, 11, 46, 0.35) 70%), var(--img) center 80% / cover;
}
.list-hero h1 { margin: 0; font-size: clamp(26px, 7vw, 38px); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.list-hero p { margin: 2px 0 0; color: #ffe08a; }
.song-item a { padding: 8px 10px 8px 14px; }
.song-thumb { flex: 0 0 52px; height: 52px; border-radius: 12px; background: center 85% / cover; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); }
.song-item .song-meta { flex: 1 1 auto; }
.song-item .song-num { background: transparent; color: var(--muted); font-weight: 500; }

/* ================= song page ================= */
#song-bg { position: fixed; inset: 0; z-index: -1; background: center top / cover no-repeat; opacity: 0; transition: opacity 0.4s ease; }
#song-bg.on { opacity: 1; }
#song-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.78) 45%, rgba(255, 255, 255, 0.86)); }
body[data-page="song"] {
  --text: #1c0f33; --muted: #4a3a66; --chord: #6d28d9; --section: #b45309; --line: rgba(40, 20, 80, 0.14); --card: rgba(255, 255, 255, 0.6); --card-strong: rgba(255, 255, 255, 0.85);
  background: #f4efff;
}
body[data-page="song"] .topbar { background: rgba(255, 255, 255, 0.72); border-bottom-color: rgba(40, 20, 80, 0.12); }
body[data-page="song"] .footnote { color: #4a3a66; }
body[data-page="song"] .l-tx { text-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 2px #fff; }
body[data-page="song"] .l-ch { text-shadow: 0 0 5px #fff, 0 0 2px #fff; }
:root[data-theme="night"] body[data-page="song"] { --text: #e6def5; --muted: #9a8fb3; --chord: #f0b35a; --section: #b69cff; --line: rgba(255, 255, 255, 0.1); --card: rgba(255, 255, 255, 0.05); --card-strong: rgba(255, 255, 255, 0.1); background: #07040d; }
:root[data-theme="night"] #song-bg::after { background: rgba(7, 4, 13, 0.9); }
:root[data-theme="night"] body[data-page="song"] .topbar { background: rgba(7, 4, 13, 0.85); }
:root[data-theme="night"] body[data-page="song"] .l-tx, :root[data-theme="night"] body[data-page="song"] .l-ch { text-shadow: none; }

.song-head { text-align: center; padding: 10px 0 18px; }
.song-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; font-size: 14px; }
.song-kicker .song-num { flex: 0 0 26px; height: 26px; font-size: 12px; background: rgba(109, 40, 217, 0.12); color: var(--chord); }
.song-head h1 { margin: 4px 0 0; font-size: clamp(30px, 8vw, 46px); line-height: 1.1; }
.song-head .credits { color: var(--muted); font-size: 12px; margin-top: 8px; line-height: 1.6; }
.capo-pill { display: inline-block; margin: 10px 4px 0; padding: 5px 12px; border-radius: 999px; background: rgba(109, 40, 217, 0.12); color: var(--chord); font-weight: 500; font-size: 13px; }
.soon { text-align: center; color: var(--muted); padding: 40px 0; font-size: 18px; }
.lyrics { padding-bottom: 10px; }
.song-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 30px 0 90px; }
.nav-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.nav-card small { color: var(--muted); font-weight: 400; font-size: 12px; }
.nav-card.prev { text-align: left; }

/* bottom bar: in thumb reach, slides away while reading */
.songbar {
  position: fixed; z-index: 30; bottom: calc(env(safe-area-inset-bottom) + 10px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 6px; max-width: calc(100vw - 20px);
  border-radius: 999px; background: rgba(26, 11, 46, 0.9); color: #f7f3ff; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); transition: transform 0.25s ease, opacity 0.25s ease;
}
.songbar.tucked { transform: translate(-50%, 140%); opacity: 0; }
.songbar .seg-ctl, .songbar .stepper { background: rgba(255, 255, 255, 0.08); }
.songbar .seg-ctl button { padding: 0 12px; min-height: 40px; }
.songbar .stepper button { width: 40px; height: 40px; font-size: 18px; }
.bar-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); cursor: pointer; }
.bar-btn:hover { background: rgba(255, 255, 255, 0.18); }
body.in-room .songbar { bottom: calc(env(safe-area-inset-bottom) + 10px); }

/* settings sheet */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.set-row .seg-ctl button { padding: 0 12px; }
.toggle { position: relative; width: 52px; height: 30px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.18); cursor: pointer; }
.toggle i { position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: inset-inline-start 0.2s; }
.toggle[aria-pressed="true"] { background: linear-gradient(45deg, var(--violet-a), var(--violet-b)); }
.toggle[aria-pressed="true"] i { inset-inline-start: 25px; }
.field.text { text-align: start; letter-spacing: 0; font-size: 17px; text-transform: none; }

.sheet-card { color: #f7f3ff; }

/* easy mode explanation */
.easy-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; max-width: 520px; margin: 12px auto 0; padding: 10px 14px; border-radius: 16px; background: rgba(109, 40, 217, 0.1); border: 1px solid rgba(109, 40, 217, 0.22); font-size: 14px; line-height: 1.5; }
.easy-note b { color: var(--chord); }
.easy-help { border: 0; border-radius: 999px; padding: 4px 12px; background: rgba(109, 40, 217, 0.16); color: var(--chord); font-weight: 500; font-size: 13px; cursor: pointer; }.capo-pill.reset { border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; }
.songbar .stepper .tr-val { width: auto; min-width: 40px; padding: 0 8px; border-radius: 999px; background: linear-gradient(45deg, var(--violet-a), var(--violet-b)); font-size: 14px; font-weight: 700; }
/* ================= song requests ================= */
.req-form { display: grid; gap: 8px; margin-top: 8px; }
.req-form .search { margin: 0; }
.req-form .btn { justify-self: stretch; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.req-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid transparent; }
.req-item.added { opacity: 0.6; }
.req-meta { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.req-title { font-weight: 700; font-size: 17px; }
.req-movie { color: var(--muted); font-size: 13px; }
.req-status { color: #ffe08a; font-size: 12px; margin-top: 2px; }
.req-vote { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 70px; min-height: 58px; border: 0; border-radius: 14px; background: linear-gradient(45deg, var(--violet-a), var(--violet-b)); color: #fff; cursor: pointer; transition: transform 0.15s; }
.req-vote:active { transform: scale(0.95); }
.req-vote.done, .req-vote[disabled] { background: var(--card-strong); color: var(--muted); cursor: default; }
.req-count { font-size: 20px; font-weight: 700; line-height: 1; }
.req-label { font-size: 12px; margin-top: 2px; }
.song-list.compact { max-height: 55vh; overflow: auto; margin-top: 10px; }
.song-list.compact .song-item a { background: rgba(255, 255, 255, 0.06); }
.queue-count { color: #ffd166; font-weight: 700; white-space: nowrap; }
.room-banner .badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-inline-start: 4px; border-radius: 999px; background: #ffd166; color: #1a0b2e; font-size: 11px; font-weight: 700; }
/* chord diagrams: always a white card with dark ink, readable on any background / theme */
.diagram { padding: 6px 4px 2px; border-radius: 12px; background: #fff; color: #1c0f33; box-shadow: 0 1px 3px rgba(28, 15, 51, 0.12); }
.diagram b { display: block; padding: 18px 14px; font-size: 20px; direction: ltr; }
.diagram svg { display: block; }
.chord-pop { position: absolute; z-index: 40; display: flex; gap: 6px; padding: 6px; border-radius: 16px; background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(28, 15, 51, 0.35); border: 1px solid rgba(109, 40, 217, 0.25); animation: pop-in 0.14s ease-out; max-width: calc(100vw - 20px); }
.chord-pop .diagram { box-shadow: none; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.chord-strip { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 84px); z-index: 35; display: block;
  width: min(760px, calc(100vw - 20px)); padding: 8px 8px 6px; animation: strip-in 0.16s ease-out; }
@keyframes strip-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translateX(-50%); } }
.strip-head { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 6px; color: #4c1d95; font-size: 14px; font-weight: 600; }
.strip-x { border: 0; background: rgba(109, 40, 217, 0.1); color: #4c1d95; width: 30px; height: 30px; border-radius: 50%; font-size: 14px; cursor: pointer; }
.strip-row { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.strip-row .diagram { flex: 0 0 auto; scroll-snap-align: start; background: #f6f2ff; }.strip-row .diagram svg { height: 128px; width: auto; }
