/* Point-read learning screen · v297
   Two blocks on one plane: the progress card (the screen's answer) and one unit list.
   The textbook label sits at the progress card's top right; there is no separate page title.
   Phone: two-column stats, unit actions inline, targets at least 44px. */
.pointread-page {
  max-width: 1100px;
  margin: 0 auto;
  --pr-ink: #1f3a2f;
  --pr-muted: #5d6d64;
  --pr-line: #e6ece8;
  --pr-soft: #edf3ef;
}
.main:has(.pointread-page) { background: #f5f7f5; }
.main:has(.pointread-page) .page { padding-top: 20px; }
.pointread-page .section { margin-top: 0; }
.pointread-page .bento { gap: 16px; }
.pointread-page .card {
  background: #fff;
  border: 1px solid var(--pr-line);
  border-radius: 16px;
  box-shadow: none;
  backdrop-filter: none;
}

/* ---------- Progress ---------- */
.pointread-progress { background: var(--pr-soft); border-color: #e1e9e3; }
.pointread-progress .card-body { display: block; padding: 18px 28px 22px; }
.pointread-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 18px; }
.pointread-stats.is-classical { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pointread-stats > div { min-width: 0; padding: 0 24px; border-left: 1px solid #dde7e0; }
.pointread-stats > div:first-child { padding-left: 0; border-left: 0; }
.pointread-stats span { display: block; color: var(--pr-muted); font-size: 12px; }
.pointread-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--pr-ink);
  font-variant-numeric: tabular-nums;
}
.pointread-stats small { margin-left: 4px; font-size: 12px; font-weight: 400; color: var(--pr-muted); }
.checkin-streak {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 18px;
  gap: 4px;
  padding: 0 5px;
  border: 1px solid var(--brand-200);
  border-radius: 5px;
  background: var(--ok-100);
  color: var(--brand-900);
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.checkin-dot {
  flex: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ok-600);
}
.checkin-copy { display: inline-block; color: inherit; font-size: inherit; white-space: nowrap; }
.checkin-copy b { font-size: 11px; font-weight: 650; color: var(--brand-900); }
.pointread-stat-label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}
.pointread-stats .checkin-streak { display: inline-flex; }
.pointread-stats .checkin-copy { display: inline-block; color: inherit; font-size: inherit; }
.listen-stats .stat-key { white-space: nowrap; }
.listen-stats .checkin-streak { margin: 0 0 0 5px; vertical-align: 1px; }
.pointread-progress-heading h2 { margin: 0; font-size: 12px; font-weight: 400; color: var(--pr-muted); }
.pointread-pct { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.pointread-pct b { font-size: 30px; font-weight: 500; letter-spacing: -.01em; color: var(--pr-ink); }
.pointread-pct span { font-size: 12px; color: var(--pr-muted); }
.pointread-progress .progress { height: 6px; border-radius: 999px; background: #dbe6df; overflow: hidden; }
.pointread-progress .progress i { border-radius: 999px; background: var(--brand-600); box-shadow: none; }

/* ---------- Unit list ---------- */
.pointread-page .kp-card {
  --kp-gutter: 20px;
  --kp-col-m: 64px;
  --kp-col-a: 220px;
  overflow: hidden;
}
.pointread-page .kp-top { padding: 16px 20px 0; }
.pointread-page .kp-top { border-bottom: 0; }
.pointread-page .kp-top-head { display: flex; align-items: center; gap: 12px; }
.pointread-page .kp-top-title { font-size: 16px; font-weight: 600; color: var(--pr-ink); }
.pointread-page .kp-pick-inline { flex: none; margin-left: auto; }
.pointread-page .kp-pick .select {
  height: 34px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  border-radius: 8px;
  border-color: #d5ded8;
  background-color: #fff;
  color: #33463c;
  font-size: 12.5px;
}
.pointread-page .kp-card.is-pointread .kp-top-head .kp-pick { flex: 0 0 auto; max-width: 58%; }
.pointread-page .kp-card.is-pointread .kp-top-head .select { width: auto; min-width: 0; max-width: 100%; }
.pointread-page .kp-filter {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 0;
}
.pointread-page .kp-filter-row { display: flex; align-items: center; gap: 12px; border-bottom: 0; }
.pointread-page .kp-filter-group { flex: 0 0 auto; width: auto; }
.pointread-page .kp-filter-cap { display: none; }
.pointread-page .kp-seg {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 24px;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.pointread-page .kp-seg button {
  flex: 0 0 auto;
  position: relative;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #56655d;
  font-size: 13px;
}
.pointread-page .kp-seg button:hover { color: var(--pr-ink); }
.pointread-page .kp-seg button.is-active {
  border: 0;
  background: transparent;
  color: var(--brand-700);
  font-weight: 600;
}
.pointread-page .kp-seg button.is-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-600);
  border-radius: 2px 2px 0 0;
}
.pointread-page .kp-seg button:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: -3px;
  border-radius: 4px;
}
.pointread-page .kp-seg em {
  margin-left: 4px;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  color: inherit;
  font-variant-numeric: tabular-nums;
}
.pointread-page .pointread-batch-trigger {
  margin-left: auto;
  flex: none;
  white-space: nowrap;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--brand-700);
  font-size: 12.5px;
}
.pointread-page .pointread-batch-trigger:hover { background: #eaf3ed; }
.pointread-page .kp-table { border: 0; }
.pointread-page .kp-cols { display: none; }
.pointread-page .kp-list { padding: 0; border-top: 1px solid #e9efeb; }
.pointread-page .kp-group { margin: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.pointread-page .kp-group + .kp-group { border-top: 1px solid var(--pr-line); }
.pointread-page .kp-card .kp-head {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 56px auto;
  gap: 10px;
  min-height: 58px;
  padding: 10px 20px;
  background: transparent;
}
.pointread-page .kp-group.is-open > .kp-head { background: #f2f7f4; }
.pointread-page .kp-toggle { color: var(--pr-muted); }
.pointread-page .kp-name { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--pr-ink); }
.pointread-page .kp-name .truncate { white-space: normal; overflow-wrap: anywhere; }
.pointread-page .mastery-cell { justify-content: flex-end; }
.pointread-page .mastery-cell .num-md {
  font-size: 13px;
  font-weight: 400;
  color: var(--pr-muted);
  font-variant-numeric: tabular-nums;
}
.pointread-page .kp-actions { display: flex; align-items: center; gap: 2px; }
.pointread-page .kp-actions .btn {
  min-height: 36px;
  padding: 0 8px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  font-size: 12.5px;
}
.pointread-page .kp-actions .btn-practice { color: var(--brand-700); font-weight: 600; }
.pointread-page .kp-actions .btn-reading { color: var(--pr-muted); }
.pointread-page .kp-actions .btn:hover { background: #e9f2ec; border-color: transparent; }
.pointread-page .kp-actions .btn:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }

/* Words inside an open unit: one quiet row each. */
.pointread-page .kp-body-inner { padding: 0; }
.pointread-page .kp-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 20px 10px 46px;
  border-radius: 0;
  background: #fbfdfc;
}
.pointread-page .kp-item::before { display: none; }
.pointread-page .kp-item + .kp-item { border-top: 1px solid #f0f4f1; }
.pointread-page .kp-item-line { gap: 8px; flex-wrap: wrap; }
.pointread-page .kp-item-label { font-size: 14px; line-height: 1.5; }
.pointread-page .kp-item-meta { margin-top: 2px; font-size: 12px; color: var(--pr-muted); }
.pointread-page .kp-card .kp-item > .mastery-cell { grid-column: 2; }
.pointread-page .kp-card .kp-item .kp-actions { grid-column: 3; justify-content: flex-end; }
.pointread-page .kp-need { padding: 0; border: 0; background: transparent; color: var(--pr-muted); font-size: 11px; }
.pointread-page .kp-empty { padding: 28px 20px; color: var(--pr-muted); }
.pointread-page button:focus-visible,
.pointread-page select:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }

@media (max-width: 720px) {
  .pointread-page { margin: 0 4px; }
  .pointread-page .bento { gap: 12px; }
  .pointread-page .card { border-radius: 14px; }
  .pointread-progress .card-body { padding: 16px 18px 18px; }
  .pointread-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; margin: 0 0 16px; }
  .pointread-stats.is-classical { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pointread-stats > div { padding: 0 16px; }
  .pointread-stats > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .pointread-stats strong { font-size: 26px; }
  .pointread-pct b { font-size: 28px; }
  .pointread-pct { flex-wrap: wrap; gap: 2px 6px; }
  .pointread-pct span { white-space: nowrap; }
  .pointread-page .kp-top { padding: 14px 16px 4px; }
  .pointread-page .kp-pick .select { height: 40px; }
  .pointread-page .kp-pick-inline { max-width: 58%; }
  .pointread-page .kp-filter { min-height: 44px; padding: 0 16px; }
  .pointread-page .kp-filter-row { flex-wrap: nowrap; gap: 8px; }
  .pointread-page .kp-seg { display: flex; flex: 1 1 auto; min-width: 0; width: auto; gap: 14px; }
  .pointread-page .kp-seg button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0; text-align: center; font-size: 12px; }
  .pointread-page .kp-seg em { margin-left: 2px; font-size: 11px; }
  .pointread-page .pointread-batch-trigger { padding: 0 4px; font-size: 12.5px; }
  .pointread-page .kp-card .kp-head {
    grid-template-columns: 14px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px;
    min-height: 56px;
    padding: 8px 16px 8px 14px;
  }
  .pointread-page .kp-toggle { grid-column: 1; grid-row: 1 / span 2; align-self: start; margin-top: 3px; }
  .pointread-page .kp-name { grid-column: 2; grid-row: 1; font-size: 14.5px; }
  .pointread-page .kp-card .kp-head > .mastery-cell { grid-column: 3; grid-row: 1; }
  .pointread-page .kp-card .kp-head .kp-actions {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-content: flex-start;
    margin-left: -6px;
  }
  .pointread-page .kp-actions .btn { min-height: 44px; padding: 0 6px; font-size: 13px; }
  .pointread-page .kp-card .kp-head .kp-actions { gap: 10px; }
  .pointread-page .kp-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding: 10px 16px 10px 34px;
  }
  .pointread-page .kp-item-label { font-size: 14px; }
}

