/* 视觉层独立于既有业务样式，便于逐步上线和回退。侧栏图标来自 MIT 许可的 Tabler Icons。 */
:root {
  --ink: #14243e;
  --muted: #64748b;
  --line: #dce5f0;
  --bg: #f4f7fb;
  --blue: #1d64c8;
  --blue2: #164fa3;
  --green: #11967f;
  --shadow: 0 16px 42px rgba(27, 54, 94, .075);
}

/* Grade feedback appears only after practice checking or exam submission. */
#examDialog .analysis.exam-feedback { padding: 0; border: 1px solid #dce7f2; border-radius: 11px; background: #fff; overflow: hidden; }
.answer-result-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; border-bottom: 1px solid #e5edf5; background: #f9fbfd; }
.answer-result-values { display: grid; gap: 10px; margin: 0; }
.answer-result-values > div { display: flex; align-items: baseline; gap: 14px; }
.answer-result-values dt { min-width: 64px; color: #546e89; font-size: 14px; line-height: 1.6; }
.answer-result-values dd { margin: 0; overflow-wrap: anywhere; font-size: 18px; line-height: 1.6; font-weight: 800; letter-spacing: 2px; }
.answer-result-values .correct-answer,
.answer-result-values .my-answer.correct { color: #159a6d; }
.answer-result-values .my-answer.wrong { color: #df3e4d; }
.answer-result-values .my-answer.unanswered { color: #8292a7; font-size: 14px; letter-spacing: 0; }
.answer-result-badge { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 88px; }
.answer-result-icon { display: block; width: 76px; height: 70px; }
.answer-result-icon svg { display: block; width: 100%; height: 100%; }
.answer-result-badge strong { font-size: 13px; font-weight: 700; line-height: 1.6; }
.answer-result-badge.correct { color: #3b89c4; }
.answer-result-badge.wrong { color: #f51f2f; }
.answer-result-analysis { padding: 18px 22px; }
.answer-result-analysis > strong { display: block; margin-bottom: 9px; color: #205995; font-size: 14px; }
#examDialog .exam-options .option.correct-option { background: #e8f8ef; border-color: #51b88a; color: #157950; }
#examDialog .exam-options .option.wrong-option { background: #fff0ee; border-color: #e98080; color: #c23d49; }
#examDialog .exam-options .option.correct-option > span { background: #2eae7c; color: white; }
#examDialog .exam-options .option.wrong-option > span { background: #e15b66; color: white; }
@media(max-width: 800px) {
  .answer-result-top { gap: 10px; padding: 14px; }
  .answer-result-values { gap: 6px; }
  .answer-result-values > div { gap: 10px; }
  .answer-result-values dt { min-width: 60px; font-size: 13px; }
  .answer-result-values dd { font-size: 17px; }
  .answer-result-badge { min-width: 62px; }
  .answer-result-icon { width: 64px; height: 58px; }
  .answer-result-badge strong { font-size: 12px; }
  .answer-result-analysis { padding: 14px; }
}

body {
  background: radial-gradient(circle at 85% 0, #eaf2ff 0, transparent 34%), var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.logged-out #app, .logged-out .topbar { display: none !important; }
.logged-out { min-height: 100vh; background: radial-gradient(circle at 18% 10%, #dcecff, transparent 36%), #f4f7fb; }

button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:is(button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(29, 100, 200, .28);
  outline-offset: 2px;
}

.topbar {
  height: 76px;
  padding: 0 max(24px, calc((100vw - 1360px) / 2));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom-color: #e6edf5;
  box-shadow: 0 2px 16px rgba(25, 51, 86, .035);
}
.brand { gap: 12px; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, #17519d, #2784d8);
  box-shadow: 0 6px 15px rgba(30, 101, 194, .23);
  font-size: 21px;
}
.brand strong { font-size: 18px; letter-spacing: .02em; }
.brand small { font-size: 11px; letter-spacing: .04em; }
nav { gap: 8px; }
.nav-btn {
  height: 42px;
  padding: 0 19px;
  border-radius: 10px;
  color: #52647d;
  font-weight: 650;
  transition: background .18s, color .18s;
}
.nav-btn:hover { background: #f2f6fc; color: var(--blue); }
.nav-btn.active { background: #eaf2fe; color: #175bb6; }
.nav-btn.active:after { display: none; }
.profile { padding: 7px 7px 7px 13px; border-radius: 24px; color: #40536f; }
.profile:hover { background: #f1f5fb; }
.avatar { width: 36px; height: 36px; background: #e4efff; color: #1859ae; }

.coursebar, .workspace { max-width: 1360px; }
.coursebar {
  margin: 24px auto 18px;
  padding: 16px 22px;
  border-color: #e1e9f3;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(27, 54, 94, .045);
}
.course-picker { gap: 18px; }
.course-picker strong { font-size: 16px; color: #162c4b; }
.course-picker:hover strong { color: var(--blue); }
.course-picker small, .period-status small { font-size: 12px; letter-spacing: .02em; }
.period-status { gap: 13px; }
.period-status.inactive .status-dot { background: #9faec1; box-shadow: 0 0 0 5px #edf1f6; }
.period-status.inactive strong { color: #60738b; }
.days[hidden] { display: none !important; }

.workspace { grid-template-columns: 238px minmax(0, 1fr); gap: 18px; }
.sidebar, .content {
  border-color: #e1e9f3;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(27, 54, 94, .045);
}
.sidebar { padding: 14px 11px; align-self: start; }
.side-title {
  margin: 0 4px 9px;
  padding: 11px 12px 15px;
  color: #7b8aa0;
  font-size: 12px;
  letter-spacing: .1em;
  border-bottom-color: #edf1f6;
}
.side-btn {
  min-height: 47px;
  padding: 11px 14px;
  border-radius: 10px;
  color: #42546d;
  font-weight: 600;
  transition: background .16s, color .16s, transform .16s;
}
.side-btn:hover { background: #f0f5fb; color: #1d5eae; transform: translateX(2px); }
.side-btn.active { background: #e9f1ff; color: #175bb6; }
.side-btn.secret.active { background: #fff4e8; color: #a65d13; }
.side-btn span.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  background-color: currentColor;
  color: #6f849d;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}
.side-btn.active .nav-icon { color: #1d64c8; }
.side-btn.secret.active .nav-icon { color: #a65d13; }
.icon-home { mask-image: url('./icons/home.svg'); }
.icon-book { mask-image: url('./icons/book-2.svg'); }
.icon-target { mask-image: url('./icons/target-arrow.svg'); }
.icon-paper { mask-image: url('./icons/clipboard-list.svg'); }
.icon-crown { mask-image: url('./icons/crown.svg'); }
.icon-review { mask-image: url('./icons/rotate-clockwise.svg'); }
.icon-star { mask-image: url('./icons/star.svg'); }
.package-card {
  margin: 22px 4px 3px;
  padding: 15px;
  border: 1px solid #e5edfa;
  border-radius: 12px;
  background: linear-gradient(145deg, #f4f8ff, #f9fbff);
}
.package-card strong { color: #204f88; font-size: 14px; }
.content { min-width: 0; min-height: 520px; padding: 26px; }

.empty {
  border-color: #d9e3ef;
  background: #fbfdff;
  color: #63758c;
}
.empty b { color: #1a304e; }
.empty-gate {
  min-height: 420px;
  padding: 72px 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 0, #ecf4ff, transparent 53%), #fbfdff;
}
.empty-gate .empty-symbol {
  width: 56px;
  height: 56px;
  margin-bottom: 5px;
  border-radius: 18px;
  background: #e4f0ff;
  position: relative;
}
.empty-gate .empty-symbol:after {
  content: '';
  position: absolute;
  inset: 15px;
  background: #2269bd;
  mask: url('./icons/lock-open.svg') center / contain no-repeat;
}
.empty-gate .eyebrow { letter-spacing: .08em; }
.empty-gate b { margin: 0; font-size: 24px; }
.empty-gate p { max-width: 470px; margin: 0 0 14px; line-height: 1.8; }
.empty-gate .primary { min-width: 146px; }

.stat, .tip, .panel, .list { border-color: #e0e8f2; border-radius: 12px; }
.stat { background: linear-gradient(160deg, #fff, #fafdff); }
.stat strong { font-variant-numeric: tabular-nums; }
.tip { background: #fff9ed; border-color: #f5e8c7; }
.section-head { margin-top: 16px; }
.section-head h1 { color: #172d4b; }
.list-head { background: #f5f8fc; }
.list-row { min-height: 67px; transition: background .16s; }
.list-row:hover { background: #f6faff; }
.icon-box { background: #e8f1fd; color: #1e65bc; }
.primary, .action {
  border-radius: 9px;
  background: #1d64c8;
  box-shadow: 0 4px 10px rgba(29, 100, 200, .14);
  transition: background .16s, transform .16s, box-shadow .16s;
}
.primary:hover, .action:hover {
  background: #164fa3;
  transform: translateY(-1px);
  box-shadow: 0 7px 15px rgba(29, 100, 200, .2);
}
.secondary { border-radius: 9px; }

.page-heading { margin-top: 44px; }
.page-heading h1 { color: #142b4a; }
.activation-layout { gap: 22px; }
.activation-card, .timeline-card { border-color: #e1e9f3; border-radius: 16px; }
.activation-card input, .activation-card select, .login-card input, .account-body form input {
  border-color: #d3deea;
  border-radius: 9px;
  transition: border-color .16s, box-shadow .16s;
}
:is(.activation-card, .login-card, .account-body) input:focus,
.activation-card select:focus {
  border-color: #4386d6;
  box-shadow: 0 0 0 3px rgba(29, 100, 200, .11);
  outline: 0;
}
.rule-note { background: #f0f6ff; }

dialog { border-radius: 17px; }
dialog::backdrop { background: rgba(14, 32, 57, .55); backdrop-filter: blur(4px); }
.login-dialog, .account-dialog { box-shadow: 0 24px 70px rgba(15, 38, 70, .26); }
.login-card { padding: 32px; }
.login-brand { margin-bottom: 27px; }
.auth-tabs { background: #eef3fa; }
.auth-tabs button.active { color: #155db8; }
.recovery-link { font-size: 13px; }
.account-body { padding: 24px; }
#accountEmailPanel { background: #f8fbff; }

.memorize-shell { background: #fcfbf7; }
.memorize-header { background: linear-gradient(105deg, #154b8d, #216ab5); }
.memorize-navigator { background: #f2f6fb; border-right-color: #dbe5f0; }
.memorize-nav-title { background: #f8fbff; }
.memorize-group h2 { color: #365a7f; }
.memorize-number-grid button { border-color: #bad0e6; border-radius: 7px; color: #275784; }
.memorize-number-grid button.current { background: #1d64c8; border-color: #1d64c8; box-shadow: 0 3px 9px rgba(29, 100, 200, .2); }
.memorize-main { background: #fcfbf7; }
.memorize-instruction { background: #fff; border-bottom-color: #e6eaf0; }
.memorize-question { max-width: 1100px; }
.memorize-option { border-color: #e6ebf1; border-radius: 10px; background: #fff; }
.memorize-option.correct { border-color: #a7dec5; background: #eaf8f0; }
.memorize-analysis { box-shadow: 0 5px 19px rgba(31, 70, 112, .06); }

@media (max-width: 1408px) {
  .coursebar, .workspace { margin-left: 24px; margin-right: 24px; }
}
@media (max-width: 900px) {
  .topbar { padding: 0 18px; }
  .workspace { grid-template-columns: 205px minmax(0, 1fr); gap: 12px; }
  .content { padding: 19px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tip { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .topbar { height: 64px; padding: 0 14px; }
  .brand-mark { width: 35px; height: 35px; font-size: 18px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .profile { display: flex; padding: 4px; }
  #profileName { display: none; }
  .avatar { width: 34px; height: 34px; }
  .nav-btn { height: 38px; padding: 0 9px; font-size: 13px; }
  .coursebar { margin: 12px 12px 10px; padding: 12px 14px; }
  .course-picker { min-width: 0; gap: 5px; }
  .course-picker strong { font-size: 13px; }
  .period-status { gap: 8px; }
  .period-status strong { font-size: 12px; }
  .workspace { display: block; margin: 0 12px 24px; }
  .sidebar { display: flex; overflow-x: auto; gap: 4px; margin-bottom: 10px; padding: 7px; }
  .side-btn { min-height: 40px; padding: 8px 11px; gap: 7px; }
  .side-btn:hover { transform: none; }
  .content { min-height: 0; padding: 15px; }
  .empty-gate { min-height: 370px; padding: 52px 18px; }
  .memorize-question { max-width: none; }
}
@media (max-width: 560px) {
  .topbar { gap: 4px; }
  .brand { gap: 6px; }
  .brand strong { font-size: 13px; }
  nav { gap: 1px; }
  .nav-btn { padding: 0 7px; font-size: 12px; }
  .course-picker { flex: 1; }
  .course-picker strong { max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .period-status .status-dot { display: none; }
  .period-status small { display: none; }
  .stats { gap: 7px; }
  .stat { padding: 10px; }
  .stat strong { font-size: 20px; }
  .stat span { font-size: 11px; }
  .empty-gate b { font-size: 21px; }
  .login-card { padding: 24px; }
}

/* 第二版视觉：更明确的品牌主视觉、任务卡与阅读层次。 */
:root {
  --ink: #102440;
  --muted: #718197;
  --line: #e4ebf3;
  --bg: #f3f6fa;
  --blue: #176bd0;
  --blue2: #1055ac;
  --green: #0a9a7b;
  --shadow: 0 16px 40px rgba(22, 47, 82, .06);
}
body { background: #f3f6fa; }
.topbar { box-shadow: none; border-bottom: 1px solid #e9eef4; }
.brand-mark { background: #11335f; box-shadow: 0 5px 14px rgba(17, 51, 95, .18); }
.nav-btn.active { color: #124b91; background: #eaf2fc; }

.coursebar {
  isolation: isolate;
  overflow: hidden;
  min-height: 199px;
  margin-top: 28px;
  margin-bottom: 22px;
  padding: 30px 40px;
  position: relative;
  background: radial-gradient(circle at 65% 0%, rgba(75, 163, 236, .28), transparent 34%), linear-gradient(108deg, #102947 0%, #123d70 57%, #175c9c 100%);
  border: 0;
  border-radius: 21px;
  box-shadow: 0 18px 40px rgba(20, 58, 103, .16);
  color: #fff;
}
.course-hero-copy { position: relative; z-index: 2; }
.hero-eyebrow { display: flex; align-items: center; gap: 9px; color: #b2d7f9; font-size: 10px; font-weight: 800; letter-spacing: .21em; }
.hero-eyebrow-line { display: block; width: 20px; height: 1px; background: #67c3e8; }
.course-picker { min-width: 0; margin-top: 17px; padding: 0; color: white; gap: 18px; }
.course-picker small { color: #b8d6f1; font-size: 12px; }
.course-picker strong { margin-top: 4px; color: #fff; font-size: clamp(24px, 2.25vw, 32px); font-weight: 780; letter-spacing: .015em; line-height: 1.25; }
.course-picker:hover strong { color: #e9f7ff; }
.course-picker .chevron { width: 27px; height: 27px; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; border-radius: 50%; font-size: 21px; }
.hero-subline { margin: 15px 0 0; color: #d0e6f8; font-size: 13px; letter-spacing: .03em; }
.hero-decoration { position: absolute; right: 15%; top: -125px; width: 445px; height: 445px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; z-index: 0; pointer-events: none; }
.hero-decoration:before, .hero-decoration:after { content: ''; position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.hero-decoration:before { inset: 47px; }
.hero-decoration:after { inset: 112px; background: rgba(255,255,255,.025); }
.period-status { z-index: 2; position: relative; min-width: 246px; padding: 15px 18px; border: 1px solid rgba(255,255,255,.2); border-radius: 14px; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.period-status small { color: #bad8f0; }
.period-status strong, .period-status.inactive strong { color: #fff; }
.period-status .days { border-left-color: rgba(255,255,255,.25); color: #d9eafa; }
.period-status .days b { color: #fff; font-size: 27px; }
.period-status .status-dot { background: #36d6ac; box-shadow: 0 0 0 5px rgba(54,214,172,.14); }
.period-status.inactive .status-dot { background: #a5b9cc; box-shadow: 0 0 0 5px rgba(255,255,255,.12); }

.workspace { grid-template-columns: 238px minmax(0, 1fr); gap: 20px; }
.sidebar, .content { border: 1px solid #e6edf5; border-radius: 18px; box-shadow: 0 8px 28px rgba(20, 47, 78, .035); }
.sidebar { padding: 18px 11px 12px; }
.side-title { color: #8a9aad; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.side-btn { margin: 4px 0; min-height: 45px; }
.side-btn.active { color: #174d88; background: #e9f2fd; box-shadow: inset 3px 0 #2c84d9; }
.side-btn.secret { color: #5c6480; }
.package-card { margin-top: 24px; padding: 18px; border: 0; background: linear-gradient(145deg, #173d6c, #0e2b50); color: #fff; }
.package-card span, .package-card small { color: #b4d2ed; }
.package-card strong { margin: 8px 0 6px; color: #fff; font-size: 17px; }
.content { padding: 30px; }

.stats { gap: 12px; margin-bottom: 30px; }
.stat, .tip { position: relative; overflow: hidden; min-height: 136px; border: 1px solid #e7edf4; border-radius: 15px; box-shadow: 0 5px 14px rgba(26, 54, 89, .025); }
.stat { padding: 21px 20px; background: #fff; }
.stat:after { content: ''; width: 58px; height: 58px; position: absolute; right: -16px; top: -16px; background: #edf4fe; border-radius: 50%; }
.stat.orange:after { background: #fff5e8; }
.stat.green:after { background: #e7f9f3; }
.stat span { color: #71839a; font-size: 13px; }
.stat strong { margin-top: 12px; font-size: 31px; line-height: 1; letter-spacing: -.03em; color: #12385f; }
.stat.blue strong { color: #1767c0; }
.stat.orange strong { color: #d88a32; }
.stat.green strong { color: #168f75; }
.tip { padding: 22px 23px; align-items: center; background: linear-gradient(125deg, #e9f5ff, #f3f9ff); border-color: #d7e9f9; color: #315d86; font-size: 14px; line-height: 1.7; }
.tip:before { content: '✦'; flex: 0 0 auto; width: 34px; height: 34px; margin-right: 13px; display: grid; place-items: center; border-radius: 11px; background: #d6eaff; color: #1868b7; font-size: 20px; }
.section-head { margin: 5px 1px 16px; }
.section-head h1 { color: #112947; font-size: 21px; letter-spacing: -.02em; }
.section-head p { color: #8796a8; font-size: 13px; }

.dashboard-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; background: none; border: 0; border-radius: 0; overflow: visible; }
.dashboard-actions .list-row { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 225px; padding: 22px 21px 19px; border: 1px solid #e3ebf5; border-radius: 15px; background: #f7faff; box-shadow: 0 5px 16px rgba(22,49,83,.025); }
.dashboard-actions .list-row:first-child { background: #f0f6ff; }
.dashboard-actions .list-row:nth-child(2) { background: #f1faf7; border-color: #e1efe9; }
.dashboard-actions .list-row:nth-child(3) { background: #fff8f0; border-color: #f3e7d9; }
.dashboard-actions .list-row:hover { transform: translateY(-3px); box-shadow: 0 14px 25px rgba(23, 58, 102, .09); }
.dashboard-actions .list-title { width: 100%; align-items: flex-start; flex-direction: column; gap: 14px; color: #123457; font-weight: 800; font-size: 16px; line-height: 1.3; }
.dashboard-actions .list-title>span:last-child { display: block; }
.dashboard-actions .practice-desc { display: block; margin: 6px 0 2px; font-weight: 400; font-size: 12px; line-height: 1.5; color: #6d8197; }
.dashboard-actions .icon-box { width: 42px; height: 42px; border-radius: 12px; background: #dceaff; font-size: 0; }
.dashboard-actions .icon-box:after { content: ''; display: block; width: 22px; height: 22px; background: #1d6dc4; mask: url('./icons/book-2.svg') center / contain no-repeat; }
.dashboard-actions .list-row:nth-child(2) .icon-box { background: #d9f2e8; }
.dashboard-actions .list-row:nth-child(2) .icon-box:after { background: #14936d; mask-image: url('./icons/rotate-clockwise.svg'); }
.dashboard-actions .list-row:nth-child(3) .icon-box { background: #feecd6; }
.dashboard-actions .list-row:nth-child(3) .icon-box:after { background: #cf7d28; mask-image: url('./icons/clipboard-list.svg'); }
.dashboard-actions .list-row>span { font-size: 11px; color: #8192a7; }
.dashboard-actions .list-row>span+span { display: none; }
.dashboard-actions .action { width: 100%; margin-top: auto; padding: 9px 12px; justify-self: stretch; background: #fff; border: 1px solid #cddff2; color: #1356a2; font-size: 13px; font-weight: 750; box-shadow: none; }
.dashboard-actions .list-row:nth-child(2) .action { border-color: #cce8dc; color: #087a59; }
.dashboard-actions .list-row:nth-child(3) .action { border-color: #f0dcc6; color: #a46323; }
.dashboard-actions .action:hover { background: #fff; box-shadow: 0 6px 13px rgba(27,64,107,.09); }
.recent-head { margin-top: 32px; }
.recent-activity-list { border-radius: 15px; overflow: hidden; }
.recent-activity-list .empty { padding: 41px 20px; background: #f8fafc; border: 1px dashed #d7e2ee; }
.recent-activity-list .empty b { font-size: 17px; }

#view-activate .page-heading { position: relative; overflow: hidden; max-width: 1160px; margin: 28px auto 22px; padding: 34px 39px; border-radius: 20px; background: linear-gradient(110deg, #102b4d, #1a5288); box-shadow: 0 15px 32px rgba(20,58,103,.12); }
#view-activate .page-heading:after { content: ''; position: absolute; right: -75px; top: -135px; width: 375px; height: 375px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,255,255,.025); pointer-events: none; }
#view-activate .page-heading .eyebrow { color: #8bd7ea; }
#view-activate .page-heading h1 { position: relative; z-index: 1; margin: 9px 0; color: #fff; font-size: clamp(25px,2.8vw,34px); }
#view-activate .page-heading p { position: relative; z-index: 1; margin: 0; color: #c3dcf2; font-size: 14px; }
.activation-card, .timeline-card { padding: 28px; border: 1px solid #e2eaf3; border-radius: 17px; box-shadow: 0 9px 24px rgba(20,47,78,.035); }
.activation-card label { color: #304765; }
.activation-card input, .activation-card select { background: #fbfcfe; }
.activation-card .primary { padding: 12px; font-weight: 800; }
.timeline-card { background: #f9fbfe; }
.timeline-card h2 { margin-bottom: 27px; color: #143254; }
.timeline li b { color: #173e68; }

.login-dialog#loginDialog { width: min(930px, 94vw); max-height: min(92dvh, 900px); overflow: auto; border: 0; border-radius: 22px; box-shadow: 0 28px 90px rgba(8,30,56,.3); }
#loginDialog .login-card { display: grid; grid-template-columns: minmax(0, .93fr) minmax(0, 1fr); min-height: 535px; padding: 0; }
.auth-feature { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-height: 535px; padding: 34px 35px 40px; background: radial-gradient(circle at 110% 5%, #326fae 0%, transparent 50%), linear-gradient(155deg, #12335a, #0a2748 74%); color: #fff; }
.auth-feature-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 7px; font-weight: 750; font-size: 14px; }
.auth-feature-logo { width: 31px; height: 31px; display: grid; place-items: center; margin-right: 3px; border-radius: 9px; background: #fff; color: #123c6e; font-size: 18px; }
.auth-feature-dot { width: 3px; height: 3px; margin: 0 4px; border-radius: 50%; background: #7ed3ed; }
.auth-feature-top { letter-spacing: .02em; }
.auth-feature-body { position: relative; z-index: 2; margin: auto 0; padding-top: 34px; }
.auth-feature-kicker { color: #8ed7ec; font-size: 12px; letter-spacing: .17em; }
.auth-feature-body>strong { display: block; margin-top: 17px; font-size: clamp(39px, 4vw, 54px); line-height: 1.25; letter-spacing: -.02em; }
.auth-feature-body>strong span { color: #6bd2e5; }
.auth-feature-body>p { max-width: 320px; margin: 21px 0 31px; color: #b7d0e7; font-size: 14px; line-height: 1.9; }
.auth-feature-steps { display: flex; gap: 9px; flex-wrap: wrap; }
.auth-feature-steps span { padding: 8px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; color: #c8dcf0; font-size: 11px; }
.auth-feature-steps b { color: #79cde9; margin-right: 3px; }
.auth-feature-orbit { position: absolute; width: 385px; height: 385px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; top: 77px; right: -190px; }
.auth-feature-orbit:after { content: ''; position: absolute; inset: 53px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.auth-main { align-self: center; padding: 42px clamp(28px, 4vw, 57px); background: #fff; }
#loginDialog .login-brand { align-items: flex-start; margin-bottom: 29px; }
#loginDialog .login-brand .brand-mark { display: none; }
#loginDialog .login-brand strong { color: #12304f; font-size: 25px; line-height: 1.3; }
#loginDialog .login-brand small { margin-top: 8px; color: #8392a4; font-size: 13px; }
#loginDialog .auth-tabs { padding: 4px; background: #f1f5f9; margin-bottom: 19px; }
#loginDialog .auth-tabs button { padding: 11px; }
#loginDialog .auth-tabs button.active { box-shadow: 0 3px 10px rgba(24,54,86,.08); }
#loginDialog label { color: #3e526b; font-size: 13px; }
#loginDialog input:not([type="checkbox"]) { padding: 12px 13px; background: #fbfcfe; }
#loginDialog .primary { padding: 12px 15px; font-weight: 800; }
.auth-footnote { margin: 22px 0 0; text-align: center; font-size: 11px; color: #a3b0bf; }

.memorize-header { background: linear-gradient(100deg, #102a4b, #1a4d80); box-shadow: 0 4px 16px rgba(10,36,69,.16); }
.memorize-subject { border-right-color: rgba(255,255,255,.11); }
.memorize-navigator { background: #f0f5fb; border-right: 1px solid #dce7f2; }
.memorize-nav-title { color: #113654; background: #f7faff; }
.memorize-group { padding: 16px 14px 5px; }
.memorize-group h2 { color: #42627f; font-size: 12px; }
.memorize-number-grid { gap: 7px; }
.memorize-number-grid button { background: #fff; border: 1px solid #d0dfed; border-radius: 7px; }
.memorize-number-grid button.current { background: #1c6abb; border-color: #1c6abb; box-shadow: 0 4px 10px rgba(22,98,177,.18); }
.memorize-main { background: #f9fbfd; }
.memorize-instruction { background: #fff; border-bottom: 1px solid #e9eff5; }
.memorize-question { max-width: 960px; }
.memorize-option { border: 1px solid #e5edf4; box-shadow: 0 3px 10px rgba(20,50,84,.025); }
.memorize-option.correct { border-color: #9ddcbd; background: #e9f8f0; }
.memorize-analysis { background: #fff; border: 1px solid #e4ebf2; box-shadow: 0 9px 25px rgba(25,55,89,.05); }
.question-table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; margin: 16px 0; border: 1px solid #bccbdb; border-radius: 8px; background: #fff; }
.question-table-wrap:focus-visible { outline: 2px solid #236dba; outline-offset: 3px; }
.question-table { width: 100%; min-width: 420px; border-collapse: collapse; color: #243c57; font-family: inherit; font-size: inherit; line-height: 1.65; }
.question-table th, .question-table td { padding: 11px 15px; border-right: 1px solid #bccbdb; border-bottom: 1px solid #bccbdb; vertical-align: middle; overflow-wrap: break-word; }
.question-table th { background: #edf3f9; font-weight: 700; }
.question-table tr > :last-child { border-right: 0; }
.question-table tbody tr:last-child > * { border-bottom: 0; }
.question-table .table-align-center { text-align: center; }
.question-table .table-align-left { text-align: left; }
.question-table .table-align-right { text-align: right; }
.question-text { line-height: 1.85; }
.option-content { flex: 1; min-width: 0; }
.option-image { display: block; width: auto; max-width: min(100%, 320px); max-height: 240px; margin: 6px 0; background: #fff; }
.analysis-image { display: block; width: auto; max-width: 100%; max-height: none; margin: 14px 0 0; background: #fff; }
.preview-option { display: flex; align-items: flex-start; gap: 10px; margin: 7px 0; line-height: 1.8; }
.preview-option > div { min-width: 0; }
.memorize-case > .question-text, .case-material > .question-text { margin-top: 8px; }
.memorize-analysis > .question-text, .analysis > .question-text { margin-top: 9px; }
.memorize-large .question-table, .memorize-large .memorize-analysis > .question-text, .memorize-large .memorize-case > .question-text { font-size: 17px; }
@media (max-width: 670px) {
  .question-table { font-size: 14px; }
  .question-table th, .question-table td { padding: 9px 11px; }
  .preview-question { min-width: 0; }
}
.memorize-footer { background: #fff; border-top-color: #e4ebf3; }

@media (max-width: 1100px) {
  .coursebar { padding: 27px 30px; }
  .dashboard-actions .list-row { padding: 18px 16px; }
  .stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .tip { grid-column: 1 / -1; min-height: 70px; }
}
@media (max-width: 800px) {
  .coursebar { min-height: 158px; margin: 13px 12px 11px; padding: 22px 20px; border-radius: 16px; }
  .course-picker { margin-top: 12px; }
  .course-picker strong { font-size: clamp(18px, 4vw, 23px); }
  .hero-subline { margin-top: 11px; font-size: 12px; }
  .hero-decoration { right: -110px; top: -185px; }
  .period-status { min-width: 0; padding: 10px 12px; }
  .workspace { margin: 0 12px 24px; }
  .content { padding: 18px; }
  .dashboard-actions .list-row { min-height: 205px; }
  #view-activate .page-heading { margin: 13px 12px 15px; padding: 25px; }
  #view-activate .page-heading h1 { font-size: 24px; }
  .memorize-navigator { max-height: 125px; }
  .memorize-nav-title { height: 37px; }
  .memorize-group { padding: 7px 12px 3px; }
  .memorize-group h2 { margin-bottom: 5px; }
  .memorize-number-grid { gap: 5px; }
  .memorize-number-grid button { width: 31px; }
  .memorize-instruction { padding: 9px 14px; gap: 7px; }
  .memorize-instruction>span { font-size: 11px; }
  .memorize-instruction button { padding: 5px 8px; font-size: 11px; }
  .memorize-question { padding-top: 12px; }
  .memorize-question>h2 { margin-top: 12px; }
  .memorize-option { margin-bottom: 6px; }
}
@media (max-width: 670px) {
  .coursebar { display: block; min-height: 0; }
  .period-status { width: fit-content; max-width: 100%; margin-top: 17px; }
  .hero-eyebrow { font-size: 9px; }
  .course-picker strong { max-width: none; white-space: normal; }
  .stats { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
  .stat { min-height: 106px; padding: 14px 11px; }
  .stat span { font-size: 11px; }
  .stat strong { margin-top: 16px; font-size: 25px; }
  .tip { grid-column: 1 / -1; min-height: 70px; padding: 15px; }
  .period-status .days:not([hidden]) { display: block; padding-left: 13px; margin-left: 0; }
  .dashboard-actions { grid-template-columns: 1fr; gap: 10px; }
  .dashboard-actions .list-row { min-height: 0; padding: 16px; }
  .dashboard-actions .list-title { flex-direction: row; align-items: center; gap: 12px; }
  .dashboard-actions .action { margin-top: 5px; }
  #loginDialog .login-card { display: block; min-height: 0; }
  #loginDialog .auth-feature { display: none; }
  #loginDialog .auth-main { padding: 32px 26px; }
  #loginDialog .login-brand .brand-mark { display: grid; }
  #loginDialog .login-brand strong { font-size: 20px; }
}
@media (max-width: 430px) {
  .coursebar { padding: 20px; }
  .hero-subline { display: none; }
  .period-status { margin-top: 16px; }
  .stat strong { font-size: 24px; }
  .section-head h1 { font-size: 19px; }
  .dashboard-actions .list-title { font-size: 15px; }
}

.picker-period-title { grid-column: 1 / -1; padding: 7px 3px; font-weight: 800; color: #183351; }
.picker-period { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer; }
.picker-period small { color: #74859a; font-size: 11px; }
.picker-empty { grid-column: 1 / -1; padding: 22px; border: 1px dashed #cad8e5; border-radius: 12px; color: #64748b; background: #f8fbfd; }
#backToSubjects { grid-column: 1 / -1; justify-self: start; cursor: pointer; }
.action:disabled { opacity: .55; cursor: not-allowed; }
.preview-shell { max-height: min(88vh, 900px); overflow: auto; background: #f6f8fc; }
.preview-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 22px 28px; background: #fff; border-bottom: 1px solid #e2e9f1; }
.preview-head h2 { margin: 4px 0 0; font-size: 22px; }
.preview-head button { border: 0; background: none; color: #64748b; font-size: 26px; cursor: pointer; }
.preview-lock { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 28px; padding: 15px 18px; border: 1px solid #e8d9bd; border-radius: 12px; background: #fff8eb; color: #815d20; }
.preview-lock .primary { white-space: nowrap; }
.preview-questions { display: grid; gap: 14px; padding: 0 28px 28px; }
.preview-question { padding: 22px; background: #fff; border: 1px solid #e3eaf2; border-radius: 14px; }
.preview-question small { color: #3171ac; font-weight: 700; }
.preview-question h3 { font-size: 16px; line-height: 1.8; }
.preview-options { display: grid; gap: 7px; }
.preview-options p { margin: 0; padding: 9px 12px; background: #f7f9fc; border-radius: 8px; }
.preview-options b { margin-right: 6px; color: #215d91; }
@media (max-width: 670px) { .preview-lock { flex-direction: column; align-items: flex-start; } .preview-head, .preview-questions { padding-left: 16px; padding-right: 16px; } .preview-lock { margin: 16px; } }

.admin-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.subject-row strong, .subject-row small { display: block; }
.catalog-editor-dialog { width: min(560px, 94vw); max-height: 90dvh; overflow: auto; }
.catalog-editor-form { padding: 22px 24px 24px; display: grid; gap: 16px; }
.catalog-editor-form > label, .catalog-editor-form .editor-two label { display: grid; gap: 7px; color: #30435a; font-weight: 700; font-size: 13px; }
.catalog-editor-form input, .catalog-editor-form select { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #cad5e3; border-radius: 9px; background: #fff; color: #1c2f47; font-weight: 400; }
.catalog-editor-form input:focus, .catalog-editor-form select:focus { border-color: #2374b6; outline: 3px solid #e6f2fb; }
.catalog-editor-form .editor-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.catalog-editor-form .editor-check { display: flex; align-items: center; gap: 9px; }
.catalog-editor-form .editor-check input { width: auto; }
.editor-context, .editor-help { margin: 0; color: #65758a; font-size: 13px; line-height: 1.6; }
.editor-context { padding: 10px 12px; border-radius: 8px; background: #f1f6fa; }
.editor-help { padding: 10px 12px; border-radius: 8px; background: #f6f8fb; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.editor-actions button { min-width: 88px; }
.period-cards { display: grid; gap: 14px; }
.period-card .eyebrow { letter-spacing: 0; }
@media (max-width: 720px) { .admin-head { align-items: flex-start; flex-direction: column; gap: 8px; } .catalog-editor-form .editor-two { grid-template-columns: 1fr; } .period-card .rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.package-create, .package-list { margin-top: 16px; }
#view-admin .order-code { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; }
#view-admin .order-code-text { min-width: 0; }
#view-admin .order-code code { display: inline-block; white-space: normal; overflow-wrap: anywhere; }
#view-admin .order-code .code-subject-label { display: block; margin-top: 5px; font-size: 12px; line-height: 1.5; }
#view-admin .order-code-list { display: grid; gap: 12px; min-width: 0; }
#view-admin .order-code-text { display: block; }
#view-admin .code-delivery-state { display: block; font-size: 12px; color: #a26912; }
#view-admin .code-delivery-state.used { color: #13865a; }
#view-admin .code-delivery-state.void { color: #b84242; }
#view-admin .order-status.partial { color: #995c00; background: #fff3dd; }
@media (min-width: 1101px) { #view-admin .order-head, #view-admin .order-row { grid-template-columns: minmax(160px,1.1fr) minmax(165px,1fr) 95px minmax(200px,1.2fr) 90px 110px; } }
@media (max-width: 800px) {
  #view-admin .order-row { grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
  #view-admin .order-row > div:nth-child(2), #view-admin .order-row > div:nth-child(4), #view-admin .order-row > div:nth-child(6) { display: block; }
  #view-admin .order-row > div:nth-child(2), #view-admin .order-row > div:nth-child(4) { grid-column: 1 / -1; }
  #view-admin .order-row > div.order-code { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  #view-admin .order-row > div.order-actions { display: flex; flex-direction: row; gap: 16px; grid-column: 1 / -1; }
  #view-admin .order-status { grid-column: 2; grid-row: 1; }
}
#view-admin .order-form-grid { grid-template-columns: repeat(12,minmax(0,1fr)); }
#view-admin .order-form-grid label { grid-column: span 3; min-width: 0; }
#view-admin .order-form-grid label:nth-child(6) { grid-column: span 6; }
#view-admin .order-form-grid input, #view-admin .order-form-grid select { min-width: 0; }
@media (max-width: 1100px) {
  #view-admin .order-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #view-admin .order-form-grid label { grid-column: auto; }
  #view-admin .order-form-grid label:nth-child(6) { grid-column: 1 / -1; }
}
@media (max-width: 800px) { #view-admin .order-form-grid { grid-template-columns: minmax(0,1fr); } }
.package-create .form-grid { padding: 0 18px 18px; align-items: end; }
.package-create .form-grid button { min-height: 42px; }
.package-period-hint { margin: -4px 18px 18px; color: #65758a; font-size: 12px; line-height: 1.6; }
.package-rows { padding: 0 18px 8px; }
.package-row { display: grid; grid-template-columns: minmax(190px, 1fr) 130px 90px 84px; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid #e5ebf1; }
.package-row:first-child { border-top: 0; }
.package-row strong, .package-row small { display: block; }
.package-row small { color: #65758a; margin-top: 3px; }
.package-row .secondary:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 720px) { .package-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; } .package-row span { font-size: 12px; } .package-row button { grid-column: 2; grid-row: 1 / 3; } }

.administrator-create, .administrator-list { margin-top: 16px; }
.administrator-create form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: start; gap: 16px; padding: 0 20px 20px; }
.administrator-create label, .administrator-credentials label { display: grid; gap: 8px; font-size: 14px; }
.administrator-create input, .administrator-credentials input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #dce5ee; border-radius: 9px; background: #fff; font-size: 16px; }
.administrator-create form button { margin-top: 28px; min-height: 44px; }
.administrator-create small { color: #65758a; font-size: 13px; }
#administratorCreateError { grid-column: 1 / -1; color: #c43c3c; font-size: 14px; }
.administrator-row { display: grid; grid-template-columns: minmax(130px, 1fr) 100px minmax(120px, 1fr) auto; align-items: center; gap: 16px; padding: 18px 20px; border-top: 1px solid #e5ebf1; font-size: 14px; }
.administrator-row strong, .administrator-row small { display: block; }
.administrator-row small { margin-top: 4px; color: #65758a; font-size: 13px; }
.administrator-level { font-weight: 600; color: #1660b6; }
.administrator-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.administrator-delete { color: #b73838; }
#administratorCredentialDialog { width: min(480px, calc(100vw - 32px)); }
.administrator-credentials { display: grid; gap: 18px; padding: 4px 24px 24px; }
.administrator-credentials p { margin: 0; color: #65758a; font-size: 14px; line-height: 1.7; }
@media (max-width: 720px) { .administrator-create form { grid-template-columns: 1fr; } .administrator-create form button { margin-top: 0; } .administrator-row { grid-template-columns: 1fr auto; gap: 12px; } .administrator-actions { grid-column: 1 / -1; } }
/* Exam-specific periods and dated official references. */
.period-admin-grid{display:grid;grid-template-columns:250px minmax(0,1fr);gap:20px;align-items:start}.period-exams{padding:18px;position:sticky;top:20px}.period-exams h2{font-size:16px;margin:0 0 14px}.period-exams .category{width:100%;text-align:left;white-space:normal}.period-exams .category span{display:block;margin-top:6px}.period-main{min-width:0}.period-main .section-head h2{font-size:22px}.period-warning{background:#fff7e8;color:#93621c;padding:10px 14px;border-radius:8px;font-size:13px}.period-source{display:inline-block;margin-top:12px}.official-checked{font-size:12px;color:#60728d;line-height:1.6}.official-source{padding:24px;margin-top:16px}.official-source .panel-title{align-items:flex-start;gap:16px;flex-wrap:wrap}.official-source h2{font-size:20px}.official-links{display:flex;gap:18px;flex-wrap:wrap}.official-source a,.period-source{color:#1d63c6;font-size:13px;text-decoration:none}.official-source a:hover,.period-source:hover{text-decoration:underline}.official-wechat{background:#f4f8fc;border:1px solid #e1eaf6;border-radius:12px;padding:16px}.official-wechat span{display:block;color:#687b94;font-size:12px;margin-bottom:6px}.official-wechat strong{font-size:15px;line-height:1.7}.official-wechat p,.official-note{font-size:13px;color:#667792;line-height:1.8}.official-dates{border-top:1px solid #e5ecf5;margin-top:18px}.official-date{display:flex;gap:18px;justify-content:space-between;padding:18px 0;border-bottom:1px solid #e5ecf5}.official-date:last-child{border-bottom:0;padding-bottom:0}.official-date strong{display:block;font-size:14px;line-height:1.7}.official-date-value{display:block;color:#1d63c6;font-size:18px;font-weight:700;line-height:1.7;margin:5px 0}.official-date small{color:#6e7c92;font-size:12px;line-height:1.8;display:block}.official-date-actions{display:flex;flex-direction:column;align-items:flex-end;gap:9px;flex-shrink:0}.official-status{background:#edf4ff;color:#456993;font-size:11px;padding:5px 9px;border-radius:6px}.exam-news{max-width:1100px;margin:32px auto;padding:0 24px 40px}.news-heading{margin-bottom:22px}.news-heading p{color:#6a7b93}.news-filter{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0}.news-filter button{padding:10px 14px;border:1px solid #dce6f3;border-radius:8px;background:white;color:#60728d;cursor:pointer}.news-filter button.active{background:#1d63c6;border-color:#1d63c6;color:white}.news-sources{display:grid;gap:8px}.period-card .rule-grid strong{font-size:13px;overflow-wrap:anywhere}
@media(max-width:1000px){.period-admin-grid{grid-template-columns:1fr}.period-exams{position:static;display:flex;gap:8px;flex-wrap:wrap}.period-exams h2{width:100%}.period-exams .category{width:auto;flex:1 1 180px}.official-date{flex-wrap:wrap}.official-date-actions{align-items:flex-start;flex-direction:row;flex-wrap:wrap}.exam-news{padding:0 16px 32px}.official-source{padding:18px}}
.session-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px}.session-stats>div{background:#f5f8fc;border:1px solid #e3ebf5;border-radius:10px;padding:14px}.session-stats span,.session-stats small{display:block;color:#617592;font-size:12px;line-height:1.8}.session-stats strong{display:block;color:#193b68;font-size:23px;margin:5px 0}.session-tag{display:inline-block;padding:3px 8px;margin-bottom:7px;border-radius:5px;background:#e9f2ff;color:#2763af;font-size:11px}.session-special,.session-regional_special{background:#fff2e4;color:#9b601a}.session-appointment{background:#eaf5f0;color:#2a7560}.session-unspecified{background:#f0f2f5;color:#677487}.session-filter{align-items:center;margin-top:-10px}.session-filter>span{color:#617592;font-size:13px;margin-right:4px}.period-audience{font-size:13px;color:#617592;line-height:1.8}@media(max-width:600px){.session-stats{grid-template-columns:1fr}.session-stats>div{display:grid;grid-template-columns:1fr auto;align-items:center;padding:10px 14px}.session-stats small{grid-column:1/-1}.session-stats strong{font-size:20px;margin:0}.official-date-value{font-size:16px}}


/* Keep question navigation together and easy to tap. */
.activation-period-status { margin: 0; padding: 10px 12px; border-radius: 8px; background: #eef5ff; color: #456993; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.activation-period-status.pending { background: #fff7e8; color: #93621c; }
.period-status strong { white-space: normal; line-height: 1.5; overflow-wrap: anywhere; }
.period-status.expired .status-dot { background: #ffc36c; box-shadow: 0 0 0 5px rgba(255,195,108,.16); }
.learning-home-card { margin-bottom: 24px; overflow: hidden; border: 1px solid #dfe8f4; border-radius: 17px; background: #fff; }
.learning-home-brand { position: relative; padding: 28px 24px 24px; text-align: center; background: radial-gradient(ellipse at 50% 0%, #edf5ff 0, #fff 72%); }
.home-brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 10px; border-radius: 13px; background: #173d6c; color: #fff; font-size: 23px; font-weight: 800; box-shadow: 0 6px 16px #173d6c20; }
.learning-home-brand .eyebrow { display: block; color: #6780a0; font-size: 12px; }
.learning-home-brand h1 { margin: 9px 0 5px; color: #15375d; font-size: clamp(26px, 3vw, 36px); line-height: 1.3; letter-spacing: .08em; }
.home-domain { color: #1e62bb; font-size: 20px; font-weight: 700; text-decoration: none; letter-spacing: .015em; }
.home-domain:hover { text-decoration: underline; }
.learning-home-brand > p { margin: 13px 0 20px; color: #657b97; font-size: 14px; line-height: 1.8; }
.home-mode-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.home-mode-links button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 20px; border: 1px solid #dee8f5; border-radius: 24px; background: #fff; color: #23466f; font-size: 14px; font-weight: 700; box-shadow: 0 4px 12px #193d6410; cursor: pointer; }
.home-mode-links button:hover { background: #edf5ff; border-color: #bad3f2; }
.home-mode-links .nav-icon { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; background-color: #2a64ac; mask-size: contain; mask-repeat: no-repeat; mask-position: center; }
.course-access-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; border-top: 1px solid #dee8f4; background: #f2f7ff; }
.course-access-banner.active { background: #edf9f4; border-color: #d5eee3; }
.course-access-banner.expired { background: #fff7e9; border-color: #f4e0bd; }
.course-access-banner.unavailable { background: #f4f5f7; }
.access-copy { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.access-copy > div { min-width: 0; }
.access-copy strong { display: block; font-size: 17px; color: #24476f; line-height: 1.6; overflow-wrap: anywhere; }
.access-copy p { margin: 5px 0 0; color: #60758f; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.access-pill { display: inline-block; flex-shrink: 0; padding: 5px 10px; border-radius: 7px; background: #e4efff; color: #1c5eac; font-size: 12px; font-weight: 700; line-height: 20px; white-space: nowrap; }
.access-pill.active { background: #d7f2e5; color: #13734f; }
.access-pill.expired { background: #ffecd0; color: #9d641a; }
.access-pill.unavailable { background: #e9ecf0; color: #66758a; }
.access-pill.admin { background: #e6ecf6; color: #284d79; }
.course-access-banner > button { flex-shrink: 0; min-height: 44px; }
.course-activation-history { padding: 14px 24px; border-top: 1px solid #e5ebf4; background: #fbfcfe; }
.history-label { color: #7890ab; font-size: 12px; }
.course-history-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.course-history-row > span:nth-child(2) { flex: 1; min-width: 0; }
.course-history-row strong, .course-history-row small { display: block; line-height: 1.7; }
.course-history-row strong { font-size: 13px; color: #4b6380; }
.course-history-row small { font-size: 12px; color: #7d8ea6; overflow-wrap: anywhere; }
.subject-item .picker-status { display: block; margin-top: 7px; color: #6b829e; font-size: 12px; line-height: 1.6; font-weight: 400; }
.subject-item .picker-status.active { color: #168360; }
.subject-item .picker-status.expired { color: #ad7425; }
.activation-confirm-dialog { width: min(540px, calc(100vw - 32px)); padding: 0; max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid #dfe7f3; box-shadow: 0 24px 72px #152e5540; }
.activation-confirm-dialog .dialog-head { align-items: flex-start; padding: 22px 24px; }
.activation-confirm-dialog h2 { margin: 5px 0 0; color: #183b65; font-size: 23px; line-height: 1.4; }
.activation-confirm-body { padding: 0 24px 24px; }
.activation-confirm-intro { margin: 18px 0; color: #617794; font-size: 14px; line-height: 1.8; }
.activation-confirm-details { margin: 0 0 18px; padding: 10px 16px; border: 1px solid #dce8f6; border-radius: 11px; background: #f5f9ff; }
.activation-confirm-details > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; padding: 9px 0; }
.activation-confirm-details dt { color: #7890ac; font-size: 13px; line-height: 1.7; }
.activation-confirm-details dd { margin: 0; color: #2a4a70; font-size: 14px; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere; }
.activation-confirm-details .confirm-period dd { color: #1c62be; font-size: 16px; }
.activation-confirm-notice { padding: 13px 16px; border: 1px solid #f2deb8; border-radius: 10px; background: #fff8eb; color: #916221; }
.activation-confirm-notice strong { font-size: 13px; }
.activation-confirm-notice p { margin: 6px 0 0; font-size: 13px; line-height: 1.8; }
.activation-confirm-error { color: #b44338; font-size: 13px; line-height: 1.7; margin: 12px 0; }
.activation-confirm-error:empty { display: none; }
.activation-confirm-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.activation-confirm-actions button { min-width: 112px; min-height: 46px; font-size: 14px; }
@media(max-width: 620px) {
  .learning-home-brand { padding: 22px 16px 20px; }
  .learning-home-brand > p { font-size: 13px; margin-bottom: 16px; }
  .home-domain { font-size: 18px; }
  .home-mode-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .home-mode-links button { min-width: 0; gap: 5px; padding: 9px 6px; font-size: 12px; }
  .course-access-banner { flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
  .access-copy { gap: 9px; }
  .access-copy strong { font-size: 15px; }
  .access-pill { font-size: 11px; padding: 3px 8px; }
  .course-activation-history { padding: 14px 16px; }
  .activation-confirm-dialog .dialog-head { padding: 19px 18px; }
  .activation-confirm-dialog h2 { font-size: 21px; }
  .activation-confirm-body { padding: 0 18px 20px; }
  .activation-confirm-details { padding: 8px 12px; }
  .activation-confirm-details > div { grid-template-columns: 74px minmax(0, 1fr); }
  .activation-confirm-actions button { flex: 1; min-width: 0; }
}
.memorize-footer { grid-template-columns: auto auto minmax(0, 1fr); }
.memorize-nav-actions { display: flex; align-items: center; gap: 12px; }
.memorize-footer #prevExam,
.memorize-footer #nextExam,
.question-actions #prevExam,
.question-actions #nextExam {
  min-width: 124px;
  min-height: 50px;
  padding: 12px 20px;
  font-size: 16px;
  line-height: 24px;
}
@media (max-width: 720px) {
  .memorize-shell { grid-template-rows: auto minmax(0, 1fr) 94px; }
  .memorize-footer { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 8px 12px; }
  .memorize-nav-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .memorize-footer #prevExam,
  .memorize-footer #nextExam { min-width: 0; width: 100%; }
  .memorize-footer > span { font-size: 12px; line-height: 18px; }
}

/* Practice and exam context with an ordered, grouped answer card. */
#examDialog:not(.memorize-dialog) { width: min(1400px,96vw); height: min(880px,94vh); height: min(880px,94dvh); max-height: 94vh; max-height: 94dvh; overflow: hidden; }
#examDialog:not(.memorize-dialog) .exam-layout { height: 100%; min-height: 0; grid-template-columns: 240px minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
#examDialog:not(.memorize-dialog) .exam-top { grid-column: 1 / -1; height: auto; min-height: 78px; display: grid; grid-template-columns: 218px minmax(0,1fr) auto; gap: 16px; padding: 12px 22px; }
.exam-context { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.exam-context .exam-mode-badge { display: inline-block; margin: 0; font-size: 11px; }
.exam-top .exam-current-subject { max-width: 100%; color: #193e65; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
#examDialog:not(.memorize-dialog) #examTitle { min-width: 0; margin: 0; color: #173b60; font-size: 16px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.exam-top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.exam-top-actions #timer { white-space: nowrap; font-size: 16px; }
.exam-top-actions .finish-exam { margin-left: 0; }
#examDialog:not(.memorize-dialog) .exam-top-actions button { min-height: 38px; padding: 6px 10px; border: 1px solid #d6e2ef; border-radius: 7px; background: #f8fbff; color: #29547b; white-space: nowrap; cursor: pointer; }
#examDialog:not(.memorize-dialog) .exam-top-actions .finish-exam { border-color: #f0b6b6; background: #fff4f3; color: #bd3737; }
#examDialog:not(.memorize-dialog) .question-area { grid-column: 2; grid-row: 2; min-height: 0; overflow: auto; }
#examDialog:not(.memorize-dialog) .question-card { max-height: none; overflow: visible; }
#examDialog:not(.memorize-dialog) .answer-sheet { display: block; grid-column: 1; grid-row: 2; min-height: 0; overflow: auto; padding: 0 14px 14px; border-left: 0; border-right: 1px solid #dce7f2; background: #f2f6fb; }
.sheet-heading { position: sticky; top: 0; z-index: 1; padding: 16px 0 10px; border-bottom: 1px solid #dce5ef; background: #f2f6fb; }
.sheet-heading h3 { margin: 0 0 7px; color: #173b60; font-size: 16px; }
.sheet-heading .sheet-summary { margin: 0; font-size: 12px; }
.sheet-heading .sheet-summary b { font-size: 17px; }
.sheet-section { padding-top: 18px; }
.sheet-section h4 { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 0 0 10px; padding-left: 8px; border-left: 3px solid #246bba; color: #1d436a; font-size: 15px; font-weight: 800; }
.sheet-section h4 span { flex-shrink: 0; color: #6b8199; font-size: 11px; font-weight: 500; }
.answer-sheet .sheet-section .sheet-grid { max-height: none; overflow: visible; padding: 0; gap: 7px; }
.sheet-section .sheet-grid button { min-width: 0; color: #2b557d; font-size: 12px; font-weight: 700; cursor: pointer; }
.sheet-section .sheet-grid button.current { background: #1d64c8; border-color: #1d64c8; color: white; box-shadow: 0 3px 8px rgba(29,100,200,.16); }
.sheet-legend { color: #718299; font-size: 11px; }
.sheet-legend .legend:first-child { margin-left: 0; }
@media (max-width: 980px) and (min-width: 801px) {
  #examDialog:not(.memorize-dialog) .exam-top { grid-template-columns: 180px minmax(0,1fr) auto; gap: 10px; padding: 12px 16px; }
  #examDialog:not(.memorize-dialog) .exam-layout { grid-template-columns: 200px minmax(0,1fr); }
  .exam-top-actions { gap: 6px; }
}

/* Site identity and live answer-card states, shared by practice and exam. */
#examDialog .question-card,
#examDialog .memorize-question { position: relative; isolation: isolate; }
.exam-domain-watermark {
  position: absolute;
  top: 205px;
  left: 50%;
  z-index: 2;
  max-width: 95%;
  transform: translateX(-50%);
  color: rgba(33, 67, 106, .085);
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
#examDialog:not(.memorize-dialog) .answer-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding-bottom: 0;
}
.answer-sheet .sheet-heading { position: static; }
.sheet-sections { min-height: 0; overflow-y: auto; padding: 0 4px 14px 0; scrollbar-gutter: stable; }
.answer-sheet .sheet-legend {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  margin: 0 -5px;
  padding: 11px 0 10px;
  border-top: 1px solid #dce5ef;
  background: #f2f6fb;
  color: #506883;
  font-size: 10px;
  line-height: 1.5;
}
.sheet-legend > span { display: flex; flex-direction: column; align-items: center; gap: 5px; white-space: nowrap; }
.sheet-legend .legend { display: block; width: 13px; height: 13px; margin: 0; border-radius: 3px; border: 1px solid #c5d2e3; background: white; }
.sheet-legend .legend.current { background: #1d64c8; border-color: #1d64c8; }
.sheet-legend .legend.completed { background: #42bd97; border-color: #42bd97; }
.sheet-legend .legend.partial { background: linear-gradient(90deg, #42bd97 50%, white 50%); border-color: #42bd97; }
.sheet-legend .legend.marked { background: linear-gradient(135deg, white 48%, #ed6673 49%); border-color: #d8c5cd; }
.sheet-section .sheet-grid button { position: relative; }
.sheet-section .sheet-grid button.sheet-unanswered { background: white; border-color: #d6e1ef; color: #2b557d; }
.sheet-section .sheet-grid button.sheet-completed { background: #ddf5ea; border-color: #65c3a0; color: #176148; }
.sheet-section .sheet-grid button.sheet-partial { background: linear-gradient(90deg, #def5eb 50%, white 50%); border-color: #65c3a0; color: #246a53; }
.sheet-section .sheet-grid button.sheet-correct { background: #ddf5ea; border-color: #65c3a0; color: #176148; }
.sheet-section .sheet-grid button.sheet-wrong { background: #ffe5e2; border-color: #e3837c; color: #ad3d34; }
.sheet-section .sheet-grid button.current { background: #1d64c8; border-color: #1d64c8; color: white; box-shadow: 0 3px 8px rgba(29,100,200,.16); }
.sheet-section .sheet-grid button.sheet-marked::after { content: ''; position: absolute; top: 2px; right: 2px; width: 0; height: 0; border-top: 9px solid #ed6673; border-left: 9px solid transparent; border-radius: 1px; }

/* Batch activation history: administrator-only status and delivery records. */
#view-admin .code-history-stats { grid-template-columns: repeat(5,minmax(0,1fr)); }
#view-admin .admin-content:has(.code-history-panel) { min-width: 0; }
#view-admin .code-panel .form-grid label { min-width: 0; }
#view-admin .code-panel .form-grid select { min-width: 0; }
#view-admin .code-panel .form-grid { grid-template-columns: minmax(0,1.1fr) minmax(0,1.55fr) minmax(0,1.1fr) minmax(90px,.55fr); }
.code-history-panel { margin-top: 22px; padding: 22px; }
.code-history-panel .panel-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.code-history-panel .panel-title h2 { margin: 0 0 5px; }
.code-history-panel .panel-title span { color: #728199; font-size: 12px; }
.code-history-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; align-items: end; margin: 22px 0 16px; }
.code-history-filters label { min-width: 0; display: grid; gap: 7px; color: #465b75; font-size: 12px; }
.code-history-filters .code-history-keyword { grid-column: span 2; }
.code-history-filters input,.code-history-filters select { width: 100%; min-width: 0; min-height: 42px; border: 1px solid #d8e3f0; border-radius: 9px; padding: 10px 12px; background: #fff; color: #294766; font: inherit; }
.code-history-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; color: #75849b; font-size: 12px; }
.code-history-toolbar #exportCodeHistory { margin-left: auto; }
.code-history-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e0e8f2; border-radius: 12px; }
.code-history-table { width: 100%; min-width: 900px; border-collapse: collapse; text-align: left; font-size: 12px; }
.code-history-table th { background: #f3f7fc; color: #4b6280; font-weight: 600; padding: 14px 12px; white-space: nowrap; }
.code-history-table td { padding: 16px 12px; border-top: 1px solid #e5ecf5; vertical-align: middle; color: #3d5573; }
.code-history-table td:first-child { min-width: 215px; }
.code-history-table td:nth-child(2) { min-width: 185px; }
.code-history-table td:nth-child(4) { min-width: 155px; }
.code-history-table code { display: block; font-size: 13px; color: #183f6c; white-space: nowrap; }
.code-history-table strong { display: block; font-size: 12px; font-weight: 500; }
.code-history-table small { display: block; margin-top: 5px; color: #8491a3; line-height: 1.6; }
.code-history-table .text-btn { padding: 4px 0; margin-top: 4px; }
.code-history-status { display: inline-flex; border-radius: 20px; padding: 5px 10px; font-size: 12px; white-space: nowrap; background: #edf1f5; color: #65748a; }
.code-history-status.code-used { background: #dff5eb; color: #12825e; }
.code-history-status.code-unused,.code-history-status.code-reserved { background: #fff2dc; color: #a16b16; }
.code-history-status.code-pending { background: #e8efff; color: #245cb4; }
.code-history-status.code-void { background: #fde8e8; color: #b84242; }
.code-history-pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 16px; color: #78879c; font-size: 12px; }
.code-history-pager span { margin-right: auto; }
.code-history-actions { display: grid; gap: 7px; min-width: 82px; }
.code-history-actions .void-history-code { color: #bd3d48; }
.code-void-dialog { width: min(460px,calc(100vw - 32px)); padding: 26px; border: 1px solid #dce6f0; border-radius: 18px; color: #254568; box-shadow: 0 24px 90px #12345833; }
.code-void-dialog::backdrop { background: #0c244b70; }
.code-void-dialog h2 { margin: 0 0 18px; font-size: 20px; }
.code-void-dialog p { line-height: 1.8; overflow-wrap: anywhere; }
.code-void-dialog>div { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.code-panel .code-result button { margin-top: 10px; }
.code-stock-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
#view-admin .admin-nav button[hidden],.code-stock-actions button[hidden],.code-panel label[hidden] { display: none !important; }
.code-panel>p { color: #6c7e96; font-size: 13px; line-height: 1.8; }
.code-void-dialog label { display: grid; gap: 8px; font-size: 13px; }
.code-void-dialog input { min-width: 0; width: 100%; border: 1px solid #d8e3f0; border-radius: 9px; padding: 11px; }
@media(max-width:800px) {
  #view-admin .code-history-stats,#view-admin .code-panel .form-grid,.code-history-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #view-admin .code-panel .form-grid label:nth-child(2) { grid-column: 1 / -1; }
  .code-history-filters .code-history-keyword { grid-column: 1 / -1; }
  .code-history-panel { padding: 14px; }
  .code-history-panel .panel-title { align-items: flex-start; }
  .code-history-toolbar #exportCodeHistory { margin-left: 0; }
}
@media(max-width: 800px) {
  #examDialog:not(.memorize-dialog) .exam-layout { grid-template-rows: auto 185px minmax(0, 1fr); }
  .sheet-sections { padding-bottom: 8px; }
  .answer-sheet .sheet-legend { padding: 6px 0; font-size: 10px; }
  .sheet-legend > span { flex-direction: row; justify-content: center; gap: 4px; }
  .sheet-legend .legend { width: 10px; height: 10px; flex-shrink: 0; }
  .exam-domain-watermark { top: 185px; font-size: 25px; }
}
@media (max-width: 800px) {
  #examDialog:not(.memorize-dialog) .exam-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: auto 185px minmax(0,1fr); }
  #examDialog:not(.memorize-dialog) .exam-top { grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; padding: 11px 14px; }
  #examDialog:not(.memorize-dialog) #examTitle { grid-column: 1 / -1; grid-row: 2; text-align: left; font-size: 13px; }
  .exam-top .exam-current-subject { font-size: 14px; }
  .exam-top-actions { grid-column: 2; grid-row: 1; gap: 6px; }
  .exam-top-actions #timer { width: 100%; text-align: right; font-size: 13px; }
  #examDialog:not(.memorize-dialog) .exam-top-actions button { min-height: 34px; padding: 5px 7px; font-size: 12px; }
  #examDialog:not(.memorize-dialog) .answer-sheet { grid-column: 1; grid-row: 2; border-right: 0; border-bottom: 1px solid #dce7f2; }
  #examDialog:not(.memorize-dialog) .question-area { grid-column: 1; grid-row: 3; }
  .sheet-heading { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
  .sheet-heading h3 { margin: 0; font-size: 14px; }
  .sheet-section { padding-top: 10px; }
  .sheet-section h4 { margin-bottom: 7px; font-size: 14px; }
  .answer-sheet .sheet-section .sheet-grid { grid-template-columns: repeat(auto-fill,minmax(32px,1fr)); gap: 6px; }
  .sheet-section .sheet-grid button { min-height: 32px; aspect-ratio: auto; }
  #examDialog:not(.memorize-dialog) .question-actions { gap: 10px; flex-wrap: wrap; }
  #examDialog:not(.memorize-dialog) .question-actions>div { flex-wrap: wrap; }
}


/* Own-account nickname and avatar editor. */
.avatar{overflow:hidden}.avatar img{display:block;width:100%;height:100%;object-fit:cover}
.account-profile-panel{border-bottom:1px solid #e3eaf3;margin-bottom:22px;padding-bottom:20px}.account-profile-panel h3{font-size:16px;margin:0 0 10px}.profile-login-hint{font-size:12px;color:#6c7e96;overflow-wrap:anywhere}.account-profile-panel form{margin-top:14px}.profile-avatar-editor{display:flex;gap:16px;align-items:center}.profile-avatar-editor>.avatar{width:72px;height:72px;flex:0 0 72px;border-radius:50%;display:grid;place-items:center;background:#e8f1ff;color:#1c62ad;font-size:28px}.profile-avatar-editor label{min-width:0;flex:1}.profile-avatar-editor input{max-width:100%;width:100%;padding:8px;font-size:12px}.profile-avatar-editor small{display:block;font-size:12px;color:#6c7e96;line-height:1.7}.profile-avatar-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:12px}.profile-status{font-size:13px;color:#35668e;line-height:1.6;overflow-wrap:anywhere;min-height:1em}.account-profile-panel button:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:520px){.profile-avatar-editor{align-items:flex-start;gap:12px}.profile-avatar-editor>.avatar{width:56px;height:56px;flex-basis:56px}.account-profile-panel form>button{width:100%}}

.account-dialog{width:min(500px,calc(100vw - 36px))}.account-profile-panel form{border:0;padding:0;margin:12px 0;gap:8px}.account-body .profile-status{margin:4px 0 0;min-height:0}.profile-status:empty{display:none}#profileForm{grid-template-columns:minmax(0,1fr) auto;align-items:end}#profileForm .profile-status{grid-column:1/-1}.account-body .profile-login-hint{margin:0 0 12px}@media(max-width:520px){#profileForm{grid-template-columns:1fr}}

/* Order delivery confirmation. */
.order-created-dialog { width: min(560px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
.order-created-dialog .dialog-head h2 { font-size: 21px; }
.order-created-body { padding: 24px; }
.order-created-state { display: inline-block; padding: 5px 10px; border-radius: 16px; background: #e7f7f0; color: #13865a; font-size: 12px; font-weight: 700; }
.order-created-body h3 { margin: 15px 0 6px; color: #173b61; font-size: 21px; overflow-wrap: anywhere; }
.order-created-number { margin: 0 0 20px; color: #6c7e96; font-size: 12px; overflow-wrap: anywhere; }
.order-created-codes { display: grid; gap: 12px; }
.order-created-codes label { display: grid; gap: 9px; padding: 15px; border: 1px solid #dce6f2; border-radius: 10px; background: #f6f9fe; font-weight: 700; color: #254568; }
.order-created-codes input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: #1558b6; font: 700 20px/1.5 Consolas,monospace; letter-spacing: .04em; }
.order-created-codes input:focus { outline: 2px solid #a6c5f5; outline-offset: 4px; }
.order-created-hint { margin: 18px 0 0; font-size: 13px; line-height: 1.8; color: #6c7e96; }
.order-created-feedback { margin: 12px 0 0; color: #13865a; font-size: 13px; }
.order-created-feedback:empty { display: none; }
.order-created-feedback.copy-error { color: #bd4242; }
.order-created-actions { display: flex; gap: 12px; margin-top: 22px; }
.order-created-actions .primary { flex: 1; }
@media(max-width:520px) { .order-created-body { padding: 20px; } .order-created-dialog .dialog-head { padding: 17px 20px; } .order-created-codes label { padding: 12px; } .order-created-codes input { font-size: 18px; letter-spacing: 0; } }
.activation-delivery-panel { display: grid; gap: 12px; min-width: 0; }
.activation-delivery-lead { margin: 4px 0 0; color: #61758d; font-size: 13px; line-height: 1.7; }
.activation-message { min-width: 0; padding: 12px; border: 1px solid #dce6f2; border-radius: 12px; background: #f6f9fe; }
.activation-message-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.activation-message h4 { margin: 0; font-size: 15px; color: #254568; }
.activation-message-head button { flex: none; min-height: 40px; padding: 8px 12px; font-size: 13px; }
.activation-message textarea { display: block; width: 100%; min-width: 0; box-sizing: border-box; margin: 0; padding: 12px; border: 1px solid #d5e1ef; border-radius: 8px; background: #fff; color: #263d56; font-size: 14px; line-height: 1.8; font-family: inherit; resize: vertical; overflow-wrap: anywhere; }
.code-panel .activation-message-head button { margin-top: 0; }
.activation-message textarea.activation-instructions-text { height: 136px; min-height: 120px; max-height: 440px; font-size: 14px; line-height: 1.8; }
.activation-message textarea.activation-codes-text { height: auto; min-height: 88px; max-height: 250px; color: #1558b6; font: 600 14px/1.9 Consolas,"Microsoft YaHei",monospace; }
.activation-message small { display: block; margin-top: 8px; color: #6c7e96; font-size: 12px; line-height: 1.6; }
.activation-delivery-status { margin: 0; color: #13865a; font-size: 13px; line-height: 1.7; }
.activation-delivery-status.copy-error { color: #bd4242; }
.order-created-dialog { width: min(620px,calc(100vw - 32px)); }
.order-created-dialog .dialog-head { position: sticky; top: 0; z-index: 1; padding: 16px 20px; background: #fff; }
.order-created-body { padding: 16px 20px; }
.order-created-body h3 { margin: 10px 0 4px; font-size: 19px; }
.order-created-number { margin-bottom: 10px; }
.order-created-dialog .order-created-actions { justify-content: flex-end; margin-top: 12px; }
@media(max-width:520px) {
  .order-created-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .order-created-body { padding: 16px; }
  .activation-delivery-panel { gap: 12px; }
  .activation-message { padding: 12px; }
  .activation-message-head { gap: 8px; }
  .activation-message-head button { padding: 8px 10px; }
  .activation-message textarea { padding: 10px; }
  .activation-message textarea.activation-instructions-text { height: 160px; }
  .activation-message textarea.activation-codes-text { min-height: 120px; font-size: 13px; }
}

/* Mobile answering gives the reading pane the screen; the answer card opens on demand. */
.mobile-sheet-toggle,.exam-check-short { display: none; }
@media(max-width:800px) {
  html:has(#examDialog[open]:not(.memorize-dialog)) { overflow: hidden; }
  #examDialog:not(.memorize-dialog) {
    position: fixed; inset: 0; width: 100vw; max-width: none;
    height: 100vh; height: 100dvh; max-height: none;
    margin: 0; padding: 0; border: 0; border-radius: 0;
    background: white; overscroll-behavior: contain;
  }
  #examDialog:not(.memorize-dialog) .exam-layout { min-height: 0; grid-template-rows: auto auto minmax(0,1fr); }
  #examDialog:not(.memorize-dialog) .exam-top { min-height: 0; gap: 5px 8px; padding: calc(7px + env(safe-area-inset-top,0px)) 12px 7px; }
  #examDialog:not(.memorize-dialog) .exam-context { gap: 3px; }
  #examDialog:not(.memorize-dialog) .exam-mode-badge { font-size: 10px; padding: 2px 7px; }
  #examDialog:not(.memorize-dialog) .exam-current-subject { font-size: 14px; line-height: 1.4; }
  #examDialog:not(.memorize-dialog) #examTitle {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; max-width: none; font-size: 12px; line-height: 1.4;
  }
  #examDialog:not(.memorize-dialog) .exam-top-actions { display: grid; grid-template-columns: auto auto; gap: 3px 5px; }
  #examDialog:not(.memorize-dialog) #timer { grid-column: 1 / -1; font-size: 12px; line-height: 1.35; }
  #examDialog:not(.memorize-dialog) .exam-top-actions button { min-height: 32px; padding: 4px 7px; font-size: 12px; }
  #examDialog:not(.memorize-dialog) .answer-sheet { height: auto; padding: 0 12px; background: #f4f7fc; }
  #examDialog:not(.memorize-dialog) .sheet-heading { min-height: 44px; padding: 0; border: 0; background: transparent; }
  #examDialog:not(.memorize-dialog) .sheet-desktop-label { display: none; }
  #examDialog:not(.memorize-dialog) .mobile-sheet-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
    padding: 0 10px 0 0; border: 0; background: transparent;
    color: #21486e; font: inherit; font-weight: 700; cursor: pointer;
  }
  #examDialog:not(.memorize-dialog) .mobile-sheet-toggle span { color: #697f97; font-size: 12px; font-weight: 400; }
  #examDialog:not(.memorize-dialog) .sheet-summary { font-size: 12px; }
  #examDialog:not(.memorize-dialog) .sheet-summary b { font-size: 15px; }
  #examDialog:not(.memorize-dialog) .answer-sheet:not(.sheet-expanded) .sheet-sections,
  #examDialog:not(.memorize-dialog) .answer-sheet:not(.sheet-expanded) .sheet-legend { display: none; }
  #examDialog:not(.memorize-dialog) .answer-sheet.sheet-expanded { height: min(340px,48vh); height: min(340px,48dvh); }
  #examDialog:not(.memorize-dialog) .sheet-sections { overscroll-behavior: contain; }
  #examDialog:not(.memorize-dialog) .question-area {
    padding-bottom: calc(82px + env(safe-area-inset-bottom,0px));
    overscroll-behavior: contain; scrollbar-gutter: auto; -webkit-overflow-scrolling: touch;
  }
  #examDialog:not(.memorize-dialog) .question-card { margin: 0; padding: 14px 16px 20px; border-radius: 0; }
  #examDialog:not(.memorize-dialog) .question-card > h2 { margin: 8px 0 14px; font-size: 17px; font-weight: 600; line-height: 1.8; }
  #examDialog:not(.memorize-dialog) .q-type { font-size: 12px; }
  #examDialog:not(.memorize-dialog) .exam-options .option { min-height: 50px; align-items: flex-start; gap: 10px; padding: 12px; margin: 9px 0; font-size: 16px; line-height: 1.65; }
  #examDialog:not(.memorize-dialog) .exam-options .option > span { flex: 0 0 26px; width: 26px; height: 26px; font-size: 14px; }
  #examDialog:not(.memorize-dialog) .case-material { padding: 12px; font-size: 16px; }
  #examDialog:not(.memorize-dialog) .answer-result-analysis { padding: 14px; font-size: 16px; }
  #examDialog:not(.memorize-dialog) .answer-result-analysis .question-text { line-height: 1.8; }
  #examDialog:not(.memorize-dialog) .question-actions > div {
    position: fixed; inset: auto 0 0; z-index: 4;
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom,0px));
    border-top: 1px solid #dce5ef; background: white; box-shadow: 0 -4px 16px #173b6009;
  }
  #examDialog:not(.memorize-dialog) .question-actions.has-check-answer > div { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #examDialog:not(.memorize-dialog) .question-actions > div > button { min-width: 0; min-height: 44px; padding: 8px 5px; font-size: 14px; }
  #examDialog:not(.memorize-dialog) .exam-check-full { display: none; }
  #examDialog:not(.memorize-dialog) .exam-check-short { display: inline; }
}

/* The mobile course picker shows every exam category without horizontal scrolling. */
.mobile-activation-label { display: none; }
@media(max-width:800px) {
  .desktop-activation-label { display: none; }
  .mobile-activation-label { display: inline; }
  .topbar .nav-btn[data-view="activate"] { white-space: nowrap; }
  #courseDialog { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
  #courseDialog .dialog-head { position: sticky; top: 0; z-index: 1; background: white; }
  #courseDialog .course-dialog-body { display: grid; grid-template-columns: minmax(0,1fr); min-height: 0; }
  #courseDialog .exam-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 12px; overflow: visible; }
  #courseDialog .exam-item { width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: 9px 10px; border: 1px solid #e0e7f0; background: white; text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.55; font-size: 13px; }
  #courseDialog .exam-item.active { border-color: #8ab6e5; background: #eaf3ff; box-shadow: none; }
  #courseDialog .subject-list { min-width: 0; padding: 14px; }
  #courseDialog .subject-item { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
}

/* Search stays out of the reading flow until the learner opens it. */
.exam-question-type-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.question-search-open { padding: 6px 12px; border: 1px solid #cbdcf0; border-radius: 8px; background: #f5f9ff; color: #1b5b9b; font: inherit; font-size: 13px; cursor: pointer; }
.exam-question-search { width: min(660px,calc(100vw - 28px)); max-height: min(740px,88dvh); padding: 0; border: 1px solid #d8e3ef; border-radius: 16px; color: #173b61; background: white; overflow: hidden; box-shadow: 0 22px 80px #102d4a40; }
.exam-question-search[open] { display: flex; flex-direction: column; }
.exam-question-search::backdrop { background: #18334a70; }
.exam-question-search > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid #e2e9f3; }
.exam-question-search h2 { margin: 0; font-size: 20px; }
.exam-question-search header p { margin: 7px 0 0; color: #72839a; font-size: 13px; }
.exam-question-search header button { flex: 0 0 36px; height: 36px; border: 0; border-radius: 8px; color: #6d809a; background: #f0f4fa; font-size: 25px; cursor: pointer; }
.exam-question-search-input { padding: 16px 22px 0; }
.exam-question-search-input label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.exam-question-search-input input { box-sizing: border-box; width: 100%; min-height: 44px; border: 1px solid #bacfe8; border-radius: 9px; padding: 10px 12px; background: #fbfcff; color: #173b61; font: inherit; font-size: 16px; }
.exam-question-search-input p { margin: 10px 0; color: #71819a; font-size: 12px; line-height: 1.6; }
.exam-question-search-results { min-height: 90px; overflow-y: auto; padding: 0 22px 22px; overscroll-behavior: contain; }
.exam-question-search-results > button { display: block; width: 100%; text-align: left; margin: 9px 0 0; padding: 13px 14px; border: 1px solid #dce5f0; border-radius: 10px; background: #f8faff; cursor: pointer; }
.exam-question-search-results > button:hover,.exam-question-search-results > button:focus-visible { background: #edf5ff; border-color: #8bb5e6; outline: 2px solid #b7d2f4; outline-offset: 1px; }
.exam-question-search-results button span { display: block; margin-bottom: 7px; color: #2464a4; font-size: 12px; }
.exam-question-search-results button strong { color: #294866; font-size: 14px; font-weight: 500; line-height: 1.8; overflow-wrap: anywhere; }
.exam-question-search-empty { margin: 16px 0; color: #7b8ba0; font-size: 14px; line-height: 1.8; }
@media(max-width:800px) {
  .question-search-open { min-height: 32px; padding: 5px 9px; font-size: 12px; }
  .exam-question-search { width: calc(100vw - 20px); max-height: 88dvh; border-radius: 12px; }
  .exam-question-search > header { padding: 16px; }
  .exam-question-search-input { padding: 14px 16px 0; }
  .exam-question-search-results { padding: 0 16px 16px; }
}

/* Chapters and specials share practice / memorize choices. */
@media(min-width:801px){.mode-grid.practice-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:760px;margin:0 auto}}
@media(max-width:800px){
  .mode-dialog:has(.practice-mode-grid){width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
  .mode-dialog:has(.practice-mode-grid) .mode-dialog-head{padding:14px 16px}
  .mode-dialog:has(.practice-mode-grid) .mode-dialog-head h2{font-size:20px}
  .mode-dialog:has(.practice-mode-grid) .mode-dialog-head p{font-size:12px;line-height:1.5}
  .mode-grid.practice-mode-grid{padding:12px;gap:10px;max-height:calc(100dvh - 148px)}
  .practice-mode-grid .mode-card{padding:14px;min-height:0}
  .practice-mode-grid .mode-icon{width:32px;height:32px;font-size:23px;border-radius:8px;margin-bottom:0}
  .practice-mode-grid .mode-card h3{font-size:17px;margin:6px 0}
  .practice-mode-grid .mode-card>p{font-size:12px;line-height:1.5;min-height:0;margin-bottom:4px}
  .practice-mode-grid .mode-card ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px;padding-left:16px;font-size:12px;line-height:1.6;margin:4px 0 10px}
  .practice-mode-grid .mode-card>button{padding:10px 12px}
}

/* Restart controls, reviewed 2026-10-28. */
.restart-exam { white-space: nowrap; }
#examDialog .exam-top-actions .restart-exam { color: #245b98; border-color: #c5d9ef; background: #f5f9ff; }
#examDialog .restart-exam:focus-visible { outline: 2px solid #4382c6; outline-offset: 2px; }
@media(max-width:800px){
  #examDialog:not(.memorize-dialog) .exam-top-actions { grid-template-columns: repeat(3,auto); }
  #examDialog:not(.memorize-dialog) .exam-top-actions button { padding-inline: 6px; }
  #examDialog.memorize-dialog .memorize-header-actions .restart-exam { min-height: 32px; }
}

/* Personal center and account support, reviewed locally before publishing. */
.profile-menu-wrap { position:relative; flex-shrink:0; }
.profile-dropdown { position:absolute; top:100%; right:0; z-index:60; width:156px; padding:8px; border:1px solid #dce6f1; border-radius:12px; background:#fff; box-shadow:0 12px 32px #173b6124; }
.profile-dropdown[hidden] { display:none; }
.profile-dropdown button { display:block; width:100%; padding:12px 14px; border:0; border-radius:8px; background:transparent; color:#254c72; text-align:left; font:inherit; cursor:pointer; }
.profile-dropdown button:hover,.profile-dropdown button:focus-visible { background:#edf5ff; color:#1766b6; outline:2px solid #bad6f2; }
.profile-dropdown button:last-child { color:#b44848; }
#accountDialog.account-center-dialog { width:min(1080px,calc(100vw - 48px)); height:min(820px,calc(100dvh - 48px)); max-width:none; max-height:none; padding:0; overflow:hidden; }
#accountDialog.account-center-dialog[open] { display:flex; flex-direction:column; }
#accountDialog .dialog-head { padding:18px 24px; margin:0; border-bottom:1px solid #e2eaf3; }
#accountDialog>.dialog-head { flex-shrink:0; }
#accountDialog .dialog-head h2 { margin:3px 0 0; font-size:23px; }
#accountDialog .account-layout { display:grid; grid-template-columns:216px minmax(0,1fr); flex:1; min-height:0; }
#accountDialog .account-sidebar { background:#f2f6fb; border-right:1px solid #e2eaf3; overflow:auto; }
#accountDialog .account-identity { display:flex; flex-direction:column; align-items:center; gap:12px; padding:25px 14px; text-align:center; overflow-wrap:anywhere; }
#accountDialog .account-identity .avatar { width:68px; height:68px; font-size:28px; }
#accountDialog .account-identity strong { max-width:100%; }
#accountDialog .account-sidebar nav { display:grid; height:auto; grid-auto-rows:min-content; align-content:start; gap:3px; padding:0 10px 16px; }
#accountDialog [data-account-tab] { min-height:48px; width:100%; padding:12px 18px; border:0; border-radius:9px; background:transparent; color:#587088; text-align:left; font:inherit; cursor:pointer; }
#accountDialog [data-account-tab][aria-selected="true"] { color:#195eaa; background:#e0edfc; font-weight:700; }
#accountDialog [data-account-tab]:focus-visible { outline:2px solid #347fca; outline-offset:-2px; }
#accountDialog .account-body { min-width:0; max-height:none; margin:0; padding:22px 30px 32px; overflow-y:auto; overscroll-behavior:contain; }
#accountDialog #accountRole { margin:0 0 20px; color:#7a8ba0; font-size:12px; }
#accountDialog .account-section[hidden] { display:none!important; }
#accountDialog .account-section h3 { margin:0 0 20px; padding-bottom:15px; border-bottom:1px solid #e4ebf3; font-size:19px; }
#accountDialog .account-profile-panel { margin:0; padding:0; border:0; background:transparent; }
#accountDialog form { max-width:560px; }
#accountDialog #profileForm { grid-template-columns:1fr; align-items:stretch; }
#accountDialog #profileForm>button { justify-self:start; }
#accountDialog form label,.user-reset-body>label { display:grid; gap:8px; margin:15px 0; color:#4c637d; font-size:14px; }
#accountDialog form input:not([type="radio"]):not([type="file"]),#accountDialog form textarea,#accountDialog form select,.user-reset-body input { box-sizing:border-box; min-width:0; width:100%; padding:11px 12px; border:1px solid #ccdbea; border-radius:8px; background:#fff; color:#173b61; font:inherit; }
#accountDialog input[readonly] { background:#f2f5f9!important; color:#6c7f94!important; }
#accountDialog form textarea { resize:vertical; line-height:1.7; }
#accountDialog #signatureCount { text-align:right; color:#7c8fa4; }
#accountDialog .profile-gender { display:flex; flex-wrap:wrap; gap:20px; margin:15px 0; padding:0; border:0; }
#accountDialog .profile-gender legend { margin-bottom:10px; color:#4c637d; font-size:14px; }
#accountDialog .profile-gender label { display:flex; align-items:center; gap:7px; margin:0; }
#accountDialog .profile-gender input { width:17px; height:17px; accent-color:#2167b7; }
#accountDialog .profile-avatar-editor { display:flex; gap:16px; align-items:center; }
#accountDialog .profile-avatar-editor .avatar { flex:0 0 56px; width:56px; height:56px; }
#accountDialog .profile-avatar-actions { display:flex; flex-wrap:wrap; gap:12px; margin:10px 0 0; }
#accountDialog .account-help { color:#71839a; font-size:13px; line-height:1.8; }
#accountDialog #accountEmailPanel,#accountDialog .device-panel { margin-top:26px; padding-top:20px; border-top:1px solid #e4ebf3; }
#accountDialog .account-guide { padding-left:23px; line-height:1.8; }
#accountDialog .account-guide li { padding:0 0 18px 6px; }
#accountDialog .account-guide p { margin:5px 0 0; color:#5c7189; font-size:14px; }
.account-record { margin:15px 0; padding:18px; border:1px solid #dfe8f2; border-radius:12px; background:#fff; }
.account-record header { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; align-items:center; }
.account-record small { display:block; color:#8090a4; font-size:12px; line-height:1.7; }
.account-order-item { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; padding-top:15px; margin-top:15px; border-top:1px solid #edf1f6; }
.account-order-item p { margin:7px 0; color:#5d748e; font-size:13px; }
.account-status { flex-shrink:0; display:inline-block; padding:4px 8px; border-radius:6px; background:#edf1f6; color:#71839a; font-size:12px; }
.account-status.good { background:#e4f6ed; color:#238060; }
.account-feedback-text { color:#3e5771; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
.account-about-brand { display:flex; align-items:center; gap:14px; font-size:22px; padding:15px 0 20px; }
.user-account-search form { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; }
.user-account-search label { flex:1 1 260px; display:grid; gap:8px; font-size:14px; }
.user-account-search input { box-sizing:border-box; width:100%; min-height:42px; padding:10px 12px; border:1px solid #c9daec; border-radius:8px; font:inherit; }
.user-account-search p { color:#73869b; font-size:13px; line-height:1.8; margin:15px 0 0; }
dialog.user-password-reset { box-sizing:border-box; width:min(510px,calc(100vw - 24px)); padding:0; max-height:calc(100dvh - 24px); overflow:auto; border:0; border-radius:15px; color:#254965; }
.user-password-reset .dialog-head { padding:20px 22px; border-bottom:1px solid #e2eaf3; }
.user-password-reset h2 { margin:4px 0 0; font-size:22px; }
.user-reset-body { padding:12px 22px 24px; line-height:1.8; }
.reset-account-name { display:block; color:#194e86; font-size:22px; overflow-wrap:anywhere; }
.user-reset-actions { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin-top:22px; }
.user-reset-body input { font-family:ui-monospace,monospace; }
@media(max-width:800px){
  #accountDialog.account-center-dialog { width:100vw; height:100dvh; margin:0; border-radius:0; }
  #accountDialog .dialog-head { padding:12px 16px; }
  #accountDialog .dialog-head h2 { font-size:20px; }
  #accountDialog .account-layout { display:flex; flex-direction:column; }
  #accountDialog .account-sidebar { flex-shrink:0; border:0; border-bottom:1px solid #e2eaf3; overflow:visible; }
  #accountDialog .account-identity { flex-direction:row; justify-content:flex-start; gap:10px; padding:10px 14px; text-align:left; }
  #accountDialog .account-identity .avatar { width:32px; height:32px; font-size:16px; flex-shrink:0; }
  #accountDialog .account-sidebar nav { grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; padding:0 10px 10px; }
  #accountDialog [data-account-tab] { min-height:40px; padding:10px 3px; text-align:center; font-size:13px; }
  #accountDialog .account-body { flex:1; min-height:0; padding:16px; }
  #accountDialog form input:not([type="radio"]):not([type="file"]),#accountDialog form textarea,#accountDialog form select { font-size:16px; }
  #accountDialog .profile-avatar-editor { align-items:flex-start; gap:10px; }
  #accountDialog .profile-avatar-editor label { min-width:0; }
  #accountDialog .profile-avatar-editor input[type="file"] { width:100%; font-size:12px; }
  .user-reset-actions button { min-height:42px; }
  .account-record { padding:13px; }
  .account-order-item { gap:8px; }
}

/* Account help, reply-email contact and daily encouragement. */
#accountDialog #accountFeedbackForm { gap:14px; margin-top:18px; padding-top:18px; }
#accountDialog #accountFeedbackForm label { margin:0; gap:7px; }
#accountDialog #accountFeedbackForm .account-help { margin:0; font-size:12px; }
#accountDialog #accountFeedbackStatus:empty { display:none; }
.feedback-reply-address { min-width:0; overflow-wrap:anywhere; word-break:break-word; }
.feedback-contact { display:grid; gap:12px; padding:14px; margin:16px 0; background:#f2f7fc; border-radius:9px; font-size:14px; }
.feedback-contact-actions { display:flex; flex-wrap:wrap; gap:10px; }
.feedback-mail-reply { display:inline-flex; align-items:center; justify-content:center; padding:10px 14px; border:1px solid #cad9ea; border-radius:8px; background:#fff; color:#245a91; text-decoration:none; font-size:14px; }
#accountDialog .account-guide-list { list-style:none; padding:0; margin:18px 0 0; }
#accountDialog .account-guide-list>li { padding:0; margin:0 0 12px; }
#accountDialog .account-guide-list details { border:1px solid #dfe8f2; border-radius:11px; overflow:hidden; }
#accountDialog .account-guide-list summary { display:flex; align-items:center; gap:12px; padding:16px; cursor:pointer; list-style:none; color:#2e5378; font-size:15px; line-height:1.6; }
#accountDialog .account-guide-list summary::-webkit-details-marker { display:none; }
#accountDialog .account-guide-list summary::after { content:'⌄'; margin-left:auto; color:#7a97b7; font-size:20px; }
#accountDialog .account-guide-list details[open] summary { background:#edf5ff; }
#accountDialog .account-guide-list details[open] summary::after { transform:rotate(180deg); }
#accountDialog .account-guide-list summary:focus-visible { outline:2px solid #397bc0; outline-offset:-3px; }
#accountDialog .guide-number { flex-shrink:0; font-size:12px; color:#3b78b8; background:#e3effc; padding:4px 7px; border-radius:6px; }
#accountDialog .account-guide-detail { padding:0 18px 12px; }
#accountDialog .account-guide-detail p { margin:12px 0 0; line-height:1.85; }
#accountDialog .account-content-section { margin:22px 0 28px; line-height:1.85; color:#526c87; font-size:14px; }
#accountDialog .account-content-section h4 { margin:0 0 14px; padding-bottom:10px; border-bottom:2px solid #4b93da; color:#284e74; font-size:17px; }
#accountDialog .account-feature-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
#accountDialog .account-feature-grid article { border-left:3px solid #5c9ee0; border-radius:9px; padding:15px; background:#f3f7fc; }
#accountDialog .account-feature-grid strong { color:#2d70b1; }
#accountDialog .account-feature-grid p { margin:7px 0 0; }
#accountDialog .account-about-note { padding:14px 16px; border-radius:9px; color:#71849a; background:#f6f8fb; font-size:12px; line-height:1.85; }
#accountDialog .account-motivation-card { padding:20px; border-radius:13px; background:linear-gradient(130deg,#397ed0,#7363ae); color:#fff; }
#accountDialog .account-motivation-card header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
#accountDialog .account-motivation-card header strong { display:block; font-size:15px; }
#accountDialog .account-motivation-card header small { display:block; margin-top:7px; color:#e2ebff; font-size:12px; }
#accountDialog #changeMotivationQuote { flex-shrink:0; padding:8px 11px; border:1px solid #ffffff55; border-radius:7px; background:#ffffff20; color:#fff; font:inherit; font-size:12px; cursor:pointer; }
#accountDialog #changeMotivationQuote:hover { background:#ffffff38; }
#accountDialog #changeMotivationQuote:focus-visible { outline:2px solid #fff; outline-offset:3px; }
#accountDialog #accountMotivationQuote { margin:20px 0 16px; font-size:23px; line-height:1.8; font-weight:600; text-align:center; }
#accountDialog .account-motivation-card>p { text-align:center; font-size:12px; color:#e9e7ff; margin:0; }
#accountDialog .account-tips-panel { padding:18px; margin-top:20px; border:1px solid #e1eaf4; border-radius:12px; background:#f4f8fc; }
#accountDialog .account-tips-panel h4 { margin:0 0 12px; color:#2b6ca9; font-size:17px; }
#accountDialog .account-learning-tips { list-style:none; padding:0; margin:0; display:grid; gap:8px; }
#accountDialog .account-learning-tips li { display:flex; align-items:flex-start; gap:12px; padding:12px; border-radius:8px; background:#fff; color:#3b5f80; font-size:14px; }
#accountDialog .account-learning-tips li>span { flex-shrink:0; font-size:18px; }
#accountDialog .account-learning-tips strong { font-size:14px; }
#accountDialog .account-learning-tips p { margin:6px 0 0; font-size:13px; line-height:1.8; color:#71859b; }
@media(max-width:800px){
  #accountDialog .account-sidebar nav { grid-template-columns:repeat(4,minmax(0,1fr)); }
  #accountDialog .account-feature-grid { grid-template-columns:1fr; }
  #accountDialog .account-guide-list summary { gap:9px; padding:13px 11px; font-size:14px; }
  #accountDialog .account-guide-detail { padding:0 13px 12px; }
  #accountDialog .account-motivation-card { padding:17px; }
  #accountDialog #accountMotivationQuote { font-size:19px; margin:22px 0 20px; }
  #accountDialog .account-tips-panel { padding:15px; }
  #accountDialog .account-learning-tips li { padding:12px; gap:9px; }
  .feedback-contact-actions>* { min-height:42px; }
}

/* 20261103: wrap long imported formula text in mobile answer options. */
@media (max-width: 720px) {
  #examDialog .memorize-option > span,
  #examDialog .exam-options .option > div { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
}

/* Refund/recovery review: explicit steps and mobile-safe controls. */
.recovery-dialog{width:min(680px,calc(100vw - 24px));max-height:90dvh;overflow:auto;box-sizing:border-box}.recovery-dialog>.recovery-facts{display:block;background:#f3f7ff;padding:14px;border-radius:12px;overflow-wrap:anywhere}.recovery-facts p{margin:8px 0}.recovery-step{color:#456b92}.recovery-warning{padding:12px;background:#fff6e8;border-left:3px solid #e7a33d;line-height:1.7}.recovery-ack{display:flex!important;align-items:flex-start;gap:8px}.recovery-ack input{width:auto!important;flex:0 0 auto}.recovery-actions{display:flex;flex-wrap:wrap;gap:8px}.recovery-actions button{white-space:normal}.recovery-dialog input[data-typed]{width:100%;box-sizing:border-box}.recovery-actions button:disabled{opacity:.45;cursor:not-allowed}@media(max-width:640px){.recovery-dialog{padding:18px}.recovery-actions button{flex:1 1 40%;min-height:44px}}


/* Answer selection must remain visible without CSS :has support. */
#examDialog .exam-options .option { align-items:center; }
#examDialog .exam-options .option input { position:static; opacity:1; width:18px; height:18px; margin:0; flex:0 0 18px; accent-color:#1d64c8; cursor:pointer; }
#examDialog .exam-options .option > span { flex-shrink:0; }
#examDialog .exam-options .option .option-content { min-width:0; flex:1; overflow-wrap:anywhere; }
#examDialog .exam-options .option.is-selected { border-color:#1d64c8; background:#e8f1ff; box-shadow:inset 3px 0 #1d64c8; }
#examDialog .exam-options .option.is-selected > span { background:#1d64c8; color:#fff; }
#examDialog .exam-options .option .option-selected-mark { display:none; flex:0 0 auto; color:#1958a7; font-size:12px; font-weight:700; white-space:nowrap; }
#examDialog .exam-options .option.is-selected .option-selected-mark { display:block; }
#examDialog .exam-options .option.correct-option { background:#e8f8ef; border-color:#51b88a; box-shadow:none; }
#examDialog .exam-options .option.wrong-option { background:#fff0ee; border-color:#e98080; box-shadow:none; }
#examDialog .exam-options .option.correct-option > span { background:#2eae7c; color:white; }
#examDialog .exam-options .option.wrong-option > span { background:#e15b66; color:white; }
#examDialog .exam-options .option.correct-option .option-selected-mark { color:#157950; }
#examDialog .exam-options .option.wrong-option .option-selected-mark { color:#c23d49; }
#examDialog .exam-selection { margin:10px 0; color:#205995; font-size:14px; font-weight:700; }
#examDialog .answer-result-analysis { min-width:0; overflow-wrap:anywhere; }
#examDialog .exam-feedback { scroll-margin-top:12px; }
@media(max-width:800px){
  #examDialog .exam-options .option input { margin-top:4px; }
  #examDialog .exam-options .option .option-selected-mark { font-size:11px; }
}
