/* PracticeX look (the design system of 2026-11-01: white + grey, one navy, Pretendard). Linked after each page's own <style>, so these values
   win over the page's: only the shared chrome is set here (ground, cards, text, lines, the accent, the font, shapes). The result colours
   (--ok, --bad, --hot, --cold, --sharp, --flat, --high, --low, --ramp and the palettes of web/dsp/palette.js) are never touched: they mean the playing. */
@font-face {
  font-family: "Pretendard PX"; font-weight: 45 920; font-style: normal; font-display: swap;
  src: url("fonts/PretendardSubset.woff2") format("woff2");   /* Latin + the Hangul of the app's pages (SIL OFL, fonts/LICENSE-Pretendard.txt) */
}
:root {
  --bg: #F6F8FB; --card: #FFFFFF; --ink: #121A2B; --muted: #5F6A7E; --line: #E3E8EF; --track: #EEF2F7;
  --accent: #1B2A4A; --accent-ink: #FFFFFF; --soft: #EAF1FE; --link: #2563EB; --primary: #1B2A4A; --primary-ink: #FFFFFF;   /* --primary: the fill of the one main action of a page */
  --shadow: 0 1px 2px rgba(18, 26, 43, .06), 0 10px 28px -16px rgba(18, 26, 43, .22);
  --font-ui: "Pretendard PX", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1424; --card: #162036; --ink: #F2F5FA; --muted: #97A2B7; --line: #28334C; --track: #1A2338;
    --accent: #6EA0F7; --accent-ink: #0E1424;  /* the app's dark accent before the theme: it is also text on dark cards (5:1+); the white text some pages put on filled buttons was already low there: the page redesign fixes it */ --soft: #1C2B4C; --link: #6EA0F7; --primary: #24365E;
    --shadow: none;
  }
  .badge, a.card svg, a.card .tag { color: var(--link); }   /* index.html: accent-coloured text on --soft reads better in the lighter blue */
}
body { font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -0.015em; }
h1 { font-weight: 800; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
/* the way to the settings, drawn as a button (a plain underlined link was missed): index.html with a gear, scales.html / score.html small */
a.setbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; box-sizing: border-box; padding: 8px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: var(--shadow); }
a.setbtn svg { color: var(--link); flex: none; }
a.setbtn.small { min-height: 40px; padding: 6px 14px; font-size: 14px; box-shadow: none; background: var(--soft); vertical-align: middle; margin-top: 4px; }
a.setbtn:hover { border-color: var(--link); }
.trend i:last-child { outline-color: var(--link); }   /* scales.html: the latest take's bar, framed in a colour its navy fill does not share */

/* ---- the practice pages (scales, music, tuner, settings, feedback, privacy, fix) share the start page's look (2026-11-02) ---- */
h1 { font-size: 22px; line-height: 1.25; }
h2 { font-size: 18px; line-height: 1.3; }
.muted { font-size: 14.5px; line-height: 1.5; }
.card, .note { border-radius: 18px; }
main { gap: 14px; }   /* (index.html keeps its own 22 px: main.home) */
#results, #detail { display: grid; gap: 14px; }   /* the result cards were stacked with no gap */
h1.pagehead + .muted { margin-top: 10px; }
.card { padding: 16px 18px; }
/* page header: the title on the left, the way back as a quiet small button on the right (h1.pagehead holds both; tuner has them in a header) */
h1.pagehead, header.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
a.back { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink);
  font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; flex: none; }
a.back:hover { border-color: var(--link); }
/* buttons: quiet by default (card fill, hairline, ink); the one main action of a page gets the navy fill below. Same specificity as the pages' own rules, and later. */
button, button.alt, label.btn, label.btn.alt, label.filebtn, a.btnlink {
  font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; cursor: pointer; }
button.small, button.alt.small, label.btn.small, label.filebtn, a.btnlink { min-height: 40px; padding: 6px 14px; font-size: 14px; }
button:hover:not(:disabled), a.btnlink:hover, label.filebtn:hover { border-color: var(--link); }
button:disabled { opacity: .45; cursor: default; }
button.rec { background: var(--hot); border-color: var(--hot); color: #fff; }   /* recording: the result red, as before */
button.ok { border-color: var(--ok); }   /* fix.html: checked / place, the result green */
button.link { min-height: 0; padding: 8px 4px; border: 0; background: none; color: var(--link); font-size: 14px; display: inline; }
button.link:hover { text-decoration: underline; }
button#rec:not(.rec), #mic:not(.rec), #read, #analyse:not(:disabled), #go:not(.stop), .send, #proSee, #check.alt, #bkMake, button.on {
  background: var(--primary); border: 1px solid var(--primary); color: var(--primary-ink); }
button#rec:not(.rec):hover, #mic:not(.rec):hover, #analyse:not(:disabled):hover, #read:hover, #go:not(.stop):hover, .send:hover, #proSee:hover, #check.alt:hover, #bkMake:hover { border-color: var(--link); }
.send { min-height: 52px; }
/* fields */
select, input[type=text], input[type=file], textarea { border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); min-height: 44px; }
label.field, label { font-size: 14px; }
.filepick { border-radius: 14px; min-height: 44px; }
.filepick b { color: var(--ink); border-color: var(--line); border-radius: 10px; font-weight: 600; }
.panel, details.tips { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0 0; }
summary { min-height: 44px; padding: 10px 0; box-sizing: border-box; }
.bar, .level, .meter { border-radius: 4px; }
/* a list of choices inside a card: rows divided by hairlines, not boxes in boxes (scales.html My scales) */
button.scale { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 12px 2px; margin-top: 0; font-weight: 400; justify-content: flex-start; flex-direction: column; align-items: flex-start; }
button.scale:hover { border-color: var(--line); background: var(--soft); }
.mine.current .what b::after { color: var(--link); }   /* score.html: the open piece */
@media (prefers-color-scheme: dark) {   /* the navy fill is close to the dark card: a thin light edge keeps the main action and a chosen answer clear */
  button#rec:not(.rec), #mic:not(.rec), #read, #analyse:not(:disabled), #go:not(.stop), .send, #proSee, #check.alt, #bkMake, button.on, .chips button[aria-pressed="true"], .big button[aria-pressed="true"] { border-color: color-mix(in srgb, var(--link) 55%, transparent); }
}
/* a warning about the tuning above a result (scales.html): amber, not a result colour */
.card.warn { background: #FFF6E5; border: 1px solid #F2B544; border-left: 5px solid #E89B00; color: #5C3B00; }
.card.warn b { display: block; font-size: 16px; margin-bottom: 4px; color: #4A2F00; }
.card.warn div { font-size: 14.5px; line-height: 1.5; }
@media (prefers-color-scheme: dark) { .card.warn { background: #3A2A0E; border-color: #8A6420; border-left-color: #F2B544; color: #F7DFAE; } .card.warn b { color: #FFE7B8; } }
/* the phone's status bar: in the app the page runs under it (viewport-fit=cover), so text scrolled up showed through the clock; a strip of the page colour covers it */
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 1000; pointer-events: none; }
