:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #152b39;
  background: #edf2f3;
  --muted: #425b69;
  --line: #d7e3e7;
  --accent: #12625b;
  --shell-gutter: 16px;
  --photo-size: min(438px, calc(100vw - 2 * var(--shell-gutter)), 48vh);
}
@supports (height: 1svh) {
  :root { --photo-size: min(438px, calc(100vw - 2 * var(--shell-gutter)), 48svh); }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
.shell { max-width: 470px; margin: 0 auto; padding: 19px var(--shell-gutter) 31px; }
.mast { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
h1 { font-size: clamp(18px, 5.1vw, 23px); line-height: 1.35; font-weight: 750; letter-spacing: .025em; margin: 0; }
.count { flex: none; font-size: 12px; color: var(--muted); font-weight: 650; }
.meter { height: 5px; border-radius: 9px; background: #d9e4e7; margin: 0 0 12px; overflow: hidden; }
.meter > span { display: block; height: 100%; width: calc(100% * var(--progress)); background: var(--accent); border-radius: inherit; }
.part-label { color: var(--accent); font-size: 12px; font-weight: 700; margin: 0 0 6px; }
.instruction { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0 0 10px; }
.rating-active { scroll-padding-top: calc(var(--photo-size) + 15px + env(safe-area-inset-top, 0px)); }
.photo-stage {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: max(5px, env(safe-area-inset-top, 0px)) 0 8px;
  margin-top: -5px;
  background: #edf2f3;
}
.photo-trigger { display: block; width: var(--photo-size); max-width: 100%; margin: 0 auto; padding: 0; border: 0; border-radius: 12px; background: none; cursor: zoom-in; }
.photo-trigger:disabled { cursor: default; }
.photo { width: 100%; aspect-ratio: 1; display: block; object-fit: contain; border-radius: 12px; background: #e0e8eb; }
.image-dialog { max-width: min(94vw, 790px); padding: 10px; border: 0; border-radius: 12px; color: #fff; background: #152b39; }
.image-dialog::backdrop { background: #08131ce8; }
.image-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; padding-left: 4px; font-size: 14px; }
.image-dialog button { min-height: 44px; padding: 6px 10px; border: 1px solid #718997; border-radius: 7px; background: #263f4d; color: white; cursor: pointer; }
.image-dialog img { display: block; width: 100%; max-height: 74vh; max-height: 74svh; object-fit: contain; }
body:has(.image-dialog[open]) { overflow: hidden; }
.panel { border: 1px solid var(--line); background: #fff; padding: 15px; border-radius: 13px; margin-top: 12px; }
.intro { padding: 21px 17px; }
.intro h2 { font-size: 18px; margin: 0 0 10px; }
.intro p, .intro li { line-height: 1.7; font-size: 14px; color: var(--muted); }
.intro ol { padding-inline-start: 24px; }
.intro label { font-size: 14px; }
.text-field { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #a9bcc2; margin: 6px 0 12px; min-height: 44px; }
.consent { display: flex; gap: 8px; align-items: baseline; line-height: 1.6; }
.consent input { accent-color: var(--accent); }
.scale-guide { color: var(--muted); font-size: 13px; font-weight: 650; margin: 0 0 6px; line-height: 1.45; }
.legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 10px; padding-bottom: 7px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.field { border-top: 1px solid #e3ebee; padding: 8px 0 10px; }
.field.missing { border-top-color: #bd5746; }
.field:last-child { padding-bottom: 1px; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.field-name { font-weight: 750; font-size: 15px; }
.prompt { color: var(--muted); line-height: 1.45; font-size: 13px; margin: -1px 0 6px; }
.endpoints { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 8px; margin: 0 0 4px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.options { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.choice, .skip { display: flex; position: relative; justify-content: center; align-items: center; cursor: pointer; }
.choice input, .skip input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span, .skip span { display: grid; place-items: center; box-sizing: border-box; border: 1px solid #cedde3; border-radius: 7px; }
.choice span { background: #f4f8f9; width: 100%; height: 40px; font-size: 15px; font-weight: 700; }
.skip { min-height: 32px; }
.skip span { color: var(--muted); font-size: 12px; padding: 3px 6px; white-space: nowrap; }
.choice input:checked + span, .skip input:checked + span { background: #d7eee8; border-color: var(--accent); color: #124b46; }
:focus-visible, .choice input:focus-visible + span, .skip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary, .secondary { display: block; width: 100%; border-radius: 8px; min-height: 46px; padding: 10px 14px; margin: 11px 0 0; cursor: pointer; text-align: center; text-decoration: none; font-weight: 700; }
.primary { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.primary:disabled { opacity: .55; cursor: wait; }
.secondary { border: 1px solid #b7cdd0; color: var(--accent); background: transparent; }
.error { color: #a1291e; font-size: 14px; margin: 9px 0 0; line-height: 1.55; }
.footer { padding: 9px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.footer a { text-underline-offset: 3px; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.links a { background: #f1f7f7; padding: 9px; text-align: center; border-radius: 7px; text-decoration: none; }
.links a:focus-visible, .links a:hover { background: #deefeb; }
.status { text-align: center; }
@media (max-width: 355px) {
  :root { --shell-gutter: 11px; }
  .panel { padding-inline: 10px; }
  .options { gap: 4px; }
}
