/* Shared look for every standalone page of Piano Coach (lessons, trainers, plans, policy). The practice app itself uses style.css. */
:root {
  --bg: #0b0f16; --panel: #121821; --panel2: #18202c; --line: #2a3648; --text: #e8eef5; --muted: #98a5b8;
  --accent: #ffd166; --accent-ink: #1a1a1a; --r: #4cc9f0; --l: #f4a261; --ok: #3ddc84; --bad: #ff6b6b; --warn: #ffb347; --purple: #a78bfa;
  --radius: 12px; --gap: 14px; --maxw: 1100px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; display: block; min-height: 100vh; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.25; }
h1 { color: var(--accent); font-size: clamp(22px, 4vw, 30px); margin: 6px 0 4px; }
h2 { font-size: 18px; margin: 0 0 6px; text-transform: none; letter-spacing: 0; color: var(--text); }
h3 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
p { margin: 8px 0; }
ul, ol { padding-left: 20px; }
li { margin: 4px 0; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 6px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid #7aa7ff; outline-offset: 2px; border-radius: 6px; }

/* is practice being saved? */
.save-chip { margin-left: auto; white-space: nowrap; font-size: 12px; text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); max-width: 280px; overflow: hidden; text-overflow: ellipsis; min-height: 32px; display: inline-flex; align-items: center; gap: 4px; }
.save-chip .txt { overflow: hidden; text-overflow: ellipsis; }
.save-chip.ok { color: var(--ok); border-color: #1f5d3a; } .save-chip.no { color: var(--warn); border-color: #6b5a1f; }

/* the bar at the top of every page: Practice, then one menu per group of tools (a Menu sheet on a phone) */
.site-nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 4px; padding: 6px 12px; min-height: 54px; background: rgba(18, 24, 33, .97); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-nav .brand { color: var(--accent); font-weight: 800; text-decoration: none; padding: 6px 10px 6px 4px; white-space: nowrap; }
.site-nav .item.top, .site-nav .gbtn, .site-nav .menu-btn { color: var(--muted); background: none; border: 0; font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; min-height: 40px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.site-nav .item.top:hover, .site-nav .gbtn:hover, .site-nav .gbtn[aria-expanded="true"], .site-nav .menu-btn:hover, .site-nav .menu-btn[aria-expanded="true"] { color: var(--text); background: var(--panel2); }
.site-nav .cur { color: var(--accent) !important; font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 10px 10px 4px 4px !important; }
.site-nav .gbtn span { font-size: 10px; opacity: .7; }
.site-nav .groups { display: flex; gap: 2px; }
.site-nav .grp { position: relative; display: flex; }
.site-nav .drop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: max-content; min-width: 260px; max-width: min(360px, 92vw); display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.site-nav .grp:nth-last-child(-n+2) .drop { left: auto; right: 0; }
.site-nav .drop a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--text); }
.site-nav .drop a b { display: block; font-weight: 700; font-size: 14px; }
.site-nav .drop a span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.site-nav .drop a:hover, .site-nav .drop a:focus-visible { background: var(--panel2); }
.site-nav .drop a[aria-current="page"] { background: #1f2a1c00; box-shadow: inset 3px 0 0 var(--accent); }
.site-nav .drop a[aria-current="page"] b { color: var(--accent); }
.site-nav .here, .site-nav .menu-btn { display: none; }
.site-nav .sheet { display: none; }
@media (max-width: 960px) {
  .site-nav { backdrop-filter: none; background: var(--panel); } /* a backdrop filter would trap the full-screen menu inside the bar */
  .site-nav .groups, .site-nav .item.top { display: none; }
  .site-nav .here { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; font-size: 14px; }
  .site-nav .save-chip { margin-left: 0; padding: 6px 10px; }
  .site-nav .save-chip .txt { display: none; }
  .site-nav .menu-btn { display: inline-flex; color: var(--text); border: 1px solid var(--line); border-radius: 10px; }
  .site-nav .sheet:not([hidden]) { display: grid; position: fixed; left: 0; right: 0; top: 54px; bottom: 0; z-index: 60; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); padding: 14px 16px 48px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 6px 18px; align-content: start; }
  .site-nav .sheet .slab { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 2px 2px; }
  .site-nav .sheet a { display: flex; align-items: center; min-height: 46px; padding: 8px 14px; margin: 6px 0; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; }
  .site-nav .sheet a[aria-current="page"] { border-color: var(--accent); color: var(--accent); }
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 18px 16px 80px; }
.wrap.narrow { max-width: 780px; }
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; }
.card.soft { background: var(--panel2); }
.note { background: #1b2433; border: 1px solid #34425a; border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; font: inherit; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; }
.btn:hover { border-color: #4a5c7a; background: #1d2736; }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 5px 10px; font-size: 13px; min-height: 32px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.btn.primary:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
select, input[type=number], input[type=text], input[type=email], input[type=password], input[type=search], textarea { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; max-width: 100%; min-height: 40px; }
select { cursor: pointer; }
select:hover, input[type=number]:hover, input[type=text]:hover, textarea:hover { border-color: #4a5c7a; }
input[type=file] { font: inherit; color: var(--muted); max-width: 100%; min-height: 40px; }
input[type=file]::file-selector-button { font: inherit; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin-right: 10px; cursor: pointer; min-height: 40px; }
input[type=file]::file-selector-button:hover { border-color: #4a5c7a; }
/* fold-out sections: the whole line is the button */
summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 8px; list-style: none; padding: 4px 0; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '▸'; color: var(--accent); font-size: 13px; transition: transform .15s; flex: none; }
details[open] > summary::before { transform: rotate(90deg); }
summary:hover { color: var(--text); }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
kbd { background: #0b0f16; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 12px; color: var(--muted); }
.pill { display: inline-block; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; white-space: nowrap; }

.table-scroll { overflow-x: auto; margin: 8px -4px; padding: 0 4px; }
table { width: 100%; border-collapse: collapse; margin: 8px 0; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

/* a tab strip used on the tool pages */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.tabs button { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; cursor: pointer; min-height: 40px; }
.tabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }

/* ---- practice tracking: shared pieces (meters, goal ring, calendar, badges, celebrations, piano-roll lanes) ---- */
.meter { display: inline-block; position: relative; width: 120px; max-width: 100%; height: 8px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; vertical-align: middle; }
.meter > i { position: absolute; inset: 0 auto 0 0; background: var(--ok); border-radius: 999px; }
.meter.sm { width: 64px; height: 6px; }
.meter.warn > i { background: var(--warn); } .meter.bad > i { background: var(--bad); }
.meter-row { display: grid; grid-template-columns: 7.5em 1fr 3em; gap: 8px; align-items: center; margin: 6px 0; font-size: 13px; }
.meter-row .meter { width: 100%; }
.meter-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ring { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.ring svg { width: 116px; height: 116px; display: block; }
.ring .ring-bg { fill: none; stroke: var(--panel2); stroke-width: 10; }
.ring .ring-fg { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .5s; }
.ring.met .ring-fg { stroke: var(--ok); }
.ring .ring-n { fill: var(--text); font-size: 26px; font-weight: 800; text-anchor: middle; }
.ring .ring-u { fill: var(--muted); font-size: 10px; text-anchor: middle; }
.ring-cap { font-size: 12px; color: var(--muted); }
.ring.met .ring-cap { color: var(--ok); font-weight: 700; }
.cal { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; max-width: 100%; overflow-x: auto; padding: 2px; justify-content: start; }
.cal-d { width: 14px; height: 14px; border-radius: 3px; border: 1px solid transparent; background: var(--panel2); padding: 0; display: inline-block; cursor: pointer; font: inherit; }
.cal-d.pad { background: none; cursor: default; }
.cal-d.lv1 { background: #2b3f37; } .cal-d.lv2 { background: #2f6b4a; } .cal-d.lv3 { background: #39a065; } .cal-d.lv4 { background: var(--ok); border-color: #b6f5cf; }
.cal-legend { display: flex; gap: 3px; align-items: center; margin-top: 6px; color: var(--muted); }
.cal-legend .cal-d { cursor: default; width: 11px; height: 11px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.4; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--panel2); white-space: nowrap; vertical-align: middle; }
.badge.pb { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.badge.partial { color: var(--warn); border-color: #6b5a1f; background: #2a2412; }
.badge.done { color: var(--ok); border-color: #1f5d3a; background: #11261b; }
.badge.due { color: var(--r); border-color: #1f4d5d; }
.badge.kbd { color: var(--purple); border-color: #4b3f7a; }
.celebrate { position: relative; overflow: hidden; background: linear-gradient(135deg, #2a2412, #14261c); border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; }
.celebrate-card { position: relative; margin: 0 0 10px; }
.celebrate-card b { font-size: 17px; color: var(--accent); }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -10px; left: calc(var(--i) * 7%); width: 7px; height: 11px; border-radius: 2px; background: var(--accent); opacity: .8; animation: pc-fall 2.4s ease-in calc(var(--i) * .08s) 1 forwards; }
.confetti i:nth-child(3n) { background: var(--ok); } .confetti i:nth-child(3n+1) { background: var(--r); }
@keyframes pc-fall { to { transform: translateY(220px) rotate(300deg); opacity: 0; } }
.lane { display: block; width: 100%; max-width: 100%; overflow-x: auto; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.lane canvas { display: block; }

/* the Progress dashboard (progress.html): every rule is scoped to body.progress-page, so class names like .legend, .stats or
   .kv never change other pages */
.progress-page .dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gap); align-items: start; margin-top: 12px; }
.progress-page .dash > .card { margin: 0; min-width: 0; }
.progress-page .dash > .card.full { grid-column: 1 / -1; }
@media (min-width: 700px) { .progress-page .dash > .card.wide { grid-column: span 2; } } /* from where two 300 px columns and the gap fit */
@media (min-width: 961px) { .progress-page .dash { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.progress-page .card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.progress-page .card-head h2 { margin-right: auto; }
.progress-page .today-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin: 8px 0; }
.progress-page .next-btn { font-size: 17px; padding: 14px 20px; min-height: 52px; width: 100%; justify-content: space-between; text-align: left; }
.progress-page .next-why { color: var(--muted); font-size: 13px; }
.progress-page .goal { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.progress-page .goal-form { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.progress-page .goal-form input { width: 6em; }
.progress-page .checklist { list-style: none; padding: 0; margin: 6px 0; }
.progress-page .plan-item { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.progress-page .plan-item:last-child { border-bottom: 0; }
.progress-page .plan-item .check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; flex: 1; min-width: 0; }
.progress-page .plan-item .check input { margin-top: 4px; flex: none; }
.progress-page .plan-item.done b { text-decoration: line-through; text-decoration-color: var(--ok); color: var(--muted); }
.progress-page .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 8px 0; }
.progress-page .stat { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.progress-page .stat b { font-size: 22px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.progress-page .stats.tiles .stat b { font-size: 18px; }
.progress-page .stat b .of { font-size: 13px; color: var(--muted); font-weight: 400; }
.progress-page .stat span { font-size: 12px; color: var(--muted); }
.progress-page .stat small { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.progress-page .stat small.up { color: var(--ok); } .progress-page .stat small.down { color: var(--warn); }
.progress-page .chart { margin: 8px 0; position: relative; overflow: hidden; } /* keeps the screen-reader table (a table ignores width: 1px) from widening the page */
.progress-page .chart svg { width: 100%; height: 170px; display: block; overflow: visible; }
.progress-page .chart .bar { fill: #3a4d6b; } .progress-page .chart .bar.met { fill: var(--ok); }
.progress-page .chart .dot { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
.progress-page .chart line.goal { stroke: var(--accent); stroke-dasharray: 6 5; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.progress-page .chart .future { fill: var(--line); }
.progress-page .chart .ax { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.progress-page .chart .ax.goal-t, .progress-page .chart .ax.yl { text-anchor: end; }
.progress-page .chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.progress-page .chart .ln { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.progress-page .s-overall { --c: var(--accent); } .progress-page .s-note { --c: var(--r); } .progress-page .s-rhythm { --c: var(--l); } .progress-page .s-tempo { --c: var(--purple); }
.progress-page .chart .ln { stroke: var(--c); } .progress-page .chart .pt { fill: var(--c); }
.progress-page .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; color: var(--muted); }
.progress-page .legend .lg-bar::before, .progress-page .legend .lg-met::before, .progress-page .legend .lg-dot::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; background: #3a4d6b; vertical-align: -1px; }
.progress-page .legend .lg-met::before { background: var(--ok); } .progress-page .legend .lg-dot::before { background: var(--accent); border-radius: 50%; }
.progress-page .toggles { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.progress-page .tog { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; min-height: 34px; }
.progress-page .tog::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; opacity: .45; }
.progress-page .tog[aria-pressed="true"] { color: var(--text); border-color: var(--c); }
.progress-page .tog[aria-pressed="true"]::before { opacity: 1; }
.progress-page .spark { width: 80px; height: 24px; display: block; }
.progress-page .spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.progress-page .spark circle { fill: var(--accent); }
.progress-page .trend { font-size: 12px; font-weight: 700; }
.progress-page .trend.t-improving { color: var(--ok); } .progress-page .trend.t-slipping { color: var(--warn); } .progress-page .trend.t-steady { color: var(--muted); }
.progress-page table.songs th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
.progress-page table.songs td { font-size: 13px; white-space: nowrap; }
.progress-page .linkish { background: none; border: 0; padding: 2px 0; color: var(--accent); font: inherit; font-weight: 700; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; min-height: 32px; }
.progress-page .plain { list-style: none; padding: 0; }
.progress-page .plain > li { padding: 4px 0; }
.progress-page .work { padding-left: 20px; }
.progress-page .work > li { margin: 0 0 12px; }
.progress-page .shelf, .progress-page .earned { list-style: none; padding: 0; }
.progress-page .shelf > li { padding: 6px 10px; border: 1px dashed var(--line); border-radius: 10px; margin: 6px 0; }
.progress-page .up { color: var(--ok); } .progress-page .down { color: var(--warn); } .progress-page .same { color: var(--muted); }
.note.warn { border-left-color: var(--warn); }
.progress-page .warn-t { color: var(--warn); } .progress-page .ok-t { color: var(--ok); }
.progress-page .devlist { padding-left: 18px; }
.progress-page .drawer { width: min(720px, 100vw); max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0 0 0 auto; padding: 14px 16px 40px; border: 0; border-left: 1px solid var(--line); background: var(--panel); color: var(--text); overflow-y: auto; overflow-x: hidden; }
.progress-page .drawer::backdrop { background: rgba(0, 0, 0, .55); }
.progress-page .drawer-head { display: flex; align-items: center; gap: 8px; position: sticky; top: -14px; background: var(--panel); padding: 6px 0; z-index: 1; }
.progress-page .drawer-head h2 { margin-right: auto; }
.progress-page .heat { display: flex; flex-wrap: wrap; gap: 3px; margin: 6px 0; }
.progress-page .hb { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; border-radius: 4px; background: var(--panel2); color: var(--muted); border-bottom: 3px solid transparent; }
.progress-page .hb.lv1 { background: #20301f; color: var(--text); } .progress-page .hb.lv2 { background: #4a4420; color: var(--text); } .progress-page .hb.lv3 { background: #6b4320; color: var(--text); } .progress-page .hb.lv4 { background: #7a2626; color: #fff; }
.progress-page .hb.k-pitch, .progress-page .k.k-pitch::before { border-color: var(--bad); } .progress-page .hb.k-rhythm, .progress-page .k.k-rhythm::before { border-color: var(--r); } .progress-page .hb.k-hold, .progress-page .k.k-hold::before { border-color: var(--purple); }
.progress-page .hb.k-balance, .progress-page .k.k-balance::before { border-color: var(--l); } .progress-page .hb.k-mixed, .progress-page .k.k-mixed::before { border-color: var(--muted); }
.progress-page .k::before { content: ''; display: inline-block; width: 12px; height: 0; border-bottom: 3px solid; margin-right: 5px; vertical-align: middle; }
.progress-page .kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
@media (max-width: 640px) {
  .progress-page .today-grid { grid-template-columns: 1fr; }
  .progress-page .goal { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .ring svg { width: 96px; height: 96px; }
  .progress-page .chart svg { height: 140px; }
  .meter-row { grid-template-columns: 6.5em 1fr 3em; }
}
@media (pointer: coarse) { .progress-page .tog, .progress-page .linkish { min-height: 44px; } .progress-page .cal { gap: 4px; } .progress-page .cal-d { width: 18px; height: 18px; } .progress-page .plan-item .check input { width: 22px; height: 22px; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
@media print {
  .progress-page .dash { display: block; }
  .progress-page .dash > .card { break-inside: avoid; margin: 10px 0; }
  .progress-page .celebrate, .progress-page .confetti, .progress-page .drawer, .progress-page #kbd { display: none !important; }
  .progress-page .chart .bar, .progress-page .chart .ln { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 12px 12px 70px; }
  .panel, .card { padding: 10px 12px; }
  .btn.small { min-height: 38px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -12px; margin-right: -12px; padding: 0 12px 4px; scroll-padding: 0 12px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; white-space: nowrap; }
}
@media (pointer: coarse) { .btn, .tabs button, select { min-height: 44px; } } /* finger-sized on touch screens */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media print {
  body { background: #fff; color: #000; }
  .site-nav, .skip, .btn, .tabs { display: none !important; }
  summary::before { display: none; }
  .panel, .card, .note { border-color: #bbb; background: #fff; color: #000; }
  a { color: #000; }
  .muted { color: #444; }
}
