/* Custom presentation layer, GPL-3.0. Upstream styles.css is unchanged. */
@font-face {
  font-family: "Study WenKai";
  src: url("./fonts/study-wenkai-titles.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root { --study-brand-font: "Study WenKai", "Kaiti SC", "KaiTi", "Yu Mincho", serif; }
#exam-card[hidden] { display: none !important; }
.brand b, .app-splash-title, #home-version-label { font-family: var(--study-brand-font); font-weight: 400; }
.brand b { font-size: 20px; line-height: 1.4; letter-spacing: .01em; }
.brand img { border-radius: 14px; }
.app-splash-title { font-size: 30px; }
.topbar .kicker { letter-spacing: .08em; }
.kicker { text-transform: none; }
.study-file-picker {
  position: relative; display: flex; align-items: center; gap: 10px;
  min-width: 0; min-height: 44px; padding: 6px 10px;
  border: 1px solid #dce4f0; border-radius: 12px; background: #fff;
}
.study-file-button {
  flex-shrink: 0; padding: 5px 9px; border-radius: 7px;
  background: #eef3fc; color: #426bb0; font-size: 13px;
}
.study-file-name {
  min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: #64748b; font-size: 13px; font-weight: 400;
}
.study-file-picker input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  padding: 0; opacity: 0; cursor: pointer;
}
.study-file-picker:focus-within { outline: 2px solid #709ae5; outline-offset: 2px; }
.study-legacy-import > summary { cursor: pointer; font-weight: 700; color: #476caa; }
.study-legacy-import[open] > summary { margin-bottom: 14px; }
.study-legacy-import > label { display: block; margin: 12px 0; }
.study-legacy-import .study-import-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.7; }
.study-legacy-import .study-import-check input { width: auto; flex-shrink: 0; margin-top: 5px; }
.study-legacy-import td { overflow-wrap: anywhere; }
.study-legacy-import .study-import-error { color: #a44e32; }
.study-source-note { margin-top: 8px; font-size: 12px; color: #8d613c; }
.study-source-note summary { cursor: pointer; }
.study-source-note p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.study-exam-review-panel { margin: 14px 0; padding: 14px; border: 1px solid #dfd9bd; border-radius: 14px; background: #fffcf3; }
.study-exam-review-panel > summary { cursor: pointer; font-weight: 600; color: #76602d; }
.study-exam-review-question { padding: 16px 0; border-top: 1px solid #e9e2cc; overflow-wrap: anywhere; }
.study-exam-review-question h4 { margin: 0 0 6px; }
.study-exam-review-question .question-title { font-size: 15px; }
.study-exam-review-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.study-exam-review-answers > div { padding: 10px; border: 1px solid #e7e9ee; border-radius: 10px; background: #fff; min-width: 0; overflow-wrap: anywhere; }
.study-exam-review-answers b { display: block; margin-bottom: 6px; }
.study-exam-review-actions { margin: 12px 0; padding: 12px; border-radius: 12px; background: #fff8e7; color: #725a25; }
.study-exam-review-actions p, .study-exam-review-note { margin: 6px 0; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.study-exam-review-actions .actions { flex-wrap: wrap; margin-bottom: 0; }
@media (max-width: 1000px) { .study-exam-review-answers { grid-template-columns: minmax(0, 1fr); } }
.study-range-control { display: grid; gap: 6px; min-width: 0; }
.study-range-control[hidden], .study-range-preview[hidden] { display: none; }
#practice-number-basis-v1 { min-width: 0; width: 100%; height: 32px; padding-block: 4px; font-size: 12px; }
.study-range-preview { white-space: pre-line; overflow-wrap: anywhere; font-size: 13px; line-height: 1.8; }
.study-daily-summary { color: #45617f; line-height: 1.7; font-size: 14px; }
#dashboard .dashboard-lower-grid { align-items: start; }
.study-daily-rule { margin-top: 12px; color: #64748b; font-size: 12px; }
.study-daily-rule > summary { cursor: pointer; line-height: 1.7; }
.study-daily-bank { border-top: 1px solid #e4ebf4; padding: 10px 0; min-width: 0; }
.study-daily-bank > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; cursor: pointer; color: #476caa; font-size: 14px; }
.study-daily-bank > summary > span { min-width: 0; overflow-wrap: anywhere; }
.study-daily-bank > summary > span::before { content: "▸ "; }
.study-daily-bank[open] > summary > span::before { content: "▾ "; }
.study-daily-bank > summary > small { flex-shrink: 0; color: #64748b; }
.study-daily-bank ul { list-style: none; margin: 12px 0; padding: 0; }
.study-daily-bank li { padding: 10px 0; border-bottom: 1px dashed #e4ebf4; overflow-wrap: anywhere; }
.study-daily-bank li p { margin: 6px 0; color: #42536b; font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.study-daily-bank li small, .study-daily-question-meta { color: #64748b; font-size: 12px; line-height: 1.7; }
.study-daily-question-meta { display: flex; gap: 6px 12px; flex-wrap: wrap; }
.study-daily-note { font-size: 12px; line-height: 1.8; }
.study-daily-bank button[hidden] { display: none; }
.study-practice-memory {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin: 0 0 16px; padding: 14px 18px; border: 1px solid #d8e7f9;
  border-radius: 16px; background: #f5f9ff; color: #45617f;
}
.study-practice-memory[hidden], .study-practice-reminder[hidden] { display: none; }
.study-practice-memory p { margin: 5px 0 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.study-practice-memory .actions { flex-shrink: 0; flex-wrap: wrap; margin: 0; }
.study-practice-memory.is-error { border-color: #edc0ac; background: #fff7f1; color: #8f4b30; }
.study-practice-status { margin: 0 0 12px; font-size: 12px; line-height: 1.6; color: #56816c; }
.study-practice-status.is-error { color: #a54b31; }
.study-practice-status button { margin-left: 8px; }
.study-practice-reminder { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 20px; background: #263a5766; }
.study-practice-reminder section { width: min(100%, 520px); padding: 28px; border-radius: 24px; background: #fff; box-shadow: 0 20px 80px #203b5e33; }
.study-practice-reminder h2 { margin-top: 0; font-size: 21px; }
@media (max-width: 1100px) { .study-practice-memory { flex-direction: column; align-items: stretch; } }
.study-local-badge {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  color: #56677d; border: 1px solid #e0e8f3; border-radius: 999px;
  padding: 6px 11px; font-size: 12px; background: #f9fbff; line-height: 1.4;
}
.study-local-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #65b19c; }
.study-origin-note {
  margin: 0 0 18px; padding: 12px 16px; border: 1px solid #e0e8f3; border-radius: 14px;
  background: #ffffffbf; color: #64748b; font-size: 13px; line-height: 1.7;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.study-origin-note b { color: #3e5272; font-weight: 600; }
.study-origin-note a { color: #567aba; text-decoration: none; white-space: nowrap; }
.study-origin-note a:hover { text-decoration: underline; }
.study-side-footer { margin-top: auto; padding: 18px 10px 4px; color: #8492a7; font-size: 12px; line-height: 1.8; }
.study-side-footer a { color: #647ca0; text-decoration: none; }
.study-side-footer a:hover { text-decoration: underline; }
body.side-collapsed .study-side-footer { display: none; }
#home-version-label { font-size: clamp(30px, 3vw, 45px); line-height: 1.45; }
.study-about { max-width: 860px; margin: 48px auto; padding: 0 24px 48px; font-family: system-ui, "Microsoft YaHei", sans-serif; color: #36465e; line-height: 1.85; }
.study-about h1 { font-family: var(--study-brand-font); font-size: 38px; font-weight: 400; }
.study-about h2 { margin-top: 32px; font-size: 20px; }
.study-about a { color: #426bb0; }
.study-about code { overflow-wrap: anywhere; background: #eaf0fa; padding: 2px 5px; border-radius: 4px; font-size: .9em; }
.study-about .study-card { padding: 24px; border: 1px solid #dfe7f2; border-radius: 20px; background: #fff; margin: 20px 0; }
@media (max-width: 900px) {
  .study-origin-note { align-items: flex-start; flex-direction: column; gap: 5px; }
  .study-side-footer { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app-splash-dots span { animation: none; }
}
.study-wrong-item .section-head { align-items: flex-start; flex-wrap: wrap; }
.study-wrong-item .section-head > div:first-child { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.study-wrong-item .row-actions { flex-wrap: wrap; }
.study-wrong-help, .study-wrong-latest { line-height: 1.7; overflow-wrap: anywhere; }
.study-wrong-evidence { border-top: 1px solid #e3eafa; padding-top: 10px; }
.study-wrong-evidence > summary { cursor: pointer; color: #476caa; font-size: 14px; }
.study-wrong-evidence [data-wrong-evidence-body] { margin-top: 12px; overflow-wrap: anywhere; }
.study-wrong-raw pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; padding: 10px; background: #f6f8fe; border-radius: 10px; }
.study-wrong-options { padding: 0; list-style: none; display: grid; gap: 8px; }
.study-wrong-options li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid #e1e9fa; border-radius: 12px; }
.study-wrong-options li > div { min-width: 0; flex: 1; }
.study-wrong-answer, .study-wrong-analysis { margin-top: 12px; line-height: 1.8; }
.study-wrong-analysis > b { display: block; margin-bottom: 6px; }
