:root {
  --paper: #f5f0e5;
  --paper-deep: #e8d1ab;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #272823;
  --ink-soft: #5d5d55;
  --line: #d9cfbd;
  --gold: #b77b29;
  --gold-bright: #d7a24f;
  --wood: #805027;
  --blue-deep: #173c61;
  --blue: #167fc0;
  --blue-bright: #38a7e8;
  --success: #2f7757;
  --danger: #b3453f;
  --warning: #a76819;
  --shadow: 0 12px 34px rgba(50, 42, 28, 0.1);
  --header-height: 68px;
  --content-width: 1320px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 56px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.2;
  pointer-events: none;
  background-image: url("/static/assets/brand-scene.png");
  background-image: image-set(
    url("/static/assets/optimized/1C-1200.avif") type("image/avif") 1x,
    url("/static/assets/optimized/1C-1200.webp") type("image/webp") 1x
  );
  background-size: 720px auto;
  filter: grayscale(0.72) sepia(0.16);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: rgba(247, 243, 234, 0.93);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  font-family: "STKaiti", "KaiTi", "Noto Serif CJK SC", serif;
  font-size: 38px;
  font-weight: 700;
}

h2 {
  margin-bottom: 8px;
  font-family: "Songti SC", "SimSun", serif;
  font-size: 25px;
}

h3 {
  font-size: 18px;
}

:focus-visible {
  outline: 3px solid #0b5f99;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #ffffff;
}

.skip-link {
  position: fixed;
  display: flex;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 12px;
  min-height: 44px;
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--blue);
  border-radius: 4px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(calc(100% - 48px), var(--content-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(128, 80, 39, 0.14);
  background: rgba(251, 248, 241, 0.95);
  box-shadow: 0 5px 22px rgba(37, 34, 28, 0.06);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: grid;
  grid-template-columns: 230px minmax(560px, 1fr) 220px;
  align-items: center;
  width: min(calc(100% - 48px), var(--content-width));
  min-height: var(--header-height);
  margin-inline: auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  width: max-content;
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: var(--paper);
  background: var(--blue-deep);
  border: 2px solid var(--gold-bright);
  border-radius: 7px;
  box-shadow: inset 0 0 0 3px var(--blue-deep), inset 0 0 0 4px rgba(232, 209, 171, 0.7);
  transform: rotate(45deg);
}

.brand-mark span {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 21px;
  transform: rotate(-45deg);
}

.brand-name {
  color: var(--blue-deep);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 25px;
  font-weight: 800;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  height: var(--header-height);
  gap: 24px;
}

.responsive-art {
  display: block;
  overflow: hidden;
  background: #e9e3d7;
}

.responsive-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--asset-focus-x, 50%) var(--asset-focus-y, 50%);
}

.asset-unavailable {
  min-height: 180px;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, #e9e3d7, #d8e2e7);
}

.desktop-nav a {
  position: relative;
  display: grid;
  align-items: center;
  color: #47483f;
  white-space: nowrap;
}

.desktop-nav a::after {
  position: absolute;
  right: 24%;
  bottom: 0;
  left: 24%;
  height: 3px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--blue-deep);
  font-weight: 700;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  transform: scaleX(1);
}

.profile-entry {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-self: end;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
}

.profile-entry:hover,
.profile-entry.active {
  border-color: rgba(183, 123, 41, 0.34);
  background: rgba(232, 209, 171, 0.22);
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: white;
  background: var(--blue-deep);
  border: 2px solid var(--gold-bright);
  border-radius: 50%;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 18px;
}

.profile-copy {
  display: grid;
  line-height: 1.25;
}

.profile-copy small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
}

.journey-bar {
  border-top: 1px solid rgba(128, 80, 39, 0.1);
  background: rgba(255, 253, 248, 0.72);
}

.journey-inner {
  display: flex;
  align-items: center;
  width: min(calc(100% - 48px), var(--content-width));
  min-height: 37px;
  margin-inline: auto;
}

