:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --white: #fffefa;
  --ink: #1c2720;
  --green: #153f33;
  --deep-green: #102e26;
  --soft-green: #eaf3ea;
  --mint: #d6ead9;
  --muted: #56665c;
  --line: #dedfd5;
  --error: #a13a2c;
  --radius: 18px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Microsoft YaHei", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 280px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .64;
}

a {
  color: var(--green);
  text-underline-offset: 4px;
}

:focus-visible {
  outline: 3px solid #608973;
  outline-offset: 4px;
}

h1, h2, h3, p, blockquote {
  margin: 0;
}

h1, h2, h3 {
  color: var(--green);
  line-height: 1.28;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  width: min(100% - 48px, 1060px);
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--green);
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: contain;
}

.brand-name {
  display: block;
  color: var(--green);
  font-family: var(--serif);
  font-size: clamp(15px, 4.4vw, 19px);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: keep-all;
}

#account-button {
  flex: none;
}

main .shell, main.shell, .shell {
  width: min(100% - 48px, 1060px);
  margin: 0 auto;
  padding: 36px 0 112px;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 200px;
  display: grid;
  align-content: center;
  grid-template-columns: minmax(0, 1fr);
  padding: 30px clamp(190px, 32vw, 346px) 30px clamp(30px, 5.2vw, 62px);
  overflow: hidden;
  border-radius: 24px;
  background: radial-gradient(ellipse at 100% -40%, #2c6150 0, transparent 73%), var(--green);
}

.hero h1 {
  position: relative;
  z-index: 1;
  color: #f6faed;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 57px);
  font-weight: 800;
  letter-spacing: .015em;
  line-height: 1.16;
}

.hero-art {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 8.7%;
  width: clamp(130px, 20vw, 186px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  border: 1px solid #75a48b61;
  border-radius: 50%;
  box-shadow: 0 0 0 18px #a7d7b21b, 0 0 0 38px #a7d7b212;
  pointer-events: none;
}

.hero-art::before, .hero-art::after {
  position: absolute;
  content: "";
  width: 55%;
  height: 69%;
  border: 1px solid #a4cdb1;
  border-radius: 7% 7% 6% 6%;
}

.hero-art::before {
  top: 16%;
  left: 32%;
  transform: rotate(17deg);
  background: #76a987;
  box-shadow: 12px 14px 24px #0b291d57;
}

.hero-art::after {
  top: 12%;
  left: 17%;
  transform: rotate(-9deg);
  background:
    linear-gradient(#86aa91, #86aa91) 19% 22% / 44% 7% no-repeat,
    repeating-linear-gradient(to bottom, #a5ba9f 0 1px, transparent 1px 14px) 50% 83% / 67% 45% no-repeat,
    linear-gradient(135deg, #f6f7df, #d4e7c9);
  box-shadow: 6px 8px 14px #0e382b4d;
}

section + section {
  margin-top: 30px;
}

.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  column-gap: 16px;
  row-gap: 5px;
  margin-bottom: 17px;
}

.section-title h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3.3vw, 32px);
  font-weight: 800;
}

.section-title p, .subtle, .muted {
  color: var(--muted);
  font-size: 13px;
}

.card, .custom-callout {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.topic-tag, .status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--soft-green);
  color: #225042;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.custom-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 19px;
  padding: 17px 19px;
  background: #edf4e9;
}

.custom-callout h2, .custom-callout h3 {
  font-size: 18px;
}

.custom-callout p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.bottom-nav {
  position: fixed;
  z-index: 5;
  bottom: 18px;
  left: 50%;
  display: flex;
  justify-content: center;
  gap: 4px;
  width: min(440px, calc(100% - 32px));
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fffefaf2;
  box-shadow: 0 9px 25px #233f2720;
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.nav-button {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 48px;
  padding: 7px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-button:where(.active, .is-active, [aria-current]:not([aria-current="false"]), [aria-selected="true"], [aria-pressed="true"]) {
  background: var(--soft-green);
  color: var(--green);
}

.nav-button svg {
  flex: none;
}

.card {
  padding: clamp(18px, 3vw, 28px);
}

.login-card {
  width: min(100%, 420px);
  margin: clamp(22px, 7vh, 70px) auto 0;
}

.login-card h1 {
  font-family: var(--serif);
  font-size: clamp(24px, 5vw, 32px);
}

.login-card p:not(.error) {
  margin: 7px 0 20px;
  color: var(--muted);
}

.login-card .btn {
  width: 100%;
}

#account-dialog .button-row {
  margin-top: 14px;
}

.card + .card, .card + .notice, .notice + .card {
  margin-top: 16px;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > label, label.field > :first-child, legend {
  color: var(--green);
  font-weight: 700;
}

.field small, .field-hint {
  color: var(--muted);
  font-size: 12px;
}

input:not([type="checkbox"], [type="radio"]), textarea, select {
  display: block;
  width: 100%;
  min-height: 46px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #bfcabe;
  border-radius: 9px;
  background: #fffefa;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  transition: border-color .18s ease;
}

input::placeholder, textarea::placeholder {
  color: #657369;
  opacity: 1;
}

textarea {
  min-height: 98px;
  resize: vertical;
}

input:focus, textarea:focus, select:focus {
  border-color: #527e65;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.materials, .article-preview {
  display: grid;
  gap: 10px;
}

.materials details, .article-preview details, .card > details, details.materials {
  display: block;
  padding: 10px 13px;
  border: 1px solid #dce6db;
  border-radius: 10px;
  background: #f7faf2;
}

details summary {
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
}

details[open] summary {
  margin-bottom: 8px;
}

details p, .materials p, .article-preview p {
  white-space: pre-wrap;
}

.btn, .back, #account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease;
}

.btn-primary {
  border-color: var(--green);
  background: var(--green);
  color: #fffef6;
}

.btn-light, #account-button {
  border-color: #d4ded3;
  background: #f0f6ed;
}

#account-button {
  display: block;
  max-width: min(50%, 180px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-quiet, .back {
  padding-inline: 10px;
}

.back {
  margin-bottom: 9px;
}

.btn-danger {
  color: var(--error);
}

.form-actions, .button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.notice, .error {
  padding: 9px 12px;
  border: 1px solid #d6e5d5;
  border-radius: 10px;
  background: #f0f7ed;
  color: var(--green);
  font-size: 13px;
}

.notice:empty, .error:empty {
  display: none;
}

.error {
  border-color: #edd1c9;
  background: #fcf0ec;
  color: var(--error);
}

.status-pill:where(.revise, .failed, [data-status="failed"], [data-status="revise"]) {
  background: #f8ebde;
  color: #7a432b;
}

.status-pill:where(.queued, .running, .insufficient, [data-status="queued"], [data-status="running"], [data-status="insufficient"]) {
  background: #eeeee5;
  color: #4f584c;
}

.history-list, .answer-points {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
}

.history-list:where(ul, ol) {
  list-style: none;
}

.history-row, .difference-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f9faf4;
  color: var(--ink);
  text-align: left;
}

.history-row h3, .difference-row h3 {
  font-size: 15px;
}

.history-row p, .difference-row p {
  color: var(--muted);
  font-size: 13px;
}

.point-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.point-row > :only-child {
  grid-column: 1 / -1;
}

.photo-recognition {
  margin-bottom: 16px;
  padding: 10px 13px;
  border: 1px solid #d0dccd;
  border-radius: 12px;
  background: #f2f7ee;
}

.photo-recognition > summary { min-height: 44px; padding-block: 9px; }
.photo-recognition[open] > summary { margin-bottom: 0; }
.photo-recognition > .form-actions { margin-block: 9px; }
.photo-recognition > #photo-hint { padding: 0; border: 0; background: transparent; }
.photo-picker { position: relative; cursor: pointer; }
.photo-picker:focus-within { outline: 3px solid #608973; outline-offset: 4px; }
.photo-picker:has(input:disabled) { opacity: .64; cursor: wait; }
.photo-picker input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: inherit; }

.photo-list { display: grid; gap: 5px; margin: 0 0 10px; padding-inline-start: 25px; }
.photo-list li { padding-inline-start: 4px; }
.photo-list li::marker { color: var(--green); font-weight: 700; }
.photo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px 10px; }
.photo-row > span { min-width: 0; overflow-wrap: anywhere; }
.photo-row-actions { display: flex; flex-wrap: wrap; gap: 2px; }
.photo-row .btn { min-width: 44px; padding-inline: 5px; font-size: 13px; }
.photo-row .btn:disabled { cursor: default; }
.photo-recognition > :is(.notice, .error):not(:empty) { margin-top: 7px; }

