/* ===== Practice Plan: homepage v3 look (Fraunces + Poppins, cream / charcoal / orange, soft shadows) ===== */
:root {
  --ink: #1F2430; --ink-2: #2B3140; --muted: #5B6172; --line: #E6E4DF;
  --bg: #F5F4F1; --card: #FFFFFF; --peach: #FFE8CF; --peach-2: #FFF3E4;
  --orange: #F28C28; --orange-dk: #B5560A;
  --t: #F28C28; --t-dk: #A9500A; --t-lt: #FFF3E4;
  --r: #4C74B8; --r-dk: #2F548F; --r-lt: #ECF1FA;
  --m: #3E8E6E; --m-dk: #2A6A50; --m-lt: #E8F4EE;
  --v: #7E5FA8; --v-dk: #5C4180; --v-lt: #F2EDF8;
  --ok: #3E8E6E; --due: #C98A0B; --late: #C8452C;
  --serif: "Fraunces", Georgia, serif; --sans: "Poppins", system-ui, -apple-system, sans-serif;
  --sh: 0 1px 2px rgba(31,36,48,.05), 0 10px 28px rgba(31,36,48,.07);
  --rad: 22px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -.02em; margin: 0; line-height: 1.15; font-variation-settings: "opsz" 144; text-wrap: balance; }
