.hm-controls {
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 12px 14px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.hm-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.hm-group-label {
    color: var(--text-mute);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}
.hm-fleet-row { min-height: 24px; }
.hm-fleet-row .empty-row {
    color: var(--text-mute);
    font-family: var(--mono);
    font-size: 11px;
    padding: 0;
    font-style: normal;
}
.hm-status-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    font-family: var(--mono);
    color: var(--text-mute);
    min-height: 20px;
}
.hm-banner {
    padding: 6px 10px;
    border: 1px solid var(--border-soft);
    background-color: var(--bg-panel);
}
.hm-banner.warn  { color: var(--gold);     border-color: var(--gold-dim); }
.hm-banner.err   { color: var(--err-text); border-color: var(--err-border); }
.hm-banner.info  { color: var(--text-dim); }
.hm-scene-wrap {
    position: relative;
    background-color: #0d1015;
    border: 1px solid var(--border);
    width: 100%;
    height: 70vh;
    min-height: 480px;
    overflow: hidden;
}
.hm-scene-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
.hm-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    background-color: rgba(13, 16, 21, 0.6);
    border: 1px solid var(--border-soft);
    padding: 4px 8px;
    pointer-events: none;
    line-height: 1.4;
}
.hm-overlay strong { color: var(--text); font-weight: 600; }
.hm-legend {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    background-color: rgba(13, 16, 21, 0.6);
    border: 1px solid var(--border-soft);
    padding: 4px 8px;
    pointer-events: none;
    line-height: 1.5;
}
.hm-legend .swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 4px;
    vertical-align: middle;
    border: 1px solid var(--border-soft);
}
.range-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    color: var(--text-mute);
}
.range-btn[disabled]:hover { background-color: var(--bg-input); color: var(--text-mute); }
select.fb-action[disabled] { opacity: 0.5; cursor: not-allowed; }
option[disabled] { color: var(--text-mute); }

.hm-scene-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 10;
    pointer-events: none;
}
.hm-scene-actions > * { pointer-events: auto; }
.scene-action-btn {
    background: rgba(13, 16, 21, 0.7);
    border: 1px solid var(--border-soft);
    color: var(--text-dim);
    padding: 4px 10px;
    font-size: 11px;
    font-family: var(--mono);
    cursor: pointer;
}
.scene-action-btn:hover { color: var(--text); background: rgba(13, 16, 21, 0.9); }
.scene-action-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.scene-action-btn[disabled]:hover { color: var(--text-dim); background: rgba(13, 16, 21, 0.7); }

.hm-scene-wrap.theater-mode {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: calc(100vh - 56px);
    z-index: 50;
}
.hm-scene-wrap.theater-mode canvas {
    width: 100% !important;
    height: 100% !important;
}
.hm-scene-wrap:fullscreen {
    width: 100vw;
    height: 100vh;
    background: #0d1015;
}
.hm-scene-wrap:fullscreen canvas {
    width: 100% !important;
    height: 100% !important;
}
body.theater-active .hero-title,
body.theater-active .panel-subtitle,
body.theater-active .hm-controls,
body.theater-active .hm-status-row,
body.theater-active .page-footer { display: none; }
body.theater-active .container { padding-top: 12px; padding-bottom: 12px; }

.render-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}
.render-dialog {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    padding: 20px;
    min-width: 320px;
}
.render-dialog h3 {
    font-size: 14px;
    color: #fff;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.render-field {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.render-field label {
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 12px;
    min-width: 70px;
}
.render-field input {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: #fff;
    padding: 4px 8px;
    font-family: var(--mono);
    font-size: 13px;
    width: 120px;
}
.render-field input:focus { outline: 1px solid var(--accent); }
.render-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}
.render-overlay[hidden] { display: none !important; }
.render-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}
.render-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid var(--border-soft);
    background: var(--bg-input);
    cursor: pointer;
    margin: 0;
}
.render-checkbox:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.render-checkbox:checked::after {
    content: "";
    display: block;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin: 1px 4px;
}
.render-error {
    color: #ff6b6b;
    font-family: var(--mono);
    font-size: 11px;
    margin-top: 8px;
}

.hm-anim-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
    background-color: rgba(13, 16, 21, 0.7);
    border: 1px solid var(--border-soft);
    padding: 6px 10px;
    pointer-events: none;
    line-height: 1.5;
    z-index: 10;
}
.hm-anim-overlay.clickable {
    pointer-events: auto;
    cursor: pointer;
}
.hm-anim-overlay[hidden] { display: none; }

.cam-presets {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
    pointer-events: none;
}
.cam-preset-btn {
    background: rgba(13, 16, 21, 0.7);
    border: 1px solid var(--border-soft);
    color: var(--text-dim);
    padding: 3px 8px;
    font-size: 11px;
    font-family: var(--mono);
    cursor: pointer;
    pointer-events: auto;
    text-align: center;
    white-space: nowrap;
    line-height: 1.5;
}
.cam-preset-btn:hover {
    color: var(--text);
    background: rgba(13, 16, 21, 0.9);
    border-color: var(--accent);
}
.cam-dir-active {
    color: #fff;
    font-weight: 600;
}
.cam-dir-inactive {
    color: var(--text-mute);
}
.cam-arrow {
    color: var(--text-dim);
    margin: 0 2px;
}
.cam-origin-display {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-mute);
    white-space: nowrap;
    pointer-events: none;
}
#animateBtn.animating {
    color: var(--accent);
    border-color: var(--accent);
}

.fov-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 72px;
    height: 4px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
}
.fov-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
}
.fov-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
}
.fov-value {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text);
    min-width: 20px;
    text-align: center;
}