.journey-label {
  margin-right: 24px;
  color: var(--ink-soft);
  font-size: 12px;
}

.journey-inner ol {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.journey-inner li {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 145px;
  color: #8b887f;
  font-size: 12px;
  gap: 7px;
}

.journey-inner li:not(:last-child)::after {
  width: 62px;
  height: 1px;
  margin-inline: 12px;
  content: "";
  background: #d8d3c9;
}

.journey-inner li span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #c8c2b7;
  border-radius: 50%;
  font-family: "Songti SC", serif;
}

.journey-inner li.current {
  color: var(--blue-deep);
  font-weight: 700;
}

.journey-inner li.current span {
  color: white;
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}

.journey-inner li.complete {
  color: var(--success);
}

.journey-inner li.complete span {
  border-color: var(--success);
  background: rgba(47, 119, 87, 0.12);
}

.mobile-nav {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button.primary {
  color: white;
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}

.button.primary:hover:not(:disabled) {
  background: #20517d;
}

.button.subtle {
  color: var(--blue-deep);
  background: var(--surface);
  border-color: #c8d4df;
}

.button.subtle:hover:not(:disabled) {
  background: #eef5f8;
  border-color: var(--blue);
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--blue-deep);
  font-weight: 700;
}

.text-link:hover {
  color: var(--blue);
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.chapter-tag {
  color: #754616;
  background: #f7e9cc;
  border: 1px solid #dfbd78;
}

.difficulty-tag {
  color: #19547b;
  background: #e5f2f8;
  border: 1px solid #abd0e3;
}

.hall-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  color: #1d2e3a;
  background-image: url("/generated/1A.png");
  background-image: image-set(
    url("/static/assets/optimized/1A-1920.avif") type("image/avif") 1x,
    url("/static/assets/optimized/1A-2560.avif") type("image/avif") 2x,
    url("/static/assets/optimized/1A-1920.webp") type("image/webp") 1x,
    url("/static/assets/optimized/1A-2560.webp") type("image/webp") 2x
  );
  background-position: center 46%;
  background-size: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(247, 235, 210, 0.9) 0%, rgba(246, 238, 220, 0.64) 48%, rgba(13, 47, 76, 0.38) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  align-items: center;
  min-height: 360px;
  gap: 64px;
}

.hero-welcome {
  max-width: 610px;
}

.hero-welcome h1 {
  max-width: 560px;
  margin-bottom: 13px;
  color: #293025;
  font-size: 42px;
}

.hero-welcome > p:last-child {
  max-width: 520px;
  margin-bottom: 0;
  color: #53554d;
  font-size: 16px;
}

.hero-task-panel {
  padding: 24px;
  color: #253039;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.91);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-task-panel h2 {
  margin: 17px 0 6px;
  color: var(--blue-deep);
  font-size: 24px;
}

.hero-task-panel > p {
  color: var(--ink-soft);
}

.hero-task-topline {
  display: flex;
  align-items: center;
  color: var(--ink-soft);
  font-size: 12px;
  gap: 8px;
}

.hero-task-topline strong {
  margin-left: auto;
  color: var(--blue-deep);
}

.hall-task-cover {
  height: 90px;
  margin: 14px 0 12px;
  overflow: hidden;
  border-radius: 6px;
}

.hall-task-art,
.hall-task-art img {
  width: 100%;
  height: 100%;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(47, 119, 87, 0.14);
}

.task-progress,
.diagnosis-progress {
  height: 7px;
  overflow: hidden;
  background: #ddd8cd;
  border-radius: 999px;
}

.task-progress span,
.diagnosis-progress span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  transition: width 260ms ease;
}

.hero-task-actions {
  display: flex;
  align-items: center;
  margin-top: 20px;
  gap: 16px;
}

.task-step {
  color: var(--ink-soft);
  font-size: 12px;
}

