.webcam-open {display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:10px 15px;border:1px solid #a9c4d0;border-radius:14px;background:#f9fcfe;color:#174d62;font:inherit;font-size:14px;font-weight:600;box-shadow:0 2px 3px #15394a0c;cursor:pointer;}
.webcam-open svg {width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
.webcam-open .webcam-arrow {width:17px;margin-left:12px;transition:transform 200ms;}
.webcam-open:hover {border-color:#39788f;background:#eef6f9;}
.webcam-open:hover .webcam-arrow {transform:translateX(3px);}
.webcam-open:active {transform:translateY(1px);}
.webcam-open:focus-visible,.webcam-dialog button:focus-visible,.webcam-dialog a:focus-visible {outline:3px solid #0a7593;outline-offset:3px;}
.webcam-modal-open {overflow:hidden;}
.webcam-dialog {box-sizing:border-box;width:min(960px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 40px);padding:0;margin:auto;border:1px solid #e2edf2;border-radius:24px;background:#f9fcfe;color:#0a2839;box-shadow:0 8px 20px #0a283926,0 32px 100px #0a283959;overflow:auto;overscroll-behavior:contain;}
.webcam-dialog::backdrop {background:#0a283977;backdrop-filter:blur(5px);}
.webcam-heading {display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 24px;}
.webcam-heading p {margin:0 0 5px;color:#527183;font-size:13px;}
.webcam-heading h2 {font-size:24px;line-height:1.2;margin:0;}
.webcam-close {flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;font-size:28px;background:#e9f1f5;color:#16465b;cursor:pointer;}
.webcam-close:hover {background:#d8e8ef;}
.webcam-choices {display:flex;gap:8px;overflow-x:auto;padding:0 24px 16px;scrollbar-width:thin;}
.webcam-choices button {flex:none;min-height:40px;padding:8px 13px;border-radius:22px;background:transparent;border:1px solid #c4d9e2;color:#315666;font:inherit;font-size:13px;cursor:pointer;}
.webcam-choices button[aria-pressed=true] {background:#174c60;border-color:#174c60;color:white;}
.webcam-stage {position:relative;aspect-ratio:16/9;background:#102b39;color:#eef6f9;overflow:hidden;}
.webcam-stage iframe,.webcam-stage video,.webcam-stage img {position:absolute;inset:0;width:100%;height:100%;border:0;object-fit:contain;}
.webcam-message {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;padding:24px;text-align:center;pointer-events:none;}
.webcam-message svg {width:36px;height:36px;fill:none;stroke:currentColor;stroke-width:1.3;}
.webcam-message p {font-size:15px;line-height:1.5;max-width:380px;margin:0;}
.webcam-message button {pointer-events:auto;background:#e1eff5;color:#174c60;padding:10px 16px;border-radius:10px;font:inherit;font-size:14px;cursor:pointer;}
.webcam-stage[data-state=ready] .webcam-message {display:none;}
.webcam-stage[data-state=waiting] .webcam-message {inset:auto 0 0;padding:12px;background:#102b39e8;z-index:1;}
.webcam-loader {width:25px;height:25px;border-radius:50%;border:2px solid #ffffff30;border-top-color:#c5e6ef;animation:webcam-loading 900ms linear infinite;}
.webcam-footer {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 24px;margin:0;padding:14px 24px;background:none;font-size:13px;line-height:1.4;color:#527183;}
.webcam-footer a {color:#135c76;padding:8px 0;min-height:40px;box-sizing:border-box;text-underline-offset:4px;}
@keyframes webcam-loading {to{transform:rotate(360deg);}}
@media(max-width:600px) {
 .webcam-dialog {width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:18px;}
 .webcam-heading {padding:16px;gap:12px;}.webcam-heading h2 {font-size:20px;}
 .webcam-choices {padding:0 16px 12px;}.webcam-message {padding:16px;}.webcam-message p {font-size:13px;}
 .webcam-footer {padding:10px 16px;gap:0 12px;}
}
@media(prefers-reduced-motion:reduce) {.webcam-loader {animation:none;}.webcam-open .webcam-arrow {transition:none;transform:none;}}
@media(forced-colors:active) {.webcam-dialog {border:2px solid CanvasText;}.webcam-choices button[aria-pressed=true] {outline:2px solid Highlight;}}

.webcam-select {display:flex;align-items:center;gap:12px;padding:0 24px 16px;font-size:13px;color:#527183;}
.webcam-select select {width:100%;min-width:0;min-height:44px;font:inherit;font-size:16px;color:#16465b;background:#eef5f8;border:1px solid #c4d9e2;border-radius:12px;padding:8px 32px 8px 12px;}
.webcam-select select:focus-visible {outline:3px solid #0a7593;outline-offset:2px;}
.webcam-stage[data-state=empty],.webcam-stage[data-state=unavailable] {aspect-ratio:auto;min-height:180px;background:#eaf2f6;color:#527183;}
.webcam-footer:has(#webcamCaption:empty) {justify-content:flex-end;}
#webcamCaption:empty {display:none;}
@media(max-width:600px) {.webcam-select {padding:0 16px 12px;gap:8px;}}


.webcam-dialog.has-snapshots .webcam-heading {position:sticky;top:0;z-index:2;background:#f9fcfe;border-bottom:1px solid #dbe8ee;}
.webcam-snapshot-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:20px 24px 4px;}
.webcam-snapshot {margin:0;min-width:0;align-self:start;background:#edf4f7;border-radius:14px;overflow:hidden;}
.webcam-snapshot-image {position:relative;aspect-ratio:16/9;background:#e3edf2;display:grid;place-items:center;}
.webcam-snapshot-image img {display:block;width:100%;height:100%;object-fit:contain;}
.webcam-snapshot-image img[hidden] {display:none;}
.webcam-snapshot-image.is-unavailable {background:#e3edf2;}
.webcam-snapshot-error {color:#527183;font-size:14px;padding:16px;text-align:center;}
.webcam-snapshot-error[hidden] {display:none;}
.webcam-snapshot figcaption {display:flex;flex-direction:column;gap:6px;padding:12px 14px 14px;line-height:1.4;}
.webcam-snapshot figcaption strong {font-size:15px;font-weight:600;color:#16465b;}
.webcam-snapshot time,.webcam-snapshot-time-unknown {font-size:12px;color:#527183;}
.webcam-snapshot-stale {font-size:12px;color:#70552c;}
@media(max-width:600px) {
 .webcam-snapshot-grid {grid-template-columns:minmax(0,1fr);gap:14px;padding:16px 16px 0;}
 .webcam-snapshot figcaption strong {font-size:14px;}
}
@media(forced-colors:active) {.webcam-snapshot {border:1px solid CanvasText;}}

.webcam-snapshot-grid:has(>.webcam-snapshot:only-child) {grid-template-columns:minmax(0,1fr);}
.webcam-snapshot-source-time {font-size:12px;color:#527183;}


.webcam-primary-actions {padding:18px 24px 0;}
.webcam-live-open,.webcam-source-open {display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;box-sizing:border-box;padding:11px 16px;border-radius:12px;font:inherit;font-size:15px;font-weight:600;cursor:pointer;}
.webcam-live-open {background:#174c60;color:#fff;border:1px solid #174c60;box-shadow:0 2px 4px #15394a20;}
.webcam-live-open:hover {background:#0f3e51;}
.webcam-live-open svg {width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
.webcam-source-open {background:#edf4f7;color:#135c76;border:1px solid #bad1dc;text-decoration:none;}
.webcam-source-open:hover {background:#e0edf3;border-color:#658fa2;}
.webcam-snapshots-empty {padding:24px;color:#527183;font-size:14px;}
.webcam-dialog .webcam-snapshot-grid {padding-bottom:24px;}
.webcam-live-back {padding:0 24px 14px;}
.webcam-live-back button {font:inherit;font-size:14px;min-height:40px;padding:8px 13px;color:#174c60;background:#e9f1f5;border:1px solid #c4d9e2;border-radius:10px;cursor:pointer;}
.webcam-live-back button:hover {background:#d8e8ef;}
.webcam-live-dialog::backdrop {background:#0a283955;backdrop-filter:blur(3px);}
@media(max-width:600px) {.webcam-primary-actions {padding:16px 16px 0;}.webcam-live-back {padding:0 16px 12px;}.webcam-dialog .webcam-snapshot-grid {padding-bottom:16px;}.webcam-snapshots-empty {padding:20px 16px;}}

.webcam-gallery-toolbar {position:sticky;top:0;z-index:2;background:#f9fcfe;border-bottom:1px solid #dbe8ee;}
.webcam-dialog.has-snapshots .webcam-gallery-toolbar .webcam-heading {position:static;border-bottom:0;}
.webcam-gallery-toolbar .webcam-primary-actions {padding-top:0;padding-bottom:18px;}
@media(max-width:600px) {.webcam-gallery-toolbar .webcam-primary-actions {padding-bottom:14px;}}

.webcam-primary-actions:empty {display:none;}
