* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --font-display: 'Aldrich', 'Arial Narrow', sans-serif;
    --font-ui: 'Barlow Semi Condensed', 'Segoe UI', sans-serif;
    --font-data: 'Courier New', 'Lucida Console', monospace;
    --bg-primary: oklch(0.14 0.018 148);
    --bg-secondary: oklch(0.18 0.024 148);
    --bg-tertiary: oklch(0.22 0.032 148);
    --bg-elevated: oklch(0.26 0.042 148);
    --accent-green: oklch(0.86 0.22 145);
    --accent-green-deep: oklch(0.58 0.16 146);
    --accent-red: oklch(0.68 0.23 28);
    --accent-amber: oklch(0.82 0.16 90);
    --text-primary: oklch(0.92 0.055 145);
    --text-secondary: oklch(0.73 0.06 145);
    --text-muted: oklch(0.58 0.04 145);
    --border-color: oklch(0.34 0.075 145);
    --border-soft: oklch(0.26 0.05 145);
    --overlay-bg: rgba(1, 7, 4, 0.78);
    --primary-bright: var(--accent-green);
    --panel-shadow: 0 24px 48px rgba(0, 0, 0, 0.52), 0 0 28px rgba(38, 255, 122, 0.14);
    --panel-sheen: linear-gradient(180deg, rgba(151, 255, 186, 0.08) 0%, rgba(151, 255, 186, 0) 38%);
    --flicker-opacity: 0.05;
    --anim-speed: 1.5s;
    --anim-duration: 0.3s;
    --header-height: clamp(80px, 8vh, 120px);
    --footer-height: clamp(40px, 4vh, 60px);
    --main-margin: clamp(1rem, 2vh, 2rem);
    --grid-gap: clamp(0.75rem, 1.5vw, 1.5rem);
    --camera-min-width: 280px;
    --camera-grid-gap: var(--grid-gap);
    --global-scanline-opacity: 0.22;
    --header-line-color: color-mix(in oklch, var(--accent-green) 72%, var(--accent-amber) 28%);
    --camera-map-aspect: 0.516;
}

body.dark-theme {
    background-color: #000;
    color: #000;
}

body.dark-theme .surveillance-container {
    background: #000;
}

body.dark-theme .surveillance-header {
    background: linear-gradient(180deg, #050505 0%, #000000 100%);
    box-shadow: none;
}

body.dark-theme .surveillance-main::before {
    background: none;
}

body.dark-theme .system-info h1,
body.dark-theme .subtitle,
body.dark-theme .status-bar {
    text-shadow: none;
}

body.dark-theme .status-bar span,
body.dark-theme .status-bar .user-menu button {
    color: #000;
}

body.dark-theme .view-popout-btn {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.45);
}

body.dark-theme .dev-panel,
body.dark-theme .camera-sidebar,
body.dark-theme .surveillance-footer {
    box-shadow: none;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    letter-spacing: 0.02rem;
}

.surveillance-container {
    width: 100%;
    height: 100vh;
    background:
        radial-gradient(circle at 18% 18%, rgba(34, 255, 126, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 82% 0%, rgba(255, 186, 92, 0.08) 0%, transparent 24%),
        linear-gradient(180deg, color-mix(in oklch, var(--bg-tertiary) 68%, black) 0%, var(--bg-primary) 42%, color-mix(in oklch, var(--bg-primary) 90%, black) 100%);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.surveillance-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg, transparent 0, transparent 3px, rgba(131, 255, 171, 0.03) 3px, rgba(131, 255, 171, 0.03) 4px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.surveillance-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 48%, rgba(0, 0, 0, 0.34) 100%);
    pointer-events: none;
    z-index: 0;
}

.surveillance-main {
    position: fixed;
    top: var(--header-height);
    bottom: var(--footer-height);
    left: 0;
    right: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: var(--main-margin);
    z-index: 1;
    width: 100vw;
    height: calc(100vh - var(--header-height) - var(--footer-height));
}

.surveillance-main::-webkit-scrollbar,
.camera-sidebar::-webkit-scrollbar,
.dev-content::-webkit-scrollbar,
.fullscreen-content::-webkit-scrollbar,
.sidebar-cameras::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.surveillance-main::-webkit-scrollbar-track,
.camera-sidebar::-webkit-scrollbar-track,
.dev-content::-webkit-scrollbar-track,
.fullscreen-content::-webkit-scrollbar-track,
.sidebar-cameras::-webkit-scrollbar-track {
    background: #050505;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 6px rgba(0, 255, 65, 0.15);
}

.surveillance-main::-webkit-scrollbar-thumb,
.camera-sidebar::-webkit-scrollbar-thumb,
.dev-content::-webkit-scrollbar-thumb,
.fullscreen-content::-webkit-scrollbar-thumb,
.sidebar-cameras::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 255, 65, 0.8), rgba(0, 170, 46, 0.7));
    border: 1px solid var(--accent-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}

.surveillance-main::-webkit-scrollbar-thumb:hover,
.camera-sidebar::-webkit-scrollbar-thumb:hover,
.dev-content::-webkit-scrollbar-thumb:hover,
.fullscreen-content::-webkit-scrollbar-thumb:hover,
.sidebar-cameras::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(0, 255, 65, 1), rgba(0, 170, 46, 0.9));
}

.surveillance-main,
.camera-sidebar,
.dev-content,
.fullscreen-content,
.sidebar-cameras {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 65, 0.8) #050505;
}

.surveillance-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 255, 65, 0.05) 0%, transparent 22%, transparent 78%, rgba(255, 186, 92, 0.04) 100%),
        repeating-linear-gradient(90deg, transparent 0, transparent 71px, rgba(0, 255, 65, 0.025) 71px, rgba(0, 255, 65, 0.025) 72px);
    opacity: 0.34;
}

/* Header */
.surveillance-header {
    background: linear-gradient(180deg, color-mix(in oklch, var(--bg-tertiary) 90%, black) 0%, color-mix(in oklch, var(--bg-primary) 88%, black) 100%);
    border-bottom: 1px solid var(--header-line-color);
    padding: clamp(0.75rem, 1.5vh, 1.5rem) clamp(1rem, 2vw, 2rem);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45), 0 0 22px rgba(0, 255, 65, 0.14);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    height: var(--header-height);
    display: flex;
    align-items: center;
    width: 100vw;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.system-info h1 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3vw, 2.65rem);
    letter-spacing: 0.24rem;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.16);
    margin-bottom: 0.25rem;
    line-height: 0.95;
    text-transform: uppercase;
}

.subtitle {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 0.28rem;
    text-transform: uppercase;
}

.status-bar {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-end;
    font-family: var(--font-data);
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
}

.status-bar .user-menu {
    margin-left: 1.5rem;
}

.view-popout-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.75rem;
}

.view-popout-btn {
    width: 1.6rem;
    height: 1.1rem;
    border: 1px solid rgba(0, 255, 65, 0.45);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    padding: 0;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.view-popout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-green);
    font-family: 'VT323', monospace;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
    font-size: 0.95rem;
}

#gridDetachBtn::before {
    content: '▣';
}

#focusDetachBtn::before {
    content: '◎';
}

.view-popout-btn:hover,
.view-popout-btn:focus {
    outline: none;
    border-color: rgba(0, 255, 65, 0.8);
    background: rgba(0, 50, 0, 0.6);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}

.view-popout-btn:hover::before,
.view-popout-btn:focus::before {
    color: #000;
    text-shadow: none;
}

.view-popout-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
}

.view-popout-btn.active {
    border-color: rgba(0, 255, 65, 0.85);
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.55);
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(180deg, rgba(17, 32, 22, 0.92), rgba(3, 8, 5, 0.92));
    border: 1px solid color-mix(in oklch, var(--border-color) 72%, var(--accent-green) 28%);
    border-radius: 0.5rem;
    padding: 0.38rem 0.82rem;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.user-menu-toggle:focus-visible,
.user-menu-toggle:hover {
    outline: none;
    border-color: rgba(0, 255, 65, 0.75);
    box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.18), 0 0 16px rgba(0, 255, 65, 0.24);
    background: linear-gradient(180deg, rgba(20, 46, 29, 0.98), rgba(4, 12, 8, 0.96));
    transform: translateY(-1px);
}

.user-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 255, 65, 0.24), rgba(0, 0, 0, 0.28));
    border: 1px solid rgba(0, 255, 65, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar svg {
    width: 1.2rem;
    height: 1.2rem;
    stroke: var(--accent-green);
    stroke-width: 1.5;
    fill: none;
}

.user-name {
    letter-spacing: 0.12rem;
    text-transform: uppercase;
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 280px;
    background: linear-gradient(180deg, rgba(6, 15, 10, 0.97), rgba(0, 0, 0, 0.96));
    border: 1px solid rgba(0, 255, 65, 0.28);
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(0, 255, 65, 0.12);
    padding: 1rem;
    border-radius: 0.85rem;
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 50;
    overflow: hidden;
}

.user-menu-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--panel-sheen);
    pointer-events: none;
}

.user-menu.open .user-menu-panel {
    display: flex;
}

.user-menu-heading {
    font-family: var(--font-display);
    font-size: 0.92rem;
    letter-spacing: 0.14rem;
    color: var(--accent-green);
    text-transform: uppercase;
}

.user-menu-status {
    font-size: 0.82rem;
    color: var(--text-secondary);
    letter-spacing: 0.03rem;
}

.user-menu-status-detail {
    opacity: 0.82;
    max-width: 20rem;
    line-height: 1.4;
}

.user-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-menu-item {
    background: linear-gradient(180deg, rgba(0, 255, 65, 0.07), rgba(0, 0, 0, 0.25));
    border: 1px solid rgba(0, 255, 65, 0.2);
    padding: 0.6rem 0.72rem;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.user-menu-item:hover,
.user-menu-item:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.55);
    background: rgba(0, 255, 65, 0.18);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.25);
}

.user-menu-item:active {
    background: rgba(0, 255, 65, 0.28);
}

.system-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 6vh, 3.5rem);
    z-index: 4000;
    backdrop-filter: blur(6px);
}

.system-dialog-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg, transparent 0, transparent 4px, rgba(0, 255, 65, 0.018) 4px, rgba(0, 255, 65, 0.018) 5px);
    pointer-events: none;
}

.system-dialog-overlay.visible {
    display: flex;
}

.system-dialog {
    width: min(720px, 95vw);
    max-height: min(720px, 92vh);
    background: linear-gradient(180deg, rgba(6, 18, 11, 0.98) 0%, rgba(1, 6, 4, 0.98) 100%);
    border: 1px solid rgba(0, 255, 65, 0.22);
    box-shadow: var(--panel-shadow);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.system-dialog::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--panel-sheen);
    pointer-events: none;
}

.system-dialog.system-dialog--wizard {
    width: min(1180px, 96vw);
    max-height: min(880px, 94vh);
}

.system-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    background: linear-gradient(180deg, rgba(13, 44, 25, 0.96), rgba(4, 14, 9, 0.84));
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.system-dialog-header--with-progress {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
}

.system-dialog-title {
    font-family: var(--font-display);
    font-size: 0.92rem;
    letter-spacing: 0.22rem;
    text-transform: uppercase;
    color: var(--accent-green);
}

.system-dialog-title--with-progress {
    white-space: nowrap;
}

.system-dialog-header-progress {
    min-width: 0;
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.system-dialog-step {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.42rem;
    border: 1px solid rgba(0, 255, 65, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.58rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.system-dialog-step.clickable {
    cursor: pointer;
}

.system-dialog-step.clickable:hover,
.system-dialog-step.clickable:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.45);
    background: rgba(0, 48, 18, 0.62);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.system-dialog-step.active {
    border-color: rgba(0, 255, 65, 0.6);
    background: rgba(0, 62, 24, 0.72);
    color: var(--text-primary);
}

.system-dialog-step.complete {
    border-color: rgba(255, 188, 66, 0.26);
    color: rgba(0, 255, 65, 0.7);
}

.system-dialog-step:disabled {
    cursor: default;
}

.system-dialog-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    padding: 0.08rem 0.18rem;
    border: 1px solid rgba(0, 255, 65, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    font-family: var(--font-data);
    font-size: 0.5rem;
    letter-spacing: 0.12rem;
}

.system-dialog-step-label {
    white-space: nowrap;
}

.system-dialog-close {
    width: 1.9rem;
    height: 1.9rem;
    border: 1px solid rgba(0, 255, 65, 0.35);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: var(--accent-green);
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.system-dialog-close:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    box-shadow: none;
}

.system-dialog-close:hover,
.system-dialog-close:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.8);
    background: rgba(0, 60, 0, 0.55);
    color: #000;
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.35);
}

