:root {
  --ink: #281d1a;
  --wine: #8a201d;
  --wine-deep: #5d1413;
  --paper: #f7f1e7;
  --cream: #fffaf1;
  --gold: #c79642;
  --sage: #66806f;
  --line: rgba(88, 53, 41, 0.17);
}

* { box-sizing: border-box; }
html { background: #efe7da; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei", serif;
  background: radial-gradient(circle at 15% 8%, rgba(199, 150, 66, 0.15), transparent 31rem), linear-gradient(145deg, #f7f0e5 0%, #eee2d1 100%);
}
button, input, textarea, select { font: inherit; }
.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  grid-template-rows: 1fr auto;
  gap: 4.5rem;
  align-items: center;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 28px;
}
.intro-panel { max-width: 610px; }
.eyebrow { display: inline-flex; align-items: center; gap: .65rem; color: var(--wine); font: 700 .78rem/1.2 "Microsoft YaHei", sans-serif; letter-spacing: .2em; }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--gold); }
.brand-mark { width: 58px; height: 58px; margin: 30px 0 22px; display: grid; place-items: center; color: #fffaf2; background: var(--wine); border-radius: 50% 50% 47% 53%; box-shadow: inset 0 0 0 5px rgba(255,255,255,.12), 0 14px 35px rgba(93,20,19,.2); transform: rotate(-4deg); }
.brand-mark span { font-size: 1.55rem; transform: rotate(4deg); }
h1 { margin: 0; font-size: clamp(3rem, 5.5vw, 5rem); line-height: 1.03; letter-spacing: -.06em; color: var(--wine-deep); }
.lead { margin: 24px 0 32px; max-width: 560px; font-size: 1.07rem; line-height: 1.9; color: #61524c; }
.journey { display: flex; align-items: center; gap: 14px; }
.journey div { display: grid; gap: 5px; }
.journey b { color: var(--gold); font: 700 .72rem/1 "Microsoft YaHei", sans-serif; letter-spacing: .12em; }
.journey span { font-size: .9rem; white-space: nowrap; }
.journey i { width: 44px; height: 1px; background: var(--line); }
.entry-card { position: relative; padding: 36px; background: rgba(255,250,241,.87); border: 1px solid rgba(114,67,47,.12); border-radius: 26px 8px 26px 8px; box-shadow: 0 24px 70px rgba(76, 47, 35, .14); backdrop-filter: blur(12px); }
.entry-card::before { content: ""; position: absolute; inset: 10px; pointer-events: none; border: 1px solid rgba(199,150,66,.23); border-radius: 19px 5px 19px 5px; }
.card-topline { position: relative; display: flex; justify-content: space-between; align-items: center; color: var(--wine); font-size: .85rem; }
.privacy-pill { padding: 6px 10px; border-radius: 999px; color: var(--sage); background: rgba(102,128,111,.11); font-family: "Microsoft YaHei", sans-serif; font-size: .72rem; }
.entry-card h2 { position: relative; margin: 27px 0 8px; color: var(--ink); font-size: 1.55rem; }
.muted { position: relative; margin: 0 0 24px; color: #82736d; font-size: .9rem; }
.entry-form { position: relative; display: grid; gap: 17px; }
.entry-form label { display: grid; gap: 8px; color: #584741; font: 600 .82rem/1.2 "Microsoft YaHei", sans-serif; }
.entry-form input { width: 100%; padding: 14px 15px; border: 1px solid var(--line); border-radius: 10px 4px 10px 4px; outline: none; background: rgba(255,255,255,.72); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.entry-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199,150,66,.12); }
.entry-form button { margin-top: 5px; border: 0; border-radius: 10px 4px 10px 4px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; color: #fffaf1; background: var(--wine); cursor: pointer; box-shadow: 0 10px 22px rgba(138,32,29,.2); }
.entry-form button:hover { background: var(--wine-deep); }
.entry-form input[readonly] { color: #806e66; background: rgba(128,112,103,.08); }
.form-error { padding: 11px 13px; color: #8a201d; background: rgba(138,32,29,.08); border-left: 3px solid var(--wine); border-radius: 4px; font: .82rem/1.5 "Microsoft YaHei", sans-serif; }
.help-note { position: relative; display: flex; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.help-note > span { flex: 0 0 20px; width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font: italic 700 .72rem Georgia, serif; }
.help-note p { margin: 0; color: #81726c; font: .75rem/1.65 "Microsoft YaHei", sans-serif; }
footer { grid-column: 1 / -1; text-align: center; color: #9a8981; font: .72rem/1.5 "Microsoft YaHei", sans-serif; letter-spacing: .06em; }

.focused-shell { min-height: 100vh; width: min(100% - 30px, 470px); margin: 0 auto; padding: 42px 0 26px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.mini-brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--wine-deep); text-decoration: none; font-weight: 700; }
.mini-brand > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--cream); background: var(--wine); }
.direct-card h1 { margin: 26px 0 9px; font-size: 2rem; letter-spacing: -.04em; }
.standalone-note { margin: 0; color: #887871; text-align: center; font: .78rem/1.6 "Microsoft YaHei", sans-serif; }

.archive-shell, .admin-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 38px; }
.archive-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.text-button { border: 0; padding: 7px 10px; color: #75645d; background: transparent; text-decoration: none; cursor: pointer; font: .78rem/1.2 "Microsoft YaHei", sans-serif; }
.text-button:hover { color: var(--wine); }
.welcome-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 48px 0 30px; }
.welcome-row .eyebrow, .admin-title .eyebrow { margin: 0 0 10px; font-size: .68rem; }
.welcome-row h1, .admin-title h1 { margin: 0; color: var(--wine-deep); font-size: clamp(2.4rem, 5vw, 4.4rem); letter-spacing: -.055em; }
.welcome-row h1 small { display: block; margin-top: 11px; color: #796961; font: 400 .85rem/1.4 "Microsoft YaHei", sans-serif; letter-spacing: .02em; }
.success-banner { margin-bottom: 20px; padding: 13px 16px; color: #426250; background: rgba(102,128,111,.12); border: 1px solid rgba(102,128,111,.2); border-radius: 10px; font: .85rem/1.5 "Microsoft YaHei", sans-serif; }
.summary-card, .content-card { background: rgba(255,250,241,.86); border: 1px solid rgba(114,67,47,.12); box-shadow: 0 16px 40px rgba(76,47,35,.08); }
.summary-card { min-height: 250px; padding: 26px; border-radius: 18px 6px 18px 6px; display: flex; flex-direction: column; }
.summary-card > span, .section-heading span { color: var(--gold); font: 700 .72rem/1.2 "Microsoft YaHei", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.summary-card > strong { margin: 22px 0 13px; color: var(--wine-deep); font-size: 2rem; line-height: 1.1; }
.summary-card p { margin: 0; color: #776760; font: .8rem/1.75 "Microsoft YaHei", sans-serif; }
.score-card > strong { margin-top: auto; font-size: clamp(2rem, 4vw, 3.2rem); }
.exam-section { margin-top: 18px; }
.exam-heading { padding: 0 4px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.exam-heading > div { display: flex; align-items: center; gap: 12px; }
.exam-index { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: var(--cream); background: var(--wine); border-radius: 12px 3px 12px 3px; font: 700 .75rem/1 Georgia, serif; letter-spacing: .06em; }
.exam-heading p { margin: 0; color: #8a7870; font: .74rem/1.55 "Microsoft YaHei", sans-serif; letter-spacing: .03em; }
.exam-heading > div p { color: var(--gold); font-size: .64rem; font-weight: 700; letter-spacing: .12em; }
.exam-heading h2 { margin: 3px 0 0; color: var(--wine-deep); font-size: 1.45rem; line-height: 1.15; }
.exam-grid { display: grid; grid-template-columns: .82fr 1.08fr 1.1fr; gap: 16px; }
.exam-secondary { margin-top: 34px; padding-top: 25px; border-top: 1px solid rgba(114,67,47,.14); }
.exam-secondary .exam-index { color: var(--wine); background: rgba(138,32,29,.09); border: 1px solid rgba(138,32,29,.13); }
.exam-secondary .summary-card { min-height: 220px; background: rgba(255,250,241,.58); border-style: dashed; box-shadow: none; }
.pending-card > strong { color: #9a8880; }
.download-button { margin-top: auto; padding: 11px 13px; display: flex; justify-content: space-between; align-items: center; border-radius: 8px 3px 8px 3px; color: var(--cream); background: var(--wine); text-decoration: none; font: 600 .8rem/1.3 "Microsoft YaHei", sans-serif; }
.download-button.secondary { color: var(--wine); background: rgba(138,32,29,.08); }
.benchmark-line { margin: 22px 0 15px; display: flex; align-items: center; gap: 10px; color: var(--wine-deep); }
.benchmark-line b { font-size: 1.8rem; }
.benchmark-line i { flex: 1; height: 1px; background: linear-gradient(to right, var(--gold), rgba(199,150,66,.2)); }
.pending-line { color: #9a8880; }
.content-card { margin-top: 18px; padding: 32px; border-radius: 20px 7px 20px 7px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 26px; }
.section-heading h2 { margin: 8px 0 0; color: var(--wine-deep); font-size: 1.55rem; }
.section-heading > p { max-width: 380px; margin: 0; color: #85756e; text-align: right; font: .78rem/1.6 "Microsoft YaHei", sans-serif; }
.english-support-card { background: linear-gradient(145deg, rgba(255,250,241,.9), rgba(239,231,210,.7)); }
.english-support-grid { display: grid; grid-template-columns: .72fr .82fr 1.46fr; gap: 0; border: 1px solid rgba(114,67,47,.1); border-radius: 14px 4px 14px 4px; overflow: hidden; }
.english-metric, .english-support-note { min-height: 118px; padding: 21px 24px; display: flex; flex-direction: column; justify-content: center; }
.english-metric { border-right: 1px solid rgba(114,67,47,.1); }
.english-metric span, .english-support-note span { color: var(--gold); font: 700 .68rem/1.2 "Microsoft YaHei", sans-serif; letter-spacing: .12em; }
.english-metric strong { margin-top: 10px; color: var(--wine-deep); font-size: 1.75rem; line-height: 1.1; }
.english-metric small { margin-top: 6px; color: #8c7c74; font: .72rem/1.4 "Microsoft YaHei", sans-serif; }
.english-support-note p { margin: 10px 0 0; color: #776760; font: .8rem/1.7 "Microsoft YaHei", sans-serif; }
.section-heading > b { color: var(--wine); font-size: 1.35rem; }
.upload-form { display: grid; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.form-grid label { display: grid; gap: 7px; color: #5f4f48; font: 600 .75rem/1.2 "Microsoft YaHei", sans-serif; }
.form-grid .wide { grid-column: span 2; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px 3px 8px 3px; outline: 0; color: var(--ink); background: rgba(255,255,255,.7); }
.form-grid textarea { resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199,150,66,.1); }
.file-zone { position: relative; min-height: 135px; padding: 20px; border: 1px dashed rgba(138,32,29,.33); border-radius: 14px 4px 14px 4px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--wine); text-align: center; background: rgba(138,32,29,.025); cursor: pointer; }
.file-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-zone .file-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--cream); background: var(--wine); font: 300 1.3rem/1 sans-serif; }
.file-zone b { font-size: .9rem; }
.file-zone small { color: #8a7871; font: .72rem/1.4 "Microsoft YaHei", sans-serif; }
.consent { display: flex; align-items: flex-start; gap: 9px; color: #796962; font: .74rem/1.6 "Microsoft YaHei", sans-serif; }
.consent input { margin-top: 4px; accent-color: var(--wine); }
.form-status { margin: 0; padding: 10px 12px; color: var(--wine); background: rgba(138,32,29,.07); border-radius: 7px; font: .78rem/1.5 "Microsoft YaHei", sans-serif; }
.form-status.busy { color: #566e5e; background: rgba(102,128,111,.1); }
.primary-button { justify-self: end; min-width: 220px; padding: 13px 16px; border: 0; border-radius: 9px 3px 9px 3px; display: flex; justify-content: space-between; color: var(--cream); background: var(--wine); cursor: pointer; box-shadow: 0 8px 18px rgba(138,32,29,.17); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.history-card { margin-bottom: 28px; }
.progress-card { margin-bottom: 0; }
.progress-list { display: grid; }
.progress-list article { display: grid; grid-template-columns: 130px 1fr 120px; gap: 20px; align-items: center; padding: 17px 0; border-top: 1px solid var(--line); }
.progress-list article:first-child { border-top: 0; }
.progress-date, .progress-detail, .progress-rank { display: grid; gap: 5px; }
.progress-date b, .progress-rank b { color: var(--wine); }
.progress-date span, .progress-detail span, .progress-detail small, .progress-rank span { color: #897971; font: .72rem/1.45 "Microsoft YaHei", sans-serif; }
.progress-detail strong { font-size: .88rem; }
.progress-rank { text-align: right; }
.history-list { display: grid; }
.history-list article { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 0; border-top: 1px solid var(--line); }
.history-list article div { display: grid; gap: 5px; }
.history-list strong { font-size: .9rem; }
.history-list span { color: #897971; font: .72rem/1.4 "Microsoft YaHei", sans-serif; }
.history-list article > b { color: var(--wine); }
.empty-state { padding: 35px; display: grid; place-items: center; gap: 8px; border: 1px dashed var(--line); color: #927f77; text-align: center; }
.empty-state span { font-size: 1.8rem; color: var(--gold); }
.empty-state p { margin: 0; font: .8rem/1.6 "Microsoft YaHei", sans-serif; }

.admin-login { width: min(100% - 30px, 520px); }
.admin-actions { display: flex; gap: 8px; align-items: center; }
.admin-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; padding: 46px 0 28px; }
.admin-title h1 { font-size: 3rem; }
.admin-title > div > p:last-child { color: #817169; font: .82rem/1.6 "Microsoft YaHei", sans-serif; }
.admin-stats { display: flex; gap: 11px; }
.admin-stats span { min-width: 90px; padding: 13px; display: grid; gap: 3px; text-align: center; color: #7d6c65; background: rgba(255,250,241,.7); border: 1px solid var(--line); border-radius: 10px 3px 10px 3px; font: .7rem/1.3 "Microsoft YaHei", sans-serif; }
.admin-stats b { color: var(--wine); font-size: 1.25rem; }
.admin-table-wrap { overflow-x: auto; background: rgba(255,250,241,.88); border: 1px solid var(--line); border-radius: 15px 5px 15px 5px; box-shadow: 0 18px 45px rgba(76,47,35,.08); }
.admin-table { width: 100%; min-width: 900px; border-collapse: collapse; font: .76rem/1.45 "Microsoft YaHei", sans-serif; }
.admin-progress-card { margin-top: 0; }
.progress-form { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; align-items: end; }
.progress-form label { display: grid; gap: 7px; color: #5f4f48; font: 600 .75rem/1.2 "Microsoft YaHei", sans-serif; }
.progress-form input, .progress-form select, .progress-form textarea { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px 3px 8px 3px; background: rgba(255,255,255,.72); }
.progress-form .progress-notes { grid-column: span 4; }
.admin-progress-history { margin-bottom: 18px; }
.admin-table th { padding: 13px 15px; color: #8b776e; text-align: left; background: rgba(138,32,29,.035); font-size: .7rem; }
.admin-table td { padding: 14px 15px; border-top: 1px solid var(--line); vertical-align: top; }
.admin-table td b, .admin-table td span { display: block; }
.admin-table td span { margin-top: 4px; color: #8d7b73; font-size: .7rem; }
.admin-table .repeat-row td { border-top-style: dashed; }
.tag { width: fit-content; padding: 4px 7px; border-radius: 999px; background: rgba(138,32,29,.08); color: var(--wine) !important; }
.tag.ready { color: #4b6b57 !important; background: rgba(102,128,111,.12); }
.quiet { color: #a08f88 !important; }
.file-links { display: grid; gap: 5px; }
.file-links a { max-width: 240px; color: var(--wine); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 760px) {
  .site-shell { width: min(100% - 28px, 520px); grid-template-columns: 1fr; gap: 30px; padding: 34px 0 22px; }
  .intro-panel { text-align: center; }
  .eyebrow { justify-content: center; }
  .brand-mark { margin: 22px auto 18px; }
  h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .lead { margin: 18px auto 24px; font-size: .96rem; line-height: 1.8; }
  .journey { justify-content: center; gap: 10px; }
  .journey i { width: 20px; }
  .entry-card { padding: 28px 24px; }
  footer { margin-top: 4px; }
  .focused-shell { justify-content: flex-start; }
  .archive-shell, .admin-shell { width: min(100% - 26px, 560px); padding-top: 20px; }
  .welcome-row { padding: 34px 0 22px; }
  .welcome-row h1 { font-size: 2.8rem; }
  .exam-heading { display: grid; align-items: start; }
  .exam-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 220px; }
  .english-support-grid { grid-template-columns: 1fr; }
  .english-metric { border-right: 0; border-bottom: 1px solid rgba(114,67,47,.1); }
  .content-card { padding: 24px 18px; }
  .section-heading { display: grid; align-items: start; }
  .section-heading > p { text-align: left; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .wide { grid-column: 1 / -1; }
  .primary-button { width: 100%; min-width: 0; }
  .admin-title { display: grid; align-items: start; }
  .admin-title h1 { font-size: 2.5rem; }
  .admin-stats { width: 100%; }
  .admin-stats span { flex: 1; min-width: 0; }
  .admin-actions .text-button:first-child { display: none; }
  .progress-list article { grid-template-columns: 1fr; gap: 9px; }
  .progress-rank { text-align: left; }
  .progress-form { grid-template-columns: 1fr 1fr; }
  .progress-form .progress-notes { grid-column: 1 / -1; }
}

@media (min-width: 761px) and (max-width: 1040px) {
  .exam-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .journey span { font-size: .8rem; }
  .archive-header .mini-brand { font-size: .88rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .history-list article { align-items: flex-start; }
}