.overview-band {
  position: relative;
  z-index: 2;
  color: white;
  background: var(--blue-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 3px solid var(--gold-bright);
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  min-height: 128px;
}

.jmi-overview,
.metric {
  display: flex;
  align-items: center;
  padding: 22px 30px;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
}

.metric:last-child {
  border-right: 0;
}

.jmi-overview {
  gap: 16px;
}

.jmi-overview div:last-child {
  display: grid;
  min-width: 0;
}

.jmi-overview small,
.metric small {
  color: #b9d0e0;
  font-size: 12px;
}

.jmi-overview strong {
  margin-top: 1px;
  font-family: Georgia, serif;
  font-size: 22px;
}

.jmi-overview em {
  color: #f4cf83;
  font-size: 12px;
  font-style: normal;
}

.mini-ring {
  display: grid;
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  place-items: center;
  background: conic-gradient(var(--gold-bright) calc(var(--value) * 1%), rgba(255, 255, 255, 0.14) 0);
  border-radius: 50%;
}

.mini-ring::before {
  grid-area: 1 / 1;
  width: 53px;
  height: 53px;
  content: "";
  background: var(--blue-deep);
  border-radius: 50%;
}

.mini-ring span {
  z-index: 1;
  grid-area: 1 / 1;
  font-size: 22px;
  font-weight: 800;
}

.mini-ring.pending {
  background: #7790a1;
}

.metric strong span.pending-value {
  font-size: 18px;
  font-weight: 700;
}

.metric {
  display: grid;
  min-width: 0;
  align-content: center;
}

.metric strong {
  margin-block: 1px;
  font-size: 28px;
}

.metric strong span {
  font-size: 13px;
  font-weight: 500;
}

.metric strong.level-text {
  font-family: "Songti SC", serif;
  font-size: 19px;
}

.metric p {
  margin: 0;
  color: #8faec4;
  font-size: 11px;
}

.hall-content {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(340px, 0.9fr);
  padding-block: 48px 80px;
  gap: 46px 42px;
}

.dashboard-section {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 20px;
}

.section-heading h2 {
  margin: 0;
}

.quiet-label {
  color: var(--ink-soft);
  font-size: 12px;
}

.current-task-card {
  display: grid;
  grid-template-columns: 43% minmax(0, 1fr);
  min-height: 304px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(55, 46, 31, 0.07);
}

.current-task-card > .responsive-art {
  display: block;
  min-height: 304px;
}

.current-task-card > .responsive-art img {
  width: 100%;
  height: 100%;
  min-height: 304px;
  object-fit: cover;
  object-position: 48% 54%;
}

.current-task-body {
  padding: 28px;
}

.current-task-body h3 {
  margin: 17px 0 10px;
  color: var(--blue-deep);
  font-family: "Songti SC", serif;
  font-size: 23px;
}

.current-task-body > p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  margin-block: 22px;
  color: var(--ink-soft);
  font-size: 12px;
  gap: 15px;
}

.task-meta span + span::before {
  margin-right: 15px;
  color: var(--gold);
  content: "·";
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recommendation-list {
  display: grid;
  gap: 14px;
}

.recommendation-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid #8bb6cf;
  border-radius: 7px;
  background: var(--surface);
}

.recommendation-card.featured {
  border-left-color: var(--gold);
}

.recommendation-card h3 {
  margin: 12px 0 7px;
  color: var(--blue-deep);
}

.recommendation-card p {
  margin-bottom: 13px;
  color: var(--ink-soft);
  font-size: 13px;
}

.recommendation-top {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 11px;
}

.match-score {
  color: var(--success);
  font-weight: 800;
}

.match-chain {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  gap: 7px;
}

.match-chain span {
  padding: 4px 7px;
  color: #615846;
  background: #f2eadb;
  border-radius: 4px;
  font-size: 10px;
}