.system-dialog-message {
    display: none;
    margin: 0.4rem 1.2rem 0;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    border: 1px solid transparent;
    background: rgba(255, 95, 86, 0.12);
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
    line-height: 1.35;
}

.system-dialog-message:not([hidden]) {
    display: block;
}

.system-dialog-message[data-tone="error"] {
    border-color: rgba(255, 95, 86, 0.55);
    color: #ff5f56;
}

.system-dialog-message[data-tone="warning"] {
    border-color: rgba(255, 188, 66, 0.55);
    background: rgba(255, 188, 66, 0.12);
    color: #ffbc42;
}

.system-dialog-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.system-dialog.system-dialog--wizard .system-dialog-body {
    padding: 1.35rem 1.4rem 1.5rem;
    gap: 1.2rem;
}

.system-dialog-body p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    letter-spacing: 0.03rem;
    line-height: 1.45;
}

.system-dialog-caption {
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.05rem;
}

.system-dialog-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: var(--text-primary);
    font-size: 0.8rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
}

.system-dialog-field input,
.system-dialog-field select,
.system-dialog-field textarea {
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(0, 255, 65, 0.25);
    color: var(--text-primary);
    padding: 0.7rem 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    border-radius: 0.55rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-transform: none;
}

.system-dialog-field textarea {
    min-height: 120px;
    resize: vertical;
}

.system-dialog-field input:focus,
.system-dialog-field select:focus,
.system-dialog-field textarea:focus {
    outline: none;
    border-color: rgba(0, 255, 65, 0.8);
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.35);
    background: rgba(0, 45, 0, 0.45);
}

.system-dialog-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.2rem 1.1rem;
    border-top: 1px solid rgba(0, 255, 65, 0.2);
    background: rgba(0, 0, 0, 0.55);
    position: relative;
    z-index: 1;
}

.system-dialog-button {
    min-width: 7rem;
    padding: 0.45rem 1rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 65, 0.35);
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.system-dialog-button:hover,
.system-dialog-button:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.75);
    background: rgba(0, 50, 0, 0.65);
    color: #000;
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.35);
}

.system-dialog-button.secondary {
    border-color: rgba(0, 255, 65, 0.28);
    background: rgba(0, 0, 0, 0.45);
    color: var(--text-primary);
}

.system-dialog-button.primary {
    border-color: rgba(0, 255, 65, 0.55);
    background: rgba(0, 60, 0, 0.65);
    color: var(--text-primary);
}

.system-dialog-button.primary[data-tone="danger"] {
    border-color: rgba(255, 95, 86, 0.6);
    color: #ffb3ac;
    background: rgba(120, 0, 0, 0.6);
}

.system-dialog-button.primary[data-tone="danger"]:hover,
.system-dialog-button.primary[data-tone="danger"]:focus-visible {
    border-color: rgba(255, 95, 86, 0.9);
    background: rgba(160, 0, 0, 0.7);
    color: #fff;
    box-shadow: 0 0 18px rgba(255, 95, 86, 0.45);
}

.system-dialog-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.system-dialog-button:disabled:hover,
.system-dialog-button:disabled:focus-visible {
    border-color: rgba(0, 255, 65, 0.35);
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-primary);
    box-shadow: none;
}

.wizard-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.wizard-stepper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 0.65rem;
}

.wizard-step {
    appearance: none;
    display: inline-flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.7rem 0.85rem 0.8rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(0, 255, 65, 0.18);
    background: linear-gradient(180deg, rgba(13, 24, 17, 0.9), rgba(0, 0, 0, 0.5));
    font-size: 0.7rem;
    letter-spacing: 0.11rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    min-height: 4.25rem;
    width: 100%;
    text-align: left;
    cursor: default;
}

.wizard-step.active {
    border-color: rgba(0, 255, 65, 0.6);
    background: linear-gradient(180deg, rgba(18, 52, 31, 0.92), rgba(2, 13, 8, 0.68));
    color: var(--text-primary);
    box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.14), 0 0 18px rgba(0, 255, 65, 0.16);
}

.wizard-step.complete {
    border-color: rgba(255, 188, 66, 0.22);
    background: linear-gradient(180deg, rgba(28, 22, 8, 0.78), rgba(5, 5, 3, 0.62));
    color: rgba(0, 255, 65, 0.65);
}

.wizard-step.clickable:hover {
    border-color: rgba(0, 255, 65, 0.45);
    background: linear-gradient(180deg, rgba(18, 40, 26, 0.92), rgba(3, 12, 8, 0.72));
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28), 0 0 14px rgba(0, 255, 65, 0.14);
}

.wizard-step:focus-visible {
    outline: 2px solid rgba(0, 255, 65, 0.58);
    outline-offset: 2px;
}

.wizard-step.clickable {
    cursor: pointer;
}

.wizard-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    height: 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 65, 0.24);
    background: rgba(0, 0, 0, 0.35);
    font-weight: 600;
    letter-spacing: 0.12rem;
    font-family: var(--font-data);
}

.wizard-step-label {
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.12rem;
}

.wizard-stage {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.wizard-stage--newcomer-cameras {
    gap: 0.5rem;
    min-height: 0;
}

.wizard-help-panel {
    position: absolute;
    z-index: 4001;
    border: 1px solid rgba(0, 255, 65, 0.18);
    border-radius: 0.95rem;
    background: linear-gradient(180deg, rgba(10, 22, 15, 0.95), rgba(0, 0, 0, 0.84));
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: clamp(220px, 26vw, 320px);
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 255, 65, 0.14);
    opacity: 1;
    transition: opacity 0.2s ease;
}

.wizard-help-panel.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.wizard-help-panel[data-position="stacked"] {
    width: min(95vw, 420px);
}

.wizard-help-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.14rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.wizard-help-message-slot {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.wizard-help-message-slot:empty {
    display: none;
}

.wizard-help-panel .system-dialog-message {
    margin: 0;
    padding: 0.55rem 0.7rem;
    min-height: 0;
    font-size: 0.72rem;
    letter-spacing: 0.06rem;
}

.wizard-help-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.82rem;
    letter-spacing: 0.03rem;
    color: var(--text-primary);
    line-height: 1.45;
}

.wizard-help-body p {
    margin: 0;
}

.wizard-copy {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.88rem;
    letter-spacing: 0.03rem;
    line-height: 1.45;
}

.wizard-caption {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 0.03rem;
    line-height: 1.45;
}

.wizard-kicker {
    margin: 0;
    font-family: var(--font-data);
    font-size: 0.72rem;
    letter-spacing: 0.18rem;
    text-transform: uppercase;
    color: color-mix(in oklch, var(--accent-amber) 55%, var(--text-secondary) 45%);
}

.wizard-lead {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.98rem;
    line-height: 1.5;
    max-width: 70ch;
}

.wizard-map-step {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.wizard-dropzone {
    border: 1px dashed rgba(0, 255, 65, 0.35);
    border-radius: 8px;
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.wizard-dropzone strong {
    font-size: 0.78rem;
    letter-spacing: 0.09rem;
    text-transform: uppercase;
    color: var(--text-primary);
}

.wizard-dropzone span {
    font-size: 0.68rem;
    color: var(--text-secondary);
    letter-spacing: 0.05rem;
}

.wizard-dropzone:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.85);
    box-shadow: 0 0 16px rgba(0, 255, 65, 0.35);
}

.wizard-dropzone.dragover {
    border-color: rgba(0, 255, 65, 0.85);
    background: rgba(0, 60, 0, 0.45);
    box-shadow: 0 0 16px rgba(0, 255, 65, 0.35);
}

.wizard-drop-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.wizard-button {
    border: 1px solid rgba(0, 255, 65, 0.35);
    background: linear-gradient(180deg, rgba(14, 35, 22, 0.85), rgba(2, 8, 5, 0.8));
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12rem;
    padding: 0.52rem 0.95rem;
    border-radius: 0.55rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wizard-button:hover,
.wizard-button:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.75);
    background: linear-gradient(180deg, rgba(26, 58, 35, 0.92), rgba(5, 22, 11, 0.88));
    color: var(--text-primary);
    box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.12), 0 0 16px rgba(0, 255, 65, 0.2);
    transform: translateY(-1px);
}

.wizard-button.subtle {
    border-color: rgba(0, 255, 65, 0.22);
    background: rgba(0, 0, 0, 0.38);
    color: var(--text-secondary);
}

.wizard-button.subtle:hover,
.wizard-button.subtle:focus-visible {
    border-color: rgba(0, 255, 65, 0.5);
    color: var(--text-primary);
}

.wizard-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.wizard-button:disabled:hover,
.wizard-button:disabled:focus-visible {
    border-color: rgba(0, 255, 65, 0.35);
    background: rgba(0, 0, 0, 0.55);
    color: var(--text-primary);
}

.wizard-status {
    font-size: 0.7rem;
    letter-spacing: 0.06rem;
    color: var(--text-secondary);
}

.wizard-subheading {
    font-size: 0.72rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.wizard-map-preview {
    position: relative;
    border: 1px solid rgba(0, 255, 65, 0.25);
    border-radius: 8px;
    min-height: 220px;
    background: rgba(0, 0, 0, 0.45);
    padding: 0.75rem;
    overflow: hidden;
}

.wizard-map-preview svg {
    width: 100%;
    height: auto;
    display: block;
}

.wizard-map-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    border: 1px dashed rgba(0, 255, 65, 0.2);
    border-radius: 4px;
    background: repeating-linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0, rgba(0, 255, 65, 0.05) 16px, transparent 16px, transparent 32px);
}

.wizard-map-placeholder::after {
    content: 'Default layout preview';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    letter-spacing: 0.08rem;
    color: rgba(0, 255, 65, 0.5);
}

.wizard-setup-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.wizard-map-panel,
.wizard-camera-panel {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.wizard-camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
}

.wizard-camera-card {
    border: 1px solid rgba(0, 255, 65, 0.25);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wizard-camera-card.filled {
    border-color: rgba(0, 255, 65, 0.55);
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.25);
}

.wizard-camera-thumb {
    position: relative;
    width: 100%;
    padding-top: 62%;
    border: 1px solid rgba(0, 255, 65, 0.25);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.wizard-camera-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wizard-camera-thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    letter-spacing: 0.08rem;
    color: rgba(0, 255, 65, 0.45);
    background: repeating-linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0, rgba(0, 255, 65, 0.05) 12px, transparent 12px, transparent 24px);
}

.wizard-camera-label {
    font-size: 0.72rem;
    letter-spacing: 0.09rem;
    text-transform: uppercase;
    color: var(--text-primary);
}

.wizard-camera-note {
    font-size: 0.66rem;
    letter-spacing: 0.05rem;
    color: var(--text-secondary);
}

.wizard-camera-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wizard-camera-drop {
    border-style: dashed;
}

.wizard-status + .wizard-subheading {
    margin-top: 0.2rem;
}

.wizard-map-preview + .wizard-subheading {
    margin-top: 1rem;
}

@media (max-width: 520px) {
    .wizard-stepper {
        flex-direction: column;
        gap: 0.4rem;
    }

    .wizard-step {
        width: 100%;
        justify-content: space-between;
    }

    .wizard-setup-layout {
        grid-template-columns: 1fr;
    }

    .wizard-camera-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

.wizard-camera-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.wizard-camera-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.wizard-camera-name-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
}

.wizard-camera-name-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 65, 0.4);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    letter-spacing: 0.05rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.wizard-camera-name-input:hover {
    border-color: rgba(0, 255, 65, 0.7);
    background: rgba(0, 0, 0, 0.65);
}

.wizard-camera-name-input:focus {
    outline: none;
    border-color: var(--primary-bright);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}

.wizard-camera-selector-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    position: relative;
}

.wizard-camera-button-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.wizard-camera-selector {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 65, 0.4);
    color: var(--text-primary);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.wizard-camera-selector:hover {
    border-color: rgba(0, 255, 65, 0.7);
    background: rgba(0, 0, 0, 0.65);
}

.wizard-camera-selector:focus {
    outline: none;
    border-color: var(--primary-bright);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}

