/* ipad9: replis Safari 9 (iOS 9.3) ajoutés par ~/bin/ipad9, ne pas relancer sur ce bloc */
@font-face{font-family:'Sora';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/sora-latin-500-normal.woff2) format('woff2'), url(fonts/sora-latin-500-normal.woff) format('woff')}
@font-face{font-family:'Sora';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/sora-latin-600-normal.woff2) format('woff2'), url(fonts/sora-latin-600-normal.woff) format('woff')}
@font-face{font-family:'Sora';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/sora-latin-700-normal.woff2) format('woff2'), url(fonts/sora-latin-700-normal.woff) format('woff')}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/inter-latin-400-normal.woff2) format('woff2'), url(fonts/inter-latin-400-normal.woff) format('woff')}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/inter-latin-500-normal.woff2) format('woff2'), url(fonts/inter-latin-500-normal.woff) format('woff')}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/inter-latin-600-normal.woff2) format('woff2'), url(fonts/inter-latin-600-normal.woff) format('woff')}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'), url(fonts/jetbrains-mono-latin-500-normal.woff) format('woff')}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/jetbrains-mono-latin-700-normal.woff2) format('woff2'), url(fonts/jetbrains-mono-latin-700-normal.woff) format('woff')}
html{-webkit-text-size-adjust:100%}
:root{padding-top:0px;padding-top:env(safe-area-inset-top,0px);padding-bottom:0px;padding-bottom:env(safe-area-inset-bottom,0px)}
body{margin:0}
img{max-width:100%}
[hidden]{display:none!important}
/* Layout: app shell. Desktop = fixed left sidebar (brand, pages, display prefs) + content column; tablet = top bar; phone = top bar + bottom tab bar. The rosewood fretboard is the hero object of every page. */
:root {
  --bg: #F3F4F7;
  --surface: #FFFFFF;
  --surface-2: #F0F2F6;
  --sunken: #E8EBF1;
  --ink: #0F1629;
  --ink-2: #2B3348;
  --muted: #5D6679;
  --line: #E0E4EC;
  --line-2: #CDD3DF;
  --brass: #94680C;
  --brass-fill: #D4A23A;
  --brass-soft: #F6ECD6;
  --brass-ink: #241703;
  --fifth: #0B7480;
  --fourth: #B44A33;
  --side: #0F1629;
  --side-ink: #C9CFDD;
  --side-mute: #7F8AA3;
  --wood: #3B2519;
  --wood-2: #2A1910;
  --fret: #C4C8D0;
  --string: #DCCDA7;
  --ghost: rgba(255,255,255,.5);
  --focus: #2F6BE0;
  --shadow: 0 1px 2px rgba(15,22,41,.05), 0 2px 8px rgba(15,22,41,.04);
  --shadow-lg: 0 12px 32px rgba(15,22,41,.14);
  --r: 14px;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0F1D; --surface: #111A2D; --surface-2: #162036; --sunken: #0D1526; --ink: #E9EDF6; --ink-2: #C3CADB; --muted: #8F9AB3;
    --line: #1F2A44; --line-2: #2C3A5C; --brass: #E2B65A; --brass-fill: #D4A23A; --brass-soft: #2A2416; --brass-ink: #241703;
    --fifth: #3FC3CB; --fourth: #F2846B; --side: #070B16; --side-ink: #C9CFDD; --side-mute: #6F7A93; --focus: #7FA8FF;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0F1D; --surface: #111A2D; --surface-2: #162036; --sunken: #0D1526; --ink: #E9EDF6; --ink-2: #C3CADB; --muted: #8F9AB3;
  --line: #1F2A44; --line-2: #2C3A5C; --brass: #E2B65A; --brass-fill: #D4A23A; --brass-soft: #2A2416; --brass-ink: #241703;
  --fifth: #3FC3CB; --fourth: #F2846B; --side: #070B16; --side-ink: #C9CFDD; --side-mute: #6F7A93; --focus: #7FA8FF;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
body::before { content: ""; position: fixed; top: 0; right: 0; bottom: auto; left: 0; height: 0px; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--side); }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 1.6rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: var(--brass); text-underline-offset: 3px; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Shell ---------- */
.top { position: -webkit-sticky; position: sticky; top: 0px; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--side); color: var(--side-ink);
  padding-left: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: 16px; padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
