* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: #000; overflow: hidden; color: #cfd8dc; font-family: "Helvetica Neue", Arial, sans-serif; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; background: #000; display: grid; grid-template-columns: 280px 1300px 340px; grid-template-rows: 64px 960px 56px; }
#top { grid-column: 1 / 4; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: linear-gradient(#1b2530, #10161d); border-bottom: 1px solid #2b3946; }
.brand b { color: #7fd3ff; font-size: 26px; letter-spacing: 1px; margin-right: 16px; }
.brand span { font-size: 15px; color: #8aa0b2; letter-spacing: .5px; }
.patient { text-align: center; cursor: pointer; }
#pName { font-size: 22px; color: #fff; font-weight: 600; }
#pMeta { font-size: 15px; color: #9fb3c3; }
.clock { text-align: right; font-size: 15px; color: #9fb3c3; }
#clock { font-size: 20px; color: #e1eaf0; }
#left { padding: 14px 16px; border-right: 1px solid #1d2731; background: #05080b; display: flex; flex-direction: column; gap: 14px; }
.probe-box { background: #0f1820; border: 1px solid #23313d; border-radius: 6px; padding: 10px 12px; }
#probeName { font-size: 26px; color: #ffd36b; font-weight: 700; }
#preset { font-size: 16px; color: #9fb3c3; }
.params { font-family: "Menlo", monospace; font-size: 17px; line-height: 1.55; }
.params .sec { color: #7fd3ff; margin-top: 8px; font-weight: bold; }
.params .row { display: flex; justify-content: space-between; }
.params .row span:last-child { color: #fff; }
.meas { margin-top: auto; font-family: "Menlo", monospace; font-size: 18px; background: #0b1218; border: 1px solid #23313d; border-radius: 6px; padding: 10px 12px; min-height: 120px; }
.meas .t { color: #ffd36b; font-weight: bold; margin-bottom: 4px; }
.meas .r { color: #fff; }
#center { position: relative; display: flex; flex-direction: column; background: #000; }
#imgWrap { position: relative; flex: 1; }
#img, #ovl { position: absolute; left: 0; top: 0; }
#trace { display: none; border-top: 1px solid #1d2731; }
#right { padding: 14px 18px; border-left: 1px solid #1d2731; background: #05080b; display: flex; flex-direction: column; gap: 18px; font-size: 17px; }
#right h3 { color: #7fd3ff; font-size: 15px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
#reason { color: #e8eef2; line-height: 1.4; }
#viewName { margin-top: 8px; color: #ffd36b; }
#dxBox { margin-top: 14px; padding-top: 12px; border-top: 1px solid #23313d; }
#dx { color: #9cff9c; font-weight: 600; margin-bottom: 6px; }
#findings { padding-left: 18px; color: #d7e2e8; line-height: 1.35; font-size: 15px; }
#connect { text-align: center; }
#qr { width: 170px; height: 170px; background: #fff; border-radius: 6px; padding: 6px; }
#ctrlUrl { font-family: Menlo, monospace; font-size: 14px; color: #fff; margin-top: 6px; word-break: break-all; }
.muted { color: #6f8494; }
.small { font-size: 13px; line-height: 1.6; }
#keys { margin-top: auto; }
#bottom { grid-column: 1 / 4; display: flex; align-items: center; gap: 24px; padding: 0 22px; background: #0b1117; border-top: 1px solid #1d2731; font-size: 17px; }
#modes span { padding: 4px 10px; border-radius: 4px; margin-right: 6px; background: #17222c; color: #8aa0b2; font-weight: 600; }
#modes span.on { background: #1d5d86; color: #fff; }
#modes span.frz { background: #8a1d1d; color: #fff; }
#cine { display: flex; align-items: center; gap: 10px; flex: 1; visibility: hidden; }
#cineBar { flex: 1; max-width: 600px; height: 10px; background: #1b2731; border-radius: 5px; position: relative; }
#cinePos { position: absolute; top: -3px; width: 6px; height: 16px; background: #ffd36b; border-radius: 2px; }
#status { color: #ffd36b; min-width: 300px; text-align: right; }
.hidden { display: none !important; }
#caseMenu { position: fixed; inset: 0; background: rgba(0, 0, 0, .82); display: flex; align-items: center; justify-content: center; z-index: 10; }
.menu-inner { width: min(1100px, 92vw); height: 86vh; background: #0d141a; border: 1px solid #2b3946; border-radius: 10px; padding: 18px; display: flex; flex-direction: column; }
.menu-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.menu-head h2 { color: #7fd3ff; flex: 0 0 auto; }
.menu-head input { flex: 1; background: #05080b; border: 1px solid #2b3946; color: #fff; padding: 8px 10px; border-radius: 6px; font-size: 16px; }
.menu-head button { background: #1d5d86; color: #fff; border: 0; padding: 8px 14px; border-radius: 6px; font-size: 15px; cursor: pointer; }
#caseList { overflow: auto; columns: 3; column-gap: 18px; }
#caseList .cat { color: #ffd36b; font-weight: bold; margin: 10px 0 4px; break-after: avoid; }
#caseList .item { padding: 5px 8px; border-radius: 4px; cursor: pointer; color: #d7e2e8; break-inside: avoid; }
#caseList .item:hover, #caseList .item.cur { background: #1d5d86; color: #fff; }

.topbtns { display: flex; gap: 10px; }
.topbtns button { background: #1d5d86; color: #fff; border: 0; border-radius: 6px; padding: 9px 16px; font-size: 17px; font-weight: 600; cursor: pointer; }
.topbtns button:hover { background: #2a7ab0; }
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .8); display: flex; align-items: center; justify-content: center; z-index: 20; }
.modal-inner { width: min(640px, 92vw); max-height: 92vh; overflow: auto; background: #0d141a; border: 1px solid #2b3946; border-radius: 12px; padding: 24px; color: #dfe6eb; font-size: 17px; line-height: 1.45; display: flex; flex-direction: column; gap: 12px; }
.modal-inner.welcome { width: min(760px, 94vw); }
.modal-inner h2 { color: #7fd3ff; }
.modal-inner ol { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.modal-inner .lead { color: #fff; }
.modal-inner .note { background: #16222c; border-radius: 8px; padding: 10px 12px; }
.pill { background: #1d5d86; color: #fff; border-radius: 4px; padding: 1px 6px; font-weight: 600; white-space: nowrap; }
.modal-inner input, .modal-inner textarea { background: #05080b; border: 1px solid #2b3946; color: #fff; border-radius: 8px; padding: 10px; font-size: 17px; font-family: inherit; }
.modal-inner button { background: #26313b; color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font-size: 17px; cursor: pointer; }
.modal-inner button.big { background: #1d5d86; font-weight: 700; }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; }
#roomCode { font-size: 22px; color: #ffd36b; font-weight: 700; letter-spacing: 3px; margin-top: 4px; }