.wizard-camera-dropdown-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 65, 0.4);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-camera-dropdown-btn:hover {
    border-color: rgba(0, 255, 65, 0.7);
    background: rgba(0, 0, 0, 0.65);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}

.wizard-camera-dropdown-btn:active {
    transform: translateY(1px);
}

.wizard-camera-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    display: none;
    flex-direction: column;
    width: max(220px, 100%);
    padding: 0.35rem;
    border: 1px solid rgba(0, 255, 65, 0.35);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.92);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.55), 0 0 16px rgba(0, 255, 65, 0.22);
    gap: 0.25rem;
    z-index: 10;
}

.wizard-camera-dropdown-menu.open {
    display: flex;
}

.wizard-camera-dropdown-option {
    border: 1px solid rgba(0, 255, 65, 0.25);
    background: rgba(0, 0, 0, 0.65);
    color: var(--text-secondary);
    padding: 0.35rem 0.6rem;
    text-align: left;
    font-size: 0.72rem;
    letter-spacing: 0.05rem;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.wizard-camera-dropdown-option:hover,
.wizard-camera-dropdown-option:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.6);
    color: var(--text-primary);
    background: rgba(0, 255, 65, 0.12);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.25);
}

.wizard-camera-dropdown-option.active {
    border-color: var(--primary-bright);
    color: var(--primary-bright);
    background: rgba(0, 255, 65, 0.18);
}

.wizard-camera-add-btn {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.5);
    color: var(--primary-bright);
    width: 36px;
    height: 36px;
    border-radius: 4px;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.wizard-camera-add-btn:hover:not(:disabled) {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--primary-bright);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.3);
}

.wizard-camera-add-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wizard-camera-delete-btn {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.5);
    color: #ff4444;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.wizard-camera-delete-btn:hover:not(:disabled) {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.3);
}

.wizard-camera-delete-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wizard-camera-editor-card {
    border: 1px solid rgba(0, 255, 65, 0.35);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.wizard-camera-stream-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid rgba(0, 255, 65, 0.25);
    border-radius: 6px;
    padding: 0.85rem;
    background: rgba(0, 0, 0, 0.5);
}

.wizard-camera-stream-panel--compact {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 0.45rem 0.55rem;
    padding: 0.65rem 0.75rem;
    background: linear-gradient(180deg, rgba(11, 18, 14, 0.88), rgba(0, 0, 0, 0.58));
}

.wizard-camera-stream-panel--compact .wizard-camera-stream-header {
    grid-column: 1 / -1;
    font-size: 0.7rem;
    letter-spacing: 0.1rem;
}

.wizard-camera-stream-panel--compact .wizard-camera-stream-modes {
    grid-column: 1;
    gap: 0.3rem;
}

.wizard-camera-stream-panel--compact .wizard-camera-stream-mode-option {
    padding: 0.38rem 0.55rem;
    border: 1px solid rgba(0, 255, 65, 0.16);
    border-radius: 999px;
    background: rgba(0, 255, 65, 0.04);
}

.wizard-camera-stream-panel--compact .wizard-camera-stream-url,
.wizard-camera-stream-panel--compact .wizard-camera-stream-terror-url,
.wizard-camera-stream-panel--compact .wizard-camera-stream-device {
    min-width: 0;
    padding: 0.45rem 0.55rem 0.55rem;
}

.wizard-camera-stream-panel--compact .wizard-camera-stream-url {
    grid-column: 2;
}

.wizard-camera-stream-panel--compact .wizard-camera-stream-terror-url {
    grid-column: 3;
}

.wizard-camera-stream-panel--compact .wizard-camera-stream-device {
    grid-column: 2 / -1;
}

.wizard-camera-stream-panel--compact .wizard-camera-stream-device-actions {
    gap: 0.4rem;
}

.wizard-camera-stream-panel--compact .wizard-button {
    padding: 0.42rem 0.7rem;
    font-size: 0.66rem;
}

.wizard-camera-stream-header {
    font-size: 0.82rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--text-primary);
}

.wizard-camera-stream-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.wizard-camera-stream-mode-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.wizard-camera-stream-mode {
    accent-color: var(--primary-bright);
}

.wizard-camera-stream-url,
.wizard-camera-stream-device {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.55rem 0.65rem 0.65rem;
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.45);
}

.wizard-camera-stream-url[hidden],
.wizard-camera-stream-terror-url[hidden],
.wizard-camera-stream-device[hidden] {
    display: none !important;
}

.wizard-camera-stream-url label,
.wizard-camera-stream-device label {
    font-size: 0.68rem;
    letter-spacing: 0.07rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.wizard-camera-stream-url input[type='url'] {
    width: 100%;
}

.wizard-camera-stream-device-select {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(0, 255, 65, 0.35);
    color: var(--text-primary);
    padding: 0.45rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.wizard-camera-stream-device-select:hover {
    border-color: rgba(0, 255, 65, 0.6);
    background: rgba(0, 0, 0, 0.65);
}

.wizard-camera-stream-device-select:focus {
    outline: none;
    border-color: var(--primary-bright);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.35);
    background: rgba(0, 0, 0, 0.7);
}

.wizard-camera-stream-device-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wizard-summary-card {
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(10, 22, 15, 0.95), rgba(0, 0, 0, 0.74));
    padding: 1.35rem;
    margin-bottom: 1rem;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.wizard-summary-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.16rem;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0 0 0.9rem 0;
    border-bottom: 1px solid rgba(0, 255, 65, 0.16);
    padding-bottom: 0.65rem;
}

.wizard-summary-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.wizard-summary-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 65, 0.16);
    background: rgba(0, 255, 65, 0.06);
    color: var(--text-secondary);
    font-size: 0.72rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
}

.wizard-intro-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.wizard-intro-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.9rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(0, 255, 65, 0.14);
    background: linear-gradient(180deg, rgba(13, 20, 16, 0.88), rgba(1, 5, 3, 0.82));
}

.wizard-intro-card strong {
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    color: var(--text-primary);
}

.wizard-intro-card span,
.wizard-summary-note {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.wizard-summary-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
    margin: 0;
}

.wizard-summary-list dt {
    font-weight: 600;
    color: rgba(0, 255, 65, 0.8);
    font-size: 0.8rem;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
}

.wizard-summary-list dd {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.wizard-customize-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .wizard-customize-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.wizard-customize-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wizard-customize-label {
    font-size: 0.68rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.wizard-input {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(0, 255, 65, 0.25);
    border-radius: 4px;
    padding: 0.55rem 0.65rem;
    font-size: 0.82rem;
    letter-spacing: 0.04rem;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wizard-input::placeholder {
    color: rgba(0, 255, 65, 0.35);
    letter-spacing: 0.04rem;
}

.wizard-input:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.18);
    background: rgba(0, 0, 0, 0.7);
}

.wizard-camera-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.wizard-camera-editor-title {
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
}

.wizard-camera-editor-tabs {
    display: flex;
    gap: 0.5rem;
}

.wizard-camera-tab {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 65, 0.3);
    color: var(--text-secondary);
    padding: 0.32rem 0.65rem;
    border-radius: 4px;
    font-size: 0.75rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.wizard-camera-tab:hover {
    border-color: rgba(0, 255, 65, 0.6);
    background: rgba(0, 0, 0, 0.65);
    color: var(--text-primary);
}

.wizard-camera-tab.active {
    border-color: var(--primary-bright);
    background: rgba(0, 255, 65, 0.12);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.wizard-camera-editor-body {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.wizard-camera-editor-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 255, 65, 0.15);
}

.wizard-camera-save-add-btn {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.5);
    color: var(--primary-bright);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.wizard-camera-save-add-btn:hover:not(:disabled) {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--primary-bright);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.3);
}

.wizard-camera-save-add-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wizard-camera-editor-drop {
    position: relative;
    min-height: 240px;
    border: 2px dashed rgba(0, 255, 65, 0.35);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.wizard-camera-editor-drop:hover {
    border-color: rgba(0, 255, 65, 0.6);
    background: rgba(0, 0, 0, 0.65);
}

.wizard-camera-editor-drop.dragover {
    border-color: var(--primary-bright);
    background: rgba(0, 255, 65, 0.08);
    box-shadow: 0 0 16px rgba(0, 255, 65, 0.35);
}

.wizard-camera-editor-drop-placeholder {
    font-size: 0.8rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: rgba(0, 255, 65, 0.6);
    text-align: center;
}

.wizard-camera-editor-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wizard-camera-editor-drop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--primary-bright);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wizard-camera-editor-drop-overlay-label {
    pointer-events: none;
}

.wizard-camera-preview-view-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(0, 255, 65, 0.38);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.78);
    color: var(--primary-bright);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.wizard-camera-preview-view-btn:hover,
.wizard-camera-preview-view-btn:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.75);
    background: rgba(0, 40, 18, 0.92);
    transform: translateY(-1px);
}

.wizard-camera-preview-view-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.wizard-camera-editor-drop:hover .wizard-camera-editor-drop-overlay,
.wizard-camera-editor-drop:focus-within .wizard-camera-editor-drop-overlay {
    opacity: 1;
}

.wizard-camera-editor-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.wizard-camera-editor-info {
    font-size: 0.7rem;
    letter-spacing: 0.05rem;
    color: var(--text-secondary);
}

.wizard-camera-terror-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.8rem;
}

.wizard-camera-terror-variant {
    position: relative;
    border: 1px solid rgba(0, 255, 65, 0.35);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wizard-camera-terror-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 65, 0.25);
}

.wizard-camera-terror-info {
    font-size: 0.65rem;
    letter-spacing: 0.05rem;
    color: var(--text-secondary);
    word-break: break-word;
}

.wizard-camera-terror-remove {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 0, 0, 0.6);
    border-radius: 50%;
    color: rgba(255, 0, 0, 0.9);
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-camera-terror-remove:hover {
    background: rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 0, 0, 0.9);
    color: rgba(255, 0, 0, 1);
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.wizard-camera-terror-add-drop {
    min-height: 120px;
}

.wizard-camera-map-container {
    border: 1px solid rgba(0, 255, 65, 0.25);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-camera-map-preview {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
}

.wizard-camera-map-preview svg {
    width: 100%;
    height: auto;
    max-height: 300px;
}

.wizard-camera-map-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    background: rgba(0, 255, 65, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: #000;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.6);
    pointer-events: none;
}

.wizard-camera-map-placeholder {
    font-size: 0.8rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: rgba(0, 255, 65, 0.5);
    text-align: center;
}

.newcomer-camera-board {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 0;
}

.newcomer-camera-board-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 42%);
    align-items: start;
    gap: 0.7rem;
}

.newcomer-camera-board-intro {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.newcomer-camera-board-intro--map {
    min-width: 0;
}

.newcomer-camera-board-title,
.newcomer-camera-board-map-title {
    margin: 0;
    font-size: 0.82rem;
    letter-spacing: 0.14rem;
    text-transform: uppercase;
    color: var(--primary-bright);
}

.newcomer-camera-board-meta {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.08rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.newcomer-camera-board-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 42%);
    gap: 0.7rem;
    align-items: stretch;
    height: clamp(420px, 61vh, 620px);
    min-height: 0;
}

.newcomer-camera-board-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
    scrollbar-gutter: stable both-edges;
}

.newcomer-camera-board-empty,
.newcomer-camera-inline-add {
    border: 1px dashed rgba(0, 255, 65, 0.24);
    background: rgba(0, 0, 0, 0.38);
    padding: 0.95rem 1rem;
    color: var(--text-secondary);
}

.newcomer-camera-board-empty {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.newcomer-camera-board-empty strong {
    color: var(--primary-bright);
    font-size: 0.82rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
}

.newcomer-camera-inline-add {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.14rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.newcomer-camera-inline-add:hover,
.newcomer-camera-inline-add:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.52);
    background: rgba(0, 255, 65, 0.08);
    box-shadow: 0 0 16px rgba(0, 255, 65, 0.12);
    transform: translateY(-1px);
}

.newcomer-camera-inline-add.dragover {
    border-color: rgba(0, 255, 65, 0.72);
    background: rgba(0, 48, 18, 0.24);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.16);
}

.newcomer-camera-row {
    border: 1px solid rgba(0, 255, 65, 0.18);
    background: linear-gradient(180deg, rgba(8, 18, 12, 0.88), rgba(0, 0, 0, 0.5));
    padding: 0.34rem 0.42rem;
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    min-width: 0;
}

.newcomer-camera-row.hovered {
    border-color: rgba(0, 255, 65, 0.34);
}