@media (max-width: 360px) {
  .pointread-stat-label { flex-wrap: wrap; white-space: normal; }
  .pointread-stats .checkin-streak { margin-top: 4px; }
}

/* 721-1180：单元行保持一行到底，操作放回名称右边，不要掉到第二行右对齐 */
@media (min-width: 721px) {
  .pointread-page .kp-card.is-pointread .kp-head { grid-template-columns: 16px minmax(0, 1fr) 56px auto; }
  .pointread-page .kp-card.is-pointread .kp-head > .mastery-cell { grid-column: 3; grid-row: 1; align-self: center; }
  .pointread-page .kp-card.is-pointread .kp-head .kp-actions { grid-column: 4; grid-row: 1; justify-content: flex-end; }
}

/* ---------- Batch marking dialog ---------- */
.pointread-batch-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; }
.pointread-batch-bar span { font-size: 12px; color: #626c68; }
.pointread-batch label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.pointread-batch .field { align-items: stretch; flex-direction: column; }
.pointread-batch input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--brand-600); }
.pointread-batch-dialog .modal { background: #fff; border-radius: 16px; width: min(720px, calc(100vw - 32px)); }
.pointread-batch-dialog .modal-head { padding: 24px; border-bottom: 1px solid #e5ebe7; }
.pointread-batch-dialog .modal-head .h2 { font-size: 20px; font-weight: 600; }
.pointread-batch-dialog .modal-body { padding: 20px 24px; }
.pointread-batch-dialog .sub { color: #626c68; font-size: 13px; }
.pointread-batch-dialog .modal-foot { padding: 16px 24px; background: #fafcfb; border-top: 1px solid #e5ebe7; }
.pointread-batch-dialog .btn { min-height: 42px; border-radius: 8px; box-shadow: none; background: #fff; }
.pointread-batch-dialog .btn-primary { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.pointread-batch-dialog .btn:disabled { opacity: 1; background: #edf1ee; color: #58665e; border-color: #dce4df; }
.pointread-batch-list { max-height: 46vh; overflow-y: auto; border: 0; }
.pointread-batch-list section { padding: 12px 0; }
.pointread-batch-list section + section { border-top: 1px solid #e5ebe7; }
.pointread-batch-unit { display: flex; align-items: center; gap: 10px; padding: 0; background: none; font-size: 14px; font-weight: 600; }
.pointread-batch-unit small { margin-left: auto; color: #626c68; font-size: 12px; font-weight: 400; white-space: nowrap; }
.pointread-batch-words { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 0; }
.pointread-batch-word { padding: 8px 10px; border: 1px solid #e1e7e3; border-radius: 8px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.pointread-batch-word:has(input:checked) { background: #edf5ef; border-color: #a7c7b3; color: #24523c; }
.pointread-batch-word:focus-within { outline: 2px solid var(--brand-600); outline-offset: 1px; }
@media (max-width: 640px) {
  .pointread-batch-dialog .modal-head, .pointread-batch-dialog .modal-body { padding: 16px; }
  .pointread-batch-dialog .modal-foot { padding: 12px 16px; }
  .pointread-batch-words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pointread-batch-dialog .btn { min-height: 44px; }
  .pointread-page .pointread-batch-trigger { min-height: 44px; }
}

/* ---------- Audio-reading modal ---------- */
.pointread-reader-overlay { padding: 20px; }
.pointread-reader-overlay .modal {
  width: min(1400px, 100%);
  max-width: 1400px;
  height: calc(100dvh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  background: #fff;
}
.pointread-reader-overlay .modal-head {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 52px;
  padding: 10px 16px;
}
.pointread-reader-overlay .modal-head .h2 {
  font-size: 16px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pointread-reader-overlay .modal-head > div:first-child {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 42%;
  min-width: 0;
  text-align: center;
}
.pointread-reader-overlay .modal-head-tools { flex: none; }
.pointread-reader-overlay .modal-body { flex: 1; min-height: 0; padding: 0; overflow: hidden; }
.pointread-reader-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.pointread-reader-controls { display: flex; align-items: center; gap: 6px; min-width: 0; margin-right: 4px; }
.pointread-reader-unit { font-size: 15px; font-weight: 500; color: var(--ink-900); line-height: 1.4; }
.pointread-reader-speeds { display: flex; align-items: center; gap: 2px; flex: none; }
.pointread-reader-speeds > span { font-size: 11.5px; color: var(--ink-500); margin-right: 2px; }
.pointread-reader-speeds button {
  min-width: 34px;
  min-height: 30px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-700);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.pointread-reader-speeds button:hover { background: #f1f5f2; }
.pointread-reader-speeds button[aria-pressed="true"] { background: #e9f3ed; border-color: #adc6b8; color: var(--brand-700); font-weight: 600; }
.pointread-reader-speeds button:focus-visible { outline: 2px solid var(--brand-700); outline-offset: 2px; }
.pointread-reader-speeds button:disabled { opacity: .5; cursor: wait; }
.pointread-reader-overlay [data-close] { width: 44px; height: 44px; }
@media (max-width: 900px) {
  .pointread-reader-overlay .modal-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    min-height: 0;
    padding: 8px 12px;
  }
  .pointread-reader-overlay .modal-head > div:first-child {
    position: static;
    transform: none;
    grid-column: 2;
    grid-row: 1;
    max-width: none;
  }
  .pointread-reader-overlay .modal-head-tools { grid-column: 3; grid-row: 1; }
  .pointread-reader-overlay .pointread-reader-controls {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
    margin-right: 0;
  }
  .pointread-reader-overlay .modal-head .h2 { font-size: 15px; }
}
@media (max-width: 760px) {
  .pointread-reader-overlay { padding: 0; }
  .pointread-reader-overlay .modal { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .pointread-reader-overlay .modal-head { gap: 2px 6px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .pointread-reader-overlay .modal-head .h2 { font-size: 15px; }
}
