@import url("./tokens.css");
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
a { color: var(--green); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #b47735; outline-offset: 3px; }
.skip-link { position: fixed; top: -100px; z-index: 20; padding: 12px; background: white; }
.skip-link:focus { top: 8px; }
.shell { display: grid; grid-template-columns: 222px minmax(0,1fr); min-height: 100vh; }
.sidebar { background: var(--green); color: #fff; padding: 30px 20px; display: flex; flex-direction: column; gap: 30px; }
.brand { color: inherit; font-family: Georgia, serif; font-size: 38px; font-weight: normal; margin: 0; letter-spacing: -2px; }
.bean-icon { display: inline-block; width: 20px; height: 27px; background: #c5dbaa; border-radius: 60% 45% 55% 40%; transform: rotate(30deg); margin-right: 10px; vertical-align: baseline; }
.sidebar small { color: #d5e4d5; }
.nav { display: grid; gap: 9px; }
.nav button { border: 0; background: none; color: #e9efea; text-align: left; border-radius: 9px; padding: 13px 15px; font-size: 15px; }
.nav button.active, .nav button:hover { background: #ffffff1c; color: white; }
.sidebar-footer { margin-top: auto; font-size: 12px; color: #cfdfd3; border-top: 1px solid #ffffff26; padding-top: 20px; }
.main-wrap { min-width: 0; }
.topbar { padding: 18px 38px; border-bottom: 1px solid var(--line); background: #fffcf6; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.eyebrow { text-transform: uppercase; font-size: 11px; letter-spacing: 1.8px; color: var(--muted); font-weight: 700; }
.topbar .eyebrow { color: var(--green); }
.content { padding: 34px 38px 60px; max-width: 1440px; margin: auto; }
h1 { font-family: Georgia, serif; font-size: clamp(30px,3vw,42px); line-height: 1.16; letter-spacing: -1px; font-weight: normal; margin: 8px 0 12px; }
h2 { font-size: 19px; font-weight: 650; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.page-head { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 27px; }
.page-head p { max-width: 600px; margin: 0; }
.button { border: 1px solid var(--green); background: var(--green); color: white; border-radius: 9px; padding: 10px 17px; font-size: 14px; font-weight: 600; min-height: 43px; }
.button.secondary { background: transparent; color: var(--green); border-color: #bdc9be; }
.button.ghost { background: none; border-color: transparent; color: var(--green); padding-inline: 7px; }
.button.danger { background: #8e3c2e; border-color: #8e3c2e; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.notice { padding: 13px 17px; background: #f1eadb; border: 1px solid #e2d7c2; border-radius: 10px; font-size: 13px; margin-bottom: 25px; }
.notice.green { background: #e9f0e3; border-color: #ccdabe; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-bottom: 28px; }
.stat, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 23px; }
.stat strong { display: block; font-size: 31px; font-weight: 550; line-height: 1.4; margin-top: 6px; color: var(--green); }
.grid { display: grid; gap: 18px; }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); }
.two-col { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,1fr); gap: 22px; align-items: start; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 27px 0 14px; }
.section-head h2 { margin: 0; }
.empty { text-align: center; border: 1px dashed #b9c5b6; border-radius: 13px; padding: 35px 24px; background: #fafbf5; }
.empty-icon { font-family: Georgia, serif; font-size: 36px; color: #6f8962; margin-bottom: 12px; }
.learner-card { position: relative; overflow: hidden; }
.avatar { width: 38px; height: 38px; background: #e9e8db; color: var(--green); border-radius: 50%; display: grid; place-items: center; font-weight: 700; }
.row { display: flex; gap: 13px; align-items: center; }
.spread { justify-content: space-between; }
.balance { text-align: center; padding: 22px 0 15px; }
.balance .arc { width: 120px; height: 60px; margin: auto; border: 9px solid #dfe8d7; border-bottom: 0; border-radius: 100px 100px 0 0; }
.balance strong { display: block; font-size: 35px; line-height: 1.1; margin-top: -29px; color: var(--green); font-weight: 550; }
.balance span { display: block; margin-top: 7px; font-size: 12px; color: var(--muted); }
.divider { border-top: 1px solid var(--line); margin: 18px 0; }
.tag { display: inline-block; border-radius: 5px; background: #edf0e8; color: #36533b; padding: 3px 7px; font-size: 11px; font-weight: 600; }
.tag.amber { background: #f4e8cd; color: #73521e; }
.tag.red { background: #f8e1da; color: #87392b; }
.list { display: grid; }
.list-item { border-bottom: 1px solid var(--line); padding: 16px 0; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.list-item:last-child { border-bottom: 0; }
.list-item p { margin: 3px 0; }
.positive { color: #35664b; font-weight: 650; white-space: nowrap; }
.negative { color: #a04d3b; font-weight: 650; white-space: nowrap; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; margin-bottom: 15px; }
input, select, textarea { width: 100%; background: white; color: var(--ink); border: 1px solid #bfc6bb; border-radius: 7px; padding: 10px 12px; min-height: 43px; font-size: 14px; }
textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.form-error { color: #943f2e; background: #fff2ec; padding: 10px; border-radius: 6px; margin: 10px 0; font-size: 13px; }
.form-error:empty { display: none; }
.drop { display: grid; text-align: center; border: 2px dashed #b4c2a9; padding: 30px 20px; border-radius: 12px; background: #f4f6ec; margin-bottom: 20px; }
.drop.drag { background: #e0ead6; }
.drop input { max-width: 400px; margin: auto; font-weight: normal; }
details { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 18px; }
summary { cursor: pointer; color: var(--green); font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.source { max-height: 310px; overflow: auto; border: 1px solid var(--line); background: #fbfaf5; border-radius: 7px; padding: 15px; font-size: 14px; }
.source p { white-space: pre-wrap; }
.source-index { font-size: 11px; color: var(--muted); font-family: ui-sans-serif, sans-serif; display: block; }
.reader { font-family: Georgia, serif; font-size: 25px; line-height: 2.1; padding: 25px 5px; min-height: 220px; }
.word { font-family: inherit; font-size: inherit; color: inherit; background: transparent; border: 0; border-radius: 4px; padding: 0 3px; line-height: inherit; }
.word.current { background: #e1d797; box-shadow: 0 2px 0 #9c8022; }
.word.heard { background: #dcebd4; }
.word.heard.current { box-shadow: 0 2px 0 #9c8022; }
.word:hover { text-decoration: underline; text-decoration-color: #9aab91; }
.activity-link { color: inherit; text-decoration: none; border-radius: 7px; padding-inline: 10px; margin-inline: -10px; }
.activity-link:hover { background: #edf1e7; }
.activity-action { display: grid; gap: 8px; justify-items: end; flex-shrink: 0; color: var(--green); font-weight: 600; }
.reader-content { padding-top: 12px; }
.reader-content .page-head { margin-bottom: 12px; }
.reader-content .page-head p, .reader-content .page-head .eyebrow { display: none; }
.reader-content h1 { font-size: clamp(25px,2.6vw,35px); }
.reading-room { position: relative; }
.reading-panel { padding: 14px 20px; }
.reading-toolbar { position: sticky; top: 0; z-index: 5; background: var(--surface); padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.reading-tools { margin-left: auto; }
.recording-line { flex-basis: 100%; }
.reading-page { padding: 0; min-height: 180px; height: 45vh; overflow: hidden; line-height: 1.7; margin-top: 12px; }
.reader-token { display: inline-block; font: inherit; line-height: inherit; border: 0; padding: 0 3px; }
.reader-measure { position: absolute; top: 0; left: 0; height: auto; min-height: 0; padding: 0; margin: 0; line-height: 1.7; visibility: hidden; pointer-events: none; }
.bookmark-status { margin: 8px 0 0; }
.reading-panel details { margin-top: 8px; padding-top: 8px; }
.reading-panel summary { margin-bottom: 4px; }
.recording-results { margin-top: 15px; }
.recording-dialog { max-height: 85dvh; overflow: auto; }
.recording-history-scroll { max-height: 55dvh; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 12px 0; margin-bottom: 14px; }
.recording-chapter { margin: 24px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.chapter-navigation { margin-top: 20px; }
a.button { text-decoration: none; display: inline-flex; align-items: center; }
[hidden] { display: none !important; }
progress { width: 100%; accent-color: var(--green); height: 8px; }
.recording { color: #a13929; font-weight: 650; }
.question { margin-top: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.choice { display: flex; align-items: center; gap: 10px; font-weight: normal; }
.choice input { width: 18px; min-height: auto; flex-shrink: 0; }
audio { max-width: 100%; width: 100%; }
.login { max-width: 480px; margin: 9vh auto; padding: 0 20px; }
.login .brand { color: var(--green); margin-bottom: 24px; }
.login .card { padding: 30px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 15px 22px; background: #244d3e; color: white; border-radius: 11px; box-shadow: 0 6px 30px #183a2426; z-index: 50; max-width: min(92vw,620px); }
.toast button { background: none; color: white; border: 1px solid #afc2a9; border-radius: 5px; margin-left: 14px; padding: 4px 9px; }
dialog { border: 1px solid var(--line); border-radius: 15px; padding: 25px; max-width: min(95vw,520px); width: 520px; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #183c3059; }
.loading { padding: 50px; color: var(--muted); }
.back { margin-bottom: 12px; }
.right { text-align: right; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 174px minmax(0,1fr); }
  .sidebar { padding: 24px 12px; }
  .content { padding: 25px 22px 60px; }
  .topbar { padding: 15px 22px; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .learner-shell .sidebar { display: none; }
  .learner-shell .topbar { padding: 6px 12px; justify-content: flex-end; }
  .learner-shell .topbar .eyebrow { display: none; }
  .learner-shell .reader-content { padding: 8px 12px 20px; }
  .reader-content .page-head p, .reader-content .page-head .eyebrow { display: none; }
  .reader-content .page-head { margin: 0 0 8px; }
  .reader-content h1 { font-size: 23px; margin: 5px 0; }
  .reading-panel.card { padding: 8px 12px; }
  .reading-toolbar { gap: 6px; padding: 6px 0; }
  .reading-toolbar > .actions:first-child { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 5px; }
  .reading-toolbar > .actions:first-child > span { grid-column: 1 / -1; order: -1; }
  .reading-tools { display: grid; width: 100%; grid-template-columns: 40px 35px 40px minmax(0,1fr); gap: 5px; margin: 0; }
  .reading-tools .button { padding: 7px 4px; font-size: 12px; }
  .reading-toolbar .button { font-size: 12px; }
  .reading-toolbar .recording-line { font-size: 11px; }
  .reading-room > .small { font-size: 12px; line-height: 1.4; margin-bottom: 8px; }
  .bookmark-status { font-size: 11px; line-height: 1.4; }
  .shell { display: block; }
  .sidebar { padding: 13px 16px; gap: 10px; }
  .sidebar .brand { font-size: 30px; }
  .sidebar > div > small, .sidebar-footer { display: none; }
  .nav { display: flex; gap: 5px; }
  .nav button { padding: 9px 12px; flex: 1; text-align: center; font-size: 13px; }
  .topbar { padding: 12px 18px; font-size: 12px; }
  .content { padding: 22px 16px 60px; }
  .stats { gap: 8px; }
  .stat { padding: 13px 10px; }
  .stat strong { font-size: 25px; }
  .stat .small { font-size: 11px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 16px; }
  .fields { grid-template-columns: 1fr; }
  .card { padding: 19px; }
  .reader { font-size: 23px; }
  .list-item { align-items: flex-start; }
}

/* Shared dense library controls, used identically in browser and native shell. */
.check-label { display:flex; align-items:center; gap:9px; font-weight:500; }
.check-label input[type=checkbox], .library-table input[type=checkbox] { width:18px; height:18px; flex:0 0 auto; margin:0; }
.table-scroll { overflow:auto; max-width:100%; border:1px solid var(--line,#ddd); border-radius:12px; background:var(--paper,#fffefa); }
.library-table { width:100%; min-width:1040px; border-collapse:collapse; font-size:14px; }
.library-table caption { text-align:left; padding:14px; font-size:13px; color:#617065; }
.library-table th { text-align:left; position:sticky; top:0; z-index:1; background:#edf1e9; padding:9px; }
.library-table td { border-top:1px solid #e2e4da; padding:9px; vertical-align:top; }
.library-table tr:focus-within { background:#f3f6ec; }
.library-table th:first-child { width:44px; }
.library-table td:nth-child(2) { min-width:230px; }
.library-table td:nth-child(3), .library-table td:nth-child(4) { min-width:145px; }
.library-table td:nth-child(5) { min-width:210px; }
.library-table input:not([type=checkbox]), .library-table textarea { font-size:14px; padding:8px; width:100%; min-height:38px; border:1px solid transparent; background:transparent; }
.library-table input:hover, .library-table textarea:hover { border-color:#c9d4c4; }
.library-table input:focus, .library-table textarea:focus { border-color:#356750; background:white; }
.table-actions { display:flex; flex-direction:column; gap:6px; min-width:120px; align-items:flex-start; }
.table-actions .button { font-size:13px; padding:7px 9px; min-height:32px; }
.cell-status { display:block; font-size:11px; color:#506650; max-width:230px; }
.drag-handle { display:block; cursor:grab; font-size:24px; color:#69806b; }
.bulk-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:12px 0; position:sticky; top:0; background:#f6f5ee; z-index:2; }
.bulk-toolbar label { margin:0; min-width:180px; }
.learner-drop-targets { display:flex; flex-wrap:wrap; gap:10px; margin:12px 0; }
.learner-drop { padding:12px 18px; border:2px dashed #b5c7aa; border-radius:12px; background:#edf3e7; }
.learner-drop.drag { background:#d3e6c4; border-color:#244d3e; }
.assignment-dialog { width:min(780px,94vw); }
.assignment-chapters { max-height:35vh; overflow:auto; margin:12px 0; }
.assignment-chapters fieldset { border:1px solid #d5dece; border-radius:8px; padding:12px; margin-bottom:10px; }
.word-scores { display:flex; flex-wrap:wrap; gap:7px; padding:10px 0; }
.word-score { border-radius:5px; padding:4px 6px; background:#e7eddf; }
.word-score.incorrect { background:#ffe0d9; color:#842a18; }
.word-score.missed { background:#fff0bf; color:#705211; text-decoration:underline; }
.score-corrections { max-height:320px; overflow:auto; display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin:14px 0; }
.library-drop { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:12px 18px; text-align:left; margin-bottom:18px; }
.library-drop p { margin:3px 0; }
.library-drop input { width:auto; max-width:330px; margin:0; }
.library-filters { display:grid; grid-template-columns:minmax(230px,2fr) repeat(2,minmax(130px,1fr)); gap:14px; }
.library-filters label { margin-bottom:0; }
.library-table td:last-child, .library-table th:last-child { position:sticky; right:0; background:#fffefa; box-shadow:-3px 0 8px #244d3e0b; }
.library-table th:last-child { z-index:3; background:#edf1e9; }
.library-table textarea { min-height:60px; }
.table-actions { flex-direction:row; flex-wrap:wrap; width:158px; gap:5px; }
.table-actions a { font-size:12px; padding:5px 8px; }
@media(max-width:720px) { .library-filters { grid-template-columns:1fr; } }
.library-content { padding-top:18px; }
.library-heading { margin-bottom:12px; }
.library-heading h1 { margin:0; font-size:30px; }
.library-content .library-drop { margin-bottom:12px; padding:8px 14px; }
.bulk-toolbar .learner-drop-targets { margin:0 0 3px auto; gap:6px; max-width:380px; }
.bulk-toolbar .learner-drop { font-size:12px; padding:7px 10px; }
.library-content section > p[role=status] { margin:3px 0 10px; }
.library-table caption { padding:7px 12px; font-size:12px; }
.library-table { min-width:940px; }
.library-table td:nth-child(2) { min-width:185px; }
.library-table td:nth-child(3) { min-width:130px; }
.library-table td:nth-child(4) { min-width:110px; }
.library-table td:nth-child(5) { min-width:180px; }
.table-actions { width:190px; }

/* Focus mode reserves the screen for the page or worksheet. */
.shell.focused-workspace { display:block; height:100dvh; overflow:hidden; }
.focused-workspace > .sidebar { display:none; }
.focused-workspace .main-wrap { height:100%; display:flex; flex-direction:column; }
.focused-workspace .topbar { flex:0 0 30px; min-height:30px; padding:2px 12px; font-size:11px; }
.focused-workspace .topbar .eyebrow { font-size:10px; letter-spacing:1px; }
.focused-workspace .topbar .button { padding:2px 7px; min-height:24px; font-size:11px; }
.focused-workspace .topbar .tag { font-size:10px; }
.focused-workspace .reader-content, .focused-workspace .math-content { width:100%; max-width:none; margin:0; padding:5px 8px; flex:1; min-height:0; overflow:hidden; }
.focused-workspace .reading-room { height:100%; display:flex; flex-direction:column; gap:0; }
.focused-workspace .reading-panel.card { flex:1; min-height:0; padding:0; margin:0; display:flex; flex-direction:column; border:0; background:transparent; border-radius:0; overflow:hidden; }
.reader-chrome { display:flex; align-items:center; gap:7px; flex-wrap:wrap; padding:2px 0 5px; flex:0 0 auto; }
.reader-chrome .button { min-height:30px; padding:3px 9px; font-size:12px; border-radius:6px; }
.reader-chrome select { width:auto; min-height:30px; padding:3px 7px; font-size:12px; margin:0; }
.reader-chrome .reader-title { font:600 13px system-ui; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:25vw; }
.reader-chrome > span[role=status] { font-size:11px; white-space:nowrap; }
.reader-font-tools { display:inline-flex; gap:3px; }
.reader-font-tools[hidden] { display:none; }
.focused-workspace .reading-page { flex:1; min-height:0; max-height:none; width:100%; padding:8px 12px; margin:0; overflow:hidden; line-height:1.65; }
.reader-foot { display:flex; gap:14px; align-items:center; flex-wrap:wrap; flex:0 0 auto; font-size:10px; line-height:1.3; padding:3px 6px; color:var(--muted); }
.reader-foot .small { font-size:10px; margin:0; }
.focused-workspace .recording-results { display:none; }
.focused-workspace .reading-room > div:not(.reading-panel):not(.reader-measure) { overflow:auto; }
.focused-workspace .reading-panel[hidden] { display:none; }
.pdf-viewport { width:100%; height:100%; display:grid; place-items:center; overflow:hidden; background:#dfdfd8; }
.pdf-stage { position:relative; flex:none; }
.pdf-stage img { position:absolute; inset:0; width:100%; height:100%; display:block; }
.pdf-word { position:absolute; min-height:0; min-width:0; padding:0; border:0; background:transparent; border-radius:2px; cursor:pointer; }
.pdf-word:hover { background:#ffe36960; outline:1px solid #aa8c18; }
.pdf-word.current { background:#f1ce4d75; outline:2px solid #9c8222; }
.pdf-word.heard { background:#71c66b65; outline:1px solid #487a37; }
@media(max-width:620px) { .reader-chrome { gap:4px; } .reader-chrome .reader-title { max-width:37vw; flex:1; } .reader-chrome .button { min-height:29px; padding:3px 6px; font-size:11px; } }

.math-practice { height:100%; display:flex; flex-direction:column; gap:6px; min-height:0; }
.math-chrome { display:flex; align-items:center; gap:14px; flex:0 0 auto; min-height:36px; }
.math-chrome .button { padding:3px 9px; min-height:30px; font-size:12px; }
.math-practice-title { font-size:14px; flex:1; }
.math-timer { font-variant-numeric:tabular-nums; font-weight:700; font-size:22px; min-width:75px; text-align:right; }
.math-problem-body { flex:1; min-height:0; overflow:auto; padding:8px; }
.math-problem-body > form { min-height:100%; display:flex; flex-direction:column; align-items:center; }
.flash-prompt { font-size:clamp(36px,7vw,80px); font-weight:650; text-align:center; padding:4vh 10px; }
.flash-answer { width:min(360px,85vw); font-size:36px; text-align:center; }
.math-answer-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; justify-content:center; padding:12px; position:sticky; bottom:0; background:var(--paper); margin-top:auto; }
.math-feedback { flex:0 0 auto; margin:0; padding:4px 12px; max-height:25vh; overflow:auto; }
.math-feedback:empty { display:none; }
.math-feedback p { margin:4px 0; }
.math-feedback .button { margin:6px 10px; }
.written-math { width:100%; }
.worksheet-instruction { margin:3px 0; text-align:center; font-size:14px; }
.column-board { margin:12px auto; width:max-content; max-width:100%; }
.number-row { display:grid; grid-template-columns:90px repeat(var(--columns),minmax(34px,48px)); gap:5px; justify-content:end; margin:5px 0; align-items:center; }
.row-sign { font-size:14px; text-align:right; padding-right:6px; }
.fixed-digit { font:500 32px ui-monospace,monospace; text-align:center; height:43px; }
.digit-cell { width:100%; text-align:center; padding:3px; min-height:43px; font:500 29px ui-monospace,monospace; }
.digit-cell[readonly] { background:#e9ede4; }
.carry-row select { font-size:15px; min-height:30px; padding:2px; text-align:center; background:#eef2e5; }
.number-row:has(.digit-cell) { border-top:2px solid #536b55; padding-top:6px; }
.division-step { display:grid; grid-template-columns:120px repeat(3,minmax(80px,120px)); gap:10px; align-items:center; margin:12px 0; border-bottom:1px solid var(--line); padding-bottom:8px; }
.division-step label { margin:0; font-size:11px; }
.division-step input { width:100%; min-height:36px; padding:5px; font-size:18px; }
.abacus { padding:15px; margin:10px auto; width:max-content; max-width:100%; background:#e8d5b2; border:6px solid #705134; border-radius:12px; }
.abacus-rods { display:flex; gap:12px; justify-content:center; }
.abacus-rod { display:flex; flex-direction:column; align-items:center; width:66px; gap:5px; background:linear-gradient(90deg,transparent 47%,#8d6b41 47%,#8d6b41 53%,transparent 53%); }
.abacus-rod > .small { font-size:10px; background:#e8d5b2; }
.abacus-beam { height:7px; background:#6c4c2e; width:calc(100% + 12px); }
.abacus .bead { width:52px; min-height:26px; height:26px; padding:0; color:transparent; background:#b17242; border:2px solid #81532d; border-radius:50%; box-shadow:0 2px 2px #0002; transform:translateY(3px); }
.abacus .bead.engaged { background:#568348; border-color:#375e2e; transform:translateY(-2px); }
.abacus .upper { margin:8px 0; }
.abacus-value { display:block; text-align:center; font-size:26px; margin-top:12px; }
.work-log { white-space:pre-wrap; font-size:11px; max-height:260px; overflow:auto; }
@media(max-width:620px) { .number-row { grid-template-columns:60px repeat(var(--columns),minmax(24px,38px)); gap:2px; } .digit-cell { font-size:23px; } .division-step { grid-template-columns:1fr 1fr 1fr; gap:5px; } .division-step > strong { grid-column:1/-1; } .abacus-rod { width:48px; } .abacus .bead { width:42px; } }

.pdf-word.listening-current, .word.listening-current { outline:2px solid #265f34; background:#76bf70aa; box-shadow:0 0 0 2px #fff8; }

.learner-name.button { padding:0; min-height:0; font:inherit; text-align:left; text-decoration:underline; text-underline-offset:3px; }
.activity-entry { display:flex; align-items:center; gap:8px; border-bottom:1px solid var(--line); }
.activity-entry > .activity-link { flex:1; min-width:0; border:0; }
.activity-entry > .button { font-size:12px; white-space:nowrap; }
.login > details > summary { font-weight:650; padding:14px 0; cursor:pointer; }
@media(max-width:620px) { .activity-entry { flex-wrap:wrap; gap:0; } }

.digit-control { position:relative; min-width:0; display:inline-block; touch-action:none; }
.digit-control > input { width:100%; }
.digit-picker { position:absolute; z-index:25; top:100%; right:0; display:grid; grid-template-columns:repeat(5,38px); gap:3px; padding:7px; background:var(--paper); border:1px solid var(--line); border-radius:8px; box-shadow:0 4px 16px #0003; }
.digit-picker button { min-height:33px; padding:2px; font-size:16px; background:#edf1e6; color:var(--ink); border:1px solid var(--line); border-radius:4px; }
.column-navigation { max-width:750px; margin:4px auto; font-size:12px; }
.column-guide { margin:3px 0; padding:5px 8px; background:#edf2e6; border-radius:5px; }
.column-navigation .button { min-height:25px; padding:2px 6px; font-size:11px; }
.path-current { outline:3px solid #698d36!important; outline-offset:2px; }
.regroup-stack { display:flex; flex-direction:column; gap:3px; min-width:0; align-self:end; }
.borrow-digit { width:100%; min-height:28px; font-size:19px; padding:2px; text-align:center; }
.crossed-out, .borrow-digit.superseded { text-decoration:line-through; color:#8a8e82; }
.abacus-exercise { display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:8px; width:min(800px,100%); }
.abacus-exercise > .actions, .abacus-exercise > .abacus-tip { grid-column:1/-1; }
.abacus-exercise .column-board { --columns:4; }
.narration-name { width:115px!important; min-height:30px; padding:3px 6px; font-size:12px; margin:0; }
.audiobook-controls { display:inline-flex; align-items:center; gap:5px; max-width:100%; }
.audiobook-controls[hidden] { display:none; }
.audiobook-controls audio { height:30px; width:205px; }
.audiobook-controls select { max-width:145px; }
.audiobook-controls .small { font-size:10px; }
@media(max-width:620px) { .abacus-exercise { grid-template-columns:1fr; } .audiobook-controls { flex-wrap:wrap; } .abacus-exercise .number-row { grid-template-columns:55px repeat(var(--columns),minmax(24px,38px)); } }