.newcomer-camera-row.selected {
    border-color: rgba(0, 255, 65, 0.62);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.12);
    background: linear-gradient(180deg, rgba(10, 24, 16, 0.94), rgba(0, 0, 0, 0.58));
}

.newcomer-camera-row:focus-visible {
    outline: 2px solid var(--primary-bright);
    outline-offset: 2px;
}

.newcomer-camera-row-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem;
    align-items: center;
}

.newcomer-camera-row-identity {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.newcomer-camera-row-badge {
    flex: 0 0 auto;
    min-width: 1.9rem;
    padding: 0.14rem 0.28rem;
    border: 1px solid rgba(0, 255, 65, 0.28);
    background: rgba(0, 255, 65, 0.08);
    color: var(--primary-bright);
    font-size: 0.58rem;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    text-align: center;
    font-weight: 700;
}

.newcomer-camera-name-input {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(0, 255, 65, 0.18);
    background: rgba(0, 0, 0, 0.52);
    color: var(--primary-bright);
    padding: 0.24rem 0.4rem;
    font-size: 0.64rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
}

.newcomer-camera-name-input:focus-visible {
    outline: 2px solid rgba(0, 255, 65, 0.62);
    outline-offset: 2px;
}

.newcomer-camera-remove-btn {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 0, 0, 0.38);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    color: rgba(255, 112, 112, 0.9);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.newcomer-camera-remove-btn:hover:not(:disabled) {
    background: rgba(255, 0, 0, 0.14);
    border-color: rgba(255, 0, 0, 0.62);
}

.newcomer-camera-remove-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.newcomer-camera-row-overview {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 0.35rem;
    align-items: stretch;
    min-width: 0;
}

.newcomer-camera-primary-card {
    min-height: 40px;
    height: 100%;
    border-width: 1px;
}

.newcomer-camera-primary-card .wizard-camera-editor-preview {
    object-fit: cover;
}

.newcomer-camera-preview-view {
    width: 20px;
    height: 20px;
    top: 0.2rem;
    right: 0.2rem;
}

.newcomer-camera-preview-view svg {
    width: 12px;
    height: 12px;
}

.newcomer-camera-tile-remove {
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    right: auto;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 52, 52, 0.72);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.86);
    color: #ff6b6b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.newcomer-camera-tile-remove:hover,
.newcomer-camera-tile-remove:focus-visible {
    outline: none;
    border-color: #ff8e8e;
    background: rgba(86, 0, 0, 0.92);
    color: #ffd3d3;
    transform: translateY(-1px);
}

.newcomer-camera-primary-placeholder {
    font-family: var(--font-display);
    font-size: 0.58rem;
    letter-spacing: 0.14rem;
}

.newcomer-camera-terror-carousel-shell {
    min-width: 0;
    display: flex;
    align-items: stretch;
}

.newcomer-camera-terror-carousel {
    display: flex;
    gap: 0.3rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    min-width: 0;
    width: 100%;
    scroll-snap-type: x proximity;
}

.newcomer-camera-terror-slide {
    flex: 0 0 54px;
    min-height: 40px;
    scroll-snap-align: start;
}

.newcomer-camera-terror-variant {
    padding: 0.14rem;
}

.newcomer-camera-terror-variant .wizard-camera-terror-thumb {
    height: 100%;
    min-height: 34px;
    border: none;
    border-radius: 0;
}

.newcomer-camera-terror-drop {
    min-height: 40px;
    border-width: 1px;
    position: relative;
}

.newcomer-camera-terror-generate {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 188, 66, 0.45);
    border-radius: 0;
    background: rgba(32, 20, 0, 0.86);
    color: rgba(255, 208, 122, 0.78);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    opacity: 0.78;
}

.newcomer-camera-terror-generate svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.newcomer-camera-row-quickbar {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
}

.newcomer-camera-row-behavior-group {
    gap: 0.18rem;
}

.newcomer-camera-row-behavior-group .wizard-camera-behavior-btn,
.newcomer-camera-quick-chip {
    padding: 0.14rem 0.28rem;
    border: 1px solid rgba(0, 255, 65, 0.18);
    background: rgba(0, 255, 65, 0.04);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.54rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.newcomer-camera-row-behavior-group .wizard-camera-behavior-btn:hover,
.newcomer-camera-row-behavior-group .wizard-camera-behavior-btn:focus-visible,
.newcomer-camera-quick-chip:hover,
.newcomer-camera-quick-chip:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.42);
    color: var(--text-primary);
    background: rgba(0, 255, 65, 0.08);
}

.newcomer-camera-row-behavior-group .wizard-camera-behavior-btn.active,
.newcomer-camera-quick-chip.active {
    border-color: rgba(0, 255, 65, 0.62);
    color: var(--text-primary);
    background: rgba(0, 255, 65, 0.14);
    box-shadow: inset 0 0 0 1px rgba(0, 255, 65, 0.08);
}

.newcomer-camera-row-expanded {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(0, 255, 65, 0.12);
}

.newcomer-camera-row-expanded-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.newcomer-camera-row-expanded-actions .wizard-button {
    padding: 0.34rem 0.58rem;
    font-size: 0.61rem;
}

.newcomer-camera-row-position-hint {
    margin: 0;
}

.newcomer-camera-board-map-pane {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    position: sticky;
    top: 0;
    align-self: stretch;
}

.newcomer-camera-board-map-copy {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.06rem;
    text-transform: uppercase;
}

.newcomer-camera-board-map-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.55rem;
    border: 1px solid rgba(0, 255, 65, 0.16);
    background: rgba(0, 0, 0, 0.42);
}

.newcomer-camera-board-map-dropzone {
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.newcomer-camera-board-map-dropzone.dragover {
    border-color: rgba(0, 255, 65, 0.62);
    background: rgba(0, 40, 18, 0.38);
    box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.12), 0 0 16px rgba(0, 255, 65, 0.12);
}

.newcomer-camera-board-map-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.32rem;
    padding: 0.28rem 0.34rem;
    border: 1px dashed rgba(0, 255, 65, 0.22);
    background: rgba(0, 0, 0, 0.38);
    cursor: pointer;
}

.newcomer-camera-board-map-toolbar:focus-visible {
    outline: 2px solid rgba(0, 255, 65, 0.48);
    outline-offset: 2px;
}

.newcomer-camera-board-map-upload,
.newcomer-camera-board-map-clear {
    padding: 0.18rem 0.32rem;
    font-size: 0.54rem;
}

.newcomer-camera-board-map-file {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.6rem;
    letter-spacing: 0.06rem;
    color: var(--text-secondary);
}

.newcomer-camera-board-map-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    width: 100%;
    max-height: none;
    background: rgba(0, 0, 0, 0.56);
}

.newcomer-camera-board-map-preview svg {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
}

.newcomer-camera-board-dot {
    position: absolute;
    min-width: 34px;
    min-height: 34px;
    padding: 0.2rem 0.45rem;
    border: 2px solid rgba(0, 0, 0, 0.85);
    border-radius: 999px;
    background: rgba(0, 255, 65, 0.42);
    color: #020;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05rem;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.newcomer-camera-board-dot.hovered {
    background: rgba(255, 215, 0, 0.82);
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.35);
}

.newcomer-camera-board-dot.selected {
    background: rgba(0, 255, 65, 0.96);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.45);
}

.wizard-image-viewer {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(5px);
}

.wizard-image-viewer-dialog {
    width: min(100%, 1080px);
    max-height: min(92vh, 920px);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.8rem;
    border: 1px solid rgba(0, 255, 65, 0.24);
    background: linear-gradient(180deg, rgba(12, 24, 16, 0.96), rgba(0, 0, 0, 0.88));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 255, 65, 0.08);
}

.wizard-image-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.wizard-image-viewer-title {
    min-width: 0;
    font-family: var(--font-display);
    font-size: 0.84rem;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    color: var(--text-primary);
}

.wizard-image-viewer-close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(0, 255, 65, 0.28);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.56);
    color: var(--text-primary);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.wizard-image-viewer-close:hover,
.wizard-image-viewer-close:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.72);
    background: rgba(0, 40, 16, 0.92);
}

.wizard-image-viewer-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

.wizard-image-viewer-image {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 7rem);
    object-fit: contain;
    background: rgba(0, 0, 0, 0.5);
}

.wizard-image-viewer-caption {
    font-size: 0.72rem;
    letter-spacing: 0.06rem;
    color: var(--text-secondary);
}

@media (max-width: 1200px) {
    .newcomer-camera-board-header {
        grid-template-columns: 1fr;
    }

    .newcomer-camera-board-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .newcomer-camera-board-list {
        max-height: clamp(280px, 46vh, 460px);
    }

    .newcomer-camera-board-map-pane {
        position: static;
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    .system-dialog-header--with-progress {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }

    .system-dialog-header-progress {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .newcomer-camera-row-header {
        grid-template-columns: 1fr;
    }

    .newcomer-camera-row-overview {
        grid-template-columns: 1fr;
    }

    .newcomer-camera-primary-card,
    .newcomer-camera-terror-slide {
        min-height: 96px;
    }

    .newcomer-camera-board-map-pane {
        min-height: 260px;
    }
}

body.popup-mode {
    background: var(--bg-primary);
    min-height: 100vh;
    display: block;
    padding: 0;
    overflow: hidden;
}

body.popup-mode .view-popout-toolbar {
    display: none;
}

body.popup-mode .surveillance-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    padding-top: 0;
    display: flex;
    flex-direction: column;
}

body.popup-mode .surveillance-container::before,
body.popup-mode .surveillance-container::after {
    content: none;
}

body.popup-mode .surveillance-header {
    position: relative;
    inset: 0;
    width: 100%;
    border-bottom: 1px solid rgba(0, 255, 65, 0.18);
    box-shadow: none;
    border-radius: 0;
}

body.popup-mode .surveillance-main {
    position: relative;
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    width: 100%;
    flex: 1;
    height: auto;
    overflow-y: auto;
    padding: var(--main-margin);
}

body.popup-mode .surveillance-footer {
    position: relative;
    width: 100%;
    border-top: 1px solid rgba(0, 255, 65, 0.18);
}

body.popup-mode .dev-panel {
    display: none !important;
}

body.popup-grid-mode .camera-map-overlay,
body.popup-grid-mode .fullscreen-view,
body.popup-grid-mode .surveillance-footer {
    display: none !important;
}

body.popup-grid-mode .surveillance-header {
    margin-bottom: 0.75rem;
}

body.popup-map-mode .surveillance-header,
body.popup-map-mode .surveillance-main,
body.popup-map-mode .surveillance-footer,
body.popup-map-mode .fullscreen-view {
    display: none !important;
}

body.popup-map-mode #cameraMapOverlay {
    position: static;
    display: block !important;
    margin: 1.5rem auto;
    width: min(95vw, clamp(260px, calc((100vh - 5rem) * var(--camera-map-aspect, 0.516)), 720px));
    pointer-events: auto;
}

body.popup-map-mode #cameraMapOverlay .camera-map-window {
    width: 100%;
    max-height: calc(100vh - 3rem);
}

body.popup-map-mode #cameraMapOverlay .camera-map-content {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-bottom: 0.75rem;
}

body.popup-map-mode #cameraMapOverlay .camera-map-frame {
    width: 100%;
}

body.popup-map-mode #cameraMapDetachBtn {
    display: none;
}

body.popup-focus-mode .surveillance-header,
body.popup-focus-mode .surveillance-footer,
body.popup-focus-mode .camera-map-overlay {
    display: none !important;
}

body.popup-focus-mode .surveillance-main {
    display: none !important;
}

body.popup-focus-mode .fullscreen-view {
    position: static;
    opacity: 1;
    pointer-events: auto;
    display: block;
}

.status-indicator {
    color: var(--accent-red);
    font-weight: bold;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

.time-display,
.date-display {
    color: var(--text-primary);
    font-weight: bold;
}

/* Camera Grid */
.camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--camera-min-width), 1fr));
    gap: var(--camera-grid-gap);
    padding: 0;
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: min-content;
}