.match-chain b {
  color: var(--gold);
}

.quick-section,
.timeline-section {
  grid-column: 1 / -1;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-grid a {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  min-height: 92px;
  padding: 16px 22px;
  border-right: 1px solid var(--line);
  column-gap: 13px;
}

.quick-grid a:last-child {
  border-right: 0;
}

.quick-grid a:hover {
  background: rgba(255, 253, 248, 0.72);
}

.quick-symbol {
  display: grid;
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  background: var(--blue-deep);
  border: 2px solid var(--gold-bright);
  border-radius: 50%;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 18px;
}

.quick-grid strong {
  color: var(--blue-deep);
}

.quick-grid small {
  align-self: start;
  color: var(--ink-soft);
}

.timeline {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
  gap: 0;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  min-height: 72px;
  padding-bottom: 18px;
}

.timeline li::before {
  position: absolute;
  top: 8px;
  left: 96px;
  z-index: 1;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--gold);
  border: 3px solid var(--paper);
  border-radius: 50%;
}

.timeline li:not(:last-child)::after {
  position: absolute;
  top: 18px;
  bottom: -3px;
  left: 100px;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline time {
  color: var(--ink-soft);
  font-size: 11px;
}

.timeline div {
  padding-left: 20px;
}

.timeline strong {
  color: var(--blue-deep);
}

.timeline p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

dialog {
  max-width: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 24px 70px rgba(22, 36, 43, 0.28);
}

dialog::backdrop {
  background: rgba(13, 27, 38, 0.62);
  backdrop-filter: blur(3px);
}

.diagnosis-dialog {
  width: min(620px, calc(100% - 32px));
}

.diagnosis-dialog form {
  padding: 28px;
}

.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.dialog-heading h2 {
  margin-bottom: 5px;
}

.dialog-heading p:last-child {
  color: var(--ink-soft);
}

.diagnosis-progress {
  height: 5px;
  margin: 10px 0 26px;
}

.diagnosis-question {
  display: none;
  min-height: 258px;
  padding: 0;
  border: 0;
}

.diagnosis-question.active {
  display: grid;
  align-content: start;
  gap: 10px;
}

.diagnosis-question legend {
  width: 100%;
  margin-bottom: 18px;
  color: var(--blue-deep);
  font-family: "Songti SC", serif;
  font-size: 21px;
  font-weight: 700;
}

.diagnosis-question label {
  display: flex;
  min-height: 52px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  gap: 10px;
}

.diagnosis-question label:has(input:checked) {
  border-color: var(--blue);
  background: #edf6fa;
}

.diagnosis-question input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue-deep);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  gap: 10px;
}

.toast-region {
  position: fixed;
  top: 124px;
  right: 22px;
  z-index: 1000;
  display: grid;
  width: min(360px, calc(100% - 44px));
  pointer-events: none;
  gap: 9px;
}

