/* ==========================================================================
   Melody Reader — style.css
   The look is Rainbow Xylophone's: warm wood, Fredoka, the dark-brown frame,
   rainbow bars; the music sits on cream paper (DESIGN §4).
   ========================================================================== */
:root {
  --wood: #d4a373;
  --wood-dark: #b98552;
  --frame: #5d4037;
  --frame-edge: #3e2723;
  --rail: #2d1b15;
  --paper: #fffdf6;
  --paper-edge: #eadcc2;
  --ink: #2b1d16;
  --ink-soft: #6b5446;
  --cream: #fff8ec;
  --gold: #fbbf24;
  --gold-deep: #d97706;
  --plum: #7c3aed;
  --ok: #16a34a;
  --good: #0d9488;
  --late: #ea580c;
  --miss: #9ca3af;
  --band-red: #ef4444;
  --band-orange: #f97316;
  --band-yellow: #eab308;
  --band-green: #22c55e;
  --band-blue: #3b82f6;
  --band-violet: #8b5cf6;
  --shadow: 0 6px 18px rgba(62, 39, 35, .25);
  --top-h: 64px;
  font-family: 'Fredoka', ui-rounded, system-ui, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background-color: var(--wood);
  background-image:
    repeating-linear-gradient(92deg, rgba(120, 72, 32, .07) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(88deg, rgba(255, 236, 200, .10) 0 1px, transparent 1px 23px),
    linear-gradient(180deg, #d9ab7c 0%, #cf9d6a 100%);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
button { font-family: inherit; color: inherit; cursor: pointer; }
svg { display: block; }

.app { height: 100dvh; display: flex; flex-direction: column; }

/* ---------- top bar ---------- */
.topbar {
  height: var(--top-h); flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
}
.brand-h1 { margin: 0; display: flex; font-size: inherit; font-weight: inherit; }
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 2px 6px 2px 2px; margin-left: -2px; border-radius: 14px; font: inherit; color: inherit; cursor: pointer; }
.brand:hover .brand-name { text-shadow: 0 2px 6px rgba(62,39,35,.6); }
.brand:active { transform: translateY(1px); }
.brand-logo { width: 34px; height: 34px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.brand-name { margin: 0; color: #fff; font-size: 27px; font-weight: 700; letter-spacing: .3px; text-shadow: 0 2px 4px rgba(62,39,35,.45); white-space: nowrap; }
.chip {
  border: 0; background: #fff; border-radius: 999px; box-shadow: var(--shadow);
  height: 42px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 600;
}
.chip:hover { background: var(--cream); }
.level-chip { margin-left: 8px; border: 3px solid var(--band, var(--band-red)); padding-left: 10px; }
.level-chip .band-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--band, var(--band-red)); }
.level-chip .caret { width: 18px; height: 18px; color: var(--ink-soft); flex: none; }
/* the level, and under it the melody being played (it used to sit under the music) */
.level-chip { height: 46px; min-width: 0; flex: 0 1 auto; }
.level-chip .band-dot { flex: none; }
.chip-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.12; text-align: left; }
.chip-text > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-text .tune-name { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.chip-text .tune-name:empty { display: none; }
/* room enough: one line, the melody after a divider */
@media (min-width: 1180px) {
  .level-chip { height: 42px; }
  .chip-text { flex-direction: row; align-items: baseline; gap: 10px; }
  .chip-text .tune-name { font-size: 15px; padding-left: 10px; border-left: 2px solid #eadcc2; }
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
/* the level box in the middle of the bar (2026-10-08, the user's): three columns — the way home, the box,
   the scores — the outer two sharing what is left, so the box sits at the centre whenever they fit (and
   shrinks, never overlapping them, when they don't) */
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
@media (min-width: 481px) {
  .topbar { display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; }
  .topbar-left { grid-column: 1; justify-self: start; }
  .topbar > .level-chip { grid-column: 2; justify-self: center; margin-left: 0; max-width: 100%; }
  /* its own column, always: with the level box hidden (the home page, My stats) it would take the middle one */
  .topbar-right { grid-column: 3; justify-self: end; margin-left: 0; }
}
.score-chip { gap: 14px; padding: 0 16px; }
.score-chip svg { width: 20px; height: 20px; }
.score-chip > span { display: inline-flex; align-items: center; gap: 4px; }
.sc-stars svg { fill: var(--gold); }
.sc-stars b { color: var(--gold-deep); }
.sc-points b { font-size: 18px; }
.sc-points small { color: var(--ink-soft); font-weight: 500; font-size: 13px; margin-left: 2px; }
.sc-streak svg { fill: #f97316; }
.sc-streak b { color: #c2410c; }
.score-chip.no-points .sc-points, .score-chip.no-points .sc-streak { display: none; }
.score-chip.no-stars .sc-stars { display: none; }
.score-chip.bump { animation: bump .45s ease-out; }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.12); } 100% { transform: scale(1); } }
.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 14px; background: #fff;
  box-shadow: var(--shadow); display: grid; place-items: center; font-size: 26px; line-height: 1;
}
.icon-btn svg { width: 24px; height: 24px; fill: var(--ink-soft); }
.icon-btn:hover { background: var(--cream); }

/* ---------- stage: music (top) + xylophone (bottom) ---------- */
.stage {
  flex: 1; min-height: 0; display: grid;
  grid-template-rows: minmax(0, 47fr) minmax(0, 53fr);
  gap: 14px; padding: 4px 20px 18px;
}
.stand {
  grid-row: 1; grid-column: 1;   /* placed, not auto-placed: the Round done layer shares this cell */
  position: relative; min-height: 0; width: 100%; max-width: 1180px; justify-self: center;
  background: var(--paper); border-radius: 26px;
  box-shadow: 0 10px 28px rgba(62,39,35,.28), inset 0 0 0 3px var(--paper-edge);
  display: flex; flex-direction: column; padding: 14px 18px 10px; overflow: hidden;
}
/* the music in the middle, Start over + Next on the right (an empty column on the left keeps the music
   centred), and under it Listen · Practice / Test · the metronome (2026-10-05) */
.stand-row {
  flex: 1; min-height: 0; display: grid; column-gap: 10px;
  grid-template-columns: 128px minmax(0, 1fr) 128px; grid-template-rows: minmax(0, 1fr) auto;
}
.music { grid-column: 2; grid-row: 1; }
.side-right { grid-column: 3; grid-row: 1; align-self: center; display: flex; justify-content: center; align-items: flex-start; gap: 10px; }
.controls { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: center; align-items: flex-start; gap: 18px; padding-top: 2px; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; }
.ctl-label { font-size: 14px; font-weight: 700; color: var(--ink-soft); line-height: 1.1; white-space: nowrap; }
/* a short window: smaller buttons, and Next loses its word */
@media (min-width: 701px) and (max-height: 660px) {
  .next-label { display: none; }
  .ctl-btn { width: 50px !important; height: 50px !important; }
  .ctl-btn svg { width: 26px !important; height: 26px !important; }
  .ctl-label { font-size: 12.5px; }
}
.round-btn {
  width: 72px; height: 72px; border-radius: 50%; border: 0;
  background: var(--gold); color: #fff; display: grid; place-items: center;
  box-shadow: 0 5px 0 var(--gold-deep), 0 8px 16px rgba(217,119,6,.35);
  transition: transform .08s, box-shadow .08s;
}
.round-btn svg { width: 36px; height: 36px; fill: #fff; }
.round-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gold-deep); }
.round-btn.small { width: 54px; height: 54px; background: #fff; color: var(--ink-soft); box-shadow: 0 4px 0 #d9c9ad, 0 6px 12px rgba(62,39,35,.15); }
.round-btn.small svg { width: 26px; height: 26px; fill: var(--ink-soft); }
.round-btn.playing { background: #f59e0b; }
.round-btn.playing svg { display: none; }
.round-btn.playing::after { content: ''; width: 22px; height: 22px; border-radius: 4px; background: #fff; }
.round-btn.ctl-btn { width: 58px; height: 58px; }
.round-btn.ctl-btn svg { width: 30px; height: 30px; }
#btn-next.ready, #btn-mode.ready { animation: nudge 1.2s ease-in-out infinite; }
#btn-next.ready { background: var(--gold); }
#btn-next.ready svg { fill: #fff; }
#btn-restart svg { fill: none; }
@keyframes nudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
.round-btn[disabled] { opacity: .35; pointer-events: none; }

/* Practice: on, blue, a pause sign — Test: white, a red ball in a red ring (record), pulsing while a try is under way */
.mode-btn { background: #2563eb; box-shadow: 0 5px 0 #1e40af, 0 8px 16px rgba(37,99,235,.3); }
.mode-btn:active { box-shadow: 0 2px 0 #1e40af; }
.mode-btn .i-rec { display: none; }
.mode-btn.test { background: #fff; box-shadow: 0 5px 0 #e5b8b8, 0 8px 16px rgba(185,28,28,.18); }
.mode-btn.test:active { box-shadow: 0 2px 0 #e5b8b8; }
.mode-btn.test .i-pause { display: none; }
.mode-btn.test .i-rec { display: block; }
.mode-btn .i-rec .ring { stroke: #dc2626; }
.mode-btn .i-rec .ball { fill: #dc2626; transform-box: fill-box; transform-origin: center; }
.mode-btn.recording .i-rec .ball { animation: rec 1.1s ease-in-out infinite; }
@keyframes rec { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.82); } }
.mode-btn[disabled] { opacity: .55; }
.stage-practice .mode-label { color: #1d4ed8; }
.stage-game .mode-label { color: #b91c1c; }

/* the metronome: off — a white button, its picture in ink; on (Slow · Moderate · Fast) — lit */
.metro-btn { background: #fff; box-shadow: 0 4px 0 #d9c9ad, 0 6px 12px rgba(62,39,35,.15); }
.metro-btn:active { box-shadow: 0 2px 0 #d9c9ad; }
.metro-btn svg { fill: none; stroke: var(--ink-soft); }
.metro-btn svg .mw { fill: var(--ink-soft); stroke: none; }
.metro-btn.on { background: #15803d; box-shadow: 0 5px 0 #14532d, 0 0 0 4px rgba(34,197,94,.28), 0 8px 18px rgba(21,128,61,.4); }
.metro-btn.on:active { box-shadow: 0 2px 0 #14532d, 0 0 0 4px rgba(34,197,94,.28); }
.metro-btn.on svg { stroke: #fff; }
.metro-btn.on svg .mw { fill: #fde047; }
.metro-btn.on + .metro-label { color: #15803d; }
/* the practice metronome clicking (2026-10-07): a nod on each beat, a bigger one on the bar's first */
.metro-btn.on.beat { animation: metro-nod .16s ease-out; }
.metro-btn.on.beat1 { animation: metro-nod1 .2s ease-out; }
@keyframes metro-nod { 0% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes metro-nod1 { 0% { transform: scale(1.11); box-shadow: 0 5px 0 #14532d, 0 0 0 9px rgba(34,197,94,.35), 0 8px 18px rgba(21,128,61,.4); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .metro-btn.on.beat, .metro-btn.on.beat1 { animation: none; } }

.music { min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.music svg.score { overflow: visible; }
.music .rows { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }

/* the round's dots, top centre */
.dots { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.dot { width: 15px; height: 15px; border-radius: 50%; border: 2.5px solid #d6c6a8; background: transparent; position: relative; }
.dot.now { border-color: var(--gold); background: #fef3c7; box-shadow: 0 0 0 3px rgba(251,191,36,.25); }
.dot.done { border-color: #cfc5b3; background: #e7e0d3; }               /* notes missed */
.dot.done.made { border-color: #15803d; background: #22c55e; }          /* played through: the check's green */
.dot.done.gold { border-color: var(--gold-deep); background: var(--gold); }   /* a gold star */
.dot.done.skip { background: transparent; }
.dot.done.now { box-shadow: 0 0 0 3px rgba(251,191,36,.45); }
/* a round of more than 12: "3 of 30" and a bar instead of dots */
.dots-count { font-size: 14px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.dots-bar { width: 120px; height: 7px; border-radius: 4px; background: #efe5d3; overflow: hidden; }
.dots-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, var(--gold)); border-radius: 4px; }

/* the family's Get ready card takes no clicks; here it does while it counts — a tap stops the count-in
   (game.js stopCountIn). Only the card: the page around it stays reachable */
html.ci-tap .evm-count.open .evm-count-card { pointer-events: auto; cursor: pointer; }

/* the music's states (inside the SVG) */
.now-glow { fill: rgba(253, 224, 71, .5); animation: glowpulse 1.6s ease-in-out infinite; }
@keyframes glowpulse { 0%,100% { fill-opacity: .55; } 50% { fill-opacity: .25; } }
.hear-glow { fill: rgba(147, 197, 253, .55); }
.head-wrap { transform-box: fill-box; transform-origin: center; }
.head-wrap.pop { animation: pop .42s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
.ghost { animation: ghost 1.1s ease-out both; }
.ghost.staged { animation: none; opacity: .5; }
@keyframes ghost { 0% { opacity: .7; } 70% { opacity: .5; } 100% { opacity: 0; } }
.col.hidden-note { opacity: .07; transition: opacity .5s; }
.beams.hidden-note { opacity: .07; transition: opacity .5s; }
.judge-word { font-family: 'Fredoka', sans-serif; font-weight: 700; }
.label-letter { font-family: 'Fredoka', sans-serif; font-weight: 700; }
.label-syl { font-family: 'Fredoka', sans-serif; font-weight: 500; fill: var(--ink-soft); }
.playhead { fill: rgba(59,130,246,.18); stroke: rgba(59,130,246,.55); stroke-width: 2; }

.praise {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 22px; padding: 10px 22px; box-shadow: 0 10px 30px rgba(62,39,35,.25);
  display: flex; align-items: center; gap: 14px; font-size: 26px; font-weight: 700;
  opacity: 0; pointer-events: none; z-index: 3; white-space: nowrap;
}
.praise.show { animation: praise 1.7s ease-out both; }
.praise.stay { opacity: 1; }
@keyframes praise { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }
.praise > b { display: flex; flex-direction: column; align-items: center; }
.praise > b small { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.praise .p-stars { color: var(--gold); letter-spacing: 2px; font-size: 28px; }
.praise .p-stars .off { color: #e5dccb; }
.praise .p-pts { color: var(--gold-deep); font-size: 22px; }
/* after a melody: the green check and the gold star, no card behind them — they float up and fade like the words did */
.praise.mark { background: none; box-shadow: none; padding: 0; gap: 10px; }
.praise.mark svg { width: 84px; height: 84px; filter: drop-shadow(0 6px 10px rgba(62,39,35,.28)); }
.praise.mark .p-pts { font-size: 26px; font-weight: 700; color: var(--gold-deep); text-shadow: 0 0 3px #fff, 0 0 6px #fff, 0 2px 0 #fff; }
/* a melody's mark, small (Round done, the Score board) */
.mk { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.mk svg { width: 22px; height: 22px; }
.mk-x { width: 22px; height: 22px; border-radius: 50%; background: #e7e0d3; color: #8a7a66; font-weight: 700; font-size: 15px; line-height: 1; }
.rd-rows .rd-c span.mk-x, .cards-row .rc span.mk-x { color: #6b5446; letter-spacing: 0; font-size: 15px; }
.rd-stats b.t-star { color: #d97706; }

.clock { position: absolute; left: 22px; right: 22px; top: 6px; height: 6px; border-radius: 3px; background: #efe5d3; overflow: hidden; }
.clock i { display: block; height: 100%; width: 62%; background: linear-gradient(90deg, #22c55e, #facc15); border-radius: 3px; }


/* round done: a layer in the music card's own grid cell (not inside it — the card clips), shaped like it.
   The auto margins centre the card when it fits and keep its top at the music card's top when it doesn't:
   a short window lets it hang down over the xylophone instead of cutting off "Round done!" */
.rounddone {
  grid-row: 1; grid-column: 1; justify-self: center; width: 100%; max-width: 1180px;
  min-width: 0;   /* or the card's widest row widens the whole stage on a phone */
  position: relative; z-index: 5; display: flex; border-radius: 26px; background: rgba(255,253,246,.82);
}
.rd-card {
  margin: auto; max-height: calc(100dvh - var(--top-h) - 12px); overflow-y: auto;
  background: #fff; border-radius: 26px; padding: 18px 30px 20px; box-shadow: 0 14px 40px rgba(62,39,35,.3); text-align: center; min-width: 440px;
}
.rd-card h3 { margin: 0 0 2px; font-size: 30px; }
.rd-sub { color: var(--ink-soft); font-size: 15px; margin-bottom: 10px; }
.rd-rows { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 6px 0 12px; }
.rd-rows .rd-c { background: #fbf6ec; border-radius: 12px; padding: 6px 8px 4px; min-width: 58px; }
.rd-rows .rd-c b { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.rd-rows .rd-c span { color: var(--gold); font-size: 18px; letter-spacing: 1px; }
.rd-rows .rd-c span .off { color: #e5dccb; }
.rd-rows .rd-c i { display: block; font-style: normal; font-size: 14px; font-weight: 700; color: var(--ink); }
.rd-stats { display: flex; justify-content: center; gap: 26px; margin-bottom: 12px; }
.rd-stats div { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.rd-stats div b { display: block; font-size: 26px; color: var(--ink); }
.rd-tricky { font-size: 15px; margin-bottom: 14px; color: var(--ink-soft); }
.rd-tricky b { color: var(--ink); }
.rd-ready { color: var(--ok); font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.rd-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pill-btn { border: 0; border-radius: 999px; padding: 10px 20px; font-size: 16px; font-weight: 600; background: #f3ede1; color: var(--ink); }
.pill-btn:hover { filter: brightness(.97); }
.pill-btn.primary { background: var(--gold); color: #fff; box-shadow: 0 3px 0 var(--gold-deep); }
.pill-btn.go { background: #22c55e; color: #fff; box-shadow: 0 3px 0 #15803d; }

/* ---------- the xylophone (Rainbow Xylophone, ported) ---------- */
.xylo-wrap { grid-row: 2; grid-column: 1; min-height: 0; display: flex; align-items: stretch; justify-content: center; }
.xylo {
  position: relative; height: 100%; width: 100%; max-width: 1000px;
  background: var(--frame); border: 4px solid var(--frame-edge); border-radius: 26px;
  box-shadow: 10px 10px 30px rgba(0,0,0,.45);
  padding: 18px 26px; touch-action: none;
}
.xylo.twelve { max-width: 1160px; }
.xylo .rails { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .4; mix-blend-mode: multiply; }
.xylo .rails line { stroke: var(--rail); stroke-width: 16; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.frame-end { position: absolute; top: 50%; transform: translateY(-50%); width: 14px; background: #4e342e; border: 1px solid rgba(0,0,0,.2); box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.frame-end.left { left: -9px; height: 46%; border-radius: 6px 0 0 6px; }
.frame-end.right { right: -9px; height: 30%; border-radius: 0 6px 6px 0; }
.bars { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; justify-content: center; gap: clamp(4px, 1vw, 10px); }
.bar {
  position: relative; flex: 1 1 0; max-width: 84px; min-width: 0; height: var(--len);
  background: var(--c); border-radius: 7px;
  border-bottom: 4px solid rgba(0,0,0,.1); border-right: 4px solid rgba(0,0,0,.1);
  box-shadow: 4px 4px 0 rgba(0,0,0,.2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .07s, box-shadow .07s, filter .07s, background-color .2s;
  cursor: pointer;
}
.bar .bolt { position: absolute; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 2px rgba(0,0,0,.3); }
.bar .bolt.top { top: 10px; }
.bar .bolt.bottom { bottom: 10px; }
.bar .letter { font-size: clamp(18px, 2.6vw, 34px); font-weight: 700; color: rgba(255,255,255,.93); text-shadow: 0 2px 3px rgba(0,0,0,.25); pointer-events: none; }
.bar .num { position: absolute; bottom: 28px; font-size: clamp(11px, 1.3vw, 15px); font-weight: 600; color: rgba(255,255,255,.85); background: rgba(0,0,0,.14); border-radius: 6px; padding: 0 6px; pointer-events: none; }
.xylo.no-letters .bar .letter { visibility: hidden; }
.xylo.no-nums .bar .num { display: none; }
.bar.struck { transform: translateY(2px); box-shadow: 2px 2px 0 rgba(0,0,0,.2); filter: brightness(1.12); }
.bar.right { animation: rightflash .5s ease-out; }
@keyframes rightflash { 0% { filter: brightness(1.6) saturate(1.2); box-shadow: 0 0 0 5px rgba(255,255,255,.85), 0 0 26px 8px var(--c); } 100% { filter: none; box-shadow: 4px 4px 0 rgba(0,0,0,.2); } }
.bar.demo { filter: brightness(1.3); box-shadow: 0 0 0 4px rgba(255,255,255,.6), 0 0 20px 4px var(--c); }
.bar.glow::before { content: ''; position: absolute; inset: -7px; border-radius: 12px; border: 4px solid rgba(255,255,255,.95); box-shadow: 0 0 18px 4px rgba(255,255,255,.7); animation: barglow 1.1s ease-in-out infinite; pointer-events: none; }
@keyframes barglow { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.bar.greyed { background: #4b4b4f; cursor: default; box-shadow: 2px 2px 0 rgba(0,0,0,.25); }
.bar.greyed .letter, .bar.greyed .num { opacity: .3; }
.bar.greyed .bolt { background: rgba(255,255,255,.35); }

/* ---------- effects ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.spark { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); animation: spark .7s ease-out forwards; }
.spark.star { border-radius: 0; background: none; box-shadow: none; width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.spark.star::before { content: '✦'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--c); font-size: 16px; }
@keyframes spark { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }
.fly { position: absolute; font-size: 22px; font-weight: 700; color: var(--gold-deep); text-shadow: 0 2px 0 #fff; }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(43, 29, 22, .45); padding: 20px; }
.modal[hidden] { display: none; }
.sheet { width: min(980px, 100%); height: min(680px, 100%); background: var(--paper); border-radius: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.4); display: flex; flex-direction: column; overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px 10px 26px; border-bottom: 2px solid #efe5d3; }
.sheet-head h2 { margin: 0; font-size: 26px; }
.custom-tag { font-size: 14px; font-weight: 600; color: var(--ink-soft); background: #f3ede1; border-radius: 999px; padding: 3px 12px; }
.custom-tag:empty { display: none; }
.sheet-head .close { margin-left: auto; box-shadow: none; background: #f3ede1; }
.sheet-body { flex: 1; min-height: 0; display: flex; }
.tabs { flex: none; width: 190px; padding: 14px 10px; border-right: 2px solid #efe5d3; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.tab { border: 0; background: none; text-align: left; padding: 10px 14px; border-radius: 12px; font-size: 17px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; }
.tab .t-ico { width: 22px; text-align: center; font-size: 17px; }
.tab:hover { background: #f6efe2; }
.tab.on { background: var(--gold); color: #fff; }
.tab-body { flex: 1; min-width: 0; overflow-y: auto; padding: 16px 26px 26px; }
.sheet-foot { flex: none; display: flex; justify-content: flex-end; padding: 10px 18px; border-top: 2px solid #efe5d3; }
.sheet-foot .pill-btn { min-width: 120px; font-size: 18px; }

.sec { margin: 4px 0 18px; }
.sec h3 { margin: 0 0 8px; font-size: 18px; }
.sec h4 { margin: 12px 0 6px; font-size: 15px; color: var(--ink-soft); }
.note { font-size: 14px; color: var(--ink-soft); margin: 2px 0 10px; line-height: 1.4; max-width: 640px; }
.note .i-btn { border: 0; background: none; padding: 0 0 0 4px; color: var(--plum); font-size: 15px; font-weight: 700; vertical-align: baseline; }
.note.folded { display: inline-block; margin: 0 0 6px; }
.note.folded .note-text { display: none; }
.note.folded .i-btn { padding: 0; }
.seg { display: inline-flex; background: #f3ede1; border-radius: 14px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: none; border-radius: 10px; padding: 7px 14px; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(62,39,35,.15); }
.row { display: flex; align-items: center; gap: 14px; margin: 8px 0; flex-wrap: wrap; }
.row > .lbl { min-width: 210px; font-weight: 600; font-size: 15px; }
.switch { width: 50px; height: 30px; border-radius: 15px; border: 0; background: #d9cdb7; position: relative; padding: 0; flex: none; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch.on { background: #22c55e; }
.switch.on::after { left: 23px; }
.picks { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.picks button { border: 2px solid #e6dac4; background: #fff; border-radius: 999px; padding: 5px 13px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.picks button.on { border-color: var(--gold); background: #fef3c7; color: #92400e; }

/* level ladder */
.band { margin-bottom: 12px; border-radius: 18px; background: color-mix(in srgb, var(--bc) 9%, #fff); border: 2px solid color-mix(in srgb, var(--bc) 30%, #fff); padding: 8px 10px 6px; }
.band-head { display: flex; align-items: baseline; gap: 10px; padding: 0 6px 6px; }
.band-head b { font-size: 17px; color: color-mix(in srgb, var(--bc) 75%, #000); }
.band-head span { font-size: 13px; color: var(--ink-soft); }
.lvl { width: 100%; border: 0; background: #fff; border-radius: 12px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; padding: 7px 12px 7px 8px; margin-bottom: 5px; text-align: left; box-shadow: 0 1px 2px rgba(62,39,35,.08); }
.lvl:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--bc) 45%, #fff); }
.lvl.on { box-shadow: 0 0 0 3px var(--bc); }
.lvl .n { width: 34px; height: 34px; border-radius: 50%; background: var(--bc); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.lvl .t b { font-size: 16px; display: block; }
.lvl .t span { font-size: 13px; color: var(--ink-soft); }
.lvl .t .ses-tag { font-size: 11px; color: #fff; }
.lvl .s { color: var(--gold); letter-spacing: 1px; font-size: 17px; }
.lvl .s .off { color: #e8dfcf; }

/* notes picker */
.notes-pick { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.pick-staff .pick { cursor: pointer; }
.pick-staff .pick.off .ph { fill: #fff; stroke: #c9bba2; }
.pick-xylo { display: flex; gap: 4px; align-items: center; height: 96px; background: var(--frame); border-radius: 12px; padding: 8px 10px; }
.pick-xylo button { width: 22px; border: 0; border-radius: 4px; background: var(--c); padding: 0; height: var(--len); color: #fff; font-size: 11px; font-weight: 700; }
.pick-xylo button.off { background: #4b4b4f; color: rgba(255,255,255,.35); }

/* rhythm cards */
.cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cell { border: 2px solid #e6dac4; background: #fff; border-radius: 14px; padding: 8px 6px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 92px; }
.cell .pic { height: 46px; display: flex; align-items: center; }
.cell b { font-size: 14px; }
.cell small { font-size: 11px; color: var(--ink-soft); }
.cell.on { border-color: var(--gold); background: #fffbeb; box-shadow: 0 0 0 2px rgba(251,191,36,.35); }

/* helps table */
.helps { width: 100%; border-collapse: collapse; }
.helps td { padding: 9px 6px; border-bottom: 1px solid #efe5d3; vertical-align: middle; }
.helps td:first-child { font-weight: 600; font-size: 15px; width: 30%; }
.helps .seg { flex-wrap: wrap; }
.helps td .note { margin: 6px 0 0; }
/* a phone: each question above its choices */
@media (max-width: 700px) {
  .helps tr { display: block; border-bottom: 1px solid #efe5d3; padding: 8px 0; }
  .helps td { display: block; width: auto !important; border: 0; padding: 2px 2px; }
  .helps td:first-child { margin-bottom: 4px; }
}

/* score board */
.board-sheet { width: min(900px, 100%); }
.board-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 26px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-content: start; }
.panel { background: #fff; border-radius: 18px; padding: 12px 16px 14px; box-shadow: 0 1px 3px rgba(62,39,35,.1); }
.panel h3 { margin: 0 0 8px; font-size: 17px; }
.panel.wide { grid-column: 1 / -1; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { background: #fbf6ec; border-radius: 14px; padding: 8px 10px; }
.tile b { display: block; font-size: 26px; }
.tile span { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.cards-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.cards-row .rc { background: #fbf6ec; border-radius: 10px; padding: 4px 8px; font-size: 12px; color: var(--ink-soft); font-weight: 600; text-align: center; }
.cards-row .rc span { display: block; color: var(--gold); font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
.cards-row .rc span .off { color: #e5dccb; }
.best { list-style: none; margin: 0; padding: 0; }
.best li { display: grid; grid-template-columns: 26px 1fr auto auto; gap: 10px; align-items: center; padding: 6px 4px; border-bottom: 1px solid #f1e9da; font-size: 15px; }
.best li b { font-size: 17px; }
.best li .when { color: var(--ink-soft); font-size: 13px; }
.best li .st { color: var(--gold); }
.best li.new { background: #fef3c7; border-radius: 8px; }
.tricky-xylo { display: flex; gap: 6px; align-items: flex-end; height: 120px; background: var(--frame); border-radius: 14px; padding: 10px 14px; }
.tricky-xylo .tb { flex: 1; max-width: 34px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.tricky-xylo .tb i { width: 100%; border-radius: 4px; background: var(--c); min-height: 6px; }
.tricky-xylo .tb.none i { background: #4b4b4f; }
.tricky-xylo .tb span { color: #fff; font-size: 11px; font-weight: 700; }
.tricky-xylo .tb em { color: rgba(255,255,255,.75); font-size: 10px; font-style: normal; }
.mixups { margin: 10px 0 8px; padding: 0; list-style: none; font-size: 15px; }
.mixups li { padding: 3px 0; }
.mixups b.l { display: inline-block; min-width: 26px; text-align: center; border-radius: 6px; color: #fff; padding: 0 4px; }


/* ---------- phone ---------- */
@media (max-width: 700px) {
  :root { --top-h: 54px; }
  .topbar { padding: 0 10px; gap: 8px; }
  .topbar-left { gap: 8px; }
  .brand-name { display: none; }
  .brand-logo { width: 28px; height: 28px; }
  .level-chip { margin-left: 0; height: 42px; font-size: 14px; padding: 0 8px; min-width: 0; }
  .chip-text { max-width: 34vw; }
  .chip-text .tune-name { font-size: 11.5px; }
  .score-chip { height: 38px; gap: 8px; padding: 0 10px; font-size: 14px; }
  .sc-points small { display: none; }
  .icon-btn { width: 38px; height: 38px; }
  .stage { padding: 2px 8px 10px; gap: 8px; grid-template-rows: minmax(0, 45fr) minmax(0, 55fr); }
  .stand { padding: 10px 8px 6px; border-radius: 20px; }
  .rounddone { border-radius: 20px; }
  /* the music on top; one row under it: Listen · Practice / Test · the metronome, then Start over + Next at the right */
  .stand-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; column-gap: 6px; row-gap: 4px; }
  .music { grid-column: 1 / -1; grid-row: 1; }
  .controls { grid-column: 1; grid-row: 2; gap: 6px; padding-top: 0; }
  .side-right { grid-column: 2; grid-row: 2; align-self: start; gap: 6px; }
  .next-label { display: none; }
  .ctl { min-width: 52px; gap: 2px; }
  .ctl-label { font-size: 12px; }
  .round-btn { width: 52px; height: 52px; }
  .round-btn svg { width: 26px; height: 26px; }
  .round-btn.ctl-btn { width: 46px; height: 46px; }
  .round-btn.ctl-btn svg { width: 24px; height: 24px; }
  .round-btn.small { width: 42px; height: 42px; margin-top: 2px; }
  .round-btn.small svg { width: 22px; height: 22px; }
  .dots { top: 7px; gap: 6px; }
  .dot { width: 12px; height: 12px; }
  .xylo { padding: 10px 8px; border-radius: 18px; }
  .bars { gap: 3px; }
  .bar { border-right-width: 2px; border-bottom-width: 3px; border-radius: 5px; }
  .bar .bolt { width: 8px; height: 8px; }
  .bar .bolt.top { top: 7px; } .bar .bolt.bottom { bottom: 7px; }
  .bar .num { bottom: 20px; padding: 0 3px; }
  .praise { font-size: 20px; padding: 8px 16px; top: 35%; }
  .praise.mark { padding: 0; }
  .praise.mark svg { width: 64px; height: 64px; }
  .sheet { border-radius: 20px; height: 100%; }
  .sheet-body { flex-direction: column; }
  .tabs { width: auto; flex-direction: row; border-right: 0; border-bottom: 2px solid #efe5d3; padding: 8px; overflow-x: auto; }
  .tab { padding: 8px 10px; white-space: nowrap; font-size: 15px; }
  .tab-body { padding: 12px 14px 20px; }
  .row > .lbl { min-width: 0; width: 100%; }
  .board-body { grid-template-columns: 1fr; padding: 12px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .rd-card { min-width: 0; width: 92%; padding: 14px 14px 16px; }
  .modal { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .now-glow, .bar.glow::before, #btn-next.ready { animation: none; }
  .head-wrap.pop, .spark { animation-duration: .01s; }
}

/* ---------- the app's own pieces ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button:focus-visible, .bar:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 70;
  background: #2b1d16; color: #fff; border-radius: 999px; padding: 10px 20px; font-size: 16px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal.ask { z-index: 80; }
.ask-card { background: var(--paper); border-radius: 22px; padding: 20px 24px 16px; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.ask-card p { margin: 0 0 16px; font-size: 18px; font-weight: 600; line-height: 1.35; }
.ask-btns { display: flex; justify-content: flex-end; gap: 10px; }
.pill-btn.danger { background: #dc2626; color: #fff; box-shadow: 0 3px 0 #991b1b; }
.lvl-wrap { position: relative; }
.lvl-wrap .lvl { padding-right: 46px; }
/* My sessions: two buttons at the end of a row (✎ change, × delete) */
.lvl-wrap.two .lvl { padding-right: 88px; }
.lvl-wrap .x-btn.ed-btn { right: 44px; font-size: 17px; }
.ses-band .save-mine { padding-top: 6px; }
.ses-head .save-mine input { font-size: 18px; font-weight: 600; }
.gold-means { margin: 2px 0 0; }
/* how many melodies in a round: − [n] + */
.stepper { display: inline-flex; align-items: center; border: 2px solid #e6dac4; border-radius: 999px; background: #fff; overflow: hidden; }
.stepper button { border: 0; background: #f3ede1; width: 40px; height: 38px; font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1; }
.stepper button:hover { background: #ebe2d1; }
.stepper button[disabled] { opacity: .35; }
.stepper input { width: 58px; height: 38px; border: 0; text-align: center; font: inherit; font-size: 18px; font-weight: 700; color: var(--ink); background: #fff; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.x-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f3ede1; font-size: 20px; line-height: 1; color: var(--ink-soft); }
.lvl-wrap .lvl .s { margin-right: 4px; }
.save-mine { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 2px 6px; }
.save-mine input, .tab-body input[type=text] { flex: 1; min-width: 180px; padding: 9px 12px; border-radius: 12px; border: 2px solid #e6dac4; font: inherit; font-size: 15px; background: #fff; color: var(--ink); }
#lesson-link { width: 100%; font-size: 13px; color: var(--ink-soft); }
.tab-body input[type=range] { width: min(280px, 60vw); accent-color: var(--gold-deep); }
.lpill { display: inline-block; min-width: 26px; text-align: center; border-radius: 7px; color: var(--ink); padding: 0 5px; background: color-mix(in srgb, var(--c) 45%, #fff); box-shadow: inset 0 0 0 2px var(--c); }
.new-best { color: var(--gold-deep); }
.t-star { color: var(--gold-deep); }
.tile-btn { display: flex; align-items: center; }
.mixups .lpill { margin: 0 2px; }
.rd-tricky .lpill { font-size: 17px; }
.app.game-open .dots { display: none; }
@media (max-width: 700px) {
  .sheet-head { padding: 10px 12px 8px 16px; }
  .sheet-head h2 { font-size: 21px; }
  .custom-tag { font-size: 12px; padding: 2px 9px; }
}

/* ---------- phase 5: the shelf's tokens (lib/evm-shelf.css uses the app's own) ---------- */
:root {
  --accent: #d97706; --surface: var(--paper); --font: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --ink-2: var(--ink-soft); --ink-3: #a8957a; --hairline: #efe5d3; --hairline-2: #e2d4bb; --paper-2: #fbf6ec;
}
.app.in-lesson #mel-btn { display: none; }
.score-chip .sc-player { font-weight: 700; color: var(--ink); max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-chip .sc-player[hidden] { display: none; }

/* ---------- Make a melody ---------- */
.maker-part { display: none; }
.app.making .maker-part { display: flex; }
.app.making .stand-row .side, .app.making .controls, .app.making .dots, .app.making .praise, .app.making .clock { display: none !important; }
.app.making .stand { box-shadow: 0 10px 28px rgba(62,39,35,.28), inset 0 0 0 3px var(--gold); }
.maker-top { flex: none; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 4px 6px; }
.mk-set { font-weight: 700; font-size: 15px; color: var(--gold-deep); white-space: nowrap; }
#mk-title { flex: 1 1 200px; min-width: 140px; padding: 7px 11px; border-radius: 12px; border: 2px solid #e6dac4; font: inherit; font-size: 15px; background: #fff; color: var(--ink); }
.mk-status { font-weight: 600; font-size: 15px; color: var(--ink-soft); min-width: 9em; }
.maker-bottom { flex: none; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 4px 2px; border-top: 2px dashed #efe5d3; }
.mk-values { display: flex; gap: 5px; flex-wrap: wrap; }
.mk-val { border: 2px solid #e6dac4; background: #fff; border-radius: 12px; padding: 3px 7px 2px; display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.mk-val .pic { height: 30px; display: flex; align-items: center; }
.mk-val b { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.mk-val.on { border-color: var(--gold); background: #fffbeb; box-shadow: 0 0 0 2px rgba(251,191,36,.35); }
.mk-val.on b { color: #92400e; }
.mk-val.no { opacity: .35; }
.maker-bottom .pill-btn { padding: 9px 16px; }
.maker-bottom .pill-btn[disabled] { opacity: .4; pointer-events: none; }
#mk-hear.playing { background: #f59e0b; color: #fff; }
#mk-save.ready { animation: nudge 1.2s ease-in-out infinite; }
.mk-gap { flex: 1; }
.col.faint, .beams.faint { opacity: .16; }

/* ---------- the My melodies window ---------- */
.mel-sheet { width: min(980px, 100%); }
.mel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 24px 24px; }
.sheet-head .back { box-shadow: none; background: #f3ede1; font-size: 28px; margin-right: -4px; }
.mel-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; }
.mel-new { display: flex; gap: 8px; margin: 0 0 12px; }
.mel-new[hidden] { display: none; }
.mel-new input, .mel-rename { flex: 1; min-width: 200px; padding: 9px 12px; border-radius: 12px; border: 2px solid #e6dac4; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.mel-rename { font-size: 20px; font-weight: 600; max-width: 520px; }
.mel-group { margin: 16px 0 6px; font-size: 16px; color: var(--ink-soft); }
.mel-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 6px 8px 6px 4px; margin-bottom: 6px; box-shadow: 0 1px 2px rgba(62,39,35,.08); }
.mel-row.playing { box-shadow: 0 0 0 3px var(--gold); }
.mel-open { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 6px 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.mel-open b { font-size: 17px; }
.mel-meta { width: 100%; font-size: 13px; color: var(--ink-soft); }
.mel-tag { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 9px; background: #ede9fe; color: #5b21b6; }
.mel-tag.book { background: #dcfce7; color: #166534; }
.mel-tag.now { background: #fef3c7; color: #92400e; }
.mel-play { flex: none; padding: 8px 14px; }
.mel-set-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mel-set-title { margin: 0; font-size: 22px; }
.mel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 6px; }
.mel-card { background: #fff; border-radius: 16px; padding: 10px 10px 8px; box-shadow: 0 1px 3px rgba(62,39,35,.1); display: flex; flex-direction: column; gap: 4px; min-height: 120px; }
.mel-pic { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mel-pic svg { max-width: 100%; height: auto; }
.mel-cap { font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mel-cap b { color: var(--ink); }
.mel-tools { display: flex; gap: 4px; }
.mel-tools button { flex: 1; border: 0; border-radius: 9px; background: #f3ede1; padding: 5px 0; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.mel-tools button:hover { background: #ebe2d1; }
.mel-tools button[disabled] { opacity: .35; }
.mel-add { border: 2px dashed #d9c9ad; box-shadow: none; background: transparent; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.mel-add span { font-size: 34px; line-height: 1; color: var(--gold-deep); }

/* ---------- players ---------- */
.players { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.player { display: inline-flex; align-items: center; border-radius: 999px; background: #fff; border: 2px solid #e6dac4; overflow: hidden; }
.player button { border: 0; background: none; padding: 6px 12px; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.player button.x { padding: 6px 10px 6px 2px; font-size: 17px; }
.player.on { border-color: var(--gold); background: #fef3c7; }
.player.on button { color: #92400e; }

@media (max-width: 700px) {
  .maker-top { gap: 6px; padding-bottom: 4px; }
  .mk-set { display: none; }
  .mk-status { min-width: 0; font-size: 13px; }
  .maker-bottom { gap: 5px; }
  .mk-val { min-width: 44px; padding: 2px 4px; }
  .mk-val .pic { height: 24px; }
  .mk-gap { display: none; }
  .maker-bottom .pill-btn { padding: 7px 11px; font-size: 14px; }
  .mel-body { padding: 10px 12px 18px; }
  .mel-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .score-chip .sc-player { max-width: 5em; }
}

.mel-link { width: 100%; margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; border: 2px solid #e6dac4; font: inherit; font-size: 13px; color: var(--ink-soft); background: #fff; }

/* ==========================================================================
   Phase 6 — the accessibility pass (2026-10-03)
   Contrast to WCAG AA (4.5:1 for text, 3:1 for large text and icons),
   every colour checked: dark text on gold, a deeper green, deeper judgement
   colours. The "Melody Reader" name on the wood is the logotype (exempt)
   and keeps Rainbow Xylophone's look.
   ========================================================================== */
.round-btn.play-btn svg, #btn-next.ready svg { fill: #3b2306; }
.round-btn.playing::after { background: #3b2306; }
.pill-btn.primary, .tab.on { color: #3b2306; }
/* level numbers: dark on white, ringed in the band's colour — readable on every band */
.lvl .n { background: #fff; color: #2b1d16; box-shadow: inset 0 0 0 3.5px var(--bc); }
.pill-btn.go { background: #15803d; box-shadow: 0 3px 0 #14532d; }
.sc-stars b, .t-star, .new-best, .mk-set { color: #b45309; }
.lvl .s, .rd-rows .rd-c span, .cards-row .rc span, .best li .st, .praise .p-stars { color: #d97706; }
.rd-ready { color: #15803d; }
.switch.on { background: #15803d; }
/* bar letters: Rainbow Xylophone's white, with a dark edge so they read on the light bars too */
.bar .letter { color: #fff; -webkit-text-stroke: 1.5px rgba(40, 18, 4, .55); paint-order: stroke fill; text-shadow: 0 2px 2px rgba(0,0,0,.18); }
/* the key number: dark on a light pill — readable on every colour */
.bar .num { color: #2b1d16; background: rgba(255,255,255,.88); }
.bar.greyed .num { background: rgba(255,255,255,.35); }

/* the way back to the Eagle View Music hub (hidden inside the site's frame and in Google Sites) */
.home-link {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  height: 38px; padding: 0 12px 0 8px; border-radius: 999px; background: #fff; color: #3e2723;
  box-shadow: var(--shadow); font-size: 14px; font-weight: 600; text-decoration: none;
}
.home-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.home-link:hover { background: var(--cream); }
html.in-iframe .home-link { display: none; }
@media (max-width: 1000px) { .home-link span { display: none; } .home-link { padding: 0 9px; } }
@media (max-width: 700px) { .home-link { height: 34px; padding: 0 7px; } }

/* focus that shows on wood, paper and the dark frame alike */
button:focus-visible, a:focus-visible, input:focus-visible, .bar:focus-visible, .mel-open:focus-visible {
  outline: 3px solid #1d4ed8; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(255,255,255,.85);
}
.bar:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px #1d4ed8; }

/* less motion when the system asks for it */
@media (prefers-reduced-motion: reduce) {
  .praise.show { animation: praise-still 1.7s linear both; }
  @keyframes praise-still { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
  .score-chip.bump, #mk-save.ready, .ghost, #btn-mode.ready, .mode-btn.recording .i-rec .ball { animation: none; }
  .toast { transition: opacity .2s; transform: translate(-50%, 0); }
  .bar, .round-btn, .bar.right { transition: none; animation: none; }
  .col.hidden-note, .beams.hidden-note { transition: none; }
}
/* a narrow phone: the home link takes the logo's place (inside a frame, where it is hidden, the logo stays);
   the level chip takes whatever room is left */
@media (max-width: 480px) {
  html:not(.in-iframe) .brand { display: none; }
  .topbar { gap: 6px; }
  .topbar-left { gap: 6px; }
  .level-chip { flex: 1 1 auto; min-width: 0; }
  .chip-text { max-width: none; }
  .topbar-right { gap: 6px; }
  .score-chip { gap: 6px; padding: 0 9px; }
  .level-chip .band-dot, .level-chip .caret { display: none; }
  .level-chip { padding: 0 10px; }
}
/* a smartboard or a big screen: the music and the xylophone grow to be read from the back of the room */
@media (min-width: 1500px) {
  .stand, .rounddone { max-width: 80vw; }
  .xylo { max-width: 70vw; }
  .xylo.twelve { max-width: 78vw; }
  .bar { max-width: 124px; }
  .bar .letter { font-size: clamp(30px, 2.4vw, 46px); }
  .bar .num { font-size: clamp(14px, 1vw, 19px); }
  .round-btn.ctl-btn { width: 74px; height: 74px; }
  .round-btn.ctl-btn svg { width: 38px; height: 38px; }
  .round-btn.small { width: 64px; height: 64px; }
  .round-btn.small svg { width: 30px; height: 30px; }
  .ctl-label { font-size: 17px; }
  .controls { gap: 26px; }
  .stand-row { grid-template-columns: 150px minmax(0, 1fr) 150px; }
  .dot { width: 18px; height: 18px; }
  .praise.mark svg { width: 112px; height: 112px; }
}

/* ==========================================================================
   Battle Mode (2026-10-05) — teams take turns; their colours run through it
   ========================================================================== */
/* the score chip becomes the teams' scores; the team playing is ringed in its colour */
.sc-teams { display: none; align-items: center; gap: 6px; }
.score-chip.battle { gap: 0; padding: 0 6px; }
.score-chip.battle > span:not(.sc-teams) { display: none !important; }
.score-chip.battle .sc-teams { display: inline-flex; }
/* not a battle: no team scores — `.score-chip > span` (inline-flex) outranks a plain `.sc-teams`, which left
   the last battle's teams showing beside the points until a reload (the user's report, 2026-10-08) */
.score-chip:not(.battle) .sc-teams { display: none; }
.team-pill { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 9px 0 7px; border-radius: 999px; border: 2.5px solid transparent; }
.team-pill i { width: 12px; height: 12px; border-radius: 50%; background: var(--tc); flex: none; }
.team-pill b { font-size: 13px; font-weight: 600; color: var(--ink-soft); max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-pill em { font-style: normal; font-size: 17px; font-weight: 700; color: var(--ink); }
.team-pill.on { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, #fff); }
.team-pill.on b { color: var(--ink); }
@media (max-width: 1100px) { .team-pill b { max-width: 4.5em; } }
@media (max-width: 700px) { .team-pill b { display: none; } .team-pill { padding: 0 7px 0 6px; height: 30px; } .team-pill em { font-size: 15px; } }

/* the music card wears the colour of the team playing; its name sits with this turn's dots */
.stand.battle-on { box-shadow: 0 10px 28px rgba(62,39,35,.28), inset 0 0 0 5px var(--tc); }
.turn-tag { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px 1px 8px; border-radius: 999px; font-size: 14px; font-weight: 700;
  color: #fff; background: var(--tc); text-shadow: 0 1px 1px rgba(0,0,0,.35); margin-right: 4px; max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the cards over the music: the start, a team's turn, between rounds, the end */
.bt-kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 2px; }
.bt-card .rd-btns { margin-top: 12px; }
.pill-btn.go.bt-go { background: var(--tc); box-shadow: 0 3px 0 color-mix(in srgb, var(--tc) 70%, #000); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.35); font-weight: 700; }
.bt-who { display: flex; align-items: center; justify-content: center; gap: 10px; color: color-mix(in srgb, var(--tc) 75%, #000); }
.bt-who i { width: 22px; height: 22px; border-radius: 50%; background: var(--tc); }
.bt-turn { border-top: 8px solid var(--tc); }
.bt-teams { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 2px; }
.tm { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.tm i { width: 14px; height: 14px; border-radius: 50%; background: var(--tc); flex: none; }
.bt-teams .tm { padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--tc) 14%, #fff); border: 2px solid var(--tc); }
.bt-table { list-style: none; margin: 10px auto 2px; padding: 0; max-width: 380px; text-align: left; }
.bt-table li { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 12px; margin-bottom: 5px; background: #fbf6ec; border-left: 6px solid var(--tc); }
.bt-table li:first-child { background: color-mix(in srgb, var(--tc) 14%, #fff); }
.bt-table .pl { width: 1.4em; font-weight: 700; color: var(--ink-soft); }
.bt-table .tm { flex: 1; min-width: 0; }
.bt-table .gs { color: #b45309; font-weight: 700; font-size: 14px; }
.bt-table .pt { font-weight: 700; font-size: 20px; min-width: 2.2em; text-align: right; }

/* the Score board in a battle: each round's points */
.bt-grid-wrap { overflow-x: auto; margin-top: 10px; }
.board-body .bt-table { margin-left: 0; }
.bt-grid { border-collapse: collapse; font-size: 14px; }
.bt-grid th, .bt-grid td { padding: 5px 9px; text-align: center; border-bottom: 1px solid #efe5d3; white-space: nowrap; }
.bt-grid thead th { color: var(--ink-soft); font-weight: 600; font-size: 12px; }
.bt-grid tbody th { text-align: left; }
.bt-grid .tot { font-weight: 700; font-size: 16px; }

/* setting a battle up: the teams first */
.ses-tag { display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 1px 7px; border-radius: 999px; background: #2b1d16; color: #fff; margin-left: 4px; }
.bt-dots { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.bt-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--tc); }
.pill-btn.bt-new { background: #2b1d16; color: #fff; box-shadow: 0 3px 0 #000; }
.bt-edit { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 8px; }
.bt-row { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 8px 46px 8px 12px; border-radius: 14px; background: #fff;
  border: 2px solid color-mix(in srgb, var(--tc) 55%, #fff); border-left-width: 8px; border-left-color: var(--tc); }
.bt-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--tc); flex: none; }
.bt-name { flex: 1 1 160px; min-width: 120px; padding: 8px 11px; border-radius: 10px; border: 2px solid #e6dac4; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); background: #fff; }
.bt-sw { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.bt-sw button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); padding: 0; }
.bt-sw button.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px var(--ink); }
.bt-row .bt-x { top: 50%; right: 8px; }
.bt-sum { margin: 4px 0 2px; }
@media (prefers-reduced-motion: reduce) { .bt-sw button { transition: none; } }

/* Battle Mode: the metronome's choice of tempo, over the button */
.ctl { position: relative; }
.metro-pick { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 4;
  display: flex; gap: 6px; padding: 8px; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(62,39,35,.3); white-space: nowrap; }
.metro-pick::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -8px; border: 8px solid transparent; border-top-color: #fff; }
.metro-pick button { border: 0; border-radius: 12px; padding: 8px 12px 7px; background: #15803d; color: #fff; display: flex; flex-direction: column; align-items: center; line-height: 1.1; box-shadow: 0 3px 0 #14532d; }
.metro-pick button b { font-size: 16px; font-weight: 700; }
.metro-pick button small { font-size: 11.5px; font-weight: 600; opacity: .9; }
.metro-pick button.on { background: #166534; box-shadow: 0 0 0 3px #fde047; }
.metro-pick button.off { background: #f3ede1; color: var(--ink); box-shadow: 0 3px 0 #d9c9ad; justify-content: center; font-weight: 700; }
.metro-pick button:active { transform: translateY(2px); box-shadow: none; }
@media (max-width: 700px) { .metro-pick { padding: 6px; gap: 4px; } .metro-pick button { padding: 7px 9px 6px; } .metro-pick button b { font-size: 14px; } }

/* the session page's first row: Session Name: [the name] ▶ Play Session (2026-10-06) */
.ses-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ses-row label { font-weight: 700; font-size: 17px; white-space: nowrap; }
.ses-row input { flex: 1 1 200px; min-width: 160px; padding: 9px 12px; border-radius: 12px; border: 2px solid #e6dac4; font: inherit; font-size: 18px; font-weight: 600; background: #fff; color: var(--ink); }
.ses-head { padding-bottom: 4px; }
/* a level's page (2026-10-08): its name (not editable), ▶ Play Level n, and Reset when it is your own */
.lv-title { flex: 1 1 200px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 19px; }
.lv-about { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lv-about .h-link { background: #f3ede1; box-shadow: none; padding: 5px 13px; font-size: 14px; }
.ses-tag.ed-tag { background: #0f766e; }
.over-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: #ede9fe; color: #4c1d95; font-size: 14px; }
.over-note span { flex: 1 1 240px; }
.over-note .h-link { background: #fff; box-shadow: none; padding: 5px 13px; font-size: 14px; color: #4c1d95; }
.note.warn { color: #9a3412; }
.lvl-wrap:not(.two) .x-btn.ed-btn { right: 8px; }
/* Format: Song — the songs picked, numbered in the order they'll play */
.picks-head { margin: 10px 0 4px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.song-picks button { display: inline-flex; align-items: center; gap: 6px; }
.song-picks .ord { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #3b2306; color: #fff; font-size: 12px; font-weight: 700; }

/* ==========================================================================
   The home page and My stats (2026-10-07; home.js, stats.js, charts.js)
   Three views: html.view-home · view-play (the music) · view-stats. The
   home page and My stats scroll inside themselves on the wood; their
   cards are the music's cream paper. Headings on the wood are the frame's
   dark brown (the white logotype is the only white text on wood).
   ========================================================================== */
html:not(.view-play) .stage, html:not(.view-home) #home, html:not(.view-stats) #stats { display: none; }
html:not(.view-play) #level-chip, html:not(.view-play) #score-chip { display: none; }
html:not(.view-home) .home-link { display: none; }
html.view-home .app-home { display: none; }
.app.making .app-home { visibility: hidden; }
.app-home {
  display: inline-flex; align-items: center; gap: 4px; flex: none; border: 0;
  height: 38px; padding: 0 14px 0 8px; border-radius: 999px; background: #fff; color: #3e2723;
  box-shadow: var(--shadow); font-size: 15px; font-weight: 700;
}
.app-home svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.app-home:hover { background: var(--cream); }
.app-home .i-house { display: none; }
/* a narrow phone: a house (or, back to the music, the arrow) — the level chip needs the room */
@media (max-width: 480px) {
  .app-home { padding: 0 8px; }
  .app-home span { display: none; }
  .app-home:not(.is-back) .i-back { display: none; }
  .app-home:not(.is-back) .i-house { display: block; width: 20px; height: 20px; }
}
.pill-btn svg.ib { display: inline-block; width: 17px; height: 17px; vertical-align: -3px; margin-right: 5px; }

.home, .statspage { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 20px 30px; }
.h-wrap, .st-wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.h-card, .h-hero, .mode-card, .st-card, .st-tile, .st-welcome {
  background: var(--paper); border-radius: 22px; box-shadow: 0 8px 22px rgba(62,39,35,.22), inset 0 0 0 2px var(--paper-edge);
}
.h-card { padding: 16px 18px; }
.h-lab { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.band-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--band); flex: none; }

/* ---- the top: hello · Play / Carry on · the totals ---- */
.h-hero { position: relative; overflow: hidden; padding: 26px 26px 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.h-hero::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: linear-gradient(90deg, #ef4444 0 14.3%, #f97316 0 28.6%, #facc15 0 42.9%, #22c55e 0 57.1%, #2dd4bf 0 71.4%, #3b82f6 0 85.7%, #a855f7 0); }
.hero-main { flex: 1 1 380px; min-width: 0; }
.hello { margin: 0 0 6px; font-size: 34px; line-height: 1.15; }
.hero-what { margin: 0 0 16px; display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--ink-soft); }
.hero-what b { color: var(--ink); }
.hero-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.big-play {
  border: 0; border-radius: 999px; background: #15803d; color: #fff; font-size: 25px; font-weight: 700;
  padding: 13px 34px 14px; box-shadow: 0 5px 0 #14532d, 0 10px 20px rgba(21,128,61,.3); transition: transform .08s, box-shadow .08s;
}
.big-play:hover { filter: brightness(1.06); }
.big-play:active { transform: translateY(3px); box-shadow: 0 2px 0 #14532d; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.bubs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.bub { background: #fbf6ec; border-radius: 18px; padding: 10px 16px 9px; min-width: 104px; text-align: center; }
.bub b { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 28px; line-height: 1.1; }
.bub span { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.bub svg { width: 24px; height: 24px; }
.bub.fire svg { fill: #f97316; }
.hero-players { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hero-players .players, .st-players .players { margin: 0; }

/* ---- the sections ---- */
.h-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin: 2px 4px 10px; }
.h-head h2, .st-section h2 { margin: 0; font-size: 24px; color: #3e2723; text-shadow: 0 1px 0 rgba(255,236,200,.5); }
.h-link { border: 0; background: #fff; border-radius: 999px; padding: 7px 15px; font-size: 15px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow); }
.h-link:hover { background: var(--cream); }
.h-card .h-link, .mode-card .h-link { background: #f3ede1; box-shadow: none; padding: 5px 13px; font-size: 14px; }

/* What to read: the ladder */
.ladder { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.lad-band { display: flex; flex-direction: column; gap: 4px; }
.lad-name { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: color-mix(in srgb, var(--bc) 62%, #000); padding-left: 6px; }
.lad-row { display: flex; gap: 4px; }
.lad-lv { border: 0; background: none; padding: 2px; width: 54px; display: flex; flex-direction: column; align-items: center; gap: 3px; border-radius: 14px; }
.lad-lv b { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: #fff; color: var(--ink);
  box-shadow: inset 0 0 0 4px var(--bc), 0 2px 4px rgba(62,39,35,.15); transition: transform .1s; }
.lad-lv:hover b { transform: scale(1.06); }
.lad-lv.on b { background: color-mix(in srgb, var(--bc) 30%, #fff); box-shadow: inset 0 0 0 4px var(--bc), 0 0 0 3px #fff, 0 0 0 6px var(--bc); transform: scale(1.06); }
.lad-st { font-size: 11.5px; letter-spacing: .5px; color: #d97706; white-space: nowrap; }
.lad-st .off { color: #e5dccb; }
.h-ses { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 2px solid #efe5d3; }
.ses-chip { border: 2px solid #99d5cd; background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 15px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.ses-chip:hover { background: #f0fdfa; }
.ses-chip.on { background: #ccfbf1; border-color: #0f766e; box-shadow: 0 0 0 2px #0f766e; }
.ses-chip.add { border-style: dashed; border-color: #c9b99e; color: var(--ink-soft); }
.ses-chip.static { cursor: default; }
.h-now { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; background: #fbf6ec; border-radius: 14px; padding: 10px 14px; }
.h-now .band-dot { margin-top: 5px; }
.h-now > div { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.h-now b { font-size: 17px; }
.h-now > div > span { font-size: 14px; color: var(--ink-soft); }
.set-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; background: #ede9fe; color: #4c1d95; border-radius: 999px; padding: 3px 4px 3px 12px; font-size: 14px; }
.set-chip button { border: 0; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #4c1d95; font-size: 17px; line-height: 1; }
/* just this time, on top of what is chosen (2026-10-08): each a chip with × */
.over-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-top: 4px; }
.over-chips .h-lab { margin-top: 6px; }
.h-sub { font-size: 14px; color: var(--ink-soft); font-weight: 600; margin-right: auto; }
/* a level that is your own: a little ✎ on its badge */
.lad-lv b { position: relative; }
.lad-ed { position: absolute; right: -5px; top: -5px; width: 19px; height: 19px; border-radius: 50%; background: #0f766e; color: #fff;
  font-style: normal; font-size: 11px; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px #fff; }

/* How to play / Make your own: the cards */
.mode-grid { --g: 14px; container-type: inline-size; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--g); }
/* the cards' rows are centred (2026-10-08, the user's): a row that isn't full — Battle on its own, the third of
   Make your own — sits in the middle, not at the left. Every card is one column wide, columns of at least 205 px
   (158 on a phone) as many as fit: five across a computer screen; Make your own's three take the same width, so
   they sit under the middle three of the five */
.mode-grid > .mode-card { flex: 0 0 100%; }
@container (min-width: 326px) {
  .mode-grid > .mode-card { flex-basis: calc((100cqw - var(--g)) / 2 - .1px); }
  .mode-grid:where(.make) > .mode-card { flex-basis: 100%; }      /* Make your own: one a row on a phone (:where — no extra weight, so the wider sizes below win) */
}
@container (min-width: 534px) { .mode-grid > .mode-card { flex-basis: calc((100cqw - var(--g)) / 2 - .1px); } }
@container (min-width: 643px) { .mode-grid > .mode-card { flex-basis: calc((100cqw - 2 * var(--g)) / 3 - .1px); } }
@container (min-width: 862px) { .mode-grid > .mode-card { flex-basis: calc((100cqw - 3 * var(--g)) / 4 - .1px); } }
@container (min-width: 1081px) { .mode-grid > .mode-card { flex-basis: calc((100cqw - 4 * var(--g)) / 5 - .1px); } }
.mode-card { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 14px; min-width: 0; overflow: hidden; }
.mc-top { display: flex; align-items: center; gap: 12px; margin: 0 -16px; padding: 14px 16px 12px; background: color-mix(in srgb, var(--mc) 11%, #fffdf6); border-bottom: 2px solid color-mix(in srgb, var(--mc) 22%, #fffdf6); }
.mc-top h3 { margin: 0; font-size: 21px; line-height: 1.15; }
.mc-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--mc); display: grid; place-items: center; box-shadow: 0 3px 0 color-mix(in srgb, var(--mc) 70%, #000); }
.mc-ico.light { background: #fff; box-shadow: inset 0 0 0 3px var(--mc), 0 3px 0 color-mix(in srgb, var(--mc) 70%, #000); }
.mc-ico svg { width: 34px; height: 34px; }
.mc-about { margin: 0; font-size: 15px; line-height: 1.38; color: var(--ink-soft); }
.mc-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mc-opt .seg button { padding: 6px 11px; }
.mc-unit { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.mc-songs { flex: 1 1 100%; font-size: 14px; color: var(--ink-soft); line-height: 1.35; }
.mc-songs b { color: var(--ink); font-weight: 600; }
.mc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mc-best { font-size: 14px; color: var(--ink-soft); }
.mc-best b { color: var(--ink); }
.mc-play {
  margin-left: auto; border: 0; border-radius: 999px; background: var(--mc); color: #fff; font-size: 17px; font-weight: 700; white-space: nowrap;
  padding: 9px 20px; box-shadow: 0 3px 0 color-mix(in srgb, var(--mc) 65%, #000);
}
.mc-play:hover { filter: brightness(1.08); }
.mc-play:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--mc) 65%, #000); }
.mc-play.outline { background: #fff; color: var(--mc); box-shadow: inset 0 0 0 2px var(--mc), 0 3px 0 color-mix(in srgb, var(--mc) 35%, #fff); }
.mc-list { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.mc-row { border: 2px solid #efe5d3; background: #fff; border-radius: 12px; padding: 6px 10px; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 8px; }
.mc-row:hover { border-color: color-mix(in srgb, var(--mc) 45%, #fff); }
.mc-row.on { border-color: var(--mc); }
.mc-row b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-row small { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-soft); }
.mc-row em { font-style: normal; font-weight: 700; color: #b45309; }
.mc-row .bt-dots { margin-left: 0; }

/* My stats, in brief */
.h-stats { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 1.6fr); gap: 16px 22px; align-items: center; }
.hs-cap { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 0 0 2px 2px; }
.hs-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.fig { background: #fbf6ec; border-radius: 14px; padding: 8px 12px; }
.fig b { display: block; font-size: 24px; line-height: 1.15; }
.fig span { font-size: 13px; font-weight: 600; color: var(--ink-soft); }

/* the song chooser */
.songs-sheet { width: min(720px, 100%); height: auto; max-height: min(640px, 100%); }
.songs-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 24px 16px; }
.songs-sheet .sheet-foot { gap: 10px; }
.songs-sheet .sheet-foot .pill-btn { min-width: 0; }
/* the Rounds / Beat the Clock / Endless window (2026-10-08): what to read, then its own ▶ Play */
.pick-sheet { width: min(860px, 100%); height: auto; max-height: min(760px, 100%); }
.pick-sheet .sheet-head .mc-ico { width: 40px; height: 40px; border-radius: 12px; }
.pick-sheet .sheet-head .mc-ico svg { width: 29px; height: 29px; }
.pick-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 24px 18px; }
.pick-body > .row { margin-bottom: 6px; }
.w-q { margin: 6px 0 8px; font-size: 18px; }
.src-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.src-tabs button { border: 2px solid #e6dac4; background: #fff; border-radius: 16px; padding: 10px 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.src-tabs button b { font-size: 17px; }
.src-tabs button small { font-size: 13px; color: var(--ink-soft); line-height: 1.3; }
.src-tabs button:hover { border-color: color-mix(in srgb, var(--mc) 45%, #fff); }
.src-tabs button.on { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 9%, #fff); box-shadow: 0 0 0 2px var(--mc); }
.src-pane { min-height: 120px; }
.src-pane .ladder { margin-bottom: 4px; }
.src-pane .h-now .h-link { margin-top: 6px; background: #fff; box-shadow: none; padding: 5px 13px; font-size: 14px; }
.w-sets .mc-row { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 12px; }
.w-sets .mc-row b { font-size: 16px; }
.mc-n { font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.w-mel-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pick-sheet .sheet-foot { gap: 10px; }
.pick-sheet .sheet-foot .pill-btn { min-width: 0; }
@media (max-width: 700px) {
  .src-tabs { grid-template-columns: 1fr; gap: 6px; }
  .src-tabs button { padding: 8px 12px; }
  .pick-body { padding: 12px 14px 14px; }
}
.pill-btn[disabled] { opacity: .45; pointer-events: none; }

/* ---- My stats ---- */
.st-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.st-top h2 { margin: 0; font-size: 30px; color: #3e2723; text-shadow: 0 1px 0 rgba(255,236,200,.5); outline: none; }
.st-players { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-players .h-lab { color: #3e2723; }
.st-welcome { padding: 14px 18px; font-size: 16px; line-height: 1.45; }
.st-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.st-tile { padding: 12px 14px 11px; }
.st-tile b { display: block; font-size: 29px; line-height: 1.12; }
.st-tile span { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.st-tile .t-star { color: #d97706; }
.st-wrap > .note { margin: -8px 0 0; padding: 6px 12px; max-width: none; border-radius: 12px; background: rgba(255,253,246,.88); }
.st-wrap > .note.folded { align-self: flex-start; }
.st-section { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 8px; }
.st-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-filter .h-lab { color: #3e2723; }
.st-filter .seg { background: #fffdf6; box-shadow: var(--shadow); }
.st-filter .seg button.on { background: #3e2723; color: #fff; }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: -6px; }
.st-card { padding: 14px 18px 16px; min-width: 0; }
.st-card.wide { grid-column: 1 / -1; }
.st-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.st-card-head h3 { margin: 0 auto 0 0; font-size: 19px; }
.st-card-head .seg { padding: 3px; }
.st-card-head .seg button { padding: 5px 11px; font-size: 14px; }
.st-tbl { border: 2px solid #e6dac4; background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.st-tbl.on { background: #3e2723; border-color: #3e2723; color: #fff; }
.st-sub { margin: 4px 0 10px; font-size: 14px; line-height: 1.4; color: var(--ink-soft); }
.st-sub b { color: var(--ink); }
.up { color: #15803d; font-weight: 700; }
.down { color: #b91c1c; font-weight: 700; }
.st-empty { padding: 26px 14px; text-align: center; font-size: 15px; color: var(--ink-soft); background: #fbf6ec; border-radius: 14px; }
.chart { width: 100%; }
.chart svg { display: block; overflow: visible; }
.ch-tick, .ch-x { font-family: 'Fredoka', ui-rounded, system-ui, sans-serif; font-size: 11.5px; font-weight: 600; fill: #6b5446; font-variant-numeric: tabular-nums; }
.ch-peak { font-family: 'Fredoka', ui-rounded, system-ui, sans-serif; font-size: 13px; font-weight: 700; fill: #2b1d16; }
.ch-in { font-family: 'Fredoka', ui-rounded, system-ui, sans-serif; font-size: 13px; font-weight: 700; }
.ch .mark.hot { filter: brightness(1.18) saturate(1.1); }
.ch circle.mark.hot { r: 6.5px; }
.ch.heat .mark.hot, .ch.heat .cell.today { stroke: #2b1d16; stroke-width: 1.5px; }
.ch.mini .ch-x { font-size: 11px; }
.chart.cal { overflow-x: auto; }
.st-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.st-legend li { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-soft); }
.st-legend li b { color: var(--ink); font-weight: 600; }
.st-legend i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.st-legend i.line { width: 18px; height: 3px; border-radius: 2px; background: #2b1d16; }
.st-legend em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--ink); }
.st-legend.inline { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.st-minis { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.st-minis > div { display: flex; align-items: center; gap: 6px; }
.st-minis b { font-size: 18px; color: var(--ink); }
.mk-i svg { width: 22px; height: 22px; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar, .st-mix li { display: grid; grid-template-columns: 92px minmax(0, 1fr) 66px; align-items: center; gap: 10px; }
.hb-l b { display: block; font-size: 15px; line-height: 1.1; }
.hb-l small { font-size: 12px; color: var(--ink-soft); }
.hb-track { height: 20px; display: flex; gap: 2px; }
.hb-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hb-ok { background: #7c3f0a; }
.hb-rest { background: #e59a3a; }
.hb-v { font-size: 14px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.st-mix { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.st-mix li { grid-template-columns: 104px minmax(0, 1fr) 74px; }
.mx-l { font-size: 14px; white-space: nowrap; color: var(--ink-soft); }
/* note by note: a little xylophone, each bar as tall as its first-try share */
.nb-xylo { display: flex; gap: 8px; height: 230px; background: var(--frame); border-radius: 16px; padding: 12px 14px 8px; box-shadow: inset 0 -4px 0 var(--frame-edge); }
.nb { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.nb-p { min-height: 16px; color: #fff; font-size: 13px; font-weight: 700; }
.nb-col { flex: 1; width: 100%; max-width: 48px; display: flex; align-items: flex-end; background: rgba(255,255,255,.08); border-radius: 7px; }
.nb-col i { display: block; width: 100%; background: var(--c); border-radius: 7px; }
.nb.none .nb-col i { background: #6f6a66; }
.nb.worst .nb-col { box-shadow: 0 0 0 2px #fecaca; }
.nb-l { color: #fff; font-size: 16px; font-weight: 700; line-height: 1; }
.nb-l sub { font-size: 10px; opacity: .7; }
.nb-n { color: rgba(255,255,255,.78); font-size: 11.5px; }
.nb-d { min-height: 15px; font-size: 11.5px; }
.nb-d em { font-style: normal; font-weight: 700; color: rgba(255,255,255,.75); }
.nb-d em.up { color: #86efac; }
.nb-d em.down { color: #fca5a5; }
.nb-tip { margin: 10px 0 0; }
.cal-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }
.cal-key i { width: 13px; height: 13px; border-radius: 3px; }
.cal-key small { margin-left: 10px; }
.st-ladder { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 6px; }
.sl { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.sl b { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; background: #fff; box-shadow: inset 0 0 0 3px var(--bc); }
.sl b.got { background: color-mix(in srgb, var(--bc) 28%, #fff); }
.sl span { font-size: 11px; color: #d97706; white-space: nowrap; }
.sl span .off { color: #e5dccb; }
.st-ses { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.st-records, .st-games { list-style: none; margin: 0; padding: 0; }
.st-records li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid #f1e9da; }
.st-records li:last-child, .st-games li:last-child { border-bottom: 0; }
.ri { font-size: 20px; text-align: center; }
.rn { font-size: 15px; font-weight: 600; min-width: 0; }
.rn small, .gw small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-records li > b, .gr { font-size: 16px; text-align: right; white-space: nowrap; }
.st-games li { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 2px; border-bottom: 1px solid #f1e9da; }
.gd { font-size: 13px; color: var(--ink-soft); }
.gw { min-width: 0; }
.gw b { font-size: 15px; }
.st-table-wrap { max-height: 320px; overflow: auto; border-radius: 12px; border: 1px solid #efe5d3; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; background: #fff; }
.st-table th, .st-table td { padding: 6px 10px; border-bottom: 1px solid #f1e9da; text-align: right; }
.st-table th[scope=row], .st-table thead th:first-child { text-align: left; font-weight: 600; }
.st-table thead th { position: sticky; top: 0; background: #fbf6ec; font-size: 13px; color: var(--ink-soft); }
.st-foot { display: flex; justify-content: center; padding: 4px 0 8px; }
.chart-tip { position: fixed; z-index: 120; pointer-events: none; background: #2b1d16; color: #fff; border-radius: 10px; padding: 6px 11px 7px; box-shadow: 0 6px 18px rgba(0,0,0,.3); display: flex; flex-direction: column; max-width: 260px; }
.chart-tip b { font-size: 15px; line-height: 1.2; }
.chart-tip span { font-size: 12.5px; color: #e7d9c8; }

/* the top bar off the music: room for the name, even on a phone */
@media (max-width: 700px) {
  html:not(.view-play) .brand-name { display: block; font-size: 22px; }
  .app-home { height: 34px; padding: 0 10px 0 6px; font-size: 14px; }
  .home, .statspage { padding: 2px 10px 22px; }
  .h-wrap, .st-wrap { gap: 16px; }
  .h-hero { padding: 20px 16px 16px; gap: 14px; }
  .hello { font-size: 26px; }
  .hero-what { font-size: 15px; align-items: flex-start; }
  .hero-what .band-dot { margin-top: 3px; }
  .big-play { font-size: 21px; padding: 11px 26px 12px; }
  .hero-side { align-items: stretch; width: 100%; }
  .bubs { justify-content: stretch; }
  .bub { flex: 1; min-width: 0; padding: 8px 6px; }
  .bub b { font-size: 22px; }
  .bub svg { width: 20px; height: 20px; }
  .hero-players { justify-content: flex-start; }
  .h-head h2, .st-section h2 { font-size: 21px; }
  .h-card { padding: 12px; }
  .ladder { gap: 8px 12px; }
  .lad-lv { width: 46px; }
  .lad-lv b { width: 38px; height: 38px; font-size: 17px; }
  .mode-grid { --g: 10px; }
  .mode-card { padding: 0 12px 12px; gap: 8px; }
  .mc-top { margin: 0 -12px; padding: 10px 12px; gap: 10px; }
  .mc-top h3 { font-size: 18px; }
  .mc-ico { width: 38px; height: 38px; border-radius: 12px; }
  .mc-ico svg { width: 28px; height: 28px; }
  .mc-about { font-size: 14px; }
  .mc-play { padding: 8px 16px; font-size: 16px; }
  .mc-opt .seg button { padding: 6px 8px; font-size: 14px; }
  .stepper button { width: 34px; }
  .stepper input { width: 44px; }
  .h-stats { grid-template-columns: 1fr; }
  .st-top h2 { font-size: 25px; }
  .st-grid { grid-template-columns: minmax(0, 1fr); }
  .st-card { padding: 12px 12px 14px; }
  .st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .st-tile b { font-size: 24px; }
  .nb-xylo { gap: 3px; padding: 10px 6px 6px; height: 210px; }
  .nb-p { font-size: 10.5px; }
  .nb-l { font-size: 14px; }
  .nb-n, .nb-d { font-size: 10px; }
  .st-ladder { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 10px; }
  .hbar, .st-mix li { grid-template-columns: 78px minmax(0, 1fr) 58px; gap: 8px; }
  .st-mix li { grid-template-columns: 92px minmax(0, 1fr) 62px; }
}
@media (max-width: 480px) {
  html:not(.view-play):not(.in-iframe) .brand { display: flex; }
  html:not(.view-play) .brand-logo { display: none; }
}
/* a smartboard: bigger, for the back of the room */
@media (min-width: 1500px) {
  .h-wrap, .st-wrap { max-width: 1360px; }
  .hello { font-size: 42px; }
  .hero-what { font-size: 20px; }
  .big-play { font-size: 30px; padding: 16px 42px 17px; }
  .bub b { font-size: 34px; }
  .h-head h2, .st-section h2 { font-size: 28px; }
  .lad-lv { width: 62px; }
  .lad-lv b { width: 52px; height: 52px; font-size: 22px; }
  .mc-top h3 { font-size: 24px; }
  .mc-about { font-size: 17px; }
  .mc-play { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .big-play, .lad-lv b { transition: none; }
}

/* ---- the level box's drop-down (drop.js, 2026-10-08): what is playing, and what can be changed about it ---- */
.drop-modal { display: block; background: rgba(43, 29, 22, .28); padding: 0; }
.dd-panel { position: absolute; top: calc(var(--top-h) - 2px); left: 50%; transform: translateX(-50%);
  width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - var(--top-h) - 14px);
  background: var(--paper); border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.dd-caret { position: absolute; top: -9px; left: var(--cx, 50%); width: 18px; height: 18px; margin-left: -9px; background: var(--paper); transform: rotate(45deg); border-radius: 4px 0 0 0; }
.dd-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px 10px 20px; border-bottom: 2px solid #efe5d3; }
.dd-what { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.dd-what b { font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-what span { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.dd-head .close { margin-left: auto; box-shadow: none; background: #f3ede1; flex: none; }
.dd-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 20px 14px; }
.dd-h { margin: 2px 0 10px; font-size: 17px; }
.dd-note { margin: 10px 0 0; }
.dd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dd-sets .mc-row { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 12px; }
.dd-sets .mc-row b { font-size: 16px; }
.dd-panel { --mc: #15803d; }
.dd-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dd-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 12px 20px; border-top: 2px solid #efe5d3; }
.dd-foot .h-link { background: #f3ede1; box-shadow: none; padding: 7px 14px; font-size: 15px; }
.dd-foot .pill-btn { min-width: 0; }
@media (max-width: 700px) {
  .dd-panel { width: calc(100vw - 16px); border-radius: 18px; }
  .dd-body { padding: 10px 12px 12px; }
  .dd-head { padding: 10px 10px 8px 14px; }
  .dd-foot { padding: 8px 10px 10px 14px; }
}
