/*
 * 精读页样式（2026-10-30 整理）
 * 结构：基础排版 → editorial 布局 → 首页画廊 → Apple 简约层 → 第二轮修正 → 深色模式。
 * 已移除被后文同选择器完全覆盖的 160 条声明和 36 条空规则；全部页面截图前后逐像素对比一致。
 * 颜色请改 :root 里的变量，深色值在文件末尾的 prefers-color-scheme 区块。
 */
:root {
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  scrollbar-color: #b4bbc1 var(--paper);
}

/* Small batches reuse the reading workspace and existing contrast tokens. */
.section-controls { padding: 16px 0; margin-bottom: 12px; border-bottom: 1px solid var(--line, #b4bbc1); }
.section-controls>div, .section-feedback-actions, .section-card-actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.section-controls select, .section-controls button, .section-feedback-actions button { min-height:44px; }
.section-controls .meta { margin:8px 0; }
.section-feedback-list { margin-top:12px; }
.section-feedback-list summary { cursor:pointer; min-height:44px; padding:8px 0; }
.section-feedback-list button { display:block; text-align:left; }
.section-feedback-actions { padding:24px 0; }
.section-feedback-actions>p { flex-basis:100%; }
.section-card-actions { flex-direction:column; align-items:stretch; }
.section-merge { width:min(680px,calc(100% - 24px)); max-height:85dvh; overflow:auto; color:var(--ink); background:var(--paper); }
.section-merge fieldset { margin:16px 0; border:1px solid var(--line, #b4bbc1); }
.section-merge pre { font:inherit; white-space:pre-wrap; overflow-wrap:anywhere; }
.translation-entry textarea[readonly] { opacity:.8; }
@media (max-width:600px) {
  .section-controls>div { gap:8px; }
  .section-controls select { max-width:100%; }
  .section-resume .section-card-actions { flex-direction:row; flex-wrap:wrap; }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  text-underline-offset: 4px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  line-height: 1.5;
}
button:hover {
  background: #eeefed;
}
button:disabled {
  opacity: 0.55;
}
button.link {
  border-color: transparent;
  padding-left: 0;
}
button[aria-busy="true"] {
  opacity: 0.6;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline-offset: 3px;
}
header {
  height: 76px;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
header span {
  color: var(--muted);
  font-size: 15px;
}
.brand {
  color: var(--ink);
  text-decoration: none;
}
.layout {
  margin: auto;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 56px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
  position: sticky;
  top: 24px;
}
nav button {
  text-align: left;
  border: 0;
  padding: 12px 16px;
}
nav button[aria-current="page"] {
  color: var(--blue);
  background: var(--soft);
  font-weight: 600;
}
main {
  min-width: 0;
  max-width: 900px;
}
h2 {
  line-height: 1.4;
  margin: 36px 0 12px;
  font-weight: 600;
}
h3 {
  font-size: 20px;
  margin: 0 0 8px;
  font-weight: 600;
}
p {
  margin: 10px 0 18px;
}
.muted,
.meta {
  color: var(--muted);
}
.intro {
  max-width: 640px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.row > div {
  min-width: 0;
}
.row button {
  flex-shrink: 0;
}
.row p {
  margin: 7px 0;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.banner {
  padding: 20px 24px;
  margin: 24px 0;
}
.banner p {
  margin: 0 0 12px;
}
#notice:not(:empty) {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.english {
  color: var(--ink);
}
.sentence {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.sentence label {
  display: block;
  margin-bottom: 12px;
}
.sentence-number {
  display: block;
  font:
    500 15px/1.5 -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--muted);
  margin-bottom: 8px;
}
textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid #bfc5ca;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 14px 16px;
  line-height: 1.7;
  caret-color: var(--blue);
}
textarea::placeholder {
  color: var(--muted);
}
textarea[aria-invalid="true"] {
  border-color: var(--error);
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.toolbar p {
  margin: 0;
}
.source {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.feedback {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.feedback .english {
  margin-top: 8px;
}
details {
  margin: 16px 0;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 8px 0;
}
.vocab-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.field {
  margin: 24px 0;
}
.field label {
  display: block;
  margin-bottom: 8px;
}
.field input,
.field select {
  width: 100%;
  background: #fff;
  border: 1px solid #bfc5ca;
  border-radius: 7px;
  padding: 11px 14px;
  color: var(--ink);
}
.skip {
  position: absolute;
  top: -80px;
  left: 20px;
  background: white;
  padding: 10px;
  z-index: 5;
}
.skip:focus {
  top: 10px;
}
.context {
  white-space: pre-line;
  color: var(--muted);
}
.empty {
  padding: 32px 0;
}
.saved {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  header {
    padding: 0 20px;
    height: 64px;
  }
  header span {
    font-size: 14px;
  }
  .layout {
    display: block;
  }
  nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    margin: 0 -20px 26px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  nav button {
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 16px;
  }
  h2 {
    font-size: 22px;
  }
  .intro {
    font-size: 18px;
  }
  .row {
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
  }
  .row button {
    margin: 0;
  }
  .english {
    font-size: 21px;
  }
  .sentence {
    padding: 24px 0;
  }
  .toolbar {
    padding: 12px 0;
  }
  .toolbar .actions {
    margin: 0;
  }
  .banner {
    padding: 18px;
  }
  .reading-meta {
    margin-bottom: 24px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background-color 0.15s ease-out;
  }
}

.reading-meta > p {
  margin: 6px 0;
}
.reading-meta > details {
  margin: 4px 0;
}
.reading-meta > p:last-child {
  margin-top: 12px;
}
.reading-meta {
  margin-bottom: 20px;
}
/* Approved editorial reading design: the same surfaces across the entire course. */
button {
  min-height: 48px;
  padding: 11px 22px;
}
button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
button.primary:hover {
  background: #363c41;
}
button:disabled {
  cursor: default;
}
.site-header {
  padding: 0 max(4vw, 24px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}
.brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.global-nav {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
}
.global-nav a,
.global-nav button {
  text-decoration: none;
  border: 0;
  position: relative;
  white-space: nowrap;
}
.global-nav button[aria-current="page"] {
  background: none;
}
.global-nav button[aria-current="page"]:after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.header-plan {
  justify-self: end;
}
.layout {
  max-width: 1488px;
  display: block;
  padding: 42px max(4vw, 24px) 60px;
}
.layout > main {
  max-width: none;
}
h1 {
  font-size: 44px;
  line-height: 1.3;
  margin: 12px 0 24px;
}
.catalog-title {
  font-size: 52px;
  margin: 22px 0 26px;
}
h2 {
  font-size: 25px;
}
.meta {
  font-size: 16px;
}
.section-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.section-nav > div {
  display: flex;
  gap: 30px;
}
.section-nav .tab {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 12px 6px;
  color: var(--muted);
  font-weight: 500;
}
.section-nav .active {
  border-bottom: 3px solid var(--blue);
  color: var(--blue);
}
.catalog-item {
  display: grid;
  grid-template-columns: 44% minmax(0, 1fr);
  gap: 26px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.catalog-item.featured {
  grid-column: 1/-1;
  grid-template-columns: 53% minmax(0, 1fr);
  gap: 40px;
  padding: 0 0 30px;
}
.article-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.75;
  object-fit: cover;
  border-radius: 5px;
}
.featured .article-image {
  aspect-ratio: 1.9;
}
.article-info p {
  margin: 9px 0 16px;
}
.article-info h2 {
  font-size: 23px;
  line-height: 1.4;
  margin: 12px 0;
}
.featured h2 {
  font-size: 42px;
  font-weight: 650;
  letter-spacing: -0.035em;
  margin: 20px 0 10px;
}
.article-subtitle {
  font-size: 20px;
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0 20px;
}
.featured .article-subtitle {
  font-size: 23px;
}
.catalog-action {
  margin-top: 18px;
}
.featured .catalog-action {
  margin-top: 32px;
}
.catalog-item:not(.featured) .catalog-action button {
  padding: 5px 0;
  background: transparent;
  border: 0;
  color: var(--blue);
  min-height: 40px;
}
.text-only {
  grid-column: 1/-1;
  grid-template-columns: 1fr;
  padding: 26px 0;
}
.text-only .article-info {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0 24px;
}
.text-only .article-info .catalog-action {
  grid-column: 2;
  grid-row: 1/4;
}
.back {
  margin-bottom: 20px;
  padding-left: 0;
}
.reading-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}
.reading-heading h1 {
  margin: 8px 0 18px;
}
.reading-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
  margin: 0;
}
.reading-meta details {
  margin: 0;
  max-width: 70%;
}
.reading-meta summary {
  padding: 0;
  min-height: auto;
}
.reading-workspace {
  display: grid;
  grid-template-columns: 53% minmax(0, 1fr);
  gap: 40px;
  padding: 28px 0 36px;
}
.reading-workspace h2 {
  margin: 0 0 22px;
}
.original-column {
  padding-right: 34px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.original-text {
  max-height: calc(100dvh - 390px);
  min-height: 300px;
  overflow: auto;
  scrollbar-gutter: stable;
  padding-right: 12px;
}
.english {
  overflow-wrap: break-word;
}
.original-text p {
  margin: 0 0 28px;
}
.source-sentence {
  font: inherit;
  display: inline;
  min-height: 0;
  padding: 3px 0;
  margin: 0;
  border: 0;
  background: none;
  text-align: left;
  line-height: inherit;
  color: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.translation-column {
  min-width: 0;
}
.translation-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.previous-translation {
  line-height: 1.75;
  min-height: 100px;
  padding: 8px 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  max-height: 135px;
  overflow: auto;
}
.translation-entry textarea {
  min-height: 180px;
  line-height: 1.8;
  padding: 18px 20px;
  border-color: #88a9cc;
}
.translation-entry label {
  margin-bottom: 12px;
}
.translation-entry details {
  margin-top: 18px;
}
.mobile-original {
  display: none;
}
.toolbar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 18px 0;
}
.toolbar .actions {
  margin: 0;
  gap: 14px;
}
.save-summary {
  display: flex;
  gap: 20px;
  align-items: center;
}
.saved {
  min-width: 8em;
  font-size: 16px;
}
.result-heading {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
.result-heading h1 {
  margin: 12px 0 18px;
}
.result-heading .article-subtitle {
  margin-bottom: 0;
}
.result-summary {
  white-space: nowrap;
  margin: 0 0 4px;
  color: var(--muted);
}
.error,
.result-summary .error {
  color: #a63a28;
}
.feedback-workspace {
  display: grid;
  grid-template-columns: 58% minmax(0, 1fr);
}
.translation-comparison {
  padding: 26px 34px 24px 0;
}
.translation-comparison > .muted {
  margin: 12px 0 18px;
  font-size: 18px;
}
.translation-comparison > .english {
  margin: 0 0 40px;
  line-height: 1.6;
}
.student-translation,
.reference-translation {
  line-height: 1.75;
  margin: 0 0 36px;
}
.translation-comparison details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.translation-comparison .context {
  color: var(--ink);
}
.teaching-column {
  padding: 30px 32px;
  min-width: 0;
}
.teaching-column h2 {
  margin: 8px 0 24px;
}
.explanation {
  line-height: 1.8;
  margin-bottom: 36px;
}
.technique-explanation {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.technique-label {
  color: var(--blue);
  font-size: 18px;
  font-weight: 600;
}
.technique-explanation h3 {
  margin: 14px 0 20px;
}
.technique-explanation > p:not(.meta):not(.technique-label) {
  font-size: 20px;
  line-height: 1.7;
}
.result-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.result-actions .primary {
  flex: 1;
  min-width: 200px;
}
.row .english {
  font-size: 24px;
}
#exercise-form {
  max-width: 920px;
}
#exercise-form > .english,
#exercise-form label .english {
  font-size: 30px;
}
.field {
  max-width: 560px;
}
.vocab-options button {
  font-size: 16px;
  text-align: left;
}
.feedback .english {
  font-size: 25px;
}
@media (min-width: 1600px) {
  .layout {
    padding-left: 60px;
    padding-right: 60px;
  }
}
@media (max-width: 1000px) {
  .global-nav {
    gap: 20px;
  }
  .brand {
    font-size: 18px;
    gap: 10px;
  }
  .featured h2 {
    font-size: 34px;
  }
  .catalog-item {
    grid-template-columns: 1fr;
  }
  .reading-workspace {
    gap: 25px;
  }
  .original-column {
    padding-right: 24px;
  }
  .english {
    font-size: 24px;
  }
  .save-summary {
    gap: 8px;
    flex-direction: column;
    align-items: flex-start;
  }
  .translation-comparison > .english {
    font-size: 26px;
  }
  .teaching-column {
    padding: 26px 22px;
  }
  .result-heading {
    display: block;
  }
  .result-summary {
    margin-top: 16px;
  }
  .student-translation,
  .reference-translation {
    font-size: 22px;
  }
}
@media (max-width: 760px) {
  .site-header {
    padding: 0 20px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .brand {
    font-size: 17px;
    gap: 10px;
  }
  .brand img {
    width: 18px;
    height: 25px;
  }
  .global-nav {
    gap: 20px;
  }
  .global-nav a {
    display: none;
  }
  .global-nav button {
    font-size: 17px;
    padding: 16px 0;
  }
  .header-plan {
    display: none;
  }
  .layout {
    padding: 24px 20px 32px;
  }
  .catalog-title {
    font-size: 34px;
    margin: 14px 0 22px;
  }
  .section-nav {
    margin-bottom: 22px;
    gap: 6px;
  }
  .section-nav > div {
    gap: 12px;
  }
  .section-nav button {
    padding: 12px 2px;
    font-size: 16px;
  }
  .section-nav > .link {
    white-space: nowrap;
  }
  #catalog {
    display: block;
  }
  .catalog-item.featured {
    display: block;
    padding-bottom: 28px;
  }
  .featured .article-image {
    aspect-ratio: 1.65;
  }
  .featured .article-info {
    padding-top: 16px;
  }
  .featured h2 {
    font-size: 29px;
    margin: 12px 0;
  }
  .featured .article-subtitle {
    font-size: 18px;
  }
  .featured .catalog-action {
    margin-top: 20px;
  }
  .catalog-item:not(.featured) {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    padding: 22px 0;
  }
  .catalog-item:not(.featured) .article-image {
    aspect-ratio: 1.1;
  }
  .catalog-item h2 {
    font-size: 21px;
  }
  .catalog-item .article-subtitle {
    font-size: 16px;
  }
  .article-info p {
    margin: 6px 0 10px;
  }
  .catalog-action {
    margin-top: 8px;
  }
  .text-only .article-info {
    display: block;
  }
  .catalog-item.text-only {
    display: block;
  }
  .meta {
    font-size: 15px;
  }
  h1 {
    font-size: 31px;
  }
  .reading-heading {
    padding-bottom: 18px;
  }
  .reading-meta {
    display: block;
    font-size: 15px;
  }
  .reading-meta details {
    max-width: 100%;
    margin-top: 8px;
  }
  .reading-meta .recommended-vocab {
    display: block;
    margin-top: 8px;
  }
  .back {
    margin: 0 0 12px;
    min-height: 40px;
    padding-top: 0;
  }
  .reading-workspace {
    display: block;
    padding: 22px 0;
  }
  .original-column {
    border: 0;
    padding: 0;
  }
  .original-column h2 {
    font-size: 20px;
    margin-bottom: 14px;
  }
  .original-text {
    max-height: 220px;
    min-height: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
  }
  .original-text .english {
    font-size: 20px;
    line-height: 1.7;
  }
  .translation-heading h2 {
    font-size: 22px;
    margin-bottom: 18px;
  }
  .previous-translation {
    display: none;
  }
  .mobile-original {
    display: block;
    font-size: 22px;
    line-height: 1.6;
    margin: 8px 0 18px;
  }
  .translation-entry textarea {
    font-size: 18px;
    padding: 14px;
  }
  .toolbar {
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 0 max(14px, env(safe-area-inset-bottom));
  }
  .save-summary {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
  }
  .saved {
    font-size: 14px;
    min-width: 0;
  }
  .toolbar .actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    width: 100%;
    gap: 8px;
  }
  .toolbar button {
    padding: 10px 7px;
    font-size: 16px;
  }
  .result-heading {
    padding-bottom: 18px;
  }
  .result-heading h1 {
    font-size: 34px;
  }
  .result-heading .article-subtitle {
    font-size: 18px;
  }
  .result-summary {
    font-size: 16px;
  }
  .feedback-workspace {
    display: block;
  }
  .translation-comparison {
    padding: 16px 0;
  }
  .translation-comparison > .english {
    font-size: 24px;
    line-height: 1.65;
    margin-bottom: 28px;
  }
  .student-translation,
  .reference-translation {
    font-size: 20px;
    margin-bottom: 24px;
  }
  .teaching-column {
    border: 0;
    padding: 22px 20px;
  }
  .explanation {
    font-size: 20px;
    margin-bottom: 24px;
  }
  .technique-explanation h3 {
    font-size: 26px;
  }
  .teaching-column h2 {
    margin: 0 0 16px;
  }
  .result-actions .primary {
    width: 100%;
    min-width: 0;
  }
  .row .english {
    font-size: 22px;
  }
}
dialog {
  background: var(--paper);
  color: var(--ink);
  padding: 28px 36px;
  max-width: calc(100vw - 40px);
  min-width: 280px;
}
dialog::backdrop {
  background: rgba(20, 28, 35, 0.25);
}
dialog h2 {
  margin-top: 0;
}
.mobile-context-button {
  display: none;
}
@media (max-width: 760px) {
  .mobile-context-button {
    display: block;
    margin: 0 0 18px;
    padding: 0;
    min-height: 36px;
  }
  .original-column {
    display: none;
  }
  .context-open .original-column {
    display: block;
  }
  .reading-workspace {
    padding-top: 16px;
  }
  .translation-entry textarea {
    min-height: 170px;
  }
  .toolbar {
    margin-top: 8px;
  }
}
.global-nav {
  margin: 0;
  padding: 0;
  border: 0;
}
.featured .primary {
  font-size: 20px;
  min-width: 185px;
  min-height: 58px;
}
@media (min-width: 761px) and (max-height: 800px) {
  body[data-page="article"] .site-header {
    height: 64px;
  }
  body[data-page="article"] .layout {
    padding-top: 20px;
  }
  body[data-page="article"] .back {
    margin-bottom: 8px;
    min-height: 36px;
    padding-top: 2px;
    padding-bottom: 2px;
  }
  .reading-heading h1 {
    font-size: 34px;
    margin: 4px 0 12px;
  }
  .reading-heading {
    padding-bottom: 16px;
  }
  .reading-workspace {
    padding: 20px 0;
  }
  .original-text {
    max-height: calc(100dvh - 350px);
    min-height: 180px;
  }
  .previous-translation {
    min-height: 60px;
    max-height: 90px;
    padding: 0 0 16px;
    margin-bottom: 16px;
    font-size: 17px;
  }
  .translation-entry textarea {
    min-height: 135px;
    font-size: 18px;
  }
  .reading-workspace h2 {
    font-size: 23px;
    margin-bottom: 16px;
  }
  .toolbar {
    min-height: 78px;
    padding: 12px 0;
  }
}

/* Inline vocabulary keeps the English passage and editor in place. */
.source-sentence {
  cursor: pointer;
}
.source-sentence:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
button.vocab-term {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  font: inherit;
  line-height: inherit;
  color: inherit;
  background: transparent;
  text-decoration: underline dotted #7e9ab2;
  text-underline-offset: 5px;
}
button.vocab-term:disabled,
button.vocab-term[aria-busy="true"] {
  opacity: 1;
}
.hint-warning {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin: 16px 0 0;
}
.previous-translation:empty {
  display: none;
}
.vocabulary-popup {
  position: fixed;
  z-index: 20;
  width: 310px;
  max-width: calc(100vw - 24px);
  padding: 16px 20px;
  background: #fff;
  font-size: 18px;
  line-height: 1.6;
}
.vocabulary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.vocabulary-heading strong {
  font-size: 22px;
}
.vocabulary-heading button {
  border: 0;
  padding: 0;
  min-width: 36px;
  font-size: 24px;
}
.vocabulary-popup p {
  margin: 6px 0 10px;
}
.vocabulary-popup .link {
  font-size: 15px;
}

/* One persistent dashboard navigation; collection categories stay subordinate. */
html {
  scrollbar-gutter: stable;
}
#hub-header .catalog-title {
  white-space: nowrap;
}
#hub-header .section-nav {
  position: static;
  flex-direction: row;
  gap: 16px;
}
.collection-tabs {
  position: static;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}
.collection-tabs button {
  border: 0;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
}
.collection-title {
  margin: 0 0 12px;
  font-size: 25px;
}
/* Selected gallery homepage. Reading, grading and completed work have separate homes. */
#catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 42px 28px;
}
#catalog .catalog-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
#catalog .article-image {
  aspect-ratio: 1.46;
  border-radius: 3px;
}
#catalog .article-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-top: 18px;
}
#catalog .article-subtitle,
.resume-info .article-subtitle {
  font-family: Georgia, "Times New Roman", serif;
}
#catalog .article-subtitle {
  font-size: clamp(18px, 1.7vw, 25px);
  margin: 0 0 14px;
  line-height: 1.5;
}
#catalog .meta {
  margin: auto 0 0;
  font-size: 17px;
}
#catalog .catalog-action {
  margin-top: 20px;
}
#catalog .catalog-action .primary {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: white;
  padding: 12px 28px;
  min-height: 56px;
  font-size: 19px;
}
#catalog.with-work .article-image {
  aspect-ratio: 1.95;
}
#catalog.with-work .catalog-action .primary {
  background: transparent;
  color: var(--blue);
  border-color: transparent;
  padding: 5px 0;
  min-height: 44px;
  font-size: 18px;
}
.ongoing {
  margin-bottom: 28px;
}
.resume-row {
  display: grid;
  grid-template-columns: 27% minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}