.camera-feed {
    background: linear-gradient(180deg, color-mix(in oklch, var(--bg-tertiary) 88%, black), color-mix(in oklch, var(--bg-secondary) 86%, black));
    border: 1px solid color-mix(in oklch, var(--border-color) 72%, transparent);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 0.95rem;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.camera-grid.grid-dragging .camera-feed {
    transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.camera-feed.dragging {
    opacity: 0.38;
    cursor: grabbing;
    z-index: 20;
    box-shadow: 0 0 22px rgba(0, 0, 0, 0.55);
}

.camera-feed.drop-before::before,
.camera-feed.drop-after::after {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    height: 3px;
    background: var(--accent-red);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.7);
    pointer-events: none;
}

.camera-feed.drop-before::before {
    top: -2px;
}

.camera-feed.drop-after::after {
    bottom: -2px;
}

.camera-grid.drop-at-end::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 3px;
    background: var(--accent-red);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.7);
    pointer-events: none;
}

.camera-feed:hover {
    border-color: var(--accent-green);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34), 0 0 24px rgba(0, 255, 65, 0.24), inset 0 0 0 1px rgba(0, 255, 65, 0.2);
    transform: translateY(-2px);
    z-index: 10;
}

.camera-feed.hovered {
    border-color: rgba(0, 255, 65, 0.85);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34), 0 0 28px rgba(0, 255, 65, 0.22), inset 0 0 0 1px rgba(0, 255, 65, 0.18);
    z-index: 9;
}


.camera-header {
    background: linear-gradient(180deg, rgba(3, 10, 6, 0.84) 0%, rgba(0, 0, 0, 0.18) 78%, transparent 100%);
    padding: 0.55rem 0.75rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 8;
    backdrop-filter: blur(6px);
}

.camera-label {
    font-family: var(--font-display);
    font-size: 0.74rem;
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: 0.14rem;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.85), 0 0 12px rgba(0, 0, 0, 0.65);
}

.camera-status {
    font-family: var(--font-data);
    font-size: 0.62rem;
    color: color-mix(in oklch, var(--accent-red) 88%, white 12%);
    animation: blink 1.5s infinite;
    padding: 0.22rem 0.48rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 95, 86, 0.25);
    background: rgba(48, 7, 7, 0.52);
    letter-spacing: 0.08rem;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 0, 0, 0.6);
}

.camera-content {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.camera-stream-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.camera-stream {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    filter: contrast(1.05) brightness(0.95);
    z-index: 2;
}

.camera-stream[hidden] {
    display: none !important;
}

.camera-fallback-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.camera-feed.camera-streaming .camera-fallback-wrapper {
    display: none;
}

.camera-feed.camera-streaming-mjpeg .camera-fallback-wrapper {
    display: block;
}

.camera-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.1) brightness(0.9);
    image-rendering: crisp-edges;
    transition: opacity 0.35s ease;
}

.camera-fallback-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.82);
    color: var(--text-primary, #d6f5d0);
    font-size: 0.75rem;
    letter-spacing: 0.35rem;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.camera-fallback-overlay[hidden] {
    opacity: 0;
    visibility: hidden;
    display: none;
}

.camera-stream-toggle.active {
    background: rgba(0, 255, 65, 0.2);
    border-color: rgba(0, 255, 65, 0.45);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.25);
}

.camera-stream-toggle.frozen {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(160, 200, 255, 0.35);
    color: rgba(200, 225, 255, 0.9);
    box-shadow: 0 0 14px rgba(120, 180, 255, 0.24);
    text-shadow: 0 0 4px rgba(120, 180, 255, 0.55);
}

.camera-stream-toggle.busy {
    opacity: 0.6;
    cursor: wait;
}

.camera-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 0.5rem;
    z-index: 8;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.camera-map-overlay {
    position: fixed;
    display: none;
    right: clamp(0.9rem, 3vw, 2.5rem);
    bottom: calc(var(--footer-height) + clamp(0.75rem, 2.5vh, 2rem));
    z-index: 15;
    pointer-events: none;
}

.camera-map-overlay.visible {
    display: block;
}

.camera-map-window {
    pointer-events: auto;
    width: clamp(220px, 18vw, 310px);
    background:
        linear-gradient(180deg, rgba(118, 255, 166, 0.06) 0%, rgba(118, 255, 166, 0) 24%),
        linear-gradient(180deg, color-mix(in oklch, var(--bg-tertiary) 82%, black) 0%, color-mix(in oklch, var(--bg-primary) 94%, black) 100%);
    border: 1px solid color-mix(in oklch, var(--border-color) 88%, var(--text-secondary) 12%);
    box-shadow: 0 24px 34px rgba(0, 0, 0, 0.52), 0 0 22px rgba(38, 255, 122, 0.14), inset 0 1px 0 rgba(171, 255, 196, 0.08);
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.camera-map-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.7rem;
    background:
        linear-gradient(180deg, rgba(171, 255, 196, 0.08) 0%, rgba(171, 255, 196, 0) 100%),
        linear-gradient(180deg, color-mix(in oklch, var(--bg-elevated) 84%, black) 0%, color-mix(in oklch, var(--bg-secondary) 92%, black) 100%);
    border-bottom: 1px solid color-mix(in oklch, var(--border-color) 82%, var(--accent-green) 18%);
    user-select: none;
}

.camera-map-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.camera-map-control-btn {
    position: relative;
    width: 1.6rem;
    height: 1.1rem;
    border: 1px solid color-mix(in oklch, var(--border-color) 72%, var(--accent-green) 28%);
    background: color-mix(in oklch, var(--bg-secondary) 88%, black);
    border-radius: 0;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(171, 255, 196, 0.06);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.camera-map-control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-green);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.camera-map-control-btn[data-state="minimize"]::before {
    width: 12px;
    height: 2px;
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.6);
}

.camera-map-control-btn[data-state="restore"]::before {
    width: 12px;
    height: 8px;
    background: transparent;
    border: 1px solid var(--accent-green);
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.45);
}

.camera-map-control-btn[data-state="detach"]::before {
    content: '↗';
    width: auto;
    height: auto;
    background: transparent;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: var(--accent-green);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.55);
}

.camera-map-control-btn[data-state="detach"]:disabled::before {
    background: transparent;
}

.camera-map-control-btn:hover,
.camera-map-control-btn:focus {
    outline: none;
    border-color: color-mix(in oklch, var(--accent-green) 72%, white 28%);
    background: color-mix(in oklch, var(--bg-elevated) 84%, black);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.25), inset 0 1px 0 rgba(171, 255, 196, 0.08);
}

.camera-map-control-btn:hover::before,
.camera-map-control-btn:focus::before {
    color: #000;
}

.camera-map-control-btn.active {
    border-color: color-mix(in oklch, var(--accent-amber) 45%, var(--accent-green) 55%);
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.18), inset 0 0 0 1px rgba(255, 214, 122, 0.16);
}

.camera-map-control-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    border-color: rgba(0, 255, 65, 0.25);
}

.camera-map-control-btn:disabled::before {
    color: rgba(0, 255, 65, 0.35);
    background: rgba(0, 255, 65, 0.25);
    border-color: rgba(0, 255, 65, 0.25);
    box-shadow: none;
}

.camera-map-control-btn:active {
    transform: translateY(1px);
}

.camera-map-content {
    position: relative;
    padding: 0.65rem 0.7rem 0.75rem;
    background:
        linear-gradient(180deg, rgba(171, 255, 196, 0.03) 0%, rgba(171, 255, 196, 0) 32%),
        color-mix(in oklch, var(--bg-primary) 92%, black);
    display: flex;
    flex: 1 1 auto;
    min-height: clamp(260px, 42vh, 440px);
}

.camera-map-overlay.window-minimized .camera-map-content {
    display: none;
}

.camera-map-overlay.window-minimized .camera-map-window {
    cursor: pointer;
    border-color: rgba(0, 255, 65, 0.25);
    min-height: auto;
}

.camera-map-overlay.window-minimized .camera-map-titlebar {
    border-bottom-color: rgba(0, 255, 65, 0.25);
}
.camera-map-overlay.window-minimized .camera-map-window .camera-map-heading {
    text-align: center;
}

.camera-map-overlay.detached-host-hidden {
    display: none !important;
}

.camera-map-heading {
    font-family: var(--font-display);
    font-size: 0.74rem;
    letter-spacing: 0.16rem;
    text-align: center;
    color: color-mix(in oklch, var(--text-primary) 88%, var(--accent-green) 12%);
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.fullscreen-map-overlay .camera-map-heading {
    text-align: left;
}

.camera-map-titlebar .camera-map-heading {
    flex: 1;
    text-align: left;
}

.camera-map-frame {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: var(--camera-map-aspect, 0.516);
    border: 1px solid rgba(0, 255, 65, 0.2);
    background: rgba(0, 0, 0, 0.65);
    overflow: hidden;
}

.camera-map-frame.map-interactive {
    cursor: crosshair;
    pointer-events: auto;
}

.camera-map-canvas {
    position: relative;
    width: 100%;
    height: 100%;
}

.camera-map-canvas > .camera-map-frame {
    position: absolute;
    inset: 0;
    border: none;
    background: transparent;
}

.camera-map-svg,
.camera-map-dots {
    position: absolute;
    inset: 0;
}

.camera-map-svg svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 8px rgba(0, 255, 65, 0.35));
    pointer-events: none;
}

.camera-map-svg svg :is(path, rect, circle, ellipse, line, polyline, polygon) {
    stroke: var(--accent-green) !important;
    stroke-width: 2;
    fill: transparent;
}

.camera-map-svg svg :is(path, rect, circle, ellipse, polygon)[fill]:not([fill="none"]) {
    fill: rgba(0, 255, 65, 0.08) !important;
}

.camera-map-svg svg :is(text, tspan) {
    fill: var(--accent-green) !important;
    stroke: none !important;
}

.camera-map-dots {
    pointer-events: none;
}

.camera-map-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.7);
    opacity: 0.82;
    transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
    pointer-events: auto;
}

.camera-map-dot.dragging {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.9);
    cursor: grabbing;
}

.camera-map-dot:hover,
.camera-map-dot.hovered,
.camera-map-dot.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--accent-red);
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.9);
}

.camera-map-dot.selected {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.75);
}

.camera-map-dot.unplaced {
    opacity: 0;
    box-shadow: none;
    pointer-events: none;
}

.camera-map-dot.show-label {
    width: 18px;
    height: 18px;
    font-size: 0.55rem;
    font-weight: bold;
    color: #000;
    background: rgba(0, 255, 65, 0.85);
    text-align: center;
    line-height: 18px;
    border: 1px solid rgba(0, 255, 65, 0.6);
    opacity: 0.9;
}

.camera-map-dot.show-label.unplaced {
    opacity: 0.25;
    background: rgba(0, 255, 65, 0.25);
    color: rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.camera-map-dot.show-label:hover,
.camera-map-dot.show-label.hovered,
.camera-map-dot.show-label.active {
    background: var(--accent-red);
    border-color: rgba(255, 0, 0, 0.65);
    color: #000;
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.85);
}

.camera-map-dot.show-label.selected {
    background: rgba(0, 255, 65, 0.9);
    border-color: rgba(0, 255, 65, 0.75);
    color: #000;
}

.camera-map-frame.map-interactive .camera-map-dots {
    pointer-events: none;
}

.camera-map-frame.map-interactive .camera-map-dot {
    pointer-events: auto;
    cursor: pointer;
}

.fullscreen-map-overlay {
    position: absolute;
    display: none;
    top: clamp(0.75rem, 2vw, 1.25rem);
    right: clamp(1rem, 5vw, 3.5rem);
    width: min(clamp(220px, 25vw, 360px), calc((100vh - var(--header-height) - var(--footer-height) - 4rem) * var(--camera-map-aspect)));
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - 2rem);
    pointer-events: none;
    z-index: 30;
}

.fullscreen-map-overlay.visible {
    display: block;
}

.fullscreen-map-window {
    pointer-events: auto;
    background:
        linear-gradient(180deg, rgba(171, 255, 196, 0.06) 0%, rgba(171, 255, 196, 0) 24%),
        linear-gradient(180deg, color-mix(in oklch, var(--bg-tertiary) 82%, black) 0%, color-mix(in oklch, var(--bg-primary) 94%, black) 100%);
    border: 1px solid color-mix(in oklch, var(--border-color) 88%, var(--text-secondary) 12%);
    box-shadow: 0 24px 34px rgba(0, 0, 0, 0.52), 0 0 22px rgba(38, 255, 122, 0.14), inset 0 1px 0 rgba(171, 255, 196, 0.08);
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - 2rem);
    user-select: none;
}

.fullscreen-map-overlay.dragging .fullscreen-map-window {
    cursor: grabbing;
}

