:root {
  color-scheme: light;
  --navy: #102239;
  --ink: #172b44;
  --muted: #536579;
  --line: #dce3ea;
  --paper: #f2f5f8;
  --red: #a72e2d;
  --green: #176749;
  --radius: 18px;
  font: 16px/1.6 "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 1.125rem; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
button:focus-visible, a:focus-visible { outline: 3px solid #3678c5; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.25rem; line-height: 1.45; }
[hidden] { display: none !important; }
.frame { width: min(1240px, calc(100% - 72px)); margin-inline: auto; }
.masthead { background: var(--navy); color: white; position: sticky; top: 0; z-index: 4; }
.mast-content { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; gap: 12px; align-items: center; font-weight: 700; line-height: 1.3; }
.brand-icon { width: 38px; height: 38px; padding: 5px; border: 1px solid #61728a; border-radius: 10px; }
.brand small { display: block; color: #bfcbda; font-size: .77rem; margin-top: 4px; font-weight: 400; }
.clock { display: flex; align-items: center; gap: 12px; font-size: .84rem; color: #d0dae6; }
.clock time { font: 700 1.15rem/1.2 ui-monospace, monospace; color: #fff; }
.progress { margin: 26px 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 12px; list-style: none; counter-reset: step; overflow: hidden; }
.progress li { counter-increment: step; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 4px; font-size: .89rem; color: var(--muted); border-bottom: 3px solid transparent; }
.progress li + li { border-left: 1px solid var(--line); }
.progress li::before { content: counter(step, decimal-leading-zero); font: 700 .75rem ui-monospace, monospace; }
.progress [aria-current] { background: #e8eff8; border-bottom-color: #2f5b88; color: var(--navy); font-weight: 700; }
.progress .passed { color: var(--green); }
.hero { display: grid; grid-template-columns: 0.86fr 1.14fr; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 35px #152a4210; }
.hero-copy { padding: clamp(28px, 4.2vw, 64px); align-self: center; }
.kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--red); font-size: .86rem; font-weight: 800; letter-spacing: .09em; margin-bottom: 14px; }
.kicker::before { content: ""; width: 17px; height: 2px; background: currentColor; }
.hero h1 { font-size: clamp(1.85rem, 3.4vw, 3.35rem); line-height: 1.16; letter-spacing: -.035em; }
.subtitle { margin: 18px 0 10px; font-weight: 750; font-size: 1.08rem; }
.body-copy { color: var(--muted); }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button { min-height: 44px; border: 1px solid #cbd6e2; border-radius: 9px; background: white; color: var(--ink); padding: 9px 18px; font-weight: 700; transition: background .18s, transform .18s, border-color .18s; }
.button:hover { background: #eaf1f8; border-color: #9eb3c9; }
.button:active, .action:active { transform: translateY(2px); }
.button.primary { color: #fff; background: var(--navy); border-color: var(--navy); }
.button.primary:hover { background: #244a73; border-color: #244a73; }
.hero-photo { position: relative; background: #243345; min-height: 444px; margin: 0; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 59% 50%; }
.hero-photo::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, #0a1729d9); }
.hero-photo figcaption { position: absolute; bottom: 24px; left: 24px; z-index: 1; color: white; font-weight: 700; }
.hero-photo figcaption small { display: block; color: #d1deec; font-weight: 400; }
.details { margin: 20px 0 0; }
.details div { display: grid; grid-template-columns: 6rem 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); } dd { margin: 0; font-weight: 650; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 305px); gap: 20px; align-items: start; }
.scene-panel, .panel, .result-head { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.scene-head { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 13px 20px; gap: 12px; }
.scene-head .kicker { margin-bottom: 3px; font-size: .76rem; }
.scene-head h1 { font-size: clamp(1.15rem, 2vw, 1.55rem); line-height: 1.35; }
.photo { position: relative; aspect-ratio: var(--ratio, 16 / 9); background: #16283d; isolation: isolate; overflow: hidden; }
.photo > img { width: 100%; height: 100%; object-fit: contain; display: block; animation: reveal .28s ease both; }
@keyframes reveal { from { opacity: .25; } }
.hotspot { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: grid; place-items: center; border: 1px solid #fff; background: #102239d9; color: #fff; height: 38px; width: 38px; border-radius: 50%; box-shadow: 0 0 0 5px #ffffff4d, 0 4px 14px #0007; transition: box-shadow .2s, background .2s; }
.hotspot::before { content: "+"; font-size: 1.35rem; line-height: 1; }
.hotspot:hover, .hotspot:focus-visible { background: var(--red); box-shadow: 0 0 0 9px #ffffff66; z-index: 2; }
.hotspot span { position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%); display: none; background: #102239f2; border-radius: 6px; padding: 4px 9px; white-space: nowrap; font-size: 1rem; }
.hotspot.edge span { left: -4px; transform: none; }
.hotspot:hover span, .hotspot:focus-visible span { display: block; }
.scene-caption { min-height: 46px; padding: 11px 20px; color: var(--muted); font-size: 1rem; }
.panel { padding: 20px; }
.side > * + * { margin-top: 14px; }
.side p, .panel li { color: var(--muted); }
.side h2 + p { margin-top: 9px; }
.glass { background: #f8fbfff2; border: 1px solid #d1dfed; backdrop-filter: blur(12px); }
.glass h2 { margin-bottom: 8px; }
.overlay, .continue-photo { position: absolute; inset: 0; display: grid; place-items: center; padding: 13px; background: #0b182d66; }
.overlay .button { box-shadow: 0 4px 22px #0005; }
.continue-photo { align-items: end; background: transparent; border: 0; width: 100%; }
.continue-photo span { padding: 7px 16px; background: #102239e8; color: #fff; border-radius: 8px; }
.photo-note { color: #e3ebf4; display: grid; place-items: center; height: 100%; padding: 16px; text-align: center; background: radial-gradient(ellipse at center, #345071, #13253a 80%); font-size: clamp(.92rem, 2vw, 1.35rem); }
.photo-note strong { display: block; margin-bottom: 9px; color: white; }
.photo.shaking img {
  animation: shake-up-down .5s ease-in-out 3, shake-left-right .5s ease-in-out 1.5s 3;
}
@keyframes shake-up-down {
  0%, 50%, 100% { transform: scale(1.07) translateY(0); }
  25% { transform: scale(1.07) translateY(-6px); }
  75% { transform: scale(1.07) translateY(6px); }
}
@keyframes shake-left-right {
  0%, 50%, 100% { transform: scale(1.07) translateX(0); }
  25% { transform: scale(1.07) translateX(-6px); }
  75% { transform: scale(1.07) translateX(6px); }
}
.operation-panel { border-top: 1px solid var(--line); padding: 18px 20px 20px; }
.operation-panel h2 { margin-bottom: 12px; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.action { min-height: 45px; padding: 8px 12px; text-align: left; background: #f3f7fb; border: 1px solid #d3deea; border-radius: 8px; color: var(--ink); }
.action:hover { background: #e1edfa; border-color: #8faac6; }
.trace { list-style: none; padding: 0; margin: 12px 0 0; }
.trace-panel { position: relative; overflow: visible; z-index: 1; }
.side h3 { margin-top: 10px; font-size: 1rem; }
.trace li { display: grid; grid-template-columns: 68px 1fr; gap: 10px; align-items: center; margin-top: 9px; padding: 6px; border-radius: 8px; background: #eaf1f7; color: var(--ink); font-size: .95rem; animation: reveal .25s ease both; }
.trace img, .trace .mini-placeholder { width: 68px; height: 42px; object-fit: cover; border-radius: 6px; background: #294562; color: white; display: grid; place-items: center; }
.pressure { padding: 0; margin: 0; list-style: none; }
.pressure li { margin: 7px 0; }
.pressure b { display: inline-block; min-width: 3em; }
.low { color: var(--red); } .normal { color: var(--green); } .high { color: #785300; }
.toast { position: fixed; z-index: 5; bottom: 20px; right: max(18px, calc((100vw - 1240px) / 2)); max-width: min(370px, calc(100vw - 36px)); padding: 12px 16px; box-shadow: 0 8px 30px #1022392b; border-radius: 10px; color: var(--red); }
.toast:empty { visibility: hidden; }
.toast[data-tone="neutral"] { color: var(--ink); }
.result-head { padding: clamp(20px, 4vw, 44px); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 22px; background: var(--navy); color: #fff; }
.result-head .kicker { color: #bed7f1; }
.result-head h1 { font-size: clamp(1.55rem, 4vw, 2.65rem); line-height: 1.2; margin-bottom: 12px; }
.result-head p { color: #dde8f4; }
.score { align-self: center; font-size: .9rem; min-width: 105px; }
.score strong { font: 750 clamp(3rem, 8vw, 5rem)/1 ui-monospace, monospace; margin-right: 7px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 17px; gap: 17px; }
.result-grid ul, .result-grid ol { margin: 8px 0 0; padding-left: 22px; }
.result-grid h3 { margin-top: 12px; font-size: .98rem; }
.result-grid p { color: var(--muted); margin-top: 6px; }
.review-log { margin-top: 17px; }
.review-log summary { cursor: pointer; font-weight: 700; }
.review-log li { margin: 3px 0; }
.foot { margin-block: 23px 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; font-size: .83rem; color: var(--muted); }
dialog { width: min(460px, calc(100% - 32px)); border-radius: var(--radius); padding: 25px; color: var(--ink); box-shadow: 0 15px 50px #08182b44; }
dialog::backdrop { background: #0b182ba0; }
.help-list { padding-left: 21px; }
@media (max-width: 910px) {
  .frame { width: calc(100% - 36px); }
  .hero-copy { padding: 28px; }
  .workspace { grid-template-columns: minmax(0,1fr) minmax(220px,245px); gap: 12px; }
}
@media (max-width: 680px) {
  body { font-size: 1.0625rem; }
  .frame { width: calc(100% - 28px); }
  .mast-content { min-height: 62px; }
  .clock { gap: 5px; }
  .progress { margin-block: 15px; }
  .progress li { flex-direction: column; gap: 3px; font-size: .76rem; padding-block: 7px; }
  .hero, .workspace, .result-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 23px; }
  .hero-photo { min-height: 208px; }
  .hero-photo figcaption { bottom: 12px; left: 16px; }
  .hotspot { width: 26px; height: 26px; box-shadow: 0 0 0 3px #ffffff66; }
  .hotspot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
  .scene-head, .scene-caption, .operation-panel, .panel { padding-inline: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.scenario-nav {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  background: #e5ebf2;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.scenario-nav a {
  padding: 7px 16px;
  border-radius: 7px;
  font-size: .96rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
}
.scenario-nav a:hover { color: var(--navy); background: #f2f6fb; }
.scenario-nav [aria-current="page"] { color: var(--navy); background: white; box-shadow: 0 2px 5px #10223918; }
#inspection { margin-top: 22px; scroll-margin-top: 92px; }
.inspection-heading { margin-bottom: 20px; }
.inspection-heading .kicker, .inspection-dialog-head .kicker { margin-bottom: 4px; }
.inspection-heading h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.18; letter-spacing: -.03em; }
.inspection-heading > p:last-child { color: var(--muted); margin-top: 10px; }
.inspection-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.inspection-choice { padding: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; min-height: 210px; }
.inspection-choice img { width: 100%; height: 100%; object-fit: cover; }
.inspection-choice > div { align-self: center; padding: clamp(16px, 2.4vw, 32px); }
.inspection-choice p { color: var(--muted); margin: 6px 0 14px; }
.inspection-photo { aspect-ratio: 2275 / 1280; }
.inspection-hotspot { animation: focus-point .45s ease both; }
@keyframes focus-point { from { opacity: .35; transform: translate(-50%, -50%) scale(.82); } }
.inspection-workspace .side p + p { margin-top: 5px; }
.inspection-workspace .inspection-task { color: var(--ink); font-weight: 700; }
.check-progress { width: 100%; height: .65rem; margin: 10px 0 4px; accent-color: #297655; }
.check-progress::-webkit-progress-bar { background: #dfe7ef; border-radius: 6px; }
.check-progress::-webkit-progress-value { background: #297655; border-radius: 6px; transform-origin: left; animation: check-progress-fill .45s ease-out both; }
@keyframes check-progress-fill { from { transform: scaleX(.82); } }
.inspection-count { font-size: 1rem; }
.registration-grid { grid-template-columns: minmax(0, 1fr) minmax(290px, 370px); }
.inspection-register { max-width: 680px; }
.inspection-log { margin-top: 15px; }
.inspection-log summary { cursor: pointer; font-weight: 700; }
.inspection-events { margin: 10px 0 0; padding-left: 24px; }
.inspection-events li { margin-top: 5px; color: var(--muted); }
.inspection-events time { font: .88rem ui-monospace, monospace; margin-right: 4px; }
.inspection-dialog {
  width: min(780px, calc(100% - 24px));
  max-height: calc(100dvh - 30px);
  padding: 14px;
  overscroll-behavior: contain;
}
.inspection-dialog[open] { animation: reveal .24s ease both; }
.inspection-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 1px 4px 10px; }
.inspection-dialog-head h2 { margin: 0; }
.inspection-detail-photo { height: clamp(145px, 38vh, 350px); overflow: hidden; border-radius: 10px; background: var(--navy); }
.inspection-detail-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: var(--detail-origin); transform: scale(1.25); transform-origin: var(--detail-origin); }
.inspection-question { margin-top: 12px; padding: 14px; }
.inspection-question h3 { font-size: 1.13rem; margin-bottom: 10px; }
.inspection-options { display: grid; gap: 7px; }
.inspection-options button:disabled { cursor: default; opacity: .67; }
.judgment-feedback { margin-top: 9px; font-weight: 650; }
.judgment-feedback:empty { margin: 0; }
.inspection-question .buttons { margin-top: 12px; }
@media (max-width: 680px) {
  .scenario-nav { margin-top: 13px; }
  .scenario-nav a { padding-inline: 10px; }
  #inspection { margin-top: 16px; }
  .inspection-choices, .registration-grid { grid-template-columns: minmax(0, 1fr); }
  .inspection-choices { gap: 12px; }
  .inspection-choice { min-height: 158px; }
  .inspection-choice > div { padding: 12px; }
  .inspection-dialog { padding: 10px; }
  .inspection-detail-photo { height: clamp(145px, 30vh, 260px); }
}
