.practice-modes {
  background: var(--canvas);
  padding: clamp(60px, 7vw, 108px) 0 54px;
  scroll-margin-top: 86px;
}
.mode-wrap { width: min(1160px, calc(100% - 64px)); margin: auto; }
.mode-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mode-heading { text-align: center; max-width: 840px; margin: auto; }
.mode-eyebrow, .spec-meta { display: flex; align-items: center; gap: 8px; font-weight: 680; font-size: .8rem; letter-spacing: .075em; text-transform: uppercase; }
.mode-eyebrow { color: var(--red); margin: 0 0 14px; }
.mode-heading .mode-eyebrow { justify-content: center; }
.mode-heading h2, .track-intro h3 { font-size: clamp(2.65rem, 5.8vw, 5.2rem); line-height: 1.03; letter-spacing: -.065em; font-weight: 590; margin: 0; }
.mode-heading h2 em, .track-intro h3 em { display: block; font-family: Georgia, serif; font-weight: 400; letter-spacing: -.05em; color: var(--red); }
.mode-heading > p:last-child { margin: 20px auto 0; max-width: 67ch; color: var(--muted); line-height: 1.65; }
.mode-tabs { margin: 28px auto 32px; padding: 5px; width: fit-content; max-width: 100%; display: grid; grid-template-columns: repeat(4,1fr); background: var(--soft); border: 1px solid var(--line); border-radius: 14px; gap: 3px; }
.mode-tabs button, .track-switch button { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; border-radius: 9px; color: var(--muted); font-size: .95rem; font-weight: 600; padding: 8px 20px; }
.mode-tabs button:hover, .track-switch button:hover { background: var(--paper); }
.mode-tabs [aria-selected=true], .track-switch [aria-pressed=true] { background: var(--ink); color: var(--paper); }
.mode-tabs [aria-selected=true]:hover, .track-switch [aria-pressed=true]:hover { background: var(--ink); }
.mode-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(16px,2.4vw,32px); align-items: stretch; }
.practice-modes [hidden], #mode-dialog [hidden] { display: none; }
.mode-card { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); padding: clamp(18px,2.35vw,34px); display: flex; flex-direction: column; }
.card-intro { margin-bottom: 22px; }
.card-intro .mode-eyebrow { margin: 0 0 12px; }
.card-intro h3 { margin: 0 0 10px; font-size: clamp(1.65rem,2.6vw,2.45rem); line-height: 1.15; letter-spacing: -.045em; font-weight: 620; }
.card-intro > p:last-child, .track-intro > p:last-child { margin: 0; color: var(--muted); line-height: 1.55; }
.sheet-home { min-width: 0; }
.mode-card .sheet-home { margin-top: auto; }
.mode-sheet { border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--ink); overflow: clip; box-shadow: 0 8px 18px #46222c0a; }
.sheet-bar { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 15px; background: var(--soft); color: var(--ink); border-bottom: 1px solid var(--line); }
.sheet-bar > .mode-icon { width: 17px; color: var(--red); }
.sheet-bar strong { font-size: .92rem; font-weight: 620; }
.mode-zoom, #mode-close { margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; flex: none; }
.mode-zoom:hover, #mode-close:hover { background: var(--ghost); }
.mode-zoom svg { width: 17px; }
.exam .sheet-bar, .mode-sheet.exam-sheet .sheet-bar { background: #362630; color: #fff3f0; }
.exam .sheet-bar > svg, .exam-sheet .sheet-bar > svg { color: #ffc7be; }
.sheet-page { padding: 16px clamp(14px,1.75vw,25px) 20px; min-height: 270px; }
.spec-meta { color: var(--muted); justify-content: space-between; min-height: 36px; font-size: .79rem; }
.sheet-page p, .sheet-page legend { line-height: 1.6; margin: 8px 0 14px; }
.sheet-page .spec-title { color: var(--ink); font-family: Georgia,serif; font-size: clamp(1.45rem,2vw,1.9rem); letter-spacing: -.035em; line-height: 1.18; margin: 5px 0 12px; }
.passage { font-family: Georgia,serif; }
.passage mark { background: #f3d6b5; color: #412a20; padding: 0 2px; }
.mode-fold { border-top: 1px solid var(--line); }
.mode-fold summary { cursor: pointer; list-style: none; font-weight: 620; font-size: .9rem; color: var(--red); min-height: 42px; padding: 9px 2px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.mode-fold summary::-webkit-details-marker { display: none; }
.mode-fold summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin-right: 4px; flex: none; }
.mode-fold[open] > summary::after { transform: rotate(225deg); }
.mode-fold > div { padding: 0 2px 14px; color: var(--muted); line-height: 1.55; }
.mode-field { display: grid; gap: 6px; font-size: .9rem; font-weight: 620; }
.mode-field textarea { width: 100%; resize: vertical; min-height: 64px; line-height: 1.5; font-family: inherit; font-size: 1rem; background: var(--canvas); color: var(--ink); padding: 9px; border: 1px solid var(--line); border-radius: 6px; }
.mode-sheet audio { width: 100%; display: block; margin: 12px 0; height: 42px; }
.mode-timer { display: inline-flex; gap: 5px; align-items: center; padding: 7px 10px; background: var(--soft); color: var(--red); font-size: .84rem; border-radius: 6px; font-variant-numeric: tabular-nums; }
.mode-timer svg,.review-flag svg { width: 15px; height: 15px; }
.mq fieldset { margin: 4px 0; padding: 0; border: 0; min-width: 0; }
.mq legend { font-weight: 600; padding: 0; }
.mode-options { display: grid; gap: 4px; }
.mode-options label,.review-flag { display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 7px 8px; font-size: .95rem; }
.mode-options label { border: 1px solid var(--line); border-radius: 6px; }
.mode-options label:has(:checked) { background: var(--soft); border-color: var(--red); }
.mode-sheet input { accent-color: var(--red); }
.review-flag { color: var(--muted); width: fit-content; padding-inline: 0; }
.q-nav { display: flex; gap: 6px; align-items: center; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; }
.q-nav button { position: relative; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 5px; }
.q-nav button[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.q-nav button.flagged::after { content: ''; position: absolute; right: 3px; top: 2px; width: 5px; height: 9px; background: var(--red); clip-path: polygon(0 0,100% 0,100% 100%,50% 74%,0 100%); }
.cue-points { padding-left: 1.2em; }
.mode-guide { margin: 16px 0 38px; }
.mode-guide details { border-bottom: 1px solid var(--line); }
.mode-guide summary { padding: 16px 2px; font-size: 1rem; }
.mode-guide details > div { max-width: 72ch; }
.mode-track { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px,5vw,75px); align-items: center; padding: clamp(22px,3.6vw,52px); border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.track-intro h3 { font-size: clamp(2rem,3.5vw,3.5rem); margin-bottom: 16px; }
.track-intro > p:last-child { max-width: 47ch; }
.mode-track .sheet-page { min-height: 0; }
.track-switch { display: flex; border-bottom: 1px solid var(--line); gap: 4px; padding-bottom: 10px; }
.track-switch button { padding: 6px 12px; }
.track-samples > div { display: flex; align-items: flex-start; gap: 12px; padding: 15px 0 2px; }
.track-samples svg { color: var(--red); margin-top: 3px; }
.track-samples span,.track-samples strong { display: block; }
.track-samples span { color: var(--muted); }
.mode-footnote { font-size: .86rem; text-align: center; color: var(--muted); margin: 20px 0 0; }
#mode-dialog { width: min(760px,calc(100% - 28px)); max-height: 90dvh; padding: clamp(14px,3vw,32px); }
.mode-dialog-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.mode-dialog-top h2 { font-size: 1.3rem; margin: 0; }
#mode-close { font-size: 1.8rem; }
#mode-dialog .sheet-page { min-height: 0; padding: clamp(16px,3vw,32px); }
#mode-dialog .mode-zoom { display: none; }
html[lang=bn] :is(.mode-heading h2,.track-intro h3,.card-intro h3) { line-height: 1.3; letter-spacing: normal; }
html[lang=bn] :is(.mode-heading h2 em,.track-intro h3 em) { font: inherit; letter-spacing: normal; }
html[lang=bn] :is(.mode-eyebrow,.spec-meta) { letter-spacing: normal; }
@media(max-width:760px) {
  .mode-wrap { width: calc(100% - 36px); }
  .mode-pair,.mode-track { grid-template-columns: minmax(0,1fr); }
  .mode-card .sheet-page { min-height: 0; }
  .mode-tabs { width: 100%; max-width: 480px; margin: 20px auto; }
  .mode-tabs button { padding: 8px 2px; gap: 4px; font-size: .88rem; }
  .mode-tabs .mode-icon { width: 16px; }
}
@media(max-width:440px) {
  .mode-tabs button { flex-direction: column; }
  .mode-wrap { width: calc(100% - 28px); }
  .mode-track { padding: 18px; }
  .track-switch button { padding: 6px; font-size: .9rem; }
}