.photo-result {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d0dccd;
  border-radius: 10px;
  background: var(--white);
}

.photo-result h3 { scroll-margin-top: 16px; font-size: 17px; }
.photo-fields { display: grid; gap: 9px; margin: 0; }
.photo-fields dt { color: var(--green); font-size: 13px; font-weight: 700; }
.photo-fields dd { margin: 2px 0 0; white-space: pre-wrap; }
.photo-warnings { margin: 0; padding-inline-start: 19px; color: var(--muted); font-size: 13px; }
.photo-result details { min-width: 0; }
.photo-result details > summary { min-height: 40px; padding-block: 6px; }

@media (hover: hover) and (pointer: fine) {
  .photo-camera { display: none; }
}

.report-item {
  min-width: 0;
  margin-top: 11px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9faf4;
}

.report-item h3 {
  font-size: 16px;
}

.report-item p {
  margin-top: 7px;
}

.report-item blockquote {
  margin: 8px 0;
  padding: 7px 10px;
  border-left: 3px solid #86a994;
  border-radius: 0 7px 7px 0;
  background: #eef4ea;
  color: #334f40;
  font-size: 14px;
  white-space: pre-wrap;
}

.empty {
  padding: 22px 14px;
  border: 1px dashed #c6d1c1;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.dialog, dialog {
  width: min(460px, calc(100% - 30px));
  max-height: min(90vh, 760px);
  padding: clamp(18px, 5vw, 28px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 18px 68px #112c2552;
}

.dialog::backdrop, dialog::backdrop {
  background: #112c2589;
  backdrop-filter: blur(2px);
}

.dialog .section-title, dialog .section-title {
  margin-bottom: 13px;
}

.home-quote {
  min-height: 232px;
  margin-top: clamp(13px, 2vw, 20px);
  padding: clamp(18px, 3.6vw, 36px);
  border: 1px solid #31584a;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at top right, #3c5e43, transparent 65%), linear-gradient(135deg, #173c30, #112d25);
  box-shadow: 0 18px 38px -26px #102f28b3;
  color: #f9f5e9;
}

.home-quote-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid #f2dca745;
}

