/* ===== "graphite on paper" theme: quiet white page, pencil-grey ink, a fine bare branch as the only ornament ===== */
:root{
  --bg:#fbfaf7; --card:#ffffff; --ink:#2b2a28; --muted:#7b776f; --line:#e6e3dc;
  --navy:#34322f; --navy2:#5a5751; --gold:#b79f73;
  --ok:#5c8a6b; --okbg:#eaf2ec; --bad:#b25a52; --badbg:#f7eae8;
  --maj:#5f7f9e; --min:#86718f; --dim:#b3795c; --aug:#5f9189;
}
body{background:var(--bg);background-repeat:no-repeat;background-position:left bottom;background-size:230px auto;background-attachment:fixed}
header{background-color:var(--bg);background-repeat:no-repeat;background-position:left -4px bottom -2px;color:var(--ink);border-radius:0;border-bottom:1px solid var(--line);padding-top:26px;padding-bottom:26px}
header p{opacity:1;color:var(--muted)}
body.inquiz header{background-size:auto 210%;background-position:left -6px bottom -14px;border-radius:0}
.back{background:var(--card);color:var(--ink);border:1px solid var(--navy);box-shadow:0 2px 8px rgba(0,0,0,.10)}
.inst,.card,.stage,.lvl,.msg{border-color:var(--line);box-shadow:none;border-radius:14px}
.lvl{box-shadow:none}
.lvl .badge{background:transparent;color:var(--ink);border:1.2px solid var(--navy);border-radius:50%;font-weight:600}
.seg button{background:#fff;border:1px solid var(--line);font-weight:600}
.seg button.on{background:var(--navy);border-color:var(--navy);color:#fff}
#tempoCard [data-mt].on,.sTs button.on{background:var(--navy)!important;border-color:var(--navy)!important}
.btn{background:var(--navy);border-radius:12px;font-weight:600}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--navy)}
.btn.end{border:1px solid var(--bad)}
.mode{background:transparent;border:1px solid var(--line);color:var(--ink);font-weight:600}
.bigplay{background:var(--navy);box-shadow:0 0 0 6px #fff,0 0 0 7px var(--line)}
.bigplay.playing{animation:none;box-shadow:0 0 0 6px #fff,0 0 0 8px var(--gold)}
.progress{height:2px;background:var(--line)}
.progress i{background:var(--navy)}
.pill{font-weight:600}
.speedq button{background:#fff;border:1px solid var(--line);font-weight:600}
.speedq button.on{background:var(--navy);border-color:var(--navy);color:#fff}
.ans{border-radius:12px;font-weight:700}
.lessoncard{box-shadow:none}
.hstaff{border:1px solid var(--line)}
.hpool{background:#f5f3ee;border:1px solid var(--line)}
.htile{border:1px solid #cfcbc3;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.htile.sel,.hslot.hot,.hslot.pick.sel{border-color:var(--gold);background:#fbf6ea;box-shadow:0 0 0 2px rgba(183,159,115,.3)}
.hslot.filled{border:1.5px solid var(--navy);background:#f3f2ef;color:var(--ink)}
.hslot.empty{border:1.5px dashed #c4bfb5;background:transparent}
.hslot.now{box-shadow:0 0 0 2px rgba(183,159,115,.7);background:#fbf6ea}
.btn.hcheck{background:var(--ok)}
.ropt{border:1px solid var(--line)}
.ropt .rnum{background:transparent;color:var(--ink);border:1px solid var(--navy)}
.teacherlink{color:var(--muted)}
.reset{color:var(--bad)}
.lessoncard{background:#fff;border:1px solid var(--gold)}
.lessoncard .badge{background:transparent;border:1px solid var(--gold);border-radius:50%}
header{background-size:46% auto;background-position:left -4px bottom -2px}
body.inquiz header{background-size:30% auto;background-position:left -4px bottom -6px}
@media (min-width:900px){ header{background-size:300px auto} body.inquiz header{background-size:170px auto} body{background-size:320px auto} }
/* the branches are backgrounds: the content always sits above them */
main,header > *{position:relative;z-index:1}
.back{z-index:60}
/* disabled buttons stay solid, so the branch behind the page never shows through a button */
.btn:disabled{opacity:1;background:#b6b3ad;color:#fff}
.btn.hcheck:disabled{opacity:1;background:#c6d8cc;color:#fff}
/* the app logo beside the title (menu and teacher screens; hidden in the compact exercise header) */
header .logo{float:right;width:48px;height:48px;margin:2px 0 0 12px;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,.15)}
body.inquiz header .logo{display:none}
header{min-height:52px}
header::after{content:"";display:block;clear:both}
header p{font-size:.8rem}
@media (min-width:900px){ header p{font-size:.95rem} }
.installbtn{display:block;width:100%;margin:0 0 14px}
.installbtn[hidden]{display:none}
.dialog p{line-height:1.6}