.fullscreen-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.7rem;
    background:
        linear-gradient(180deg, rgba(171, 255, 196, 0.08) 0%, rgba(171, 255, 196, 0) 100%),
        linear-gradient(180deg, color-mix(in oklch, var(--bg-elevated) 84%, black) 0%, color-mix(in oklch, var(--bg-secondary) 92%, black) 100%);
    border-bottom: 1px solid color-mix(in oklch, var(--border-color) 82%, var(--accent-green) 18%);
    cursor: grab;
    touch-action: none;
}

.fullscreen-map-header:active {
    cursor: grabbing;
}

.fullscreen-map-header .camera-map-heading {
    flex: 1;
    text-align: left;
    font-size: 0.7rem;
    letter-spacing: 0.14rem;
}

.fullscreen-map-close {
    width: 1.5rem;
    height: 1.1rem;
    border: 1px solid color-mix(in oklch, var(--border-color) 72%, var(--accent-green) 28%);
    background: color-mix(in oklch, var(--bg-secondary) 88%, black);
    color: var(--accent-green);
    font-family: var(--font-data);
    font-size: 0.9rem;
    line-height: 1;
    border-radius: 0;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(171, 255, 196, 0.06);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.fullscreen-map-close:hover,
.fullscreen-map-close:focus {
    outline: none;
    background: color-mix(in oklch, var(--bg-elevated) 84%, black);
    border-color: color-mix(in oklch, var(--accent-green) 72%, white 28%);
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.25), inset 0 1px 0 rgba(171, 255, 196, 0.08);
}

.fullscreen-map-close:active {
    transform: translateY(1px);
}

.fullscreen-map-content {
    padding: 0.65rem 0.7rem 0.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: auto;
    background:
        linear-gradient(180deg, rgba(171, 255, 196, 0.03) 0%, rgba(171, 255, 196, 0) 32%),
        color-mix(in oklch, var(--bg-primary) 92%, black);
}

.fullscreen-map-overlay.hidden {
    display: none !important;
}

.fullscreen-map-restore {
    position: absolute;
    top: clamp(0.75rem, 2vw, 1.25rem);
    right: clamp(1rem, 5vw, 3.5rem);
    left: auto;
    padding: 0.35rem 0.85rem;
    background: color-mix(in oklch, var(--bg-secondary) 92%, black);
    border: 1px solid color-mix(in oklch, var(--border-color) 76%, var(--accent-green) 24%);
    color: var(--accent-green);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.18rem;
    border-radius: 0;
    display: none;
    cursor: pointer;
    z-index: 29;
    box-shadow: 0 16px 22px rgba(0, 0, 0, 0.45), 0 0 16px rgba(0, 255, 65, 0.16), inset 0 1px 0 rgba(171, 255, 196, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.fullscreen-map-restore.visible {
    display: block;
}

.fullscreen-map-restore:hover,
.fullscreen-map-restore:focus {
    outline: none;
    border-color: rgba(0, 255, 65, 0.85);
    color: #000;
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.45);
}

.camera-message {
    position: absolute;
    top: clamp(0.4rem, 1.5vh, 1rem);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.15rem 0.35rem;
    font-size: clamp(0.55rem, 1.8vh, 0.85rem);
    letter-spacing: 0.3rem;
    color: var(--accent-red);
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(255, 0, 50, 0.65);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 4;
    white-space: nowrap;
}

.camera-message.active {
    opacity: 1;
}

.camera-message .scramble-char {
    display: inline-block;
    color: rgba(255, 100, 130, 0.85);
}

.camera-message.active.exiting {
    opacity: 0;
    filter: blur(0.6px);
}

.whisper-text-active {
    color: rgba(255, 76, 120, 0.95);
    text-shadow: 0 0 10px rgba(255, 40, 90, 0.6);
    letter-spacing: 0.2rem;
}

.whisper-text-active .scramble-char {
    color: rgba(255, 130, 160, 0.85);
}

.timestamp {
    font-size: 0.7rem;
    color: var(--accent-green);
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
    text-align: right;
    line-height: 1.1;
    white-space: pre-line;
}

body.glitch-overlay-active .camera-feed.camera-glitching .camera-header,
body.glitch-overlay-active .camera-feed.camera-glitching .camera-overlay {
    overflow: hidden;
    animation: camera-bar-jitter 0.9s steps(2, end) infinite;
}

body.glitch-overlay-active .camera-feed.camera-glitching .camera-header::after,
body.glitch-overlay-active .camera-feed.camera-glitching .camera-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 0, 80, 0.12) 0%, rgba(0, 255, 65, 0.18) 50%, rgba(0, 160, 255, 0.12) 100%);
    background-size: 100% 200%;
    mix-blend-mode: screen;
    opacity: 0.16;
    animation: camera-header-scan 0.9s linear infinite;
}

body.glitch-overlay-active .camera-feed.camera-glitching .camera-overlay::after {
    opacity: 0.12;
    animation-duration: 1.05s;
}

body.glitch-overlay-active .camera-feed.camera-glitching .camera-label,
body.glitch-overlay-active .camera-feed.camera-glitching .camera-status,
body.glitch-overlay-active .camera-feed.camera-glitching .timestamp {
    animation: camera-text-glitch 0.45s steps(2, end) infinite;
    text-shadow: -1px 0 rgba(255, 0, 90, 0.5), 1px 0 rgba(0, 180, 255, 0.5), 0 0 4px rgba(0, 255, 65, 0.45);
    will-change: transform, text-shadow;
}

.camera-feed.terror-active {
    border-color: rgba(255, 0, 95, 0.65);
    box-shadow: 0 0 24px rgba(255, 40, 120, 0.35);
}

.camera-feed.terror-active .camera-image {
    animation: terror-jitter 0.4s steps(2, end) infinite;
}

.camera-feed.terror-active .camera-content::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(255, 0, 110, 0.12), transparent 70%);
    mix-blend-mode: screen;
    animation: terror-veil 0.6s alternate infinite;
    z-index: 3;
}

.camera-feed.stream-freeze-active .camera-image {
    filter: contrast(1.3) saturate(0.7) brightness(0.9);
}

.camera-feed.stream-freeze-active .camera-content::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.04) 0,
        rgba(255, 255, 255, 0.04) 2px,
        transparent 2px,
        transparent 4px
    );
    mix-blend-mode: overlay;
    opacity: 0.45;
    z-index: 2;
}

body.no-terror-highlight .camera-feed.terror-active {
    border-color: var(--border-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

body.no-terror-highlight .camera-feed.terror-active .camera-image {
    animation: none;
}

body.no-terror-highlight .camera-feed.terror-active .camera-content::after {
    display: none;
}

@keyframes terror-jitter {
    0% {
        transform: translate3d(-0.6px, 0, 0);
    }
    100% {
        transform: translate3d(0.6px, 0, 0);
    }
}

@keyframes terror-veil {
    0% {
        opacity: 0.18;
    }
    100% {
        opacity: 0.32;
    }
}

/* Camera Controls */
.camera-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
    z-index: 3;
    border-top: 1px solid var(--border-color);
}

.camera-feed:hover .camera-controls,
.camera-feed:focus-within .camera-controls {
    opacity: 1;
    transform: translateY(0);
}

.fullscreen-view .camera-feed .camera-controls {
    opacity: 1;
    transform: translateY(0);
}

.control-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.control-btn:hover {
    background: var(--text-secondary);
    color: #000;
    border-color: var(--accent-green);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.control-info {
    font-size: 0.7rem;
    color: var(--accent-green);
    padding: 0 0.5rem;
    min-width: 150px;
    text-align: center;
    font-weight: bold;
}

/* Footer */
.surveillance-footer {
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.98) 0%, rgba(5, 5, 5, 1) 100%);
    border-top: 2px solid var(--accent-green);
    padding: clamp(0.5rem, 1vh, 1rem) clamp(1rem, 2vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(0.6rem, 1.2vw, 0.8rem);
    color: var(--text-secondary);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    height: var(--footer-height);
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.7);
    width: 100vw;
}

/* Responsive Design */
@media (max-width: 1400px) {
    :root {
        --grid-gap: clamp(0.75rem, 1.2vw, 1.2rem);
    }
    .camera-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 1024px) {
    :root {
        --header-height: clamp(70px, 7vh, 100px);
        --footer-height: clamp(35px, 3.5vh, 50px);
        --main-margin: clamp(0.75rem, 1.5vh, 1.5rem);
    }
    
    .camera-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    
    .camera-map-overlay {
        display: none !important;
    }

    .system-info h1 {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: clamp(80px, 9vh, 110px);
        --footer-height: clamp(50px, 5vh, 70px);
        --main-margin: clamp(0.5rem, 1vh, 1rem);
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .system-info h1 {
        font-size: clamp(1rem, 4vw, 1.4rem);
    }
    
    .status-bar {
        font-size: clamp(0.6rem, 2vw, 0.8rem);
        gap: 0.75rem;
    }
    
    .camera-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .camera-label {
        font-size: clamp(0.55rem, 1.5vw, 0.7rem);
    }
    
    .camera-status {
        font-size: clamp(0.5rem, 1.4vw, 0.65rem);
    }
    
    .surveillance-footer {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: clamp(90px, 12vh, 120px);
        --footer-height: clamp(60px, 8vh, 80px);
    }
    
    .camera-grid {
        grid-template-columns: 1fr;
    }
    
    .system-info h1 {
        font-size: clamp(0.9rem, 5vw, 1.2rem);
        letter-spacing: 1px;
    }
    
    .subtitle {
        font-size: clamp(0.5rem, 2.5vw, 0.7rem);
    }
    
    .control-btn {
        padding: clamp(0.25rem, 1vw, 0.4rem) clamp(0.4rem, 1.5vw, 0.6rem);
        font-size: clamp(0.6rem, 2vw, 0.75rem);
    }
    
    .control-info {
        font-size: clamp(0.55rem, 1.8vw, 0.65rem);
        min-width: 80px;
    }
}

/* CRT Monitor Effect (optional) */
@keyframes flicker {
    0% { opacity: 0.97; }
    50% { opacity: 1; }
    100% { opacity: 0.97; }
}

@keyframes camera-flicker {
    0%, 100% { opacity: 1; }
    45% { opacity: var(--cam-flicker-min-opacity, 0.85); }
    55% { opacity: 1; }
}

.camera-feed.flicker-active .camera-content {
    animation: camera-flicker var(--cam-flicker-speed, 0.25s) steps(2, end) infinite;
}

.camera-dim-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.85) 45%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.camera-feed.global-dim-active .camera-dim-overlay {
    transition: opacity 0.2s ease;
}

/* VCR glitch overlay */
.vcr-glitch-overlay {
    position: absolute;
    inset: 0;
    background-image: url('resources/vcr-static.jpg');
    background-size: 100% auto;
    background-repeat: repeat-y;
    background-position: 0 0;
    pointer-events: none;
    opacity: 0.7;
    mix-blend-mode: screen;
    z-index: 6;
}

/* Fullscreen Camera View */
.fullscreen-view {
    position: fixed;
    top: var(--header-height);
    bottom: var(--footer-height);
    left: 0;
    right: 0;
    background:
        radial-gradient(circle at 70% 14%, rgba(255, 197, 92, 0.08) 0%, transparent 26%),
        radial-gradient(circle at 12% 18%, rgba(34, 255, 126, 0.07) 0%, transparent 28%),
        linear-gradient(180deg, color-mix(in oklch, var(--bg-tertiary) 74%, black) 0%, color-mix(in oklch, var(--bg-primary) 94%, black) 100%);
    z-index: 2000;
    display: none;
    flex-direction: column;
    border: 1px solid color-mix(in oklch, var(--border-color) 78%, var(--text-secondary) 22%);
    box-shadow: 0 30px 44px rgba(0, 0, 0, 0.55), 0 0 30px rgba(38, 255, 122, 0.12);
    width: 100vw;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    isolation: isolate;
}

.fullscreen-view::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg, transparent 0, transparent 3px, rgba(171, 255, 196, 0.018) 3px, rgba(171, 255, 196, 0.018) 4px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

.fullscreen-view::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 54%, rgba(0, 0, 0, 0.36) 100%);
    pointer-events: none;
    z-index: 0;
}

.fullscreen-view.active {
    display: flex;
}