.home-quote-header h2 {
  color: #f8e4b4;
  font: 800 clamp(17px, 2.3vw, 24px)/1.3 var(--serif);
}

#home-quote-period { color: #e1e5cd; font-size: 12px; }
.home-quote-subject { margin-top: 14px; color: #f7dc9f; font-size: 13px; font-weight: 700; }

.home-quote-passage {
  max-width: 37em;
  margin-top: 14px;
  padding-left: clamp(12px, 2.2vw, 21px);
  border-left: 2px solid #edca80;
  font: 600 clamp(18px, 2.25vw, 23px)/1.75 var(--serif);
  white-space: pre-wrap;
}

.home-quote-summary { max-width: 57em; margin-top: 14px; color: #e1e5cd; font-size: 13px; white-space: pre-wrap; }

.home-quote .daily-source {
  margin-top: 15px;
  padding-top: 9px;
  border-color: #f2dca745;
  color: #e1e5cd;
  font-size: 12px;
}

.home-quote .daily-source a, .home-quote-retry { color: #f8e4b4; }
.home-quote .daily-source a { min-height: 44px; }
.home-quote :focus-visible { outline-color: #f8e4b4; }
.home-quote-state { display: grid; place-content: center; gap: 8px; min-height: 115px; color: #e1e5cd; text-align: center; }
.home-quote-retry { min-height: 44px; border: 1px solid #f2dca776; border-radius: 8px; background: transparent; }

.daily-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: clamp(18px, 4vw, 35px);
  border: 1px solid #d0dccd;
  border-radius: var(--radius);
  background: #eef4eb;
}

.daily-heading h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
}

.daily-heading p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.daily-heading time { display: inline-block; margin-bottom: 6px; color: var(--green); font-size: 14px; font-variant-numeric: tabular-nums; }
.daily-practice { display: grid; gap: 10px; margin: 16px 0; }
.daily-practice > h2 { font-size: 20px; }
.daily-date { flex: 0 1 160px; }
.daily-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.daily-filters label { flex: 0 1 180px; }
.daily-count { margin: 14px 0 8px; }
.daily-count:empty { display: none; }
.daily-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.daily-heading + .daily-count:empty + .daily-list { margin-top: 12px; }
.daily-list > .empty { grid-column: 1 / -1; }

.daily-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 10px;
  padding: clamp(15px, 2vw, 21px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.daily-card-head { display: flex; flex-direction: column; align-items: start; gap: 9px; }
.daily-card-head :is(h2, h3) { font-size: 20px; }
.daily-summary { color: var(--ink); font-size: 14px; white-space: pre-wrap; }
.daily-quote { padding: 9px 11px; border-left: 3px solid #86a994; border-radius: 0 8px 8px 0; background: #eef4ea; }
.daily-quote span { display: block; color: var(--green); font-size: 11px; font-weight: 700; }
.daily-quote p { margin-top: 3px; white-space: pre-wrap; }
.daily-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.daily-tags li { padding: 2px 8px; border-radius: 99px; background: #eff1e9; color: var(--muted); font-size: 12px; }

.daily-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.daily-card .daily-source { margin-top: auto; }
.daily-source a { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; }
.daily-action { padding-top: 2px; }
.daily-reading-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.materials-reader-action { margin-bottom: 4px; }
.article-preview .daily-tags { margin: 10px 0; }
.article-preview .daily-source { margin-top: 10px; }
.case-reading-note { margin: 12px 0; padding: 8px 11px; border-radius: 8px; background: #eff4e9; color: var(--muted); font-size: 13px; }

.paragraph-fields {
  display: grid;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid #d0dccd;
  border-radius: 12px;
  background: #f1f6ed;
}

.paragraph-fields legend { padding-inline: 6px; }
.paragraph-text { min-height: 174px; }
.paragraph-meta { display: flex; justify-content: space-between; align-items: start; gap: 8px; color: var(--muted); font-size: 12px; }
.paragraph-count { flex: none; color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.paragraph-count.out-of-range { color: var(--error); }

.paragraph-review {
  display: grid;
  gap: 8px;
  margin: 15px 0;
  padding: 14px;
  border: 1px solid #d0dccd;
  border-radius: 12px;
  background: #f1f6ed;
}

.paragraph-review-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 7px; }
.paragraph-review-heading h2 { font-size: 21px; }
.paragraph-review-heading span { color: var(--green); font-size: 13px; }
.paragraph-passage, .difference-row p { white-space: pre-wrap; }
.paragraph-passage { margin-top: 6px; }
.paragraph-example { padding-top: 9px; border-top: 1px solid var(--line); }
.paragraph-example h3 { font-size: 16px; }
.paragraph-reason { margin-top: 9px; color: var(--muted); font-size: 13px; }
.history-actions { display: flex; flex: none; flex-wrap: wrap; gap: 4px; }

.practice-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--glass-line);
  border-radius: 13px;
  background: rgba(255, 254, 250, .78);
}

.practice-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 7px clamp(8px, 3vw, 16px);
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.practice-nav a[aria-current] { background: var(--soft-green); color: var(--green); }
.mock-link { color: var(--green); text-decoration: none; }
.mock-link:hover { border-color: #90ad94; background: var(--soft-green); }
.paper-year + .paper-year { margin-top: 20px; }
.paper-year h2 { margin-bottom: 8px; font-size: 17px; }
.paper-list, .paper-questions { margin: 0; padding: 0; list-style: none; }
.paper-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.paper-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  min-height: 53px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  text-decoration: none;
}
.paper-link:hover { border-color: #90ad94; background: var(--soft-green); }
.paper-link > span { color: var(--muted); font-size: 13px; }
.paper-heading { margin-bottom: 16px; }
.paper-heading h1 { font-size: clamp(23px, 3.5vw, 34px); }
.paper-section .section-title { margin-bottom: 12px; }
.paper-section .section-title h2 { font-size: clamp(20px, 3vw, 25px); }
.paper-section h2[tabindex] { scroll-margin-top: 18px; }
.paper-instructions { margin-bottom: 10px; }
.paper-section details { padding: 0 13px; }
.paper-section summary { min-height: 44px; padding: 9px 0; }
.paper-section details[open] summary { margin-bottom: 0; }
.paper-section details p { max-width: 48em; padding-bottom: 12px; }
.paper-question + .paper-question { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.paper-question-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.paper-question h3 { font-size: 16px; }
.paper-question-heading span { color: var(--muted); font-size: 13px; }
.paper-question p { margin-top: 7px; white-space: pre-wrap; }
.paper-question .form-stack { margin-top: 12px; }

@media (hover: hover) {
  .nav-button:hover, .back:hover, .btn-quiet:hover {
    background: var(--soft-green);
  }

  .btn-primary:hover {
    border-color: var(--deep-green);
    background: var(--deep-green);
  }

  .btn-light:hover, #account-button:hover {
    background: var(--mint);
  }
}

@media (max-width: 680px) {
  .header-inner, main .shell, main.shell, .shell {
    width: calc(100% - 32px);
  }

  .header-inner {
    min-height: 65px;
    gap: 10px;
  }

  #account-button { max-width: min(38%, 140px); }

  main .shell, main.shell, .shell {
    padding-top: 19px;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .hero {
    min-height: 132px;
    padding: 24px;
    border-radius: 19px;
  }

  .hero h1 {
    font-size: clamp(28px, 7vw, 40px);
  }

  .hero-art {
    display: none;
  }

  section + section {
    margin-top: 22px;
  }

  .section-title {
    margin-bottom: 12px;
  }

  .custom-callout {
    margin-top: 14px;
    padding: 12px 14px;
  }

  .bottom-nav {
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .daily-filters label { flex: 1 1 calc(50% - 5px); }
  .nav-button { padding-inline: 3px; font-size: 12px; }
}

@media (max-width: 325px) {
  .header-inner, main .shell, main.shell, .shell {
    width: calc(100% - 24px);
  }

  .hero {
    padding-inline: 16px;
  }

  .hero h1 {
    font-size: 27px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark { width: 36px; height: 36px; }

  .custom-callout {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-actions { flex-basis: min-content; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
  }
}

/* ===========================================================
   毛玻璃视觉层（仅覆盖考生端；2026-12-02）
   设计稿：/hb-login-design.html · 暖纸炭黑配方 + 暖橙 CTA
   =========================================================== */
:root {
  --cta: #ef7a45;
  --cta-2: #f8ad55;
  --glass-fill: linear-gradient(145deg, rgba(255,254,250,.78), rgba(255,254,250,.42));
  --glass-line: rgba(255,255,255,.82);
  --glass-blur: blur(26px) saturate(180%);
  --ambient-1: rgba(238,188,146,.78);
  --ambient-2: rgba(190,183,214,.7);
  --ambient-3: rgba(170,205,183,.62);
}

body {
  isolation: isolate;
  background:
    radial-gradient(90% 70% at 8% 4%, rgba(232,194,160,.58) 0, transparent 62%),
    radial-gradient(80% 70% at 96% 96%, rgba(204,194,214,.42) 0, transparent 60%),
    linear-gradient(155deg, #f6f3ed, #f0ede6);
  background-attachment: fixed;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(36,35,31,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(36,35,31,.055) 1px, transparent 1px);
  background-size: 64px 64px;
}
.ambient-blob { position: absolute; border-radius: 50%; filter: blur(58px); }
.ambient-blob--1 { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: var(--ambient-1); }
.ambient-blob--2 { width: 40vw; height: 40vw; right: -10vw; top: 26vh; background: var(--ambient-2); }
.ambient-blob--3 { width: 38vw; height: 38vw; left: 24vw; bottom: -18vw; background: var(--ambient-3); }
.ambient-ring { position: absolute; border: 2px solid rgba(36,35,31,.14); border-radius: 50%; }
.ambient-ring--1 { width: 30vw; height: 30vw; right: 8vw; top: -8vw; }
.ambient-ring--2 { width: 22vw; height: 22vw; left: -6vw; bottom: 6vw; }

.site-header {
  position: relative;
  border-bottom: 1px solid var(--glass-line);
  background: rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

.glass, .card, .custom-callout, .dialog, dialog {
  border: 1px solid var(--glass-line);
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 24px 54px -26px rgba(36,35,31,.36), inset 0 1px 0 rgba(255,255,255,.92);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card, .custom-callout, .dialog, dialog { background: rgba(255,255,255,.95); }
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--cta), var(--cta-2));
  color: #fffdf8;
  box-shadow: 0 14px 26px -14px rgba(150,80,40,.5);
}
@media (hover: hover) {
  .btn-primary:hover { border-color: transparent; background: linear-gradient(135deg, var(--cta), var(--cta-2)); filter: brightness(1.05); }
}

.hero {
  background: linear-gradient(135deg, var(--cta), var(--cta-2));
  border: 1px solid rgba(255,255,255,.5);
}
.hero h1 { color: #fffdf8; }
.hero-art { border-color: rgba(255,255,255,.42); box-shadow: 0 0 0 18px rgba(255,255,255,.14), 0 0 0 38px rgba(255,255,255,.08); }
.hero-art::before { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.32); }
.hero-art::after { border-color: rgba(255,255,255,.6); background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.18)); }

/* 登录页：手机单栏 / 平板双栏 */
.login-view { width: min(100%, 980px); margin: clamp(18px, 6vh, 64px) auto 0; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.login-editorial { display: none; }
.login-card { width: 100%; max-width: none; margin: 0; padding: 24px 20px; border-radius: 24px; }
.login-card h1 { font-size: 27px; line-height: 1.3; margin-top: 12px; }
.login-lead { margin: 6px 0 20px; color: var(--muted); font-size: 13px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.login-foot { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; text-align: center; }

.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 66px; }
.password-toggle {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  min-width: 56px; min-height: 42px; padding: 0 8px;
  border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 700;
}
.password-toggle:hover { color: var(--green); background: rgba(255,255,255,.5); }

.login-preview { display: none; }
.login-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; background: var(--soft-green); color: #225042; font-size: 11px; font-weight: 700; }
.login-preview-date { color: var(--muted); font-size: 12px; }
.login-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.login-mini { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.6); }
.login-mini--warm { background: linear-gradient(145deg, #f6e9dc, rgba(255,255,255,.5)); border-color: rgba(160,110,70,.22); }
.login-mini span { display: block; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.login-mini strong { display: block; margin: 8px 0 4px; color: var(--green); font: 700 15px/1.3 var(--serif); }
.login-mini small { color: var(--muted); font-size: 11px; }

@media (min-width: 768px) {
  .login-view { margin-top: clamp(40px, 10vh, 96px); }
  .login-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(30px, 5vw, 72px); align-items: center; }
  .login-editorial { display: block; min-width: 0; padding-top: 8px; }
  .login-editorial .eyebrow { margin-bottom: 14px; }
  .login-editorial h2 { margin: 0 0 14px; color: var(--ink); font: 700 clamp(32px, 4.4vw, 48px)/1.2 var(--serif); }
  .login-editorial > p { max-width: 32ch; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
  .login-preview { display: block; margin-top: 28px; padding: 18px; border-radius: 20px; }
  .login-card { padding: clamp(24px, 3vw, 36px); border-radius: 28px; }
  .login-card h1 { font-size: clamp(26px, 3vw, 34px); }
}

/* 每日素材：标题层级 + 留白，减少文字密度 */
.daily-card { gap: 8px; padding: clamp(16px, 2vw, 22px); }
.daily-card-head :is(h2, h3) { font-size: 18px; line-height: 1.35; }
.daily-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); font-size: 13.5px; line-height: 1.7; }
.daily-quote p { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.daily-tags { gap: 6px; margin-top: 4px; }
.daily-source { padding-top: 10px; font-size: 11px; }
.daily-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; }

@media (min-width: 768px) and (max-width: 1023px) {
  .daily-list { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-blob, .ambient-ring { display: none; }
}

/* ===========================================================
   首页改版：Logo 锁形 + 去大橙块的毛玻璃 Banner + 浅色金句卡
   2026-12-02 · 设计稿 quote-card-redesign.html
   =========================================================== */
:root {
  --hero-panel: rgba(255,254,250,.66);
}

/* Logo 锁形 */
.brand { gap: 10px; }
.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff2e4;
  border: 1px solid rgba(239,122,69,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.brand-mark svg { width: 26px; height: 26px; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font: 700 16px/1.2 var(--sans);
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand-separator { width: 4px; height: 4px; border-radius: 50%; background: var(--cta); }
.brand-title > span:last-child { font-weight: 500; opacity: .82; }
.brand-sub {
  color: var(--muted);
  font: 400 9px/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Banner：纹理底 + 浅色毛玻璃面板 + 橙色细边 */
.hero-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 86% 12%, rgba(248,173,85,.55), transparent 34%),
    radial-gradient(circle at 8% 92%, rgba(239,122,69,.30), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255,242,228,.70), transparent 70%),
    repeating-linear-gradient(0deg, rgba(120,76,38,.045) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(120,76,38,.045) 0 1px, transparent 1px 30px),
    #fff2e4;
}
.hero-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}
.hero {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.72);
  background: var(--hero-panel);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 18px 40px rgba(120,76,38,.12);
}
.hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 18px 0 0 18px;
  background: linear-gradient(180deg, var(--cta-2), var(--cta));
}
.hero h1 { color: var(--ink); text-shadow: none; }
.hero-art {
  border-color: rgba(255,255,255,.75);
  box-shadow: 0 0 0 18px rgba(255,255,255,.22), 0 0 0 38px rgba(255,255,255,.10);
}
.hero-art::before, .hero-art::after {
  border-color: rgba(255,255,255,.75);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 12px 26px rgba(120,76,38,.14);
}
.hero-art::before { background: rgba(242,200,154,.38); }
.hero-art::after { background: linear-gradient(150deg, rgba(255,255,255,.72), rgba(255,246,232,.34) 60%); }

/* 每日金句：浅色编辑式引文卡 */
.home-quote {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 0;
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dedfd5;
  border-radius: 18px;
  background: #fffefa;
  box-shadow: 0 10px 30px rgba(120,76,38,.10);
  color: var(--ink);
}
.home-quote-rail {
  display: flex;
  justify-content: center;
  padding-top: 24px;
  border-right: 1px solid #dedfd5;
  background: linear-gradient(180deg, #fff2e4, #ffe3c2);
}
.home-quote-glyph {
  color: var(--cta);
  opacity: .32;
  font: 400 72px/1 var(--serif);
}
.home-quote-body { min-width: 0; padding: 28px 32px 24px; }
.home-quote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 0;
  border-bottom: 0;
}
.home-quote-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cta);
  font: 700 12px/1.4 var(--sans);
  letter-spacing: .08em;
}
.home-quote-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--cta);
}
.home-quote-date {
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff2e4;
  color: var(--muted);
  font: 400 12px/1.4 var(--sans);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.home-quote-subject {
  margin-top: 20px;
  color: var(--muted);
  font: 400 14px/1.6 var(--sans);
}
.home-quote-passage {
  max-width: 46ch;
  margin-top: 8px;
  padding-left: 0;
  border-left: 0;
  color: var(--ink);
  font: 600 22px/1.65 var(--serif);
}
.home-quote-summary {
  max-width: 70ch;
  margin-top: 16px;
  color: var(--muted);
  font: 400 14px/1.7 var(--sans);
}
.home-quote .daily-source {
  margin-top: 24px;
  padding-top: 16px;
  border-color: #dedfd5;
  color: var(--muted);
  font-size: 12px;
}
.home-quote .daily-source a, .home-quote-retry { color: var(--cta); }
.home-quote .daily-source a { min-height: 44px; }
.home-quote :focus-visible { outline-color: var(--cta); }
.home-quote-state { color: var(--muted); }
.home-quote-retry { border-color: rgba(239,122,69,.35); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.planner { display: grid; gap: 12px; margin-top: 20px; }
.planner > h2 { font-size: 21px; }
.planner-grid, .composition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.planner-group.card { min-width: 0; margin: 0; }
.planner-group .section-title h3 { font-size: 17px; }
.planner-list { display: grid; gap: 4px; margin: 0 0 12px; padding: 0; list-style: none; }
.planner-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.planner-list li:not(.planner-empty) { border-bottom: 1px solid var(--line); }
.planner-list label { display: flex; align-items: center; flex: 1 1 auto; gap: 10px; min-height: 44px; }
.planner-list input[type="checkbox"] { flex: none; width: 18px; min-height: 0; height: 18px; margin: 0; accent-color: var(--green); }
.planner-list input:checked + span { color: var(--muted); text-decoration: line-through; }
.planner-list .btn, .planner-empty { color: var(--muted); font-size: 13px; }
.planner-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.planner-form .error { grid-column: 1 / -1; }

.composition-grid { margin-top: 16px; }
.composition-track { display: grid; align-content: start; gap: 9px; }
.composition-track > h2 { font-size: 19px; }
.composition-track .daily-summary { display: block; }
.composition-instructions { margin: 15px 0; padding-block: 12px; border-top: 1px solid var(--line); }
.composition-instructions h2 { font-size: 18px; }
.composition-instructions ol { margin: 7px 0 0; padding-left: 1.5em; }

.materials-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(228px, 28%); align-items: start; gap: 18px; }
.materials-main { min-width: 0; }
.materials-main .daily-filters { align-items: end; margin-bottom: 10px; }
.materials-main .daily-filters label { flex: 1 1 136px; min-width: 0; }
.materials-main .daily-filters .material-search { flex-basis: 180px; }
.materials-main .daily-filters .error { flex: 1 1 100%; }
.materials-main .daily-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.materials-main .daily-count { margin: 0 0 8px; }
.materials-main .daily-reading-bar .button-row { margin: 0; }
.materials-main .btn[aria-pressed="true"] { background: var(--soft-green); color: var(--green); }
.materials-quote.home-quote { grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
.materials-quote .home-quote-body { padding: 20px; }
.home-quote-body h2 { font-size: 18px; }
.materials-quote .home-quote-passage { font-size: 18px; }
.saved-excerpt { padding: 8px 10px; border-left: 2px solid var(--cta); background: #fff3e5; }
.saved-excerpt span { color: var(--green); font-size: 12px; font-weight: 700; }
.saved-excerpt p, .excerpt-edit blockquote { white-space: pre-wrap; }
.daily-card .excerpt-edit { padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.excerpt-edit blockquote { max-height: 9rem; overflow: auto; color: var(--muted); font-size: 13px; }
.excerpt-edit .btn { justify-self: start; }

.paper-section #past-paper-practice { margin-top: 14px; }
.task-answer, .task-report { display: grid; gap: 8px; padding: clamp(12px, 2vw, 20px); border: 1px solid var(--line); border-radius: 12px; }
.task-timer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; color: var(--muted); font-size: 13px; }
.task-timer output { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.task-timer .btn[aria-pressed="true"] { color: var(--green); }
.task-report { margin-top: 12px; }
.task-report h2 { font-size: 18px; }
.practice-reference { margin-top: 14px; }
.practice-reference > div { display: grid; gap: 8px; }
.practice-reference h3 { font-size: 16px; }
.practice-reference ol { margin: 0; padding-inline-start: 1.5em; }
.practice-score ul { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; }
.photo-recognition #photo-task { max-width: 200px; }

@media (max-width: 700px) {
  .materials-layout, .planner-grid, .composition-grid { grid-template-columns: minmax(0, 1fr); }
  .materials-quote.home-quote { grid-row: 1; margin-top: 12px; }
}

@media (max-width: 767px) {
  .brand-sub { display: none; }
  .brand-title { font-size: 14px; }
  .hero-shell { border-radius: 19px; }
  .home-quote { grid-template-columns: 1fr; }
  .home-quote-rail { display: none; }
  .home-quote-body { padding: 24px; }
  .home-quote-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .home-quote-passage {
    position: relative;
    padding-left: 20px;
    font-size: 20px;
  }
  .home-quote-passage::before {
    content: "“";
    position: absolute;
    left: 0;
    top: -4px;
    color: var(--cta);
    opacity: .5;
    font-family: var(--serif);
  }
}
