/* ===========================================================================
   delf.css — 备考集训 (prep.html) and 模拟考试 (exam.html).
   Loaded after style.css; uses its tokens (--primary, --red, --paper, --line …)
   and its shell (.topbar, .sec-row, .view, .conj-body, .tabbar). Everything
   new is prefixed dp- (training), dx- (exam) or dl- (shared content pieces).
   =========================================================================== */

/* ---------- shared content pieces ---------- */
.dl-fr { font-family: var(--serif); color: var(--ink); }
.dl-tr { display: block; margin-top: 3px; font-family: var(--sans); font-size: .86em; line-height: 1.55; color: var(--muted); }
.dl-tr.fold { display: none; }
.show-tr .dl-tr.fold { display: block; }
.dl-inline .dl-tr { display: inline; margin: 0 0 0 8px; }
.dl-inline .dl-tr.fold { display: none; }
.show-tr .dl-inline .dl-tr.fold, .dl-inline.show-tr .dl-tr.fold { display: inline; }

.dp-wrap { max-width: 720px; margin: 0 auto; padding: 14px 14px calc(34px + var(--safe-b)); }
.dp-h { margin: 22px 0 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dp-h h2, .dp-h h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ink); }
.dp-h small { color: var(--muted); font-size: 11.5px; }
.dp-h .dl-fr { font-size: 13px; color: var(--muted); font-style: italic; }
.dp-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.dp-empty { margin: 26px 0; padding: 22px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-ui); text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.dp-badge { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.dp-badge.off { background: var(--primary-soft); color: var(--primary); }
.dp-badge.own { background: var(--gold-soft); color: #7a5a12; }
.dp-badge.part { background: var(--surface-soft); color: var(--ink-soft); }

/* topbar extras */
.dl-lang { min-width: 38px; height: 32px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink-soft); font-size: 12px; font-weight: 700; cursor: pointer; }
.dl-lang:hover, .dl-lang:focus-visible { border-color: var(--primary); color: var(--primary); }

/* ---------- 总览 ---------- */
.dp-hero { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui); box-shadow: var(--shadow-sm); }
.dp-ring { position: relative; width: 124px; height: 124px; }
.dp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dp-ring .track { fill: none; stroke: var(--surface-soft); stroke-width: 10; }
.dp-ring .bar { fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.dp-ring .gate { stroke: var(--red); stroke-width: 3; }
.dp-ring-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dp-ring-num b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1; }
.dp-ring-num b i { font-style: normal; font-size: 15px; font-weight: 700; margin-left: 1px; }
.dp-ring-num span { margin-top: 5px; font-size: 10.5px; color: var(--muted); }
.dp-hero h2 { margin: 3px 0 6px; font-size: 20px; font-weight: 800; }
.dp-hero p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--ink-soft); }
.dp-gate-line { margin-top: 8px; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); }
.dp-gate-line svg { flex: 0 0 auto; width: 15px; height: 15px; fill: none; stroke: var(--red); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dp-gate-line.open svg { stroke: var(--mint-deep); }
.dp-date { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.dp-date input { height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; }
.dp-date b { color: var(--ink); font-weight: 700; }

.dp-groups { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui); box-shadow: var(--shadow-sm); overflow: hidden; }
.dp-group { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 16px; gap: 11px; align-items: center; width: 100%; padding: 13px 14px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.dp-group:first-child { border-top: 0; }
.dp-group:hover, .dp-group:focus-visible { background: var(--paper); }
.dp-group > svg:first-child { width: 24px; height: 24px; fill: none; stroke: var(--g, var(--primary)); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dp-group .go { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.dp-group strong { display: block; font-size: 14.5px; font-weight: 700; }
.dp-group em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.dp-bar { margin-top: 7px; height: 5px; border-radius: 999px; background: var(--surface-soft); overflow: hidden; }
.dp-bar i { display: block; height: 100%; border-radius: 999px; background: var(--g, var(--primary)); transition: width .4s ease; }
.dp-group .pct { font-size: 13px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.dp-cta { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.dp-cta a, .dp-cta button { display: flex; flex-direction: column; gap: 3px; min-height: 68px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-ui); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; font: inherit; }
.dp-cta .eyebrow { color: var(--muted); }
.dp-cta strong { font-size: 14.5px; font-weight: 700; }
.dp-cta small { font-size: 11.5px; color: var(--muted); }
.dp-cta .primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.dp-cta .primary .eyebrow, .dp-cta .primary small { color: rgba(255,255,255,.82); }
.dp-cta .locked { background: var(--surface-soft); }

/* ---------- lists ---------- */
.dp-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui); box-shadow: var(--shadow-sm); overflow: hidden; }
.dp-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 14px; gap: 10px; align-items: center; width: 100%; padding: 11px 13px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.dp-row:first-child { border-top: 0; }
.dp-row:hover, .dp-row:focus-visible { background: var(--paper); }
.dp-row .n { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.dp-row .t { min-width: 0; }
.dp-row .t b { display: block; font-family: var(--serif); font-size: 15.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.dp-row .t b.zh { font-family: var(--sans); font-size: 14.5px; font-weight: 700; }
.dp-row .t span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.dp-row .go { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.dp-dots { display: inline-flex; gap: 4px; }
.dp-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: transparent; }
.dp-dots i.on { border-color: var(--primary); background: var(--primary); }
.dp-dots.full i.on { border-color: var(--mint-deep); background: var(--mint-deep); }
.dp-score { font-size: 12px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------- card detail ---------- */
.dp-head { padding: 4px 2px 0; }
.dp-head .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dp-head h2 { margin: 9px 0 0; font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -.005em; }
.dp-head h2 .dl-tr { font-size: 13.5px; margin-top: 4px; }
.dp-sub { margin: 14px 0 0; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-soft); }
.dp-sub button { flex: 1 1 0; min-height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.dp-sub button.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.dp-card { margin-top: 12px; padding: 14px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui); box-shadow: var(--shadow-sm); }
.dp-card > .eyebrow { margin-bottom: 8px; }
.dp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dp-card-head .eyebrow { margin: 0; }
.dp-prompt { font-size: 17px; line-height: 1.6; }
.dp-prompt .dl-tr { font-size: 13.5px; margin-top: 7px; }
.dp-role { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-strong); font-size: 14.5px; line-height: 1.6; }
.dp-ul { margin: 0; padding: 0; list-style: none; }
.dp-ul li { position: relative; padding: 6px 0 6px 16px; font-size: 14px; line-height: 1.65; color: var(--ink-soft); }
.dp-ul li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.dp-ul.q li { padding-left: 0; }
.dp-ul.q li::before { display: none; }
.dp-ul.q li + li { border-top: 1px solid var(--line); }
.dp-ul.q .dl-fr { font-size: 15.5px; }
.dp-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.dp-tags span { padding: 3px 9px; border: 1px solid var(--tag-pos-line); border-radius: 999px; background: var(--tag-pos-soft); color: var(--tag-pos); font-size: 11.5px; font-weight: 600; }
.dp-phrases { margin: 0; padding: 0; list-style: none; }
.dp-phrases li { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 8px; align-items: center; padding: 7px 0; }
.dp-phrases li + li { border-top: 1px solid var(--line); }
.dp-phrases .dl-fr { font-size: 15.5px; }
.dp-say { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--primary); cursor: pointer; }
.dp-say svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dp-say.speaking { background: var(--primary); border-color: var(--primary); color: #fff; }
.dp-toggle { height: 30px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.dp-toggle[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: #fff; }
.dp-sample { margin: 0; padding: 0; list-style: none; }
.dp-sample li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 7px 0; font-size: 15.5px; line-height: 1.6; }
.dp-sample li.playing .dl-fr { color: var(--primary); }
.dp-sample .who { margin-top: 3px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-family: var(--sans); font-size: 10.5px; font-weight: 800; background: var(--surface-soft); color: var(--muted); }
.dp-sample .who.c { background: var(--primary-soft); color: var(--primary); }
.dp-sample.mono li { grid-template-columns: minmax(0, 1fr); }
.dp-doc { padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); font-size: 15px; line-height: 1.65; }
.dp-doc p { margin: 0 0 6px; }
.dp-doc p:last-child { margin-bottom: 0; }
.dp-kv { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.dp-kv b { color: var(--ink-soft); font-weight: 700; }

/* prompts + my content */
.dp-prompt-btns { display: grid; gap: 8px; }
.dp-copy { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.dp-copy:hover, .dp-copy:focus-visible { border-color: var(--primary); background: var(--primary-soft); }
.dp-copy svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dp-copy b { display: block; font-size: 14px; font-weight: 700; }
.dp-copy small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--muted); }
.dp-peek { margin-top: 8px; }
.dp-peek summary { font-size: 12.5px; color: var(--primary); cursor: pointer; }
.dp-peek pre { margin: 8px 0 0; padding: 11px 12px; max-height: 240px; overflow: auto; border-radius: 10px; background: var(--surface-soft); font-family: var(--sans); font-size: 12.5px; line-height: 1.65; color: var(--ink-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.dp-text { display: block; width: 100%; min-height: 190px; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font-family: var(--serif); font-size: 16.5px; line-height: 1.65; resize: vertical; }
.dp-text:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.dp-text::placeholder { font-family: var(--sans); font-size: 13.5px; color: var(--muted); }
.dp-text-foot { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.dp-text-foot .acts { display: flex; gap: 8px; }
.dp-mini { height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink-soft); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.dp-mini:hover, .dp-mini:focus-visible { border-color: var(--primary); color: var(--primary); }
.dp-mini.on { border-color: var(--primary); background: var(--primary); color: #fff; }
.dp-mini.danger:hover { border-color: var(--red); color: var(--red); }
.dp-read { margin-top: 10px; padding: 12px 13px; border-radius: 10px; background: var(--paper); font-family: var(--serif); font-size: 16.5px; line-height: 1.75; }
.dp-read span.cur { background: var(--primary-soft); border-radius: 4px; box-shadow: 0 0 0 2px var(--primary-soft); }

/* recorder */
.dp-rec { text-align: center; }
.dp-rec-line { min-height: 62px; padding: 12px 13px; border-radius: 10px; background: var(--paper); text-align: left; font-size: 16.5px; line-height: 1.6; }
.dp-rec-line .who { display: block; margin-bottom: 4px; font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.dp-rec-line.idle { color: var(--muted); font-size: 13.5px; }
.dp-rec-time { margin-top: 14px; font-size: 30px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
.dp-rec-time small { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.dp-rec-time.over { color: var(--red); }
.dp-meter { margin: 10px auto 0; width: min(220px, 70%); height: 5px; border-radius: 999px; background: var(--surface-soft); overflow: hidden; }
.dp-meter i { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--mint-deep); transition: width .09s linear; }
.dp-rec-actions { margin-top: 16px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.dp-rec-btn { min-width: 150px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--red); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.dp-rec-btn i { width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.dp-rec-btn.live { background: var(--ink); }
.dp-rec-btn.live i { border-radius: 3px; animation: dpPulse 1.2s ease-in-out infinite; }
.dp-rec-btn:disabled { opacity: .5; cursor: default; }
@keyframes dpPulse { 50% { opacity: .35; } }
.dp-switch { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0 2px; text-align: left; }
.dp-switch input { flex: 0 0 auto; width: 40px; height: 24px; margin: 1px 0 0; appearance: none; -webkit-appearance: none; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; }
.dp-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.dp-switch input:checked { background: var(--primary); }
.dp-switch input:checked::after { transform: translateX(16px); }
.dp-switch b { display: block; font-size: 14px; font-weight: 700; }
.dp-switch small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.dp-takes { margin: 0; padding: 0; list-style: none; }
.dp-takes li { padding: 10px 0; }
.dp-takes li + li { border-top: 1px solid var(--line); }
.dp-takes .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.dp-takes audio { display: block; width: 100%; height: 38px; margin-top: 7px; }
.dp-takes .acts { display: flex; gap: 6px; }
.dp-check { margin: 0; padding: 0; list-style: none; }
.dp-check li { padding: 2px 0; }
.dp-check label { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 9px; align-items: start; padding: 8px 0; font-size: 14px; line-height: 1.55; color: var(--ink-soft); cursor: pointer; }
.dp-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); }
.dp-crit { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dp-crit h4 { margin: 0 0 3px; font-size: 13.5px; font-weight: 700; }
.dp-crit h4 .dl-fr { font-size: 12.5px; font-weight: 400; font-style: italic; color: var(--muted); margin-left: 6px; }
.dp-levels { margin-top: 7px; display: grid; gap: 6px; }
.dp-level { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; color: inherit; font: inherit; cursor: pointer; }
.dp-level b { font-size: 13px; font-weight: 800; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.dp-level b small { display: block; margin-top: 1px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.dp-level .d { font-size: 13px; line-height: 1.55; }
.dp-level .d .dl-fr { font-size: 13.5px; color: var(--ink-soft); }
.dp-level.sel { border-color: var(--primary); background: var(--primary-soft); }
.dp-level.sel b { color: var(--primary); }
.dp-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 9px; }
.dp-actions .btn-primary, .dp-actions .btn-ghost { flex: 1 1 140px; min-height: 46px; padding: 0 16px; }
.btn-primary:disabled, .btn-ghost:disabled { opacity: .5; cursor: default; }

/* writing check report */
.dp-range { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dp-range b { font-size: 28px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.dp-range span { font-size: 12.5px; color: var(--muted); }
.dp-crits { margin-top: 12px; display: grid; gap: 6px; }
.dp-critrow { display: grid; grid-template-columns: minmax(0, 1fr) 96px 78px; gap: 10px; align-items: center; font-size: 13px; }
.dp-critrow .track { position: relative; height: 6px; border-radius: 999px; background: var(--surface-soft); }
.dp-critrow .track i { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--primary); min-width: 6px; }
.dp-critrow em { font-style: normal; font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.dp-findings { margin: 12px 0 0; padding: 0; list-style: none; }
.dp-findings li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; padding: 8px 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.dp-findings li + li { border-top: 1px solid var(--line); }
.dp-findings .ic { margin-top: 2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.dp-findings .ok .ic { background: var(--mint-deep); }
.dp-findings .miss .ic, .dp-findings .fail .ic { background: var(--red); }
.dp-findings .warn .ic { background: var(--gold); }
.dp-findings .self .ic, .dp-findings .na .ic { background: var(--line-strong); }
.dp-findings small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.dp-wc { font-variant-numeric: tabular-nums; }
.dp-wc.low { color: var(--red); }
.dp-wc.ok { color: var(--mint-deep); }

/* AI result */
.dp-ai { border-left: 4px solid var(--primary); }
.dp-ai .est { font-size: 12px; color: var(--muted); }
.dp-ai h4 { margin: 14px 0 4px; font-size: 13.5px; font-weight: 700; }
.dp-ai p { margin: 4px 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }
.dp-fix { margin: 0; padding: 0; list-style: none; }
.dp-fix li { padding: 8px 0; font-size: 13.5px; line-height: 1.6; }
.dp-fix li + li { border-top: 1px solid var(--line); }
.dp-fix del { color: var(--red); text-decoration-thickness: 1px; }
.dp-fix ins { color: var(--mint-deep); text-decoration: none; font-weight: 600; }
.dp-fix small { display: block; color: var(--muted); font-size: 12px; }
.dp-busy { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.dp-busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--primary); animation: dpSpin .8s linear infinite; }
@keyframes dpSpin { to { transform: rotate(360deg); } }

/* guide */
.dp-acc { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui); box-shadow: var(--shadow-sm); overflow: hidden; }
.dp-acc summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 15px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.dp-acc summary::-webkit-details-marker { display: none; }
.dp-acc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.dp-acc[open] summary::after { transform: rotate(-135deg); }
.dp-acc .body { padding: 0 15px 12px; }
.dp-acc .item { padding: 10px 0; border-top: 1px solid var(--line); }
.dp-acc .item h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 700; }
.dp-acc .item h4 i { margin-left: 7px; font-family: var(--serif); font-size: 13px; font-weight: 400; color: var(--muted); }
.dp-acc .item p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); white-space: pre-line; }

/* ---------- exercise blocks (listening / reading), shared with the exam ---------- */
.dl-block-head { padding: 2px 2px 0; }
.dl-block-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dl-block-head .pts { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.dl-intro { margin-top: 9px; font-size: 16.5px; line-height: 1.6; }
.dl-instr { margin-top: 6px; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
.dl-instr .dl-fr { color: var(--ink-soft); }
.dl-audio { margin-top: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--radius-ui); background: var(--surface); box-shadow: var(--shadow-sm); }
.dl-audio audio { display: block; width: 100%; height: 40px; }
.dl-audio .once { display: flex; align-items: center; gap: 12px; }
.dl-audio .once button { flex: 0 0 auto; min-width: 118px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.dl-audio .once button:disabled { background: var(--line-strong); cursor: default; }
.dl-audio .once .prog { flex: 1 1 auto; height: 6px; border-radius: 999px; background: var(--surface-soft); overflow: hidden; }
.dl-audio .once .prog i { display: block; width: 0; height: 100%; background: var(--primary); }
.dl-audio .once em { flex: 0 0 auto; font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-doc { margin-top: 12px; padding: 14px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui); box-shadow: var(--shadow-sm); }
.dl-doc-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--primary); }
.dl-text { padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); font-size: 15.5px; line-height: 1.7; }
.dl-text h4 { margin: 0 0 7px; font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.35; }
.dl-text p { margin: 0 0 8px; }
.dl-text p:last-child { margin-bottom: 0; }
.dl-text .sig { margin-top: 8px; font-family: var(--serif); font-style: italic; text-align: right; }
.dl-text .src { margin-top: 8px; font-size: 11.5px; color: var(--muted); text-align: right; }
.dl-text img { display: block; max-width: 100%; margin: 8px auto; border-radius: 8px; }
.dl-script { margin: 10px 0 0; padding: 0; list-style: none; }
.dl-script li { padding: 5px 0; font-size: 15px; line-height: 1.65; }
.dl-script .who { margin-right: 7px; font-family: var(--sans); font-size: 11px; font-weight: 700; color: var(--muted); }
.dl-q { margin-top: 14px; }
.dl-q:first-of-type { margin-top: 4px; }
.dl-stem { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; font-size: 15.5px; line-height: 1.55; }
.dl-stem .num { margin-top: 2px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 800; }
.dl-stem .p { margin-top: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.dl-opts { margin: 8px 0 0 30px; display: grid; gap: 7px; }
.dl-opts.pics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-left: 0; }
.dl-opt { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 9px; align-items: start; width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); text-align: left; color: inherit; font: inherit; font-size: 15px; line-height: 1.5; cursor: pointer; }
.dl-opt .k { width: 24px; height: 24px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 50%; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.dl-opt.pic { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 7px; text-align: center; }
.dl-opt.pic .k { margin: 0 auto; }
.dl-opt.pic img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 6px; background: #fff; }
.dl-opt:hover, .dl-opt:focus-visible { border-color: var(--primary); }
.dl-opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.dl-opt.sel .k { border-color: var(--primary); background: var(--primary); color: #fff; }
.dl-opt.right { border-color: var(--mint-deep); background: #eef6f1; }
.dl-opt.right .k { border-color: var(--mint-deep); background: var(--mint-deep); color: #fff; }
.dl-opt.wrong { border-color: var(--red); background: var(--red-soft); }
.dl-opt.wrong .k { border-color: var(--red); background: var(--red); color: #fff; }
.dl-opt:disabled { cursor: default; }
.dl-tail { margin: 8px 0 0 30px; font-size: 15.5px; }
.dl-why { margin: 9px 0 0 30px; padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); font-size: 13px; line-height: 1.65; color: var(--ink-soft); }
.dl-why q { display: block; margin-bottom: 4px; font-family: var(--serif); font-size: 14.5px; font-style: italic; color: var(--ink); quotes: "« " " »"; }
.dl-opts.pics + .dl-why, .dl-opts.pics ~ .dl-tail { margin-left: 0; }
.dl-match { margin-top: 12px; padding: 14px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui); box-shadow: var(--shadow-sm); }
.dl-choices { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.dl-choices li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; font-size: 15px; line-height: 1.5; }
.dl-choices li b { font-family: var(--sans); font-size: 12.5px; font-weight: 800; color: var(--primary); margin-top: 2px; }
.dl-mitem { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dl-mitem .lab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; }
.dl-mitem .lab em { font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); }
.dl-keys { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.dl-key { min-width: 40px; height: 38px; padding: 0 10px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink-soft); font-size: 14px; font-weight: 800; cursor: pointer; }
.dl-key.sel { border-color: var(--primary); background: var(--primary); color: #fff; }
.dl-key.right { border-color: var(--mint-deep); background: var(--mint-deep); color: #fff; }
.dl-key.wrong { border-color: var(--red); background: var(--red); color: #fff; }
.dl-key:disabled { cursor: default; }
.dl-result { margin-top: 14px; padding: 14px 15px; border-radius: var(--radius-ui); background: var(--ink); color: #fff; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dl-result b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dl-result span { font-size: 12.5px; opacity: .8; }

@media (max-width: 380px) {
  .dp-hero { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 15px 13px; }
  .dp-ring { width: 104px; height: 104px; }
  .dp-ring-num b { font-size: 26px; }
  .dp-critrow { grid-template-columns: minmax(0, 1fr) 70px 70px; }
  .dl-opts.pics { gap: 5px; }
}
@media (min-width: 601px) {
  .dp-wrap { padding-top: 18px; }
}

/* write-in questions (older official format) */
.dl-open { margin: 8px 0 0 30px; }
.dl-open-mine { padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-family: var(--serif); font-size: 15.5px; min-height: 40px; }
.dl-open-mine i { color: var(--muted); font-style: normal; }
.dl-open .dl-why { margin-left: 0; }
.dl-open .dl-keys { margin-top: 8px; }

/* ---------- 模拟考试 ---------- */
.dx-bar { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); background: var(--ink); color: #fff; font-size: 12.5px; }
.dx-sec { font-family: var(--serif); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-step { opacity: .78; white-space: nowrap; }
.dx-time { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dx-time.low { color: #ffb4ab; }
.dx-foot { flex: 0 0 auto; display: flex; gap: 10px; justify-content: flex-end; padding: 10px 14px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: rgba(250, 247, 241, .97); }
.dx-foot .btn-primary, .dx-foot .btn-ghost { min-height: 46px; padding: 0 20px; }
.dx-foot .btn-primary { flex: 1 1 auto; max-width: 320px; }
.dx-intro h2 { margin: 6px 0 10px; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.dx-intro p { margin: 0 0 8px; font-family: var(--serif); font-size: 16.5px; line-height: 1.6; color: var(--ink-soft); }
.dx-lock { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; }
.dx-lock h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.dx-lock p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }
.dx-lock-rows { margin-top: 12px; display: grid; gap: 7px; }
.dx-lock-rows > div { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-soft); }
.dx-lock-rows .dp-bar { margin: 0; }
.dx-lock-rows em { font-style: normal; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.dx-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.dx-paper .dp-card-head strong { font-size: 16px; font-weight: 800; }
.dx-single { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.dx-draw { display: block; width: 100%; margin-top: 8px; padding: 13px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-ui); background: var(--surface); text-align: left; color: inherit; font: inherit; cursor: pointer; }
.dx-draw b { display: block; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.dx-draw span { display: block; margin-top: 5px; font-family: var(--serif); font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.dx-draw em { display: block; margin-top: 5px; font-family: var(--serif); font-size: 14px; color: var(--muted); }
.dx-draw.sel { border-color: var(--primary); background: var(--primary-soft); }
.dx-total .dp-range b { font-size: 36px; }
.dx-verdict { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.dx-verdict.ok { background: #e3f1ea; color: var(--mint-deep); }
.dx-verdict.no { background: var(--red-soft); color: var(--red); }
.dx-verdict.mid { background: var(--gold-soft); color: #7a5a12; }
.dx-secs { margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dx-secs a { display: block; padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); text-align: center; text-decoration: none; color: inherit; }
.dx-secs span { display: block; font-size: 11.5px; color: var(--muted); }
.dx-secs b { display: block; margin-top: 3px; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dx-secs em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.dx-review { margin-top: 6px; scroll-margin-top: 8px; }
.dx-block { margin-top: 12px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.dx-block:first-of-type { border-top: 0; padding-top: 0; }
@media (max-width: 420px) {
  .dx-secs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dx-lock { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .dx-bar { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; padding: 8px 14px; }
  .dx-sec { grid-column: 1 / -1; }
}
body.dx-running .module-topbar-actions > * { visibility: hidden; }
.dp-prompt { line-height: 1.5; }

/* sentence-by-sentence pronunciation check */
.dp-pron { margin: 0; padding: 0; list-style: none; }
.dp-pron li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 0; }
.dp-pron li + li { border-top: 1px solid var(--line); }
.dp-pron .dl-fr { font-size: 15.5px; line-height: 1.55; }
.dp-pron .dp-say.speaking { background: var(--red); border-color: var(--red); }
.dp-pron .res { margin-top: 4px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.dp-pron .res .score { display: block; color: var(--ink-soft); font-weight: 600; }
.dp-pron .res .weak { display: block; color: var(--red); }

/* read-aloud buttons on every French line of an oral card */
.dp-line { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 10px; align-items: start; }
.dp-sample.has-say li { grid-template-columns: 22px minmax(0, 1fr) 34px; align-items: start; }
.dp-sample.has-say.mono li { grid-template-columns: minmax(0, 1fr) 34px; }
.dp-phrases li { align-items: start; }
.dp-read.tap span { cursor: pointer; border-radius: 4px; }
.dp-read.tap span:hover { background: var(--surface-soft); }
.dp-read.tap span.cur { background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary-soft); }