.resume-info h2 {
  font-size: clamp(25px, 2.45vw, 36px);
  margin: 0 0 8px;
  line-height: 1.4;
}
.resume-info .article-subtitle {
  font-size: 24px;
  margin: 0 0 16px;
}
.resume-row .article-image {
  aspect-ratio: 2.1;
  border-radius: 3px;
}
.resume-row > button {
  white-space: nowrap;
}
.resume-count {
  color: var(--muted);
}
.resume-info progress {
  display: block;
  border: 0;
  overflow: hidden;
  background: var(--line);
  accent-color: var(--blue);
}
.resume-info progress::-moz-progress-bar {
  background: var(--blue);
  border-radius: 3px;
}
.multiple .resume-row {
  grid-template-columns: 21% minmax(0, 1fr) auto;
  padding: 18px 0;
  gap: 32px;
}
.multiple .resume-info h2 {
  font-size: 28px;
}
.multiple .resume-info .article-subtitle {
  font-size: 22px;
  margin-bottom: 8px;
}
.expand-ongoing {
  margin-top: 10px;
}
.home-status {
  margin-bottom: 28px;
}
.status-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.status-row .article-image {
  aspect-ratio: 1.8;
  border-radius: 3px;
}
.status-row h3 {
  margin: 0 0 4px;
}
.status-row p {
  margin: 3px 0;
}
.completed-articles {
  border-top: 1px solid var(--line);
  margin-top: 38px;
  padding-top: 16px;
}
.completed-articles .row h3 {
  margin: 0;
}
.catalog-empty {
  margin: 24px 0;
}
@media (min-width: 761px) and (max-width: 1100px) {
  #catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .resume-row,
  .multiple .resume-row {
    grid-template-columns: 24% minmax(0, 1fr);
    gap: 20px;
  }
  .resume-row > button {
    grid-column: 2;
    justify-self: start;
  }
  .resume-info .article-subtitle {
    font-size: 20px;
  }
  .resume-info h2 {
    font-size: 27px;
  }
}
@media (max-width: 760px) {
  #catalog {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  #catalog .article-image,
  #catalog.with-work .article-image {
    aspect-ratio: 1.65;
  }
  #catalog .article-info {
    padding-top: 12px;
  }
  #catalog .article-subtitle {
    font-size: 20px;
  }
  #catalog .catalog-action {
    margin-top: 16px;
  }
  .resume-row,
  .multiple .resume-row {
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 0;
  }
  .resume-row .article-image {
    aspect-ratio: 1.1;
  }
  .resume-info .article-subtitle,
  .multiple .resume-info .article-subtitle {
    font-size: 17px;
    margin-bottom: 10px;
  }
  .resume-count {
    font-size: 16px;
  }
  .resume-row > button {
    grid-column: 1/-1;
    width: 100%;
    font-size: 18px;
  }
  .home-section-title {
    font-size: 23px;
    margin-bottom: 12px;
  }
  .status-row {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 14px;
  }
  .status-row h3 {
    font-size: 21px;
  }
  .status-row > button {
    grid-column: 2;
    justify-self: start;
  }
  .completed-articles .row {
    align-items: center;
  }
}
@media (max-width: 760px) {
  #hub-header .section-nav {
    gap: 6px;
  }
  #hub-header .section-nav button {
    white-space: nowrap;
  }
  .collection-tabs {
    gap: 6px;
    flex-wrap: wrap;
  }
  .collection-tabs button {
    font-size: 16px;
    padding: 8px 12px;
  }
  #hub-header .catalog-title {
    font-size: clamp(25px, 8vw, 34px);
  }
}

.home-arrow {
  vertical-align: middle;
}
.primary .home-arrow {
  filter: invert(1);
}
/* Align the selected desktop gallery's spacing and title scale. */
@media (min-width: 1101px) {
  .site-header {
    height: 96px;
  }
  #catalog .article-info h2 {
    font-size: 36px;
  }
  #catalog .article-subtitle {
    font-size: 26px;
  }
  #catalog.with-work .article-info h2 {
    font-size: 29px;
  }
  #catalog.with-work .article-subtitle {
    font-size: 23px;
  }
}
@media (min-width: 1101px) {
  .layout {
    padding-top: 52px;
  }
  .catalog-title {
    margin-bottom: 32px;
  }
  .ongoing {
    margin-bottom: 20px;
  }
  .resume-row > button {
    min-width: 214px;
    min-height: 58px;
    font-size: 20px;
  }
  #catalog .catalog-action .primary {
    min-width: 220px;
    min-height: 58px;
  }
  #catalog.with-work .catalog-action {
    margin-top: 10px;
  }
  #catalog.with-work .catalog-action .primary {
    min-width: 0;
    min-height: 44px;
  }
}
@media (min-width: 1101px) and (max-height: 800px) {
  body:has(#hub-header:not([hidden])) .site-header {
    height: 76px;
  }
  body:has(#hub-header:not([hidden])) .layout {
    padding-top: 26px;
  }
  .catalog-title {
    font-size: 44px;
    margin: 12px 0 20px;
  }
  #hub-header .section-nav {
    margin-bottom: 22px;
  }
  #catalog .article-image {
    aspect-ratio: 1.85;
  }
  #catalog .article-info {
    padding-top: 10px;
  }
  #catalog .article-info h2 {
    font-size: 28px;
    margin: 4px 0 8px;
  }
  #catalog .article-subtitle {
    font-size: 20px;
    margin-bottom: 10px;
  }
  #catalog .catalog-action {
    margin-top: 12px;
  }
  #catalog .catalog-action .primary {
    min-height: 48px;
    font-size: 18px;
    padding: 9px 22px;
  }
  .single .resume-info h2 {
    font-size: 28px;
  }
  .single .resume-info .article-subtitle {
    font-size: 20px;
  }
}

/* ===== Apple 简约层（2026-10-30）：只覆盖视觉，不改结构与配图 ===== */
:root {
  --paper: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #e5e5ea;
  --blue: #0066cc;
  --action: #0071e3;
  --soft: #f5f5f7;
  --error: #d70015;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  font-size: 17px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  background: var(--paper);
}
::selection {
  background: rgba(0, 113, 227, 0.16);
}
a {
  color: var(--blue);
}

/* Top and result bars share the same material in both themes. */
:root{--reading-bar-surface:rgba(255,255,255,.8);--reading-bar-filter:saturate(180%) blur(20px)}
/* 顶栏：矮、轻、半透明 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 56px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--reading-bar-surface);
  -webkit-backdrop-filter: var(--reading-bar-filter);
  backdrop-filter: var(--reading-bar-filter);
}
.brand {
  font-size: 16px;
  font-weight: 600;
  gap: 10px;
  letter-spacing: -0.01em;
}
.brand img {
  width: 16px;
  height: 20px;
}
.global-nav {
  gap: 32px;
}
.global-nav a,
.global-nav button {
  font-size: 14px;
  color: var(--ink);
  opacity: 0.8;
  padding: 0;
  min-height: 56px;
}
.global-nav a:hover,
.global-nav button:hover {
  opacity: 1;
  background: none;
}
.global-nav button[aria-current="page"] {
  color: var(--ink);
  opacity: 1;
  font-weight: 600;
}
.global-nav button[aria-current="page"]:after {
  display: none;
}
.header-plan {
  font-size: 14px;
  min-height: 36px;
}

/* 标题与分栏 */
.layout {
  padding-top: 40px !important;
}
.catalog-title,
#hub-header .catalog-title {
  font-size: 40px !important;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 8px 0 28px !important;
}
h1 {
  font-weight: 600;
  letter-spacing: -0.03em;
}
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
}
#hub-header .section-nav {
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
#hub-header .section-nav .tab,
#hub-header .section-nav > .link {
  font-size: 15px;
  padding: 12px 0;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  min-height: 0;
}
#hub-header .section-nav > div {
  gap: 28px;
}
#hub-header .section-nav .active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 600;
}
#hub-header .section-nav > .link {
  color: var(--blue);
}
.collection-tabs button {
  border-radius: 980px;
  font-size: 14px;
  min-height: 32px;
  padding: 6px 14px;
}
.collection-tabs button.active {
  color: #fff;
  background: var(--ink);
}
.home-section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--faint);
  margin: 0 0 16px;
}
.intro {
  color: var(--muted);
  font-size: 17px;
}

/* 按钮：一个蓝色主按钮，其余安静 */
button {
  border-radius: 10px;
  font-weight: 500;
}
button.primary,
#catalog .catalog-action .primary,
.featured .primary {
  background: var(--action);
  border-color: var(--action);
  color: #fff;
  border-radius: 10px;
  font-size: 16px !important;
  min-height: 44px !important;
  padding: 10px 20px;
  min-width: 0 !important;
}
button.primary:hover,
#catalog .catalog-action .primary:hover {
  background: #0077ed;
  border-color: #0077ed;
}
button:not(.primary):not(.link):not(.tab):not(.source-sentence):not(
    .vocab-term
  ) {
  border-color: transparent;
  background: var(--soft);
}
button:not(.primary):not(.link):not(.tab):not(.source-sentence):not(
    .vocab-term
  ):hover {
  background: #ebebf0;
}
button.link {
  color: var(--blue);
}
.home-arrow {
  width: 14px;
  height: 14px;
  margin-left: 8px;
  opacity: 0.9;
}
#catalog.with-work .catalog-action .primary,
.catalog-item:not(.featured) .catalog-action button {
  background: transparent !important;
  color: var(--blue) !important;
  border: 0;
  padding: 0 !important;
  min-height: 36px !important;
  font-size: 16px !important;
}
#catalog.with-work .home-arrow {
  filter: invert(27%) sepia(97%) saturate(1500%) hue-rotate(198deg);
  opacity: 1;
}
.resume-row > button {
  min-width: 0 !important;
  min-height: 44px !important;
  font-size: 16px !important;
  padding: 10px 20px;
}
.resume-row > button:not(.primary) {
  background: var(--soft);
}

/* 配图：保留，统一圆角 */
.article-image,
#catalog .article-image,
.resume-row .article-image,
.status-row .article-image {
  border-radius: 12px;
}

/* 文章列表与在读 */
#catalog .article-info h2 {
  font-size: 26px !important;
  line-height: 1.3;
  letter-spacing: -0.025em;
  margin: 6px 0 6px;
}
#catalog .article-subtitle,
.resume-info .article-subtitle,
.article-subtitle {
  font-family: inherit !important;
  color: var(--muted);
  font-size: 17px !important;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
#catalog .meta,
.meta {
  font-size: 14px;
  color: var(--faint);
}
.resume-row,
.status-row {
  border-bottom: 1px solid var(--line);
}
.resume-info h2,
.multiple .resume-info h2 {
  font-size: 24px !important;
  margin: 0 0 4px;
}
.resume-count {
  font-size: 14px;
  margin: 0 0 8px;
}
.resume-info progress {
  height: 4px;
  border-radius: 2px;
  width: min(100%, 360px);
}
.resume-info progress::-webkit-progress-bar {
  background: var(--line);
}
.resume-info progress::-webkit-progress-value {
  background: var(--action);
  border-radius: 2px;
}
.status-row h3 {
  font-size: 19px;
}
.status-label {
  font-size: 14px;
}
.completed-articles summary {
  font-size: 15px;
}

/* 阅读页 */
.back {
  font-size: 15px;
}
.reading-heading {
  border-bottom-color: var(--line);
}
.reading-heading h1 {
  font-size: 40px;
}
.reading-meta {
  font-size: 14px;
  color: var(--faint);
}
.reading-workspace h2 {
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--faint);
  margin-bottom: 18px !important;
}
.original-column {
  border-right-color: var(--line);
}
.english {
  font-family: "New York", "Iowan Old Style", Georgia, serif;
  font-size: 23px;
  line-height: 1.75;
  letter-spacing: 0;
}
.source-sentence {
  border-radius: 4px;
}
.source-sentence:hover {
  background: #f5f5f7;
}
.source-sentence.selected {
  background: rgba(0, 113, 227, 0.1);
}
button.vocab-term {
  text-decoration-color: #b7b7bd;
}
button.vocab-term:hover,
button.vocab-term:focus-visible {
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
}
.previous-translation {
  font-size: 17px;
  color: var(--ink);
  border-bottom-color: var(--line);
}
textarea,
.field input,
.field select {
  border: 1px solid #d2d2d7 !important;
  border-radius: 12px !important;
  background: #fff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
textarea:focus,
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--action) !important;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}
.translation-entry textarea {
  font-size: 18px;
}
.translation-entry label {
  font-size: 13px;
  color: var(--faint);
}
.toolbar {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  min-height: 72px;
}
.saved,
.save-summary {
  font-size: 14px;
  color: var(--faint);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.3);
}

/* 反馈页 */
.result-heading h1 {
  font-size: 40px;
}
.result-summary strong {
  color: var(--ink);
}
.teaching-column {
  background: var(--soft);
  border-left: 0;
  border-radius: 18px;
  margin: 24px 0;
}
.teaching-column h2 {
  color: var(--faint);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.explanation {
  font-size: 19px;
}
.technique-explanation h3 {
  font-size: 24px;
}
.translation-comparison > .english {
  font-size: 25px;
}
.student-translation,
.reference-translation {
  font-size: 20px;
}
.banner {
  border-radius: 12px;
  background: var(--soft);
}
#notice:not(:empty) {
  color: var(--error);
  border: 0;
  background: rgba(215, 0, 21, 0.06);
  border-radius: 10px;
  padding: 12px 16px;
}
dialog {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.vocabulary-popup {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.14);
}
.vocabulary-heading strong {
  font-family: "New York", Georgia, serif;
}

@media (max-width: 760px) {
  .site-header {
    height: 48px !important;
  }
  .global-nav button {
    min-height: 48px;
  }
  .catalog-title,
  #hub-header .catalog-title {
    font-size: 30px !important;
    margin: 4px 0 20px !important;
  }
  #hub-header .section-nav > div {
    gap: 18px;
  }
  #catalog .article-info h2 {
    font-size: 22px !important;
  }
  .resume-info h2,
  .multiple .resume-info h2 {
    font-size: 19px !important;
  }
  .reading-heading h1,
  .result-heading h1 {
    font-size: 28px;
  }
  .english,
  .original-text .english {
    font-size: 19px;
  }
  .toolbar .actions button {
    font-size: 15px !important;
  }
  .teaching-column {
    border-radius: 0;
    margin: 16px -20px;
  }
}
.global-nav a,
.global-nav button {
  display: inline-flex !important;
  align-items: center;
  height: 56px;
  background: transparent !important;
  border-radius: 0;
}
.collection-tabs button:not(.active),
.mobile-context-button,
.vocabulary-heading button {
  background: transparent !important;
}
@media (max-width: 760px) {
  .global-nav a,
  .global-nav button {
    height: 48px;
  }
}

/* —— 第二轮修正 —— */
/* 栏目：选中态清晰可读 */
.collection-tabs button.collection-tab-fix,
#collection-tabs button.active {
  color: #fff !important;
  background: var(--ink) !important;
}
#hub-header .section-nav > .link,
#hub-header .section-nav > .link.active {
  background: transparent !important;
  border-radius: 0;
}
#hub-header .section-nav > .link.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
/* 无在读文章时的画廊：一个实心蓝按钮；有在读文章时：蓝色文字链接 */
#catalog:not(.with-work) .catalog-action .primary {
  background: var(--action) !important;
  border: 0 !important;
  color: #fff !important;
  padding: 10px 20px !important;
  min-height: 44px !important;
}
#catalog.with-work .catalog-action .primary {
  border: 0 !important;
}
#catalog:not(.with-work) .home-arrow {
  filter: invert(1);
  opacity: 1;
}
/* 生词：行内可折行，不再整块换行 */
.vocab-term {
  display: inline;
  cursor: pointer;
  border-radius: 3px;
  text-decoration: underline dotted #b7b7bd;
  text-underline-offset: 5px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.vocab-term:hover,
.vocab-term:focus-visible {
  color: var(--blue);
  background: rgba(0, 113, 227, 0.08);
}
.vocab-term:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.3);
}
.vocab-term[aria-busy="true"] {
  opacity: 0.6;
}
/* 状态色：出错用橙色，完成用绿色，蓝色只表示可点 */
.status-label {
  color: var(--faint);
}
.status-label.failed {
  color: var(--warn);
}
.status-label.ready {
  color: var(--ok);
}
.verdict {
  color: var(--ok);
  font-weight: 600;
}
.verdict.error {
  color: var(--error);
}
blockquote {
  border-left: 0;
  background: var(--soft);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 8px 0 16px;
}
:root {
  --warn: #c93400;
  --ok: #248a3d;
}
/* 折叠箭头：细“›”，展开时转向下 */
summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
}
summary::-webkit-details-marker {
  display: none;
}
summary::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  margin-right: 2px;
}
details[open] > summary::before {
  transform: rotate(45deg) translate(-1px, -1px);
}
/* 阅读页：原文区不被底栏压住 */
body[data-page="article"] .original-text {
  max-height: calc(100dvh - 480px);
  padding-bottom: 8px;
}
@media (min-width: 761px) and (max-height: 800px) {
  body[data-page="article"] .original-text {
    max-height: calc(100dvh - 400px);
  }
}
body[data-page="article"] .reading-workspace {
  padding-bottom: 20px;
}
/* 只剩一篇“其他文章”时，横排占满一行，不留大块空白 */
@media (min-width: 761px) {
  #catalog.with-work .catalog-item:only-child {
    grid-column: 1/-1;
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }
  #catalog.with-work .catalog-item:only-child .article-image {
    width: 38%;
    flex: none;
    aspect-ratio: 1.9;
  }
  #catalog.with-work .catalog-item:only-child .article-info {
    padding-top: 0;
  }
}

/* —— 深色模式：跟随系统 —— */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #000;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #86868b;
    --line: #2c2c2e;
    --blue: #2997ff;
    --action: #0a84ff;
    --soft: #1c1c1e;
    --error: #ff453a;
    --warn: #ff9f0a;
    --ok: #30d158;
    scrollbar-color: #48484a #000;
  }
  body {
    background: var(--paper);
    color: var(--ink);
  }
  :root{--reading-bar-surface:rgba(0,0,0,.72)}
  .site-header {
    background: var(--reading-bar-surface);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  .brand img,
  .home-arrow {
    filter: invert(1);
  }
  button.primary .home-arrow,
  #catalog:not(.with-work) .home-arrow {
    filter: invert(1);
  }
  #catalog.with-work .home-arrow {
    filter: invert(52%) sepia(90%) saturate(2500%) hue-rotate(190deg)
      brightness(1.1);
  }
  button.primary:hover,
  #catalog .catalog-action .primary:hover {
    background: #409cff;
    border-color: #409cff;
  }
  button:not(.primary):not(.link):not(.tab):not(.source-sentence):not(
      .vocab-term
    ):hover {
    background: #2c2c2e;
  }
  #collection-tabs button.active {
    color: #000 !important;
  }
  textarea,
  .field input,
  .field select {
    background: #1c1c1e !important;
    color: var(--ink);
    border-color: #3a3a3c !important;
  }
  textarea:focus,
  .field input:focus,
  .field select:focus {
    background: #1c1c1e !important;
  }
  .toolbar {
    background: rgba(0, 0, 0, 0.78);
  }
  .source-sentence:hover {
    background: #1c1c1e;
  }
  .source-sentence.selected {
    background: rgba(10, 132, 255, 0.22);
  }
  .vocab-term {
    text-decoration-color: #636366;
  }
  .vocab-term:hover,
  .vocab-term:focus-visible {
    background: rgba(10, 132, 255, 0.18);
  }
  .vocabulary-popup,
  dialog {
    background: #1c1c1e;
    color: var(--ink);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  }
  dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
  }
  .resume-info progress {
    background: #2c2c2e;
  }
  .resume-info progress::-webkit-progress-bar {
    background: #2c2c2e;
  }
  #notice:not(:empty) {
    background: rgba(255, 69, 58, 0.12);
  }
  .student-translation.error,
  .error {
    color: var(--error);
  }
  .article-image {
    filter: brightness(0.92);
  }
  ::selection {
    background: rgba(10, 132, 255, 0.35);
  }
}

/* —— 反馈页：只标出错部分，讲解栏按内容收短 —— */
.student-translation mark.wrong-part,blockquote mark.wrong-part{color:var(--error);background:rgba(215,0,21,.08);border-radius:4px;padding:0 2px;text-decoration:underline wavy rgba(215,0,21,.55);text-underline-offset:6px;text-decoration-thickness:1px}
.feedback-workspace{align-items:start}
.teaching-column{align-self:start}
@media(prefers-color-scheme:dark){.student-translation mark.wrong-part,blockquote mark.wrong-part{background:rgba(255,69,58,.16);text-decoration-color:rgba(255,69,58,.6)}}

/* —— 反馈页：老师审过的固定讲解，默认收起成一行 —— */
details.teaching-notes{margin:4px 0 0;padding:0;border-top:1px solid var(--line)}
details.teaching-notes>summary{display:flex;align-items:center;gap:10px;min-height:52px;padding:12px 0;font-size:16px;font-weight:600;color:var(--ink)}
details.teaching-notes>summary::before{color:var(--faint)}
.teaching-key{font-size:13px;font-weight:500;color:var(--blue);background:rgba(0,113,227,.08);border-radius:980px;padding:3px 10px}
.teaching-body{padding:4px 0 16px}
.teaching-body h3{font-size:15px;font-weight:600;color:var(--muted);margin:18px 0 4px}
.teaching-body h3:first-child{margin-top:4px}
.teaching-body p{font-size:16px;line-height:1.75;margin:0 0 6px}
.example-pairs li{padding:10px 14px;margin:0 0 8px;background:var(--soft);border-radius:12px}
.example-pairs .english{font-size:17px;line-height:1.6;margin:0 0 2px}
.teaching-tech{margin-top:14px}
.example-pairs{list-style:none;margin:6px 0 0;padding:0}
@media(prefers-color-scheme:dark){.teaching-key{background:rgba(10,132,255,.18)}}