.toast {
  padding: 12px 14px;
  color: white;
  background: var(--blue-deep);
  border-left: 4px solid var(--blue-bright);
  border-radius: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.success { border-left-color: #75c89c; }
.toast.warning { border-left-color: #f2c166; }
.toast.error { border-left-color: #e57c77; }
.toast.show { opacity: 1; transform: translateY(0); }

[hidden],
.hidden {
  display: none !important;
}

.empty-page {
  display: grid;
  min-height: 66vh;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-page h1 {
  margin: 18px 0 8px;
}

.empty-page p {
  color: var(--ink-soft);
}

.empty-symbol {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: var(--paper);
  background: var(--blue-deep);
  border: 3px solid var(--gold-bright);
  border-radius: 8px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 42px;
  transform: rotate(45deg);
}

.empty-symbol::first-letter {
  transform: rotate(-45deg);
}

@media (max-width: 1120px) {
  .header-inner {
    grid-template-columns: 200px 1fr 42px;
  }

  .desktop-nav {
    gap: 18px;
  }

  .profile-copy {
    display: none;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jmi-overview,
  .metric:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .hall-content {
    grid-template-columns: 1fr;
  }

  .recommendations {
    grid-column: 1;
  }

  .recommendation-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .journey-inner li {
    min-width: 125px;
  }

  .journey-inner li:not(:last-child)::after {
    width: 35px;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 58px;
  }

  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }

  .page-shell,
  .header-inner,
  .journey-inner {
    width: min(calc(100% - 30px), var(--content-width));
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    display: flex;
    justify-content: space-between;
  }

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

  .brand-name {
    font-size: 21px;
  }

  .desktop-nav {
    display: none;
  }

  .profile-entry {
    padding: 4px;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .journey-inner {
    min-height: 34px;
  }

  .journey-label {
    display: none;
  }

  .journey-inner ol {
    justify-content: space-between;
  }

  .journey-inner li {
    min-width: 0;
    font-size: 10px;
  }

  .journey-inner li:not(:last-child)::after {
    width: min(10vw, 44px);
    margin-inline: 6px;
  }

  .journey-inner li span {
    width: 20px;
    height: 20px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 64px;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 253, 248, 0.97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(42, 36, 27, 0.08);
  }

  .mobile-nav a {
    display: grid;
    place-items: center;
    align-content: center;
    color: var(--ink-soft);
    font-size: 10px;
    gap: 2px;
  }

  .mobile-nav a span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 14px;
  }

  .mobile-nav a.active {
    color: var(--blue-deep);
    font-weight: 800;
  }

  .mobile-nav a.active span {
    color: white;
    background: var(--blue-deep);
    border-color: var(--gold);
  }

  .hall-hero {
    min-height: 470px;
    background-image: url("/generated/1B.png");
    background-image: image-set(
      url("/static/assets/optimized/1B-720.avif") type("image/avif") 1x,
      url("/static/assets/optimized/1B-1440.avif") type("image/avif") 2x,
      url("/static/assets/optimized/1B-720.webp") type("image/webp") 1x,
      url("/static/assets/optimized/1B-1440.webp") type("image/webp") 2x
    );
    background-position: center 52%;
  }

  .hero-scrim {
    background: rgba(244, 235, 216, 0.63);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-content: center;
    min-height: 470px;
    padding-block: 28px;
    gap: 20px;
  }

  .hero-welcome h1 {
    max-width: 330px;
    margin-bottom: 8px;
    font-size: 30px;
  }

  .hero-welcome > p:last-child {
    max-width: 360px;
    font-size: 13px;
  }

  .hero-task-panel {
    padding: 18px;
  }

  .hero-task-panel h2 {
    font-size: 21px;
  }

  .hall-task-cover {
    height: 76px;
    margin-block: 10px 8px;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }

  .jmi-overview,
  .metric {
    min-height: 105px;
    padding: 16px;
  }

  .jmi-overview {
    gap: 11px;
  }

  .mini-ring {
    width: 57px;
    height: 57px;
  }

  .mini-ring::before {
    width: 43px;
    height: 43px;
  }

  .mini-ring span {
    font-size: 18px;
  }

  .metric strong {
    font-size: 22px;
  }

  .metric strong.level-text {
    font-size: 16px;
  }

  .hall-content {
    padding-block: 34px 50px;
    gap: 38px;
  }

  .section-heading {
    align-items: center;
  }

  .section-heading .text-link,
  .quiet-label {
    font-size: 11px;
  }

  .current-task-card {
    grid-template-columns: 1fr;
  }

  .current-task-card > .responsive-art,
  .current-task-card > .responsive-art img {
    min-height: 190px;
    max-height: 220px;
  }

  .current-task-body {
    padding: 20px;
  }

  .recommendation-list {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-grid a:nth-child(2) {
    border-right: 0;
  }

  .quick-grid a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .timeline li {
    grid-template-columns: 84px 1fr;
  }

  .timeline li::before {
    left: 71px;
  }

  .timeline li:not(:last-child)::after {
    left: 75px;
  }

  .toast-region {
    top: 106px;
    right: 15px;
  }
}

@media (max-width: 460px) {
  h1 { font-size: 29px; }
  h2 { font-size: 22px; }

  .hero-task-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .task-step {
    text-align: center;
  }

  .jmi-overview small {
    font-size: 10px;
  }

  .jmi-overview strong {
    font-size: 18px;
  }

  .jmi-overview em,
  .metric p {
    display: none;
  }

  .metric strong.level-text {
    overflow-wrap: anywhere;
  }

  .current-task-body h3 {
    font-size: 20px;
  }

  .quick-grid a {
    min-height: 84px;
    padding: 13px 10px;
    grid-template-columns: 36px 1fr;
  }

  .quick-symbol {
    width: 36px;
    height: 36px;
  }

  .quick-grid strong {
    font-size: 13px;
  }

  .quick-grid small {
    font-size: 10px;
  }

  .diagnosis-dialog form {
    padding: 20px;
  }

  .diagnosis-question {
    min-height: 300px;
  }

  .dialog-actions .button {
    flex: 1;
  }
}

html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
  scroll-behavior: auto !important;
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Round-two hall: one task, one next action, and no fabricated empty panels. */
.diagnosis-callout {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.diagnosis-callout-mark,
.hall-library-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: #fff;
  background: var(--blue-deep);
  border: 2px solid var(--gold-bright);
  border-radius: 7px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 22px;
}

.diagnosis-callout h2,
.diagnosis-callout p,
.hero-task-copy p {
  margin-bottom: 0;
}

.diagnosis-callout h2 {
  font-size: 23px;
}

.diagnosis-callout p:last-child,
.hero-task-copy p {
  color: var(--ink-soft);
  font-size: 13px;
}

.hero-task-copy .tag-row {
  margin-top: 16px;
}

.hero-task-copy h2 {
  margin-top: 12px;
}

.hero-task-actions.single-action .button {
  width: 100%;
}

.hall-focus {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  padding-block: 46px 32px;
  gap: 46px;
}

.hall-focus-main {
  padding-right: 42px;
  border-right: 1px solid var(--line);
}

.hall-focus-main > p:last-of-type,
.hall-library-entry p {
  color: var(--ink-soft);
}

.recommendation-evidence {
  display: flex;
  flex-wrap: wrap;
  margin-top: 18px;
  gap: 8px;
}

.recommendation-evidence span {
  min-height: 30px;
  padding: 4px 10px;
  color: var(--blue-deep);
  border: 1px solid #b9d0dc;
  border-radius: 4px;
  background: #edf5f8;
  font-size: 12px;
  font-weight: 700;
}

.hall-library-entry {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: start;
  gap: 4px 14px;
}

.hall-library-entry .button {
  grid-column: 2;
  justify-self: start;
}

.hall-activity {
  padding-block: 20px 70px;
}

.compact-timeline {
  max-width: 860px;
}

@media (max-width: 820px) {
  .hall-hero,
  .hero-inner {
    min-height: 390px;
  }

  .hero-inner {
    padding-block: 22px;
    gap: 14px;
  }

  .hero-welcome > p:last-child {
    display: none;
  }

  .hall-focus {
    grid-template-columns: 1fr;
    padding-block: 32px;
    gap: 28px;
  }

  .hall-focus-main {
    padding: 0 0 26px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hall-activity {
    padding-bottom: 44px;
  }
}

@media (max-width: 460px) {
  .hall-hero,
  .hero-inner {
    min-height: 390px;
  }

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

  .diagnosis-callout {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .diagnosis-callout-mark {
    width: 42px;
    height: 42px;
  }

  .hall-library-entry {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .hall-library-mark {
    width: 42px;
    height: 42px;
  }
}