h1 { font-size: clamp(30px, 7vw, 42px); }
.h2 { font-size: 28px; }
.h3, h2.h3 { font-size: 20px; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.muted { color: var(--muted); }
.sm { font-size: 13.5px; }
.center { text-align: center; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 980px; }
.wrap.narrow { max-width: 460px; }
.eyebrow { font: 600 12.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--orange-dk); margin-bottom: 6px; }
.lead { font-size: 17px; color: var(--muted); margin-top: 10px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(245,244,241,.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font: 600 17px var(--serif); letter-spacing: -.01em; }
.brand small { font-size: 11.5px; color: var(--muted); }
.top-r { display: flex; align-items: center; gap: 10px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: #ECEAE5; color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--m-lt); color: var(--m-dk); }
.chip.warn { background: #FCEBDF; color: var(--late); }
.who { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: 99px; background: #fff; box-shadow: var(--sh); }
.who span { font-size: 10px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--orange); color: var(--ink); font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 99px; min-height: 46px;
  transition: transform .15s, box-shadow .15s, background .15s; box-shadow: 0 6px 16px rgba(242,140,40,.28); }
.btn:hover { transform: translateY(-1px); background: #F59A3E; }
.btn:active { transform: translateY(1px); }
.btn.sm { font-size: 14px; padding: 8px 16px; min-height: 40px; }
.btn.ghost { background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--peach-2); box-shadow: inset 0 0 0 1.5px #F2D3B0; }
.link { background: none; border: 0; padding: 6px 4px; cursor: pointer; color: var(--orange-dk); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(181,86,10,.35); }
.link.danger { color: var(--late); text-decoration-color: rgba(200,69,44,.35); }
.err { color: var(--late); font-size: 14px; margin-top: 10px; }
.err.box { background: #FCEBDF; padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; }

/* ---------- panels ---------- */
.panel { background: var(--card); border-radius: var(--rad); box-shadow: var(--sh); padding: 22px; margin-bottom: 16px; }
.panel > .h3 { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.panel > .h3 small { font: 500 14px var(--sans); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--orange)); flex: none; }
.cat-t { --c: var(--t); --c-dk: var(--t-dk); --c-lt: var(--t-lt); }
.cat-r { --c: var(--r); --c-dk: var(--r-dk); --c-lt: var(--r-lt); }
.cat-m { --c: var(--m); --c-dk: var(--m-dk); --c-lt: var(--m-lt); }
.cat-v { --c: var(--v); --c-dk: var(--v-dk); --c-lt: var(--v-lt); }
.seg-t { --c: var(--t); } .seg-r { --c: var(--r); } .seg-m { --c: var(--m); } .seg-v { --c: var(--v); }
.tag { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }

/* ---------- start screen ---------- */
.start { padding-top: 34px; padding-bottom: 60px; }
.hello { padding: 8px 4px 26px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.who-card { position: relative; }
.who-card a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; text-decoration: none; padding: 18px 12px; border-radius: 18px; background: var(--bg); transition: background .15s, transform .15s; }
.who-card a:hover { background: var(--peach-2); transform: translateY(-2px); }
.who-card small { color: var(--muted); font-size: 12.5px; }
.who-card .x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; background: none; border-radius: 50%; color: var(--muted); font-size: 20px; cursor: pointer; }
.who-card .x:hover { background: #fff; }
.av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--peach); color: var(--orange-dk); font: 600 22px var(--serif); flex: none; }
.code-form { display: flex; gap: 10px; margin-top: 14px; }
.code-in { flex: 1; min-width: 0; font: 600 24px/1 ui-monospace, Menlo, monospace; letter-spacing: .25em; text-transform: uppercase; text-align: center; padding: 12px; border-radius: 14px; border: 1.5px solid #DDD2C2; background: #fff; }
.code-in:focus, .panel input:focus, .panel select:focus, .panel textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242,140,40,.2); }
.teacher-link { text-align: center; margin-top: 26px; font-size: 14px; color: var(--muted); }

/* ---------- student pages ---------- */
.student { padding-top: 22px; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.hero { padding: 6px 4px 18px; }
.hero.slim { padding-bottom: 14px; }
.exam { margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: var(--peach-2); color: #5A3410; font-size: 14.5px; line-height: 1.5; }
.exam.hot { background: var(--orange); color: var(--ink); }
.exam.calm { background: #ECEAE5; color: var(--muted); }
.pbar { display: flex; gap: 4px; height: 12px; margin-top: 18px; }
.pbar .seg { background: #E4E1DA; border-radius: 99px; overflow: hidden; min-width: 12px; }
.pbar .seg i { display: block; height: 100%; background: var(--c); border-radius: 99px; transition: width .4s; }
.pbar-t { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.pbar-t b { color: var(--ink); }
.mins { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.mins span:first-child { margin-right: 4px; }
.pill { border: 0; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 99px; min-width: 42px; height: 34px; padding: 0 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.pill.on { background: var(--ink); color: #fff; box-shadow: none; }
.alldone { display: flex; gap: 12px; align-items: center; background: var(--m-lt); color: var(--m-dk); padding: 14px 18px; border-radius: 18px; margin-bottom: 18px; font-size: 14.5px; }
.alldone svg { width: 28px; height: 28px; flex: none; }

.cat { margin-bottom: 26px; }
.cat-h { display: flex; align-items: center; gap: 12px; margin: 0 4px 12px; }
.cat-h .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font: 600 16px var(--serif); flex: none; }
.cat-t .cat-h .num { color: var(--ink); }
.cat-h h2 { font-size: 24px; }
.cat-h p { font-size: 13.5px; color: var(--muted); }

.card { background: var(--card); border-radius: var(--rad); box-shadow: var(--sh); padding: 18px 18px 16px; margin-bottom: 12px; position: relative; overflow: hidden; border-left: 5px solid var(--c); transition: box-shadow .2s; }
.card.run { box-shadow: 0 0 0 2px var(--c), var(--sh); }
.card.done { background: #FBFBF9; }
.card.done h3 { color: var(--muted); }
.card.extra::after { content: "Extra"; position: absolute; top: 0; right: 18px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: var(--c-lt); color: var(--c-dk); padding: 2px 8px; border-radius: 0 0 8px 8px; }
.c-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.c-title h3 { font-size: 20px; }
.detail { font-size: 14px; color: var(--muted); margin-top: 2px; }
.when { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; flex: none; margin-top: 2px; }
.w-ok { background: var(--m-lt); color: var(--m-dk); }
.w-due { background: #FDF1D6; color: #8A5B00; }
.w-late, .w-new { background: #FCE6E0; color: #A8361F; }
.note { margin-top: 12px; font-size: 14.5px; background: var(--bg); border-radius: 14px; padding: 10px 14px; }
.note b { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.strat { margin-top: 12px; background: var(--c-lt); border-radius: 14px; padding: 10px 14px 12px; font-size: 14.5px; }
.s-h { display: flex; justify-content: space-between; align-items: center; }
.strat .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-dk); }
.strat .link { font-size: 12.5px; padding: 2px 0; color: var(--c-dk); }
.strat > b { display: block; font-size: 15.5px; margin-top: 2px; }
.strat p { color: var(--ink-2); }
.strat .btn { margin-top: 10px; }

.timer { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.play { border: 0; background: none; padding: 0; cursor: pointer; width: 58px; height: 58px; flex: none; color: var(--ink); border-radius: 50%; }
.ring { width: 58px; height: 58px; display: block; }
.ring-bg { fill: var(--c-lt); stroke: #E9E6E0; stroke-width: 4; }
.ring-fg { fill: none; stroke: var(--c); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .5s linear; }
.card.over .ring-fg { stroke: var(--ok); }
.t-read { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.t-now { font: 600 26px/1.1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.t-goal { font-size: 13px; color: var(--muted); }
.card.over .t-goal { color: var(--m-dk); font-weight: 600; }
.card.ding { animation: ding .9s ease 2; }
@keyframes ding { 50% { box-shadow: 0 0 0 6px rgba(62,142,110,.35), var(--sh); } }
.donebar { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--m-dk); font-weight: 600; font-size: 14.5px; }
.donebar svg { width: 22px; height: 22px; }
.donebar span { flex: 1; }
.manual { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; font-size: 14.5px; }
.stepper { display: inline-flex; align-items: center; background: var(--bg); border-radius: 99px; }
.stepper button { width: 40px; height: 40px; border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: 50%; }
.stepper output { min-width: 32px; text-align: center; font-weight: 600; font-size: 17px; }

/* lists */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.panel > .h3 + .row, .panel > .muted + .row { border-top: 0; }
.row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.row-t b { font-weight: 600; font-size: 15px; }
.row-t small { color: var(--muted); font-size: 13px; }
.row-when { font-size: 13px; color: var(--muted); white-space: nowrap; }
.as-btn { background: none; border: 0; padding: 0; cursor: pointer; }
.sdot { width: 11px; height: 11px; border-radius: 50%; flex: none; display: inline-block; }
.sdot.w-ok { background: var(--ok); } .sdot.w-due { background: var(--due); } .sdot.w-late, .sdot.w-new { background: var(--late); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sq { width: 11px; height: 11px; border-radius: 3px; background: var(--c); display: inline-block; }

/* week */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: 18px; box-shadow: var(--sh); padding: 16px 12px; text-align: center; }
.stat b { display: block; font: 600 32px/1.1 var(--serif); }
.stat span { font-size: 12.5px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 18px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.bar { width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; border-radius: 10px; overflow: hidden; min-height: 4px; background: #ECEAE5; }
.bar i { display: block; background: var(--c); width: 100%; }
.bar-n { font-size: 12px; font-weight: 600; color: var(--muted); }
.bar-d { font-size: 12.5px; color: var(--muted); }
.bar-col.is-today .bar-d { color: var(--ink); font-weight: 700; }
.split { display: grid; grid-template-columns: 110px 1fr 96px; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.split-bar { position: relative; height: 12px; background: #ECEAE5; border-radius: 99px; }
.split-bar i { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.split-bar em { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; }
.split-v { text-align: right; font-weight: 600; }
.split-v small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* tabs */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40; display: flex; gap: 4px; padding: 6px; border-radius: 99px; background: var(--ink); box-shadow: 0 12px 30px rgba(31,36,48,.3); }
.tabs a { display: flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 99px; color: #C9CCD4; text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.tabs a svg { width: 19px; height: 19px; }
.tabs a.on { background: var(--orange); color: var(--ink); }

/* ---------- teacher ---------- */
.teacher { padding-top: 26px; padding-bottom: 60px; }
.t-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.t-head .muted { margin-top: 6px; }
.add-row { display: flex; gap: 10px; }
.add-row input { flex: 1; min-width: 0; }
.panel input:not([type=range]):not([type=checkbox]), .panel select, .panel textarea {
  width: 100%; border: 1.5px solid #DDD2C2; border-radius: 12px; background: #fff; padding: 10px 12px; font-size: 15px; min-height: 44px; }
.panel textarea { resize: vertical; }
.panel label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.panel label small { font-weight: 400; }
.inline { display: flex; gap: 8px; align-items: center; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.r-card { background: var(--card); border-radius: var(--rad); box-shadow: var(--sh); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.r-top { display: flex; gap: 12px; align-items: center; }
.r-top .av { width: 44px; height: 44px; font-size: 19px; }
.r-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 12px; color: var(--muted); line-height: 1.3; }
.r-stats b { display: block; font-size: 15px; color: var(--ink); }
.r-stats .warn b { color: var(--late); }
.r-act { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14.5px; }
.back a { text-decoration: none; font-weight: 600; }
.name-in.name-in { font: 560 30px/1.2 var(--serif) !important; letter-spacing: -.02em; border-color: transparent !important; padding: 4px 6px !important; margin: -4px -6px 14px; width: calc(100% + 12px) !important; }
.name-in:hover { border-color: var(--line) !important; }
.grid3, .grid2 { display: grid; gap: 14px; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid2 { grid-template-columns: 1fr 1fr; margin-top: 16px; }
.lbl-t { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.lbl-t small { font-weight: 400; }
.ratio .r-line { display: grid; grid-template-columns: 124px 1fr 44px; align-items: center; gap: 10px; font-size: 14px; }
.ratio input[type=range] { accent-color: var(--c); width: 100%; }
.ratio .cat-t input[type=range] { accent-color: var(--t-dk); }
.ratio b { text-align: right; font-variant-numeric: tabular-nums; }
.codebox { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.code { display: block; font: 700 30px/1.1 ui-monospace, Menlo, monospace; letter-spacing: .18em; color: var(--orange-dk); margin: 2px 0 4px; }
.code-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.items { border-top: 5px solid var(--c); }
.item-row .link { flex: none; }
.item-edit { background: var(--c-lt); border-radius: 16px; padding: 16px; margin: 10px 0; display: flex; flex-direction: column; gap: 12px; }
.item-edit .grid2 { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-t { border: 0; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 99px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; }
.chip-t.on { background: var(--c); color: #fff; box-shadow: none; }
.cat-t .chip-t.on { color: var(--ink); }
.newstrat { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; }
.ie-act { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.items > .add-row { margin-top: 12px; }
.rep-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.rep { border-collapse: separate; border-spacing: 3px; font-size: 12.5px; min-width: 640px; width: 100%; }
.rep th { font-weight: 600; color: var(--muted); text-align: center; }
.rep thead th small { display: block; font-weight: 400; }
.rep th.is-today { color: var(--ink); }
.rep tbody th { text-align: left; color: var(--ink); max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 8px; }
.rep td { text-align: center; height: 28px; border-radius: 6px; background: #F3F1EC; min-width: 28px; }
.rep td.hit { background: var(--c); color: #fff; font-weight: 600; }
.rep .cat-t td.hit { color: var(--ink); }
.rep .tot td { background: none; font-weight: 600; }
.signin form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; transition: opacity .2s, transform .2s; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .grid3, .grid2 { grid-template-columns: 1fr; }
  .newstrat { grid-template-columns: 1fr; }
  .brand small { display: none; }
  .chip:not(.warn) { display: none; }
  .mins span:first-child { flex-basis: 100%; margin: 0 0 2px; }
  .panel { padding: 18px; }
  .card { padding: 16px 14px 14px; }
  .c-top { flex-direction: column-reverse; gap: 6px; }
  .tabs a { padding: 10px 13px; }
  .split { grid-template-columns: 92px 1fr 70px; }
  .r-stats { font-size: 11.5px; }
  .item-row .row-when { display: none; }
  .list .row { flex-wrap: wrap; row-gap: 4px; }
  .list .row-t { flex-basis: calc(100% - 24px); }
  .list .row-when { margin-left: 23px; flex: 1; }
}
@media (max-width: 380px) { .tabs a span { display: none; } .tabs a { padding: 11px 18px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- difficulty rating, second blocks, 30-minute stop ---------- */
.rate { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.rate-b { display: inline-flex; gap: 4px; }
.rate-b button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--bg); font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.rate-b button:hover { background: var(--c-lt); }
.rate-b button.on { background: var(--ink); color: #fff; }
.rate em { font-style: normal; font-weight: 600; color: var(--ink-2); }
.card.blk2 { margin-left: 18px; border-left-style: dashed; }
.w-blk { background: var(--c-lt); color: var(--c-dk); }
.focus { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.focus > b { font-size: 15px; }
.focus > p { font-size: 13.5px; color: var(--muted); margin-top: -6px; }
.focus .chip-t { font-size: 13px; padding: 7px 12px; }
.focus-own { display: flex; gap: 8px; }
.focus-own input { flex: 1; min-width: 0; border: 1.5px solid #DDD2C2; border-radius: 12px; padding: 8px 12px; font-size: 14px; background: #fff; }
.focus-own input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242,140,40,.2); }
.limitbox { margin-top: 14px; background: var(--peach-2); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.limitbox > p { font-size: 14px; color: var(--ink-2); }
.limitbox .focus { margin-top: 2px; }
.limitbox > .btn { align-self: flex-start; }
.card.limit { box-shadow: 0 0 0 2px var(--orange), var(--sh); }

/* ---------- sessions ---------- */
.sm-lead { font-size: 15px; margin-top: 4px; }
.alldone > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.alldone .again { color: var(--ink-2); }
.alldone .btn { margin-top: 4px; }

/* ---------- session quote ---------- */
.quote { margin: 14px 0 0; padding: 14px 18px 14px 20px; border-left: 3px solid var(--orange); background: #fff; border-radius: 0 16px 16px 0; box-shadow: var(--sh); }
.quote blockquote { margin: 0; font: italic 400 17px/1.45 var(--serif); color: var(--ink); text-wrap: pretty; }
.quote figcaption { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--orange-dk); }
.quote figcaption span { font-weight: 400; color: var(--muted); }

/* ---------- spacing ---------- */
.tip { margin-top: 10px; font-size: 13px; color: var(--muted); padding-left: 22px; position: relative; }
.tip::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c, var(--orange)); }
.row-when small { display: block; font-size: 11.5px; color: var(--muted); text-align: right; }

/* ---------- stopping early ---------- */
.earlybox { margin-top: 14px; background: var(--bg); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.earlybox > p { font-size: 14px; color: var(--muted); margin-top: -4px; }
.donebar.short { color: #8A5B00; }

/* ---------- Today: one activity at a time ---------- */
.today { padding-top: 14px; }
.sess-head { padding: 0 2px 6px; }
.sh-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sh-row .eyebrow { margin: 0; }
.sm-link { font-size: 13px; color: var(--muted); text-decoration: none; padding: 4px 0; }
.q-line { margin-top: 6px; font: italic 400 14.5px/1.45 var(--serif); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-line span { font: 600 12px var(--sans); font-style: normal; color: var(--orange-dk); margin-left: 4px; }
.sess-head .exam { margin-top: 8px; padding: 8px 12px; font-size: 13.5px; }
.sess-head .mins { margin-top: 8px; }
.strip { display: flex; gap: 6px; overflow-x: auto; margin: 12px -16px 0; padding: 2px 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.strip::-webkit-scrollbar { display: none; }
.step { flex: none; display: inline-flex; align-items: center; gap: 7px; max-width: 190px; border: 0; cursor: pointer; background: #fff; border-radius: 99px; padding: 5px 12px 5px 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--c-lt); color: var(--c-dk); font-size: 12px; flex: none; }
.step .n svg { width: 15px; height: 15px; }
.step .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step.done { color: var(--muted); }
.step.done .n { background: var(--c); color: #fff; }
.cat-t.step.done .n { color: var(--ink); }
.step.on { box-shadow: inset 0 0 0 2px var(--c); color: var(--ink); }
.today .pbar { margin-top: 10px; height: 6px; }
.today .pbar-t { display: none; }
.card.focus { margin-top: 10px; padding: 18px 18px 16px; }
.cat-lbl { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-dk); margin-bottom: 4px; }
.card.focus .c-title h3 { font-size: 24px; }
.card.focus .timer { flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; }
.card.focus .play, .card.focus .ring { width: 172px; height: 172px; }
.card.focus .t-read { align-items: center; }
.card.focus .t-now { font-size: 46px; }
.card.focus .t-goal { font-size: 14px; }
.card.focus .timer .btn { min-width: 170px; }
.comment { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.comment label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.comment label small { font-weight: 400; color: var(--muted); }
.comment .c-row { display: flex; gap: 8px; align-items: flex-end; }
.comment textarea { flex: 1; min-width: 0; border: 1.5px solid #DDD2C2; border-radius: 12px; padding: 8px 12px; font-size: 14.5px; resize: vertical; background: #fff; }
.comment textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242,140,40,.2); }
.saved-note { font-size: 14px; background: var(--bg); border-radius: 10px; padding: 6px 10px; }
.fnav { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- compact focus card: everything above the fold ---------- */
.q-line { -webkit-line-clamp: 1; font-size: 13.5px; margin-top: 4px; }
.strip { margin-top: 10px; }
.card.focus { padding: 14px 18px 14px; }
.f-head { display: flex; justify-content: space-between; align-items: center; }
.f-head .cat-lbl { margin: 0; }
.f-nav { display: flex; gap: 6px; }
.arrow { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg); font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-2); }
.arrow:hover { background: var(--c-lt); }
.card.focus .c-top { flex-direction: row; align-items: flex-start; margin-top: 2px; }
.card.focus .c-title h3 { font-size: 22px; }
.card.focus .timer { flex-direction: row; align-items: center; gap: 14px; margin-top: 12px; }
.card.focus .play, .card.focus .ring { width: 92px; height: 92px; }
.card.focus .t-read { align-items: flex-start; }
.card.focus .t-now { font-size: 38px; }
.card.focus .timer .btn { min-width: 0; margin-left: auto; }
.f-grid { display: grid; grid-template-columns: 1fr; gap: 0 22px; }
.f-side .strat, .f-side .note { margin-top: 10px; padding: 8px 12px 9px; font-size: 14px; }
.f-side .strat .lbl b { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); margin-left: 2px; }
.f-side .strat p { margin-top: 2px; }
.f-side .note b { display: inline; margin-right: 6px; }
.f-side .tip { margin-top: 8px; }
.card.focus .rate { margin-top: 10px; padding-top: 10px; }
.card.focus .comment { margin-top: 10px; }
.comment textarea { min-height: 40px; overflow: hidden; }
.mini { margin-top: 8px; font-size: 14px; }
@media (min-width: 760px) {
  .f-grid { grid-template-columns: minmax(260px, 0.9fr) 1.1fr; align-items: start; }
  .card.focus .timer { flex-direction: column; align-items: center; gap: 8px; }
  .card.focus .t-read { align-items: center; }
  .card.focus .play, .card.focus .ring { width: 120px; height: 120px; }
  .card.focus .timer .btn { margin-left: 0; min-width: 160px; }
  .f-main .rate { justify-content: center; }
}
@media (max-width: 640px) {
  .card.focus .c-top { flex-direction: row; }
  .card.focus .when { font-size: 11px; padding: 2px 8px; }
  .card.focus .t-now { font-size: 34px; }
  .card.focus .play, .card.focus .ring { width: 80px; height: 80px; }
}
@media (min-width: 760px) {
  /* laptop: timer as one row, and the tabs move up into the top bar so nothing covers the card */
  .card.focus .timer { flex-direction: row; align-items: center; gap: 14px; }
  .card.focus .t-read { align-items: flex-start; }
  .card.focus .play, .card.focus .ring { width: 96px; height: 96px; }
  .card.focus .timer .btn { margin-left: auto; min-width: 0; }
  .f-main .rate { justify-content: flex-start; }
  .tabs { top: calc(9px + env(safe-area-inset-top)); bottom: auto; padding: 4px; box-shadow: none; }
  .tabs a { padding: 7px 14px; font-size: 13.5px; }
  .tabs a svg { width: 16px; height: 16px; }
  body[data-view="today"] .student, body[data-view="all"] .student, body[data-view="week"] .student { padding-bottom: 30px; }
  #toast { bottom: 24px; }
}
@media (min-width: 760px) {
  body[data-view="today"] .chip:not(.warn), body[data-view="all"] .chip:not(.warn), body[data-view="week"] .chip:not(.warn) { display: none; }
}
.card.focus .timer .btn { white-space: nowrap; }
.card.focus .rate { flex-wrap: nowrap; }
.card.focus .rate > span:first-child { white-space: nowrap; }
.card.focus .rate em { display: none; }
.f-main .note { margin-top: 10px; padding: 8px 12px; font-size: 14px; }
.f-main .note b { display: inline; margin-right: 6px; }
.tip-in { color: var(--muted); font-size: 13px; }
.sess-head .exam { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .card.focus .timer { margin-top: 8px; } .card.focus .c-title h3 { font-size: 20px; } }
/* timer: ring on the left, time + goal + button stacked on the right, so the button never gets squeezed */
.card.focus .timer { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; row-gap: 6px; align-items: center; }
.card.focus .timer .play { grid-row: 1 / 3; }
.card.focus .timer .t-read { grid-column: 2; align-self: end; align-items: flex-start; }
.card.focus .timer .btn { grid-column: 2; align-self: start; justify-self: start; margin-left: 0; flex: none; white-space: nowrap; min-width: 0; }
.card.focus .t-goal { white-space: nowrap; }
/* the quote and the exam line are never cut off: they wrap instead */
.q-line { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 13.5px; line-height: 1.4; }
.sess-head .exam { white-space: normal; overflow: visible; text-overflow: clip; }

/* ---------- editor: drag pieces between Repertoire study and Review ---------- */
.dropzone { border: 1.5px dashed transparent; border-radius: 16px; padding: 10px 12px; margin-top: 10px; background: var(--r-lt); transition: border-color .12s, background .12s; }
.dropzone.zone-review { background: var(--v-lt); --c: var(--v); --c-dk: var(--v-dk); --c-lt: var(--v-lt); }
.dropzone.over { border-color: var(--c); }
.zone-h { display: flex; align-items: baseline; gap: 8px; padding-bottom: 4px; }
.zone-h b { font-size: 14px; color: var(--c-dk); }
.zone-h small { font-size: 12.5px; }
.zone-empty { font-size: 13.5px; color: var(--muted); padding: 10px 0 6px; }
.dropzone .row { border-top-color: rgba(31,36,48,.09); }
.dropzone .zone-h + .row { border-top: 0; }
.grip { display: grid; grid-template-columns: repeat(2, 4px); gap: 3px; padding: 8px 5px; margin-left: -5px; cursor: grab; touch-action: none; flex: none; }
.grip i { width: 4px; height: 4px; border-radius: 50%; background: #A9A69E; pointer-events: none; }
.item-row.dragging { opacity: .35; }
.drag-ghost { position: fixed; z-index: 90; transform: translate(12px, -50%); pointer-events: none; max-width: 260px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 99px; box-shadow: var(--sh); }

/* activity tabs have room for their short labels */
.step { max-width: 240px; }

/* ---------- agenda line: every activity visible, never scrolls ---------- */
.strip { overflow: hidden; margin: 10px 0 0; padding: 2px; gap: 5px; }
.step { min-width: 0; }
.strip.stack { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.strip.stack .step { flex-direction: column; justify-content: flex-start; gap: 3px; max-width: none; border-radius: 12px; padding: 5px 3px 6px; font-size: 11px; line-height: 1.2; }
.strip.stack .step .n { width: 18px; height: 18px; font-size: 10.5px; }
.strip.stack .step .n svg { width: 12px; height: 12px; }
.strip.stack .step .t { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; text-align: center; }
.strip.stack .step .t { width: 100%; overflow-wrap: normal; }
.strip.stack.tiny .step .t { overflow-wrap: anywhere; }

/* ---------- phones: tabs live in the top bar, clear of the Netlify badge in the bottom corner ---------- */
@media (max-width: 759px) {
  body[data-view="today"] .brand span, body[data-view="all"] .brand span, body[data-view="week"] .brand span { display: none; }
  .tabs { left: 58px; right: auto; transform: none; top: calc(11px + env(safe-area-inset-top)); bottom: auto; padding: 3px; gap: 2px; box-shadow: none; }
  .tabs a { padding: 8px 10px; font-size: 13px; }
  .tabs a svg { width: 18px; height: 18px; }
  .tabs a span { display: none; }
  .tabs a.on span { display: inline; }
  .who { max-width: 84px; padding: 7px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .student { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(64px + env(safe-area-inset-bottom)); }
}
@media (max-width: 359px) { .tabs a.on span { display: none; } .tabs a { padding: 8px 12px; } }
/* narrow tabs: a little more room so 7-letter words stay whole; longer names stay readable in the top bar */
.strip.stack.tiny .step { font-size: 10.5px; padding-left: 2px; padding-right: 2px; }
@media (min-width: 360px) and (max-width: 759px) { .who { max-width: 100px; padding: 7px 9px; } }

/* ---------- satisfying timer ---------- */
.ring-fill { fill: var(--c); opacity: .22; }
.ring-water { transition: y .5s linear; }
.card.over .ring-bg { fill: var(--m-lt); }
.card.over .ring-fill { fill: var(--ok); opacity: .3; }
.card.over .t-goal { color: var(--m-dk); font-weight: 600; }
.card.ding .play { animation: goalpop .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes goalpop { 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.spark { position: fixed; z-index: 95; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; pointer-events: none; animation: spark .85s ease-out forwards; }
@keyframes spark { 0% { transform: translate(0, 0) scale(.6); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }
/* a check pops into the agenda tab you just finished */
.step.just .n { animation: tabpop .6s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes tabpop { 0% { transform: scale(.3); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.pbar .seg i { transition: width .6s ease-out; }

/* ---------- session complete ---------- */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 96; pointer-events: none; }
.done-panel { margin-top: 12px; background: #fff; border-radius: var(--rad); box-shadow: var(--sh); padding: 26px 22px 24px; text-align: center; }
.done-badge svg { width: 84px; height: 84px; display: block; margin: 0 auto 8px; }
.db-ring { fill: var(--m-lt); stroke: var(--ok); stroke-width: 4; }
.db-check { fill: none; stroke: var(--ok); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.done-panel.fresh .db-ring { stroke-dasharray: 176; stroke-dashoffset: 176; animation: draw .7s ease-out .1s forwards; }
.done-panel.fresh .db-check { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s ease-out .75s forwards; }
.done-panel.fresh .done-badge { animation: tabpop .8s cubic-bezier(.3, 1.6, .5, 1) .7s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-panel h2 { font-size: 30px; }
.done-sub { color: var(--muted); margin-top: 6px; }
.done-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 14px; }
.done-stats div { background: var(--bg); border-radius: 14px; padding: 10px 6px; }
.done-stats b { display: block; font: 600 28px/1.1 var(--serif); }
.done-stats span { font-size: 12.5px; color: var(--muted); }
.done-list { list-style: none; margin: 0 auto 16px; padding: 0; max-width: 520px; text-align: left; }
.done-list li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 14.5px; }
.done-list li:first-child { border-top: 0; }
.done-list .ck { width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; }
.done-list .cat-t .ck { color: var(--ink); }
.done-list .ck svg { width: 15px; height: 15px; }
.done-list .dl-t { flex: 1; min-width: 0; }
.done-list .dl-m { color: var(--muted); font-size: 13px; white-space: nowrap; }
.done-panel.fresh .done-list li { opacity: 0; animation: rise .45s ease-out forwards; animation-delay: calc(1s + var(--i) * 110ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.done-break { background: var(--peach-2); border-radius: 14px; padding: 10px 14px; font-size: 14.5px; margin: 0 auto 16px; max-width: 520px; text-align: left; }

/* ---------- lesson steps on the activity card ---------- */
.steps { margin-top: 10px; background: #fff; border: 1.5px solid var(--c-lt); border-radius: 14px; padding: 9px 12px 10px; }
.steps .st-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.steps .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-dk); }
.st-n { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.steps.all .st-n { color: var(--m-dk); }
.steps ol { list-style: none; margin: 6px 0 0; padding: 0; }
.steps li { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; font-size: 14px; line-height: 1.4; }
.steps li.now { background: var(--c-lt); margin: 2px -8px; padding: 6px 8px; border-radius: 10px; font-weight: 600; }
.steps li.done .st-t { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(91,97,114,.4); }
.st-num { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 12px; padding-top: 2px; }
.st-box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid #CFC8BC; background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; color: transparent; }
.st-box svg { width: 15px; height: 15px; }
li.done .st-box, .st-box.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.st-box.pop { animation: tabpop .5s cubic-bezier(.3, 1.8, .5, 1); }
.st-more { font-size: 12.5px; padding: 2px 0; }
.st-bar { height: 5px; background: var(--bg); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.st-bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .5s ease-out; }
.strat.mini p { display: none; }
.strat.mini { padding-bottom: 8px; }

/* ---------- lesson steps in the teacher's editor ---------- */
.st-editor { display: flex; flex-direction: column; gap: 6px; }
.st-edit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.st-edit li { display: flex; align-items: center; gap: 6px; }
.st-edit input { flex: 1; min-width: 0; min-height: 38px !important; padding: 6px 10px !important; font-size: 14px !important; }
.st-ctl { width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(255,255,255,.7); cursor: pointer; color: var(--ink-2); font-size: 15px; flex: none; }
.st-ctl:disabled { opacity: .3; cursor: default; }
.st-add { display: flex; gap: 8px; align-items: flex-end; }
.st-add textarea { flex: 1; min-width: 0; min-height: 40px !important; resize: none; overflow: hidden; }

/* ---------- lesson notes in / out ---------- */
.notes-io { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.notes-io.open { display: block; }
.notes-io.open > * + * { margin-top: 12px; }
.imp-text { font-family: var(--sans); font-size: 14px; line-height: 1.5; }
.imp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.imp-list > li { background: var(--c-lt); border-radius: 14px; padding: 10px 12px; }
.imp-list > li.off { opacity: .5; }
.imp-on { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; cursor: pointer; }
.imp-on input { width: 18px; height: 18px; accent-color: var(--orange-dk); }
.imp-on b { font-size: 15px; }
.imp-list select { margin-top: 8px; max-width: 360px; min-height: 38px !important; font-size: 14px !important; padding: 6px 10px !important; }
.imp-note { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; font-style: italic; }
.imp-list ol { margin: 6px 0 0 18px; padding: 0; font-size: 13.5px; color: var(--ink-2); }
.imp-replace { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; }
.imp-replace input { width: 18px; height: 18px; accent-color: var(--orange-dk); }
.steps li.done .st-t { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
/* phones: one column in a fixed order: timer, lesson steps, rating, teacher note, strategy, then "How's it going?" */
@media (max-width: 759px) {
  .card.focus .f-grid { display: flex; flex-direction: column; }
  .card.focus .f-main, .card.focus .f-side { display: contents; }
  .card.focus .timer { order: 1; }
  .card.focus .mini { order: 2; }
  .card.focus .steps { order: 3; }
  .card.focus .rate { order: 4; }
  .card.focus .note { order: 5; }
  .card.focus .strat { order: 6; }
  .card.focus .limitbox, .card.focus .earlybox, .card.focus .focus, .card.focus .manual, .card.focus .donebar { order: 1; }
  .card.focus .comment { order: 7; }
}

/* ---------- simpler item editor: title, steps, note; everything else under Settings ---------- */
.item-edit { gap: 14px; }
.ie-title.ie-title { font: 560 21px/1.25 var(--serif) !important; letter-spacing: -.01em; }
.ie-note textarea { min-height: 0 !important; }
.ie-more { border-top: 1px solid rgba(31,36,48,.08); padding-top: 10px; }
.more-toggle { width: 100%; display: flex; align-items: baseline; gap: 10px; border: 0; background: none; padding: 4px 0; cursor: pointer; text-align: left; font-size: 14px; }
.mt-l { font-weight: 600; color: var(--ink-2); flex: none; }
.mt-s { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-c { color: var(--muted); flex: none; }
.adv { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.adv-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; }
.adv-l { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.adv .chip-t { padding: 6px 12px; font-size: 13px; }
.ie-act { align-items: center; }
.ie-gap { flex: 1; }
.ie-act .link { font-size: 13.5px; }
@media (max-width: 640px) { .adv-row { grid-template-columns: 1fr; gap: 4px; } }
.st-editor > .link { align-self: flex-start; }
.mt-c { color: var(--orange-dk); font-weight: 600; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(181,86,10,.35); }

/* ---------- simpler plan page: name, one summary line, the weekly actions ---------- */
.plan-head { display: flex; flex-direction: column; gap: 10px; }
.plan-head .name-in.name-in { margin-bottom: 0; }
.plan-set { border-top: 1px solid var(--line); padding-top: 12px; }
.plan-set .grid2 { margin-top: 14px; }
.head-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; }
.code-mini { font-size: 13px; color: var(--muted); margin-left: 4px; }
.code-mini b { font-family: ui-monospace, Menlo, monospace; letter-spacing: .1em; color: var(--orange-dk); }
.plan-more .more-body { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.plan-more .sub { border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- phones: everything centered, bigger timer ---------- */
@media (max-width: 759px) {
  .sess-head { text-align: center; }
  .sh-row { justify-content: center; gap: 14px; }
  .sess-head .mins { justify-content: center; }
  .card.focus .f-head { justify-content: center; }
  /* title on one line, then detail + "7 days ago" badge share the next line */
  .card.focus .c-top { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; text-align: center; gap: 2px 8px; margin-top: 0; }
  .card.focus .c-title { display: contents; }
  .card.focus .c-title h3 { flex-basis: 100%; }
  .card.focus .c-top .detail { margin-top: 0; }
  .card.focus .c-top .when { margin-top: 0; }
  /* timer: big ring and big time side by side, centered as a pair, so the whole card fits without scrolling */
  .card.focus .timer { display: grid; grid-template-columns: auto auto; justify-content: center; column-gap: 18px; row-gap: 6px; margin-top: 10px; }
  .card.focus .timer .play, .card.focus .timer .ring { width: 124px; height: 124px; }
  .card.focus .t-now { font-size: 46px; }
  .card.focus .t-goal { font-size: 14px; }
  .card.focus .timer .btn { min-width: 150px; }
  .card.focus .rate { justify-content: center; }
  .card.focus .donebar, .card.focus .manual { justify-content: center; }
  .card.focus .donebar span { flex: none; }
  .card.focus .mini { text-align: center; }
}
@media (max-width: 759px) and (max-height: 700px) {
  .card.focus .timer .play, .card.focus .timer .ring { width: 108px; height: 108px; }
  .card.focus .t-now { font-size: 40px; }
}
@media (max-width: 759px) {
  .card.focus .earlybox, .card.focus .limitbox, .card.focus .focus { text-align: center; align-items: center; }
  .card.focus .earlybox .chips, .card.focus .limitbox .chips, .card.focus .focus .chips { justify-content: center; }
  .card.focus .limitbox > .btn { align-self: center; }
}
@media (max-width: 759px) { .card.focus .focus .focus-own { align-self: stretch; } }
@media (max-width: 759px) { .card.focus .donebar { flex-wrap: wrap; row-gap: 2px; } .card.focus .donebar .link { white-space: nowrap; } }
/* phones: page headings on All items and My week centered too; the lists stay left so they read easily */
@media (max-width: 759px) {
  .student .hero { text-align: center; }
  .student .hero .legend { justify-content: center; }
  .student .panel > .h3 { justify-content: center; text-align: center; }
  .student .panel .legend { justify-content: center; }
}
@media (max-width: 759px) { .start .hello { text-align: center; } .start .panel > .h3 { justify-content: center; text-align: center; } .start .panel > .muted { text-align: center; } }
/* phones: tighter session header and card gaps so "How's it going?" is on screen without scrolling */
@media (max-width: 759px) {
  .today { padding-top: 10px; }
  .sess-head { padding-bottom: 2px; }
  .q-line { font-size: 13px; line-height: 1.35; margin-top: 2px; }
  .sess-head .exam { margin-top: 6px; padding: 6px 10px; font-size: 13px; line-height: 1.4; }
  .strip { margin-top: 8px; }
  .today .pbar { margin-top: 8px; }
  .card.focus { margin-top: 8px; padding-top: 12px; padding-bottom: 12px; }
  .card.focus .rate { margin-top: 8px; padding-top: 8px; }
  .card.focus .note, .card.focus .strat, .card.focus .steps, .card.focus .comment { margin-top: 8px; }
}
/* short phones (Safari with its toolbars): smaller type in the header and boxes, same content */
@media (max-width: 759px) and (max-height: 860px) {
  .top-in { min-height: 54px; }
  .q-line { font-size: 12.5px; }
  .sess-head .exam { font-size: 12.5px; padding: 5px 10px; }
  .strip.stack .step { padding: 4px 3px 5px; gap: 2px; }
  .strip.stack .step .n { width: 16px; height: 16px; font-size: 10px; }
  .card.focus .c-title h3 { font-size: 19px; }
  .card.focus .detail { font-size: 13px; }
  .card.focus .timer { margin-top: 8px; }
  .card.focus .timer .btn { min-height: 38px; }
  .card.focus .rate-b button { width: 30px; height: 30px; }
  .card.focus .note, .card.focus .strat { padding: 6px 10px 7px; font-size: 13.5px; line-height: 1.45; }
  .card.focus .comment textarea { min-height: 36px; padding: 6px 10px; }
  .card.focus .comment .btn { min-height: 36px; }
}
@media (max-width: 759px) and (max-height: 860px) {
  .today { padding-top: 6px; }
  .sh-row .eyebrow, .sh-row .sm-link { line-height: 1.3; padding: 0; }
  .sess-head .exam { margin-top: 4px; }
  .strip, .today .pbar, .card.focus { margin-top: 6px; }
  .card.focus .rate { margin-top: 6px; padding-top: 6px; }
  .card.focus .note, .card.focus .strat, .card.focus .steps, .card.focus .comment { margin-top: 6px; }
}
/* lesson steps: on phones show only the current step and the next one ("Show all" opens the rest) */
.st-more.phone-only { display: none; }
@media (max-width: 759px) {
  .card.focus .steps { position: relative; padding: 7px 10px 8px; }
  .card.focus .steps .st-h { justify-content: flex-start; gap: 10px; }
  .card.focus .steps .st-more { display: inline; position: absolute; top: 5px; right: 10px; }
  .card.focus .steps:not(.open) li.done, .card.focus .steps:not(.open) li.now ~ li ~ li { display: none; }
  .card.focus .steps ol { margin-top: 4px; }
  .card.focus .steps li { padding: 3px 0; font-size: 13.5px; }
  .card.focus .steps li.now { margin: 1px -6px; padding: 4px 6px; }
  .card.focus .steps .st-bar { display: none; }
  .today { padding-top: 8px; }
}

/* phones: timer centered and stacked (ring, then time + goal, then the button); js fitTimer sets --ring
   to the biggest size that keeps the card on screen, or adds .side to put the time beside the ring */
@media (max-width: 759px) {
  .card.focus .timer { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 10px; }
  .card.focus .timer .play, .card.focus .timer .ring { width: var(--ring, 180px); height: var(--ring, 180px); }
  .card.focus .timer .t-read { flex-direction: row; align-items: baseline; justify-content: center; gap: 10px; align-self: auto; }
  .card.focus .timer .t-now { font-size: 48px; }
  .card.focus .timer .btn { align-self: center; min-width: 170px; margin-top: 4px; }
  .card.focus .timer.side { display: grid; grid-template-columns: auto auto; justify-content: center; column-gap: 18px; row-gap: 6px; }
  .card.focus .timer.side .t-read { flex-direction: column; align-items: flex-start; gap: 0; }
  .card.focus .timer.side .t-now { font-size: 46px; }
  .card.focus .timer.side .btn { min-width: 150px; margin-top: 0; }
}

/* ---------- student: add a piece (All items) ---------- */
.add-mine { margin-top: 14px; }
.add-piece { display: flex; flex-direction: column; gap: 14px; border-top: 5px solid var(--orange); }
.add-piece .h3 { margin: 0; }
.ap-row { display: flex; flex-direction: column; gap: 6px; }
.ap-row .lbl-t { margin: 0; }
.ap-diff { gap: 8px; }
.ap-diff button { width: 44px; height: 44px; font-size: 16px; }
.ap-act { display: flex; align-items: center; gap: 16px; }
.mine-del { font-size: 12.5px; padding: 0 2px; margin-left: 4px; }
@media (max-width: 759px) {
  .add-piece { text-align: center; }
  .add-piece .ap-row { align-items: center; }
  .add-piece .ap-row input { text-align: center; }
  .add-piece .chips, .add-piece .ap-act { justify-content: center; }
}
.add-piece { --c: var(--ink); --c-lt: var(--peach-2); }

/* ---------- difficulty: Easy (green), Medium (yellow), Hard (red) ---------- */
.rate-b .dbtn, .rate-b .dbtn:hover { width: auto; min-width: 0; height: 32px; padding: 0 13px; border-radius: 99px; font-size: 13.5px; font-weight: 600; }
.dbtn.d-easy { background: #E8F4EE; color: #2A6A50; }
.dbtn.d-med { background: #FDF1D6; color: #7A5200; }
.dbtn.d-hard { background: #FCE6E0; color: #A8361F; }
.rate-b .dbtn.d-easy.on { background: #3E8E6E; color: #fff; }
.rate-b .dbtn.d-med.on { background: #F2C230; color: var(--ink); }
.rate-b .dbtn.d-hard.on { background: #C8452C; color: #fff; }
.rate-short { display: none; }
.ap-diff .dbtn { height: 40px; padding: 0 18px; font-size: 14.5px; }
.adv .rate-b { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---------- tempo row on the activity card ---------- */
.tempo { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.tp-l { font-weight: 600; color: var(--ink-2); }
.tp-step { display: inline-flex; align-items: center; background: var(--bg); border-radius: 99px; }
.tp-step button { width: 38px; height: 38px; border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: 50%; color: var(--ink-2); }
.tp-step button:hover { background: var(--c-lt); }
.tp-step input { width: 52px; border: 0; background: none; text-align: center; font: 700 18px var(--sans); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; padding: 0; }
.tp-step input::-webkit-outer-spin-button, .tp-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tp-goal { color: var(--muted); font-size: 13.5px; }
.tp-goal .link, .link.tp-goal { font-size: 13px; padding: 2px 0; }
.tp-gedit { display: inline-flex; gap: 6px; align-items: center; }
.tp-gedit input { width: 76px; border: 1.5px solid #DDD2C2; border-radius: 10px; padding: 6px 8px; font-size: 14px; background: #fff; }
.tp-hint { flex-basis: 100%; font-size: 12.5px; color: var(--muted); margin: 0; }
.ie-bpm { max-width: 360px; }
@media (max-width: 759px) {
  .card.focus .tempo { order: 2; justify-content: center; text-align: center; margin-top: 8px; padding-top: 8px; }
  .card.focus .rate-long { display: none; }
  .card.focus .rate-short { display: inline; }
}
.card .rate-b button.dbtn, .panel .rate-b button.dbtn { width: auto; min-width: 0; height: 32px; padding: 0 13px; border-radius: 99px; font-size: 13.5px; }
.panel .ap-diff button.dbtn { height: 40px; padding: 0 18px; font-size: 14.5px; }
.card.focus .rate-b { gap: 6px; }

/* phones: iPhone Safari zooms the page in when a text box under 16px gets focus, so every box is 16px */
@media (max-width: 759px) {
  input:not([type=checkbox]):not([type=range]):not([type=radio]), textarea, select { font-size: 16px !important; }
}

/* ---------- tempo ladder: 65 / 85 / 100 / 110% of the goal ---------- */
.ladder { flex-basis: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 2px; }
.lad { border: 0; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 12px; padding: 5px 4px; display: flex; flex-direction: column; align-items: center; line-height: 1.15; color: var(--ink-2); }
.lad span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.lad b { font-size: 16px; font-variant-numeric: tabular-nums; }
.lad.cur { box-shadow: inset 0 0 0 2px var(--c, var(--ink)); }
.lad.done { background: #E8F4EE; box-shadow: inset 0 0 0 1.5px #3E8E6E; }
.lad.done span { color: #2A6A50; }
.lad.done.cur { box-shadow: inset 0 0 0 2px #3E8E6E; }
/* rating: outline = the difficulty so far, filled with a check = what the student picked today */
.rate-b .dbtn.d-easy.was { box-shadow: inset 0 0 0 2px #3E8E6E; }
.rate-b .dbtn.d-med.was { box-shadow: inset 0 0 0 2px #E0AE14; }
.rate-b .dbtn.d-hard.was { box-shadow: inset 0 0 0 2px #C8452C; }

/* ---------- sections of a piece ---------- */
.f-head { position: relative; }
.sec-add { font-size: 12.5px; padding: 2px 0; }
@media (max-width: 759px) { .card.focus .sec-add { position: absolute; right: 0; top: -2px; } }
.sec-add-row { font-size: 12.5px; padding: 0 2px; margin-left: 4px; }
.list .sec-row { margin-left: 22px; border-top-style: dashed; }
.list .sec-row .row-t b { font-weight: 500; }
.sec-form { background: var(--c-lt, var(--peach-2)); border-radius: 16px; padding: 12px 14px; margin: 10px 0 6px; display: flex; flex-direction: column; gap: 10px; }
.sec-form label.lbl-t { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.sec-form input { width: 100%; border: 1.5px solid #DDD2C2; border-radius: 12px; padding: 9px 12px; font-size: 15px; background: #fff; }
.sec-form input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242,140,40,.2); }
.sf-row { display: flex; align-items: center; gap: 10px; }
.sf-row .lbl-t { margin: 0; }
.sec-form .rate-b { display: inline-flex; gap: 6px; }
.sec-form .rate-b button.dbtn { width: auto; height: 36px; padding: 0 16px; border: 0; border-radius: 99px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sec-form > p { margin: 0; }
@media (max-width: 759px) { .sec-form { text-align: center; } .sec-form .sf-row, .sec-form .ap-act { justify-content: center; } }

/* ---------- end session early ---------- */
.sh-row { flex-wrap: wrap; row-gap: 2px; }
.end-sess { color: var(--late); text-decoration-color: rgba(200,69,44,.35); text-decoration-line: underline; text-underline-offset: 3px; font-weight: 600; }
.done-list li.skip { color: var(--muted); }
.done-list li.skip .ck { background: #ECEAE5; color: var(--muted); font-weight: 700; }
.done-list li.skip .dl-m { font-style: italic; }

/* ---------- practice history: 30-day timeline (one square per day) ---------- */
.tl-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.tl-key span { display: inline-flex; align-items: center; gap: 5px; }
.tl-key i { width: 11px; height: 11px; border-radius: 3px; background: var(--ink-2); display: inline-block; }
.tl-key i.l1 { opacity: .3; } .tl-key i.l2 { opacity: .6; }
.tl-row { padding: 8px 0; border-top: 1px solid var(--line); }
.tl-row.tl-head { border-top: 0; padding: 0 0 3px; }
.tl-name { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.tl-name b { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-name small { font-size: 12px; color: var(--muted); white-space: nowrap; flex: none; }
.tl-cells { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; }
.tl-cells i { height: 14px; border-radius: 3px; background: #F0EEE9; }
.tl-cells i.l1, .tl-cells i.l2, .tl-cells i.l3 { background: var(--c); }
.tl-cells i.l1 { opacity: .3; } .tl-cells i.l2 { opacity: .6; }
.tl-cells i.is-today { box-shadow: 0 0 0 1.5px var(--ink); }
.tl-head span { font-size: 10px; line-height: 1; color: var(--muted); white-space: nowrap; overflow: visible; }
.tl-head span.is-today { color: var(--ink); font-weight: 700; direction: rtl; }
.tl-any { --c: var(--ink); }
.tl-any .tl-name b { font-weight: 700; }
@media (min-width: 760px) { .tl-cells i { height: 18px; } }