.fullscreen-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.camera-sidebar {
    width: clamp(220px, 18vw, 290px);
    background:
        linear-gradient(180deg, rgba(171, 255, 196, 0.06) 0%, rgba(171, 255, 196, 0) 22%),
        linear-gradient(180deg, color-mix(in oklch, var(--bg-elevated) 82%, black) 0%, color-mix(in oklch, var(--bg-secondary) 94%, black) 100%);
    border-right: 1px solid color-mix(in oklch, var(--border-color) 82%, var(--text-secondary) 18%);
    overflow-y: auto;
    padding: 1rem 0.85rem;
    box-shadow: inset -1px 0 0 rgba(171, 255, 196, 0.04);
}

.sidebar-title {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 400;
    margin-bottom: 1rem;
    padding: 0 0.15rem 0.7rem;
    border-bottom: 1px solid color-mix(in oklch, var(--border-soft) 88%, var(--accent-green) 12%);
    letter-spacing: 0.16rem;
    text-transform: uppercase;
}

.sidebar-cameras {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sidebar-camera-item {
    background:
        linear-gradient(180deg, rgba(171, 255, 196, 0.04) 0%, rgba(171, 255, 196, 0) 100%),
        color-mix(in oklch, var(--bg-primary) 92%, black);
    border: 1px solid color-mix(in oklch, var(--border-soft) 92%, var(--text-secondary) 8%);
    padding: 0.6rem 0.65rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    box-shadow: inset 0 1px 0 rgba(171, 255, 196, 0.03);
}

.sidebar-camera-item:hover {
    border-color: color-mix(in oklch, var(--accent-green) 58%, white 12%);
    background:
        linear-gradient(180deg, rgba(171, 255, 196, 0.06) 0%, rgba(171, 255, 196, 0) 100%),
        color-mix(in oklch, var(--bg-secondary) 88%, black);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 12px 18px rgba(0, 0, 0, 0.26), 0 0 16px rgba(38, 255, 122, 0.1);
}

.sidebar-camera-item.active {
    border-color: color-mix(in oklch, var(--accent-amber) 36%, var(--accent-green) 64%);
    color: var(--text-primary);
    background:
        linear-gradient(180deg, rgba(255, 214, 122, 0.08) 0%, rgba(171, 255, 196, 0.03) 100%),
        color-mix(in oklch, var(--bg-secondary) 90%, black);
    box-shadow: 0 14px 18px rgba(0, 0, 0, 0.28), 0 0 18px rgba(38, 255, 122, 0.1), inset 0 0 0 1px rgba(255, 214, 122, 0.12);
}

.sidebar-camera-item.hovered:not(.active) {
    border-color: rgba(0, 255, 65, 0.46);
    background: color-mix(in oklch, var(--bg-secondary) 90%, black);
    color: var(--text-primary);
}

.sidebar-camera-name {
    flex: 1;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
}

.sidebar-close {
    display: none;
    background: color-mix(in oklch, var(--bg-primary) 86%, black);
    border: 1px solid color-mix(in oklch, var(--border-color) 72%, var(--accent-green) 28%);
    color: var(--accent-green);
    font-size: 0.8rem;
    width: 1.85rem;
    height: 1.75rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    font-family: var(--font-data);
    padding: 0;
    border-radius: 0;
}

.sidebar-camera-item.active .sidebar-close {
    display: inline-flex;
}

.sidebar-close:hover {
    background: color-mix(in oklch, var(--bg-elevated) 84%, black);
    color: var(--text-primary);
    border-color: color-mix(in oklch, var(--accent-green) 72%, white 28%);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.18);
}

.main-camera-view {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--main-margin);
    background:
        radial-gradient(circle at center, rgba(171, 255, 196, 0.03) 0%, transparent 36%),
        linear-gradient(180deg, color-mix(in oklch, var(--bg-primary) 90%, black) 0%, black 100%);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.main-camera-container {
    position: relative;
    width: 100%;
    max-width: 1260px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: clamp(0.5rem, 1vw, 0.9rem);
    background:
        linear-gradient(180deg, rgba(171, 255, 196, 0.05) 0%, rgba(171, 255, 196, 0) 22%),
        color-mix(in oklch, var(--bg-secondary) 92%, black);
    border: 1px solid color-mix(in oklch, var(--border-color) 82%, var(--text-secondary) 18%);
    box-shadow: 0 22px 32px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(171, 255, 196, 0.05);
}

.main-camera-feed {
    position: relative;
    width: min(100%, calc((100vh - var(--header-height) - var(--footer-height) - (2 * var(--main-margin)) - 2.75rem) * 16 / 9));
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - (2 * var(--main-margin)) - 2.75rem);
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid rgba(171, 255, 196, 0.16);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45), 0 18px 28px rgba(0, 0, 0, 0.3);
}

.main-camera-feed .camera-feed {
    width: 100%;
    height: 100%;
    margin: 0;
    position: absolute;
    inset: 0;
}

.fullscreen-view .camera-feed .camera-header {
    display: none;
}

.fullscreen-view .camera-feed .camera-overlay {
    display: none;
}

.fullscreen-label {
    position: absolute;
    top: clamp(0.75rem, 3vw, 2rem);
    left: clamp(0.75rem, 3vw, 2rem);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.14rem;
    font-weight: 400;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 20;
    min-width: 240px;
    max-width: min(28rem, calc(100vw - 2rem));
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.7rem 0.85rem;
    background:
        linear-gradient(180deg, rgba(171, 255, 196, 0.07) 0%, rgba(171, 255, 196, 0) 100%),
        rgba(2, 9, 6, 0.82);
    border: 1px solid color-mix(in oklch, var(--border-color) 80%, var(--text-secondary) 20%);
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(171, 255, 196, 0.05);
}

.fullscreen-label-title {
    font-size: clamp(0.98rem, 1.4vw, 1.14rem);
    letter-spacing: 0.2rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.fullscreen-label-status {
    align-self: flex-start;
    padding: 0.2rem 0.45rem;
    font-family: var(--font-data);
    font-size: 0.78rem;
    letter-spacing: 0.12rem;
    background: rgba(6, 16, 11, 0.82);
    border: 1px solid rgba(171, 255, 196, 0.12);
}

.fullscreen-footnote {
    position: absolute;
    right: clamp(1rem, 6vw, 3.5rem);
    bottom: clamp(0.75rem, 5.5vw, 3rem);
    color: color-mix(in oklch, var(--text-secondary) 80%, var(--accent-green) 20%);
    font-family: var(--font-data);
    font-size: clamp(0.65rem, 1.3vw, 0.9rem);
    letter-spacing: 0.14rem;
    text-transform: uppercase;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    z-index: 20;
}

.fullscreen-view .camera-feed:hover {
    border-color: var(--border-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.main-camera-controls {
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    padding: 0.85rem 1.5rem;
    max-width: 100%;
    margin-top: 0;
}

.main-camera-controls.active {
    display: flex;
}

.main-camera-controls .camera-controls {
    position: static;
    opacity: 1;
    transform: none;
    background: transparent;
    padding: 0;
    border: none;
    gap: 0.75rem;
    width: 100%;
    max-width: 640px;
}

.main-camera-controls .camera-controls .control-info {
    min-width: 220px;
}

/* Developer Panel */
.dev-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 3px solid var(--accent-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    z-index: 3000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.dev-panel.active {
    display: flex;
}

.dev-header {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border-bottom: 2px solid var(--accent-green);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dev-header h3 {
    color: var(--accent-green);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin: 0;
}

.dev-close {
    background: transparent;
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    font-size: 1.2rem;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.dev-close:hover {
    background: var(--accent-green);
    color: #000;
}

.dev-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.dev-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.dev-tab {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dev-tab:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.25);
}

.dev-tab:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

.dev-tab.active {
    background: rgba(0, 255, 65, 0.15);
    border-color: var(--accent-green);
    box-shadow: inset 0 0 12px rgba(0, 255, 65, 0.2);
}

.dev-tab-panels {
    position: relative;
}

.dev-tab-panel {
    display: none;
}

.dev-tab-panel.active {
    display: block;
}

.dev-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dev-section:last-of-type {
    border-bottom: none;
}

.dev-section h4 {
    color: var(--accent-green);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.dev-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dev-option:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--text-secondary);
}

.dev-option span {
    color: var(--text-primary);
    font-size: 0.85rem;
    flex: 1;
}

.dev-option-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dev-select {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    min-width: 140px;
}

.dev-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    padding: 0.4rem 0.6rem;
    width: 100%;
}

.dev-textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    padding: 0.4rem 0.6rem;
    width: 100%;
    min-height: 120px;
    resize: vertical;
}

.dev-option.dev-option-field {
    cursor: default;
}

.dev-option.dev-option-field:hover {
    background: rgba(0, 255, 65, 0.05);
    border-color: var(--border-color);
}

.dev-camera-name-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.dev-camera-name-actions .dev-btn {
    flex: 1;
}

.camera-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.camera-toggle-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border-color);
    background: rgba(0, 255, 65, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}

.camera-toggle-option input {
    accent-color: var(--accent-green);
    cursor: pointer;
}

.camera-toggle-option .camera-toggle-label {
    font-size: 0.75rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.camera-toggle-option:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.25);
}

.camera-toggle-option.disabled {
    opacity: 0.45;
    background: rgba(0, 255, 65, 0.03);
    border-style: dashed;
}

.dev-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-green);
}

.dev-slider {
    flex: 1;
    height: 6px;
    background: var(--bg-primary);
    outline: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    accent-color: var(--accent-green);
}

.dev-color {
    width: 50px;
    height: 30px;
    border: 2px solid var(--border-color);
    background: transparent;
    cursor: pointer;
}

.dev-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.dev-btn {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    letter-spacing: 1px;
}

.dev-btn:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.dev-btn-danger {
    border-color: #ff4d4d;
    color: #ff4d4d;
}

.dev-btn-danger:hover {
    background: #ff4d4d;
    color: #000;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.4);
}

.dev-btn-reset:hover {
    background: #ff9500;
    color: #000;
    border-color: #ff9500;
}

.dev-btn-clear:hover {
    background: #ff0000;
    color: #000;
    border-color: #ff0000;
}

/* Dynamic Effect Classes */
body.no-rec-blink .status-indicator,
body.no-rec-blink .camera-status {
    animation: none !important;
}

body.static-noise::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.3"/></svg>');
    pointer-events: none;
    z-index: 999;
    opacity: var(--noise-opacity, 0.2);
    animation: static-anim 0.2s infinite;
}

body.scanlines-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.1) 0px,
        rgba(255, 255, 255, 0.1) 1px,
        rgba(0, 0, 0, 0.55) 2px,
        rgba(0, 0, 0, 0.55) 3px
    );
    mix-blend-mode: soft-light;
    opacity: var(--global-scanline-opacity, 0.22);
    z-index: 2400;
    will-change: opacity;
}

.floating-whispers-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2600;
    overflow: hidden;
}

.floating-whisper {
    position: absolute;
    font-size: clamp(0.55rem, 1.6vw, 1.1rem);
    letter-spacing: 0.25rem;
    color: rgba(255, 84, 132, 0.85);
    text-transform: uppercase;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    text-shadow: 0 0 12px rgba(255, 40, 96, 0.55);
    white-space: nowrap;
    pointer-events: none;
}

.floating-whisper.active {
    opacity: 1;
    transform: translate(-50%, -12px);
}

.floating-whisper.fade {
    opacity: 0;
    transform: translate(-50%, -28px);
}

@keyframes static-anim {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(5%, -10%); }
    30% { transform: translate(-10%, 5%); }
    40% { transform: translate(10%, 10%); }
    50% { transform: translate(-5%, 0); }
    60% { transform: translate(5%, 5%); }
    70% { transform: translate(0, -5%); }
    80% { transform: translate(-10%, -10%); }
    90% { transform: translate(10%, -5%); }
    100% { transform: translate(0, 0); }
}

@keyframes camera-bar-jitter {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(0.6px, -0.4px, 0); }
    50% { transform: translate3d(-0.7px, 0.5px, 0); }
    75% { transform: translate3d(0.4px, 0.4px, 0); }
}

@keyframes camera-header-scan {
    0% { background-position: 0 -120%; opacity: 0.08; }
    50% { background-position: 0 50%; opacity: 0.24; }
    100% { background-position: 0 120%; opacity: 0.08; }
}

