/* Echo Chamber: midnight background, rounded neon pads, soft glows. */
:root {
  /* Mountain Life Music brand (user's MLM logo, 2026-10-31): black, gold and cream. Old navy look: style.before-mlm-brand.css */
  --bg: #0b0c0b; --bg2: #1d1e1b; --card: #1a1b18; --card2: #262620; --text: #f4ecd8; --muted: #b3aa96;
  --blue: #2f8cff; --pink: #ff4fa8; --orange: #ff9a3d; --gold: #d9b25c; --bad: #e0564f;
  --accent: #d4a94e; --accent-hi: #f0d68e; --accent-ink: #1a150b; --good: #8fc79a; --good-text: #b8dcb0; --off: #48443a;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(circle at 50% 30%, var(--bg2), var(--bg) 70%) fixed; color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-user-select: none; user-select: none; overscroll-behavior: none; -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.screen { display: none; min-height: 100vh; min-height: 100dvh; flex-direction: column; align-items: center;
  padding: calc(14px + var(--safe-t)) 16px calc(18px + var(--safe-b)); }
.screen.active { display: flex; }

/* Home */
#home { justify-content: center; gap: 6px; position: relative; }
.logo { width: min(66vw, 36vh, 380px); border-radius: 28px; box-shadow: 0 0 70px rgba(212, 169, 78, .35); }
.tagline { color: var(--muted); margin: 14px 0 8px; text-align: center; }
.menu { display: flex; flex-direction: column; gap: 14px; width: min(86vw, 360px); align-items: stretch; }
.big-btn { padding: 18px; border-radius: 999px; font-weight: 800; font-size: 1.15rem; letter-spacing: .12em; color: var(--accent-ink); }
.big-btn.quest { background: linear-gradient(90deg, var(--accent), var(--accent-hi)); box-shadow: 0 0 24px rgba(212, 169, 78, .45); }
.big-btn.arcade { background: linear-gradient(90deg, #ff5fb0, #ffb340); box-shadow: 0 0 24px rgba(255, 120, 120, .4); }
.big-btn.classical { background: linear-gradient(90deg, #ffd27a, #e0a33a 55%, #c4683a); box-shadow: 0 0 24px rgba(240, 180, 80, .35); }
.big-btn.hymns { background: linear-gradient(90deg, #f4e6c8, #b9a3ff 60%, #8a7bff); box-shadow: 0 0 24px rgba(185, 163, 255, .35); }
.big-btn.pads { background: linear-gradient(90deg, var(--accent), var(--accent)); box-shadow: 0 0 24px rgba(212, 169, 78, .35); padding: 13px; font-size: 1rem; }
.big-btn:active, .small-btn:active { transform: scale(.97); }
.link-btn { color: var(--muted); text-decoration: underline; padding: 10px; }
.totals { color: var(--muted); font-size: .9rem; text-align: center; min-height: 1.2em; }
.settings-btn { position: absolute; top: calc(10px + var(--safe-t)); right: 12px; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; background: rgba(255, 255, 255, .07); }

/* Top bar */
.bar { width: 100%; max-width: 640px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.bar-title { font-size: .72rem; letter-spacing: .14em; color: var(--muted); text-align: center; }
.bar-right { justify-self: end; color: var(--gold); font-weight: 700; }
.bar .icon-btn { justify-self: end; }
.back { justify-self: start; white-space: nowrap; padding: 10px 16px; min-height: 44px; border-radius: 999px; background: rgba(255, 255, 255, .09);
  font-weight: 700; font-size: .8rem; letter-spacing: .08em; }

/* Song library */
.song-list { width: 100%; max-width: 640px; overflow-y: auto; padding: 8px 0 20px; }
.world-head { color: var(--gold); font-weight: 800; letter-spacing: .08em; font-size: .85rem; margin: 22px 4px 10px; text-transform: uppercase; }
.world-head small { color: var(--muted); font-weight: 600; letter-spacing: .04em; margin-left: 6px; text-transform: none; }
.song { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; background: var(--card); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 10px; min-height: 64px; border: 1px solid rgba(255, 255, 255, .06); }
.song:not(.locked):active { background: var(--card2); }
.song .num { font-weight: 800; color: var(--muted); width: 2ch; }
.song .info { flex: 1; }
.song .t { font-weight: 700; }
.song .t small { color: var(--muted); font-weight: 500; }
.song .meta { color: var(--muted); font-size: .82rem; margin-top: 3px; }
.song .st { color: var(--gold); letter-spacing: 2px; white-space: nowrap; }
.song .st .off { color: var(--off); }
.song.locked { opacity: .45; cursor: default; }

/* Game */
#game { gap: 4px; touch-action: none; }
.g-head { text-align: center; margin-top: 4px; }
.g-head h1 { margin: 6px 0 2px; font-size: clamp(1.2rem, 5vw, 1.7rem); letter-spacing: .04em; }
.g-step { margin: 0; color: var(--muted); font-size: .9rem; min-height: 1.2em; }
.dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; min-height: 12px; margin: 10px auto 0; max-width: 320px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a372e; transition: background .15s; }
.dots i.on { background: var(--accent-hi); box-shadow: 0 0 8px var(--accent-hi); }
.dots i.next { background: transparent; border: 2px dashed #4a548c; }
.g-status { margin: 10px 0 0; font-weight: 800; letter-spacing: .14em; font-size: 1.15rem; min-height: 1.4em; }
.g-status.listen { color: var(--accent-hi); }
.g-status.turn { color: var(--gold); }
.g-status.good { color: #5cf09a; }
.g-status.bad { color: var(--bad); }

.board { flex: 1; width: 100%; display: grid; gap: clamp(10px, 3vw, 18px); align-content: center; justify-content: center; padding: 10px 0; }
.board.c2 { grid-template-columns: repeat(2, var(--pad)); --pad: min(40vw, 30vh, 230px); }
.board.c3 { grid-template-columns: repeat(3, var(--pad)); --pad: min(28vw, 21vh, 170px); }
/* Pad base: the button handles dim/lit/glow; the .face inside draws the chosen pad style (see skins.css). */
.pad { width: var(--pad); height: var(--pad); position: relative; display: grid; place-items: center; touch-action: none;
  --c: var(--base); --hi: color-mix(in srgb, var(--c) 55%, #fff); --lo: color-mix(in srgb, var(--c) 55%, #000);
  opacity: .5; transition: opacity .12s, transform .12s, filter .12s; }
.pad > .face { position: absolute; inset: 0; pointer-events: none; }
.pad .lbl { position: relative; z-index: 3; font-weight: 800; font-size: calc(var(--pad) * .26); color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); opacity: 0; pointer-events: none; }
.pad .lbl sub { font-size: .45em; }
body.labels .pad .lbl { opacity: .95; }
.board.on .pad { opacity: .78; }
.pad.lit { opacity: 1 !important; transform: scale(1.05); filter: drop-shadow(0 0 calc(var(--pad) * .07) var(--c)) drop-shadow(0 0 calc(var(--pad) * .16) var(--c)) brightness(1.15); }
.pad.wrong { --c: var(--bad); opacity: 1 !important; animation: shake .35s; filter: drop-shadow(0 0 calc(var(--pad) * .1) var(--bad)); }
.pad.hint { opacity: 1 !important; outline: 4px dashed #fff; outline-offset: 5px; border-radius: 18%; }
.pad.preview { opacity: .14 !important; filter: grayscale(.7); pointer-events: none; }
.pad.preview::after { content: "🔒"; position: relative; z-index: 3; font-size: calc(var(--pad) * .2); opacity: .7; }
@keyframes shake { 0%, 100% { translate: 0 } 25% { translate: -8px } 75% { translate: 8px } }

.g-foot { width: 100%; max-width: 560px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .92rem; }
.small-btn { padding: 10px 16px; min-height: 44px; border-radius: 999px; background: rgba(255, 255, 255, .09); font-weight: 700; font-size: .85rem; }
.small-btn[disabled] { opacity: .35; }

/* Pop-up panels */
.overlay { position: fixed; inset: 0; background: rgba(6, 6, 5, .8); display: flex; align-items: center; justify-content: center; z-index: 10;
  padding: 20px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.overlay[hidden] { display: none; }
.panel { width: min(92vw, 400px); max-height: 90vh; overflow-y: auto; background: linear-gradient(180deg, #22221d, #121310);
  border: 1px solid rgba(212, 169, 78, .4); border-radius: 26px; padding: 26px 22px; text-align: center; box-shadow: 0 0 60px rgba(212, 169, 78, .18); }
.panel h2 { margin: 4px 0 6px; letter-spacing: .06em; }
.panel .kicker { color: var(--muted); font-size: .8rem; letter-spacing: .16em; }
.panel p { color: var(--muted); line-height: 1.45; }
.panel .stars { font-size: 2.6rem; letter-spacing: 8px; color: var(--gold); text-shadow: 0 0 18px rgba(255, 200, 60, .6); margin: 6px 0; }
.panel .stars .off { color: var(--off); text-shadow: none; }
.panel .stars span { display: inline-block; animation: pop .4s backwards; }
.panel .stars span:nth-child(2) { animation-delay: .15s; } .panel .stars span:nth-child(3) { animation-delay: .3s; }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.3); } }
.panel .btns { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.panel .btns .big-btn { font-size: 1rem; padding: 15px; }
.panel .primary { background: linear-gradient(90deg, var(--accent), var(--accent-hi)); color: var(--accent-ink); }
.panel .secondary { background: rgba(255, 255, 255, .1); color: var(--text); }
.panel .howto { text-align: left; color: var(--text); padding-left: 1.2em; line-height: 1.5; }
.toggle { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-align: left; width: 100%; min-height: 50px; }
.toggle .sw { width: 50px; height: 30px; border-radius: 999px; background: var(--off); position: relative; transition: background .15s; flex: none; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle[aria-checked="true"] .sw { background: var(--accent); }
.toggle[aria-checked="true"] .sw::after { left: 23px; }
.danger { color: var(--bad); font-size: .85rem; text-decoration: underline; margin-top: 14px; padding: 8px; }

/* High contrast setting: solid colors, white outlines, note names on. */
body.contrast .pad { opacity: .92; }
body.contrast .board.on .pad { opacity: 1; }
body.contrast .pad .lbl { opacity: 1; }
body.contrast { --muted: #d8dcf0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pad.lit { transform: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  #game { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; column-gap: 20px; }
  #game .bar { grid-column: 1 / -1; max-width: none; }
  #game .g-head { grid-column: 1; align-self: center; }
  #game .board { grid-column: 2; grid-row: 2 / 4; }
  #game .g-foot { grid-column: 1; flex-direction: column; gap: 10px; }
  .board.c2 { --pad: min(36vh, 200px); } .board.c3 { --pad: min(24vh, 140px); }
}

/* Pad styles screen */
.pads-help { color: var(--muted); font-size: .88rem; text-align: center; margin: 12px 0 4px; max-width: 520px; }
.pad-list { width: 100%; max-width: 640px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 10px 0 24px; }
.skin { background: var(--card); border-radius: 18px; padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 2px solid transparent; }
.skin.using { border-color: var(--accent); box-shadow: 0 0 18px rgba(212, 169, 78, .35); }
.skin.locked { cursor: default; }
.skin.locked .mini { opacity: .3; filter: grayscale(.8); }
.mini { display: grid; grid-template-columns: repeat(2, var(--pad)); gap: 7px; --pad: 48px; }
.mini .pad { opacity: 1; }
.skin-name { font-size: .72rem; letter-spacing: .14em; font-weight: 700; }
.skin-status { font-size: .78rem; color: var(--muted); }
.skin.using .skin-status { color: var(--accent-hi); font-weight: 700; }
.panel .unlock { color: var(--good-text); margin: 0 0 4px; }

/* Classical Quest: circle-of-fifths board */
.board.circle { flex: none; display: block; position: relative; margin: auto; padding: 0;
  --S: min(94vw, 54vh, 620px); --pad: calc(var(--S) * .175); width: var(--S); height: var(--S); }
.board.circle::before { content: ""; position: absolute; inset: 11%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .07); }
.board.circle .pad { position: absolute; left: calc(50% + var(--x) * var(--S) - var(--pad) / 2); top: calc(50% + var(--y) * var(--S) - var(--pad) / 2); }
.board.circle .pad .lbl { opacity: .95; font-size: calc(var(--pad) * .3); }
.board.circle .pad.off { opacity: .17 !important; filter: grayscale(.7); pointer-events: none; }
.circle-center { position: absolute; inset: 29%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(30, 38, 90, .55), rgba(8, 10, 30, .2) 70%); text-align: center; pointer-events: none; }
.cc-key { color: var(--gold); font-weight: 800; letter-spacing: .06em; font-size: calc(var(--S) * .045); }
.cc-note { font-weight: 800; font-size: calc(var(--S) * .14); line-height: 1.1; min-height: 1.1em; text-shadow: 0 0 18px currentColor; }
.cc-hint { color: var(--muted); font-size: calc(var(--S) * .03); }
.lib-intro { color: var(--muted); text-align: center; margin: 12px 8px 0; line-height: 1.45; }
.lib-intro .link-btn { display: block; margin: 2px auto 0; }
@media (orientation: landscape) and (max-height: 520px) { .board.circle { --S: min(86vh, 52vw); } }

/* Game settings */
.bar-btns { justify-self: end; display: flex; gap: 8px; }
.home-links { display: flex; justify-content: center; gap: 18px; }
.set-head { text-align: left; color: var(--gold); font-size: .75rem; font-weight: 800; letter-spacing: .14em; margin: 16px 2px 8px; }
.inst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inst { background: rgba(255, 255, 255, .07); border: 2px solid transparent; border-radius: 16px; padding: 12px 6px 10px; min-height: 92px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; }
.inst.on { border-color: var(--accent); background: rgba(212, 169, 78, .12); box-shadow: 0 0 16px rgba(212, 169, 78, .3); }
.inst-ico { font-size: 1.8rem; line-height: 1.1; }
.inst-name { font-weight: 800; letter-spacing: .06em; }
.inst-st { font-size: .75rem; color: var(--accent-hi); min-height: 1em; }
.set-note { font-size: .8rem; margin: 8px 0 0; }

/* Jam / Gig / Tour difficulty picker */
.level-pick { width: 100%; max-width: 640px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.lvl { background: var(--card); border: 2px solid transparent; border-radius: 14px; padding: 9px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 52px; }
.lvl b { letter-spacing: .14em; font-size: .95rem; }
.lvl small { color: var(--muted); font-size: .72rem; }
.lvl.on { border-color: var(--gold); background: rgba(255, 200, 61, .12); box-shadow: 0 0 14px rgba(255, 200, 61, .25); }
.lvl.on small { color: var(--gold); }
.level-desc { color: var(--muted); font-size: .82rem; text-align: center; margin: 8px 0 0; min-height: 1.2em; }

/* Mode choice (Gamer / Learner) and Learner screens */
#modes { justify-content: center; gap: 6px; position: relative; }
.home-back { position: absolute; top: calc(10px + var(--safe-t)); left: 12px; }
.mode-cards { display: grid; grid-template-columns: 1fr; gap: 14px; width: min(88vw, 420px); }
@media (min-width: 640px) { .mode-cards { grid-template-columns: 1fr 1fr; width: min(90vw, 620px); } }
.mode-card:active, .learn-inst:active { transform: scale(.98); }
.mode-ico { font-size: 2.2rem; line-height: 1.1; }
.learn-h { margin: 18px 0 6px; text-align: center; }
.inst-pick { width: 100%; max-width: 640px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 0 24px; }
.learn-inst { background: var(--card); border: 2px solid transparent; border-radius: 20px; padding: 18px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.learn-inst b { letter-spacing: .12em; }
.learn-inst small { color: var(--muted); font-size: .8rem; }
.learn-inst.on { border-color: var(--accent); }
.lessons { width: 100%; max-width: 640px; padding: 6px 0 24px; }
.lesson-hero { text-align: center; margin: 10px 0 14px; }
.lesson-hero h2 { margin: 4px 0; }
.lesson-hero p { color: var(--muted); margin: 4px 12px; line-height: 1.4; }
.lesson { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 14px; padding: 13px 16px; margin-bottom: 9px; }
.lesson-n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; display: grid; place-items: center; flex: none; }
.lesson-t { flex: 1; font-weight: 600; }
.lesson-st { color: var(--muted); font-size: .75rem; }
.lesson.soon .lesson-n { background: var(--off); color: var(--text); }

/* Opening screen with the user's Gamer / Learner icons */
.mode-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 0; background: none; color: var(--text); }
.mode-card img { width: 100%; border-radius: 22%; box-shadow: 0 0 30px rgba(212, 169, 78, .35); }
.mode-card small { color: var(--muted); font-size: .8rem; line-height: 1.3; max-width: 26ch; }
/* The logo is exactly as wide as the two mode buttons together (user, 2026-10-20). On short screens both shrink together. */
#modes { --mw: min(94vw, 560px, calc((100vh - 200px) / 1.5)); }
@supports (height: 100svh) { #modes { --mw: min(94vw, 560px, calc((100svh - 200px) / 1.5)); } }
#modes .mode-cards { grid-template-columns: 1fr 1fr; width: var(--mw); gap: 14px; }
#modes .logo { width: var(--mw); }

/* Learner hub */
.learn-sub { width: 100%; max-width: 640px; margin-top: 18px; }
.inst-chips { width: 100%; max-width: 640px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip { background: var(--card); border: 2px solid transparent; border-radius: 14px; padding: 9px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; font-size: .82rem; }
.chip span { font-size: 1.5rem; }
.chip.on { border-color: var(--accent); background: rgba(212, 169, 78, .12); }
.tools { width: 100%; max-width: 640px; display: grid; gap: 12px; margin-top: 20px; }
.tool { background: linear-gradient(135deg, var(--card2), var(--card)); border-radius: 20px; padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 16px; align-items: center; text-align: left; border: 1px solid rgba(255, 255, 255, .07); min-height: 80px; }
.tool-ico { grid-row: 1 / 3; font-size: 2.2rem; }
.tool b { letter-spacing: .14em; }
.tool small { color: var(--muted); }
.tool:active { transform: scale(.98); }

/* Metronome */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(92vw, 420px); margin-top: 18px; }
.seg button { background: var(--card); border: 2px solid transparent; border-radius: 14px; padding: 12px 0; font-weight: 800; font-size: 1.15rem; }
.seg button.on { border-color: var(--gold); background: rgba(255, 200, 61, .12); color: var(--gold); }
.metro-dots { display: flex; gap: 12px; justify-content: center; margin: 30px 0 10px; }
.metro-dots i { width: 46px; height: 46px; border-radius: 50%; background: #2c2a23; display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--muted);
  transition: background .05s, transform .05s; }
.metro-dots.n6 i { width: 40px; height: 40px; }
.metro-dots i.acc { border: 2px solid var(--gold); } .metro-dots i.acc2 { border: 2px solid var(--accent-hi); }
.metro-dots i.on { background: var(--accent); color: var(--accent-ink); transform: scale(1.15); box-shadow: 0 0 18px var(--accent); }
.metro-dots i.acc.on { background: var(--gold); box-shadow: 0 0 18px var(--gold); }
.metro-bpm { display: flex; align-items: center; gap: 22px; margin-top: 10px; }
.round-btn { width: 64px; height: 64px; border-radius: 50%; background: var(--card2); font-size: 2rem; font-weight: 700; }
.round-btn:active { transform: scale(.94); }
.metro-read { text-align: center; min-width: 130px; }
.metro-read span { font-size: 4.2rem; font-weight: 800; line-height: 1; display: block; }
.metro-read small { color: var(--gold); letter-spacing: .12em; font-weight: 700; text-transform: uppercase; }
#metro-slider { width: min(88vw, 420px); margin: 22px 0 6px; accent-color: var(--accent); height: 30px; }
#metro .set-note { color: var(--muted); text-align: center; max-width: 420px; min-height: 2.6em; }
.metro-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(88vw, 360px); margin-top: auto; }
.metro-go, .tn-go { width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent)); color: var(--accent-ink); }
.metro-go.stop, .tn-go.stop { background: linear-gradient(90deg, #ff6b7a, #ff9a3d); }

/* Tuner */
.tn-note { margin-top: 26px; font-size: 6rem; font-weight: 800; line-height: 1; text-shadow: 0 0 24px rgba(240, 214, 142, .5); }
.tn-note sub { font-size: .3em; color: var(--muted); margin-left: 4px; }
.tn-hz { color: var(--muted); margin: 6px 0 18px; font-variant-numeric: tabular-nums; }
.gauge { position: relative; width: min(88vw, 440px); height: 56px; border-radius: 16px; background: linear-gradient(90deg, #4a2a1f, #2a2822 40%, #2a2822 60%, #4a2a1f); }
.gauge::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 1px, transparent 1px 10%); border-radius: inherit; }
.g-zone { position: absolute; left: 45%; width: 10%; top: 0; bottom: 0; background: rgba(143, 199, 154, .25); border-left: 2px solid var(--good); border-right: 2px solid var(--good); }
.g-needle { position: absolute; top: -6px; bottom: -6px; width: 6px; margin-left: -3px; border-radius: 3px; background: #fff; transition: left .12s ease-out; }
.g-needle.good { background: var(--good); box-shadow: 0 0 16px var(--good); } .g-needle.close { background: var(--gold); } .g-needle.far { background: #ff6b7a; }
.g-needle.idle { opacity: .25; }
.g-flat, .g-sharp { position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--muted); }
.g-flat { left: 10px; } .g-sharp { right: 10px; }
.tn-msg { min-height: 1.4em; font-weight: 700; margin: 18px 0 10px; text-align: center; }
.tn-strings { display: flex; gap: 7px; justify-content: center; flex-wrap: nowrap; }
.str { width: min(52px, 13vw); height: 64px; border-radius: 14px; background: var(--card); border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.str b { font-size: 1.3rem; } .str small { color: var(--muted); font-size: .7rem; }
.str.near { border-color: var(--accent-hi); } .str.on { background: rgba(240, 214, 142, .2); border-color: #fff; }
#tuner .set-note { color: var(--muted); text-align: center; max-width: 400px; min-height: 2.6em; }
.tn-go { margin-top: auto; width: min(88vw, 360px); }

/* Learner icons from the user's art (2026-10-20) */
.chip { padding: 6px 4px 8px; gap: 5px; }
.chip img { width: 100%; aspect-ratio: 1.18; object-fit: cover; border-radius: 18%; }
.chip.on { box-shadow: 0 0 16px rgba(212, 169, 78, .4); }
.tools { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; background: none; border: 0; min-height: 0; text-align: center; }
.tool img { width: 100%; aspect-ratio: .64; object-fit: cover; border-radius: 14%; box-shadow: 0 0 22px rgba(212, 169, 78, .3); }
.tool small { font-size: .74rem; line-height: 1.25; }
.lesson-img { width: min(46vw, 200px); border-radius: 18%; box-shadow: 0 0 26px rgba(212, 169, 78, .35); }
.modes-settings { margin-top: 4px; font-size: .9rem; }

/* Gamer home: keep the logo clear of the Modes / settings buttons */
#home { padding-top: calc(64px + var(--safe-t)); }
#home .logo { width: min(62vw, 30vh, 360px); }

/* Gamer home banners (user's art, 2026-10-20). The pad count is live text laid over the banner where the art had "3/15". */
.banner { position: relative; padding: 0; border-radius: 999px; line-height: 0; }
.banner img { width: 100%; display: block; border-radius: 999px; filter: drop-shadow(0 0 10px rgba(120, 100, 255, .35)); }
.banner:active { transform: scale(.98); }
.banner-count { position: absolute; left: 54.5%; top: 50%; transform: translateY(-50%); line-height: 1;
  font-family: "Arial Rounded MT Bold", ui-rounded, "SF Pro Rounded", system-ui, sans-serif; font-weight: 900; font-size: calc(var(--bw) * .088);
  background: linear-gradient(180deg, #d9fbff 0%, #7fe3ff 45%, #2f9bff 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(10, 40, 90, .6); filter: drop-shadow(0 2px 0 #0b3a7a) drop-shadow(0 0 6px rgba(80, 200, 255, .7)); letter-spacing: .01em; }
#home .menu { --bw: min(86vw, 360px); width: var(--bw); gap: 12px; }

/* Elegant tone (user, 2026-10-20: "tone the themed buttons down to a more elegant look, keep a fun neon vibe").
   All button art is slightly calmer and richer; it lights up to full neon when pressed. The Echo Chamber logo is left as is. */
:root { --art-tone: saturate(.78) brightness(.86) contrast(1.04); --art-glow: rgba(212, 169, 78, .16); }
.mode-card img, .banner img, .chip img, .tool img, .lesson-img {
  filter: var(--art-tone); box-shadow: 0 0 14px var(--art-glow); transition: filter .15s ease, box-shadow .15s ease; }
.banner img { filter: var(--art-tone) drop-shadow(0 0 6px var(--art-glow)); box-shadow: none; }
.banner-count { opacity: .9; }
.mode-card:active img, .chip:active img, .tool:active img { filter: saturate(1.05) brightness(1.08); box-shadow: 0 0 26px rgba(212, 169, 78, .45); }
.banner:active img { filter: saturate(1.05) brightness(1.08) drop-shadow(0 0 12px rgba(212, 169, 78, .5)); }
.banner:active .banner-count { opacity: 1; }
.chip.on img { filter: saturate(.92) brightness(.98); }

/* Toned down a bit more (user, 2026-10-20: "less notes and colors, more black background coming through"):
   deeper blacks and less color, plus a soft black shade over each picture's busy edges (where most of the little notes are). */
:root { --art-tone: saturate(.62) brightness(.8) contrast(1.22); }
.art { position: relative; display: block; width: 100%; line-height: 0; }
.art::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 22%;
  background: radial-gradient(ellipse 62% 75% at 50% 50%, transparent 55%, rgba(4, 6, 16, .55) 100%); transition: opacity .15s ease; }
.tool .art::after { border-radius: 14%; }
.chip .art::after { border-radius: 18%; }
.banner .art::after { border-radius: 999px; background: linear-gradient(90deg, rgba(4, 6, 16, .55), transparent 28%, transparent 72%, rgba(4, 6, 16, .55)); }
.lesson-art { width: auto; display: inline-block; }
.mode-card img, .chip img, .tool img, .lesson-img { box-shadow: none; }
.mode-card:active .art::after, .chip:active .art::after, .tool:active .art::after, .banner:active .art::after { opacity: 0; }

/* ---- App themes from the Reward Shop (user spec, 2026-10-21) ---- */
body.theme-jazz { --bg: #120806; --bg2: #3a1410; --card: #2a1512; --card2: #3a1d18; --gold: #f0b54a; --muted: #d6b8a0;
  background: radial-gradient(circle at 50% 18%, rgba(240, 170, 70, .28), transparent 45%), radial-gradient(circle at 50% 30%, #3a1410, #120806 72%) fixed; }
body.theme-stadium { --bg: #030817; --bg2: #0b2150; --card: #0f1d42; --card2: #16295a; --gold: #8fd3ff; --muted: #a8bce0;
  background: conic-gradient(from 200deg at 15% -10%, transparent 0 10deg, rgba(160, 210, 255, .16) 14deg, transparent 22deg),
    conic-gradient(from 140deg at 85% -10%, transparent 0 10deg, rgba(160, 210, 255, .16) 14deg, transparent 22deg),
    radial-gradient(circle at 50% 30%, #0b2150, #030817 72%) fixed; }
body.theme-gold-hall { --bg: #050403; --bg2: #1d1608; --card: #17130a; --card2: #241c0c; --gold: #f2cf6b; --muted: #cbbd94;
  background: radial-gradient(circle at 50% 25%, rgba(242, 207, 107, .18), transparent 50%), radial-gradient(circle at 50% 30%, #1d1608, #050403 72%) fixed; }

/* ---- Economy UI (user spec, 2026-10-21) ---- */
.wallet-slot { width: 100%; max-width: 640px; display: flex; justify-content: center; margin: 6px 0 8px; }
.wallet { display: flex; align-items: center; gap: 12px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1); font-size: .82rem; color: var(--text); max-width: 100%; }
.w-rank { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; white-space: nowrap; color: var(--muted); }
.w-rank b { color: var(--gold); margin-right: 2px; }
.w-xp { display: block; width: 100%; min-width: 90px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.w-xp > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); border-radius: inherit; }
.w-xp.big { height: 8px; margin: 10px 0 4px; }
.w-stats { display: flex; gap: 10px; font-weight: 700; white-space: nowrap; }
#home .home-wallet { position: absolute; top: calc(12px + var(--safe-t)); left: 50%; transform: translateX(-50%); width: auto; margin: 0; }
#home .home-wallet .wallet { padding: 6px 10px; gap: 8px; font-size: .74rem; }
#home .home-wallet .w-xp { min-width: 60px; }
@media (max-width: 400px) { #home .home-wallet .w-rank span, #home .home-wallet .w-rank { font-size: .7rem; } }
.home-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill-btn { padding: 12px 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  font-weight: 800; letter-spacing: .06em; }
.pill-btn:active { transform: scale(.97); background: rgba(255, 255, 255, .14); }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 30; padding: 12px 18px;
  border-radius: 16px; background: rgba(20, 26, 64, .96); border: 1px solid rgba(255, 200, 61, .5); box-shadow: 0 0 26px rgba(255, 200, 61, .25);
  font-weight: 700; max-width: 90vw; text-align: center; }
.toast.show { animation: toastIn .3s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } }
.rewards { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin: 4px 0 6px; font-weight: 800; }
.rewards > span { background: rgba(255, 255, 255, .07); padding: 5px 12px; border-radius: 999px; }
.rewards > span.gold { color: #f2cf6b; background: rgba(242, 207, 107, .14); }
.rewards p { width: 100%; margin: 4px 0 0; font-weight: 700; }
.rewards .perfect { color: #f2cf6b; } .rewards .streak { color: #ffb36b; } .rewards .levelup { color: var(--good-text); }
.rewards small { width: 100%; color: var(--muted); font-weight: 600; }
.chance small { display: block; font-size: .7rem; letter-spacing: .02em; font-weight: 600; opacity: .75; margin-top: 2px; }
.ranks { display: grid; gap: 6px; margin: 14px 0; text-align: left; }
.rank { padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid transparent; }
.rank b { display: block; } .rank small { color: var(--muted); }
.rank.on { border-color: var(--gold); background: rgba(255, 200, 61, .1); } .rank.later { opacity: .55; }
.profile-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 6px 0; }
/* Shop */
.shop-tabs { grid-template-columns: repeat(4, 1fr); width: min(94vw, 640px); margin-top: 6px; }
.shop-tabs button { font-size: .8rem; padding: 10px 0; }
.pad-list.rows { display: grid; grid-template-columns: 1fr; gap: 10px; }
.shop-row { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--card); border-radius: 16px; padding: 12px 14px;
  border: 2px solid transparent; min-height: 64px; }
.shop-row.using { border-color: var(--accent); }
.shop-row.golden, .skin.golden { border-color: rgba(242, 207, 107, .45); }
.sr-ico { font-size: 1.6rem; width: 44px; display: grid; place-items: center; flex: none; }
.sr-main { flex: 1; } .sr-main b { display: block; } .sr-main small { color: var(--muted); }
.sr-price { font-weight: 800; white-space: nowrap; color: var(--gold); }
.theme-swatch { display: block; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2); }
.sw-midnight { background: radial-gradient(circle at 50% 30%, #3a3222, #0b0c0b); box-shadow: inset 0 0 0 2px #d4a94e; }
.sw-jazz { background: radial-gradient(circle at 50% 25%, #f0aa46 0, #3a1410 45%, #120806); }
.sw-stadium { background: conic-gradient(from 200deg at 20% 0, transparent 0 8deg, #a0d2ff 12deg, transparent 18deg), radial-gradient(circle at 50% 30%, #0b2150, #030817); }
.sw-gold-hall { background: radial-gradient(circle at 50% 30%, #f2cf6b 0, #1d1608 50%, #050403); }
.mini.big { --pad: 64px; margin: 8px auto; justify-content: center; }
/* Gamer home: the wallet sits in its own row under the Modes / settings buttons */
#home .home-wallet { position: static; transform: none; width: 100%; margin: 0 0 6px; }
#home { padding-top: calc(60px + var(--safe-t)); }
#home .logo { width: min(56vw, 25vh, 330px); }

/* ---- Loop Lab ---- */
#looplab > * { width: 100%; max-width: 640px; }
.ll-challenge { background: linear-gradient(135deg, rgba(255, 200, 61, .12), rgba(212, 169, 78, .1)); border: 1px solid rgba(255, 200, 61, .35);
  border-radius: 18px; padding: 12px 14px; margin: 4px 0 12px; }
.ll-ch-top { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; letter-spacing: .12em; color: var(--gold); font-weight: 800; }
.ll-ch-top small { color: var(--muted); letter-spacing: 0; font-weight: 600; }
.ll-challenge > b { display: block; margin-top: 6px; font-size: 1.05rem; }
.ll-challenge p { margin: 4px 0 8px; color: var(--muted); font-size: .9rem; line-height: 1.35; }
.ll-ch-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .82rem; font-weight: 700; }
.ll-ch-bottom .done { color: var(--good-text); }
.pill-btn.gold { background: linear-gradient(90deg, #ffd27a, #e0a33a); color: #1a1205; border: 0; padding: 9px 14px; }
.ll-transport { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ll-play { flex: 1; padding: 14px; border-radius: 999px; font-weight: 800; letter-spacing: .12em; color: var(--accent-ink);
  background: linear-gradient(90deg, var(--accent), var(--accent)); }
.ll-play.stop { background: linear-gradient(90deg, #ff6b7a, #ff9a3d); }
.ll-tempo { display: flex; align-items: center; gap: 10px; }
.ll-tempo span { display: flex; flex-direction: column; align-items: center; min-width: 46px; }
.ll-tempo b { font-size: 1.4rem; } .ll-tempo small { color: var(--muted); font-size: .65rem; letter-spacing: .1em; }
.round-btn.sm { width: 44px; height: 44px; font-size: 1.4rem; }
.ll-scales { width: 100%; grid-template-columns: repeat(4, 1fr); margin-top: 12px; }
.ll-scales button { font-size: .78rem; padding: 10px 0; }
.ll-tracks { display: grid; gap: 8px; margin-top: 12px; }
.ll-track { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); border-radius: 14px; padding: 10px 14px; min-height: 52px; }
.ll-track > span:nth-child(2) { flex: 1; } .ll-track small { display: block; color: var(--muted); font-size: .72rem; }
.ll-ico { font-size: 1.4rem; } .ll-chev { color: var(--muted); }
.ll-head { margin-top: 16px; } .ll-head small { color: var(--muted); letter-spacing: 0; font-weight: 600; text-transform: none; margin-left: 6px; }
.ll-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .ll-grid { grid-template-columns: 1fr 1fr; } }
.ll-bars { font-size: .7rem; color: var(--muted); letter-spacing: .1em; margin-bottom: 4px; }
.ll-rows { display: grid; grid-template-columns: 28px repeat(8, 1fr); gap: 4px; }
.ll-lbl { font-size: .72rem; color: var(--muted); display: grid; place-items: center; font-weight: 700; }
.ll-cell { aspect-ratio: 1; min-height: 30px; border-radius: 7px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .05); }
.ll-cell.bar { border-left: 2px solid rgba(255, 255, 255, .18); }
.ll-cell.now { background: rgba(255, 255, 255, .14); }
.ll-cell.on { background: var(--rc); box-shadow: 0 0 10px var(--rc); border-color: transparent; }
.ll-cell.on.now { filter: brightness(1.35); }
.ll-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.ll-actions .pill-btn { font-size: .8rem; padding: 11px 4px; }
.ll-community { margin: 14px 0 6px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); color: var(--muted); font-size: .85rem; text-align: center; }
.shop-row.locked { opacity: .5; }
.shop-row .pill-btn { padding: 8px 12px; font-size: .78rem; }

/* Loop Quest banner (placeholder in the banners' style until the user's art arrives) */
.banner.loopq { aspect-ratio: 900 / 138; }
.loopq-face { position: absolute; inset: 0; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(ellipse at 50% 50%, #1a1440, #07081a 75%); border: 2px solid transparent;
  background-clip: padding-box; box-shadow: 0 0 0 2px rgba(240, 214, 142, .55), 0 0 14px rgba(212, 169, 78, .35), inset 0 0 18px rgba(240, 214, 142, .18);
  line-height: 1; }
.loopq-ico { font-size: calc(var(--bw) * .07); filter: saturate(.8); }
.loopq-txt { font-family: "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif; font-weight: 900; font-size: calc(var(--bw) * .085); letter-spacing: .02em;
  color: var(--accent-hi); text-shadow: 0 2px 0 #3a2a0c, 0 0 10px rgba(212, 169, 78, .5); }
.loopq-txt em { font-style: normal; color: #ffd27a; text-shadow: 0 2px 0 #6b3a05, 0 0 10px rgba(255, 190, 80, .45); }
.banner.loopq:active .loopq-face { box-shadow: 0 0 0 2px var(--accent-hi), 0 0 22px rgba(212, 169, 78, .6); }
.home-row.one { grid-template-columns: 1fr; }
#home .logo { width: min(50vw, 20vh, 300px); }
#home .menu { gap: 10px; }

/* ---- Revised button art v2 (user, 2026-10-21): already elegant, so no extra darkening or edge shade ---- */
:root { --art-tone: none; }
.art::after { display: none; }
.mode-card img, .banner img { filter: none; box-shadow: none; -webkit-mask-image: none; mask-image: none; }
.mode-card img { border-radius: 16%; }
.banner img { border-radius: 999px; }
.mode-card:active img, .banner:active img, .chip:active img, .tool-banner:active img { filter: brightness(1.15) saturate(1.1); }
.banner.loopq { aspect-ratio: auto; }
/* live pad count on the v2 Pads banner, where the art had "3/15" */
.banner-count { left: 54.6%; font-family: "Avenir Next", "Montserrat", "Segoe UI", system-ui, sans-serif; font-weight: 600; letter-spacing: .03em;
  font-size: calc(var(--bw) * .056); background: linear-gradient(180deg, #8fe2ff, #39b8ff); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-stroke: 0; filter: drop-shadow(0 0 5px rgba(60, 180, 255, .55)); opacity: 1; }
/* Learner page: instruments in two pairs, then the three tool banners at the same width */
#learner .learn-wrap, #learner .inst-chips, #learner .tools { width: min(92vw, 460px); }
#learner .inst-chips { grid-template-columns: 1fr 1fr; gap: 14px; }
#learner .chip { background: none; border: 0; padding: 0; gap: 6px; }
#learner .chip img { width: 100%; aspect-ratio: 1.25; object-fit: cover; border-radius: 16%; filter: none; -webkit-mask-image: none; mask-image: none;
  box-shadow: 0 0 0 3px transparent; transition: box-shadow .15s, filter .15s; }
#learner .chip:not(.on) img { filter: saturate(.7) brightness(.7); }
#learner .chip.on img { box-shadow: 0 0 0 3px var(--accent), 0 0 20px rgba(212, 169, 78, .45); }
.chip-name { font-weight: 700; font-size: .85rem; color: var(--muted); }
.chip.on .chip-name { color: var(--good-text); }
#learner .learn-sub { width: min(92vw, 460px); }
#learner .tools { grid-template-columns: 1fr; gap: 10px; margin-top: auto; padding-top: 22px; }
.tool-banner { padding: 0; line-height: 0; border-radius: 999px; }
.tool-banner img { width: 100%; border-radius: 999px; }
.lesson-img { filter: none; -webkit-mask-image: none; mask-image: none; }
#learner { --lw: min(92vw, 460px, calc((100vh - 250px) / 1.27)); }
@supports (height: 100svh) { #learner { --lw: min(92vw, 460px, calc((100svh - 250px) / 1.27)); } }
#learner .inst-chips, #learner .tools, #learner .learn-sub { width: var(--lw); }
#learner .chip img { aspect-ratio: 1.4; }
#learner .tools { padding-top: 14px; }
#modes { --mw: min(94vw, 560px, calc((100vh - 270px) / 1.5)); }
@supports (height: 100svh) { #modes { --mw: min(94vw, 560px, calc((100svh - 270px) / 1.5)); } }
#learner .chip, #learner .chip.on { background: none; box-shadow: none; border: 0; }
#learner .chip-name { font-size: .78rem; font-weight: 700; letter-spacing: .04em; }

/* ---- Ukulele lessons, chord library, play-along (2026-10-26) ---- */
button.lesson { width: 100%; text-align: left; border: 1px solid rgba(255, 255, 255, .06); }
button.lesson .lesson-t small { display: block; color: var(--muted); font-weight: 600; font-size: .75rem; }
.lesson.done .lesson-n { background: var(--accent); color: var(--accent-ink); }
.chord-lib-btn { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; margin: 4px 0 14px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 200, 61, .14), rgba(212, 169, 78, .1)); border: 1px solid rgba(255, 200, 61, .35); }
.chord-lib-btn > span:first-child { font-size: 1.8rem; } .chord-lib-btn > span:nth-child(2) { flex: 1; }
.chord-lib-btn small { display: block; color: var(--muted); }
.lesson-page { width: 100%; max-width: 560px; padding: 4px 2px 30px; line-height: 1.5; }
.lesson-page > p, .lesson-page .pattern p, .lesson-page .drill p { color: #d5d9ee; }
.lesson-title { margin: 8px 0 10px; font-size: 1.35rem; }
.tip { background: rgba(255, 200, 61, .1); border-left: 3px solid var(--gold); padding: 10px 12px; border-radius: 10px; margin: 12px 0; color: #f3e6c4; }
.parts { display: grid; gap: 8px; margin: 10px 0; }
.parts > div { display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; background: var(--card); border-radius: 12px; padding: 8px 10px; }
.parts span { grid-row: 1 / 3; font-size: 1.3rem; display: grid; place-items: center; } .parts small { color: var(--muted); }
.uke-strings { display: flex; gap: 10px; justify-content: center; margin: 10px 0 14px; }
.uke-strings .str { width: 64px; height: 70px; }
.inline-btn { width: 100%; margin: 6px 0 12px; }
.chord-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.chord-card { background: var(--card); border-radius: 16px; padding: 8px 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid rgba(255, 255, 255, .08); min-width: 96px; }
.chord-card b { font-size: 1.1rem; color: var(--gold); }
.chord-card:active { transform: scale(.97); background: var(--card2); }
.chord-svg { width: 84px; height: auto; display: block; }
.chord-svg.big { width: 170px; margin: 6px auto; }
.chord-row.small .chord-card { min-width: 0; padding: 6px 6px 4px; } .chord-row.small .chord-svg { width: 62px; }
.strum-hint { font-size: .7rem; color: var(--accent-hi); font-weight: 700; }
.chord-frets { margin: 4px 0; } .chord-songs { font-size: .85rem; }
.chord-tabs { grid-template-columns: repeat(5, 1fr); width: min(94vw, 560px); margin: 8px 0 12px; }
.chord-tabs button { font-size: .72rem; padding: 10px 0; }
.chord-grid { width: min(94vw, 560px); display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; padding-bottom: 24px; }
.pattern, .drill { background: var(--card); border-radius: 16px; padding: 12px 14px; margin: 12px 0; }
.pat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .pat-head small { color: var(--muted); }
.pat-steps { display: flex; gap: 4px; margin: 10px 0 4px; }
.ps { flex: 1; text-align: center; font-size: 1.4rem; font-weight: 800; background: rgba(255, 255, 255, .05); border-radius: 8px; padding: 4px 0; line-height: 1.1; }
.ps small { display: block; font-size: .65rem; color: var(--muted); font-weight: 700; }
.ps.now { background: var(--accent); color: var(--accent-ink); } .ps.now small { color: var(--accent-ink); }
.drill-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drill-tap { flex: 1; padding: 14px; border-radius: 14px; background: linear-gradient(90deg, var(--accent), var(--accent)); color: var(--accent-ink); font-weight: 800; font-size: 1rem; }
.drill-tap[disabled] { opacity: .35; } .drill-tap b { margin-left: 6px; }
.drill-time { font-weight: 800; font-size: 1.3rem; min-width: 34px; text-align: center; color: var(--gold); }
.lesson-end { margin-top: 18px; } .done-note { color: var(--good-text); font-weight: 700; text-align: center; }
.song-pick { display: grid; gap: 8px; margin: 10px 0; }
.pa-ctl { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.pa-pats { width: 100%; grid-template-columns: repeat(3, 1fr); margin: 6px 0 10px; } .pa-pats button { font-size: .78rem; padding: 9px 0; }
.pa-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.pa-bar { background: var(--card); border-radius: 10px; padding: 10px 4px; text-align: center; font-weight: 800; border: 2px solid transparent; }
.pa-bar i { color: var(--muted); font-style: normal; }
.pa-bar.now { border-color: var(--gold); background: rgba(255, 200, 61, .16); color: #ffe6a3; box-shadow: 0 0 14px rgba(255, 200, 61, .3); }
.lyrics { background: rgba(255, 255, 255, .04); border-radius: 14px; padding: 12px 14px; line-height: 2.1; }
.lyr-ch { display: inline-block; background: rgba(212, 169, 78, .18); color: var(--accent-hi); font-weight: 800; font-size: .78rem; border-radius: 6px; padding: 0 6px; margin-right: 3px; line-height: 1.5; }
.lesson-page .big-btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent-hi)); color: var(--accent-ink); }
.lesson-page .big-btn.secondary { background: rgba(255, 255, 255, .1); color: var(--text); }
.lesson-page .btns { display: flex; flex-direction: column; gap: 10px; }

/* ---- Piano keyboard board (2026-10-26) ---- */
.board.piano { flex: 1; display: flex; flex-direction: column; justify-content: center; width: min(96vw, 700px); padding: 6px 0; margin: 0 auto; gap: 10px; }
.kb-info { display: flex; flex-direction: column; align-items: center; min-height: 86px; }
.kb-info .cc-key { color: var(--gold); font-weight: 800; letter-spacing: .06em; }
.kb-note { font-size: 2.6rem; font-weight: 800; line-height: 1.1; min-height: 1.1em; text-shadow: 0 0 18px currentColor; }
.kb-info .cc-hint { color: var(--muted); font-size: .78rem; }
.kb { position: relative; width: 100%; height: min(40vh, 270px); }
.board.piano .pad.key { position: absolute; top: 0; height: 100%; opacity: 1 !important; transform: none !important; filter: none !important;
  display: flex; align-items: flex-end; justify-content: center; padding: 0 0 10px; border-radius: 0 0 10px 10px; transition: background .08s; }
.key.white { z-index: 1; color: #2a2d3a; border: 1px solid var(--accent-ink);
  background: linear-gradient(180deg, #f6f6fa 0%, #e6e7ef 85%, #cfd1dc 100%); box-shadow: inset 0 -7px 0 var(--base); }
.key.black { z-index: 2; height: 62% !important; color: #e8e9f2; border-radius: 0 0 6px 6px; border: 1px solid #000;
  background: linear-gradient(180deg, #34374a 0%, #11131c 90%); box-shadow: inset 0 -5px 0 var(--base); }
.key.white.off { background: linear-gradient(180deg, #9a9cab, #7c7e8d); box-shadow: none; color: #45475a; }
.key.black.off { background: #15161d; box-shadow: none; color: #5a5c6c; }
.key .klbl { font-size: .78rem; font-weight: 800; pointer-events: none; }
.key .klbl sub { font-size: .6em; }
.key.black .klbl { font-size: .62rem; }
.board.piano .key.lit { background: var(--base) !important; color: #fff; box-shadow: 0 0 22px var(--base), inset 0 0 12px rgba(255, 255, 255, .5); }
.board.piano .key.wrong { background: var(--bad) !important; color: #fff; animation: shake .35s; }
.board.piano .key.hint { outline: 3px dashed #fff; outline-offset: -7px; }
/* Pads / Piano switch on the song lists */
.board-pick { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.board-pick button { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 2px solid transparent; font-weight: 700; color: var(--text); }
.board-pick button.on { border-color: var(--accent); background: rgba(212, 169, 78, .14); }
@media (orientation: landscape) and (max-height: 520px) { .kb { height: min(52vh, 220px); } .kb-info { min-height: 50px; } .kb-note { font-size: 1.8rem; } }
.uke-strings { flex-wrap: nowrap; gap: 6px; } .uke-strings .str { width: min(64px, 13.5vw); }
.chord-card .chord-svg { width: 92px; } .chord-row.small .chord-svg { width: 70px; }
/* Opening screen when a phone is sideways: logo on the left, the two mode buttons on the right */
@media (orientation: landscape) and (max-height: 520px) {
  #modes.screen.active { display: grid; grid-template-columns: auto auto; align-content: center; justify-content: center; column-gap: 28px; row-gap: 6px;
    grid-template-areas: "w w" "logo tag" "logo cards" "logo set"; --mw: min(46vw, 400px); }
  #modes .wallet-slot { grid-area: w; margin: 0 0 4px; }
  #modes .logo { grid-area: logo; width: min(62vh, 34vw); align-self: center; }
  #modes .tagline { grid-area: tag; align-self: end; margin: 0; }
  #modes .mode-cards { grid-area: cards; width: var(--mw); }
  #modes .modes-settings { grid-area: set; justify-self: center; }
  #modes .mode-card small { font-size: .72rem; }
}

/* ---- Piano lessons (2026-10-26) ---- */
.keys-svg { width: 120px; height: auto; display: block; border-radius: 4px; }
.keys-svg.big { width: min(78vw, 300px); margin: 8px auto; }
.chord-card .keys-svg { width: 112px; }
.chord-row.small .keys-svg { width: 92px; }
.lkb { position: relative; width: 100%; height: 150px; margin: 10px 0 14px; }
.lk { position: absolute; top: 0; height: 100%; border-radius: 0 0 8px 8px; padding: 0 0 8px; display: flex; align-items: flex-end; justify-content: center; }
.lk.white { z-index: 1; background: linear-gradient(180deg, #f6f6fa, #dfe1ea); border: 1px solid var(--accent-ink); color: #2a2d3a; font-size: .72rem; font-weight: 800; }
.lk.white.mid { box-shadow: inset 0 -5px 0 var(--accent); }
.lk.black { z-index: 2; height: 60%; background: linear-gradient(180deg, #34374a, #11131c); border: 1px solid #000; border-radius: 0 0 5px 5px; }
.lk sub { font-size: .6em; }
.lk.down, .lk:active { background: #ffc83d !important; }
.lk.good { background: var(--good) !important; } .lk.bad { background: var(--bad) !important; }
.hands { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.hands > div { background: var(--card); border-radius: 14px; padding: 12px 8px; text-align: center; }
.hands span { font-size: 2.2rem; display: block; } .hands small { color: var(--muted); }
.fnums { display: flex; justify-content: center; gap: 6px; margin: 6px 0 2px; }
.fnums i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: #ffc83d; color: #1a1205; font-weight: 800; display: grid; place-items: center; }
.quiz { background: var(--card); border-radius: 16px; padding: 12px 14px; margin: 12px 0; border: 2px solid transparent; }
.quiz.solved { border-color: var(--good); }
.q-ask { font-size: 1.1rem; text-align: center; } .q-ask b { color: var(--gold); font-size: 1.6rem; margin-left: 6px; }
.q-staff { display: flex; justify-content: center; } .staff-svg { width: min(80vw, 320px); }
.q-letters { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 6px; }
.q-letters .pill-btn { padding: 12px 0; font-size: 1rem; }
.q-letters .pill-btn.good { background: var(--good); color: var(--accent-ink); } .q-letters .pill-btn.bad { background: var(--bad); }
.mel-notes { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.mn { min-width: 30px; text-align: center; background: rgba(255, 255, 255, .06); border-radius: 8px; padding: 4px 4px 2px; font-weight: 800; }
.mn small { display: block; font-size: .65rem; color: var(--gold); }
.mn.on { background: var(--good); color: var(--accent-ink); } .mn.on small { color: var(--accent-ink); }
.melody .drill-ctl small { color: var(--muted); flex: 1; }

/* ---- Violin lessons (2026-10-26) ---- */
.chord-card b small { display: block; font-size: .62rem; color: var(--muted); letter-spacing: .04em; font-weight: 700; }
.mel-notes.violin { gap: 6px; }
.mel-notes.violin .mn { min-width: 40px; padding: 6px 4px 4px; font-size: 1.05rem; }
.mn.now { background: #ffc83d; color: #1a1205; box-shadow: 0 0 12px rgba(255, 200, 61, .5); } .mn.now small { color: #1a1205; }
.listen-btn { width: 100%; margin: 6px 0 2px; padding: 12px; }
.listen-btn.on { background: rgba(143, 199, 154, .2); border-color: var(--good); }
.listen-msg { text-align: center; color: var(--good-text); font-weight: 700; min-height: 1.3em; margin: 4px 0; }
/* Six instruments (bass + mandolin added 2026-10-26): three across, whole icon shown */
#learner .inst-chips { grid-template-columns: repeat(3, 1fr); gap: 10px; }
#learner .chip img { aspect-ratio: 1.15; object-fit: contain; background: #0b0c0b; }

/* ---- Credits panel (user, 2026-10-31): Mountain Life Music logo + website ---- */
.modes-settings { display: flex; justify-content: center; gap: 14px; }
.credits { text-align: center; }
.mlm-logo { width: min(40vw, 150px); display: block; margin: 0 auto 10px; filter: drop-shadow(0 0 18px rgba(212, 169, 78, .3)); }
.credits .big-btn.primary { width: 100%; margin: 6px 0 4px; font-size: .95rem; letter-spacing: .04em; }
.credit-small { font-size: .72rem; color: var(--muted); }
