.slide-viewer { --sv-border: #dfe6f0; --sv-ink: #293a58; --sv-muted: #697b95; display: flex; flex-direction: column; gap: 14px; height: calc(100vh - 112px); min-height: 580px; color: var(--sv-ink); }
.sv-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.sv-heading h1 { margin: 4px 0 2px; font-size: 23px; font-weight: 600; color: #233d6e; }
.sv-heading p { margin: 0; color: var(--sv-muted); font-size: 12px; }
.sv-back { color: #3372c8; text-decoration: none; font-size: 12px; }
.sv-back:hover { text-decoration: underline; }
.sv-counter { color: #567092; font-size: 13px; white-space: nowrap; }
.sv-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 13px; }
.sv-filmstrip, .sv-workbench { background: #fff; border: 1px solid var(--sv-border); box-shadow: 0 2px 7px #2939580d; min-height: 0; }
.sv-filmstrip { display: flex; flex-direction: column; }
.sv-filmstrip-title { display: flex; align-items: center; justify-content: space-between; padding: 13px 13px 10px; border-bottom: 1px solid var(--sv-border); }
.sv-filmstrip-title h2 { margin: 0; font-size: 13px; font-weight: 600; }
.sv-filmstrip-title span { display: inline-grid; place-items: center; min-width: 23px; height: 23px; padding: 0 5px; border-radius: 11px; background: #e9f0fc; color: #356bb7; font-size: 11px; }
.sv-filmstrip-list { min-height: 0; overflow: auto; padding: 6px; }
.sv-filmstrip-item { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px; border: 1px solid transparent; border-radius: 3px; color: inherit; text-decoration: none; }
.sv-filmstrip-item:hover, .sv-filmstrip-item:focus-visible { background: #f4f8ff; }
.sv-filmstrip-item.selected { border-color: #8eb1eb; background: #eaf2ff; }
.sv-filmstrip-art { flex: 0 0 51px; width: 51px; height: 40px; display: grid; place-items: center; overflow: hidden; border: 1px solid #dae3ef; border-radius: 2px; background-color: #eef2f7; background-image: linear-gradient(45deg, #e8edf4 25%, transparent 25%), linear-gradient(-45deg, #e8edf4 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e8edf4 75%), linear-gradient(-45deg, transparent 75%, #e8edf4 75%); background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0; color: #7d8da5; font-size: 12px; }
.sv-filmstrip-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.sv-filmstrip-copy { display: block; min-width: 0; }
.sv-filmstrip-copy strong, .sv-filmstrip-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-filmstrip-copy strong { font-size: 11px; font-weight: 600; }
.sv-filmstrip-copy small { color: var(--sv-muted); font-size: 10px; margin-top: 3px; }
.sv-workbench { display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; }
.sv-toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 48px; flex-shrink: 0; padding: 7px 9px; border-bottom: 1px solid var(--sv-border); background: #fdfefe; }
.sv-button { box-sizing: border-box; min-width: 30px; height: 29px; padding: 2px 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dce4ef; border-radius: 3px; background: #fff; color: #3f597f; text-decoration: none; font: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.sv-button:hover:not(:disabled):not(.sv-disabled), .sv-button:focus-visible:not(:disabled) { border-color: #6e9be0; background: #edf4ff; }
.sv-button.active { border-color: #477ed2; background: #dfeaff; color: #23539b; }
.sv-button:disabled, .sv-disabled { opacity: .45; cursor: default; }
.sv-fit { font-size: 18px; }
.sv-presets { display: flex; flex-wrap: wrap; gap: 3px; }
.sv-presets .sv-button { min-width: 34px; font-size: 11px; font-weight: 600; }
.sv-separator { width: 1px; height: 21px; margin: 0 4px; background: #dfe6f0; }
.sv-rotation-control { position: relative; font-size: 11px; }
.sv-rotation-control summary { box-sizing: border-box; min-height: 29px; display: flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid #dce4ef; border-radius: 3px; background: #fff; color: #3f597f; cursor: pointer; list-style: none; white-space: nowrap; }
.sv-rotation-control summary::-webkit-details-marker { display: none; }
.sv-rotation-control summary:hover, .sv-rotation-control summary:focus-visible { border-color: #6e9be0; background: #edf4ff; }
.sv-rotation-control[open] { z-index: 6; }
.sv-rotation-control[open] summary { border-color: #477ed2; background: #dfeaff; }
.sv-rotation-readout { min-width: 28px; text-align: right; font: inherit; }
.sv-rotation-control label { position: absolute; top: calc(100% + 5px); left: 0; z-index: 6; width: 190px; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #b9cbe2; border-radius: 3px; background: #fff; box-shadow: 0 5px 15px #20395d2d; color: #435b7d; }
.sv-rotation-slider { width: 100%; margin: 0; accent-color: #477ed2; }
.sv-zoom-readout { margin-left: auto; color: #536d92; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sv-stage { position: relative; flex: 1; min-height: 300px; overflow: hidden; background: #111b2b; cursor: grab; touch-action: none; outline: none; }
.sv-stage.dragging { cursor: grabbing; }
.sv-stage.annotating { cursor: crosshair; }
.sv-stage:focus-visible { box-shadow: inset 0 0 0 2px #75a9fd; }
.sv-image-plane { position: absolute; top: 50%; left: 50%; transform-origin: center center; user-select: none; pointer-events: none; will-change: transform; }
.sv-image-plane[hidden], .sv-stage-message[hidden] { display: none; }
.sv-image { display: block; width: 100%; height: 100%; max-width: none; max-height: none; }
.sv-tiles { position: absolute; inset: 0; }
.sv-tiles img { position: absolute; display: block; max-width: none; max-height: none; border: 0; }
.sv-marker-layer { position: absolute; inset: 0; pointer-events: none; }
.sv-shape-layer { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.sv-shape { fill: none; stroke: #ffda56; stroke-width: 2.5px; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 2px #000b); }
.sv-shape-rectangle { fill: #ffda5629; }
.sv-shape.selected { stroke: #ff824a; stroke-width: 3.5px; fill: #ff824a2b; }
.sv-marker { position: absolute; z-index: 2; transform: translate(-50%, -100%); width: 26px; height: 26px; border: 2px solid #fff; border-radius: 50%; background: #e33e41; box-shadow: 0 1px 6px #000a; color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; pointer-events: auto; }
.sv-marker.selected { background: #f7a914; box-shadow: 0 0 0 3px #fff9, 0 2px 8px #000b; }
.sv-marker:hover, .sv-marker:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sv-stage-message { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: min(90%, 380px); padding: 13px 19px; border-radius: 4px; background: #23334aaa; color: #fff; text-align: center; font-size: 13px; }
.sv-bottom-bar { min-height: 138px; display: flex; align-items: center; gap: 22px; padding: 8px 14px; border-top: 1px solid var(--sv-border); color: var(--sv-muted); font-size: 11px; }
.sv-bottom-bar p { margin: 0; flex: 1; }
.sv-dimensions { white-space: nowrap; }
.sv-annotation-add { width: auto; font-size: 11px; font-weight: 600; white-space: nowrap; }
.sv-shape-tools { display: flex; flex-wrap: wrap; gap: 3px; }
.sv-annotation-panel { border-top: 1px solid var(--sv-border); background: #fff; padding: 7px 11px; min-height: 62px; }
.sv-annotation-head { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.sv-annotation-head strong { color: #354e75; }
.sv-annotation-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: #e9f0fc; color: #356bb7; }
.sv-annotation-help { color: var(--sv-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-annotation-list { display: flex; gap: 5px; overflow-x: auto; margin-top: 5px; padding-bottom: 2px; }
.sv-annotation-item { flex: 0 0 auto; max-width: 230px; display: flex; flex-direction: column; align-items: start; gap: 2px; padding: 4px 7px; border: 1px solid #dce4ef; border-radius: 3px; background: #fff; color: #3f597f; cursor: pointer; font-size: 11px; }
.sv-annotation-item.selected { border-color: #477ed2; background: #eaf2ff; }
.sv-annotation-item b, .sv-annotation-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-annotation-item small { color: var(--sv-muted); }
.sv-annotation-empty { font-size: 11px; color: var(--sv-muted); }
.sv-annotation-actions { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11px; }
.sv-annotation-actions span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-annotation-actions button, .sv-annotation-form button { padding: 3px 7px; border: 1px solid #dce4ef; border-radius: 3px; background: #fff; color: #35537d; cursor: pointer; font: inherit; }
.sv-annotation-form { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; margin-top: 6px; font-size: 11px; }
.sv-annotation-form[hidden] { display: none; }
.sv-annotation-form label { display: flex; flex-direction: column; gap: 2px; flex: 1 1 150px; }
.sv-annotation-form input, .sv-annotation-form textarea { min-width: 0; padding: 5px; border: 1px solid #cbd5e3; border-radius: 3px; font: inherit; }
.sv-annotation-form-actions { display: flex; gap: 5px; align-self: end; }
.sv-calibration-panel { margin-top: 6px; border-top: 1px solid var(--sv-border); color: #526782; font-size: 11px; }
.sv-calibration-panel summary { padding: 6px 0 2px; cursor: pointer; }
.sv-calibration-panel summary strong { margin-right: 6px; color: #354e75; }
.sv-calibration-warning { margin: 6px 0; color: #865a23; }
.sv-calibration-form { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; margin: 7px 0; }
.sv-calibration-form label { display: flex; flex-direction: column; gap: 3px; }
.sv-calibration-form input { box-sizing: border-box; width: 128px; padding: 5px; border: 1px solid #cbd5e3; border-radius: 3px; font: inherit; }
.sv-calibration-form button { padding: 5px 7px; border: 1px solid #dce4ef; border-radius: 3px; background: #fff; color: #35537d; cursor: pointer; font: inherit; }
.sv-calibration-form button:disabled { opacity: .5; cursor: default; }
.sv-calibration-history { margin: 8px 0 3px; }
.sv-calibration-history ul { max-height: 92px; overflow: auto; margin: 4px 0 0; padding-left: 17px; }
.sv-calibration-history li { padding: 2px 0; }
.sv-calibration-events > span, .sv-calibration-events > small { display: block; margin-top: 4px; }
.sv-overview { flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; color: #475d7e; }
.sv-overview-frame { box-sizing: border-box; width: 180px; height: 120px; display: grid; place-items: center; border: 1px solid #cbd5e3; background: #182338; }
.sv-overview-map { position: relative; min-width: 1px; min-height: 1px; overflow: hidden; cursor: crosshair; touch-action: none; }
.sv-overview-map img { width: 100%; height: 100%; display: block; user-select: none; pointer-events: none; }
.sv-overview-viewport { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.sv-overview-viewport polygon { fill: #ffdf4738; stroke: #f5c64e; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sv-empty, .sv-error, .sv-loading { max-width: 760px; }
.sv-empty p, .sv-error p, .sv-loading p { margin: 12px 0 20px; }
@media (max-width: 950px) { .slide-viewer { height: auto; min-height: calc(100vh - 115px); } .sv-layout { display: flex; flex-direction: column; } .sv-filmstrip { flex: 0 0 auto; } .sv-filmstrip-list { display: flex; overflow-x: auto; } .sv-filmstrip-item { min-width: 175px; max-width: 175px; } .sv-workbench { flex: 1; min-height: 530px; } }
@media (max-width: 630px) { .sv-heading h1 { font-size: 19px; } .sv-heading p { font-size: 11px; } .sv-toolbar { gap: 4px; } .sv-button { min-width: 28px; padding: 2px 5px; } .sv-separator { display: none; } .sv-bottom-bar { flex-wrap: wrap; gap: 7px 13px; } .sv-bottom-bar p { display: none; } .sv-overview-frame { width: 138px; height: 94px; } .sv-overview-map { max-width: 132px; max-height: 87px; } }
