:root {
  color-scheme: light;
  --page: #edf3f6;
  --ink: #152f43;
  --muted: #486276;
  --line: #d8e3eb;
  --blue: #195d85;
  --deep: #102c43;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse at 80% 3%, #f8fcff 0, transparent 55%), var(--page);
}
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #3d82a7; outline-offset: 4px; }
.layout {
  max-width: 71rem;
  display: grid;
  grid-template-columns: minmax(17rem, .82fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 1.4rem;
  padding: 3.4rem 1.75rem;
  margin-inline: auto;
}
.intro {
  position: sticky;
  top: 1.5rem;
  overflow: hidden;
  isolation: isolate;
  border-radius: 1.6rem;
  min-height: 36rem;
  color: #f3f8fc;
  background: linear-gradient(150deg, #0d273c 7%, #153f5a 62%, #255e7a 100%);
  box-shadow: 0 16px 38px #163b5625;
}
.intro-content { position: relative; z-index: 1; padding: 2.3rem 2.35rem 2.6rem; }
.context {
  display: inline-block;
  padding: .25rem .68rem;
  border-radius: .4rem;
  border: 1px solid #a9c9db72;
  font-size: .875rem;
  color: #d5e7f2;
  margin: 0 0 1.35rem;
}
h1 { font-size: clamp(2.15rem, 3.9vw, 3.3rem); line-height: 1.18; letter-spacing: -.04em; font-weight: 750; margin: 0; }
.intro-description { line-height: 1.65; color: #d4e6f0; margin: 1rem 0 2.05rem; max-width: 18em; }
.route { margin: 0; padding: 0; list-style: none; }
.route li { position: relative; min-height: 2.95rem; padding: .07rem 0 .8rem 1.45rem; color: #e6f1f6; }
.route li::before {
  content: "";
  position: absolute;
  top: .45rem; left: .01rem;
  width: .56rem; height: .56rem;
  border-radius: 50%;
  border: 1px solid #c2e6f8;
  background: #173b54;
  z-index: 1;
}
.route li:last-child { color: #fff; font-weight: 650; min-height: auto; padding-bottom: 0; }
.route li:last-child::before { background: #c7e8f5; box-shadow: 0 0 0 4px #a9dff526; }
.route li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: .7rem; bottom: -.7rem; left: .26rem;
  border-left: 1px solid #8fc1dba0;
}
.route-art {
  position: absolute;
  inset: 42% -24% -24% 20%;
  transform: rotate(-27deg);
  border-radius: 48%;
  background:
    repeating-radial-gradient(ellipse at 72% 90%, transparent 0 15px, #a8d1e724 15px 16px, transparent 16px 30px),
    radial-gradient(ellipse at bottom, #80bed537, transparent 75%);
  mask-image: linear-gradient(135deg, transparent, #000 49%, #000 73%, transparent);
}
.card {
  min-width: 0;
  min-height: 36rem;
  background: #fff;
  border: 1px solid #dce6ed;
  border-radius: 1.6rem;
  padding: 2.2rem clamp(1.35rem, 3.2vw, 2.65rem) 2rem;
  box-shadow: 0 16px 55px #203f5810;
}
.progress { margin-bottom: 2.15rem; }
.progress p { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 0 0 .75rem; }
.progress strong { font-size: .94rem; letter-spacing: .035em; }
#step-number { color: var(--muted); font-size: .875rem; }
.progress-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: .32rem; }
.progress-track i { height: 4px; background: #e5edf3; border-radius: 5px; }
.progress-track .reached { background: #5599b9; }
.progress-track .current { background: #1b648d; }
h2 { font-size: clamp(1.55rem, 2.2vw, 2rem); line-height: 1.35; letter-spacing: -.027em; margin: 0; font-weight: 730; }
h2:focus { outline: none; }
.help { color: var(--muted); line-height: 1.65; margin: .55rem 0 1.18rem; }
.score-panel {
  --fill: 0%;
  border: 1px solid #dce8ef;
  border-radius: 1rem;
  padding: .9rem 1.15rem 1rem;
  background: linear-gradient(135deg, #f5faff, #edf5f9);
}
.score-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.score-readout { display: flex; align-items: baseline; gap: .5rem; white-space: nowrap; color: var(--muted); }
.score-readout output { font-size: 3.45rem; line-height: 1.07; font-weight: 680; color: #164d71; font-variant-numeric: tabular-nums; }
.score-description { color: #2b5670; font-size: .875rem; }
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 2.3rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
input[type="range"]::-webkit-slider-runnable-track { height: .53rem; border-radius: 20px; background: linear-gradient(to right, #216d98 0% var(--fill), #cbdfe9 var(--fill) 100%); }
input[type="range"]::-moz-range-track { height: .53rem; border-radius: 20px; background: linear-gradient(to right, #216d98 0% var(--fill), #cbdfe9 var(--fill) 100%); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 1.65rem; height: 1.65rem; margin-top: -.56rem; border: 3px solid #fff; border-radius: 50%; background: #1e688f; box-shadow: 0 2px 8px #24567450; }
input[type="range"]::-moz-range-thumb { width: 1.3rem; height: 1.3rem; border: 3px solid #fff; border-radius: 50%; background: #1e688f; box-shadow: 0 2px 8px #24567450; }
input[data-unset]::-webkit-slider-thumb { background: #9ab9ca; }
input[data-unset]::-moz-range-thumb { background: #9ab9ca; }
.score-buttons { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .15rem; }
.score-buttons button {
  background: transparent; border: 0; min-width: 0; padding: 0;
  color: #436880; height: 2.5rem; border-radius: .42rem;
  font-variant-numeric: tabular-nums; font-size: .9rem;
}
.score-buttons button[aria-pressed="true"] { background: #d7eaf5; color: #103c59; font-weight: 750; }
.anchors { display: flex; align-items: flex-start; justify-content: space-between; gap: .65rem; margin-top: .3rem; font-size: .875rem; color: var(--muted); }
.anchors span:last-child { text-align: right; }
.name-field { margin-top: 1.18rem; }
.name-field label { display: block; font-weight: 620; margin-bottom: .43rem; }
.name-field input { width: 100%; padding: .72rem .86rem; border-radius: .63rem; border: 1px solid #cedce5; background: #fff; color: var(--ink); min-height: 2.85rem; }
.name-field input::placeholder { color: #627b8d; }
.actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.3rem; }
.button { border-radius: .65rem; padding: .72rem 1.15rem; min-height: 2.95rem; font-weight: 650; border: 1px solid transparent; }
.primary { background: var(--deep); color: #fff; min-width: 7.8rem; }
.secondary { background: #fff; border-color: #d3e0e9; color: #234963; }
.button:disabled { opacity: .63; cursor: wait; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.choice {
  display: flex; gap: .58rem; align-items: center; min-height: 3rem;
  padding: .65rem .75rem; border: 1px solid var(--line); border-radius: .65rem;
  font-weight: 550; cursor: pointer; line-height: 1.4;
}
.choice:has(input:checked) { border-color: #80b1c9; background: #eff7fc; }
.choice input, .consent input { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--blue); }
.choice small { display: block; color: var(--muted); font-size: .875rem; font-weight: 400; }
.symptom-list { display: grid; gap: .46rem; }
.symptom-list .choice { min-height: 2.73rem; }
.symptom-rating { --fill: 0%; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 .65rem .65rem; padding: .55rem .8rem .64rem; }
.symptom:has(.symptom-rating:not([hidden])) .choice { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.symptom-caption { display: flex; gap: 1rem; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: .875rem; }
.symptom-caption output { color: var(--blue); font-weight: 700; font-size: 1rem; }
.error { margin: 1rem 0 0; color: #9b3026; line-height: 1.5; }
.consent { display: flex; align-items: baseline; gap: .55rem; color: var(--muted); margin-top: 1rem; line-height: 1.55; }
.done { display: grid; justify-items: start; align-content: center; min-height: 28rem; }
.done-icon { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; background: #e1f0f4; border-radius: 50%; color: #206082; font-size: 1.6rem; margin-bottom: 1rem; }
.no-js { max-width: 40rem; margin: 1rem auto; text-align: center; }

@media (hover: hover) {
  .score-buttons button:hover, .secondary:hover, .choice:hover { background: #edf6fa; }
  .primary:hover { background: #1c4e6b; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; padding: 1rem; gap: .8rem; max-width: 39rem; }
  .intro { position: relative; top: auto; min-height: 0; border-radius: 1.15rem; }
  .intro-content { padding: 1.15rem 1.3rem 1.3rem; }
  .context { margin-bottom: .65rem; }
  h1 { font-size: clamp(1.6rem, 6vw, 2.35rem); }
  h1 br { display: none; }
  .intro-description { margin: .45rem 0 .7rem; max-width: none; }
  .route li { min-height: 1.62rem; font-size: .875rem; padding-bottom: .15rem; padding-left: 1rem; }
  .route li::before { top: .38rem; width: .44rem; height: .44rem; }
  .route li:not(:last-child)::after { left: .21rem; top: .58rem; bottom: -.55rem; }
  .card { min-height: 0; border-radius: 1.15rem; padding: 1.2rem; }
  .progress { margin-bottom: 1.2rem; }
  .score-panel { padding-inline: .8rem; }
  .score-readout output { font-size: 2.95rem; }
  .actions .primary { flex: 1; }
  .done { min-height: 16rem; }
}
@media (max-width: 360px) {
  .layout { padding: .6rem; }
  .card { padding: .95rem; }
  .choice-grid { grid-template-columns: 1fr; }
}

/* Frosted surfaces and a locally rendered light field. */
:root { --ink: #14263a; --muted: #4b5f73; --line: #cfdeed; --blue: #176bd7; }
body {
  background:
    radial-gradient(ellipse at 12% 5%, #b6d7ff 0, transparent 35%),
    radial-gradient(ellipse at 86% 14%, #ded0ff 0, transparent 37%),
    radial-gradient(ellipse at 55% 96%, #b6e8ed 0, transparent 47%),
    #f4f7fd;
  background-attachment: fixed;
}
.layout { align-items: stretch; gap: 1.2rem; padding-top: clamp(1.15rem, 5vw, 4.5rem); }
.intro {
  min-height: 37rem;
  border: 1px solid #b6dbff9c;
  background:
    radial-gradient(ellipse at 94% 95%, #6ab6ea 0, transparent 58%),
    radial-gradient(ellipse at 88% 1%, #45478f 0, transparent 50%),
    linear-gradient(145deg, #091c36, #163557 53%, #174b78);
  box-shadow: 0 24px 56px #1c3b643b, inset 0 1px 0 #f2f9ff44;
}
.intro-content { padding-top: clamp(1.5rem, 4.3vw, 3.6rem); }
.context { background: #e1ecff13; backdrop-filter: blur(12px); letter-spacing: .025em; }
.route-art { opacity: .82; }
.card {
  background: linear-gradient(155deg, #ffffffea 0, #f6fbffdc 61%, #edf6ffd9);
  border: 1px solid #fff;
  box-shadow: 0 25px 65px #33577c25, inset 0 1px 0 #fff;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.progress-track i { background: #dce7f3; }
.progress-track .reached { background: #779fdd; }
.progress-track .current { background: linear-gradient(90deg, #1675e2, #7663e2); }
.score-panel {
  --fill: 44.444%;
  background: linear-gradient(165deg, #ffffffde, #e8f3ffaf), #ebf4fa;
  border: 1px solid #fff;
  border-radius: 1.25rem;
  box-shadow: 0 8px 24px #326da21b, inset 0 -1px 3px #a4c7e345;
  padding: 1rem 1.12rem;
}
.score-readout output { color: #174a97; display: inline-block; text-shadow: 0 1px 0 #fff; font-weight: 720; }
input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(to right, #1689eb 0%, #7462ed var(--fill), #cbddeb var(--fill) 100%); }
input[type="range"]::-moz-range-track { background: linear-gradient(to right, #1689eb 0%, #7462ed var(--fill), #cbddeb var(--fill) 100%); }
input[type="range"]::-webkit-slider-thumb { background: linear-gradient(155deg, #fff, #d3ecff); border: 2px solid white; box-shadow: 0 3px 8px #24567460, inset 0 0 2px #79a5e7; }
input[type="range"]::-moz-range-thumb { background: linear-gradient(155deg, #fff, #d3ecff); border: 2px solid white; box-shadow: 0 3px 8px #24567460, inset 0 0 2px #79a5e7; }
.score-buttons button[aria-pressed="true"] { background: #d8eaff; color: #194f9a; }
.identity-fields { display: grid; grid-template-columns: 1.1fr .9fr; gap: .75rem; }
.optional { font-weight: 400; color: var(--muted); font-size: .875rem; }
.mode-note { color: var(--muted); line-height: 1.55; font-size: .875rem; margin: .55rem 0 0; }
.name-field input, .choice {
  background: #ffffffd0;
  border-radius: .84rem;
  box-shadow: inset 0 1px 0 #fff;
}
.button {
  border-radius: 999rem;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.button:active { transform: scale(.97); }
.primary { background: linear-gradient(110deg, #155bce, #5155da); box-shadow: 0 4px 12px #325dc64a; }
.primary:hover { background: linear-gradient(110deg, #164caa, #4747be); }
.secondary { background: #fff9; }
.done { justify-items: center; text-align: center; }
.done h2 { font-size: clamp(2.5rem, 8vw, 4.2rem); letter-spacing: -.055em; }
.done-icon { background: linear-gradient(160deg, #e8f4ff, #d3e0ff); border: 1px solid #fff; box-shadow: 0 6px 16px #4266b823; }
.celebration { position: fixed; z-index: 5; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (max-width: 760px) {
  body { background-attachment: scroll; }
  .layout { gap: .8rem; }
  .intro { min-height: 0; }
  .identity-fields { gap: .55rem; }
}
@media (max-width: 350px) {
  .identity-fields { grid-template-columns: 1fr; gap: 0; }
  .actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.admin-layout { max-width: 65rem; margin: 2rem auto; padding: 0 1rem; }
.admin-card { min-height: 0; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.admin-header h1 { font-size: clamp(1.65rem, 4vw, 2.3rem); }
.admin-header .help { margin-bottom: 1rem; }
#login { max-width: 25rem; }
#filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
#filters label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 600; }
#filters input, #filters select {
  width: 100%; min-width: 0; min-height: 2.65rem; padding: .5rem .65rem;
  border: 1px solid #cedce5; border-radius: .7rem; background: #fff; color: var(--ink); font: inherit;
}
.admin-filter-actions { grid-column: 1 / -1; display: flex; gap: .6rem; flex-wrap: wrap; }
.admin-summary, .admin-pagination { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin: 1.15rem 0; }
.admin-summary span { font-size: .875rem; color: var(--muted); }
.records-list { display: grid; gap: .55rem; }
.answer-item { background: #ffffffc4; border: 1px solid var(--line); border-radius: .8rem; }
.answer-item summary { cursor: pointer; padding: .72rem .85rem; overflow-wrap: anywhere; }
.answer-item summary > * { margin-right: .8rem; font-size: .875rem; }
.answer-content { padding: 0 .85rem .9rem; }
.answer-content dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .4rem .8rem; font-size: .92rem; margin-bottom: 1rem; }
.answer-content dd { margin: 0; overflow-wrap: anywhere; color: var(--muted); }
@media (max-width: 600px) {
  #filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .answer-item summary time { display: inline-block; }
}

.score-buttons { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.score-panel { --fill: 50%; }
.body-guide {
  margin: 0 0 1rem;
  border: 1px solid #cbddee;
  background: #fff;
  border-radius: .85rem;
  overflow: hidden;
}
.body-guide img { width: 100%; height: auto; display: block; }
.body-guide figcaption { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .1rem; text-align: center; font-size: .875rem; color: #334c62; padding: 0 .25rem .65rem; }
#part-choices { grid-template-columns: 1fr; }
.done h2 { overflow-wrap: anywhere; }

.roster { border-bottom: 1px solid var(--line); padding-bottom: 1.3rem; margin-bottom: 1.4rem; }
.roster-header, .roster-batch-header { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.roster-header h2, .records-title { font-size: 1.25rem; }
.roster-header label { font-size: .9rem; }
#roster-day { border: 1px solid var(--line); border-radius: .65rem; padding: .45rem; font: inherit; color: var(--ink); background: #fff; }
.roster-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.roster-batch { border: 1px solid var(--line); padding: .8rem .95rem; border-radius: .85rem; background: #ffffffd2; }
.roster-batch h3 { margin: 0; font-size: 1.07rem; }
.roster-batch .button { min-height: 2.15rem; padding: .35rem .75rem; font-size: .875rem; }
.roster-state { margin: .2rem 0; color: var(--muted); font-size: .875rem; }
.roster-count { margin: .5rem 0 .7rem; font-weight: 650; }
.roster-details { margin: .4rem 0; }
.roster-details summary { cursor: pointer; }
.roster-details ul { list-style: none; padding-left: 0; margin: .55rem 0; max-height: 18rem; overflow: auto; }
.roster-details li { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; border-top: 1px solid #e7edf3; padding: .35rem .2rem; }
.roster-details small { color: var(--muted); }
.roster-link { display: inline-block; padding: .4rem 0 .15rem; font-size: .875rem; color: #154e99; }
.records-title { margin-bottom: .75rem; }
@media (max-width: 670px) { .roster-list { grid-template-columns: 1fr; } }
