* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0d10; color: #e6e8eb; font: 14px system-ui, -apple-system, "Segoe UI", sans-serif; }
#app, .viewer { height: 100%; display: flex; flex-direction: column; }
.bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #14181d; border-bottom: 1px solid #232a31; }
.name { font-weight: 600; }
.controls { display: flex; align-items: center; gap: 8px; }
.label { opacity: .55; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.q { background: #1d232a; color: #cfd4da; border: 1px solid #2b333c; border-radius: 6px; padding: 4px 12px; cursor: pointer; }
.q.on { background: #2d6cdf; border-color: #2d6cdf; color: #fff; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.live { background: #2ecc71; box-shadow: 0 0 8px #2ecc71; }
.dot.off { background: #e74c3c; }
.status { font-size: 11px; opacity: .8; }
.stage { position: relative; flex: 1; min-height: 0; background: #000; display: flex; align-items: center; justify-content: center; }
video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #cfd4da; background: rgba(0, 0, 0, .45); font-size: 13px; padding: 12px; text-align: center; }
.overlay[hidden] { display: none; }
.strip { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: #14181d; border-top: 1px solid #232a31; }
.thumb { position: relative; flex: 0 0 140px; height: 84px; padding: 0; border: 1px solid #2b333c; border-radius: 6px; overflow: hidden; background: #000; cursor: pointer; }
.thumb.sel { outline: 2px solid #2ecc71; border-color: #2ecc71; }
.thumb.off { opacity: .4; cursor: not-allowed; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #8a939c; font-size: 11px; }
.thumb .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: 11px; background: rgba(0, 0, 0, .6); text-align: left; }
.ptz { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.ptz-pad { display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(3, 44px); gap: 4px; }
.ptz .p { background: rgba(20, 24, 29, 0.72); color: #cfd4da; border: 1px solid rgba(43, 51, 60, 0.9); border-radius: 6px; font-size: 18px; line-height: 1; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; padding: 0; }
.ptz .p:active { background: #2d6cdf; border-color: #2d6cdf; color: #fff; }
.ptz-pad .upLeft { grid-column: 1; grid-row: 1; }
.ptz-pad .up { grid-column: 2; grid-row: 1; }
.ptz-pad .upRight { grid-column: 3; grid-row: 1; }
.ptz-pad .left { grid-column: 1; grid-row: 2; }
.ptz-pad .right { grid-column: 3; grid-row: 2; }
.ptz-pad .downLeft { grid-column: 1; grid-row: 3; }
.ptz-pad .down { grid-column: 2; grid-row: 3; }
.ptz-pad .downRight { grid-column: 3; grid-row: 3; }
.ptz-zoom { display: flex; gap: 4px; }
.ptz-zoom .p { height: 44px; flex: 1; }
