/* ===== Concert Band Central — shared styles ===== */
:root {
  --orange: #F0841E;
  --orange-dark: #D06C0E;
  --charcoal: #2D2D2D;
  --ink: #2B2B2B;
  --muted: #5F5F5F;
  --bg: #F6F6F4;
  --card: #FFFFFF;
  --line: #E2E2DE;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(#cfcfca 1px, transparent 1px);
  background-size: 22px 22px;
  line-height: 1.5;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

h1, h2, h3, .display {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.1;
  margin: 0;
}

/* ---------- Top bar (instrument pages) ---------- */
.topbar {
  background: var(--charcoal);
  color: #fff;
  position: sticky; top: 0; z-index: 20;
}
.topbar .wrap {
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; background: #fff; border-radius: 8px; padding: 2px; }
.brand span { font-family: "Oswald", sans-serif; font-weight: 600; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; }
.inst-nav { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; flex-basis: 100%; padding-bottom: 4px; scrollbar-width: none; }
.inst-nav::-webkit-scrollbar { display: none; }
.inst-nav a {
  flex: none; white-space: nowrap;
  text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; color: #ddd;
}
.inst-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.inst-nav a.active { background: var(--orange); color: #fff; }
.inst-select { display: none !important; margin-left: auto; font: inherit; font-size: 15px; padding: 7px 10px; border-radius: 8px; border: 0; }

/* ---------- Home ---------- */
.hero { text-align: center; padding: 40px 0 16px; }
.hero img.logo { width: min(520px, 100%); margin: 0 auto; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 18px auto 0; max-width: 560px; }

.section-title { text-align: center; font-size: 28px; margin: 34px 0 18px; }

.inst-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  margin-bottom: 40px;
}
.inst-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.inst-card:hover, .inst-card:focus-visible { transform: translateY(-2px); border-color: var(--orange); box-shadow: 0 10px 24px rgba(240,132,30,.18); outline: none; }
.badge {
  flex: none; width: 58px; height: 50px;
  display: grid; place-items: center;
  background: var(--orange); color: #fff;
  font-family: "Oswald", sans-serif; font-weight: 700; font-size: 20px;
  transform: skewX(-12deg); border-radius: 4px;
}
.badge span { transform: skewX(12deg); }
.inst-card:nth-child(even) .badge { background: var(--charcoal); }
.inst-card h3 { font-size: 22px; }
.inst-card p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.help {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 40px;
}
.help h2 { font-size: 22px; margin-bottom: 10px; }
.help ol { margin: 0; padding-left: 22px; }
.help li { margin: 4px 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange); color: #fff; text-decoration: none; font-weight: 700;
  padding: 11px 20px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-weight: 700;
}
.btn:hover { background: var(--orange-dark); }
.btn.dark { background: var(--charcoal); }
.btn.dark:hover { background: #111; }

/* ---------- Instrument page ---------- */
.page-head { padding: 30px 0 10px; }
.page-head .kicker { color: var(--orange-dark); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .08em; }
.page-head h1 { font-size: clamp(34px, 7vw, 54px); }
.page-head p { color: var(--muted); margin: 6px 0 0; }

.tools { position: sticky; top: var(--topbar-h, 100px); z-index: 10; background: var(--bg); padding: 12px 0; border-bottom: 1px solid var(--line); }
.search {
  width: 100%; font: inherit; font-size: 17px;
  padding: 12px 16px 12px 44px; border-radius: 999px;
  border: 2px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 16px center;
}
.search:focus { outline: none; border-color: var(--orange); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: thin; }
.chip {
  flex: none; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.chip:hover { border-color: var(--orange); }
.chip[aria-pressed="true"] { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }

.topic { margin: 28px 0 10px; }
.topic h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.topic h2::before { content: ""; width: 14px; height: 22px; background: var(--orange); transform: skewX(-12deg); border-radius: 2px; }

.video-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.video {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-align: left; padding: 0; font: inherit; color: inherit; cursor: pointer;
  display: flex; flex-direction: column; transition: transform .12s ease, border-color .12s ease;
}
.video:hover, .video:focus-visible { transform: translateY(-2px); border-color: var(--orange); outline: none; }
.thumb { position: relative; aspect-ratio: 16/9; background: #222 center/cover no-repeat; }
.thumb .play {
  position: absolute; inset: 0; margin: auto; width: 56px; height: 40px; border-radius: 10px;
  background: rgba(240,132,30,.95); display: grid; place-items: center;
}
.thumb .play::after { content: ""; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.video .meta { padding: 12px 14px 14px; }
.video .meta strong { display: block; font-size: 16px; line-height: 1.3; }
.video .meta small { color: var(--muted); font-size: 13px; }

.video.soon { cursor: default; opacity: .75; }
.video.soon:hover { transform: none; border-color: var(--line); }
.video.soon .thumb { background: repeating-linear-gradient(-45deg, #3a3a3a 0 14px, #333 14px 28px); display: grid; place-items: center; }
.video.soon .thumb span { color: #fff; font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .06em; background: var(--charcoal); padding: 4px 12px; border-radius: 4px; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Video modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.8); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-box { width: min(960px, 100%); }
.modal-bar { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 10px; }
.modal-bar h3 { font-size: 20px; flex: 1; }
.modal-close { background: #fff; color: var(--ink); border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; cursor: pointer; flex: none; }
.player { aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden; }
.player iframe { width: 100%; height: 100%; border: 0; }
.modal-foot { margin-top: 10px; text-align: right; }
.modal-foot a { color: #ffb36b; font-weight: 600; }

/* ---------- Footer ---------- */
footer { background: var(--charcoal); color: #bbb; text-align: center; padding: 22px 16px; font-size: 14px; margin-top: 40px; }
footer strong { color: var(--orange); font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

@media (max-width: 760px) {
  .brand span { font-size: 15px; line-height: 1.1; }
  .brand img { width: 36px; height: 36px; }
  .inst-select { max-width: 130px; }
}

@media (min-width: 760px) { .inst-grid { grid-template-columns: repeat(3, 1fr); } }
.inst-card.wide { grid-column: 1 / -1; }
.inst-card.wide .badge { background: var(--orange); }
@media (min-width: 761px) { .inst-nav { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; } .inst-nav a { padding: 6px 10px; } }

/* ---------- Brand touches from the logo ---------- */
.intro {
  width: min(600px, 100%); margin: 0 auto; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.intro video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #fff; }
.page-head h1 { display: inline-block; padding-bottom: 8px; border-bottom: 3px solid var(--charcoal); }
.page-head .kicker { font-family: "Exo 2", "Open Sans", sans-serif; font-weight: 400; letter-spacing: .14em; }
footer .slogan {
  display: block; margin-top: 4px; font-family: "Exo 2", "Open Sans", sans-serif;
  font-weight: 300; text-transform: uppercase; letter-spacing: .18em; color: #ddd;
}

/* ---------- Metronome ---------- */
.inst-card.tool .badge { font-size: 16px; }
.metro {
  max-width: 640px; margin: 18px auto 10px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 22px; text-align: center;
}
.metro-lights { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; min-height: 30px; }
.metro-lights .light {
  width: 30px; height: 30px; background: var(--line); border-radius: 4px; transform: skewX(-12deg);
  transition: background .06s ease;
}
.metro-lights .light.first { outline: 2px solid var(--orange); outline-offset: 2px; }
.metro-lights .light.on { background: var(--charcoal); }
.metro-lights .light.first.on { background: var(--orange); }
.metro-tempo { display: flex; align-items: center; justify-content: center; gap: 18px; }
.metro-bpm output { display: block; font-family: "Oswald", sans-serif; font-weight: 700; font-size: clamp(64px, 18vw, 96px); line-height: 1; }
.metro-unit { font-family: "Exo 2", "Open Sans", sans-serif; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-size: 14px; }
.metro-step {
  width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--line); background: #fff;
  font-size: 30px; font-weight: 700; line-height: 1; cursor: pointer; color: var(--ink);
}
.metro-step:hover { border-color: var(--orange); }
.metro-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 10px; margin: 26px 0 4px; border-radius: 999px;
  background: linear-gradient(to right, var(--orange) var(--fill, 30%), var(--line) var(--fill, 30%));
}
.metro-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--charcoal); border: 4px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer;
}
.metro-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--charcoal); border: 4px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer;
}
.metro-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.metro-start { font-size: 20px; padding: 14px 54px; margin: 20px 0 6px; text-transform: uppercase; font-family: "Oswald", sans-serif; letter-spacing: .06em; }
.metro-group { margin-top: 22px; }
.metro-group h2 { font-size: 16px; margin-bottom: 10px; color: var(--muted); }
.metro-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.metro-options .chip { font-size: 15px; padding: 9px 16px; }
.metro-options .note { font-size: 18px; line-height: 1; margin-right: 2px; }
.metro-tip { font-size: 13px; color: var(--muted); margin: 22px 0 0; }

/* ---------- Tuner ---------- */
.tuner-for { font-size: 14px; color: var(--muted); }
.tuner-for strong { color: var(--ink); }
.tuner-note { font-family: "Oswald", sans-serif; font-weight: 700; font-size: clamp(88px, 26vw, 132px); line-height: 1.05; margin-top: 6px; transition: color .15s ease; }
.tuner.in-tune .tuner-note { color: #2E9B4F; }
.tuner-concert { font-family: "Exo 2", "Open Sans", sans-serif; letter-spacing: .08em; color: var(--muted); font-size: 15px; min-height: 22px; }
.tuner-meter { position: relative; height: 64px; margin: 22px 4px 0; border-radius: 10px; background: linear-gradient(to right, #F7D9BC, #fff 40%, #fff 60%, #F7D9BC); border: 1px solid var(--line); overflow: hidden; }
.tuner-zone { position: absolute; left: 45%; width: 10%; top: 0; bottom: 0; background: rgba(46,155,79,.18); border-left: 1px solid rgba(46,155,79,.5); border-right: 1px solid rgba(46,155,79,.5); }
.tuner-ticks { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: space-between; padding: 0 6px; font-size: 11px; color: var(--muted); }
.tuner-needle { position: absolute; top: 6px; bottom: 20px; width: 6px; margin-left: -3px; left: 50%; background: var(--orange); border-radius: 3px; transform: skewX(-12deg); transition: left .12s linear; }
.tuner.in-tune .tuner-needle { background: #2E9B4F; }
.tuner-status { margin-top: 12px; font-weight: 600; min-height: 24px; }
.tuner.in-tune .tuner-status { color: #2E9B4F; }
.tuner .chip small { font-weight: 400; color: var(--muted); }
.tuner .chip[aria-pressed="true"] small { color: #ddd; }
.tuner-ref { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 18px; }
.tuner-ref .metro-step { width: 44px; height: 44px; font-size: 24px; }
.grid-title { grid-column: 1 / -1; margin: 18px 0 0; }

/* ---------- Partial Checker ---------- */
.partials-sub { margin-top: 10px; }
.partials-sub .chip { font-size: 13px; padding: 6px 12px; }
.partials-target { display: flex; align-items: center; justify-content: center; gap: 10px; }
.partials-staff { width: min(250px, 62vw); height: 165px; }
.partials-name { margin-top: 2px; color: var(--muted); }
.partials-name strong { font-family: "Oswald", sans-serif; font-size: 26px; color: var(--ink); }
.partials-result { margin: 22px 0 6px; padding: 16px; border-radius: 10px; background: var(--bg); border: 2px solid var(--line); min-height: 92px; transition: background .15s, border-color .15s; }
.partials-verdict { font-family: "Oswald", sans-serif; font-weight: 600; font-size: 22px; text-transform: uppercase; }
.partials-detail { color: var(--muted); margin-top: 4px; }
.partials-result.good { background: #E8F6EC; border-color: #2E9B4F; }
.partials-result.good .partials-verdict { color: #2E9B4F; }
.partials-result.high, .partials-result.low { background: #FDF0E3; border-color: var(--orange); }
.partials-result.high .partials-verdict, .partials-result.low .partials-verdict { color: var(--orange-dark); }
.partials-result.off { background: #F3F3F1; border-color: #9a9a96; }
.metro-start.top { margin: 0 0 20px; }

/* ---------- Home grid: 3 instruments per row, 2 tools per row ---------- */
@media (min-width: 760px) {
  .inst-grid { grid-template-columns: repeat(6, 1fr); }
  .inst-card { grid-column: span 2; }
  .inst-card.tool { grid-column: span 3; }
}

/* ---------- Fingering Trainer ---------- */
.fing-modes { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.fing-modes .metro-start.top { padding: 13px 26px; font-size: 18px; margin-bottom: 14px; }
.fing-levels { margin-top: 10px; }
.fing-levels .chip { font-size: 13px; padding: 6px 12px; }
.fing-board { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.fing-stats { display: flex; justify-content: space-between; font-size: 15px; color: var(--muted); }
.fing-stats strong { font-family: "Oswald", sans-serif; font-size: 22px; color: var(--ink); margin-left: 4px; }
.fing.challenge #timer { color: var(--orange-dark); }
.fing-staff { margin: 0 auto; height: 175px; }
.fing-name { font-family: "Oswald", sans-serif; font-size: 24px; min-height: 32px; }
.fing-feedback { margin: 10px 0 14px; min-height: 80px; }
.fing-valves { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; }
.fing-valve {
  width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--charcoal); background: #fff;
  font-family: "Oswald", sans-serif; font-size: 30px; font-weight: 700; color: var(--ink); cursor: pointer;
  box-shadow: 0 6px 0 var(--charcoal); transition: transform .06s, box-shadow .06s, background .06s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.fing-valve[aria-pressed="true"] { background: var(--orange); color: #fff; transform: translateY(5px); box-shadow: 0 1px 0 var(--charcoal); }
.fing-play { font-family: "Oswald", sans-serif; font-size: 20px; text-transform: uppercase; padding: 16px 30px; touch-action: manipulation; }
.fing-slide { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 520px; margin: 0 auto; }
.fing-pos {
  height: 64px; border-radius: 10px; border: 2px solid var(--line); background: #fff; cursor: pointer;
  font-family: "Oswald", sans-serif; font-size: 26px; font-weight: 700; color: var(--ink); touch-action: manipulation;
}
.fing-pos:hover { border-color: var(--orange); }
.fing-pos:active { background: var(--orange); color: #fff; }
.fing-toggle { display: block; margin-top: 12px; font-size: 14px; color: var(--muted); }
.fing-toggle:first-of-type { margin-top: 20px; }
.fing [hidden] { display: none !important; }
.fing-feedback.bad { background: #FCEBEA; border-color: #C8463D; }
.fing-feedback.bad .partials-verdict { color: #B03A32; }

/* ---------- Search-engine text ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.seo-about { margin: 36px 0 10px; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.seo-about h2 { font-size: 20px; margin-bottom: 6px; }
.seo-about p { margin: 0; color: var(--muted); }

/* ---------- Music notation ---------- */
.partials-staff svg, .fing-staff svg { display: block; }
.acc { font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Noto Music", "DejaVu Sans", sans-serif;
  font-weight: 400; font-size: .82em; line-height: 1; display: inline-block; vertical-align: .12em; margin-left: .04em; }
.fing-stats { gap: 8px; flex-wrap: wrap; }
.fing-stats small { font-size: 13px; }
.fing-reset { display: block; margin: 8px auto 0; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.fing-reset:hover, .fing-reset:focus-visible { border-color: var(--orange); color: var(--ink); }

/* ===== App (install + offline) ===== */
.get-app p { margin: 0 0 12px; }
.get-app .app-hint { color: var(--muted); }
.get-app .app-hint:empty { display: none; }
.offline-note {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 200;
  width: max-content; max-width: calc(100% - 32px);
  background: var(--charcoal); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 14px; text-align: center; box-shadow: var(--shadow);
}
.offline-note[hidden], .get-app[hidden], .get-app [hidden] { display: none; }
footer .foot-link { display: inline-block; margin-top: 10px; color: #bbb; font-size: 13px; }
.policy h2 { font-size: 20px; margin: 22px 0 6px; }
.policy h2:first-child { margin-top: 0; }
.policy p { margin: 0; }
.fing-modes .metro-start[aria-pressed="true"] { outline: 3px solid var(--orange); outline-offset: 3px; }

/* ---------- Rhythm Trainer ---------- */
.metro.rt, .metro.rt-panel { max-width: 860px; }
.rt-level, .rt-tempo { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.rt-tempo { margin-top: 12px; }
.rt-tempo output { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 34px; line-height: 1; }
.rt-arrow { width: 42px; height: 42px; font-size: 24px; }
.rt-arrow:disabled { opacity: .35; cursor: default; }
.rt-break { flex-basis: 100%; height: 0; }
.rt-slider { width: 100%; max-width: 420px; margin: 4px auto 0; }
.rt-select { font: inherit; font-weight: 600; font-size: 16px; padding: 9px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); max-width: calc(100% - 110px); }
.rt-new { margin: 16px auto 0; padding: 12px 14px; border-radius: 10px; background: #FDF0E3; border: 1px solid #F5C99A; max-width: 620px; }
.rt-new-label { font-family: "Oswald", sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--orange-dark); }
.rt-new-music { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; }
.rt-new-music[hidden] { display: none; }
.rt-snip { max-width: 100%; }
.rt-new p { margin: 4px 0 0; font-size: 15px; }
.rt-board { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.rt-board .metro-lights { margin-bottom: 8px; }
.rt-hands { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.rt-hands[hidden] { display: none; }
.rt-music { display: grid; grid-template-columns: 1fr; gap: 4px 0; }
@media (min-width: 640px) { .rt-music { grid-template-columns: 1fr 1fr; } }
.rt-measure { position: relative; }
.rt-svg svg { display: block; overflow: visible; }
.rt-cursor { display: none; position: absolute; top: 4%; bottom: 20px; width: 3px; margin-left: -1px; border-radius: 2px; background: rgba(240,132,30,.55); pointer-events: none; }
.rt-lane { position: relative; height: 18px; margin: 0 2px; border-top: 1px dashed var(--line); }
.rt-music.two .rt-lane { height: 24px; }
.rt-ghost, .rt-mark { position: absolute; width: 4px; margin-left: -2px; border-radius: 2px; }
.rt-ghost { top: 3px; height: 12px; background: #CFCFCB; }
.rt-mark { top: 1px; height: 16px; width: 6px; margin-left: -3px; }
.rt-music.two .rt-ghost.rh, .rt-music.two .rt-mark.rh { top: 1px; height: 10px; }
.rt-music.two .rt-ghost.lh, .rt-music.two .rt-mark.lh { top: 13px; height: 10px; }
.rt-mark.perfect { background: #2E9B4F; }
.rt-mark.close { background: var(--orange); }
.rt-mark.miss { background: #C8463D; }
.rt-svg .rt-now path, .rt-svg .rt-now text { fill: var(--orange); stroke: var(--orange); }
.rt-svg .rt-perfect path, .rt-svg .rt-perfect text { fill: #2E9B4F; stroke: #2E9B4F; }
.rt-svg .rt-close path, .rt-svg .rt-close text { fill: var(--orange-dark); stroke: var(--orange-dark); }
.rt-svg .rt-miss path, .rt-svg .rt-miss text { fill: #C8463D; stroke: #C8463D; }
.rt-svg .vf-stem path { fill: none; }
.rt-feedback { margin: 10px 0 12px; min-height: 84px; }
.rt-feedback.count .partials-verdict { font-size: 34px; color: var(--orange-dark); }
.rt-feedback.close { background: #FDF0E3; border-color: var(--orange); }
.rt-feedback.close .partials-verdict { color: var(--orange-dark); }
.rt-feedback.bad { background: #FCEBEA; border-color: #C8463D; }
.rt-feedback.bad .partials-verdict { color: #B03A32; }
.rt-pads { display: flex; gap: 10px; }
.rt-pad {
  flex: 1; min-height: 92px; border: 0; border-radius: 14px; background: var(--charcoal); color: #fff; cursor: pointer;
  font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 5px 0 #000; transition: transform .05s, box-shadow .05s;
}
.rt-pad span { font-family: "Oswald", sans-serif; font-size: 28px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.rt-pad small { font-size: 13px; color: #ccc; }
.rt-pad.hit { animation: rt-hit .15s; }
@keyframes rt-hit { 0% { background: var(--orange); transform: translateY(4px); box-shadow: 0 1px 0 #000; } 100% { background: var(--charcoal); } }
.running .rt-pad { background: #3a3a3a; }
@media (max-width: 639px) {
  .rt-playing .rt-pads { position: sticky; bottom: 8px; z-index: 5; }
  .rt-pad { min-height: 84px; }
}
.rt-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.rt-actions .btn { font-size: 15px; padding: 9px 16px; }
.rt-actions .btn:disabled { opacity: .4; cursor: default; }
.rt-actions [hidden] { display: none; }
.rt-legend { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.rt-key { display: inline-block; width: 6px; height: 13px; border-radius: 2px; vertical-align: -2px; margin: 0 4px 0 8px; }
.rt-key.perfect { background: #2E9B4F; } .rt-key.close { background: var(--orange); } .rt-key.miss { background: #C8463D; }
.rt-toggles { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; margin-top: 8px; }
.rt-toggles .fing-toggle, .rt-toggles .fing-toggle:first-of-type { margin-top: 8px; }
.rt-panel { text-align: left; }
.rt-panel h2 { font-size: 22px; }
.rt-summary { color: var(--muted); margin: 4px 0 12px; }
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rt-tile { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; text-align: left; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; cursor: pointer; color: var(--ink); }
.rt-tile b { font-family: "Oswald", sans-serif; font-size: 22px; grid-row: span 2; color: var(--muted); }
.rt-tile span { font-size: 13px; font-weight: 600; line-height: 1.25; }
.rt-tile em { font-style: normal; color: #C9C9C4; letter-spacing: .1em; }
.rt-tile.passed { background: #E8F6EC; border-color: #9BD3AC; }
.rt-tile.passed b, .rt-tile em { color: #2E9B4F; }
.rt-tile:not(.passed) em { color: #BDBDB8; }
.rt-tile.current { border-color: var(--orange); }
.rt-tile:hover { border-color: var(--orange); }
.rt-history { list-style: none; margin: 0; padding: 0; }
.rt-history li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.rt-history li.empty { color: var(--muted); }
.rt-history b { font-weight: 600; }
.rt-history em { font-style: normal; color: #2E9B4F; white-space: nowrap; }
.rt-history small { display: block; color: var(--muted); font-size: 13px; }
.rt-history .chip { flex: none; font-size: 14px; padding: 7px 14px; }
.rt-panel .fing-reset[hidden] { display: none; }
@media (pointer: coarse) { .rt-pad small { display: none; } }

/* Rhythm Trainer: full-screen play view on phones */
.rt-focusbar { display: none; }
.rt-measure[hidden] { display: none; }
html.rt-lock, html.rt-lock body { overflow: hidden; overscroll-behavior: none; }
.rt-focus .rt-board {
  position: fixed; inset: 0; z-index: 300; margin: 0; border: 0; background: var(--card);
  height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  padding: 6px 12px calc(10px + env(safe-area-inset-bottom)); overflow: hidden;
}
.rt-focus .rt-focusbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; padding-bottom: 4px; }
.rt-focus .rt-focusbar span { font-family: "Oswald", sans-serif; font-weight: 600; font-size: 15px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-close { flex: none; font: inherit; font-weight: 700; font-size: 14px; padding: 7px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.rt-focus .rt-board .metro-lights { flex: none; margin: 0 0 4px; min-height: 22px; }
.rt-focus .rt-board .metro-lights .light { width: 18px; height: 18px; }
.rt-focus .rt-hands { flex: none; font-size: 12px; margin-bottom: 2px; }
.rt-focus .rt-music { flex: 1 1 0; min-height: 0; overflow: hidden; align-content: start; }
.rt-focus .rt-feedback { flex: none; min-height: 0; margin: 4px 0 8px; padding: 6px 10px; }
.rt-focus .rt-feedback .partials-verdict { font-size: 18px; }
.rt-focus .rt-feedback.count .partials-verdict { font-size: 24px; }
.rt-focus .rt-feedback .partials-detail { font-size: 13px; margin-top: 0; }
.rt-focus .rt-pads { flex: none; position: static; }
.rt-focus .rt-pad { min-height: 78px; }
.rt-focus .rt-actions { flex: none; margin-top: 8px; gap: 6px; }
.rt-focus .rt-actions .btn { font-size: 13px; padding: 7px 12px; }
.rt-focus .rt-legend, .rt-focus .rt-toggles { display: none; }
.rt-feedback .partials-detail { white-space: pre-line; }
.rt-flip { display: none; }
.rt-focus .rt-board { position: fixed; }
.rt-focus .rt-board.win .rt-flip { display: block; visibility: hidden; flex: none; height: 18px; font-size: 12px; color: var(--muted); }
.rt-focus .rt-board.win .rt-flip:not([hidden]) { visibility: visible; }
.rt-focus .rt-feedback { height: 76px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.rt-focus .rt-feedback .partials-detail { line-height: 1.3; }
.rt-focus .rt-long { display: none; }
.rt-focus .rt-actions { flex-wrap: nowrap; }
.rt-focus .rt-actions .btn { white-space: nowrap; }
.rt-focus .rt-pad span { font-size: 24px; white-space: nowrap; }
@media (max-height: 500px) {
  .rt-focus .rt-board .metro-lights, .rt-focus .rt-hands { display: none; }
  .rt-focus .rt-feedback { height: 62px; margin: 2px 0 6px; padding: 4px 10px; }
  .rt-focus .rt-feedback .partials-detail { font-size: 12px; line-height: 1.25; }
  .rt-focus .rt-feedback .partials-verdict { font-size: 16px; }
  .rt-focus .rt-pad { min-height: 54px; }
  .rt-focus .rt-actions { margin-top: 6px; }
}