@keyframes camera-text-glitch {
    0%, 100% {
        transform: translate3d(0, 0, 0);
        text-shadow: 0 0 4px rgba(0, 255, 65, 0.55);
    }
    20% {
        transform: translate3d(1.2px, -0.6px, 0);
        text-shadow: -2px 0 rgba(255, 0, 90, 0.6), 2px 0 rgba(0, 180, 255, 0.65);
    }
    40% {
        transform: translate3d(-1.4px, 0.5px, 0);
        text-shadow: -1px 0 rgba(0, 180, 255, 0.55), 1px 0 rgba(255, 0, 90, 0.5);
    }
    60% {
        transform: translate3d(0.8px, 0.2px, 0);
        text-shadow: 0 0 5px rgba(0, 255, 65, 0.6);
    }
    80% {
        transform: translate3d(-0.8px, -0.4px, 0);
        text-shadow: -2px 0 rgba(255, 0, 90, 0.6), 2px 0 rgba(0, 180, 255, 0.6);
    }
}

body.vignette .surveillance-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 998;
}

body.crt-effect .camera-content {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.45);
}

body.crt-effect .camera-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 45%, rgba(0, 0, 0, 0.4) 100%);
    mix-blend-mode: screen;
    pointer-events: none;
    opacity: 0.35;
    z-index: 0;
}

body.reduce-motion * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
}

body.low-quality .camera-image {
    image-rendering: pixelated;
    filter: blur(1px) contrast(1.1) brightness(0.9);
}

/* Responsive adjustments for fullscreen */
@media (max-width: 768px) {
    .camera-sidebar {
        width: clamp(120px, 20vw, 180px);
        padding: clamp(0.25rem, 1vw, 0.75rem);
    }
    
    .main-camera-view {
        padding: var(--main-margin);
    }

    .main-camera-container {
        padding: 0.45rem;
        gap: 0.5rem;
    }

    .fullscreen-label {
        min-width: 0;
        max-width: calc(100vw - 1.5rem);
        left: 0.75rem;
        right: 0.75rem;
    }
    
    .dev-panel {
        width: 95%;
        max-height: 90vh;
    }
    
    .dev-actions {
        flex-direction: column;
    }
    
    .sidebar-camera-item {
        font-size: clamp(0.6rem, 2vw, 0.8rem);
        padding: clamp(0.3rem, 1vw, 0.6rem);
    }
}

/* Ensure cameras never overflow viewport */
@media (max-height: 600px) {
    :root {
        --header-height: clamp(60px, 10vh, 80px);
        --footer-height: clamp(30px, 5vh, 40px);
        --main-margin: clamp(0.25rem, 0.5vh, 0.75rem);
    }
    
    .camera-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    
    .system-info h1 {
        font-size: clamp(0.8rem, 3vh, 1.2rem);
    }
    
    .status-bar {
        font-size: clamp(0.5rem, 1.5vh, 0.7rem);
    }
}

/* Ultra-wide screen adjustments */
@media (min-width: 1920px) {
    .camera-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        max-width: 1800px;
        margin: 0 auto;
    }
    
    .surveillance-main {
        padding: var(--main-margin) clamp(2rem, 5vw, 8rem);
    }
}

/* Camera Context Menu (Developer Mode) */
.camera-context-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 20, 0.98);
    border: 2px solid var(--crt-green);
    border-radius: 4px;
    padding: 0;
    z-index: 10000;
    min-width: 400px;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.context-menu-header {
    background: rgba(0, 255, 0, 0.15);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--crt-green);
}

.context-menu-header span {
    color: var(--crt-green);
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

.close-context-menu {
    background: none;
    border: none;
    color: var(--crt-green);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: color 0.2s;
}

.close-context-menu:hover {
    color: #fff;
}

.context-menu-content {
    padding: 16px;
}

.glitch-control-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.glitch-control-section:last-of-type {
    border-bottom: none;
}

.glitch-control-section h3 {
    color: var(--crt-green);
    font-size: 12px;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.glitch-control-section label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #aaa;
    font-size: 11px;
    margin-bottom: 10px;
    gap: 10px;
}

.glitch-control-section input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.dev-camera-effect-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.dev-camera-effect-actions .dev-btn {
    flex: 1;
}

.dev-upload-zone {
    position: relative;
    border: 2px dashed var(--border-color);
    background: rgba(0, 255, 65, 0.04);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.dev-upload-zone:hover {
    border-color: var(--accent-green);
    background: rgba(0, 255, 65, 0.08);
}

.dev-upload-zone.dragover {
    border-color: var(--accent-green);
    background: rgba(0, 255, 65, 0.12);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.25);
}

.dev-upload-zone:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 3px;
}

.dev-upload-input {
    display: none;
}

.dev-upload-message {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.dev-upload-message strong {
    font-size: 0.9rem;
    letter-spacing: 0.08rem;
    color: var(--accent-green);
    text-transform: uppercase;
}

.dev-upload-message span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dev-map-status,
.dev-camera-asset-status {
    margin-top: 0.6rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.03rem;
}

.dev-map-asset-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.dev-map-asset-actions .dev-btn {
    flex: 1;
}

.dev-camera-asset-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 0.75rem;
}

.dev-camera-asset-card {
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.65);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dev-camera-asset-card .dev-btn {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 0.25rem;
}

.dev-camera-asset-card h5 {
    margin: 0;
    font-size: 0.85rem;
    color: var(--accent-green);
    letter-spacing: 0.06rem;
    text-transform: uppercase;
}

.dev-camera-asset-note {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.02rem;
    word-break: break-word;
}

.dev-map-hint {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.05rem;
    margin-top: 0.35rem;
}

.dev-map-editor {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.9;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.85);
    margin-top: 0.75rem;
    overflow: hidden;
}

.dev-map-editor .camera-map-frame {
    position: absolute;
    inset: 0;
    border: none;
    background: transparent;
}

.dev-map-editor .camera-map-heading {
    display: none;
}

.dev-map-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.dev-map-actions .dev-btn {
    flex: 1;
}

.glitch-control-section input[type="range"] {
    flex: 1;
    max-width: 200px;
    cursor: pointer;
}

.glitch-control-section span[id$="-val"] {
    min-width: 30px;
    text-align: right;
    color: var(--crt-green);
    font-weight: bold;
}

.context-menu-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.context-menu-actions button {
    flex: 1;
    padding: 10px;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--crt-green);
    color: var(--crt-green);
    cursor: pointer;
    font-size: 11px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.context-menu-actions button:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

#remove-glitch {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff3333;
    color: #ff3333;
}

#remove-glitch:hover {
    background: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* Glitch canvas overlay */
.glitch-canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.terror-glitch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.house-manager {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.house-manager-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 18rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.house-manager-item {
    background: rgba(8, 8, 8, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.house-manager-item.active {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.25);
}

.house-manager-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.house-manager-name-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(0, 255, 65, 0.25);
    color: var(--text-primary);
    padding: 0.5rem 0.65rem;
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.house-manager-name-input:focus {
    outline: none;
    border-color: rgba(0, 255, 65, 0.8);
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.35);
    background: rgba(0, 45, 0, 0.45);
}

.house-manager-btn {
    min-width: 5.5rem;
    padding: 0.45rem 1rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 65, 0.35);
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.house-manager-btn:hover:not(:disabled),
.house-manager-btn:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.75);
    background: rgba(0, 50, 0, 0.65);
    color: #000;
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.35);
}

.house-manager-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.house-manager-btn:disabled:hover,
.house-manager-btn:disabled:focus-visible {
    border-color: rgba(0, 255, 65, 0.35);
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-primary);
    box-shadow: none;
}

.house-manager-btn.primary {
    border-color: rgba(0, 255, 65, 0.55);
    background: rgba(0, 60, 0, 0.65);
    color: var(--text-primary);
}

.house-manager-btn.danger {
    border-color: rgba(255, 95, 86, 0.6);
    color: #ffb3ac;
    background: rgba(120, 0, 0, 0.6);
}

.house-manager-btn.danger:hover:not(:disabled),
.house-manager-btn.danger:focus-visible {
    border-color: rgba(255, 95, 86, 0.9);
    background: rgba(160, 0, 0, 0.7);
    color: #fff;
    box-shadow: 0 0 18px rgba(255, 95, 86, 0.45);
}

.house-manager-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.house-import-dropzone {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border: 1px dashed rgba(0, 255, 65, 0.35);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.house-import-dropzone strong {
    color: var(--accent-green);
    font-size: 0.82rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
}

.house-import-dropzone span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.45;
}

.house-import-dropzone:hover,
.house-import-dropzone:focus-visible,
.house-import-dropzone.dragover {
    outline: none;
    border-color: rgba(0, 255, 65, 0.75);
    background: rgba(0, 40, 0, 0.45);
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.25);
}

/* ── Onboarding Panel (zero cameras) ── */
.onboarding-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(2.75rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem);
    min-height: 50vh;
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - (2 * var(--main-margin)));
    color: var(--text-primary);
    font-family: var(--font-ui);
    max-width: min(1040px, 100%);
    margin: 0 auto;
    border: 1px solid rgba(0, 255, 65, 0.18);
    border-radius: 1.2rem;
    background: linear-gradient(180deg, rgba(10, 22, 15, 0.94), rgba(1, 5, 3, 0.88));
    box-shadow: 0 28px 44px rgba(0, 0, 0, 0.32), 0 0 24px rgba(0, 255, 65, 0.1);
    position: relative;
    overflow: auto;
}

.onboarding-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--panel-sheen);
    pointer-events: none;
}

.onboarding-kicker {
    font-family: var(--font-data);
    font-size: 0.72rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: color-mix(in oklch, var(--accent-amber) 55%, var(--text-secondary) 45%);
    margin-bottom: 0.8rem;
}

.onboarding-icon {
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    letter-spacing: 0.26em;
    margin-bottom: 1rem;
    opacity: 0.34;
    animation: onboarding-blink 2s ease-in-out infinite;
}

@keyframes onboarding-blink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.onboarding-heading {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.onboarding-desc {
    max-width: 64ch;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
}

.onboarding-protocols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    width: 100%;
    margin: 0 0 1.5rem;
}

.onboarding-protocol {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem;
    text-align: left;
    border: 1px solid rgba(0, 255, 65, 0.14);
    border-radius: 0.95rem;
    background: linear-gradient(180deg, rgba(11, 19, 15, 0.82), rgba(0, 0, 0, 0.46));
}

.onboarding-protocol-index {
    flex: 0 0 auto;
    min-width: 3rem;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 65, 0.18);
    background: rgba(0, 255, 65, 0.05);
    font-family: var(--font-data);
    font-size: 0.72rem;
    letter-spacing: 0.14rem;
    color: var(--text-primary);
    text-align: center;
}

.onboarding-protocol-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.onboarding-protocol-body strong {
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: var(--text-primary);
}

.onboarding-protocol-body span,
.onboarding-footnote {
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.onboarding-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.onboarding-btn {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.72rem 1.3rem;
    border: 1px solid rgba(0, 255, 65, 0.24);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(18, 37, 25, 0.85), rgba(2, 8, 5, 0.74));
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.onboarding-btn:hover,
.onboarding-btn:focus-visible {
    outline: none;
    border-color: rgba(0, 255, 65, 0.65);
    background: linear-gradient(180deg, rgba(28, 63, 40, 0.94), rgba(6, 20, 11, 0.88));
    color: var(--text-primary);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.16);
    transform: translateY(-1px);
}

.onboarding-btn.primary {
    border-color: rgba(0, 255, 65, 0.45);
    background: linear-gradient(180deg, rgba(31, 78, 49, 0.95), rgba(8, 31, 18, 0.9));
}

.onboarding-btn.primary:hover,
.onboarding-btn.primary:focus-visible {
    border-color: rgba(255, 188, 66, 0.65);
    background: linear-gradient(180deg, rgba(82, 83, 32, 0.94), rgba(30, 37, 11, 0.88));
    color: var(--text-primary);
}

/* ── Camera Behavior Selector ── */
.wizard-camera-behavior-section {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    margin-top: 0.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wizard-camera-behavior-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.6;
    white-space: nowrap;
}

.wizard-camera-behavior-group {
    display: flex;
    gap: 0.35rem;
}

.wizard-camera-behavior-btn {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.wizard-camera-behavior-btn:hover,
.wizard-camera-behavior-btn:focus-visible {
    border-color: var(--primary-color, #00ff41);
    color: var(--primary-color, #00ff41);
}

.wizard-camera-behavior-btn.active {
    border-color: var(--primary-color, #00ff41);
    background: rgba(0, 255, 65, 0.12);
    color: var(--primary-color, #00ff41);
}