@supports not (display: grid){
.top-in{flex-direction:row;flex-wrap:wrap;margin-right:-22px;margin-bottom:-10px}
.top-in > :nth-child(n){margin-right:22px;margin-bottom:10px}}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.02rem; color: #fff; letter-spacing: -.01em; }
@supports not (display: grid){
.brand{flex-direction:row;flex-wrap:nowrap}
.brand > :nth-child(n){margin-right:10px}
.brand > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.brand small { display: block; font-family: var(--body); font-weight: 500; font-size: .72rem; color: var(--side-mute); letter-spacing: 0; }
nav.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
@supports not (display: grid){
nav.tabs{flex-direction:row;flex-wrap:wrap;margin-right:-2px;margin-bottom:-2px}
nav.tabs > :nth-child(n){margin-right:2px;margin-bottom:2px}}
nav.tabs a { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--side-ink); padding: 8px 12px; border-radius: 9px; font-weight: 500; font-size: .92rem; }
@supports not (display: grid){
nav.tabs a{flex-direction:row;flex-wrap:nowrap}
nav.tabs a > :nth-child(n){margin-right:9px}
nav.tabs a > :nth-last-child(1):nth-child(n+2){margin-right:0}}
nav.tabs a .ico { color: var(--side-mute); }
nav.tabs a:hover { background: rgba(255,255,255,.06); color: #fff; }
nav.tabs a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
nav.tabs a[aria-current="page"] .ico { color: var(--brass-fill); }
.prefs { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
@supports not (display: grid){
.prefs{flex-direction:row;flex-wrap:wrap;margin-right:-8px;margin-bottom:-8px}
.prefs > :nth-child(n){margin-right:8px;margin-bottom:8px}}
.prefs .seg { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); }
.prefs .seg button { color: var(--side-mute); }
.prefs .seg button[aria-pressed="true"] { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }
.side-label { display: none; }

@media (min-width: 1000px) {
  .top { position: fixed; top: 0; bottom: 0; left: 0; width: 248px; padding: 22px 16px 20px 16px; padding: max(22px, env(safe-area-inset-top, 0px)) 16px 20px max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
  .top-in { flex-direction: column; align-items: stretch; height: 100%; gap: 22px; padding: 0; flex-wrap: nowrap; }
  @supports not (display: grid){
.top-in{flex-direction:column;flex-wrap:nowrap;margin-right:0;margin-bottom:0}
.top-in > :nth-child(n){margin-bottom:22px;margin-right:0}
.top-in > :nth-last-child(1):nth-child(n+2){margin-right:0}
.top-in > :nth-last-child(1){margin-bottom:0}}
  .brand { padding: 0 6px; }
  nav.tabs { flex-direction: column; gap: 2px; }
  @supports not (display: grid){
nav.tabs{flex-direction:column;flex-wrap:nowrap;margin-right:0;margin-bottom:0}
nav.tabs > :nth-child(n){margin-bottom:2px;margin-right:0}
nav.tabs > :nth-last-child(1):nth-child(n+2){margin-right:0}
nav.tabs > :nth-last-child(1){margin-bottom:0}}
  nav.tabs a { padding: 10px 12px; }
  .prefs { margin: auto 0 0; flex-direction: column; gap: 14px; }
  @supports not (display: grid){
.prefs{flex-direction:column;flex-wrap:nowrap;margin-right:0;margin-bottom:0}
.prefs > :nth-child(n){margin-bottom:14px;margin-right:0}
.prefs > :nth-last-child(1):nth-child(n+2){margin-right:0}
.prefs > :nth-last-child(1){margin-bottom:0}}
  .prefs .seg { display: grid; grid-template-columns: 1fr 1fr; }
  @supports not (display: grid){
.prefs .seg{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.prefs .seg > :nth-child(n){margin-right:0;flex:none;width:calc((100%) / 2 - .05px);min-width:0}
.prefs .seg > :nth-child(2n){margin-right:0}
.prefs .seg > :nth-last-child(1){margin-right:0}}
  .side-label { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--side-mute); font-weight: 600; margin: 0 0 6px 4px; }
  main.wrap, .bnav { margin-left: 248px; }
  body::before { display: none; }
}

.wrap { max-width: 1120px; margin: 0 auto; padding-top: 30px; padding-bottom: 64px;
  padding-left: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: 16px; padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; gap: 26px; }

@supports not (display: grid){
.wrap{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.wrap > :nth-child(n){margin-bottom:26px;flex:0 0 auto}
.wrap > :nth-last-child(1){margin-bottom:0}}
@media (min-width: 1000px) { .wrap { padding-left: 40px; padding-right: 40px; padding-right: max(40px, env(safe-area-inset-right, 0px)); max-width: calc(1080px + 248px); } }
.view { display: grid; gap: 20px; min-width: 0; animation: fadein .2s ease-out; }
@supports not (display: grid){
.view{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.view > :nth-child(n){margin-bottom:20px;flex:0 0 auto}
.view > :nth-last-child(1){margin-bottom:0}}
@keyframes fadein { from { opacity: .5; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.intro { display: grid; gap: 6px; max-width: 68ch; padding-bottom: 4px; }
@supports not (display: grid){
.intro{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.intro > :nth-child(n){margin-bottom:6px;flex:0 0 auto}
.intro > :nth-last-child(1){margin-bottom:0}}
.eyebrow { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); font-weight: 700; }
.intro p { color: var(--muted); font-size: 1rem; }

/* ---------- Cards ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 16px; min-width: 0; box-shadow: var(--shadow); }
@supports not (display: grid){
.panel{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.panel > :nth-child(n){margin-bottom:16px;flex:0 0 auto}
.panel > :nth-last-child(1){margin-bottom:0}}
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
@supports not (display: grid){
.panel > header{flex-direction:row;flex-wrap:wrap;margin-right:0;margin-bottom:-10px}
.panel > header > :nth-child(n){margin-right:14px;margin-bottom:10px}
.panel > header > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.hint { color: var(--muted); font-size: .88rem; }
.label { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cols { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@supports not (display: grid){
.cols{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.cols > :nth-child(n){margin-bottom:20px;flex:0 0 auto}
.cols > :nth-last-child(1){margin-bottom:0}}
@media (min-width: 900px) { .cols.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } @supports not (display: grid){
.cols.two{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;justify-content:flex-start}
.cols.two > :nth-child(n){margin-bottom:0;margin-right:20px;flex:none;width:calc((100% - 1 * 20px) / 2 - .05px);min-width:0}
.cols.two > :nth-child(2n){margin-right:0}
.cols.two > :nth-last-child(1){margin-right:0}
.cols.two > :nth-child(n+3){margin-top:20px}} .cols.side { grid-template-columns: 300px minmax(0, 1fr); } @supports not (display: grid){
.cols.side{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;justify-content:flex-start}
.cols.side > :nth-child(n){margin-bottom:0;margin-right:20px;flex:none;min-width:0}
.cols.side > :nth-child(2n){margin-right:0}
.cols.side > :nth-last-child(1){margin-right:0}
.cols.side > :nth-child(n+3){margin-top:20px}
.cols.side > :nth-child(2n+1){width:300px}
.cols.side > :nth-child(2n+2){width:calc((100% - 300px - 1 * 20px) * 1 - .05px)}} }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-2); transition: background .15s, border-color .15s; }
@supports not (display: grid){
.btn{flex-direction:row;flex-wrap:nowrap}
.btn > :nth-child(n){margin-right:6px}
.btn > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn.primary { background: var(--brass-fill); border-color: transparent; color: var(--brass-ink); box-shadow: 0 1px 0 rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.primary:hover { background: #DCAE4A; }
.btn.small { height: 30px; padding: 0 10px; font-size: .82rem; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn[disabled] { opacity: .55; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--sunken); gap: 2px; flex-wrap: wrap; }
@supports not (display: grid){
.seg{flex-direction:row;flex-wrap:wrap;margin-right:0;margin-bottom:-2px}
.seg > :nth-child(n){margin-right:2px;margin-bottom:2px}
.seg > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: .84rem; transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15,22,41,.12), 0 0 0 1px var(--line); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@supports not (display: grid){
.row{flex-direction:row;flex-wrap:wrap;margin-right:-10px;margin-bottom:-10px}
.row > :nth-child(n){margin-right:10px;margin-bottom:10px}}
label.row { gap: 6px; }
@supports not (display: grid){
label.row{margin-right:-6px;margin-bottom:-6px;flex-direction:row;flex-wrap:nowrap}
label.row > :nth-child(n){margin-right:6px;margin-bottom:6px}
label.row > :nth-last-child(1):nth-child(n+2){margin-right:6px}}
input[type="text"], input[type="url"], input[type="password"], select, textarea { background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 0 12px; height: 38px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
textarea { width: 100%; height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; font-family: var(--mono); font-size: .84rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass-fill); box-shadow: 0 0 0 3px var(--brass-soft); }
input[type="checkbox"], input[type="range"] { accent-color: var(--brass-fill); }

/* ---------- Note picker ---------- */
.notes12 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
@supports not (display: grid){
.notes12{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.notes12 > :nth-child(n){margin-right:6px;flex:none;width:calc((100% - 5 * 6px) / 6 - .05px);min-width:0}
.notes12 > :nth-child(6n){margin-right:0}
.notes12 > :nth-last-child(1){margin-right:0}
.notes12 > :nth-child(n+7){margin-top:6px}}
@media (min-width: 620px) { .notes12 { grid-template-columns: repeat(12, minmax(0, 1fr)); } @supports not (display: grid){
.notes12{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.notes12 > :nth-child(n){margin-right:6px;flex:none;width:calc((100% - 11 * 6px) / 12 - .05px);min-width:0}
.notes12 > :nth-last-child(1):nth-child(n+2){margin-right:0}
.notes12 > :nth-child(6n){margin-right:6px}
.notes12 > :nth-child(n+7){margin-top:0}
.notes12 > :nth-child(12n){margin-right:0}
.notes12 > :nth-last-child(1){margin-right:0}
.notes12 > :nth-child(n+13){margin-top:6px}} }
.notes12 button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 2px; cursor: pointer; display: grid; line-height: 1.15; gap: 2px; transition: border-color .15s, transform .1s; }
@supports not (display: grid){
.notes12 button{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.notes12 button > :nth-child(n){margin-bottom:2px;flex:0 0 auto}
.notes12 button > :nth-last-child(1){margin-bottom:0}
.notes12 button > span{display:block}
.notes12 button > b{display:block}
.notes12 button > small{display:block}
.notes12 button > i{display:block}
.notes12 button > em{display:block}
.notes12 button > strong{display:block}}
.notes12 button:hover { border-color: var(--line-2); }
.notes12 button:active { transform: scale(.97); }
.notes12 button b { font-family: var(--display); font-size: 1rem; }
.notes12 button small { color: var(--muted); font-size: .7rem; }
.notes12 button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.notes12 button[aria-pressed="true"] small { color: var(--brass-fill); }

/* ---------- Fretboard ---------- */
.fb-wrap { overflow-x: auto; border-radius: 12px; -webkit-overflow-scrolling: touch; box-shadow: 0 6px 18px rgba(20,10,4,.18); }
.fb { --cols: 12; display: grid; grid-template-columns: 30px 46px repeat(var(--cols), minmax(46px, 1fr)); min-width: calc(76px + var(--cols) * 46px);
  background:
    repeating-linear-gradient(91deg, rgba(255,255,255,.018) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, var(--wood) 0%, var(--wood-2) 100%);
  border-radius: 12px; padding: 8px 0 0; }
.fb.mini { grid-template-columns: 26px 38px repeat(var(--cols), minmax(38px, 1fr)); min-width: calc(64px + var(--cols) * 38px); }
.fb-sn { display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: .76rem; color: rgba(220,205,167,.85); }
@supports not (display: grid){
.fb-sn{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center}
.fb-sn > :nth-child(n){margin-bottom:0;flex:0 0 auto}
.fb-sn > :nth-last-child(1){margin-bottom:0}}
.fb-c { position: relative; height: 42px; border: 0; padding: 0; margin: 0; cursor: pointer;
  background: linear-gradient(180deg, transparent calc(50% - var(--t)), var(--string) calc(50% - var(--t)), #F3E9CF 50%, var(--string) calc(50% + var(--t)), transparent calc(50% + var(--t)));
  box-shadow: inset -2px 0 0 #9DA2AB, inset -3px 0 0 #E6E8EC; display: grid; place-items: center; transition: background-color .12s; }
@supports not (display: grid){
.fb-c{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center}
.fb-c > :nth-child(n){margin-bottom:0;flex:0 0 auto}
.fb-c > :nth-last-child(1){margin-bottom:0}}
.fb.mini .fb-c { height: 34px; }
.fb-c.nut { box-shadow: inset -7px 0 0 #EDE6D3, inset -8px 0 0 #B8AE95; background-color: rgba(0,0,0,.16); }
.fb-c:hover { background-color: rgba(255,255,255,.06); }
.fb-c.s0 { --t: 1.9px; } .fb-c.s1 { --t: 1.5px; } .fb-c.s2 { --t: 1.15px; } .fb-c.s3 { --t: .85px; }
.fb-c.inl::after { content: ""; position: absolute; left: calc(50% - 6px); bottom: -6px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FBF7EC, #CFC6B0); opacity: .55; z-index: 0; pointer-events: none; }
.mk { position: relative; z-index: 1; min-width: 30px; height: 28px; padding: 0 6px; border-radius: 14px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: .76rem; line-height: 1; }
@supports not (display: grid){
.mk{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center}
.mk > :nth-child(n){margin-bottom:0;flex:0 0 auto}
.mk > :nth-last-child(1){margin-bottom:0}}
.fb.mini .mk { min-width: 26px; height: 24px; font-size: .7rem; }
.mk.root { background: linear-gradient(180deg, #E6B850, #C8962D); color: var(--brass-ink); box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.35); }
.mk.fifth { background: linear-gradient(180deg, #4FD0D7, #2BA9B1); color: #05272A; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.mk.oct { background: rgba(20,10,4,.55); color: #F4D58A; box-shadow: inset 0 0 0 2px #E2B65A; }
.mk.fourth { background: linear-gradient(180deg, #F59A84, #E06D52); color: #2B0E07; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.mk.scale { background: #EFE8D6; color: #2A1910; box-shadow: 0 2px 5px rgba(0,0,0,.3); }
.mk.ghost { color: var(--ghost); font-weight: 500; min-width: 0; }
.mk.bad { background: #F2846B; color: #2B0E07; }
.fb-num { height: 24px; display: grid; place-items: center; font-family: var(--mono); font-size: .68rem; color: rgba(233,226,207,.55); font-variant-numeric: tabular-nums; }
@supports not (display: grid){
.fb-num{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center}
.fb-num > :nth-child(n){margin-bottom:0;flex:0 0 auto}
.fb-num > :nth-last-child(1){margin-bottom:0}}
.legend { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
@supports not (display: grid){
.legend{flex-direction:row;flex-wrap:wrap;margin-right:-16px;margin-bottom:-8px}
.legend > :nth-child(n){margin-right:16px;margin-bottom:8px}}
.legend span { display: inline-flex; align-items: center; gap: 7px; }
@supports not (display: grid){
.legend span{flex-direction:row;flex-wrap:nowrap}
.legend span > :nth-child(n){margin-right:7px}
.legend span > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.root { background: #D4A23A; } .dot.fifth { background: #3FC3CB; } .dot.oct { box-shadow: inset 0 0 0 2px #D4A23A; } .dot.fourth { background: #F2846B; } .dot.scale { background: #EFE8D6; box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- Facts ---------- */
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
@supports not (display: grid){
.facts{display:flex;flex-direction:row;flex-wrap:wrap;margin-right:-12px;margin-bottom:-12px}
.facts > :nth-child(n){flex:1 1 210px;min-width:0;margin-right:12px;margin-bottom:12px}}
.fact { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; background: var(--surface-2); position: relative; }
@supports not (display: grid){
.fact{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.fact > :nth-child(n){margin-bottom:4px;flex:0 0 auto}
.fact > :nth-last-child(1){margin-bottom:0}}
.fact .big { font-family: var(--display); font-size: 1.7rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.fact .pos { font-family: var(--mono); font-size: .86rem; color: var(--ink-2); }
.fact.root, .fact.fifth, .fact.oct, .fact.fourth { padding-left: 20px; }
.fact.root::before, .fact.fifth::before, .fact.oct::before, .fact.fourth::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 3px 3px 0; }
.fact.root::before { background: #D4A23A; } .fact.fifth::before { background: #3FC3CB; } .fact.oct::before { background: #E2B65A; opacity: .6; } .fact.fourth::before { background: #F2846B; }

/* ---------- Song chips ---------- */
.chip { display: inline-grid; gap: 2px; justify-items: center; min-width: 62px; padding: 8px 10px 7px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); cursor: pointer; box-shadow: 0 1px 0 var(--line); transition: border-color .15s, transform .1s; }
@supports not (display: grid){
.chip{display:inline-flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:flex-start}
.chip > :nth-child(n){margin-bottom:2px;flex:0 0 auto}
.chip > :nth-last-child(1){margin-bottom:0}
.chip > span{display:block}
.chip > b{display:block}
.chip > small{display:block}
.chip > i{display:block}
.chip > em{display:block}
.chip > strong{display:block}}
.chip:hover { border-color: var(--brass-fill); }
.chip:active { transform: translateY(1px); }
.chip .n { font-family: var(--display); font-weight: 700; font-size: 1.18rem; line-height: 1.1; letter-spacing: -.01em; }
.chip .alt { font-size: .68rem; color: var(--muted); }
.chip .p { font-family: var(--mono); font-size: .72rem; color: var(--brass); font-weight: 700; }
.chip .sym { font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.chip .deg { font-family: var(--mono); font-size: .66rem; background: var(--brass-soft); color: var(--brass); border-radius: 5px; padding: 1px 6px; font-weight: 700; }
.chip .more { font-family: var(--mono); font-size: .64rem; color: var(--muted); white-space: nowrap; }
.chip .more b { color: var(--fifth); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@supports not (display: grid){
.chips{flex-direction:row;flex-wrap:wrap;margin-right:-8px;margin-bottom:-8px}
.chips > :nth-child(n){margin-right:8px;margin-bottom:8px}}
.arrow { color: var(--muted); font-family: var(--mono); font-size: .66rem; display: grid; justify-items: center; line-height: 1.2; }
@supports not (display: grid){
.arrow{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:flex-start}
.arrow > :nth-child(n){margin-bottom:0;flex:0 0 auto}
.arrow > :nth-last-child(1){margin-bottom:0}}
.sec { display: grid; gap: 10px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
@supports not (display: grid){
.sec{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.sec > :nth-child(n){margin-bottom:10px;flex:0 0 auto}
.sec > :nth-last-child(1){margin-bottom:0}}
.sec:first-of-type { border-top: 0; padding-top: 0; }
.sec h3 { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); font-family: var(--body); font-weight: 700; }
.sec-lines { display: grid; gap: 8px; }
@supports not (display: grid){
.sec-lines{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.sec-lines > :nth-child(n){margin-bottom:8px;flex:0 0 auto}
.sec-lines > :nth-last-child(1){margin-bottom:0}}
.sec-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
@supports not (display: grid){
.sec-line{flex-direction:row;flex-wrap:wrap;margin-right:-6px;margin-bottom:-6px}
.sec-line > :nth-child(n){margin-right:6px;margin-bottom:6px}}
.sec-line .ln { font-family: var(--mono); font-size: .66rem; color: var(--muted); width: 18px; text-align: right; flex: none; opacity: .7; }

/* ---------- Library ---------- */
.lib { display: grid; gap: 16px; align-content: start; }
@supports not (display: grid){
.lib{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.lib > :nth-child(n){margin-bottom:16px;flex:0 0 auto}
.lib > :nth-last-child(1){margin-bottom:0}}
.list-block { display: grid; gap: 2px; }
@supports not (display: grid){
.list-block{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.list-block > :nth-child(n){margin-bottom:2px;flex:0 0 auto}
.list-block > :nth-last-child(1){margin-bottom:0}}
.list-block + .list-block { padding-top: 12px; border-top: 1px solid var(--line); }
.list-block header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 4px; }
@supports not (display: grid){
.list-block header{flex-direction:row;flex-wrap:nowrap}
.list-block header > :nth-child(n){margin-right:8px}
.list-block header > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.song-btn { text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; width: 100%; font-weight: 500; color: var(--ink-2); }
@supports not (display: grid){
.song-btn{flex-direction:row;flex-wrap:nowrap}
.song-btn > :nth-child(n){margin-right:8px}
.song-btn > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.song-btn:hover { background: var(--surface-2); }
.song-btn[aria-current="true"] { background: var(--brass-soft); color: var(--ink); }
.song-btn .k { font-family: var(--mono); font-size: .74rem; color: var(--muted); flex: none; background: var(--sunken); border-radius: 5px; padding: 1px 6px; align-self: center; }
.song-btn[aria-current="true"] .k { background: var(--surface); color: var(--brass); }
.status { font-size: .86rem; border-radius: 9px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); }
.status.err { border-color: var(--line); border-color: color-mix(in srgb, var(--fourth) 45%, var(--line)); background: var(--surface); background: color-mix(in srgb, var(--fourth) 8%, var(--surface)); }
.status.ok { border-color: var(--line); border-color: color-mix(in srgb, var(--fifth) 45%, var(--line)); background: var(--surface); background: color-mix(in srgb, var(--fifth) 8%, var(--surface)); }
details.more-in summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: .88rem; }
details.more-in[open] summary { margin-bottom: 10px; }
details.panel > summary { cursor: pointer; font-family: var(--display); font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: "+"; color: var(--muted); font-family: var(--mono); font-size: 1.1rem; }
details.panel[open] > summary::after { content: "−"; }
.confirm { display: flex; gap: 6px; align-items: center; font-size: .84rem; flex-wrap: wrap; }
@supports not (display: grid){
.confirm{flex-direction:row;flex-wrap:wrap;margin-right:-6px;margin-bottom:-6px}
.confirm > :nth-child(n){margin-right:6px;margin-bottom:6px}}
.privacy { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--muted); }
@supports not (display: grid){
.privacy{flex-direction:row;flex-wrap:nowrap}
.privacy > :nth-child(n){margin-right:8px}
.privacy > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.privacy svg { flex: none; margin-top: 2px; color: var(--fifth); }
.progress { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brass-fill); transition: width .3s ease; }
.empty { color: var(--muted); padding: 28px 18px; text-align: center; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface); }

/* ---------- Practice ---------- */
.practice { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 20; background: var(--bg); display: grid; grid-template-rows: auto 1fr auto; 
  padding-top: 16px; 
  padding-top: max(16px, env(safe-area-inset-top, 0px)); padding-bottom: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  padding-left: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: 16px; padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 16px; }
@supports not (display: grid){
.practice{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.practice > :nth-child(n){margin-bottom:16px;flex:0 0 auto}
.practice > :nth-last-child(1){margin-bottom:0}
.practice > :nth-child(2){flex:1 1 0;min-height:0}}
.practice .stage { display: grid; place-items: center; align-content: center; gap: 16px; text-align: center; min-width: 0; }
@supports not (display: grid){
.practice .stage{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center}
.practice .stage > :nth-child(n){margin-bottom:16px;flex:0 0 auto}
.practice .stage > :nth-last-child(1){margin-bottom:0}}
.practice .now { font-family: var(--display); font-weight: 700; font-size: 9.5rem; font-size: clamp(4.5rem, 18vw, 9.5rem); line-height: 1; letter-spacing: -.04em; }
.practice .nowpos { font-family: var(--mono); font-size: 1.1rem; color: var(--brass); font-weight: 700; }
.practice .next { color: var(--muted); }
.practice .bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
@supports not (display: grid){
.practice .bar{flex-direction:row;flex-wrap:wrap;margin-right:0;margin-bottom:-10px}
.practice .bar > :nth-child(n){margin-right:10px;margin-bottom:10px}
.practice .bar > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.beats { display: flex; gap: 8px; justify-content: center; }
@supports not (display: grid){
.beats{flex-direction:row;flex-wrap:nowrap}
.beats > :nth-child(n){margin-right:8px}
.beats > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.beats i { width: 14px; height: 14px; border-radius: 50%; background: var(--sunken); border: 1px solid var(--line-2); display: block; transition: background .08s; }
.beats i.on { background: var(--brass-fill); border-color: var(--brass-fill); }
.practice .fb-wrap { width: 100%; max-width: 640px; }

/* ---------- Tools ---------- */
.tuner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@supports not (display: grid){
.tuner{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.tuner > :nth-child(n){margin-right:10px;flex:none;width:calc((100% - 3 * 10px) / 4 - .05px);min-width:0}
.tuner > :nth-child(4n){margin-right:0}
.tuner > :nth-last-child(1){margin-right:0}
.tuner > :nth-child(n+5){margin-top:10px}}
.tuner button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 16px 4px; cursor: pointer; display: grid; gap: 2px; transition: border-color .15s; }
@supports not (display: grid){
.tuner button{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.tuner button > :nth-child(n){margin-bottom:2px;flex:0 0 auto}
.tuner button > :nth-last-child(1){margin-bottom:0}
.tuner button > span{display:block}
.tuner button > b{display:block}
.tuner button > small{display:block}
.tuner button > i{display:block}
.tuner button > em{display:block}
.tuner button > strong{display:block}}
.tuner button:hover { border-color: var(--line-2); }
.tuner button b { font-family: var(--display); font-size: 1.8rem; letter-spacing: -.02em; }
.tuner button small { color: var(--muted); font-size: .74rem; }
.tuner button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tuner button[aria-pressed="true"] small { color: var(--brass-fill); }
.metro-bpm { font-family: var(--display); font-size: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.03em; }
.quiz-q { font-family: var(--display); font-size: 1.1rem; font-weight: 600; }
.answers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@supports not (display: grid){
.answers{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.answers > :nth-child(n){margin-right:8px;flex:none;width:calc((100% - 3 * 8px) / 4 - .05px);min-width:0}
.answers > :nth-child(4n){margin-right:0}
.answers > :nth-last-child(1){margin-right:0}
.answers > :nth-child(n+5){margin-top:8px}}
.answers button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; height: 46px; cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.answers button:hover { border-color: var(--brass-fill); }
.answers button.good { background: #3FC3CB; color: #05272A; border-color: #3FC3CB; }
.answers button.wrong { background: #F2846B; color: #2B0E07; border-color: #F2846B; }
.score { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); background: var(--sunken); border-radius: 6px; padding: 2px 8px; font-size: .84rem; }
.amp { background: linear-gradient(180deg, #DCDEE2, #B6BAC1); border-radius: 12px; padding: 14px 12px 10px; color: #1B1D22; display: grid; gap: 6px; overflow-x: auto; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 6px rgba(0,0,0,.12); }
@supports not (display: grid){
.amp{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.amp > :nth-child(n){margin-bottom:6px;flex:0 0 auto}
.amp > :nth-last-child(1){margin-bottom:0}}
.amp-row { display: flex; gap: 6px; justify-content: space-between; min-width: 380px; }
@supports not (display: grid){
.amp-row{flex-direction:row;flex-wrap:nowrap}
.amp-row > :nth-child(n){margin-right:6px}
.amp-row > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.knob { display: grid; justify-items: center; gap: 4px; flex: 1; }
@supports not (display: grid){
.knob{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:flex-start}
.knob > :nth-child(n){margin-bottom:4px;flex:0 0 auto}
.knob > :nth-last-child(1){margin-bottom:0}}
.knob span { font-size: .64rem; letter-spacing: .08em; font-weight: 700; text-align: center; }
.knob em { font-style: normal; font-family: var(--mono); font-size: .72rem; }
.amp-name { font-family: var(--display); font-weight: 700; font-size: .85rem; text-align: right; min-width: 380px; font-style: italic; }
.basskn { background: linear-gradient(180deg, var(--wood), var(--wood-2)); border-radius: 12px; padding: 14px; color: #F4D58A; display: flex; gap: 10px; justify-content: space-around; }
@supports not (display: grid){
.basskn{flex-direction:row;flex-wrap:nowrap}
.basskn > :nth-child(n){margin-right:10px}
.basskn > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.basskn .knob span { color: #EDE6D3; text-transform: none; letter-spacing: 0; font-weight: 600; }
ul.tips { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: .9rem; }
@supports not (display: grid){
ul.tips{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
ul.tips > :nth-child(n){margin-bottom:6px;flex:0 0 auto}
ul.tips > :nth-last-child(1){margin-bottom:0}}
ul.tips b { color: var(--ink); font-weight: 600; }
.deg-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.deg-table th, .deg-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.deg-table th { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.deg-table tbody tr:hover { background: var(--surface-2); }
.deg-table td.d { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--brass); }
.deg-table td.n { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.deg-table td.c { font-family: var(--mono); }
.deg-table td.p { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }

/* ---------- Théorie ---------- */
.th-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 14px 20px; }
@supports not (display: grid){
.th-bar{flex-direction:row;flex-wrap:wrap;margin-right:-16px;margin-bottom:-10px}
.th-bar > :nth-child(n){margin-right:16px;margin-bottom:10px}}
.th h3 { display: flex; align-items: center; gap: 10px; }
@supports not (display: grid){
.th h3{flex-direction:row;flex-wrap:nowrap}
.th h3 > :nth-child(n){margin-right:10px}
.th h3 > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.th-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brass-soft); color: var(--brass); font-size: .8rem; font-weight: 700; flex: none; }
@supports not (display: grid){
.th-n{display:inline-flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center}
.th-n > :nth-child(n){margin-bottom:0;flex:0 0 auto}
.th-n > :nth-last-child(1){margin-bottom:0}}
.th-text { display: grid; gap: 10px; max-width: 78ch; color: var(--ink-2); }
@supports not (display: grid){
.th-text{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.th-text > :nth-child(n){margin-bottom:10px;flex:0 0 auto}
.th-text > :nth-last-child(1){margin-bottom:0}}
.th-text b { color: var(--ink); font-weight: 600; }
.th-formula { display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--mono); }
@supports not (display: grid){
.th-formula{flex-direction:row;flex-wrap:wrap;margin-right:-8px;margin-bottom:-8px}
.th-formula > :nth-child(n){margin-right:8px;margin-bottom:8px}}
.th-formula b, .th-formula i { display: inline-grid; place-items: center; min-width: 40px; height: 32px; border-radius: 8px; font-style: normal; font-weight: 700; }
@supports not (display: grid){
.th-formula b{display:inline-flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center}
.th-formula b > :nth-child(n){margin-bottom:0;flex:0 0 auto}
.th-formula b > :nth-last-child(1){margin-bottom:0}}
@supports not (display: grid){
.th-formula i{display:inline-flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center}
.th-formula i > :nth-child(n){margin-bottom:0;flex:0 0 auto}
.th-formula i > :nth-last-child(1){margin-bottom:0}}
.th-formula b { background: var(--brass-soft); color: var(--brass); }
.th-formula i { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-2); }
.th-block { display: grid; gap: 10px; min-width: 0; align-content: start; }
@supports not (display: grid){
.th-block{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.th-block > :nth-child(n){margin-bottom:10px;flex:0 0 auto}
.th-block > :nth-last-child(1){margin-bottom:0}}
.th-sub { justify-content: space-between; }
.th-pats { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@supports not (display: grid){
.th-pats{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.th-pats > :nth-child(n){margin-bottom:24px;flex:0 0 auto}
.th-pats > :nth-last-child(1){margin-bottom:0}}
@media (min-width: 1250px) { .th-pats { grid-template-columns: repeat(2, minmax(0, 1fr)); } @supports not (display: grid){
.th-pats{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.th-pats > :nth-child(n){margin-bottom:0;margin-right:24px;flex:none;width:calc((100% - 1 * 24px) / 2 - .05px);min-width:0}
.th-pats > :nth-child(2n){margin-right:0}
.th-pats > :nth-last-child(1){margin-right:0}
.th-pats > :nth-child(n+3){margin-top:24px}} }
.th-table td { font-size: .9rem; }
.th-table th:first-child, .th-table td:first-child, .th-table td.p, .th-table td.t { text-align: left; }
.th-table td.t { color: var(--muted); }
.th-table td.t b { color: var(--ink); }
ol.th-order { margin: 0; padding: 0; list-style: none; counter-reset: th; display: grid; gap: 8px; }
@supports not (display: grid){
ol.th-order{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
ol.th-order > :nth-child(n){margin-bottom:8px;flex:0 0 auto}
ol.th-order > :nth-last-child(1){margin-bottom:0}}
ol.th-order li { counter-increment: th; display: grid; grid-template-columns: 24px 26px minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: .92rem; }
@supports not (display: grid){
ol.th-order li{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:baseline;justify-content:flex-start}
ol.th-order li > :nth-child(n){margin-right:12px;min-width:0}
ol.th-order li > :nth-child(4n){margin-right:0}
ol.th-order li > :nth-last-child(1){margin-right:0}
ol.th-order li > :nth-child(4n+1){flex:0 0 24px;width:24px}
ol.th-order li > :nth-child(4n+2){flex:0 0 26px;width:26px}
ol.th-order li > :nth-child(4n+3){flex:1 1 0;min-width:0;width:auto}
ol.th-order li > :nth-child(4n+4){flex:0 0 auto;width:auto}}
ol.th-order li::before { content: counter(th); font-family: var(--display); font-weight: 700; color: var(--brass); }
ol.th-order li b { color: var(--ink); font-weight: 600; }
ol.th-order li span { font-size: .75rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 620px) { ol.th-order li { grid-template-columns: 22px 22px minmax(0, 1fr); } @supports not (display: grid){
ol.th-order li{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;justify-content:flex-start}
ol.th-order li > :nth-child(n){margin-right:12px;flex:none;min-width:0}
ol.th-order li > :nth-last-child(1):nth-child(n+2){margin-right:0}
ol.th-order li > :nth-child(4n){margin-right:12px}
ol.th-order li > :nth-child(4n+1){flex:none;width:auto}
ol.th-order li > :nth-child(4n+2){flex:none;width:auto}
ol.th-order li > :nth-child(4n+3){flex:none;min-width:0;width:auto}
ol.th-order li > :nth-child(4n+4){flex:none;width:auto}
ol.th-order li > :nth-child(3n){margin-right:0}
ol.th-order li > :nth-last-child(1){margin-right:0}
ol.th-order li > :nth-child(n+4){margin-top:4px}
ol.th-order li > :nth-child(3n+1){width:22px}
ol.th-order li > :nth-child(3n+2){width:22px}
ol.th-order li > :nth-child(3n+3){width:calc((100% - 22px - 22px - 2 * 12px) * 1 - .05px)}} ol.th-order li span { grid-column: 3; } }
.fb-c.hit { background-color: rgba(255,255,255,.16); }
.fb-c.hit .mk { transform: scale(1.18); }
.mk { transition: transform .08s ease; }
.btn[data-thplay][aria-pressed="true"] { background: var(--brass-fill); border-color: transparent; color: var(--brass-ink); }
/* ---------- Mobile nav, toast, footer ---------- */
.bnav { display: none; }
@media (max-width: 719px) {
  nav.tabs { display: none; }
  .prefs { margin-left: 0; width: 100%; }
  .bnav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(15,22,41,.06);
    padding-bottom: 0px;
    padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: 8px; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: 8px; padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  @supports not (display: grid){
.bnav{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.bnav > :nth-child(n){margin-right:0;flex:none;width:calc((100%) / 6 - .05px);min-width:0}
.bnav > :nth-child(6n){margin-right:0}
.bnav > :nth-last-child(1){margin-right:0}}
  .bnav a { display: grid; justify-items: center; gap: 3px; padding: 9px 0 8px; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 600; }
  @supports not (display: grid){
.bnav a{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:flex-start}
.bnav a > :nth-child(n){margin-bottom:3px;flex:0 0 auto}
.bnav a > :nth-last-child(1){margin-bottom:0}}
  .bnav a .ico { width: 22px; height: 22px; }
  .bnav a[aria-current="page"] { color: var(--ink); }
  .bnav a[aria-current="page"] .ico { color: var(--brass); }
  .wrap { padding-bottom: calc(92px + 0px); padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); padding-top: 22px; }
  h2 { font-size: 1.4rem; }
  .panel { padding: 16px; }
}
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + 0px); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: 10px; font-weight: 500; font-size: .9rem; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
@media (min-width: 1000px) { .toast { left: calc(50% + 124px); } }

/* Phone app shell: the page itself does not scroll, only main.wrap does, so the
   bottom bar is a normal flex item and cannot drift when Safari's toolbar moves. */
@media (max-width: 719px) {
  :root { padding-top: 0; padding-bottom: 0; height: 100%; overflow: hidden; }
  body { position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; display: flex; flex-direction: column; padding-top: 0px; padding-top: env(safe-area-inset-top, 0px); }
  .top { position: relative; top: auto; flex: none; }
  main.wrap { flex: 1 1 auto; min-height: 0; width: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding-bottom: 28px; }
  .bnav { position: relative; left: auto; right: auto; bottom: auto; flex: none; }
}
@media (max-width: 719px) { .toast { bottom: calc(86px + 0px); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
.foot { color: var(--muted); font-size: .8rem; display: flex; gap: 6px 16px; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; }
@supports not (display: grid){
.foot{flex-direction:row;flex-wrap:wrap;margin-right:0;margin-bottom:-6px}
.foot > :nth-child(n){margin-right:16px;margin-bottom:6px}
.foot > :nth-last-child(1):nth-child(n+2){margin-right:0}}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.lv-desc { padding: 0 4px 6px; font-size: .8rem; line-height: 1.45; }
/* ---------- Apprentissage ---------- */
.ap-h { display: grid; gap: 2px; }
@supports not (display: grid){
.ap-h{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.ap-h > :nth-child(n){margin-bottom:2px;flex:0 0 auto}
.ap-h > :nth-last-child(1){margin-bottom:0}}
.ap-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ap-tile { color: inherit; text-decoration: none; }
a.ap-tile:hover { border-color: var(--brass-fill); }
.ap-tile .big { font-size: 1.45rem; }
.ap-prog { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .85rem; }
@supports not (display: grid){
.ap-prog{flex-direction:row;flex-wrap:nowrap}
.ap-prog > :nth-child(n){margin-right:6px}
.ap-prog > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.ap-prog i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.ap-prog i.ok { background: var(--fifth); }
.ap-prog i.no { background: var(--brass-fill); }
.dl-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@supports not (display: grid){
.dl-grid{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.dl-grid > :nth-child(n){margin-bottom:14px;flex:0 0 auto}
.dl-grid > :nth-last-child(1){margin-bottom:0}}
@media (min-width: 1150px) { .dl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } @supports not (display: grid){
.dl-grid{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.dl-grid > :nth-child(n){margin-bottom:0;margin-right:14px;flex:none;width:calc((100% - 1 * 14px) / 2 - .05px);min-width:0}
.dl-grid > :nth-child(2n){margin-right:0}
.dl-grid > :nth-last-child(1){margin-right:0}
.dl-grid > :nth-child(n+3){margin-top:14px}} }
.dl-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 10px; align-content: start; background: var(--surface-2); min-width: 0; }
@supports not (display: grid){
.dl-card{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.dl-card > :nth-child(n){margin-bottom:10px;flex:0 0 auto}
.dl-card > :nth-last-child(1){margin-bottom:0}}
.dl-card.ok { border-color: var(--fifth); }
.dl-card.no { border-color: var(--brass-fill); }
.dl-card h4 { margin: 0; font-family: var(--display); font-size: 1.05rem; line-height: 1.3; }
.dl-card p { color: var(--ink-2); font-size: .92rem; }
.dl-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
@supports not (display: grid){
.dl-top{flex-direction:row;flex-wrap:wrap;margin-right:-8px;margin-bottom:-8px}
.dl-top > :nth-child(n){margin-right:8px;margin-bottom:8px}}
.dl-badge { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.dl-badge.ok { background: var(--fifth); color: #05272A; }
.dl-badge.no { background: var(--brass-soft); color: var(--brass); }
.dl-ans { border-top: 1px solid var(--line); padding-top: 10px; }
.btn[data-dlno][aria-pressed="true"] { color: var(--ink); background: var(--brass-soft); }
.btn[data-dlplay][aria-pressed="true"], .btn[data-dlmetro][aria-pressed="true"] { background: var(--brass-fill); border-color: transparent; color: var(--brass-ink); }
.tq-lvl { font-family: var(--mono); font-size: .9rem; color: var(--muted); }
.tq-lvl b { color: var(--brass); font-size: 1.1rem; }
.tq-themes { flex-wrap: wrap; }
.tq-win { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
@supports not (display: grid){
.tq-win{flex-direction:row;flex-wrap:wrap;margin-right:-5px;margin-bottom:-5px}
.tq-win > :nth-child(n){margin-right:5px;margin-bottom:5px}}
.tq-win i { width: 14px; height: 6px; border-radius: 3px; background: var(--line-2); }
.tq-win i.ok { background: var(--fifth); }
.tq-win i.no { background: var(--fourth); }
.tq-win .hint { margin-left: 6px; }
.tq-q { font-family: var(--display); font-size: 1.15rem; font-weight: 600; display: grid; gap: 6px; line-height: 1.35; }
@supports not (display: grid){
.tq-q{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.tq-q > :nth-child(n){margin-bottom:6px;flex:0 0 auto}
.tq-q > :nth-last-child(1){margin-bottom:0}}
.tq-opts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@supports not (display: grid){
.tq-opts{display:flex;flex-direction:row;flex-wrap:wrap;margin-right:-8px;margin-bottom:-8px}
.tq-opts > :nth-child(n){flex:1 1 220px;min-width:0;margin-right:8px;margin-bottom:8px}}
.tq-opts button { text-align: left; padding: 12px 14px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; cursor: pointer; font-size: .98rem; line-height: 1.35; color: var(--ink); }
.tq-opts button:hover:not([disabled]) { border-color: var(--brass-fill); }
.tq-opts button[disabled] { cursor: default; }
.tq-opts button.good { background: #3FC3CB; color: #05272A; border-color: #3FC3CB; }
.tq-opts button.wrong { background: #F2846B; color: #2B0E07; border-color: #F2846B; }
.ap-tip { font-family: var(--display); font-size: 1.1rem; line-height: 1.5; color: var(--ink-2); max-width: 65ch; }
.ear-ans { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.ear-ans button { height: auto; min-height: 46px; padding: 8px 10px; font-size: .95rem; }
.q-stats { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; font-size: .9rem; }
@supports not (display: grid){
.q-stats{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.q-stats > :nth-child(n){margin-bottom:6px;flex:0 0 auto}
.q-stats > :nth-last-child(1){margin-bottom:0}}
.q-hist { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@supports not (display: grid){
.q-hist{flex-direction:row;flex-wrap:wrap;margin-right:-12px;margin-bottom:-12px}
.q-hist > :nth-child(n){margin-right:12px;margin-bottom:12px}}
.q-bars { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
@supports not (display: grid){
.q-bars{flex-direction:row;flex-wrap:nowrap}
.q-bars > :nth-child(n){margin-right:3px}
.q-bars > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.q-bars i { width: 8px; height: var(--h); background: var(--fifth); border-radius: 2px; min-height: 2px; }
.q-bars i.none { background: var(--line-2); height: 3px; }
.th-cb { order: -1; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; display: grid; place-items: center; padding: 0; align-self: center; }
@supports not (display: grid){
.th-cb{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center}
.th-cb > :nth-child(n){margin-bottom:0;flex:0 0 auto}
.th-cb > :nth-last-child(1){margin-bottom:0}}
.th-cb[aria-pressed="true"] { background: var(--fifth); border-color: var(--fifth); }
.th-cb[aria-pressed="true"]::after { content: "✓"; color: #05272A; font-weight: 700; font-size: .8rem; }
ol.th-order li.done > div { color: var(--muted); }
.song-btn .done { color: var(--fifth); font-weight: 700; }
#s-master[aria-pressed="true"] { background: var(--fifth); border-color: transparent; color: #05272A; }
.p-tempo input[type="range"] { width: 140px; }

/* ---------- Notes qui défilent ---------- */
.fl-stage { display: grid; justify-items: center; gap: 8px; padding: 14px 0 6px; text-align: center; }
@supports not (display: grid){
.fl-stage{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:flex-start}
.fl-stage > :nth-child(n){margin-bottom:8px;flex:0 0 auto}
.fl-stage > :nth-last-child(1){margin-bottom:0}}
.fl-note { font-family: var(--display); font-weight: 700; font-size: 8rem; font-size: clamp(4.5rem, 18vw, 8rem); line-height: 1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.fl-note.tick { animation: flpop .2s ease-out; }
@keyframes flpop { from { transform: scale(1.12); color: var(--brass); } to { transform: scale(1); } }
.fl-sub { display: flex; gap: 4px 18px; flex-wrap: wrap; justify-content: center; }
@supports not (display: grid){
.fl-sub{flex-direction:row;flex-wrap:wrap;margin-right:-18px;margin-bottom:-4px}
.fl-sub > :nth-child(n){margin-right:18px;margin-bottom:4px}}
.fl-ctrl { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
@supports not (display: grid){
.fl-ctrl{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.fl-ctrl > :nth-child(n){margin-bottom:12px;flex:0 0 auto}
.fl-ctrl > :nth-last-child(1){margin-bottom:0}}
.fl-bpm input[type="range"] { width: auto; flex: 1 1 110px; min-width: 0; max-width: 240px; }
.fl-bpm > span:last-child { flex-basis: 100%; }
.fl-opts { gap: 8px 18px; font-size: .92rem; }
#fl-go[aria-pressed="true"] { background: var(--brass-soft); border-color: var(--brass-fill); color: var(--ink); }

/* ---------- Listes repliables ---------- */
.lb-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; background: none; border: 0; padding: 6px 0; cursor: pointer; text-align: left; color: inherit; }
@supports not (display: grid){
.lb-toggle{flex-direction:row;flex-wrap:nowrap}
.lb-toggle > :nth-child(n){margin-right:9px}
.lb-toggle > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.lb-toggle .label { line-height: 1.35; }
.lb-chev { width: 7px; height: 7px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; margin: 0 2px; }
.lb-toggle[aria-expanded="true"] .lb-chev { transform: rotate(45deg); }
.lb-toggle:hover .label { color: var(--ink); }
.lb-n { margin-left: auto; flex: none; font-family: var(--mono); font-size: .72rem; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.list-block:not(.open) header { padding-bottom: 0; }

/* ---------- Bibliothèque ---------- */
.lib-panel { gap: 12px; }
.lib-tools { display: flex; gap: 8px; align-items: center; }
@supports not (display: grid){
.lib-tools{flex-direction:row;flex-wrap:nowrap}
.lib-tools > :nth-child(n){margin-right:8px}
.lib-tools > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.lib-tools input { flex: 1; min-width: 0; }
.lib-newform { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@supports not (display: grid){
.lib-newform{flex-direction:row;flex-wrap:wrap;margin-right:-6px;margin-bottom:-6px}
.lib-newform > :nth-child(n){margin-right:6px;margin-bottom:6px}}
.lib-newform input { flex: 1 1 160px; min-width: 0; }
#libList { display: grid; gap: 12px; }
@supports not (display: grid){
#libList{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
#libList > :nth-child(n){margin-bottom:12px;flex:0 0 auto}
#libList > :nth-last-child(1){margin-bottom:0}}
.song-row { display: flex; align-items: center; gap: 2px; }
@supports not (display: grid){
.song-row{flex-direction:row;flex-wrap:nowrap}
.song-row > :nth-child(n){margin-right:2px}
.song-row > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.song-row .song-btn { flex: 1; min-width: 0; }
.row-tools { display: flex; flex: none; }
.row-tools .btn { padding: 0 7px; height: 28px; }
.lb-add { display: flex; gap: 6px; padding: 6px 4px 2px; }
@supports not (display: grid){
.lb-add{flex-direction:row;flex-wrap:nowrap}
.lb-add > :nth-child(n){margin-right:6px}
.lb-add > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.lb-add input { flex: 1; min-width: 0; font-size: .85rem; }
.lb-status.err { color: var(--fourth); }
/* ---------- Objectif ---------- */
.goal-bar { height: 10px; border-radius: 5px; background: var(--sunken); overflow: hidden; }
.goal-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass-fill), #E6B850); border-radius: 5px; transition: width .3s ease; }
.goal-n { font-family: var(--display); font-size: 1.1rem; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 420px; }
@supports not (display: grid){
.week{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.week > :nth-child(n){margin-right:6px;flex:none;width:calc((100% - 6 * 6px) / 7 - .05px);min-width:0}
.week > :nth-child(7n){margin-right:0}
.week > :nth-last-child(1){margin-right:0}
.week > :nth-child(n+8){margin-top:6px}}
.wd { display: grid; justify-items: center; gap: 4px; font-size: .75rem; color: var(--muted); font-weight: 600; }
@supports not (display: grid){
.wd{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:flex-start}
.wd > :nth-child(n){margin-bottom:4px;flex:0 0 auto}
.wd > :nth-last-child(1){margin-bottom:0}}
.wd i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: block; }
.wd.some i { border-color: var(--brass-fill); background: radial-gradient(circle, var(--brass-fill) 0 4px, transparent 5px); }
.wd.full i { border-color: var(--brass-fill); background: var(--brass-fill); }
.wd.today span { color: var(--ink); }
.wd.today i { box-shadow: 0 0 0 3px var(--brass-soft); }
/* ---------- Rythme ---------- */
.ry-pats { display: flex; flex-wrap: wrap; gap: 6px; }
@supports not (display: grid){
.ry-pats{flex-direction:row;flex-wrap:wrap;margin-right:-6px;margin-bottom:-6px}
.ry-pats > :nth-child(n){margin-right:6px;margin-bottom:6px}}
.ry-pats button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: .84rem; cursor: pointer; color: var(--ink-2); }
.ry-pats button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ry-pats .done { color: var(--fifth); font-weight: 700; }
.ry-grid-wrap { display: grid; gap: 4px; overflow-x: auto; }
@supports not (display: grid){
.ry-grid-wrap{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.ry-grid-wrap > :nth-child(n){margin-bottom:4px;flex:0 0 auto}
.ry-grid-wrap > :nth-last-child(1){margin-bottom:0}}
.ry-syl, .ry-grid { display: grid; grid-template-columns: repeat(16, minmax(14px, 1fr)); gap: 3px; min-width: 300px; }
@supports not (display: grid){
.ry-syl{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.ry-syl > :nth-child(n){margin-right:3px;flex:none;width:calc((100% - 15 * 3px) / 16 - .05px);min-width:0}
.ry-syl > :nth-child(16n){margin-right:0}
.ry-syl > :nth-last-child(1){margin-right:0}
.ry-syl > :nth-child(n+17){margin-top:3px}}
@supports not (display: grid){
.ry-grid{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.ry-grid > :nth-child(n){margin-right:3px;flex:none;width:calc((100% - 15 * 3px) / 16 - .05px);min-width:0}
.ry-grid > :nth-child(16n){margin-right:0}
.ry-grid > :nth-last-child(1){margin-right:0}
.ry-grid > :nth-child(n+17){margin-top:3px}}
.ry-syl span { text-align: center; font-size: .66rem; color: var(--muted); font-family: var(--mono); }
.ry-syl span.beat { color: var(--ink); font-weight: 700; }
.ry-c { height: 30px; border-radius: 5px; background: var(--sunken); }
.ry-c.beat { box-shadow: inset 2px 0 0 var(--line-2); }
.ry-c.on { background: var(--brass-fill); }
.ry-c.now { outline: 2px solid var(--ink); outline-offset: -2px; }
.ry-grid.small .ry-c { height: 12px; }
.ry-res-rows { display: grid; gap: 3px; margin-top: 4px; }
@supports not (display: grid){
.ry-res-rows{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.ry-res-rows > :nth-child(n){margin-bottom:3px;flex:0 0 auto}
.ry-res-rows > :nth-last-child(1){margin-bottom:0}}
.ry-c.on.good, .dot.ry-good { background: #3FC3CB; }
.ry-c.on.ok, .dot.ry-ok { background: #E6B850; }
.ry-c.on.late, .dot.ry-late { background: #F2846B; }
.ry-c.on.miss, .dot.ry-miss { background: transparent; box-shadow: inset 0 0 0 2px #F2846B; }
.ry-pad { display: grid; place-items: center; gap: 4px; width: 100%; min-height: 130px; border: 2px dashed var(--line-2); border-radius: 16px; background: var(--surface-2); font-family: var(--display); font-size: 1.15rem; font-weight: 600; color: var(--ink); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; padding: 16px; text-align: center; }
@supports not (display: grid){
.ry-pad{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center}
.ry-pad > :nth-child(n){margin-bottom:4px;flex:0 0 auto}
.ry-pad > :nth-last-child(1){margin-bottom:0}
.ry-pad > span{display:block}
.ry-pad > b{display:block}
.ry-pad > small{display:block}
.ry-pad > i{display:block}
.ry-pad > em{display:block}
.ry-pad > strong{display:block}}
.ry-pad small { font-family: var(--body); font-weight: 400; font-size: .8rem; color: var(--muted); }
.ry-pad.hit { animation: rypad .12s ease-out; }
.ry-pad.pulse { border-color: var(--brass-fill); background: var(--brass-soft); }
@keyframes rypad { from { background: var(--brass-soft); border-color: var(--brass-fill); } to { background: var(--surface-2); } }
.ry-pad.mic { cursor: default; }
.ry-meter { width: 260px; width: min(260px, 80%); height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.ry-meter i { display: block; height: 100%; width: 0; background: var(--fifth); }
.ry-meter.hit { box-shadow: 0 0 0 3px var(--brass-fill); }
.ry-res { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
@supports not (display: grid){
.ry-res{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.ry-res > :nth-child(n){margin-bottom:4px;flex:0 0 auto}
.ry-res > :nth-last-child(1){margin-bottom:0}}
.ry-res.ok { border-color: var(--fifth); }
.ry-res b { font-family: var(--display); font-size: 1.6rem; }
/* ---------- Théorie → S'entraîner ---------- */
.th-train { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
@supports not (display: grid){
.th-train{flex-direction:row;flex-wrap:wrap;margin-right:0;margin-bottom:-8px}
.th-train > :nth-child(n){margin-right:8px;margin-bottom:8px}
.th-train > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.th-train .label { margin-right: 4px; }
/* ---------- Compte ---------- */
.acct-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.06); color: var(--side-ink); border-radius: 10px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: .84rem; }
@supports not (display: grid){
.acct-btn{flex-direction:row;flex-wrap:nowrap}
.acct-btn > :nth-child(n){margin-right:8px}
.acct-btn > :nth-last-child(1):nth-child(n+2){margin-right:0}}
.acct-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.acct-btn .ico { width: 16px; height: 16px; color: var(--side-mute); }
.acct-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn.ok::after, .acct-btn.wait::after, .acct-btn.err::after { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.acct-btn.ok::after { background: var(--fifth); }
.acct-btn.wait::after { background: var(--brass-fill); }
.acct-btn.err::after { background: var(--fourth); }
.acct { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 25; background: rgba(10,15,29,.55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.acct-box { width: 100%; max-width: 440px; margin: auto; box-shadow: var(--shadow-lg); }
.acct-form { display: grid; gap: 12px; }
@supports not (display: grid){
.acct-form{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.acct-form > :nth-child(n){margin-bottom:12px;flex:0 0 auto}
.acct-form > :nth-last-child(1){margin-bottom:0}}
.acct-field { display: grid; gap: 5px; }
@supports not (display: grid){
.acct-field{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
.acct-field > :nth-child(n){margin-bottom:5px;flex:0 0 auto}
.acct-field > :nth-last-child(1){margin-bottom:0}}
.acct-field input { width: 100%; }
#acct-on { display: grid; gap: 12px; }
@supports not (display: grid){
#acct-on{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
#acct-on > :nth-child(n){margin-bottom:12px;flex:0 0 auto}
#acct-on > :nth-last-child(1){margin-bottom:0}}
#acct-on[hidden], #acct-in[hidden] { display: none; }
#acct-in { display: grid; gap: 14px; }
@supports not (display: grid){
#acct-in{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
#acct-in > :nth-child(n){margin-bottom:14px;flex:0 0 auto}
#acct-in > :nth-last-child(1){margin-bottom:0}}
@media (min-width: 1000px) { .prefs .acct-btn { width: 100%; } }

/* ---------- Replis manuels pour Safari 9 (iOS 9.3.x) ----------
   Ajoutés à la fin de app.css par deploy-fondamentales (copie déployée seulement).
   Seuls les navigateurs sans CSS Grid lisent ce bloc. */
@supports not (display: grid) {
  /* Manche : une grille sans conteneur de ligne. Lignes refaites en flex-wrap :
     nom de corde (30px), case à vide (46px), puis --cols cases qui se partagent le reste. */
  .fb { display: flex; flex-wrap: wrap; align-items: stretch; }
  .fb > * { flex: none; margin: 0; }
  .fb > .fb-sn, .fb > span:not([class]) { width: 30px; }
  .fb > .fb-c.nut, .fb > span:not([class]) + .fb-num { width: 46px; }
  .fb > .fb-c:not(.nut), .fb > .fb-num { width: calc((100% - 76px) / var(--cols) - .1px); }
  .fb.mini > .fb-sn, .fb.mini > span:not([class]) { width: 26px; }
  .fb.mini > .fb-c.nut, .fb.mini > span:not([class]) + .fb-num { width: 38px; }
  .fb.mini > .fb-c:not(.nut), .fb.mini > .fb-num { width: calc((100% - 64px) / var(--cols) - .1px); }
  .fb > span:not([class]) + .fb-num, .fb.mini > span:not([class]) + .fb-num { flex: none; }
  .fb-sn, .fb-num { display: flex; align-items: center; justify-content: center; }

  /* .facts.ap-facts : tuiles d'au moins 150px au lieu de 210px */
  .facts.ap-facts > :nth-child(n) { -webkit-flex-basis: 150px; flex-basis: 150px; }

  /* .answers.ear-ans : réponses souples (130px mini) au lieu de 4 colonnes */
  .answers.ear-ans { margin-right: -8px; margin-bottom: -8px; }
  .answers.ear-ans > :nth-child(n) { -webkit-flex: 1 1 130px; flex: 1 1 130px; width: auto; margin: 0 8px 8px 0; }

  /* .row.fl-opts : écarts 8px / 18px au lieu de ceux de .row */
  .row.fl-opts { margin-right: -18px; margin-bottom: -8px; }
  .row.fl-opts > :nth-child(n) { margin-right: 18px; margin-bottom: 8px; }

  /* .panel.lib-panel : écart 12px au lieu de 16px */
  .panel.lib-panel > :nth-child(n) { margin-bottom: 12px; }
  .panel.lib-panel > :nth-last-child(1) { margin-bottom: 0; }

  /* Étapes de la théorie : case à cocher (order:-1), numéro (::before), texte, renvoi */
  ol.th-order li { display: flex; flex-wrap: nowrap; align-items: baseline; }
  ol.th-order li::before { -webkit-flex: 0 0 26px; flex: 0 0 26px; margin-right: 12px; }
  ol.th-order li > :nth-child(n) { -webkit-flex: 1 1 0; flex: 1 1 0; width: auto; min-width: 0; margin: 0 12px 0 0; }
  ol.th-order li > .th-cb { -webkit-flex: 0 0 22px; flex: 0 0 22px; width: 22px; margin-right: 14px; -webkit-align-self: center; align-self: center; }
  ol.th-order li > span { -webkit-flex: 0 0 auto; flex: 0 0 auto; margin-right: 0; }
  @media (max-width: 620px) {
    ol.th-order li { flex-wrap: wrap; }
    ol.th-order li::before { -webkit-flex-basis: 22px; flex-basis: 22px; }
    ol.th-order li > .th-cb { margin-right: 12px; }
    ol.th-order li > div { margin-right: 0; }
    ol.th-order li > span { -webkit-flex: 0 0 100%; flex: 0 0 100%; padding-left: 68px; margin-top: 4px; }
  }

  /* Le flex ne s'applique pas à l'intérieur d'un <button> sur Safari 9 :
     on empile le contenu en bloc pour retrouver la pile de la grille. */
  .notes12 button > *, .tuner button > *, .ry-pad > * { display: block; }
}