/* ===== 反馈页（重新设计）：一栏，按“看结论 → 比差别 → 学方法 → 去做”排列 ===== */
.result-page{max-width:1160px;margin:0 auto}
.result-page>.back{margin-bottom:8px}
.result-top{padding:4px 0 20px;border-bottom:1px solid var(--line);margin-bottom:28px}
.result-article{font-size:15px;font-weight:600;color:var(--muted);margin:0 0 12px}
.result-dots{display:flex;flex-wrap:wrap;gap:6px}
.dot{min-height:0;width:30px;height:30px;padding:0;border-radius:50%!important;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;border:0!important;transition:transform .15s}
.dot:hover{transform:scale(1.08)}
.dot.is-ok{background:rgba(36,138,61,.12)!important;color:var(--ok)}
.dot.is-fixed{background:rgba(36,138,61,.12)!important;color:var(--ok);box-shadow:inset 0 0 0 1.5px var(--ok)}
.dot.is-hinted{background:rgba(201,52,0,.10)!important;color:var(--warn)}
.dot.is-wrong{background:var(--error)!important;color:#fff}
.dot.is-current{box-shadow:0 0 0 2px var(--paper),0 0 0 4px var(--ink)!important}
.result-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin:12px 0 0;font-size:13px;color:var(--muted)}
.legend-item{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.result-legend .key{width:9px;height:9px;border-radius:50%;display:inline-block}
.result-legend .key.is-wrong{background:var(--error)}
.result-legend .key.is-hinted{background:rgba(201,52,0,.35)}
.result-legend .key.is-fixed{background:var(--paper);box-shadow:inset 0 0 0 1.5px var(--ok)}
.result-legend .key.is-ok{background:rgba(36,138,61,.35)}
.result-status{display:flex;align-items:center;gap:10px;margin:0 0 14px}
.sentence-no{font-size:15px;font-weight:600}
.status-badge{font-size:13px;font-weight:600;padding:3px 10px;border-radius:980px}
.status-badge.is-wrong{color:var(--error);background:rgba(215,0,21,.08)}
.status-badge.is-ok,.status-badge.is-fixed{color:var(--ok);background:rgba(36,138,61,.1)}
.status-badge.is-hinted{color:var(--warn);background:rgba(201,52,0,.08)}
.result-english{font-size:24px;line-height:1.65;margin:0 0 22px}
.compare{margin:0 0 30px;padding:6px 20px;background:var(--soft);border-radius:16px}
.compare>div{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;padding:14px 0}
.compare>div+div{border-top:1px solid var(--line)}
.compare dt{font-size:13px;font-weight:600;color:var(--muted);padding-top:4px}
.compare dd{margin:0;font-size:19px;line-height:1.75}
.compare dd.student-translation{font-size:19px}
.compare dd.error{color:var(--error)}
.reference-background{display:block;margin-top:6px;font-size:14px;line-height:1.65;color:var(--muted)}
.diagnosis{margin:0 0 24px}
.diagnosis h2{font-size:13px;font-weight:600;letter-spacing:.02em;color:var(--faint);margin:0 0 10px}
.error-list{margin:0;padding:0;list-style:none;counter-reset:err}
.error-list li{position:relative;counter-increment:err;padding:10px 0 10px 32px;font-size:17px;line-height:1.7;border-bottom:1px solid var(--line)}
.error-list li:last-child{border-bottom:0}
.error-list li::before{content:counter(err);position:absolute;left:0;top:13px;width:20px;height:20px;border-radius:50%;background:rgba(215,0,21,.1);color:var(--error);font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center}
.verdict-note{font-size:17px;line-height:1.7;margin:0}
.result-card details.teaching-notes{margin:0}
/* 译法推导：主干 → 挂修饰 → 调顺；关键只写真实出现过的错误；例句收起 */
.result-english:has(.trunk){color:var(--muted)}
.result-english .trunk{font-weight:650;color:var(--ink)}
.derivation{margin:0 0 24px;padding-top:20px;border-top:1px solid var(--line)}
.derivation h2{font-size:13px;font-weight:600;letter-spacing:.02em;color:var(--faint);margin:0 0 10px}
.steps{list-style:none;margin:0;padding:0}
.steps>li{display:grid;grid-template-columns:76px minmax(0,1fr);gap:14px;padding:14px 0;border-bottom:1px solid var(--line)}
.steps>li:last-child{border-bottom:0}
.step-kind{font-size:14px;font-weight:600;color:var(--blue);padding-top:3px;line-height:1.4}
.step-hint{display:block;margin-top:2px;font-size:12px;font-weight:400;color:var(--faint);white-space:normal}
.steps p{margin:0;font-size:17px;line-height:1.75}
.points{list-style:none;margin:0;padding:0}
.points li{position:relative;padding:0 0 8px 14px;font-size:16px;line-height:1.7;color:var(--ink)}
.points li:last-child{padding-bottom:0}
.points li::before{content:"";position:absolute;left:0;top:.75em;width:5px;height:5px;border-radius:50%;background:var(--faint)}
.gloss{display:inline;color:var(--faint);font-size:13px;line-height:1.5}
.key-note{margin:14px 0 0;padding:12px 16px;border-radius:12px;background:rgba(201,52,0,.06);font-size:16px;line-height:1.7}
.key-label{display:inline-block;margin-right:10px;font-size:13px;font-weight:600;color:var(--warn)}
details.example-note{margin:12px 0 0;border-top:1px solid var(--line)}
details.example-note>summary{min-height:48px;display:flex;align-items:center;font-size:15px;font-weight:600;color:var(--ink)}
details.example-note>summary::before{color:var(--faint)}
details.example-note p{margin:0 0 4px;font-size:16px;line-height:1.7}
details.example-note .english{font-size:17px}
.changes{list-style:none;margin:0;padding:0}
.steps .changes li{padding:0 0 14px;margin:0 0 14px;border-bottom:1px dashed var(--line)}
.steps .changes li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:0}
.steps .changes p{font-size:16px;line-height:1.7}
.changes .literal{color:var(--faint)}
.changes .natural{margin-top:4px;color:var(--ink);font-weight:600}
.literal-tag{display:inline-block;margin-right:8px;padding:0 6px;border-radius:6px;font-size:12px;font-weight:400;line-height:20px;vertical-align:1px;color:var(--muted);background:var(--soft)}
.literal-tag.is-natural{color:var(--blue);background:rgba(0,113,227,.08)}
.steps .changes .why{margin:6px 0 0;font-size:14px;line-height:1.65;color:var(--muted)}
.method-tag{display:inline-block;margin-right:8px;padding:0 6px;border:1px solid var(--line);border-radius:6px;font-size:12px;line-height:18px;color:var(--ink)}
@media(max-width:760px){.steps>li{grid-template-columns:1fr;gap:6px}.step-kind{padding-top:0}.step-hint{display:inline;margin:0 0 0 8px}}
@media(prefers-color-scheme:dark){.key-note{background:rgba(255,159,10,.12)}}
.result-card details.context-notes{border-top:1px solid var(--line);padding-top:0}
.result-card details.context-notes>summary{min-height:52px;font-size:16px;font-weight:600;color:var(--ink)}
.result-card details.context-notes>summary::before{color:var(--faint)}
.result-card details.context-notes .english{font-size:18px;margin:0 0 16px}
.collected-note{margin:0;padding-top:4px}
.result-page .result-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:28px 0 0;padding-top:20px;border-top:1px solid var(--line)}
.result-page .result-actions .link{margin-right:auto}
.result-page .result-actions .primary{flex:0 0 auto;min-width:160px}
@media(max-width:760px){
  .result-english{font-size:20px}
  .compare{padding:2px 16px;margin-bottom:24px}
  .compare>div{grid-template-columns:1fr;gap:4px;padding:12px 0}
  .compare dt{padding-top:0}
  .compare dd,.compare dd.student-translation{font-size:17px}
  .dot{width:28px;height:28px}
  .result-page .result-actions{position:sticky;bottom:0;z-index:4;margin:20px -20px 0;padding:12px 20px max(12px,env(safe-area-inset-bottom));background:rgba(255,255,255,.9);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}
  .result-page .result-actions .primary{flex:1}
}
@media(prefers-color-scheme:dark){
  .dot.is-wrong{color:#000}
  .error-list li::before{background:rgba(255,69,58,.18)}
  .status-badge.is-wrong{background:rgba(255,69,58,.15)}
  .status-badge.is-ok,.status-badge.is-fixed,.dot.is-ok,.dot.is-fixed{background:rgba(48,209,88,.15)!important}
  @media(max-width:760px){.result-page .result-actions{background:rgba(0,0,0,.85)}}
}
/* 宽屏两栏：左边看结论、比差别；右边学方法，滚动时跟随 */
.result-grid{display:block}
@media(min-width:1024px){
  .result-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:56px;align-items:start}
  .result-grid.is-single{grid-template-columns:minmax(0,760px)}
  .result-side{position:sticky;top:96px}
  .result-side .derivation{margin:0;padding-top:0;border-top:0}
  .result-side .teaching-notes{border-top:0}
  .result-main .compare{margin-bottom:26px}
  .result-english{max-width:980px}
}
/* 意思对，可更自然：黄色。只是表达建议，不算错。 */
.dot.is-natural{background:rgba(255,204,0,.28)!important;color:#7a5600}
.result-legend .key.is-natural{background:#f5c400}
.status-badge.is-natural{color:#7a5600;background:rgba(255,204,0,.22)}
.natural-tip{margin:0;padding:12px 16px;border-radius:12px;background:rgba(255,204,0,.14);font-size:16px;line-height:1.7}
.natural-tip .tip-try-row{margin-top:0}
.tip-label{display:inline-block;margin-right:10px;font-size:13px;font-weight:600;color:#7a5600}
.natural-tip .arrow{margin:0 8px;color:var(--faint)}
.tip-why{display:block;margin-top:2px;font-size:14px;color:var(--muted)}
@media(prefers-color-scheme:dark){.dot.is-natural{background:rgba(255,214,10,.22)!important;color:#ffd60a}.status-badge.is-natural,.tip-label{color:#ffd60a}.status-badge.is-natural{background:rgba(255,214,10,.15)}.natural-tip{background:rgba(255,214,10,.10)}}
/* 地道表达：先改再对照 */
.natural-tip p{margin:0}
.tip-try-row{display:flex;gap:12px;align-items:center;margin:10px 0 0}
.tip-try{flex:1;min-width:0;min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;font:inherit;font-size:16px;background:var(--paper);color:var(--ink)}
.tip-answer{margin-top:10px}
.tip-answer .arrow{margin-right:8px;color:var(--faint)}
.phrase-section{font-size:13px;font-weight:600;color:var(--faint);margin:28px 0 10px}
.phrase-card{padding:18px 20px;margin:0 0 12px;border-radius:16px;background:rgba(255,204,0,.10)}
.phrase-card .english{font-size:17px;margin:0 0 8px;color:var(--muted)}
.phrase-mine{margin:0;font-size:17px}
.phrase-card .actions{margin-top:12px}
.phrase-foot{display:flex;justify-content:flex-end;margin-top:6px}
.phrase-old{color:var(--faint)}
.phrase-row .arrow{margin:0 8px;color:var(--faint)}
.habit-note{background:rgba(255,204,0,.14)}
@media(prefers-color-scheme:dark){.phrase-card{background:rgba(255,214,10,.08)}.habit-note{background:rgba(255,214,10,.10)}}
.phrase-card,.phrase-row,.phrase-section,.habit-note{max-width:760px}
.phrase-card .tip-try-row{max-width:620px}
mark.stiff-part{background:rgba(255,204,0,.35);color:inherit;border-radius:3px;padding:0 1px}
@media(prefers-color-scheme:dark){mark.stiff-part{background:rgba(255,214,10,.28)}}
.tip-head{font-size:13px;font-weight:600;color:var(--faint);margin:14px 0 8px}
.vocab-source{display:inline-block;margin-left:8px;padding:0 7px;border-radius:6px;font-size:12px;line-height:20px;font-weight:500;vertical-align:3px;color:var(--muted);background:var(--soft)}
.vocab-source.is-pending{color:#7a5600;background:rgba(255,204,0,.22)}
.vocab-mine{margin:2px 0 0;color:var(--faint);font-size:15px}
.diagnosis-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.diagnosis-head h2{margin-bottom:10px}
.diagnosis-head .appeal{min-height:0;padding:0;font-size:14px}
.appeal-sent{font-size:14px;color:var(--faint)}

/* Mostly-wrong sentence: one retranslate note above the error list. */
.major-note{margin:0 0 .6rem;padding:.55rem .8rem;border-radius:10px;background:var(--error-bg,rgba(255,59,48,.08));color:var(--error,#c4271c);font-weight:600}

/* 不自然的地方 under 错在哪里: wording that is right but stiff. */
.diagnosis .stiff-head{margin-top:1.1rem}
.stiff-quote{margin:.5rem 0 .25rem;color:var(--muted,#6e6e73)}

/* 不自然的地方 / 可以更自然: same numbered list as 错在哪里, yellow numbers, no colour block (owner 2026-10-31). */
.error-list.is-stiff li::before{background:rgba(255,204,0,.28);color:#7a5600}
.error-list.is-stiff strong{font-weight:650}
@media(prefers-color-scheme:dark){.error-list.is-stiff li::before{background:rgba(255,214,10,.22);color:#ffd60a}}
.diagnosis .stiff-head{margin-top:1.4rem}

/* Owner 2026-11-01: names and special terms: tap to see the Chinese, never counted as a hint.
   Solid faint underline, unlike the dotted underline of counted vocabulary hints. */
.name-term{display:inline;cursor:pointer;border-radius:3px;text-decoration:underline solid rgba(0,113,227,.35);text-decoration-thickness:1px;text-underline-offset:5px;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.name-term:hover,.name-term:focus-visible{background:rgba(0,113,227,.08);outline:none}
.name-popup .name-note{margin:6px 0 0;font-size:13px;color:var(--muted)}
/* Owner 2026-11-01: 词义 under 怎么译出来: one row per word or phrase, English then its meaning here. */
.word-list{list-style:none;margin:0;padding:0}
.word-list li{display:grid;grid-template-columns:10.5em 1fr;gap:4px 14px;padding:4px 0;line-height:1.55}
.word-list .word-en{font-weight:600;color:inherit}
.word-list .word-zh{color:inherit}
.word-list .word-note{display:block;font-size:.88em;color:var(--muted)}
@media (max-width:640px){.word-list li{grid-template-columns:1fr;gap:0}}
/* Optional lesson sections; the next action stays within reach. */
.derivation .steps>li{display:block;padding:0}
.lesson-section>summary,.wording-section>summary,.reference-context>summary{display:flex;min-height:48px;padding:10px 0;cursor:pointer;font-size:15px;font-weight:600;color:var(--ink)}
.lesson-section>summary .step-kind{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 12px;padding:0;font-size:16px}
.lesson-section>summary .step-hint{display:inline;margin:0;color:var(--muted);font-size:13px}
.lesson-section-body{padding:0 0 18px 18px}
.wording-section{margin-top:14px;border-top:1px solid var(--line)}
.reference-context{margin-top:6px}
.reference-context>summary{font-size:14px;color:var(--muted)}
.reference-context .reference-background{margin:0 0 8px}
.result-card .word-help{font-size:13px;line-height:1.5;color:var(--muted);margin:-12px 0 22px}
.lesson-term{display:inline;cursor:pointer;text-decoration:underline dotted var(--muted);text-decoration-thickness:1px;text-underline-offset:5px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.lesson-term:hover{color:var(--blue);background:var(--soft)}
.lesson-term:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:2px}
.lesson-word-popup{width:min(420px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}
.lesson-word-entry{font-size:16px;line-height:1.65;overflow-wrap:anywhere}
.lesson-word-entry+.lesson-word-entry{border-top:1px solid var(--line);margin-top:12px;padding-top:12px}
.lesson-word-entry h3{font-size:16px;margin:0 0 6px}
.lesson-word-entry .lesson-word-meaning{font-weight:600;margin-top:4px}
.lesson-word-popup .vocabulary-heading{align-items:flex-start;gap:12px}
.lesson-word-popup .vocabulary-heading strong{overflow-wrap:anywhere}
.lesson-word-popup .vocabulary-heading button{flex-shrink:0;min-width:40px;min-height:40px}
.result-page{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
.result-page .result-actions{position:fixed;bottom:0;left:0;right:0;z-index:8;max-width:1200px;margin:0 auto;padding:14px 20px max(14px,env(safe-area-inset-bottom));background:var(--reading-bar-surface);border-top:1px solid var(--line);box-sizing:border-box;backdrop-filter:var(--reading-bar-filter);-webkit-backdrop-filter:var(--reading-bar-filter)}
.result-side{position:static}
@media(max-width:760px){
  .result-page .result-actions{gap:10px;padding:12px 20px max(16px,env(safe-area-inset-bottom));background:var(--reading-bar-surface)}
  .result-page .result-actions .primary{min-width:0}
  .lesson-section-body{padding-left:0}
}

.result-page .result-actions .link{margin-right:0;white-space:nowrap}
.result-page .result-actions .link:first-child{margin-right:auto}

.example-note .example-link{margin-top:10px;font-size:14px;line-height:1.65;color:var(--muted)}

#home-placement { margin: 12px 0; }
.placement-dialog { width: min(540px, 92vw); max-height: 86dvh; padding: clamp(20px, 4vw, 36px); border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); }
.placement-dialog::backdrop { background: rgb(18 24 36 / 38%); }
.placement-dialog h2 { margin: 18px 0 8px; }
.placement-dialog h2:focus { outline: none; }
.placement-bar, .placement-actions { display: flex; align-items: center; gap: 10px; }
.placement-bar { justify-content: space-between; color: var(--muted); border-bottom: 1px solid var(--line); }
.placement-options { display: grid; gap: 8px; }
.placement-options button { text-align: left; min-height: 44px; }
.placement-dialog progress { width: 100%; height: 5px; accent-color: var(--blue); }
.placement-sentence { font: 1.5rem/1.55 Georgia, serif; margin: 22px 0; }
.placement-sentence strong { color: var(--blue); }
.placement-book { border-top: 1px solid var(--line); padding: 16px 0; }
.placement-book p { margin: 5px 0; }
.placement-dialog details { padding: 14px 0; }

/* ── 2026-11-04 收尾：复习概览、学习计划、我的收录卡片化（原为纯文字堆叠） ── */
#content:focus { outline: none; } /* 页面切换时程序聚焦 main，不应出现整页外框 */

/* 错句复习：三项数字 + 轮次进度 */
.review-overview { margin: 0 0 28px; }
.review-overview .intro { margin: 0 0 16px; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; max-width: 640px; margin: 0; }
.stat-strip .stat { padding: 14px 18px; border-radius: 14px; background: var(--soft); }
.stat-strip dt { font-size: 13px; color: var(--muted); margin: 0 0 2px; }
.stat-strip dd { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px; }
.stat-strip strong { font-size: 26px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-strip dd > span { font-size: 14px; color: var(--muted); }
.round-track { display: flex; gap: 4px; flex-basis: 100%; margin-top: 8px; }
.round-track i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.round-track i.done { background: var(--ok); }
.round-track i.now { background: var(--action); }
#exercise-form { padding: 24px 28px 20px; border: 1px solid var(--line); border-radius: 18px; }
#exercise-form > .meta:first-child { margin: 0 0 4px; font-size: 13px; letter-spacing: .02em; }
#exercise-form > details { margin: 0 0 8px; }
#exercise-form > .meta:last-child { margin: 12px 0 0; font-size: 13px; }
.empty { padding: 40px 28px; border-radius: 18px; background: var(--soft); text-align: center; color: var(--muted); }
.empty h2 { margin: 0 0 8px; color: var(--ink); }
.empty p { margin: 0 auto 18px; max-width: 460px; }
p.empty { padding: 32px 24px; }

/* 学习计划：设置卡片 */
.settings-card { max-width: 640px; margin: 24px 0; padding: 4px 24px; border-radius: 18px; background: var(--soft); }
.setting-row.field { max-width: none; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-text { min-width: 0; }
.setting-row label { margin: 0; font-weight: 600; }
.setting-row .meta { margin: 2px 0 0; font-size: 13px; line-height: 1.5; }
.setting-row input { width: 96px; flex-shrink: 0; text-align: center; font-size: 18px; font-variant-numeric: tabular-nums; padding: 8px 10px; }
.settings-pending { max-width: 640px; color: var(--ok); background: rgba(36, 138, 61, .08) !important; }

/* 我的收录 */
.collection-title { display: flex; align-items: center; gap: 10px; }
.collection-count { font-size: 13px; font-weight: 600; min-width: 24px; padding: 1px 9px; border-radius: 980px; background: var(--soft); color: var(--muted); text-align: center; }
.row-eyebrow { margin: 0 0 6px !important; font-size: 13px; color: var(--faint); }
.row-status { margin: 10px 0 0 !important; }
.status-badge:not([class*="is-"]) { color: var(--muted); background: var(--soft); }
.sentence-row .english { font-size: 21px; line-height: 1.55; margin: 0 !important; }

.collection-list.is-vocabulary { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 20px; }
.collection-list .vocab-row { flex-direction: column; align-items: stretch; justify-content: space-between; gap: 16px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; }
.vocab-row h3 { margin: 0 0 6px; font-size: 21px; }
.vocab-row .vocab-meaning { margin: 0; font-size: 17px; }
.vocab-row .vocab-mine { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.vocab-row .row-eyebrow { margin: 10px 0 0 !important; }
.vocab-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.vocab-actions .link { color: var(--muted); padding-right: 0; }

.collection-list.is-techniques { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; margin-top: 20px; }
.technique-card.feedback { display: flex; flex-direction: column; padding: 24px 26px 18px; border: 1px solid var(--line); border-radius: 18px; }
.technique-card h2 { margin: 0 0 8px; font-size: 21px; }
.technique-card .technique-text { margin: 0 0 16px; color: var(--muted); line-height: 1.7; }
.technique-example { margin: 0 0 16px; padding: 14px 18px; border-left: 3px solid var(--action); border-radius: 0 12px 12px 0; background: var(--soft); }
.technique-example .english { font-size: 19px !important; margin: 0 0 4px !important; }
.technique-example p:last-child { margin: 0; }
.technique-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.technique-foot .link { padding-right: 0; color: var(--blue); }

@media (max-width: 760px) {
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat-strip .stat { padding: 10px 12px; }
  .stat-strip strong { font-size: 21px; }
  #exercise-form { padding: 18px 16px; border-radius: 14px; }
  .settings-card { padding: 4px 16px; }
  .setting-row.field { gap: 14px; }
  .setting-row input { width: 76px; }
  .collection-list.is-vocabulary, .collection-list.is-techniques { grid-template-columns: 1fr; }
  .technique-card.feedback { padding: 18px 18px 14px; }
  .sentence-row .english { font-size: 18px; }
}
@media (prefers-color-scheme: dark) {
  .settings-pending { background: rgba(48, 209, 88, .12) !important; }
  .setting-row input { background: #000 !important; border-color: #3a3a3c !important; }
}

/* ── 2026-11-04 精读邀请码开通页：表单卡片 + 开通后能做什么 ── */
.redeem-page { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 48px; align-items: center; max-width: 1040px; margin: 48px auto 64px; }
.redeem-card { padding: 36px 36px 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: 0 18px 48px rgba(0, 0, 0, .06); }
.redeem-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(0, 113, 227, .1); }
.redeem-icon img { width: 24px; height: 24px; }
.redeem-eyebrow { margin: 20px 0 4px; font-size: 13px; letter-spacing: .04em; color: var(--muted); }
.redeem-card h1 { margin: 0 0 10px; font-size: 34px; line-height: 1.2; }
.redeem-lead { margin: 0 0 26px; color: var(--muted); font-size: 16px; line-height: 1.7; }
#reading-redeem { display: grid; gap: 10px; }
#reading-redeem label { font-size: 14px; font-weight: 600; }
#reading-redeem input { width: 100%; min-height: 54px; padding: 12px 16px; font-size: 19px; letter-spacing: .06em; font-family: ui-monospace, "SF Mono", Menlo, monospace; border: 1px solid #d2d2d7; border-radius: 12px; background: var(--paper); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
#reading-redeem input::placeholder { letter-spacing: .02em; font-family: inherit; color: var(--faint); font-size: 16px; }
#reading-redeem input:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 4px rgba(0, 113, 227, .15); }
#reading-redeem input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 4px rgba(215, 0, 21, .1); }
#reading-redeem button { width: 100%; min-height: 52px; margin-top: 6px; font-size: 17px; border-radius: 12px; }
.redeem-status { min-height: 22px; margin: 2px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.redeem-status.is-error { color: var(--error); }
.redeem-status.is-ok { color: var(--ok); }
.redeem-status.is-busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--line); border-top-color: var(--action); border-radius: 50%; animation: redeem-spin .8s linear infinite; }
@keyframes redeem-spin { to { transform: rotate(360deg); } }
.redeem-help { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.redeem-photos { position: relative; aspect-ratio: 1.85; margin-bottom: 24px; } /* tall enough for the rotated 58%-wide 4:3 photos at any width */
.redeem-photos img { position: absolute; width: 58%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; border: 4px solid var(--paper); box-shadow: 0 12px 32px rgba(0, 0, 0, .12); }
.redeem-photos img:nth-child(1) { left: 0; top: 18px; transform: rotate(-4deg); }
.redeem-photos img:nth-child(2) { left: 21%; top: 0; z-index: 1; }
.redeem-photos img:nth-child(3) { right: 0; top: 30px; transform: rotate(4deg); }
.redeem-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.redeem-perks li { display: flex; gap: 14px; align-items: flex-start; }
.redeem-perks li > img { flex: none; width: 22px; height: 22px; padding: 9px; box-sizing: content-box; border-radius: 12px; background: var(--soft); }
.redeem-perks strong { display: block; font-size: 16px; }
.redeem-perks span { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) {
  .redeem-page { grid-template-columns: 1fr; gap: 28px; margin: 16px auto 40px; max-width: 520px; }
  .redeem-card { padding: 26px 20px 20px; border-radius: 18px; }
  .redeem-card h1 { font-size: 28px; }
  .redeem-photos { margin-bottom: 16px; }
  .redeem-photos img { width: 52%; }
}
@media (prefers-reduced-motion: reduce) { .redeem-status.is-busy::before { animation: none; } }
@media (prefers-color-scheme: dark) {
  .redeem-card { background: #111; box-shadow: none; }
  .redeem-icon { background: rgba(10, 132, 255, .18); }
  .redeem-icon img { filter: invert(1); }
  .redeem-perks li > img { filter: invert(1); background: #e3e3e1; }
  #reading-redeem input { background: #000; border-color: #3a3a3c; }
}

/* 未登录：登录引导卡片（与开通页同一布局） */
.signin-button { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 12px; background: var(--action); color: #fff; font-size: 17px; font-weight: 500; text-decoration: none; }
.signin-button:hover { background: #0077ed; }
.signin-button:focus-visible { outline: 3px solid rgba(0, 113, 227, .35); outline-offset: 3px; }
.signin-steps { list-style: none; margin: 24px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); counter-reset: s; display: grid; gap: 14px; }
.signin-steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; }
.signin-steps li::before { content: counter(s); grid-row: 1 / 3; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); color: var(--ink); font-size: 13px; font-weight: 600; }
.signin-steps strong { font-size: 15px; line-height: 26px; }
.signin-steps span { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* —— 全站统一顶栏（2026-11-04）——
   与学习中心首页、选书页、词汇首页同一规格：60px 通栏，品牌靠左、四个板块居中、我的账户靠右。
   内容宽度不影响导航位置，切换页面时导航不再忽大忽小；手机端也保留四个板块。 */
/* Match vocabulary: authenticated page navigation does not require a transition. */
@view-transition { navigation: none; }
html { scrollbar-gutter: stable; }
html body .site-header {
  box-sizing: border-box;
  height: 60px !important;
  padding: 0 max(24px, calc((100% - 1280px) / 2));
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, .07);
  background: rgba(248, 248, 246, .86);
  view-transition-name: site-bar;
}
html body .site-header .brand { justify-self: start; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--ink); text-decoration: none; }
html body .site-header .brand img { width: 15.6px; height: 22px; }
html body .global-nav { grid-column: 2; justify-self: center; gap: 36px; }
html body .global-nav a,
html body .global-nav button {
  display: inline-flex !important;
  height: 60px; min-height: 0; padding: 0;
  font: inherit; font-size: 15px; color: #70757b; opacity: 1;
}
html body .global-nav a:hover,
html body .global-nav button:hover { color: var(--ink); }
html body .global-nav button[aria-current="page"] { color: var(--ink); font-weight: 600; cursor: pointer; }
html body .global-nav button[aria-current="page"]:after {
  display: block; content: ""; position: absolute; bottom: 11px; left: calc(50% - 2.5px);
  width: 5px; height: 5px; border-radius: 50%; background: #315b83;
}
html body .site-header .header-plan {
  grid-column: 3; justify-self: end; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0; border: 0; background: none; font-size: 15px; color: #70757b; text-decoration: none;
}
html body .site-header .header-plan img { width: 18px; height: 18px; opacity: .65; }
html body .site-header .header-plan:hover { color: var(--ink); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (max-width: 760px) {
  html body .site-header { height: 56px !important; padding: 0 16px; grid-template-columns: auto 1fr auto; gap: 12px; }
  html body .site-header .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html body .site-header { position: sticky; }
  html body .global-nav { position: absolute; left: 50%; top: 0; transform: translateX(-50%); margin: 0; padding: 0; gap: clamp(12px, 4vw, 28px); }
  html body .global-nav a { display: inline-flex !important; }
  html body .global-nav a,
  html body .global-nav button { height: 56px; font-size: 15px; }
  html body .global-nav button[aria-current="page"]:after { bottom: 9px; width: 4px; height: 4px; left: calc(50% - 2px); }
  html body .site-header .header-plan { display: inline-flex; }
  html body .site-header .header-plan span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html body .site-header .header-plan img { width: 22px; height: 22px; }
}
@media (prefers-color-scheme: dark) {
  html body .site-header { background: rgba(20, 20, 22, .78); border-bottom-color: rgba(255, 255, 255, .1); }
  html body .global-nav a, html body .global-nav button, html body .site-header .header-plan { color: #a1a1a6; }
  html body .global-nav a:hover, html body .global-nav button:hover, html body .global-nav button[aria-current="page"], html body .site-header .header-plan:hover { color: var(--ink); }
  html body .global-nav button[aria-current="page"]:after { background: #7aa7d6; }
  html body .site-header .header-plan img { filter: invert(1); }
}
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
html body .global-nav { width: max-content; }

/* Shared article difficulty, independent of vocabulary coverage estimates. */
.difficulty-guide { color: var(--muted, #707075); font-size: 15px; margin: 8px 0 24px; max-width: 960px; }
.difficulty-guide > summary { cursor: pointer; min-height: 44px; color: var(--ink); font-weight: 600; flex-wrap: wrap; }
.difficulty-summary-note { color: var(--muted, #707075); font-weight: 400; font-size: 14px; margin-left: 8px; }
.difficulty-guide-body { padding: 8px 0 20px; }
.difficulty-guide p { margin: 8px 0; line-height: 1.7; }
.difficulty-guide h3 { font-size: 17px; margin: 22px 0 10px; color: var(--ink); }
.difficulty-level { border-top: 1px solid var(--line); margin-top: 20px; }
.difficulty-level h3 span { letter-spacing: 2px; }
.difficulty-level dl { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 6px 12px; margin: 12px 0 0; line-height: 1.7; }
.difficulty-level dt { color: var(--ink); font-weight: 500; }
.difficulty-level dd { margin: 0; }
.difficulty-exam-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.difficulty-exam { padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.difficulty-exam h4 { font-size: 15px; color: var(--ink); margin: 0; }
.difficulty-exam .difficulty-range { color: var(--ink); font-weight: 500; }
.difficulty-scope { border-top: 1px solid var(--line); padding-top: 16px; }
.difficulty-sources { font-size: 13px; }
@media (max-width: 600px) {
  .difficulty-exam-list { grid-template-columns: minmax(0, 1fr); }
  .difficulty-summary-note { font-size: 12px; margin-left: 4px; }
}

/* Typos are neutral writing reminders, never yellow learning targets. */
.typo-list {padding-left:1.2em; color:var(--muted, #6e6e73); line-height:1.7;}
.diagnosis-actions {text-align:right; margin-top:12px;}

/* ===== 平台统一层（第一阶段，2026-11-07）=====
 * 颜色取自 platform-tokens.css，与词汇、学习中心一致。
 * 实心主按钮统一为墨色；蓝色只留给文字链接、焦点框和进度。
 * 深色模式仍由上方的深色变量负责，这里只补主按钮的深色取值。 */
@media not all and (prefers-color-scheme: dark) {
  :root {
    --paper: var(--pf-paper, #fafaf8);
    --ink: var(--pf-ink, #252729);
    --muted: var(--pf-muted, #62696f);
    --faint: var(--pf-faint, #8a9096);
    --line: var(--pf-line, #dfe1e1);
    --blue: var(--pf-link, #0071e3);
    --action: var(--pf-focus, #0071e3);
    --soft: var(--pf-panel, #f0f1f3);
    --reading-bar-surface: rgba(250, 250, 248, 0.86);
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --pf-primary: #f5f5f7;
    --pf-primary-hover: #ffffff;
    --pf-on-primary: #000000;
  }
}
/* 只改变按钮自身的 --action，焦点框、进度条等仍用蓝色。 */
button.primary,
#catalog .catalog-action .primary,
.featured .primary {
  --action: var(--pf-primary, #252729);
  color: var(--pf-on-primary, #fff);
}
button.primary:hover,
#catalog .catalog-action .primary:hover {
  background: var(--pf-primary-hover, #3b3e40);
  border-color: var(--pf-primary-hover, #3b3e40);
}
#catalog:not(.with-work) .catalog-action .primary {
  color: var(--pf-on-primary, #fff) !important;
}
@media (prefers-color-scheme: dark) {
  button.primary .home-arrow,
  #catalog:not(.with-work) .home-arrow {
    filter: none;
  }
}

/* ===== 平台统一层（第二阶段，2026-11-07）：精读页面 =====
 * 页面宽度与学习中心一致；首页列表统一缩略图；栏目入口与标签统一；
 * 反馈页与首页同宽；“用过提示／待巩固”改用琥珀色，红色只表示错误。 */

/* 统一内容宽度：所有精读页面共用一个容器，反馈页不再单独收窄。 */
.layout {
  max-width: calc(var(--pf-container, 1280px) + 2 * var(--pf-gutter, 32px));
  padding-left: var(--pf-gutter, 32px);
  padding-right: var(--pf-gutter, 32px);
}
.result-page { max-width: none; }
.result-page .result-actions { max-width: calc(var(--pf-container, 1280px) + 2 * var(--pf-gutter, 32px)); padding-left: var(--pf-gutter, 32px); padding-right: var(--pf-gutter, 32px); }

/* 状态色：红色只给“需要订正”，“用过提示／待巩固”用琥珀色。 */
@media not all and (prefers-color-scheme: dark) {
  :root { --warn: var(--pf-warning, #8a5a00); --ok: var(--pf-success, #216447); --error: var(--pf-error, #a12d27); }
}
.dot.is-hinted { background: rgba(154, 100, 0, .12) !important; }
.result-legend .key.is-hinted { background: rgba(154, 100, 0, .45); }
.status-badge.is-hinted { background: rgba(154, 100, 0, .10); }
.status-badge.is-wrong { background: rgba(161, 45, 39, .08); }
@media (prefers-color-scheme: dark) {
  .dot.is-hinted { background: rgba(255, 159, 10, .18) !important; }
  .result-legend .key.is-hinted { background: rgba(255, 159, 10, .6); }
  .status-badge.is-hinted { background: rgba(255, 159, 10, .15); }
}

/* 反馈页图例：色块与句子圆点同大小，文字可读。 */
.result-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.result-legend .legend-item { display: inline-flex; align-items: center; gap: 6px; }
.result-legend .key { width: 12px; height: 12px; }

/* 栏目入口：“学习计划”是次要按钮，不再是蓝色链接或伪标签。 */
#hub-header .section-nav > .link[data-page="settings"] {
  color: var(--ink) !important;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--pf-radius-pill, 999px) !important;
  min-height: 36px;
  padding: 4px 16px !important;
  font-size: 14px;
  align-self: center;
}
#hub-header .section-nav > .link[data-page="settings"]:hover { border-color: var(--ink) !important; }
#hub-header .section-nav > .link[data-page="settings"].active { border-color: var(--ink) !important; font-weight: 600; }
/* The legacy generic nav has negative mobile margins. Keep these tabs within
   the reading column; wrap the plan button when the viewport is very narrow. */
@media (max-width: 760px) {
  #hub-header .section-nav {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    flex-wrap: wrap;
  }
}

/* 首页：测词汇量入口与其他链接同字号。 */
#home-placement > .link[data-action="placement"] { font-size: 16px; font-weight: 500; min-height: 36px; padding: 0; }

/* 首页列表：在读、批改、单篇“其他文章”使用同一列宽和图片比例。 */
@media (min-width: 761px) {
  .resume-row,
  .multiple .resume-row,
  .status-row {
    grid-template-columns: 220px minmax(0, 1fr) auto;
    gap: 28px;
  }
  .resume-row .article-image,
  .status-row .article-image,
  #catalog.with-work .catalog-item:only-child .article-image {
    width: 220px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    object-fit: cover;
  }
  #catalog.with-work .catalog-item:only-child { gap: 28px; }
  #catalog.with-work .catalog-item:only-child .article-info h2 { font-size: 24px !important; }
  .status-row h3 { font-size: 24px; margin: 0 0 4px; }
}
@media (max-width: 760px) {
  .resume-row,
  .multiple .resume-row,
  .status-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px 16px;
    align-items: start;
  }
  .resume-row .article-image,
  .status-row .article-image {
    width: 96px;
    aspect-ratio: 1;
    border-radius: 10px;
    object-fit: cover;
  }
  .resume-row > button,
  .status-row > button { grid-column: 1 / -1; width: 100%; margin: 8px 0 0; }
  .status-row h3 { font-size: 19px; line-height: 1.4; }
  #catalog.with-work { display: block; }
  #catalog.with-work .catalog-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
  #catalog.with-work .catalog-item .article-image { width: 96px; aspect-ratio: 1; border-radius: 10px; object-fit: cover; }
  #catalog.with-work .catalog-item .article-info { padding-top: 0; }
  #catalog.with-work .catalog-item .article-info h2 { font-size: 19px !important; margin-top: 0; }
}

/* 文章页：元信息之间留出间距（手机上“331词★★”不再挤在一起）。 */
.reading-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }

/* 生词下划线保持原有颜色以便发现，只与字母下沿拉开距离；悬停或聚焦时加深。 */
.vocab-term { text-underline-offset: 3px; }
.vocab-term:hover, .vocab-term:focus-visible { text-decoration-color: var(--ink); }

/* 复习与学习计划：统计和表单与正文同宽对齐，不只占左半边。 */
.stat-strip { max-width: none; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.settings-card, #settings-form, .settings-pending { max-width: 760px; }
.settings-pending { color: var(--muted) !important; background: var(--soft) !important; }

/* 翻译页返回条：固定在全站顶栏下方，整页滚动时“返回精读”始终可见；
   标题滚出视口后，返回条同时显示文章标题。 */
body[data-page="article"] .reading-backbar {
  position: sticky;
  top: 60px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 0 calc(-1 * var(--pf-gutter, 32px));
  padding: 0 var(--pf-gutter, 32px);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
body[data-page="article"] .reading-backbar .back { margin: 0 !important; flex: none; padding-left: 0 !important; padding-right: 0 !important; min-width: 0 !important; }
@media (max-width: 760px) { body[data-page="article"] .reading-backbar { top: 56px; } }
body[data-page="article"] .reading-backbar-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  opacity: 0;
  transition: opacity .15s;
}
body[data-page="article"] .reading-backbar.is-stuck { border-bottom-color: var(--line); }
body[data-page="article"] .reading-backbar.is-stuck .reading-backbar-title { opacity: 1; }
body[data-page="article"] .reading-backbar-title::before { content: "·"; margin-right: 12px; color: var(--muted); font-weight: 400; }
@media (prefers-reduced-motion: reduce) {
  body[data-page="article"] .reading-backbar, body[data-page="article"] .reading-backbar-title { transition: none; }
}

/* 翻译栏：当前句英文紧贴在输入框上方（桌面也显示），下方是全文进度，
   右栏不再只有一个输入框和大片空白。 */
@media (min-width: 761px) {
  body[data-page="article"] .translation-entry .mobile-original {
    display: block;
    margin: 4px 0 16px;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--soft);
    font-size: 19px;
    line-height: 1.6;
  }
}
#article-form .sentence-map { display: block; margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); border-bottom: 0; }
.sentence-map-label { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.sentence-map-grid { display: flex; flex-wrap: wrap; gap: 8px; }
#article-form .sentence-chip {
  width: 36px;
  min-width: 36px !important;
  height: 36px;
  min-height: 36px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  border: 1px solid var(--line) !important;
  background: transparent !important;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#article-form .sentence-chip:hover { border-color: var(--ink) !important; color: var(--ink); }
#article-form .sentence-chip.is-done { background: var(--soft) !important; border-color: transparent !important; color: var(--ink); }
#article-form .sentence-chip.is-current { border: 2px solid var(--ink) !important; color: var(--ink); font-weight: 650; }
@media (max-width: 760px) {
  #article-form .sentence-map { margin-top: 20px; padding-top: 16px; }
  #article-form .sentence-chip { width: 40px; height: 40px; min-width: 40px !important; min-height: 40px !important; }
}

/* ===== 平台统一层（第四阶段，2026-11-07）：内容边线与顶栏、学习中心对齐 =====
 * 顶栏左右留白是 max(24px, (100% - 1280px) / 2)；桌面上正文用同一公式，
 * 品牌标志、页面标题和内容左边线在任何宽度下都在同一条线上。 */
@media (min-width: 761px) {
  .layout,
  .result-page .result-actions {
    max-width: none;
    padding-left: max(24px, calc((100% - var(--pf-container, 1280px)) / 2));
    padding-right: max(24px, calc((100% - var(--pf-container, 1280px)) / 2));
  }
  body[data-page="article"] .reading-backbar { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}

/* 第五阶段（2026-11-07）：品牌文字与学习中心、词汇一致（16px、墨色）。 */
html body .site-header .brand, html body .site-header .brand span { font-size: 16px; color: var(--ink); }
@media (max-width: 760px) { html body .site-header .brand span { font-size: 14px; } }

/* 桌面答题：两栏各自滚动，边界不把滚轮传给页面；切题只定位原文栏。
   上一句译文等高；右侧保留译文与作答，原文只在左侧展示。 */
@media (min-width: 761px) {
  body[data-page="article"] .layout {
    height: calc(100dvh - var(--pf-header-height, 60px));
    padding-top: 12px !important;
    padding-bottom: 0;
  }
  body[data-page="article"] #content,
  body[data-page="article"] #view,
  body[data-page="article"] #article-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
  }
  body[data-page="article"] #content { height: 100%; }
  body[data-page="article"] .reading-backbar,
  body[data-page="article"] .toolbar { flex: none; }
  body[data-page="article"] .reading-heading {
    flex: none;
    max-height: 25dvh;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  body[data-page="article"] .reading-workspace {
    grid-template-columns: minmax(0, 53fr) minmax(0, 47fr);
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }
  body[data-page="article"] .original-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  body[data-page="article"] .original-text {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow: auto;
    overscroll-behavior-y: contain;
    overflow-anchor: none;
  }
  body[data-page="article"] .translation-column {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    overflow-anchor: none;
    scrollbar-gutter: stable;
    padding: 0 8px 4px 4px;
  }
  body[data-page="article"] .translation-entry .mobile-original {
    height: clamp(112px, 18dvh, 180px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }
  body[data-page="article"] .translation-entry textarea {
    height: 160px;
    min-height: 160px;
    overscroll-behavior-y: contain;
  }
  body[data-page="article"] .previous-translation {
    min-height: 0;
    margin: 20px 0 0;
    padding: 12px 0;
    overscroll-behavior-y: contain;
  }
  body[data-page="article"] .previous-translation::before {
    content: "上一句译文";
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
  }
}
@media (min-width: 761px) and (max-height: 800px) {
  body[data-page="article"] .reading-heading h1 { font-size: 28px; line-height: 1.25; margin: 0 0 8px; }
  body[data-page="article"] .reading-heading { padding-bottom: 12px; }
  body[data-page="article"] .reading-workspace { padding-top: 12px; padding-bottom: 12px; }
  body[data-page="article"] .translation-entry .mobile-original { height: clamp(80px, 16dvh, 128px); }
  body[data-page="article"] .translation-entry textarea { height: 140px; min-height: 140px; }
}

/* 右侧工作区：上一句在上、当前作答在下。空间交给输入框，不重复左侧原文。 */
@media (min-width: 761px) {
  body[data-page="article"] .translation-column {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 12px;
    scrollbar-gutter: auto;
  }
  body[data-page="article"] .translation-heading { flex: none; }
  body[data-page="article"] .translation-heading h2 { margin-bottom: 0 !important; }
  body[data-page="article"] .previous-translation {
    flex: 0 0 clamp(64px, 10dvh, 96px);
    order: 0;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0 4px 8px 0;
    overflow: auto;
    scrollbar-gutter: stable;
  }
  /* 第一题也保留同样的占位，进入第二题时输入框不会向下跳。 */
  body[data-page="article"] .previous-translation:empty { display: block; visibility: hidden; }
  body[data-page="article"] .translation-entry:not([hidden]) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: 280px;
  }
  body[data-page="article"] .translation-entry .mobile-original { display: none; }
  body[data-page="article"] .translation-entry .sentence-number {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  body[data-page="article"] .translation-entry textarea {
    flex: 1;
    min-height: 0;
    height: auto;
    resize: none;
  }
  body[data-page="article"] .hint-warning { margin-top: 8px; font-size: 13px; }
  body[data-page="article"] #article-form .sentence-map {
    flex: none;
    position: static;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 8px 0 0;
  }
  body[data-page="article"] .sentence-map-label { display: none; }
  body[data-page="article"] .sentence-map-grid {
    display: grid;
    grid-template-columns: repeat(var(--sentence-columns, 8), minmax(32px, 1fr));
    grid-template-rows: repeat(2, 36px);
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior: contain;
    padding-bottom: 4px;
  }
  body[data-page="article"] #article-form .sentence-chip { width: 100%; min-width: 32px !important; }
}

/* Save recovery actions stay reachable on narrow screens. */
.save-summary { flex-wrap: wrap; gap: 6px 12px; }
.save-summary .saved { min-width: 0; }
.save-summary button { padding: 6px 0; font-size: 14px; white-space: nowrap; }

/* Tablet keyboard / short desktop viewport: scroll the right pane instead of
   shrinking the editor to one line. The passage remains independently scrollable. */
@media (min-width: 761px) and (max-height: 600px) {
  body[data-page="article"] .translation-column { overflow-y: auto; }
  body[data-page="article"] .previous-translation { flex-basis: 40px; }
  body[data-page="article"] .translation-entry:not([hidden]) {
    flex: 0 0 auto;
    min-height: 160px;
  }
  body[data-page="article"] .translation-entry textarea {
    flex: none;
    height: 112px;
    min-height: 112px;
  }
}

/* Keep the PDF action readable beside the return link on narrow screens. */
body[data-page="article"] .reading-backbar .pdf-download {
  flex: none;
  white-space: nowrap;
  min-width: 0;
  padding-inline: 8px;
}

#notice.is-success:not(:empty) { color: #246447; background: #edf6f0; }

/* ===== 纸质练习（PDF 名额）2026-11-10 =====
 * 名额用五个小格表示：实心为进行中的纸质练习，描边为可用。
 * 只用类名和 CSS 变量，不在 HTML 中写 style 属性（正式站 CSP）。 */
.pdf-control { display: inline-flex; align-items: center; flex: none; min-width: 0; }
.pdf-download .pdf-left {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 980px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.pdf-full { font-size: 13px; white-space: nowrap; }
.pdf-slots { display: inline-flex; gap: 4px; flex: none; }
.pdf-slots i {
  width: 14px;
  height: 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: transparent;
}
.pdf-slots i.is-used { background: var(--ink); border-color: var(--ink); }
.pdf-slots i.is-taking { background: var(--blue); border-color: var(--blue); }

.offline-card {
  margin: 0 0 32px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.offline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.offline-head .home-section-title { margin: 0; }
.offline-meter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.offline-meter strong { color: var(--ink); font-weight: 600; }
.offline-empty { margin: 10px 0 0; font-size: 14px; }
.offline-tasks { list-style: none; margin: 12px 0 0; padding: 0; }
.offline-tasks li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.offline-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
.offline-state { font-size: 14px; color: var(--muted); white-space: nowrap; }
.offline-actions { display: inline-flex; gap: 16px; white-space: nowrap; }
.offline-actions button { margin: 0; padding: 4px 0; min-height: 32px; font-size: 14px; }
@media (max-width: 760px) {
  .offline-card { padding: 14px; }
  .offline-tasks li { grid-template-columns: minmax(0, 1fr) auto; }
  .offline-actions { grid-column: 1 / -1; }
}

.paper-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 980px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  vertical-align: 1px;
}
.pdf-dialog { width: min(420px, calc(100vw - 32px)); padding: 24px; }
.pdf-dialog h2 { margin: 0 0 4px; font-size: 19px; }
.pdf-dialog-article { margin: 0 0 16px; color: var(--muted); }
.pdf-dialog-meter { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; }
.pdf-dialog .meta { margin: 0 0 20px; line-height: 1.6; }
.pdf-dialog .actions { display: flex; justify-content: flex-end; gap: 12px; margin: 0; }
.pdf-dialog .actions button { margin: 0; }

/* Full translation entry: preview before applying; independent, keyboard-safe scroll. */
.translation-heading { flex-wrap: wrap; }
.full-entry-trigger { margin-left: auto; font-size: 14px; white-space: nowrap; }
.full-entry-dialog { width: min(900px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 16px; }
.full-entry-dialog[open] { display: flex; flex-direction: column; }
.full-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.full-entry-head h2 { margin: 0; font-size: 22px; }
.full-entry-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px; }
.full-entry-body .meta { font-size: 14px; line-height: 1.6; margin: 8px 0 16px; }
.full-entry-body textarea { width: 100%; box-sizing: border-box; min-height: 100px; font-size: 16px; line-height: 1.7; resize: vertical; }
#full-entry-text { min-height: 160px; }
.full-entry-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.full-entry-controls label { margin: 0; }
.full-entry-status { font-size: 15px; font-weight: 600; line-height: 1.6; }
.full-entry-rows { list-style: none; padding: 0; margin: 0; }
.full-entry-rows > li { padding: 18px 0; border-top: 1px solid var(--line); }
.full-entry-row-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.full-entry-row-head label { margin: 0; font-weight: 600; }
.full-entry-row-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.full-entry-dialog button { margin: 0; }
.full-entry-row-actions button { font-size: 13px; padding: 4px 0; min-height: 32px; }
.full-entry-rows .english { font-size: 18px; line-height: 1.6; margin: 12px 0; overflow-wrap: anywhere; }
.full-entry-footer { padding: 16px 24px; border-top: 1px solid var(--line); background: var(--paper); flex: none; }
.full-entry-footer[hidden] { display: none; }
.full-entry-overwrite { font-size: 14px; margin: 0 0 12px; }
.full-entry-overwrite[hidden] { display: none; }
.full-entry-overwrite input { width: auto; margin-right: 8px; }
.full-entry-footer .actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin: 0; }
@media (max-width: 760px) {
  .full-entry-head, .full-entry-body, .full-entry-footer { padding: 16px; }
  .full-entry-head h2 { font-size: 19px; }
  .full-entry-trigger { order: 3; margin-left: 0; }
}

/* ===== 视觉整理 2026-11-10 =====
 * 难度参考改为紧凑面板：一次只看一个星级、一个考试；其余为各页的间距与行宽整理。 */
#home-placement { position: relative; margin: 4px 0 20px; }
#home-placement > button.link { position: absolute; top: 0; right: 0; min-height: 44px; margin: 0; padding: 0; font-size: 15px !important; font-weight: 500 !important; }
.difficulty-guide { margin: 0; max-width: none; }
.difficulty-guide > summary { padding-right: 150px; }
.difficulty-guide .difficulty-guide-body {
  margin-top: 4px;
  padding: 18px 20px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.difficulty-guide .difficulty-lead { margin: 0 0 16px; font-size: 14px; line-height: 1.65; max-width: 720px; }
.difficulty-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px 40px; align-items: start; }
.difficulty-block { min-width: 0; }
.difficulty-tabs { display: flex; gap: 6px; margin: 0 0 14px; }
.difficulty-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 980px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
/* !important: the site-wide soft-button rule has higher specificity. */
.difficulty-guide .difficulty-tab { background: transparent !important; color: var(--muted); border: 1px solid var(--line) !important; }
.difficulty-guide .difficulty-tab[aria-pressed="true"] { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--paper); }
.difficulty-guide .difficulty-level { border: 0; margin: 0; }
.difficulty-guide .difficulty-level h3 { margin: 0 0 6px; font-size: 16px; }
.difficulty-guide .difficulty-level p { margin: 0 0 10px; font-size: 14px; line-height: 1.65; }
.difficulty-guide .difficulty-level dl { margin: 0; font-size: 14px; line-height: 1.6; gap: 4px 12px; }
.difficulty-picker { display: block; margin: 0 0 8px; color: var(--ink); font-size: 14px; font-weight: 600; }
.difficulty-guide select {
  width: 100%;
  min-height: 40px;
  margin: 0 0 12px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.difficulty-guide .difficulty-exam { padding: 0; border: 0; }
.difficulty-guide .difficulty-exam p { margin: 0 0 6px; font-size: 14px; line-height: 1.65; }
.difficulty-guide .difficulty-exam .difficulty-range { font-size: 16px; font-weight: 600; }
.difficulty-guide .difficulty-caveat { margin: 8px 0 0; font-size: 12.5px; color: var(--faint); }
.difficulty-notes { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 4px; }
.difficulty-notes > summary { min-height: 36px; font-size: 13px; color: var(--muted); cursor: pointer; }
.difficulty-guide .difficulty-notes p { margin: 6px 0; font-size: 13px; line-height: 1.65; border: 0; padding: 0; }
@media (max-width: 760px) {
  .difficulty-guide > summary { padding-right: 132px; }
  .difficulty-summary-note { display: none; }
  .difficulty-guide .difficulty-guide-body { padding: 14px 14px 10px; }
  .difficulty-columns { grid-template-columns: minmax(0, 1fr); }
  .difficulty-block + .difficulty-block { border-top: 1px solid var(--line); padding-top: 16px; }
}

/* 手机首页（尚未开始任何文章）：文章列表用小图在左的紧凑行，不再每篇占一屏。 */
@media (max-width: 760px) {
  #catalog:not(.with-work) { gap: 22px; }
  #catalog:not(.with-work) .catalog-item { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: start; }
  #catalog:not(.with-work) .article-image { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; }
  #catalog:not(.with-work) .article-info { padding-top: 0; }
  #catalog:not(.with-work) .article-info h2 { font-size: 19px; line-height: 1.35; margin: 0 0 4px; }
  #catalog:not(.with-work) .article-subtitle { font-size: 15px; margin: 0 0 6px; line-height: 1.4; }
  #catalog:not(.with-work) .meta { font-size: 13px; }
  #catalog:not(.with-work) .catalog-action { margin-top: 10px; }
  #catalog:not(.with-work) .catalog-action .primary { min-height: 40px; min-width: 0; padding: 6px 16px; font-size: 15px; }
}

/* 错句复习：数字卡不再拉满整行；说明链接降一级。 */
.review-overview .stat-strip { grid-template-columns: repeat(auto-fit, minmax(150px, 210px)); max-width: none; }
.review-overview > button.link { margin: 10px 0 0; padding: 0; min-height: 32px; font-size: 14px; font-weight: 500; }
.review-overview ~ #exercise-form { max-width: 820px; }

/* 重译与主动练习：控制行宽，标题不压过句子本身。 */
/* 只收窄表单和说明文字；批改结果卡片是两栏（译文对照 + 怎么译出来），必须保留整页宽度。 */
body[data-page="correction"] #view > :not(.feedback), body[data-page="practice"] #view > :not(#practice-result) { max-width: 820px; }
body[data-page="correction"] #view > h1, body[data-page="practice"] #view > h1 { font-size: clamp(26px, 3vw, 32px); margin: 12px 0 8px; }

/* “录入全文译文”入口放在“我的翻译”标题行内：不能把标题行撑高，否则 1024×650 下输入框低于 90px。 */
@media (min-width: 761px) {
  body[data-page="article"] .translation-heading .full-entry-trigger { min-height: 24px; margin: 0; padding: 0 2px; font-size: 13px; line-height: 1.5; }
}
/* 练习页与重译页的英文句子用同一字号。 */
@media (min-width: 761px) { #exercise-form > .english { font-size: 23px; line-height: 1.65; } }

/* 学习计划里的开关（自动安排错句复习）。 */
.setting-row input.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 980px !important;
  background: #c4c6ca;
  cursor: pointer;
  transition: background .15s;
}
.setting-row input.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .15s;
}
.setting-row input.switch:checked { background: var(--ok, #248a3d); }
.setting-row input.switch:checked::after { transform: translateX(20px); }
.setting-row input.switch:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .setting-row input.switch, .setting-row input.switch::after { transition: none; } }

/* PDF 名额：首页工具行下面的一行，可展开看占名额的文章（2026-11-10 用户要求：放首页，不单列板块）。 */
#home-offline { margin: -12px 0 20px; }
details.offline-card { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
details.offline-card > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 44px; cursor: pointer; font-size: 15px; color: var(--ink); }
details.offline-card > summary .offline-meter { margin-left: 6px; }
details.offline-card .offline-label { color: var(--ink); font-weight: 600; }
details.offline-card .offline-tasks, details.offline-card .offline-empty { margin: 4px 0 8px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); max-width: 760px; box-sizing: border-box; }
details.offline-card .offline-empty { padding: 12px 16px; }
details.offline-card .offline-tasks li:first-child { border-top: 0; }

/* 累计积累：首页顶部一行三个数（2026-11-10）。 */
#home-progress:empty { display: none; }
.progress-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; margin: 4px 0 6px; font-size: 15px; color: var(--muted); }
.progress-line .progress-label { color: var(--ink); font-weight: 600; }
.progress-line strong { color: var(--ink); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress-line .progress-link { margin: 0 0 0 auto; padding: 0; min-height: 32px; font-size: 14px; font-weight: 500; }
/* 词汇量测试入口已移除：难度参考一行不再给右侧链接留位。 */
.difficulty-guide > summary { padding-right: 0; }
/* 按篇试词：文章卡片上的一行小字和自评弹窗。 */
.probe-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.probe-line button.link { margin: 0; padding: 0; min-height: 32px; font-size: 14px; font-weight: 500; }
.probe-dialog .probe-options { grid-template-columns: 1fr 1fr; gap: 12px; }
.probe-dialog .probe-options button { text-align: center; min-height: 52px; font-size: 17px; }
.probe-dialog .placement-actions { margin-top: 18px; }

/* Shared word/phrase pronunciation control (lesson popups, hint popups, collections).
   One speaker button: a 32px tinted circle inside a 44px hit area. Words put the IPA
   beside it; phrases and words without IPA show the icon alone (aria-label names it).
   data-state on the wrapper: pending | idle | loading | playing | error. */
.reading-pronunciation{display:flex;align-items:center;flex-wrap:wrap;gap:0 4px;min-height:44px;margin:0 0 4px}
html body .reading-pronunciation > .pronunciation-button{display:inline-flex;align-items:center;gap:10px;flex:none;min-width:44px;min-height:44px;margin:0 0 0 -6px;padding:6px;border:0;border-radius:22px;color:var(--blue);font-size:15px;font-weight:500;line-height:1.2;touch-action:manipulation}
button.pronunciation-button:not(.primary):not(.link):not(.tab):not(.source-sentence):not(.vocab-term),
button.pronunciation-button:not(.primary):not(.link):not(.tab):not(.source-sentence):not(.vocab-term):hover{background:transparent}
.pronunciation-button:disabled{opacity:1;cursor:default}
.pronunciation-button[aria-busy="true"]{opacity:1}
.pronunciation-button:focus-visible{outline:0;box-shadow:none}
.pronunciation-button:focus-visible .pronunciation-icon{outline:2px solid var(--blue);outline-offset:2px}
.pronunciation-icon{position:relative;display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:50%;background:rgba(0,113,227,.1);background:color-mix(in srgb,var(--blue) 11%,transparent);color:var(--blue)}
.pronunciation-icon svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.pronunciation-icon .speaker-body{fill:currentColor;stroke-width:1.2}
.reading-ipa{font-family:system-ui,"Segoe UI","Arial",sans-serif;font-size:16px;line-height:1.5;overflow-wrap:anywhere;color:var(--muted)}
.reading-ipa[hidden]{display:none}
.pronunciation-status{margin-left:6px;font-size:13px;line-height:1.5;color:var(--muted)}
.pronunciation-status:empty{display:none}
@media (hover:hover){
  .pronunciation-button:not(:disabled):hover .pronunciation-icon{background:rgba(0,113,227,.18);background:color-mix(in srgb,var(--blue) 19%,transparent)}
}
.pronunciation-button:not(:disabled):active .pronunciation-icon{background:rgba(0,113,227,.26);background:color-mix(in srgb,var(--blue) 27%,transparent)}
.reading-pronunciation[data-state="pending"] .pronunciation-icon{background:var(--soft);color:var(--faint)}
.reading-pronunciation[data-state="loading"] .pronunciation-icon svg{visibility:hidden}
.reading-pronunciation[data-state="loading"] .pronunciation-icon::after{content:"";position:absolute;inset:8px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%}
.reading-pronunciation[data-state="playing"] .pronunciation-icon,
.reading-pronunciation[data-state="playing"] .pronunciation-button:hover .pronunciation-icon,
.reading-pronunciation[data-state="playing"] .pronunciation-button:active .pronunciation-icon{background:var(--blue);color:#fff}
.reading-pronunciation[data-state="error"] .pronunciation-icon,
.reading-pronunciation[data-state="error"] .pronunciation-button:hover .pronunciation-icon,
.reading-pronunciation[data-state="error"] .pronunciation-button:active .pronunciation-icon{background:rgba(215,0,21,.09);background:color-mix(in srgb,var(--error) 10%,transparent);color:var(--error)}
.reading-pronunciation[data-state="error"] .pronunciation-status{color:var(--error)}
@media (prefers-reduced-motion:no-preference){
  .pronunciation-icon{transition:background-color .15s ease-out,color .15s ease-out,transform .1s ease-out}
  .pronunciation-button:not(:disabled):active .pronunciation-icon{transform:scale(.94)}
  .reading-pronunciation[data-state="loading"] .pronunciation-icon::after{animation:pronunciation-spin .8s linear infinite}
  .reading-pronunciation[data-state="playing"] .speaker-wave-near{animation:pronunciation-wave 1.1s ease-in-out infinite}
  .reading-pronunciation[data-state="playing"] .speaker-wave-far{animation:pronunciation-wave 1.1s ease-in-out .18s infinite}
}
@keyframes pronunciation-spin{to{transform:rotate(360deg)}}
@keyframes pronunciation-wave{0%,100%{opacity:1}50%{opacity:.25}}
/* The control sits directly under the headword; keep the two visually attached. */
.vocab-row h3:has(+ .reading-pronunciation){margin-bottom:0}
.vocabulary-heading + .reading-pronunciation{margin-top:-4px}

/* R302: optional personal vocabulary, distinct from editorial glosses. */
.collect-term { cursor:pointer; text-decoration-line:underline; text-decoration-style:dotted; text-decoration-color:var(--muted); text-decoration-thickness:1px; text-underline-offset:4px; }
.collect-term:hover, .collect-term:focus-visible { color:var(--blue); text-decoration-color:currentColor; }
.collect-term:focus-visible { outline:2px solid var(--blue); outline-offset:3px; border-radius:3px; }
.vocabulary-popup .collect-word-button { display:block; min-height:44px; margin-top:8px; }
.collect-popup > button { min-height:44px; }

.vocab-term, .lesson-term { text-decoration-style:solid; text-decoration-color:var(--muted); }

/* Lexical groups preserve each source occurrence and its original actions. */
.vocab-group { border:1px solid var(--line, #d7dde5); border-radius:16px; overflow:hidden; margin-block:16px; }
.vocab-group-title { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:baseline; padding:16px 20px; margin:0; }
.vocab-group-title .meta { font-size:13px; font-weight:400; }
.vocab-group .vocab-row { border-radius:0; margin:0; border-inline:0; }
.vocab-context { font-size:15px; line-height:1.7; overflow-wrap:anywhere; }

/* Section controls need real space: preserve usable editors and allow page scroll
   on short windows instead of compressing the answer field. */
body[data-page="article"] .section-controls {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  padding: 8px 0;
  margin: 0 0 8px;
}
body[data-page="article"] .section-controls > p { flex-basis: 100%; margin: 0; }
body[data-page="article"] .section-feedback-list { margin: 0; }
@media (min-width: 761px) {
  body[data-page="article"]:has(#section-picker) .layout { height: auto; min-height: calc(100dvh - var(--pf-header-height, 60px)); }
  body[data-page="article"]:has(#section-picker) #content { height: auto; }
  body[data-page="article"]:has(#section-picker) #article-form { flex: none; }
  body[data-page="article"]:has(#section-picker) .reading-workspace { flex: none; height: max(380px, calc(100dvh - 390px)); }
  body[data-page="article"]:has(#section-picker) .translation-column { overflow-y: auto; }
  body[data-page="article"]:has(#section-picker) .translation-entry:not([hidden]) { flex: 1 0 180px; min-height: 180px; }
  body[data-page="article"]:has(#section-picker) .translation-entry textarea { min-height: 140px; }
}
/* Shared reading workspace: first-pass submission changes scope, never lesson layout. */
.reading-dialog{ color:var(--ink);background:var(--paper,#fafaf8);border:1px solid var(--line);border-radius:16px;padding:24px;width:min(560px,calc(100vw - 32px));max-height:85dvh;overflow:auto; }
.reading-dialog::backdrop{background:rgba(0,0,0,.28)}
.reading-dialog h2{margin:0 0 12px;font-size:22px}.reading-dialog p{line-height:1.65}.reading-dialog .actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px}
.reading-dialog button{min-height:44px}.reading-dialog fieldset{border:0;padding:0;display:grid;gap:12px}.mode-choice label{display:flex;align-items:flex-start;gap:12px;border:1px solid var(--line);border-radius:12px;padding:18px;cursor:pointer}.mode-choice label:has(input:checked){border:2px solid var(--ink);padding:17px}.mode-choice label input{margin-top:5px}.mode-choice strong, .mode-choice small{display:block}.mode-choice small{margin-top:8px;line-height:1.6;color:var(--muted)}
.all-sentences{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px}.all-sentences button{min-width:44px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body[data-reading-mode="sectioned"][data-page="article"] .reading-backbar{display:flex;gap:16px;align-items:center;position:static;min-height:44px;padding:0;margin-bottom:12px}
body[data-reading-mode="sectioned"][data-page="article"] .reading-backbar>.back{margin-right:auto}.reading-menu{position:relative;order:3}.reading-menu summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;padding:0 12px}.reading-menu>div{position:absolute;right:0;top:100%;z-index:20;min-width:210px;background:var(--paper,#fafaf8);border:1px solid var(--line);padding:8px;border-radius:12px;box-shadow:0 8px 24px #0001;display:grid}.reading-menu button{min-height:44px;text-align:left;color:var(--ink)!important}
body[data-reading-mode="sectioned"][data-page="article"] .reading-heading{margin:0 0 16px;padding:0}body[data-reading-mode="sectioned"][data-page="article"] .reading-heading h1{font-size:24px;margin:0 0 8px}
body[data-reading-mode="sectioned"] .reading-progress{display:flex;align-items:center;gap:16px;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);flex:none}body[data-reading-mode="sectioned"] .reading-mode{font-size:13px;white-space:nowrap;font-weight:600}body[data-reading-mode="sectioned"] .reading-sections{display:flex;gap:8px;flex:1;min-width:0;overflow-x:auto}body[data-reading-mode="sectioned"] .reading-sections button{flex:1;min-width:100px;min-height:48px;padding:6px 10px;background:transparent;border:0;border-top:3px solid var(--line);border-radius:0;text-align:left}body[data-reading-mode="sectioned"] .reading-sections button[aria-current="step"]{border-top-color:var(--blue,#0071e3);background:var(--soft)}body[data-reading-mode="sectioned"] .reading-sections strong{font-size:13px;display:block;white-space:nowrap}body[data-reading-mode="sectioned"] .reading-sections small{font-size:12px;color:var(--muted)}
body[data-reading-mode="sectioned"] #reading-history{padding:8px 0;font-size:13px}body[data-reading-mode="sectioned"] #reading-history summary{cursor:pointer;min-height:28px}body[data-reading-mode="sectioned"] #reading-history>div{display:flex;gap:12px;flex-wrap:wrap}body[data-reading-mode="sectioned"] #reading-history button{min-height:44px}
body[data-reading-mode="sectioned"][data-page="article"] #article-form{display:flex;flex-direction:column;flex:1;min-height:0;margin:0}
body[data-reading-mode="sectioned"][data-page="article"] .reading-workspace{display:grid;grid-template-columns:1.08fr 1fr;gap:24px;flex:1;min-height:0;height:auto;padding:16px 0 0;margin:0}
body[data-reading-mode="sectioned"][data-page="article"] .original-column{position:relative;min-width:0;min-height:0;display:flex;flex-direction:column;padding-right:24px;border-right:1px solid var(--line)}
body[data-reading-mode="sectioned"] #reading-scope{position:absolute;top:0;right:24px;min-height:32px;font-size:13px;color:var(--ink)}
body[data-reading-mode="sectioned"][data-page="article"] .original-text{min-height:0;flex:1;overflow-y:auto;font-size:19px;line-height:1.78;padding:12px 0 24px}
body[data-reading-mode="sectioned"] .context-sentence{color:var(--muted)}
body[data-reading-mode="sectioned"][data-page="article"] .translation-column{display:flex;flex-direction:column;gap:12px;min-height:0;min-width:0;overflow-y:auto;padding:0}
body[data-reading-mode="sectioned"][data-page="article"] .translation-heading{display:flex;align-items:center;gap:10px;justify-content:space-between;flex:none;margin:0}body[data-reading-mode="sectioned"][data-page="article"] .translation-heading h2{font-size:15px}
body[data-reading-mode="sectioned"][data-page="article"] #article-form .sentence-map{display:flex;align-items:center;gap:8px;flex:none;margin:0;padding:0 0 10px;border:0;border-bottom:1px solid var(--line);min-height:54px}
body[data-reading-mode="sectioned"][data-page="article"] .sentence-map-label{display:block;font-size:12px;white-space:nowrap;margin:0}
body[data-reading-mode="sectioned"][data-page="article"] .sentence-map-grid{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;flex:1;min-width:0;padding:2px}
body[data-reading-mode="sectioned"][data-page="article"] #article-form .sentence-chip{flex:none;width:44px;min-width:44px!important;height:44px;min-height:44px!important}
body[data-reading-mode="sectioned"] #reading-all{flex:none;min-height:44px;font-size:12px;padding:8px}
body[data-reading-mode="sectioned"][data-page="article"] .previous-translation[hidden]{display:none!important}
body[data-reading-mode="sectioned"][data-page="article"] .translation-entry:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:210px;margin:0}
body[data-reading-mode="sectioned"][data-page="article"] .translation-entry textarea{flex:1;width:100%;min-height:200px;resize:vertical;font-size:17px;line-height:1.7;padding:16px}
body[data-reading-mode="sectioned"][data-page="article"] .translation-entry textarea[readonly]{background:var(--soft);border-style:dashed}
body[data-reading-mode="sectioned"][data-page="article"] .hint-warning{font-size:12px;margin:8px 0;line-height:1.6}
body[data-reading-mode="sectioned"][data-page="article"] .toolbar{position:static!important;display:flex;flex-wrap:wrap;gap:8px;flex:none;width:auto;margin:0;padding:12px 0;background:var(--paper,#fafaf8);border-top:1px solid var(--line);box-shadow:none;transform:none}
body[data-reading-mode="sectioned"][data-page="article"] .toolbar .actions{display:flex;gap:8px;margin-left:auto;flex-wrap:wrap}body[data-reading-mode="sectioned"][data-page="article"] .toolbar button{min-height:44px;padding:8px 12px;font-size:13px}body[data-reading-mode="sectioned"] .toolbar .save-summary{font-size:12px}body[data-reading-mode="sectioned"][data-page="article"] .save-summary>.meta{display:none}
body[data-reading-mode="sectioned"] #section-live:empty{display:none}body[data-reading-mode="sectioned"] #section-live{font-size:13px;line-height:1.6;padding:10px 12px;background:var(--soft);border-radius:10px;flex:none}body[data-reading-mode="sectioned"] #section-live button{min-height:44px;margin-left:8px;font-size:13px}
@media(min-width:761px){body[data-reading-mode="sectioned"][data-page="article"] #view{display:flex;flex-direction:column;min-height:500px;height:calc(100dvh - 108px)}body[data-reading-mode="sectioned"][data-page="article"] .mobile-context-button{display:none}}
@media(min-width:761px) and (max-height:740px){body[data-reading-mode="sectioned"][data-page="article"] .reading-heading h1{font-size:20px}body[data-reading-mode="sectioned"][data-page="article"] .reading-meta{display:none}body[data-reading-mode="sectioned"][data-page="article"] .reading-backbar{margin-bottom:4px}body[data-reading-mode="sectioned"][data-page="article"] .reading-heading{margin-bottom:8px}body[data-reading-mode="sectioned"][data-page="article"] .original-text{font-size:17px}body[data-reading-mode="sectioned"][data-page="article"] .translation-entry:not([hidden]){min-height:155px}body[data-reading-mode="sectioned"][data-page="article"] .translation-entry textarea{min-height:120px}}
@media(max-width:760px){body[data-reading-mode="sectioned"][data-page="article"] #view{height:auto;min-height:0}body[data-reading-mode="sectioned"][data-page="article"] .reading-heading h1{font-size:20px}body[data-reading-mode="sectioned"][data-page="article"] .reading-progress{gap:8px;flex-wrap:wrap}body[data-reading-mode="sectioned"] .reading-mode{font-size:12px}body[data-reading-mode="sectioned"] .reading-sections{flex-basis:70%}body[data-reading-mode="sectioned"] .reading-sections button{min-width:90px}body[data-reading-mode="sectioned"] #reading-total{font-size:12px;margin-left:auto}body[data-reading-mode="sectioned"][data-page="article"] .reading-workspace{display:flex;flex-direction:column;gap:12px;padding-top:12px}body[data-reading-mode="sectioned"][data-page="article"] .original-column{display:none;border:0;padding:0}body[data-reading-mode="sectioned"][data-page="article"] .reading-workspace.context-open .original-column{display:block;max-height:45dvh;overflow:auto}body[data-reading-mode="sectioned"][data-page="article"] .mobile-context-button{display:block;align-self:flex-start;min-height:44px;color:var(--ink)}body[data-reading-mode="sectioned"][data-page="article"] .translation-column{overflow:visible;gap:12px}body[data-reading-mode="sectioned"][data-page="article"] .mobile-original{display:block;font-size:18px;line-height:1.65;margin:0 0 12px}body[data-reading-mode="sectioned"][data-page="article"] .translation-entry textarea{min-height:150px}body[data-reading-mode="sectioned"][data-page="article"] .toolbar{position:sticky!important;bottom:0;z-index:5}.reading-dialog{padding:20px}.reading-dialog .actions{flex-wrap:wrap}body[data-reading-mode="sectioned"][data-page="article"] .reading-meta{font-size:12px}body[data-reading-mode="sectioned"][data-page="article"] .reading-backbar .pdf-control{font-size:12px}body[data-reading-mode="sectioned"][data-page="article"] .toolbar .actions{width:100%}body[data-reading-mode="sectioned"][data-page="article"] .toolbar .actions button[type=submit]{flex:1}}
@media(prefers-reduced-motion:reduce){body[data-reading-mode="sectioned"] .reading-progress *{animation:none;transition:none}}
/* Reset inherited navigation/details geometry inside this workspace only. */
body[data-reading-mode="sectioned"][data-page="article"] .reading-backbar{justify-content:flex-start;width:100%;height:auto;flex-shrink:0;max-width:none}
body[data-page="article"] .reading-backbar .reading-menu{margin:0 0 0 auto;min-width:58px;white-space:nowrap;flex:none}
body[data-page="article"] .reading-backbar .reading-menu summary{color:var(--ink);padding:0 8px}body[data-page="article"] .reading-backbar .reading-menu summary::before{display:none}
body[data-reading-mode="sectioned"][data-page="article"] #article-form .sentence-map{flex-direction:row;align-self:stretch;width:100%;min-width:0;position:static}
body[data-reading-mode="sectioned"][data-page="article"] .translation-column>.toolbar{order:10;top:auto;left:auto;right:auto;max-width:100%;align-self:stretch}
body[data-reading-mode="sectioned"][data-page="article"] .translation-column>.translation-entry{order:2;max-height:none}
body[data-reading-mode="sectioned"][data-page="article"] .translation-heading{order:1}body[data-reading-mode="sectioned"][data-page="article"] #section-live{order:0}
body[data-reading-mode="sectioned"][data-page="article"] #reading-history{margin:0;padding:4px 0;flex:none}body[data-reading-mode="sectioned"][data-page="article"] #reading-history summary{font-size:13px;padding:8px 0;color:var(--muted)}
body[data-reading-mode="sectioned"][data-page="article"] .original-column h2{margin:0;min-height:36px}body[data-reading-mode="sectioned"][data-page="article"] .original-text{max-height:none}
body[data-reading-mode="sectioned"][data-page="article"] .original-text .english{font-size:19px;line-height:1.78}
body[data-reading-mode="sectioned"][data-page="article"] .reading-sections button{background:transparent;border-top:3px solid var(--line)!important}
body[data-reading-mode="sectioned"][data-page="article"] .reading-sections button[aria-current="step"]{border-top-color:var(--blue)!important;background:var(--soft)}
@media(min-width:761px){body[data-reading-mode="sectioned"][data-page="article"] #view{height:100%;min-height:0}body[data-reading-mode="sectioned"][data-page="article"] .reading-backbar{padding:0;margin:0 0 8px}body[data-reading-mode="sectioned"] .translation-entry .mobile-original{display:none}}
@media(max-width:760px){body[data-reading-mode="sectioned"][data-page="article"] .layout{padding-top:12px}body[data-reading-mode="sectioned"][data-page="article"] .reading-backbar{margin:0 0 12px;padding:0;gap:8px}body[data-reading-mode="sectioned"][data-page="article"] .reading-backbar>.back{margin:0}body[data-reading-mode="sectioned"][data-page="article"] #article-form .sentence-map{min-width:0;max-width:100%;width:100%;align-self:stretch}body[data-reading-mode="sectioned"][data-page="article"] .sentence-map-grid{width:0}body[data-reading-mode="sectioned"][data-page="article"] .mobile-context-button{margin:0;padding:8px 0}body[data-reading-mode="sectioned"][data-page="article"] .translation-heading{font-size:13px}}
@media(max-width:760px){body[data-reading-mode="sectioned"][data-page="article"] .translation-column>.toolbar{position:static!important}body[data-reading-mode="sectioned"][data-page="article"] .translation-heading{align-items:center;min-height:24px}body[data-reading-mode="sectioned"][data-page="article"] .translation-heading h2{font-size:13px;margin:0}body[data-reading-mode="sectioned"][data-page="article"] .translation-entry .sentence-number{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}body[data-reading-mode="sectioned"][data-page="article"] .reading-heading{padding:0;margin-bottom:8px}body[data-reading-mode="sectioned"][data-page="article"] .reading-workspace{margin:0}body[data-reading-mode="sectioned"][data-page="article"] #position-count{margin:0;white-space:nowrap}}

/* Preserve the established reading type scale; extra controls must not shrink text. */
body[data-reading-mode="sectioned"][data-page="article"] .original-text .english{font-size:23px;line-height:1.75}
@media(max-width:760px){body[data-reading-mode="sectioned"][data-page="article"] .original-text .english, body[data-reading-mode="sectioned"][data-page="article"] .translation-entry .mobile-original{font-size:19px;line-height:1.75}}

.reading-menu-mode{font-size:13px;font-weight:600;margin:4px 8px 8px}.reading-menu #mode-switch-reason{font-size:13px;line-height:1.6;white-space:normal;max-width:250px;margin:0 8px 12px}.reading-menu button:disabled{opacity:.55;cursor:not-allowed}.reading-menu>div{min-width:250px}.reading-backbar .reading-menu{margin-left:auto;flex:none}.reading-backbar .reading-menu summary{list-style:none}.reading-backbar .reading-menu summary::before{display:none}
#locked-answer-note{order:1;flex:none;font-size:14px;line-height:1.6;padding:10px 12px;background:var(--soft);border-left:3px solid var(--muted)}#locked-answer-note[hidden]{display:none}#locked-answer-note button{min-height:36px;margin-left:8px}


/*
 * 精读界面审美精修层（Claude，2026-11-14）
 * 加载位置：reading.html 中紧跟 reading.css 之后。只改视觉，不改结构、文案、状态或交互。
 * 不使用 HTML style 属性，严格 CSP 下可用。深色模式通过同名变量自动切换。
 *
 * 选择器提权说明：reading.css 的通用按钮规则特异度为 (0,5,1)，并有多处 !important。
 * 本层统一用 #view / #content 作用域，必要时追加 :not(#_)（恒真，只增加一个 ID 权重），
 * 避免与旧层逐条比拼类名长度。:not(#_) 不匹配任何真实元素 id，可整体搜索替换。
 *
 * 结构：0 变量 → 1 按钮体系 → 2 焦点 → 3 返回条与“更多” → 4 分节进度 → 5 原文栏
 *       → 6 作答栏（导航、状态条、只读、输入、工具栏）→ 7 弹窗与查词 → 8 反馈与订正
 *       → 9 平板低高度 → 10 手机 → 11 动效偏好
 */

/* 0 ───────── 变量 ───────── */
:root {
  --rp-surface: #ffffff;
  --rp-line-strong: var(--pf-line-strong, #c9cdd1);
  --rp-h: var(--pf-control-height, 44px);
  --rp-h-sm: 36px;
  --rp-radius: var(--pf-radius-control, 10px);
  --rp-radius-lg: 14px;
  --rp-focus: var(--pf-focus, #0071e3);
  --rp-shadow-pop: 0 1px 2px rgb(20 22 24 / 6%), 0 12px 32px rgb(20 22 24 / 12%);
  --rp-selected: rgb(0 113 227 / 9%);
  --rp-ok: var(--pf-success, #216447);
  --rp-ok-bg: var(--pf-success-bg, #edf5f0);
  --rp-warn: var(--pf-warning, #8a5a00);
  --rp-warn-bg: var(--pf-warning-bg, #fbf4e6);
  --rp-err: var(--pf-error, #a12d27);
  --rp-err-bg: var(--pf-error-bg, #fbefee);
}
@media (prefers-color-scheme: dark) {
  :root {
    --rp-surface: #1c1c1e;
    --rp-line-strong: #48484a;
    --rp-shadow-pop: 0 1px 2px rgb(0 0 0 / 40%), 0 16px 40px rgb(0 0 0 / 55%);
    --rp-selected: rgb(10 132 255 / 20%);
    --rp-ok: #30d158; --rp-ok-bg: rgb(48 209 88 / 14%);
    --rp-warn: #ffb340; --rp-warn-bg: rgb(255 159 10 / 14%);
    --rp-err: #ff6961; --rp-err-bg: rgb(255 69 58 / 14%);
  }
}

/* 1 ───────── 按钮体系：主 / 次 / 小号次 / 文字链接 ─────────
 * 主按钮：墨色实心，每屏只一个。次按钮：白底细边（原灰底在灰纸上像禁用）。
 * 禁用：浅底、淡字、保留边界，不再用半透明把深色按钮压成脏灰。 */
:is(#view, .reading-dialog, .section-merge, .pdf-dialog) button.primary:not(#_) {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--rp-h) !important; min-width: 0 !important;
  padding: 0 20px !important; margin: 0;
  border: 1px solid var(--pf-primary, #252729) !important; border-radius: var(--rp-radius) !important;
  background: var(--pf-primary, #252729) !important; color: var(--pf-on-primary, #fff) !important;
  font-size: 15px !important; font-weight: 600; line-height: 1.2; letter-spacing: .01em;
  white-space: nowrap; opacity: 1; box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease;
}
:is(#view, .reading-dialog, .section-merge, .pdf-dialog) button.primary:not(#_):hover:not(:disabled) {
  background: var(--pf-primary-hover, #3b3e40) !important; border-color: var(--pf-primary-hover, #3b3e40) !important;
}
:is(#view, .reading-dialog, .section-merge, .pdf-dialog) button.primary:not(#_):disabled {
  background: var(--soft) !important; border-color: var(--line) !important; color: var(--faint) !important;
  cursor: not-allowed; opacity: 1;
}

/* 次按钮：工具栏、弹窗操作、反馈页翻句、分节结束操作 */
#view .toolbar .actions button:not(.primary):not(#_),
#view .result-actions button.link:not(#_),
#view .section-feedback-actions button.link:not(#_),
#view .section-card-actions button.link:not(#_),
#view #correction-form ~ .banner button:not(.primary):not(#_),
.reading-dialog .actions button:not(.primary):not(#_),
.reading-dialog > button[data-dismiss]:not(#_),
.section-merge .actions button:not(.primary):not(#_),
.pdf-dialog .actions button:not(.primary):not(#_) {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--rp-h) !important; min-width: 0 !important;
  padding: 0 18px !important; margin: 0;
  border: 1px solid var(--rp-line-strong) !important; border-radius: var(--rp-radius) !important;
  background: var(--rp-surface) !important; color: var(--ink) !important;
  font-size: 15px !important; font-weight: 500; line-height: 1.2; text-decoration: none;
  white-space: nowrap; opacity: 1; box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease;
}
#view .toolbar .actions button:not(.primary):not(#_):hover:not(:disabled),
#view .result-actions button.link:not(#_):hover,
#view .section-feedback-actions button.link:not(#_):hover,
#view .section-card-actions button.link:not(#_):hover,
.reading-dialog .actions button:not(.primary):not(#_):hover,
.reading-dialog > button[data-dismiss]:not(#_):hover,
.section-merge .actions button:not(.primary):not(#_):hover,
.pdf-dialog .actions button:not(.primary):not(#_):hover {
  background: var(--soft) !important; border-color: var(--muted) !important;
}
#view .toolbar .actions button:not(.primary):not(#_):disabled {
  background: transparent !important; border-color: var(--line) !important; color: var(--faint) !important;
  cursor: not-allowed; opacity: 1;
}

/* 小号次按钮：行内切换与状态条里的操作（视觉 36px；触屏 44px） */
#view #reading-all:not([hidden]):not(#_),
#view #reading-scope:not([hidden]):not(#_),
#view .mobile-context-button:not([hidden]):not(#_),
#view #section-live button:not([hidden]):not(#_),
#view #section-conflict:not([hidden]):not(#_),
#view .full-entry-trigger:not([hidden]):not(#_),
#view #reading-history > div button:not([hidden]):not(#_) {
  align-items: center; justify-content: center; gap: 4px;
  min-height: var(--rp-h-sm) !important; min-width: 0 !important;
  padding: 0 12px !important; margin: 0;
  border: 1px solid var(--rp-line-strong) !important; border-radius: var(--rp-radius) !important;
  background: var(--rp-surface) !important; color: var(--ink) !important;
  font-size: 13px !important; font-weight: 500; line-height: 1.2; white-space: nowrap; text-decoration: none;
  box-shadow: none; transition: background-color .15s ease, border-color .15s ease;
}
#view #reading-all:not([hidden]):not(#_):hover, #view #reading-scope:not([hidden]):not(#_):hover, #view .mobile-context-button:not([hidden]):not(#_):hover,
#view #section-live button:not([hidden]):not(#_):hover, #view #section-conflict:not([hidden]):not(#_):hover, #view .full-entry-trigger:not([hidden]):not(#_):hover,
#view #reading-history > div button:not([hidden]):not(#_):hover {
  background: var(--soft) !important; border-color: var(--muted) !important;
}
#view #reading-all:not([hidden]):not(#_), #view #reading-scope:not([hidden]):not(#_), #view #section-live button:not(#_),
#view #section-conflict:not([hidden]):not(#_), #view .full-entry-trigger:not([hidden]):not(#_), #view #reading-history > div button:not(#_) { display: inline-flex; }
@media (pointer: coarse) {
  #view #reading-all:not([hidden]):not(#_), #view #reading-scope:not([hidden]):not(#_), #view .mobile-context-button:not([hidden]):not(#_),
  #view #section-live button:not([hidden]):not(#_), #view #section-conflict:not([hidden]):not(#_), #view .full-entry-trigger:not([hidden]):not(#_),
  #view #reading-history > div button:not([hidden]):not(#_) { min-height: 44px !important; }
}

/* 文字链接：只保留真正的“去别处” —— 返回、PDF、出处、申诉、查看反馈并订正 */
#view button.link.back:not(#_),
#view .pdf-download:not(#_) {
  min-height: 40px; padding: 0 !important; border: 0 !important; background: transparent !important;
  color: var(--blue) !important; font-size: 15px !important; font-weight: 500; line-height: 1.2;
}
#view button.link.back:not(#_)::before { content: "‹"; display: inline-block; margin-right: 4px; font-size: 19px; line-height: 0; transform: translateY(1px); }
#view .pdf-download .pdf-left { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 500; }
#view button.link.back:not(#_):hover, #view .pdf-download:not(#_):hover { text-decoration: underline; text-underline-offset: 4px; background: transparent !important; }

/* 2 ───────── 焦点：统一 2px 实线外框，任何底色上都能看清 ───────── */
#view :is(button, a, summary, select, [tabindex]):focus-visible:not(#_),
:is(.reading-dialog, .section-merge, .pdf-dialog, #vocabulary-popup) :is(button, a, summary, select, input, [tabindex]):focus-visible:not(#_),
.site-header :is(a, button):focus-visible:not(#_) {
  outline: 2px solid var(--rp-focus) !important; outline-offset: 2px; box-shadow: none !important;
}
#view .source-sentence:focus-visible:not(#_) { outline-offset: 1px; border-radius: 4px; }
#view textarea:focus-visible:not(#_), .reading-dialog textarea:focus-visible { outline: none !important; }

/* 3 ───────── 返回条与“更多”菜单 ───────── */
body[data-page="article"] #view .reading-backbar:not(#_) { gap: 20px; align-items: center; min-height: 44px; }
body[data-page="article"] #view .reading-menu summary:not(#_) {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--rp-h-sm); padding: 0 10px 0 14px !important;
  border: 1px solid var(--rp-line-strong); border-radius: var(--rp-radius);
  background: var(--rp-surface); color: var(--ink); font-size: 14px; font-weight: 500;
  transition: background-color .15s ease, border-color .15s ease;
}
body[data-page="article"] #view .reading-menu summary:not(#_)::after {
  content: ""; width: 7px; height: 7px; margin: -3px 2px 0 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
  transition: transform .15s ease;
}
body[data-page="article"] #view .reading-menu summary:not(#_):hover { background: var(--soft); border-color: var(--muted); }
body[data-page="article"] #view .reading-menu[open] summary:not(#_) { background: var(--soft); border-color: var(--muted); }
body[data-page="article"] #view .reading-menu[open] summary:not(#_)::after { transform: translateY(3px) rotate(-135deg); }
@media (pointer: coarse) { body[data-page="article"] #view .reading-menu summary:not(#_) { min-height: 44px; } }

#view .reading-menu > div:not(#_) {
  top: calc(100% + 6px); right: 0; min-width: 264px; max-width: min(320px, calc(100vw - 32px));
  padding: 6px; gap: 0;
  background: var(--rp-surface); border: 1px solid var(--line); border-radius: var(--rp-radius-lg);
  box-shadow: var(--rp-shadow-pop);
}
#view .reading-menu-mode:not(#_) {
  margin: 0 0 4px; padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
#view .reading-menu > div button:not(#_) {
  display: flex; align-items: center; width: 100%; min-height: 44px; margin: 0;
  padding: 0 10px !important; border: 0 !important; border-radius: 8px !important;
  background: transparent !important; color: var(--ink) !important;
  font-size: 15px !important; font-weight: 500; text-align: left; text-decoration: none;
}
#view .reading-menu > div button:not(#_):hover:not(:disabled) { background: var(--soft) !important; }
#view .reading-menu > div button:not(#_):disabled { color: var(--faint) !important; cursor: not-allowed; opacity: 1; }
#view .reading-menu #mode-switch-reason:not(#_) {
  max-width: none; margin: -6px 0 4px; padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; line-height: 1.55;
}

/* 4 ───────── 分节进度：细顶线代替灰色色块 ───────── */
body[data-reading-mode="sectioned"] #view .reading-progress:not(#_) {
  gap: 20px; padding: 8px 0 10px; border-top: 0; border-bottom: 1px solid var(--line);
}
body[data-reading-mode="sectioned"] #view .reading-mode:not(#_) { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
body[data-reading-mode="sectioned"] #view .reading-sections:not(#_) { gap: 12px; }
body[data-reading-mode="sectioned"] #view .reading-sections button:not(#_) {
  min-height: 46px; padding: 8px 4px 2px 0 !important;
  border: 0 !important; border-top: 2px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--muted);
  transition: border-color .15s ease, color .15s ease;
}
body[data-reading-mode="sectioned"] #view .reading-sections button:not(#_):hover { border-top-color: var(--muted) !important; background: transparent !important; }
body[data-reading-mode="sectioned"] #view .reading-sections button[aria-current="step"]:not(#_) {
  border-top: 2px solid var(--ink) !important; background: transparent !important; color: var(--ink);
}
body[data-reading-mode="sectioned"] #view .reading-sections strong:not(#_) { font-size: 13px; font-weight: 600; color: inherit; }
body[data-reading-mode="sectioned"] #view .reading-sections button[aria-current="step"] small:not(#_) { color: var(--ink); }
body[data-reading-mode="sectioned"] #view .reading-sections small:not(#_) { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
body[data-reading-mode="sectioned"] #view #reading-total:not(#_) { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
body[data-reading-mode="sectioned"] #view #reading-history:not(#_) { padding: 2px 0; }
body[data-reading-mode="sectioned"] #view #reading-history summary:not(#_) { min-height: 32px; padding: 6px 0; font-size: 13px; color: var(--muted); }
body[data-reading-mode="sectioned"] #view #reading-history > div:not(#_) { gap: 8px; padding: 4px 0 8px; }

/* 5 ───────── 原文栏 ───────── */
body[data-page="article"] #view .reading-workspace h2:not(#_) {
  color: var(--muted); font-size: 13px !important; font-weight: 600; letter-spacing: .02em;
}
body[data-reading-mode="sectioned"] #view #reading-scope:not(#_) { position: absolute; top: -4px; right: 24px; }
body[data-page="article"] #view .source-sentence:not(#_) {
  border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-color .15s ease;
}
body[data-page="article"] #view .source-sentence.selected:not(#_) { background: var(--rp-selected); }
body[data-page="article"] #view .source-sentence:not(.selected):not(#_):hover { background: var(--soft); }

/* 6 ───────── 作答栏 ───────── */
/* 标题行：“我的翻译”在左，句号计数在右，“录入全文译文”作为小号次按钮放在最右 */
body[data-page="article"] #view .translation-heading:not(#_) { display: flex; align-items: center; gap: 10px; }
body[data-page="article"] #view .translation-heading #position-count:not(#_) { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
body[data-page="article"] #view .translation-heading .full-entry-trigger:not(#_) { order: 3; }

/* 句号导航：未写＝白底细边；已写＝浅灰实底；当前＝墨色 2px 内框；已提交＝绿色浅底 */
body[data-page="article"] #view #article-form .sentence-chip:not(#_) {
  border: 1px solid var(--rp-line-strong) !important; border-radius: var(--rp-radius) !important;
  background: var(--rp-surface) !important; color: var(--muted) !important;
  font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; box-shadow: none;
  transition: border-color .15s ease, background-color .15s ease;
}
body[data-page="article"] #view #article-form .sentence-chip:not(#_):hover { border-color: var(--muted) !important; color: var(--ink) !important; }
body[data-page="article"] #view #article-form .sentence-chip.is-done:not(#_) { background: var(--soft) !important; border-color: transparent !important; color: var(--ink) !important; }
body[data-page="article"] #view #article-form .sentence-chip[aria-label*="已提交"]:not(#_) { background: var(--rp-ok-bg) !important; border-color: transparent !important; color: var(--rp-ok) !important; }
body[data-page="article"] #view #article-form .sentence-chip.is-current:not(#_) {
  border-color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink) !important; font-weight: 650;
}
body[data-reading-mode="sectioned"][data-page="article"] #view #article-form .sentence-chip:not(#_) {
  width: auto; min-width: 40px !important; height: 40px; min-height: 40px !important; padding: 0 10px !important;
}
@media (pointer: coarse) {
  body[data-reading-mode="sectioned"][data-page="article"] #view #article-form .sentence-chip:not(#_) { min-width: 44px !important; height: 44px; min-height: 44px !important; }
}
body[data-reading-mode="sectioned"][data-page="article"] #view #article-form .sentence-map:not(#_) { gap: 10px; min-height: 0; padding: 0 0 12px; }
body[data-reading-mode="sectioned"][data-page="article"] #view .sentence-map-label:not(#_) { color: var(--muted); font-size: 12px; font-weight: 600; }
body[data-reading-mode="sectioned"][data-page="article"] #view .sentence-map-grid:not(#_) { gap: 6px; padding: 4px; margin: -2px 0; }
/* 导航条是横向滚动容器，焦点框向内收，避免被裁切 */
body[data-page="article"] #view #article-form .sentence-chip:focus-visible:not(#_) { outline-offset: -1px !important; }

/* 状态条：批改中＝中性，有反馈＝绿，失败＝琥珀（译文已保存，不是错误） */
body[data-reading-mode="sectioned"] #view #section-live:not(:empty):not(#_) {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--rp-surface); color: var(--ink); font-size: 14px; line-height: 1.5;
}
body[data-reading-mode="sectioned"] #view #section-live:not(:empty):not(#_)::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted);
}
body[data-reading-mode="sectioned"] #view #section-live:has([data-action="section-results"]):not(#_) { background: var(--rp-ok-bg); border-color: transparent; }
body[data-reading-mode="sectioned"] #view #section-live:has([data-action="section-results"]):not(#_)::before { background: var(--rp-ok); }
body[data-reading-mode="sectioned"] #view #section-live:has([data-action="retry"]):not(#_) { background: var(--rp-warn-bg); border-color: transparent; }
body[data-reading-mode="sectioned"] #view #section-live:has([data-action="retry"]):not(#_)::before { background: var(--rp-warn); }
body[data-reading-mode="sectioned"] #view #section-live:not(:has(button)):not(:empty):not(#_) { padding: 10px 14px; }
body[data-reading-mode="sectioned"] #view #section-live button:not(#_) { margin-left: auto; }

/* 只读说明：去掉侧边色条，改为带锁形标记的浅底条 */
#view #locked-answer-note:not([hidden]):not(#_) {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  padding: 8px 12px; border: 0; border-left: 0; border-radius: 12px;
  background: var(--soft); color: var(--ink); font-size: 14px; line-height: 1.5;
}
#view #locked-answer-note:not([hidden]):not(#_)::before {
  content: ""; flex: none; width: 14px; height: 14px; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 7V5a3.5 3.5 0 0 1 7 0v2h.5A1 1 0 0 1 13 8v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h.5Zm1.5 0h4V5a2 2 0 0 0-4 0v2Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 7V5a3.5 3.5 0 0 1 7 0v2h.5A1 1 0 0 1 13 8v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h.5Zm1.5 0h4V5a2 2 0 0 0-4 0v2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
#view #locked-answer-note button.link:not(#_) { min-height: 36px; margin-left: auto; padding: 0 !important; border: 0 !important; background: transparent !important; color: var(--blue) !important; font-size: 14px !important; font-weight: 500; }
@media (pointer: coarse) { #view #locked-answer-note button.link:not(#_) { min-height: 44px; } }

/* 输入框 */
body[data-page="article"] #view .translation-entry textarea:not(#_),
#view #correction-form textarea:not(#_) {
  padding: 14px 16px; border: 1px solid var(--rp-line-strong) !important; border-radius: 12px !important;
  background: var(--rp-surface); color: var(--ink); line-height: 1.7;
}
body[data-page="article"] #view .translation-entry textarea:not(#_):hover:not(:focus):not([readonly]) { border-color: var(--muted) !important; }
body[data-page="article"] #view .translation-entry textarea:not(#_):focus,
#view #correction-form textarea:not(#_):focus { border-color: var(--rp-focus) !important; box-shadow: 0 0 0 3px rgb(0 113 227 / 16%); }
body[data-page="article"] #view .translation-entry textarea:not(#_)::placeholder,
#view #correction-form textarea:not(#_)::placeholder { color: var(--faint); }
body[data-page="article"] #view .translation-entry textarea[readonly]:not(#_) {
  border-style: dashed !important; background: var(--soft); color: var(--muted); opacity: 1; cursor: default;
}
body[data-page="article"] #view .hint-warning:not(#_) { margin: 6px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
body[data-page="article"] #view .previous-translation:not(#_) { color: var(--muted); font-size: 16px; line-height: 1.7; }

/* 工具栏：保存状态在左，按钮在右；分节模式工具栏贴住作答栏底部，任何状态下主操作都可见 */
body[data-page="article"] #view #article-form .toolbar:not(#_) { gap: 12px; align-items: center; }
body[data-page="article"] #view #article-form .toolbar .actions:not(#_) { gap: 8px; }
body[data-page="article"] #view .save-summary:not(#_) { gap: 4px 12px; color: var(--muted); font-size: 13px; }
body[data-page="article"] #view #save-state:not(#_) { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
body[data-page="article"] #view #save-state:not(#_)::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
body[data-page="article"] #view .save-summary #retry-save:not([hidden]):not(#_),
body[data-page="article"] #view .save-summary #export-draft:not([hidden]):not(#_) { min-height: 32px; font-size: 13px !important; font-weight: 600; }
/* 分节工具栏不贴底（2026-11-14 验收修正）：保持 r318 的正常滚动，绝不覆盖可编辑内容。
 * 空间足够时用 margin-top:auto 把工具栏放在作答栏底部；空间不足时随作答栏滚动到达。 */
@media (min-width: 761px) {
  body[data-reading-mode="sectioned"][data-page="article"] #view .translation-column > .toolbar:not(#_) { margin-top: auto; background: var(--paper); }
}

/* 7 ───────── 弹窗与查词 ───────── */
dialog.reading-dialog:not(#_),
dialog.section-merge:not(#_) {
  padding: 24px 24px 20px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--rp-surface); color: var(--ink); box-shadow: var(--rp-shadow-pop);
}
dialog.reading-dialog:not(#_)::backdrop, dialog.section-merge:not(#_)::backdrop { background: rgb(20 22 24 / 32%); }
dialog.reading-dialog h2:not(#_), dialog.section-merge h2:not(#_) { margin: 0 0 8px; font-size: 20px; font-weight: 650; line-height: 1.35; }
dialog.reading-dialog > p:not(.meta):not(#_) { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
dialog.reading-dialog .meta:not(#_) { color: var(--muted); font-size: 13px; }
dialog.reading-dialog .actions:not(#_), dialog.section-merge .actions:not(#_) { gap: 10px; margin-top: 20px; }
/* 模式选择：卡片式单选，选中＝墨色描边，悬停＝加深细边 */
dialog.mode-choice label:not(#_) {
  gap: 12px; padding: 16px 18px; border: 1px solid var(--rp-line-strong); border-radius: 12px;
  background: var(--rp-surface); transition: border-color .15s ease, background-color .15s ease;
}
dialog.mode-choice label:not(#_):hover { border-color: var(--muted); }
dialog.mode-choice label:has(input:checked):not(#_) { padding: 16px 18px; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
dialog.mode-choice input[type="radio"]:not(#_) { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pf-primary, #252729); }
dialog.mode-choice strong:not(#_) { font-size: 16px; font-weight: 600; }
dialog.mode-choice small:not(#_) { margin-top: 4px; font-size: 14px; line-height: 1.6; }
/* 全部句子：与句号导航同一套状态 */
dialog.reading-dialog section h3:not(#_) { margin: 14px 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
dialog.reading-dialog .all-sentences:not(#_) { gap: 6px; margin: 0; }
dialog.reading-dialog .all-sentences button:not(#_) {
  min-width: 44px; min-height: 44px; padding: 0 10px; margin: 0;
  border: 1px solid var(--rp-line-strong) !important; border-radius: var(--rp-radius) !important;
  background: var(--rp-surface) !important; color: var(--muted) !important;
  font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums;
}
dialog.reading-dialog .all-sentences button:not(#_):hover { border-color: var(--muted) !important; color: var(--ink) !important; }
dialog.reading-dialog .all-sentences button[aria-label*="已写"]:not(#_) { background: var(--soft) !important; border-color: transparent !important; color: var(--ink) !important; }
dialog.reading-dialog .all-sentences button[aria-label*="已提交"]:not(#_) { background: var(--rp-ok-bg) !important; border-color: transparent !important; color: var(--rp-ok) !important; }
dialog.reading-dialog > button[data-dismiss]:not(#_) { display: flex; margin: 20px 0 0 auto; }
/* 合并草稿 */
dialog.section-merge fieldset:not(#_) { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
dialog.section-merge pre:not(#_) { margin: 4px 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--soft); }
dialog.section-merge select:not(#_) { min-height: 40px; margin-left: 8px; padding: 0 10px; border: 1px solid var(--rp-line-strong); border-radius: 8px; background: var(--rp-surface); color: var(--ink); }

/* 查词弹窗 */
#vocabulary-popup.vocabulary-popup:not(#_) {
  padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: var(--rp-radius-lg);
  background: var(--rp-surface); color: var(--ink); box-shadow: var(--rp-shadow-pop);
}
#vocabulary-popup .vocabulary-heading:not(#_) { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 4px; }
#vocabulary-popup .vocabulary-heading strong:not(#_) { font-size: 22px; font-weight: 600; line-height: 1.3; }
#vocabulary-popup .vocabulary-heading button:not(#_) {
  display: grid; place-items: center; flex: none; width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0;
  border: 0 !important; border-radius: 50% !important; background: transparent !important; color: var(--muted) !important; font-size: 20px; line-height: 1;
}
#vocabulary-popup .vocabulary-heading button:not(#_):hover { background: var(--soft) !important; color: var(--ink) !important; }
@media (pointer: coarse) { #vocabulary-popup .vocabulary-heading button:not(#_) { width: 44px; min-width: 44px; height: 44px; min-height: 44px; margin-right: -6px; } }
#vocabulary-popup .lesson-word-meaning:not(#_) { font-size: 17px; font-weight: 600; }
#vocabulary-popup > .meta:not(#_), #vocabulary-popup .name-note:not(#_) { color: var(--muted); font-size: 13px; }
#vocabulary-popup button.link:not(#_) {
  display: inline-flex; align-items: center; min-height: 40px; margin: 4px 12px 0 0; padding: 0 !important;
  border: 0 !important; background: transparent !important; color: var(--blue) !important; font-size: 14px !important; font-weight: 600;
}
#vocabulary-popup button.collect-word-button:disabled:not(#_) { color: var(--rp-ok) !important; opacity: 1; cursor: default; }
#vocabulary-popup button.collect-word-button:disabled:not(#_)::before { content: "✓"; margin-right: 6px; }

/* 8 ───────── 反馈与订正 ───────── */
#view .result-page .result-top:not(#_) { padding-bottom: 18px; }
#view .result-page .result-article:not(#_) { color: var(--muted); font-size: 14px; font-weight: 600; }
#view .result-page .step-kind:not(#_) { color: var(--ink); }
#view .result-page .lesson-section > summary .step-hint:not(#_) { color: var(--muted); }
#view .result-page .diagnosis h2:not(#_), #view .result-page .derivation h2:not(#_) { color: var(--muted); font-size: 13px; }
#view .result-page .diagnosis-actions button.appeal:not(#_) { min-height: 40px; padding: 0 !important; font-size: 14px !important; color: var(--muted) !important; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
#view .result-page .diagnosis-actions button.appeal:not(#_):hover { color: var(--ink) !important; text-decoration-color: currentColor; }
#view .result-page .result-actions:not(#_) { gap: 10px; }
#view .result-page .result-actions button.link:not(#_):first-child { margin-right: auto; }
#view .section-feedback-actions:not(#_) {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 24px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--rp-surface);
}
#view .section-feedback-actions > p:not(#_) { flex-basis: 100%; margin: 0 0 4px; color: var(--muted); font-size: 14px; }
#view .result-page .collected-note:not(#_) { color: var(--muted); font-size: 13px; }
/* 订正页 */
#view #correction-form .english:not(#_) { margin: 8px 0 16px; }
#view #correction-form .actions:not(#_) { display: flex; justify-content: flex-end; margin-top: 16px; }
#view #correction-form ~ .banner:not(#_) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 16px; padding: 12px 16px; border-radius: 12px; }

/* 9 ───────── 平板低高度（≤ 600px 高）：压缩顶部，不压输入框与正文字号 ───────── */
@media (min-width: 761px) and (max-height: 640px) and (pointer: fine) {
  body[data-reading-mode="sectioned"] #view .reading-progress:not(#_) { padding: 4px 0 6px; }
  body[data-reading-mode="sectioned"] #view .reading-sections button:not(#_) { min-height: 40px; padding-top: 6px !important; }
  body[data-reading-mode="sectioned"][data-page="article"] #view #article-form .sentence-map:not(#_) { padding-bottom: 8px; }
  body[data-reading-mode="sectioned"][data-page="article"] #view #article-form .sentence-chip:not(#_) { height: 36px; min-height: 36px !important; min-width: 36px !important; }
  body[data-reading-mode="sectioned"] #view #section-live:not(:empty):not(#_) { padding: 4px 4px 4px 12px; font-size: 13px; }
  body[data-reading-mode="sectioned"] #view #section-live button:not(#_), #view #reading-all:not([hidden]):not(#_) { min-height: 32px !important; }
  body[data-reading-mode="sectioned"] #view #reading-history summary:not(#_) { min-height: 26px; padding: 2px 0; }
  body[data-page="article"] #view .reading-backbar:not(#_) { min-height: 40px; }
  body[data-reading-mode="sectioned"][data-page="article"] #view .translation-column:not(#_) { gap: 8px; }
}

/* 9b ───────── 极低高度（≤ 500px，如 820×420 或平板横屏开键盘）─────────
 * r318 的分节作答栏此时只有约 100px 高，输入框在栏内不可见（原有问题）。
 * 改为整页滚动：原文栏保留独立滚动并限高，作答栏展开，输入框保持原有最小高度。 */
@media (min-width: 761px) and (max-height: 500px) {
  body[data-reading-mode="sectioned"][data-page="article"] .layout:not(#_) { height: auto; min-height: calc(100dvh - var(--pf-header-height, 60px)); }
  body[data-reading-mode="sectioned"][data-page="article"] #content:not(#_),
  body[data-reading-mode="sectioned"][data-page="article"] #view:not(#_) { height: auto; min-height: 0; }
  body[data-reading-mode="sectioned"][data-page="article"] #view #article-form:not(#_) { flex: none; }
  body[data-reading-mode="sectioned"][data-page="article"] #view .reading-workspace:not(#_) { flex: none; height: auto; align-items: start; }
  body[data-reading-mode="sectioned"][data-page="article"] #view .original-column:not(#_) { position: sticky; top: 8px; max-height: calc(100dvh - 76px); }
  body[data-reading-mode="sectioned"][data-page="article"] #view .translation-column:not(#_) { overflow: visible; }
}

/* 10 ───────── 手机 ───────── */
@media (max-width: 760px) {
  /* 返回条：三个控件同一字号与高度 */
  body[data-page="article"] #view .reading-backbar:not(#_) { gap: 14px; }
  #view button.link.back:not(#_), #view .pdf-download:not(#_) { min-height: 44px; font-size: 15px !important; }
  /* 分节进度：一行横滑，块更窄 */
  body[data-reading-mode="sectioned"] #view .reading-progress:not(#_) { flex-wrap: wrap; gap: 4px 12px; padding: 4px 0 8px; }
  body[data-reading-mode="sectioned"] #view .reading-mode:not(#_) { flex: 1 0 auto; order: 0; }
  body[data-reading-mode="sectioned"] #view #reading-total:not(#_) { order: 1; margin-left: auto; }
  body[data-reading-mode="sectioned"] #view .reading-sections:not(#_) { order: 2; flex: 1 0 100%; gap: 10px; scrollbar-width: none; }
  body[data-reading-mode="sectioned"] #view .reading-sections::-webkit-scrollbar { display: none; }
  body[data-reading-mode="sectioned"] #view .reading-sections button:not(#_) { flex: 1 0 84px; min-width: 84px; min-height: 44px; }
  /* “查看全文”是小号次按钮，不再像标题 */
  body[data-reading-mode="sectioned"][data-page="article"] #view .mobile-context-button:not([hidden]):not(#_) { display: inline-flex; align-self: flex-start; min-height: 40px !important; padding: 0 12px !important; font-size: 14px !important; }
  body[data-reading-mode="sectioned"][data-page="article"] #view #article-form .sentence-chip:not(#_) { min-width: 44px !important; height: 44px; min-height: 44px !important; }
  body[data-reading-mode="sectioned"] #view #section-live:not(:empty):not(#_) { font-size: 13.5px; }
  /* 工具栏按钮：等分一行，触控 48px */
  body[data-page="article"] #view #article-form .toolbar .actions:not(#_) { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; margin-left: 0; }
  body[data-page="article"] #view #article-form .toolbar .actions button:not(#_) { min-height: 48px !important; padding: 0 10px !important; }
  body[data-reading-mode="sectioned"][data-page="article"] #view #article-form .toolbar .actions:not(#_) { grid-template-columns: 1fr 1fr 1.6fr; grid-auto-flow: row; }
  #view .reading-menu > div:not(#_) { min-width: min(280px, calc(100vw - 32px)); }
  dialog.reading-dialog:not(#_), dialog.section-merge:not(#_) { padding: 20px 18px 16px; }
  dialog.reading-dialog .actions:not(#_) { display: grid; grid-template-columns: 1fr 1fr; }
  #view .section-feedback-actions:not(#_) { padding: 16px; }
  #view .section-feedback-actions button:not(#_) { flex: 1 1 auto; }
}
@media (max-width: 360px) {
  body[data-reading-mode="sectioned"][data-page="article"] #view #article-form .toolbar .actions:not(#_) { grid-template-columns: 1fr 1fr; }
  body[data-reading-mode="sectioned"][data-page="article"] #view #article-form .toolbar .actions button[type="submit"]:not(#_) { grid-column: 1 / -1; }
  body[data-page="article"] #view #article-form .toolbar .actions button:not(#_) { font-size: 14px !important; }
}

/* 11 ───────── 动效偏好 ───────── */
@media (prefers-reduced-motion: no-preference) {
  body[data-reading-mode="sectioned"] #view #section-live:not(:has(button)):not(:empty):not(#_)::before { animation: rp-pulse 1.6s ease-in-out infinite; }
  @keyframes rp-pulse { 50% { opacity: .35; } }
}
@media (prefers-reduced-motion: reduce) {
  #view *, .reading-dialog *, #vocabulary-popup * { transition: none !important; animation: none !important; }
}

/* Persistent feedback controls occupy their own row, outside the scrollable text. */
body[data-page="results"] { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body[data-page="results"] .site-header { flex: none; }
body[data-page="results"] .layout:not(#_) {
  flex: 1; min-height: 0; width: 100%; margin: 0 auto;
  padding-top: 0 !important; padding-bottom: 0; display: flex; flex-direction: column;
}
body[data-page="results"] #content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body[data-page="results"] #notice { flex: none; }
body[data-page="results"] #view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#view .result-page:not(#_) {
  flex: 1; min-height: 0; width: 100%; margin: 0; padding: 0;
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
}
#view .result-scroll {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 32px 0 24px; scrollbar-gutter: stable;
}
#view .result-scroll > .back { margin-bottom: 8px; }
#view .result-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
#view .result-page .result-actions:not(#_) {
  position: static; inset: auto; z-index: auto;
  width: auto; max-width: none; margin: 0; padding: 14px 0 max(14px, env(safe-area-inset-bottom));
  flex-wrap: wrap; background: var(--paper);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
@media (max-width: 760px) { #view .result-scroll { padding-top: 20px; } }

/* Keep sentence navigation and section completion controls fully visible. */
#view .result-controls { min-width: 0; background: var(--paper); }
#view .result-controls .result-actions:not(#_) { padding: 10px 0; }
#view .result-controls .section-feedback-actions:not(#_) {
  margin: 0; padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  border: 0; border-top: 1px solid var(--line); border-radius: 0;
  gap: 8px 12px; background: transparent;
}
#view .result-controls .section-feedback-actions > p:not(#_) {
  flex: 1 1 280px; margin: 0; font-size: 13px; line-height: 1.5;
}
#view .result-controls .section-feedback-actions button:not(#_) { flex: 0 0 auto; }
@media (max-width: 760px) {
  #view .result-controls .section-feedback-actions > p:not(#_) { flex-basis: 100%; }
  #view .result-controls .section-feedback-actions button:not(#_) { flex: 1 1 auto; }
}

/* Claude review: one primary action, explicit progress, compact persistent controls. */
#view .section-feedback-summary { margin-top: 14px; }
#view .section-feedback-summary p { margin: 4px 0 0; font-size: 14px; line-height: 1.6; }
#view .section-feedback-summary .meta { color: var(--muted); font-size: 13px; }
#view .result-controls {
  display: flex; align-items: center; gap: 20px;
  border-top: 1px solid var(--line); padding: 10px 0 max(10px, env(safe-area-inset-bottom));
}
#view .result-controls .result-actions:not(#_) { flex: 1; min-width: 0; padding: 0; border: 0; }
#view .result-controls .section-feedback-actions:not(#_) {
  flex: none; margin: 0; padding: 0 0 0 20px; border: 0; border-left: 1px solid var(--line);
}
@media (max-width: 760px) {
  #view .result-controls { flex-direction: column; align-items: stretch; gap: 10px; }
  #view .result-controls .section-feedback-actions:not(#_) { padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  #view .result-controls .result-actions button:not(#_) { min-width: 0; padding-left: 12px !important; padding-right: 12px !important; font-size: 14px; }
}

/* Reserve paint space for the selected/focused dot, including its hover scale. */
#view .result-dots { padding: 6px; gap: 10px; }


/* Mobile translation: the passage itself scrolls while the answer stays selected. */
.mobile-context-tools { display: none; }
@media (max-width: 760px) {
  body[data-page="article"] #view .reading-workspace .original-column:not(#_) {
    display: block; position: static; max-height: none; overflow: visible;
    width: 100%; padding: 0; border: 0; margin: 0 0 16px;
  }
  body[data-page="article"] #view .original-column > h2:not(#_),
  body[data-page="article"] #view #reading-scope:not(#_),
  body[data-page="article"] #view .translation-entry .mobile-original:not(#_) { display: none; }
  body[data-page="article"] #view .mobile-context-tools {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; min-height: 44px; color: var(--muted); font-size: 13px;
  }
  body[data-page="article"] #view .mobile-context-tools button:not(#_) {
    flex: none; min-height: 44px; padding: 0 !important;
    font-size: 13px !important; white-space: nowrap;
  }
  body[data-page="article"] #view .original-text:not(#_) {
    display: block; flex: none; height: clamp(160px, 32dvh, 280px);
    min-height: 0; max-height: none; margin: 0; padding: 12px 4px 12px 0;
    overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain;
    touch-action: pan-y pinch-zoom; overflow-anchor: none;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    scrollbar-gutter: stable;
  }
  body[data-page="article"] #view .original-text .english:not(#_) {
    font-size: 22px; line-height: 1.65;
  }
  body[data-page="article"] #view .original-text:focus-visible {
    outline: 2px solid var(--ink); outline-offset: 2px;
  }
  body[data-page="article"] #view #article-form .toolbar:not(#_) { position: static !important; }
}

/* 10 ───────── 导航按钮状态（2026-11-15）：数字旁不再加“✓／·”，状态只靠底色与边框 ─────────
 * 未写＝白底细边、灰字；已写＝浅灰实底、墨字；已提交＝浅绿实底、绿字；当前＝墨色 2px 内框（叠加在原状态上）。
 * 数字固定居中：按钮为等宽方块，内边距归零。可访问状态仍由 aria-label／aria-current 给出。 */
body[data-page="article"] #view #article-form .sentence-chip:not(#_),
dialog.reading-dialog .all-sentences button:not(#_) {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 !important; line-height: 1; text-align: center; font-variant-numeric: tabular-nums;
}
body[data-reading-mode="sectioned"][data-page="article"] #view #article-form .sentence-chip:not(#_) { width: auto; aspect-ratio: 1 / 1; }
body[data-page="article"] #view #article-form .sentence-chip.is-locked:not(#_),
dialog.reading-dialog .all-sentences button.is-locked:not(#_) {
  background: var(--rp-ok-bg) !important; border-color: transparent !important; color: var(--rp-ok) !important; font-weight: 600;
}
dialog.reading-dialog .all-sentences button.is-done:not(#_) { background: var(--soft) !important; border-color: transparent !important; color: var(--ink) !important; }
body[data-page="article"] #view #article-form .sentence-chip.is-current:not(#_),
dialog.reading-dialog .all-sentences button.is-current:not(#_) {
  border-color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink); font-weight: 650;
}
body[data-page="article"] #view #article-form .sentence-chip.is-current:not(.is-locked):not(#_),
dialog.reading-dialog .all-sentences button.is-current:not(.is-locked):not(#_) { color: var(--ink) !important; }
/* 分节：顶线表示状态，当前节墨色优先 */
body[data-reading-mode="sectioned"] #view .reading-sections button[data-state="started"]:not(#_) { border-top-color: var(--rp-line-strong) !important; }
body[data-reading-mode="sectioned"] #view .reading-sections button[data-state="done"]:not(#_) { border-top-color: var(--rp-ok) !important; }
body[data-reading-mode="sectioned"] #view .reading-sections button[data-state="done"] small:not(#_) { color: var(--rp-ok); }
body[data-reading-mode="sectioned"] #view .reading-sections button[data-state="fix"] small:not(#_) { color: var(--rp-warn); }
body[data-reading-mode="sectioned"] #view .reading-sections button[aria-current="step"]:not(#_) { border-top-color: var(--ink) !important; }
/* Mobile sentence-first workspace. Existing desktop layout and data flow remain intact. */
#mobile-reading-position,#mobile-reading-progress,#mobile-long-sentence,.mobile-reading-info,[data-action="mobile-previous-answer"],.mobile-hint-rule { display:none; }
@media(max-width:760px) {
 body[data-page="article"]:not(#mobile-layout) { position:fixed;top:var(--reading-viewport-top,0px);left:0;width:100%;height:var(--reading-viewport-height,100dvh);min-height:0;display:flex;flex-direction:column;overflow:hidden; }
 body[data-page="article"]:not(#mobile-layout) > .site-header { display:none!important; }
 body[data-page="article"]:not(#mobile-layout) .layout:not(#_) { flex:1;display:flex;flex-direction:column;min-height:0;height:auto;width:100%;padding:0 16px env(safe-area-inset-bottom,0px)!important;overflow:hidden;box-sizing:border-box; }
 body[data-page="article"]:not(#mobile-layout) #content:not(#_),body[data-page="article"]:not(#mobile-layout) #view:not(#_) { flex:1;display:flex;flex-direction:column;min-height:0;height:auto; }
 body[data-page="article"]:not(#mobile-layout) #notice:not(:empty) { flex:none;max-height:90px;overflow:auto;margin:4px 0;font-size:13px; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-backbar:not(#_) { position:relative;flex:none;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;height:48px;min-height:48px;gap:0;padding:0;margin:0;top:auto;border:0; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-backbar > .back:not(#_) { grid-column:1;grid-row:1;font-size:0!important;min-width:44px;min-height:44px;padding:0;justify-self:start; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-backbar > .back::before { content:'‹';font-size:32px;line-height:1; }
 body[data-page="article"]:not(#mobile-layout) #view #mobile-reading-position { display:flex;flex-direction:column;justify-content:center;grid-column:2;grid-row:1;width:100%;height:48px;min-height:44px;border:0;background:transparent;padding:2px 4px;gap:0;min-width:0; }
 #mobile-reading-position strong { font-size:15px;line-height:22px;font-weight:650; }
 #mobile-reading-position strong::after { content:'⌄';margin-left:5px;color:var(--muted); }
 #mobile-reading-position span { max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;color:var(--muted); }
 body[data-page="article"]:not(#mobile-layout) #view .reading-menu:not(#_) { grid-column:3;grid-row:1;margin:0;position:static; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-menu summary:not(#_) { border:0;background:transparent;min-height:44px;width:44px;min-width:44px;padding:0;font-size:0;justify-content:center; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-menu summary:not(#_)::after { content:'···';font-size:24px;border:0;width:auto;height:auto;transform:none;line-height:1; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-menu > div:not(#_) { position:absolute;top:48px;right:0;z-index:50;width:min(320px,calc(100vw - 32px));min-width:0;max-height:calc(var(--reading-viewport-height,100dvh) - 70px);overflow:auto;white-space:normal;box-sizing:border-box; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-menu button:not(#_) { min-height:44px;font-size:14px!important; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-menu .pdf-control { display:block;padding:8px; }
 body[data-page="article"]:not(#mobile-layout) #view .mobile-reading-info { display:block;padding:8px;font-size:13px; }
 body[data-page="article"]:not(#mobile-layout) #view [data-action="mobile-previous-answer"] { display:block; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-heading,body[data-page="article"]:not(#mobile-layout) #view .reading-progress,body[data-page="article"]:not(#mobile-layout) #view .reading-backbar-title,body[data-page="article"]:not(#mobile-layout) #view .sentence-map,body[data-page="article"]:not(#mobile-layout) #view .original-column > h2,body[data-page="article"]:not(#mobile-layout) #view #reading-scope { display:none!important; }
 body[data-page="article"]:not(#mobile-layout) #view #mobile-reading-progress { display:flex;flex:none;height:4px;gap:6px;margin:0;overflow:hidden; }
 #mobile-reading-progress i { flex:1;min-width:0;height:4px;border-radius:2px;background:var(--line); }
 #mobile-reading-progress i.written { background:var(--muted); }
 #mobile-reading-progress i.locked { background:var(--rp-ok,#3c7761); }
 #mobile-reading-progress i.current { background:var(--ink); }
 #mobile-reading-progress i.part-start { margin-left:4px; }
 body[data-page="article"]:not(#mobile-layout) #view #article-form,body[data-page="article"]:not(#mobile-layout) #view .reading-workspace { flex:1;display:flex;flex-direction:column;min-height:0;height:auto;max-height:none;gap:0;padding:0;margin:0;overflow:hidden; }
 body[data-page="article"]:not(#mobile-layout) #view .original-column { position:relative;flex:1 1 0;display:flex;flex-direction:column;min-height:40px;max-height:none;padding:0;margin:0;overflow:hidden; }
 body[data-page="article"]:not(#mobile-layout) #view .mobile-context-tools { flex:none;min-height:44px;height:44px;padding:0;border:0;margin:0;font-size:12px; }
 body[data-page="article"]:not(#mobile-layout) #view .mobile-context-tools button { min-height:44px;padding:0 4px;font-size:14px; }
 body[data-page="article"]:not(#mobile-layout) #view .original-text { flex:1;height:auto;min-height:0;max-height:none;padding:0 0 8px;margin:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-padding:8px; }
 body[data-page="article"]:not(#mobile-layout) #view .original-text .english { font-size:22px!important;line-height:1.65!important;margin:0 0 16px;padding:0; }
 body[data-page="article"][data-mobile-context="false"]:not(#mobile-layout) #view .original-text > p:not(.mobile-current-paragraph),body[data-page="article"][data-mobile-context="false"]:not(#mobile-layout) #view .original-text .source-sentence:not(.selected) { display:none!important; }
 body[data-page="article"][data-mobile-context="false"]:not(#mobile-layout) #view .source-sentence.selected { background:transparent;border-radius:0;padding:0;box-decoration-break:slice; }
 body[data-page="article"][data-mobile-context="false"]:not(#mobile-layout) #view .original-text > p { margin:0; }
 body[data-page="article"]:not(#mobile-layout) #view #mobile-long-sentence:not([hidden]) { display:block;position:absolute;bottom:0;left:0;width:100%;height:44px;min-height:44px;padding:8px;border:0;border-radius:0;background:var(--paper);color:var(--link,#176a9d);font-size:13px;box-shadow:0 -12px 15px var(--paper); }
 body[data-page="article"]:not(#mobile-layout) #view .original-text.mobile-overflow { padding-bottom:48px; }
 body[data-page="article"]:not(#mobile-layout) #view .translation-column { flex:none;display:flex;flex-direction:column;overflow:visible;min-height:0;padding:8px 0 0;margin:0;gap:8px;border-top:1px solid var(--line); }
 body[data-page="article"]:not(#mobile-layout) #view .translation-heading { flex:none;display:flex;align-items:center;min-height:24px;margin:0;padding:0;gap:8px;order:0; }
 body[data-page="article"]:not(#mobile-layout) #view .translation-heading h2 { font-size:13px;line-height:24px;margin:0; }
 body[data-page="article"]:not(#mobile-layout) #view .translation-heading #position-count,body[data-page="article"]:not(#mobile-layout) #view .full-entry-trigger,body[data-page="article"]:not(#mobile-layout) #view #previous-translation,body[data-page="article"]:not(#mobile-layout) #view .hint-warning { display:none!important; }
 body[data-page="article"]:not(#mobile-layout) #view .save-summary { display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;min-height:24px;font-size:12px;line-height:20px;margin:0; }
 body[data-page="article"]:not(#mobile-layout) #view .save-summary > .meta { display:none; }
 body[data-page="article"]:not(#mobile-layout) #view .save-summary button:not([hidden]) { min-height:44px; }
 body[data-page="article"]:not(#mobile-layout) #view .translation-entry:not([hidden]) { flex:none;min-height:0;padding:0;margin:0;order:2; }
 body[data-page="article"]:not(#mobile-layout) #view .translation-entry .sentence-number { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
 body[data-page="article"]:not(#mobile-layout) #view .translation-entry textarea { display:block;flex:none;width:100%;height:94px;min-height:94px;max-height:94px;padding:10px 12px;margin:0;font-size:16px;line-height:24px;resize:none;box-sizing:border-box; }
 body[data-page="article"]:not(#mobile-layout) #view .translation-column.mobile-compact textarea { height:70px;min-height:70px;max-height:70px; }
 body[data-page="article"]:not(#mobile-layout) #view #article-form .toolbar { position:static!important;flex:none;display:block;min-height:0;border:0;padding:0 0 8px;margin:0;order:10;background:var(--paper); }
 body[data-page="article"]:not(#mobile-layout) #view #article-form .toolbar .actions { display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:8px;padding:0;margin:0; }
 body[data-page="article"]:not(#mobile-layout) #view #article-form .toolbar button { min-height:44px!important;margin:0;padding:4px!important;font-size:14px!important;line-height:18px;grid-column:auto; }
 body[data-page="article"]:not(#mobile-layout) #view #locked-answer-note:not([hidden]) { order:1;max-height:65px;overflow:auto;margin:0;font-size:12px;line-height:20px; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-menu #section-live,body[data-page="article"]:not(#mobile-layout) #view .reading-menu #reading-history { display:block;max-height:none;margin:0;padding:8px;font-size:13px; }
 body[data-page="article"]:not(#mobile-layout) #view .reading-menu #section-live:empty { display:none; }
 body[data-page="article"]:not(#mobile-layout) .mobile-hint-rule { display:block;font-size:12px;color:var(--muted); }
 body[data-page="article"][data-reading-keyboard="true"]:not(#mobile-layout) #view .reading-backbar { display:none!important; }
 body[data-page="article"][data-reading-keyboard="true"]:not(#mobile-layout) #view .translation-heading h2 { display:none; }
 body[data-page="article"][data-reading-keyboard="true"]:not(#mobile-layout) #view .translation-heading { min-height:20px; }
 body[data-page="article"] .reading-dialog { max-height:calc(var(--reading-viewport-height,100dvh) - 24px);overflow-y:auto;box-sizing:border-box; }
 .mobile-reading-dialog { width:calc(100vw - 24px);padding:16px; }
 .mobile-reading-dialog header { display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;top:-16px;background:var(--paper);padding:8px 0; }
 .mobile-reading-dialog header h2 { font-size:14px;margin:0; }
 .mobile-reading-dialog header button { min-height:44px; }
 .mobile-reading-dialog > .english { font-size:22px!important;line-height:1.65!important;white-space:pre-wrap; }
 .mobile-reading-dialog > div:not(.english) { white-space:pre-wrap; }
 .mobile-nav-info { font-size:13px;line-height:1.5; }
 body[data-page="article"] .reading-dialog .all-sentences { display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:8px; }
 body[data-page="article"] .reading-dialog .all-sentences button { min-width:44px;min-height:44px; }
}

@media(max-width:760px) {
 body[data-page="article"]:not(#mobile-layout) #view .reading-workspace .original-column:not(#_) { position:relative;display:flex;flex-direction:column;flex:1 1 0;overflow:hidden;min-height:40px;margin:0;padding:0; }
 body[data-page="article"]:not(#mobile-layout) #view .original-text:not(#_) { flex:1 1 0;height:auto;min-height:0;margin:0;padding:0 0 8px;border:0;scrollbar-gutter:auto; }
 body[data-page="article"]:not(#mobile-layout) #view .translation-heading:not(#_) { flex-direction:row;height:auto;min-height:24px;align-items:center;justify-content:flex-start; }
 body[data-page="article"]:not(#mobile-layout) #view .translation-heading h2:not(#_) { margin:0!important;line-height:24px; }
}

@media(max-width:760px) {
 body[data-page="article"]:not(#mobile-layout) #view .translation-heading:not(#_) { flex-wrap:nowrap;gap:8px; }
 body[data-page="article"]:not(#mobile-layout) #view .translation-heading h2:not(#_) { flex:0 0 auto;width:auto;min-height:0; }
 body[data-page="article"]:not(#mobile-layout) #view .translation-heading .save-summary:not(#_) { flex:1;width:auto; }
}

@media(max-width:760px) {
 #mobile-reading-progress .mobile-progress-group { display:flex;flex:1 1 0;min-width:8px;gap:2px;height:4px; }
 #mobile-reading-progress .mobile-progress-block { display:flex;overflow:hidden; }
 #mobile-reading-progress .mobile-progress-block b { display:block;height:100%;background:var(--muted); }
 #mobile-reading-progress .mobile-progress-block b.locked { background:var(--rp-ok,#3c7761); }
 body[data-page="article"]:not(#mobile-layout) #view .mobile-context-tools { gap:4px;font-size:12px;line-height:18px; }
 body[data-page="article"]:not(#mobile-layout) #view #mobile-context-hint { flex:1;min-width:0; }
 body[data-page="article"]:not(#mobile-layout) #view .mobile-context-tools button { flex:none;font-size:12px;padding:0; }
 body[data-page="article"][data-reading-keyboard="true"]:not(#mobile-layout) #view .mobile-context-tools { display:flex!important;min-height:18px;height:auto;flex:none; }
 body[data-page="article"][data-reading-keyboard="true"]:not(#mobile-layout) #view .mobile-context-tools button { display:none; }
}

@media(max-width:760px) {
 body[data-page="article"]:not(#mobile-layout) #view #article-form .toolbar .actions:not(#_) { display:grid;grid-template-columns:1fr 1fr 1.5fr;grid-auto-flow:row; }
 body[data-page="article"]:not(#mobile-layout) #view #article-form .toolbar .actions button:not(#_) { grid-column:auto;min-height:44px!important;padding:4px!important; }
}

/* Compare pending browser drafts without hiding either version. */
dialog.draft-review { width:min(680px,calc(100vw - 24px)); max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); padding:0; border:1px solid var(--line); border-radius:16px; color:var(--ink); background:var(--paper); overflow:hidden; box-sizing:border-box; }
dialog.draft-review[open] { display:flex; flex-direction:column; }
.draft-review::backdrop { background:rgba(0,0,0,.35); }
.draft-review header,.draft-review footer { display:flex; align-items:center; justify-content:space-between; flex:none; gap:12px; padding:12px 20px; }
.draft-review header { border-bottom:1px solid var(--line); }
.draft-review h2 { margin:0; font-size:20px; }
.draft-review button { min-height:44px; }
.draft-review-body { padding:0 20px 16px; overflow-y:auto; min-height:0; overscroll-behavior:contain; }
.draft-review fieldset { padding:16px 0; margin:16px 0 0; border:0; border-bottom:1px solid var(--line); min-width:0; }
.draft-review legend { padding:0; font-weight:650; }
.draft-review-source { font-family:Georgia,serif; font-size:18px; line-height:1.6; margin:8px 0 12px; }
.draft-review-options { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.draft-review-option { display:flex; align-items:flex-start; gap:10px; padding:12px; border:1px solid var(--line); border-radius:10px; cursor:pointer; min-width:0; }
.draft-review-option:has(input:checked) { border-color:var(--ink); background:var(--soft); }
.draft-review-option input { flex:none; width:18px; height:18px; margin:2px 0; accent-color:var(--ink); }
.draft-review-option strong { display:block; font-size:14px; }
.draft-review-text { display:block; font-size:16px; line-height:1.65; white-space:pre-wrap; overflow-wrap:anywhere; margin-top:6px; }
.draft-review footer { border-top:1px solid var(--line); padding-bottom:max(12px,env(safe-area-inset-bottom)); }
.draft-review-status { color:#a12d27; line-height:1.6; }
@media(max-width:600px) { .draft-review-options { grid-template-columns:1fr; } .draft-review header,.draft-review footer { padding-left:16px; padding-right:16px; } .draft-review-body { padding-left:16px; padding-right:16px; } .draft-review footer { gap:8px; } .draft-review footer button { padding:10px 12px; font-size:14px; } }
