:root {
  color-scheme: dark;
  --bg: #08111d;
  --panel: rgba(17, 30, 47, 0.88);
  --panel-strong: #10243a;
  --line: rgba(157, 181, 211, 0.18);
  --text: #ecf4ff;
  --muted: #91a7bf;
  --cyan: #64e5ed;
  --blue: #6f9dff;
  --orange: #ff9b62;
  --red: #ff6679;
  --green: #77dfb3;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 75% 12%, rgba(66, 137, 201, 0.15), transparent 30%),
    radial-gradient(circle at 14% 85%, rgba(58, 109, 183, 0.13), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Noto Sans KR", system-ui, sans-serif;
}

button { font: inherit; }
.topbar {
  min-height: 98px;
  padding: 24px 34px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 28, 0.66);
  backdrop-filter: blur(16px);
}
h1, h2, h3, p { margin: 0; }
h1 { margin-top: 3px; font-size: clamp(25px, 3vw, 38px); letter-spacing: -0.05em; }
h2 { font-size: 18px; letter-spacing: -0.03em; }
h3 { font-size: 14px; }
.subtitle { margin-top: 8px; color: var(--muted); font-size: 13px; }
.eyebrow, .section-kicker { color: var(--cyan); font-size: 10px; letter-spacing: 0.15em; font-weight: 700; }
.status-pill { display: flex; gap: 9px; align-items: center; color: #c7d7ea; font-size: 12px; border: 1px solid rgba(100, 229, 237, 0.25); background: rgba(20, 75, 89, 0.26); padding: 10px 13px; border-radius: 999px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }

.layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 18px; padding: 20px; max-width: 1700px; margin: 0 auto; }
.sidebar { display: flex; flex-direction: column; gap: 14px; }
.panel, .stage-panel, .info-card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(19, 37, 57, 0.95), rgba(10, 23, 38, 0.92)); box-shadow: var(--shadow); border-radius: 18px; }
.panel { padding: 18px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 17px; }
.panel-heading.compact { margin-bottom: 12px; }
.panel-heading h2 { margin-top: 5px; }
.count-badge { min-width: 29px; padding: 5px 8px; text-align: center; border-radius: 9px; color: #b5f8f8; background: rgba(100, 229, 237, 0.12); font-size: 12px; }
.procedure-list { display: grid; gap: 9px; }
.mode-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 4px; margin-bottom: 11px; border-radius: 11px; background: rgba(3, 11, 21, .56); }
.mode-tabs button { min-width: 0; padding: 8px 3px 7px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.mode-tabs button:hover { color: var(--text); }
.mode-tabs button.active { color: var(--text); border-color: rgba(100, 229, 237, .35); background: rgba(48, 100, 126, .42); }
.mode-tabs strong, .mode-tabs small { display: block; }
.mode-tabs strong { font-size: 11px; letter-spacing: .04em; }
.mode-tabs small { margin-top: 3px; font-size: 8px; opacity: .78; white-space: nowrap; }
.procedure-button { border: 1px solid transparent; color: var(--muted); text-align: left; padding: 13px 13px 12px; border-radius: 12px; background: rgba(5, 15, 27, 0.45); cursor: pointer; transition: .2s ease; }
.procedure-button:hover { color: var(--text); border-color: rgba(100, 229, 237, .3); transform: translateY(-1px); }
.procedure-button.active { color: var(--text); border-color: rgba(100, 229, 237, .52); background: linear-gradient(100deg, rgba(40, 105, 130, .42), rgba(45, 74, 135, .26)); }
.procedure-button strong { display: block; font-size: 13px; }
.procedure-button small { display: block; margin-top: 5px; font-size: 11px; color: inherit; opacity: .75; line-height: 1.35; }
.side-row { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; color: var(--muted); font-size: 12px; }
.segmented { display: flex; padding: 3px; border-radius: 9px; background: rgba(3, 11, 21, .56); }
.segmented button { border: 0; border-radius: 7px; color: var(--muted); background: transparent; padding: 6px 10px; cursor: pointer; font-size: 11px; }
.segmented button.active { color: var(--text); background: var(--panel-strong); box-shadow: 0 2px 8px rgba(0,0,0,.22); }
.channel-list { display: grid; gap: 8px; }
.channel-item { display: grid; grid-template-columns: 27px 1fr; gap: 9px; align-items: start; padding: 10px 9px; border: 1px solid rgba(154, 182, 210, .12); border-radius: 11px; background: rgba(3, 13, 23, .35); }
.channel-number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #06101c; background: var(--orange); font-weight: 800; font-size: 11px; }
.channel-item strong { display: block; font-size: 12px; }
.channel-item small { display: block; color: var(--muted); line-height: 1.4; margin-top: 3px; font-size: 10px; }
.channel-item .tag { display: inline-block; margin-top: 6px; padding: 3px 6px; border-radius: 5px; color: var(--orange); background: rgba(255, 155, 98, .11); font-size: 9px; }
.channel-item.missing { border-color: rgba(255, 102, 121, .35); }
.channel-item.missing .channel-number { background: var(--red); }
.channel-item.missing .tag { color: var(--red); background: rgba(255, 102, 121, .11); }
.warning-panel { display: flex; gap: 11px; border-color: rgba(255, 155, 98, .3); background: linear-gradient(135deg, rgba(112, 59, 42, .26), rgba(16, 34, 52, .8)); }
.warning-icon { flex: 0 0 23px; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #1c0e06; background: var(--orange); font-weight: 900; }
.warning-panel h3 { color: #ffd0b3; margin-bottom: 6px; }
.warning-panel p { color: #c6b8af; font-size: 10px; line-height: 1.55; }

.stage-panel { overflow: hidden; }
.mobile-list-back { display: none; }
.stage-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px 17px; border-bottom: 1px solid var(--line); }
.stage-toolbar h2 { margin-top: 5px; font-size: 22px; }
.stage-toolbar #stage-description { color: var(--muted); font-size: 12px; margin-top: 7px; }
.device-profile { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; padding: 6px 8px; border: 1px solid rgba(100, 229, 237, .24); border-radius: 8px; color: #b8ccdf; background: rgba(3, 14, 25, .45); font-size: 10px; }
.device-profile-label { color: var(--cyan); font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.device-profile strong { color: #effaff; font-size: 11px; }
.device-profile small { color: var(--muted); font-size: 9px; }
.device-profile.isis { border-color: rgba(194, 140, 255, .52); background: rgba(82, 44, 123, .3); }
.device-profile.isis .device-profile-label { color: #d2aaff; }
.toolbar-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.view-tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid rgba(100, 229, 237, .2); border-radius: 10px; background: rgba(3, 11, 21, .56); }
.view-tab { border: 0; border-radius: 7px; padding: 8px 10px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; white-space: nowrap; }
.view-tab.active { color: #06101c; background: var(--cyan); font-weight: 800; }
.ghost-button, .primary-button { padding: 10px 13px; border-radius: 9px; cursor: pointer; font-size: 11px; }
.ghost-button { color: #bfd0e5; border: 1px solid var(--line); background: rgba(5, 14, 26, .5); }
.primary-button { color: #06101c; border: 1px solid var(--cyan); background: var(--cyan); font-weight: 700; }
.viewer-wrap { position: relative; min-height: 585px; height: min(62vh, 720px); background: radial-gradient(circle at 50% 44%, rgba(43, 93, 127, .31), transparent 52%), linear-gradient(145deg, #071522, #0a1a2b 66%, #091423); }
#viewer, #viewer canvas { width: 100%; height: 100%; display: block; }
#viewer canvas { outline: none; }
.hidden { display: none !important; }
.reference-viewer { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 17px 20px 20px; overflow: hidden; background: linear-gradient(145deg, rgba(236, 243, 247, .98), rgba(213, 224, 232, .98)); color: #172536; }
.reference-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(45, 70, 91, .2); }
.reference-header .section-kicker { color: #147b88; }
.reference-header h3 { margin-top: 4px; color: #14283a; font-size: 17px; }
.reference-badge { flex: 0 0 auto; padding: 6px 8px; border: 1px solid rgba(20, 123, 136, .3); border-radius: 999px; color: #126e7a; background: rgba(255, 255, 255, .66); font-size: 10px; font-weight: 700; }
.reference-key { display: flex; flex-wrap: wrap; gap: 6px; padding: 11px 0 2px; }
.reference-key-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid rgba(40, 67, 89, .18); border-radius: 7px; color: #385268; background: rgba(255, 255, 255, .72); font-size: 10px; }
.reference-key-chip b { display: inline-grid; min-width: 17px; height: 17px; place-items: center; border-radius: 50%; color: #fff; background: #dc6071; font-size: 9px; }
.reference-key-chip.missing { color: #865c39; border-color: rgba(172, 104, 42, .3); background: rgba(255, 245, 224, .8); }
.reference-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; min-height: 0; flex: 1; padding: 14px 2px 8px; overflow: auto; }
.reference-panels:has(.reference-figure:only-child) { grid-template-columns: 1fr; }
.reference-figure { margin: 0; padding: 7px; border: 1px solid rgba(40, 67, 89, .18); border-radius: 12px; background: rgba(255, 255, 255, .78); box-shadow: 0 8px 24px rgba(24, 52, 72, .12); }
.reference-figure.clinical { border-color: rgba(194, 79, 71, .55); }
.reference-figure.montage { border-color: rgba(125, 88, 190, .58); background: rgba(250, 247, 255, .9); }
.reference-figure.montage { grid-column: 1 / -1; }
.reference-figure img { display: block; width: 100%; max-height: 510px; object-fit: contain; border-radius: 7px; background: #fff; cursor: zoom-in; }
.reference-figure figcaption { padding: 8px 4px 2px; color: #4a6176; font-size: 10px; line-height: 1.35; }
.waveform-section { grid-column: 1 / -1; margin-top: 1px; padding: 12px; border: 1px solid rgba(20, 123, 136, .28); border-radius: 12px; background: linear-gradient(145deg, rgba(244, 252, 253, .96), rgba(229, 243, 247, .92)); }
.waveform-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.waveform-section-head .section-kicker { color: #147b88; }
.waveform-section-head h4 { margin-top: 3px; color: #173c59; font-size: 13px; }
.waveform-badge { flex: 0 0 auto; padding: 5px 7px; border: 1px solid rgba(20, 123, 136, .28); border-radius: 999px; color: #126e7a; background: rgba(255, 255, 255, .74); font-size: 9px; font-weight: 800; }
.waveform-note { margin-top: 6px; color: #526b7d; font-size: 9px; line-height: 1.45; }
.waveform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.waveform-card { min-width: 0; margin: 0; padding: 8px; border: 1px solid rgba(40, 67, 89, .14); border-radius: 9px; background: rgba(255, 255, 255, .86); box-shadow: 0 5px 16px rgba(24, 52, 72, .08); }
.waveform-card-head { display: flex; align-items: flex-start; gap: 7px; min-height: 30px; }
.waveform-card-badge { flex: 0 0 auto; padding: 4px 5px; border-radius: 5px; color: #fff; background: #147b88; font-size: 8px; font-weight: 800; }
.waveform-card-head b { display: block; color: #21445d; font-size: 10px; line-height: 1.25; }
.waveform-card-head small { display: block; margin-top: 3px; color: #60788a; font-size: 8px; line-height: 1.3; }
.waveform-chart-svg { display: block; width: 100%; height: auto; margin-top: 7px; overflow: visible; }
.waveform-chart-bg { fill: #071a2a; }
.waveform-grid line { stroke: rgba(142, 191, 205, .14); stroke-width: 1; }
.waveform-zero { stroke: rgba(184, 222, 229, .45); stroke-width: 1; stroke-dasharray: 3 4; }
.waveform-trace { fill: none; stroke: #5de1cf; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px rgba(93, 225, 207, .45)); }
.waveform-chart-svg.sep .waveform-trace { stroke: #72c6ff; filter: drop-shadow(0 0 3px rgba(114, 198, 255, .45)); }
.waveform-chart-svg.sep-lower .waveform-trace { stroke: #c797ff; filter: drop-shadow(0 0 3px rgba(199, 151, 255, .45)); }
.waveform-chart-svg.mep-soft .waveform-trace { stroke: #ffbd74; filter: drop-shadow(0 0 3px rgba(255, 189, 116, .45)); }
.waveform-source-image { display: block; width: 100%; max-height: 330px; margin-top: 7px; object-fit: contain; border: 1px solid rgba(40, 67, 89, .1); border-radius: 6px; background: #fff; cursor: zoom-in; }
.waveform-source-title { margin: 8px 0 1px; color: #5d5d5d; font-size: 24px; line-height: 1.05; font-weight: 400; }
.waveform-label { fill: #f8d98a; font-size: 12px; font-weight: 800; }
.waveform-axis { fill: rgba(201, 225, 231, .72); font-size: 9px; }
.waveform-card figcaption { margin-top: 5px; color: #5c7282; font-size: 8px; line-height: 1.35; }
.reference-video { flex: 0 0 auto; margin: 0 2px 9px; border: 1px solid rgba(20, 123, 136, .34); border-radius: 12px; background: rgba(247, 252, 253, .9); box-shadow: 0 8px 24px rgba(24, 52, 72, .1); overflow: hidden; }
.reference-video > summary { padding: 10px 12px; color: #126e7a; background: rgba(217, 238, 247, .82); cursor: pointer; font-size: 11px; font-weight: 800; }
.reference-video > summary::marker { color: #147b88; }
.reference-video[open] .reference-video-head { margin: 11px 11px 8px; }
.reference-video[open] video { width: calc(100% - 22px); margin: 0 11px; }
.reference-video[open] .reference-video-caption { margin: 6px 11px 11px; }
.reference-video-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.reference-video-head h4 { margin-top: 3px; color: #14283a; font-size: 13px; }
.reference-video-head p:not(.section-kicker) { margin-top: 4px; color: #4a6176; font-size: 10px; line-height: 1.35; }
.reference-video-source { flex: 0 0 auto; padding: 5px 7px; border: 1px solid rgba(20, 123, 136, .3); border-radius: 999px; color: #126e7a; background: rgba(255, 255, 255, .72); font-size: 9px; font-weight: 700; }
.reference-video video { display: block; width: 100%; max-height: 230px; border-radius: 8px; background: #081523; }
.reference-video-caption { display: block; margin-top: 6px; color: #60788a; font-size: 9px; line-height: 1.35; }
.reference-manual { flex: 0 0 auto; max-height: 365px; margin: 0 2px 9px; border: 1px solid rgba(29, 107, 151, .3); border-radius: 12px; background: rgba(247, 252, 255, .92); overflow: hidden; }
.reference-manual > summary { padding: 10px 12px; color: #173c59; background: rgba(217, 238, 247, .82); cursor: pointer; font-size: 12px; font-weight: 800; }
.reference-manual > summary::marker { color: #147b88; }
#reference-manual-content { max-height: 305px; padding: 11px; overflow: auto; }
.manual-intro { margin-bottom: 10px; color: #4a6176; font-size: 10px; line-height: 1.45; }
.manual-photo-section h5 { color: #173c59; font-size: 11px; }
.manual-device-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.manual-device-photos figure { margin: 0; padding: 6px; border: 1px solid rgba(20, 123, 136, .25); border-radius: 8px; background: rgba(255, 255, 255, .84); }
.manual-device-photos img { display: block; width: 100%; height: 180px; object-fit: contain; cursor: zoom-in; }
.manual-device-photos figcaption { margin-top: 5px; color: #5c7282; font-size: 8px; line-height: 1.3; }
.manual-step-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.manual-step { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 8px; padding: 9px; border: 1px solid rgba(40, 67, 89, .14); border-radius: 9px; background: rgba(255, 255, 255, .72); }
.manual-step-number { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: #fff; background: #157f8c; font-size: 9px; font-weight: 800; }
.manual-step-copy h5, .manual-columns h5 { color: #173c59; font-size: 11px; }
.manual-step-copy strong { display: block; margin-top: 4px; color: #203c52; font-size: 10px; line-height: 1.35; }
.manual-step-copy p { margin-top: 4px; color: #5c7282; font-size: 9px; line-height: 1.4; }
.manual-step > img { grid-column: 1 / -1; width: 100%; max-height: 155px; object-fit: contain; border-radius: 6px; cursor: zoom-in; }
.manual-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 11px; }
.manual-columns section { min-width: 0; }
.manual-table { display: grid; gap: 5px; margin-top: 6px; }
.manual-table > div { display: grid; grid-template-columns: 1fr auto; gap: 3px 7px; padding: 6px 7px; border: 1px solid rgba(40, 67, 89, .12); border-radius: 7px; background: rgba(255, 255, 255, .7); }
.manual-table b { color: #21445d; font-size: 9px; }
.manual-table span { color: #147b88; font-size: 9px; font-weight: 700; text-align: right; }
.manual-table small { grid-column: 1 / -1; color: #5c7282; font-size: 8px; line-height: 1.35; }
.manual-diagrams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 11px; }
.manual-diagrams figure { margin: 0; padding: 6px; border: 1px solid rgba(40, 67, 89, .12); border-radius: 8px; background: rgba(255, 255, 255, .8); }
.manual-diagrams img { display: block; width: 100%; max-height: 220px; object-fit: contain; cursor: zoom-in; }
.manual-diagrams figcaption { margin-top: 5px; color: #5c7282; font-size: 8px; line-height: 1.3; }
.manual-sources { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 10px; color: #5c7282; font-size: 8px; }
.manual-sources b { color: #21445d; }
.manual-sources span { padding: 4px 6px; border-radius: 5px; background: rgba(219, 238, 247, .72); }
.reference-note { flex: 0 0 auto; margin: 0; padding: 9px 10px; border: 1px solid rgba(172, 104, 42, .3); border-radius: 8px; color: #6c4b2c; background: rgba(255, 245, 224, .85); font-size: 10px; line-height: 1.45; }
.reference-mode .viewer-hint, .reference-mode .legend { display: none; }
.image-lightbox { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: rgba(3, 12, 22, .94); color: #eaf4ff; }
.image-lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid rgba(183, 210, 235, .18); background: rgba(6, 18, 31, .96); }
.image-lightbox-toolbar strong { max-width: 62%; overflow: hidden; color: #eaf4ff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.image-lightbox-actions { display: flex; gap: 6px; }
.image-lightbox-actions button { min-width: 31px; padding: 6px 9px; border: 1px solid rgba(183, 210, 235, .25); border-radius: 7px; color: #dceaf7; background: rgba(17, 39, 58, .9); cursor: pointer; font-size: 10px; }
.image-lightbox-actions button:hover { border-color: var(--cyan); color: #06101c; background: var(--cyan); }
.image-lightbox-stage { position: relative; display: grid; flex: 1; min-height: 0; place-items: center; overflow: hidden; touch-action: none; }
.image-lightbox-stage img { max-width: 92%; max-height: 88%; object-fit: contain; user-select: none; transform-origin: center center; cursor: zoom-in; transition: transform .12s ease-out; }
.image-lightbox-stage img.is-pannable { cursor: grab; transition: none; }
.image-lightbox-stage img.is-pannable:active { cursor: grabbing; }
.image-lightbox-hint { position: absolute; left: 50%; bottom: 13px; padding: 6px 9px; border: 1px solid rgba(183, 210, 235, .18); border-radius: 999px; color: #b9cde0; background: rgba(5, 16, 29, .76); font-size: 9px; transform: translateX(-50%); pointer-events: none; }
.viewer-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; text-align: center; color: #ffd0b3; }
.viewer-error strong { font-size: 16px; }
.viewer-error span, .viewer-error small { max-width: 520px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.viewer-hint { position: absolute; left: 16px; top: 15px; color: rgba(210, 226, 242, .64); font-size: 10px; pointer-events: none; }
.legend { position: absolute; left: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px 13px; padding: 9px 11px; border: 1px solid rgba(183, 210, 235, .13); background: rgba(6, 15, 27, .62); border-radius: 10px; color: #c8d8e8; font-size: 10px; pointer-events: none; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend-swatch { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.legend-swatch.nerve { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.legend-swatch.muscle { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.legend-swatch.landmark { background: var(--green); box-shadow: 0 0 8px var(--green); }
.legend-swatch.needle { background: var(--red); box-shadow: 0 0 8px var(--red); }
.loading-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(6, 15, 27, .82); z-index: 4; transition: opacity .3s; }
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-overlay strong { font-size: 13px; }
.loading-overlay span { color: var(--muted); font-size: 11px; }
.spinner { width: 27px; height: 27px; border: 2px solid rgba(100, 229, 237, .18); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.model-label { padding: 4px 7px; border: 1px solid rgba(255, 102, 121, .7); border-radius: 6px; color: #fff; background: rgba(114, 22, 38, .88); font-size: 10px; white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.model-label.landmark-label { border-color: rgba(119, 223, 179, .65); background: rgba(20, 87, 73, .88); }
.model-label.missing-label { border-style: dashed; border-color: rgba(255, 155, 98, .8); background: rgba(108, 61, 31, .88); }
.bottom-grid { display: grid; grid-template-columns: 1.18fr 1fr; gap: 14px; padding: 14px; background: rgba(3, 12, 22, .25); }
.info-card { padding: 15px; box-shadow: none; background: rgba(13, 28, 44, .74); }
.info-card h3 { margin-top: 5px; font-size: 14px; }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin-top: 13px; }
.check-item { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px; border-radius: 8px; background: rgba(2, 10, 19, .38); color: #c6d5e5; font-size: 10px; line-height: 1.35; }
.check-item::before { content: "✓"; display: grid; place-items: center; flex: 0 0 17px; width: 17px; height: 17px; border-radius: 50%; color: var(--green); border: 1px solid rgba(119, 223, 179, .4); font-size: 10px; }
.source-list { display: grid; gap: 7px; margin-top: 13px; }
.source-item { padding: 8px; border-left: 2px solid var(--cyan); background: rgba(2, 10, 19, .34); color: #bdcede; font-size: 10px; line-height: 1.35; }
.small-note { color: var(--muted); font-size: 9px; line-height: 1.45; margin-top: 10px; }
.footer-note { max-width: 1700px; margin: 0 auto; padding: 0 22px 18px; color: #748da7; font-size: 10px; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
  .warning-panel { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 15px; padding: 20px; }
  .layout { padding: 12px; }
  .sidebar { display: flex; }
  body.mobile-detail-active .sidebar { display: none; }
  body.mobile-detail-active .mobile-list-back {
    display: block;
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 13px 18px;
    color: var(--text);
    background: rgba(8, 22, 37, .96);
    text-align: left;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(12px);
  }
  .stage-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { justify-content: flex-start; }
  .reference-panels { grid-template-columns: 1fr; }
  .manual-device-photos, .manual-step-grid, .manual-columns, .manual-diagrams, .waveform-grid { grid-template-columns: 1fr; }
  .viewer-wrap { min-height: 480px; height: 65vh; }
  .bottom-grid { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
}

.manual-mode .viewer-hint, .manual-mode .legend { display: none; }
.isis81-viewer { position: absolute; inset: 0; overflow: hidden; color: #172536; background: linear-gradient(145deg, #eef5f8, #dbe7ed 72%, #cddde5); }
.isis-manual-scroll { height: 100%; padding: 18px 20px 26px; overflow: auto; scrollbar-color: #89aebb rgba(255, 255, 255, .35); }
.isis-manual-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 13px; border-bottom: 1px solid rgba(45, 70, 91, .2); }
.isis-manual-header .section-kicker { color: #147b88; }
.isis-manual-header h3 { margin-top: 4px; color: #14283a; font-size: 18px; }
.isis-manual-header p:not(.section-kicker) { max-width: 780px; margin-top: 5px; color: #4a6176; font-size: 10px; line-height: 1.45; }
.isis-manual-callout { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; padding: 10px 12px; border: 1px solid rgba(20, 123, 136, .32); border-radius: 10px; color: #31556a; background: rgba(223, 247, 249, .74); font-size: 10px; line-height: 1.45; }
.isis-manual-callout strong { flex: 0 0 auto; color: #147b88; font-size: 10px; }
.isis-manual-callout.caution { border-color: rgba(172, 104, 42, .34); color: #6c4b2c; background: rgba(255, 245, 224, .9); }
.isis-manual-callout.caution strong { color: #a7662d; }
.isis-manual-section { margin-top: 13px; padding: 13px; border: 1px solid rgba(40, 67, 89, .16); border-radius: 13px; background: rgba(247, 252, 255, .76); box-shadow: 0 8px 23px rgba(24, 52, 72, .08); }
.isis-section-title { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 11px; }
.isis-section-title > span { display: grid; width: 27px; height: 27px; place-items: center; flex: 0 0 27px; border-radius: 50%; color: #fff; background: #147b88; font-size: 10px; font-weight: 800; }
.isis-section-title b { display: block; color: #173c59; font-size: 13px; }
.isis-section-title small { display: block; margin-top: 3px; color: #5c7282; font-size: 9px; line-height: 1.35; }
.workflow-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.workflow-steps article { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 8px; padding: 9px; border: 1px solid rgba(40, 67, 89, .13); border-radius: 8px; background: rgba(255, 255, 255, .73); }
.workflow-steps article > strong { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: #fff; background: #147b88; font-size: 10px; }
.workflow-steps article b { display: block; color: #21445d; font-size: 10px; }
.workflow-steps article p { margin-top: 4px; color: #5c7282; font-size: 9px; line-height: 1.45; }
.workflow-steps article p b { display: inline; color: #147b88; font-size: 9px; }
.workflow-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 11px; }
.workflow-figures .isis-figure-wide { min-width: 0; margin-top: 0; }
.workflow-figures .isis-figure-wide img { max-height: 250px; }
.isis-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; align-items: start; }
.isis-photo-card { min-width: 0; margin: 0; padding: 7px; border: 1px solid rgba(20, 123, 136, .23); border-radius: 9px; background: rgba(255, 255, 255, .86); }
.isis-photo-card.wide { grid-column: 1 / -1; }
.isis-photo-card img { display: block; width: 100%; max-height: 235px; object-fit: contain; border-radius: 6px; cursor: zoom-in; }
.isis-photo-card.wide img { max-height: 280px; }
.isis-photo-card figcaption, .isis-figure-wide figcaption { margin-top: 6px; color: #5c7282; font-size: 9px; line-height: 1.35; }
.isis-table-wrap { margin-top: 11px; overflow-x: auto; }
.isis-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 9px; }
.isis-table th { padding: 7px; color: #126e7a; background: rgba(217, 238, 247, .9); text-align: left; font-size: 9px; }
.isis-table td { padding: 7px; border-top: 1px solid rgba(40, 67, 89, .12); color: #4a6176; vertical-align: top; line-height: 1.35; }
.isis-table td:first-child { color: #173c59; white-space: nowrap; }
.isis-table code, .isis-manual-section code { padding: 2px 4px; border-radius: 4px; color: #126e7a; background: rgba(217, 238, 247, .8); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.isis-table td b { color: #21445d; }
.rear-grid { grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr); }
.isis-terminal-list { display: grid; gap: 8px; }
.isis-terminal-list > div { padding: 9px; border-left: 3px solid #147b88; border-radius: 7px; background: rgba(224, 242, 247, .72); }
.isis-terminal-list b { display: block; color: #173c59; font-size: 10px; }
.isis-terminal-list span { display: block; margin-top: 4px; color: #4a6176; font-size: 9px; line-height: 1.4; }
.isis-step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.isis-step-grid article { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 9px; border: 1px solid rgba(40, 67, 89, .13); border-radius: 8px; background: rgba(255, 255, 255, .73); }
.isis-step-grid article > strong { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: #fff; background: #157f8c; font-size: 10px; }
.isis-step-grid article b { display: block; color: #21445d; font-size: 10px; }
.isis-step-grid article p { margin-top: 4px; color: #5c7282; font-size: 9px; line-height: 1.4; }
.isis-figure-wide { margin: 11px 0 0; padding: 7px; border: 1px solid rgba(40, 67, 89, .14); border-radius: 9px; background: #fff; }
.isis-figure-wide img { display: block; width: 100%; max-height: 310px; object-fit: contain; cursor: zoom-in; }
.isis-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.isis-subpanel { min-width: 0; padding: 10px; border: 1px solid rgba(40, 67, 89, .13); border-radius: 9px; background: rgba(255, 255, 255, .73); }
.isis-subpanel h4 { color: #173c59; font-size: 11px; }
.muted { margin-top: 6px; color: #5c7282; font-size: 9px; line-height: 1.45; }
.isis-mini-table { display: grid; gap: 5px; margin-top: 8px; }
.isis-mini-table > div { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 2px 7px; padding: 6px 7px; border-radius: 7px; background: rgba(225, 243, 247, .6); }
.isis-mini-table b { color: #147b88; font-size: 9px; }
.isis-mini-table span { color: #21445d; font-size: 9px; font-weight: 700; }
.isis-mini-table small { grid-column: 2; color: #5c7282; font-size: 8px; }
.isis-bullet-list { display: grid; gap: 6px; margin: 9px 0 0; padding-left: 16px; color: #4a6176; font-size: 9px; line-height: 1.4; }
.impedance-layout { display: grid; grid-template-columns: minmax(230px, .58fr) minmax(0, 1.42fr); gap: 13px; align-items: start; }
.impedance-layout .isis-photo-card img { max-height: 315px; }
.impedance-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: impedance; }
.impedance-steps li { counter-increment: impedance; position: relative; padding: 9px 10px 9px 35px; border-radius: 8px; color: #4a6176; background: rgba(224, 242, 247, .64); font-size: 10px; line-height: 1.45; }
.impedance-steps li::before { content: counter(impedance); position: absolute; left: 10px; top: 9px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #fff; background: #157f8c; font-size: 9px; font-weight: 800; }
.impedance-steps b { color: #173c59; }
.isis-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.isis-check-grid > div { display: grid; gap: 4px; padding: 9px; border: 1px solid rgba(40, 67, 89, .13); border-radius: 8px; background: rgba(255, 255, 255, .73); }
.isis-check-grid b { color: #147b88; font-size: 10px; }
.isis-check-grid span { color: #5c7282; font-size: 9px; line-height: 1.4; }
.isis-manual-footer { display: grid; gap: 5px; margin-top: 12px; padding: 10px 12px; border-top: 1px solid rgba(40, 67, 89, .16); color: #5c7282; font-size: 9px; line-height: 1.4; }
.isis-manual-footer b { color: #21445d; }
.isis-manual-footer small { color: #8a5d34; }

@media (max-width: 680px) {
  .view-tabs { flex-wrap: wrap; }
  .isis-manual-scroll { padding: 13px 12px 20px; }
  .isis-photo-grid, .rear-grid, .isis-step-grid, .isis-two-column, .impedance-layout, .isis-check-grid, .workflow-steps, .workflow-figures { grid-template-columns: 1fr; }
  .isis-photo-card.wide { grid-column: auto; }
  .isis-table { min-width: 700px; }
}
