/*!
 * Urheberrecht / Copyright © 2026 Stefan Brauch / connectum. Alle Rechte vorbehalten.
 * NiQUiS 3D-Konferenzraum-Planer — Version 2.0.0 — Proprietäre Software. Siehe NOTICE.md.
 *
 * UNTERSAGT: Kopieren, Verbreiten, Reverse Engineering, Entfernen dieses Hinweises.
 */

:root {
    --bg-dark: #121212;
    --bg-panel: #1e1e1e;
    /* NEUE ORANGE TÖNE */
    --primary: #EC460C; 
    --primary-hover: #FF6329;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --input-bg: #2c2c2c;
    --border-color: #333333;
    --warning-color: #cc0000;
    /* Sidebar: einheitliche Fließtext- und Hinweisgrößen */
    --sidebar-body-size: 0.95rem;
    --sidebar-hint-size: 0.78rem;
    /* Info-Glyphe (? im Kreis): rem-Werte gültig schreiben (z. B. 0.75rem, nicht 0.75.rem) */
    --info-icon-box: 1.2rem;
    --info-icon-glyph: 0.82rem;
}

* { box-sizing: border-box; }

/* Verhindert das Reinzoomen bei schnellem Tippen */
button, input, select, textarea, .ctrl-btn, .step-circle, .stepper-item {
     touch-action: manipulation;
}

body { 
    margin: 0; 
    overflow: hidden; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    display: flex; 
    
    /* FIX: Erst Fallback, dann dynamische Höhe für iOS Adressleisten */
    height: 100vh; 
    height: 100dvh; 
    
    background-color: #000; 
    color: var(--text-main);
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
    -webkit-touch-callout: none;
}

@media print { html, body { display: none !important; } }

/* Mobil: Querformat erzwingen – Hinweis bei Hochformat */
#orientation-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #121212; z-index: 99999;
    display: none; /* Standardmäßig ausgeblendet, nur bei Handy-Hochformat sichtbar */
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 20px;
}

.phone-rotate-icon {
    width: 80px; height: 80px; fill: #666;
    animation: rotate-phone 2s infinite ease-in-out;
    margin-bottom: 20px;
}

@keyframes rotate-phone {
    0% { transform: rotate(0deg); opacity: 0.5; }
    25% { opacity: 1; }
    50% { transform: rotate(-90deg); opacity: 1; }
    100% { transform: rotate(-90deg); opacity: 0.5; }
}

/* Regel: Nur auf kleinen Bildschirmen (Handys) UND im Hochformat anzeigen */
@media only screen and (max-width: 900px) and (orientation: portrait) {
    #orientation-overlay { display: flex; }
    body { overflow: hidden; }
}

#sidebar {
    width: 400px; min-width: 400px; 
    background: var(--bg-panel);
    font-size: var(--sidebar-body-size);
    line-height: 1.45;
    
    /* Unten kein Padding, damit der Footer bis zum Rand kann */
    padding: 30px 30px 0 30px;
    
    box-shadow: 5px 0 20px rgba(0,0,0,0.5); 
    z-index: 10;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333; 
    height: 100%;
    overflow: hidden;
}

/* Logo, Claim und Einleitung: fest oben, scrollen nicht mit */
.sidebar-header {
    flex-shrink: 0;
}

/* Stepper und Wizard-Inhalte: scrollbar unter dem Kopfbereich */
.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* Abstand oben: grüner Anpassungs-Ring am Stepper (box-shadow) wird nicht abgeschnitten */
    padding-top: 6px;
    padding-bottom: 20px;
    scrollbar-gutter: stable;
    margin-right: -30px;
    padding-right: 30px;
}

/* --- FOOTER CSS KORRIGIERT --- */
#sidebar-footer {
    flex-shrink: 0;
    border-top: 1px solid #333;
    text-align: left; 
    background: var(--bg-panel);

    /* FIX: Symmetrisches Padding für vertikale Zentrierung */
    padding-top: 20px;
    padding-bottom: 20px; 
    
    /* FIX: Addiert den Abstand des Home-Balkens (iOS Safe Area) dynamisch dazu */
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

.footer-branding-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 8px;
}

.footer-logo-img {
    height: 18px; 
    width: auto;
    display: block;
    border: none;
}

.footer-subline {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: -3px; 
}

.text-by {
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.7rem;
    color: #888; 
}

.text-connectum {
    font-family: 'Haettenschweiler', 'Impact', sans-serif;
    font-size: 1.0rem;
    letter-spacing: 0.8px;
}

.c-orange { color: var(--primary); }
.c-grey { color: #B4B6B6; } 

.footer-copyright {
    color: #B4B6B6; 
    font-size: 0.55rem;
    font-family: 'Segoe UI', sans-serif;
}

.footer-legal-links {
    margin-top: 4px;
    font-size: 0.55rem;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.4;
}

.footer-legal-links a {
    color: #B4B6B6;
    text-decoration: none;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus {
    color: #B4B6B6;
    text-decoration: none;
}

.footer-legal-sep {
    color: #B4B6B6;
    margin: 0 0.25rem;
}
/* --- ENDE FOOTER CSS --- */

.logo-text { font-family: 'Haettenschweiler', 'Impact', sans-serif; font-weight: bold; }
.logo-orange { fill: var(--primary); } 
.logo-grey { fill: #808080; }     

/* Angepasste Klassen für Logo Header */
.brand-header { 
    display: flex;            
    align-items: flex-end;    
    gap: 10px;                
    margin-bottom: 25px; 
}

/* Der Link um das Logo bestimmt die Breite */
.brand-logo-link { 
    width: 45%;       /* Nimmt 45% der Sidebar-Breite ein */
    display: block;
    text-decoration: none;
    cursor: pointer;
    border: none;
    flex-shrink: 0;   /* Verhindert Zusammenfallen */
}

/* Das Bild füllt den Link aus */
.brand-logo { 
    width: 100%;      /* 100% vom Eltern-Link */
    height: auto; 
    display: block; 
    margin-bottom: 0;        
}

.brand-claim { 
    color: var(--text-muted); 
    font-size: 0.7rem;        
    margin-bottom: 0px;       
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
    line-height: 1.2;
    flex: 1;                  
}

/* Einleitung unter dem Logo (h1 oder p mit Klasse subtitle) */
.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 24px;
}

/* STEPPER MIT TEXT */
.stepper-container {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 35px; position: relative;
    padding: 0 5px; 
}
.stepper-item {
    display: flex; flex-direction: column; align-items: center;
    position: relative; z-index: 2; cursor: pointer; 
    width: 46px; 
}
.step-circle {
    width: 26px; height: 26px; border-radius: 50%;
    background: #333; color: #666;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 0.8rem;
    transition: all 0.3s; margin-bottom: 6px;
}

.step-label {
    position: absolute;
    top: 32px; 
    left: 50%;
    transform: translateX(-50%); 
    font-size: 0.6rem; 
    color: #555; 
    text-transform: uppercase; 
    font-weight: 600;
    transition: all 0.3s; 
    text-align: center; 
    letter-spacing: 0px; 
    white-space: nowrap; 
}

.stepper-item.active .step-circle { background: var(--primary); color: white; box-shadow: 0 0 10px rgba(236, 70, 12, 0.6); }
.stepper-item.active .step-label { color: var(--primary); }
.stepper-item.completed .step-circle { background: var(--primary); color: white; }
.stepper-item.completed .step-label { color: #ccc; }

.stepper-item:hover .step-circle { background: #444; color: #999; }
.stepper-item.active:hover .step-circle { background: var(--primary); color: white; }
.stepper-item.completed:hover .step-circle { background: var(--primary); color: white; }

.stepper-item.warning .step-circle {
    background: var(--warning-color) !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.6);
    animation: pulse-warning 1.2s ease-in-out infinite;
}
.stepper-item.warning .step-label {
    color: var(--warning-color) !important;
}

/* Hinweis unter dem Stepper, wenn Schritt 2 (Einrichtung) wegen Raumpassung rot blinkt */
.step-nav-validation-hint {
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--warning-color, #ff3333);
    margin: -8px 0 18px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255, 51, 51, 0.08);
    border: 1px solid rgba(255, 51, 51, 0.25);
}
.step-nav-validation-hint[hidden] {
    display: none !important;
}

/* Feiner grüner Rand bei Schritt 3, wenn Display nach unten verschoben */
.stepper-item.display-shifted .step-circle {
    box-shadow: 0 0 0 2px #4cd137;
}
.stepper-item.active.display-shifted .step-circle {
    box-shadow: 0 0 10px rgba(236, 70, 12, 0.6), 0 0 0 2px #4cd137;
}
.stepper-item.completed.display-shifted .step-circle {
    box-shadow: 0 0 0 2px #4cd137;
}

/* Ganzer roter Punkt pulsiert (nicht nur Rand); unterscheidbar von orangener Optik */
@keyframes pulse-warning {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.7; filter: brightness(0.85); }
}

.step-line {
    position: absolute; top: 13px; 
    left: 0; width: 100%; height: 2px;
    background: #333; z-index: 1; transform: translateY(-50%);
}

.wizard-step { display: none; animation: fadeIn 0.4s ease-in-out; }
.wizard-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.input-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: 600; color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.5px; }
/* Kartenkopf-Label (z. B. Displaygröße, Lautsprecher-System): nicht wie Feld-Label in input-group */
label.wizard-panel-card-label {
    margin-bottom: 0;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.radio-row { display: flex; gap: 20px; align-items: center; margin-top: 5px; }
.radio-label,
label.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.25;
}
.radio-row input[type="radio"],
label.radio-label input[type="radio"] {
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

/* Schritt 6: Raum-System — vier Optionen im Kartenrahmen (2×2, Desktop und Touch) */
#step6-room-system-panel .radio-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    align-items: center;
    margin-top: 12px;
}
#step6-room-system-panel label.radio-label {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 0.88rem;
    gap: 6px;
    min-width: 0;
    margin: 0;
    line-height: 1.25;
}
#step6-room-system-panel label.radio-label input[type="radio"] {
    margin: 0;
    vertical-align: middle;
}
.radio-label:has(input:disabled) { opacity: 0.5; cursor: not-allowed; color: var(--text-muted); }

input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: var(--input-bg);
    border-radius: 4px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    margin-top: -5px;
}
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}
input[type="range"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #1a1a1a;
}
input[type="range"]:disabled::-webkit-slider-thumb {
    background: #555;
    cursor: not-allowed;
}
input[type="range"]:disabled::-moz-range-thumb {
    background: #555;
    cursor: not-allowed;
}
/* Slider-Überschrift dunkler, wenn Tischposition deaktiviert (zu wenig Raum) */
.input-group:has(input[type="range"]:disabled) > label {
    color: #666;
}

/* Hinweis-Icon: ? im Kreis — Füllung wie Dropdown (--input-bg); Cursor mit ? */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--info-icon-box);
    height: var(--info-icon-box);
    min-width: var(--info-icon-box);
    min-height: var(--info-icon-box);
    padding: 0;
    box-sizing: border-box;
    border: 1px solid var(--primary);
    border-radius: 50%;
    background: var(--input-bg);
    font-size: var(--info-icon-glyph);
    font-weight: 700;
    line-height: 1;
    color: var(--text-main);
    user-select: none;
    /* Kreis #2c2c2c = var(--input-bg), feiner orangefarbener Ring (--primary) */
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%232c2c2c' stroke='%23EC460C' stroke-width='1'/%3E%3Ctext x='10' y='14' text-anchor='middle' fill='%23ffffff' font-size='11' font-family='system-ui,sans-serif' font-weight='bold'%3E%3F%3C/text%3E%3C/svg%3E") 10 10, help;
}
.info-icon:hover {
    background: color-mix(in srgb, var(--input-bg) 88%, var(--text-main) 12%);
    border-color: var(--primary-hover);
    color: var(--text-main);
}

.info-tooltip {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    max-width: 320px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: var(--sidebar-body-size);
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.45;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
    white-space: normal;
}
.info-tooltip.visible {
    display: block;
}

/* Icon+Tooltip-Gruppe; kein position:relative — sonst wäre der Bezug nur iconbreit und der Tooltip würde in der Sidebar (overflow-x) abgeschnitten. Bezug ist .parl-toggle-aisle-row wie bei Decken-LS. */
.front-speaker-info-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

input[type="number"], input[type="text"], input[type="email"], select, textarea {
    width: 100%; padding: 8px 12px; 
    background: var(--input-bg); border: 1px solid var(--border-color); 
    border-radius: 6px; font-size: 0.95rem; color: white;
    transition: 0.2s; 
    
    appearance: none;         /* Standard Eigenschaft (NEU) */
    -webkit-appearance: none; /* Fallback für sehr alte iOS Versionen (kann oft weg, stört aber nicht) */
    
    font-family: inherit;
}
textarea { resize: vertical; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(236, 70, 12, 0.2); }

/* Native Drehfelder bei Zahlen-Eingaben ausblenden */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { 
    -webkit-appearance: none; /* Erforderlich für Chrome/Safari */
    margin: 0; 
}

input[type=number] { 
    appearance: textfield;      /* Standard-Weg */
    -moz-appearance: textfield; /* Firefox-spezifischer Weg */
}

.btn-row { display: flex; gap: 10px; margin-top: 20px; }

button { font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }

.btn-next { 
    width: 100%; padding: 11px; 
    background: linear-gradient(135deg, #FF6329 0%, #EC460C 100%);
    color: white; border: none; border-radius: 6px; 
    font-size: 1rem; font-weight: bold; cursor: pointer; 
    transition: 0.2s; text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(236, 70, 12, 0.3);
}
.btn-next:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(236, 70, 12, 0.4); }

.summary-box { 
    background: #252525; border: 1px solid #333; 
    padding: 12px; border-radius: 6px; margin-bottom: 15px; 
    color: #ccc; font-size: 0.9rem; line-height: 1.5;
}
.summary-box strong { color: var(--primary); }

.warning-msg {
    color: #ff6b6b; background: rgba(255, 107, 107, 0.1); border: 1px solid #ff6b6b; 
    padding: 8px; border-radius: 6px; margin-top: 6px; font-size: 0.82rem; 
    display: none; font-weight: bold;
}

/* ID 1.5: Zeilenumbruch im Hinweistext nach „vom Display positioniert,“ (`MSG_TWO_PTZ_RULE15`) */
#ptz-two-no-position-main {
    white-space: pre-line;
}

#success-area { display: none; text-align: center; animation: fadeIn 0.5s; margin-top: 20px;}
.success-box { padding: 20px; background: rgba(40, 167, 69, 0.1); border-radius: 8px; color: #4cd137; border: 1px solid #2e7d32; margin-bottom: 20px;}

.btn-restart { width: 100%; padding: 12px; background: #333; color: white; border: 1px solid #555; border-radius: 6px; font-weight: bold; cursor: pointer; margin-top: 0px; font-size: 1rem;}
.btn-mail-manual { display: block; width: 100%; padding: 12px; background: var(--primary); color: white; text-decoration: none; border-radius: 6px; margin-bottom: 10px; font-weight: bold; font-size: 1rem; text-align: center;}
.btn-copy { width: 100%; padding: 12px; background: #444; color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; margin-bottom: 10px; font-size: 1rem;}

/* Sekundärer Button (z. B. Display nach unten verschieben) */
.btn-secondary {
    width: 100%; padding: 8px 12px;
    background: #333; color: #ccc;
    border: 1px solid #555; border-radius: 6px;
    font-size: var(--sidebar-body-size);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.btn-secondary:hover { background: #444; color: #fff; }

/* Schritt 3: langer Hinweistext bei zu geringer Raumhöhe */
#btn-display-shift-down {
    white-space: pre-line;
    line-height: 1.35;
    text-align: center;
    max-width: 100%;
}
#btn-display-shift-down:disabled {
    opacity: 0.88;
    cursor: not-allowed;
}

/* Hinweis: Displayposition angepasst (nach Verschiebung) + Rückgängig-Button */
.display-adjusted-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px;
}
.display-adjusted-hint {
    color: #4cd137;
    font-size: var(--sidebar-hint-size);
    font-weight: 600;
    line-height: 1.45;
}
.btn-display-undo {
    padding: 4px 10px;
    font-size: var(--sidebar-hint-size);
    font-weight: 600;
    background: #333; color: #ccc; border: 1px solid #555; border-radius: 4px;
    cursor: pointer; transition: background 0.2s, color 0.2s;
    margin-left: auto;
}
.btn-display-undo:hover { background: #444; color: #fff; }

/* Hinweis: niedrige Display-Unterkante (Sicht auf unteren Rand) */
.display-bottom-view-hint {
    color: #e67e22;
    font-size: var(--sidebar-hint-size);
    font-weight: 600;
    margin-top: 4px;
    line-height: 1.45;
}

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1000;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}
.modal-box {
    background: var(--bg-panel); 
    width: 90%; 
    max-width: 650px; 
    padding: 30px; 
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); 
    border: 1px solid #333;
    animation: popIn 0.3s ease-out;
    max-height: 90vh; 
    overflow-y: auto; 
}

/* Projektanfrage: zwei Spalten (Formular + Kommentare über volle Höhe) */
.modal-box--project-request {
    max-width: 980px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-box--project-request .modal-body-split {
    display: flex;
    gap: 24px;
    flex: 1 1 auto;
    min-height: 320px;
    max-height: calc(90vh - 180px);
    margin-bottom: 20px;
}
.modal-form-column {
    flex: 1 1 50%;
    min-width: 0;
    overflow-y: auto;
    padding-right: 4px;
}
.modal-comments-column {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #333;
    padding-left: 24px;
}
.modal-comments-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.4;
}
.modal-comments-textarea {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    resize: none;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #1a1a1a;
    color: #eee;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.45;
}
.modal-comments-textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.modal-section-divider {
    border: 0;
    border-top: 1px solid #333;
    margin: 10px 0 20px 0;
}
.modal-section-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
    line-height: 1.4;
}
.modal-form-hint {
    font-size: 0.85rem;
    color: #888;
    margin: 0 0 8px 0;
}
.modal-footer-actions {
    margin-top: 0;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .modal-box--project-request {
        max-width: 95%;
        overflow-y: auto;
    }
    .modal-box--project-request .modal-body-split {
        flex-direction: column;
        max-height: none;
        min-height: 0;
    }
    .modal-comments-column {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #333;
        padding-top: 20px;
        min-height: 160px;
    }
}
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Flex-Zeile für zwei Spalten */
.form-row {
    display: flex;
    gap: 20px;
}
.form-row .input-group {
    flex: 1; /* Beide Felder gleich breit */
    margin-bottom: 15px;
}

/* Handy Anpassung: Untereinander */
@media (max-width: 650px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-row .input-group {
        margin-bottom: 20px;
    }
}

.modal-header { font-size: 1.2rem; font-weight: bold; margin-bottom: 20px; color: white; border-bottom: 1px solid #333; padding-bottom: 15px; }
.btn-send { flex: 1; background: var(--primary); color: white; padding: 12px; border:none; border-radius:4px; font-weight:bold; cursor:pointer; }
.btn-cancel { flex: 1; background: #333; color: #ccc; padding: 12px; border:none; border-radius:4px; font-weight:bold; cursor:pointer; }

#canvas-container { flex-grow: 1; background: #000; position: relative; overflow: hidden; }

/* ============================================================
   Focus-Reveal: Startoverlay
   Während des Ladens: Logo auf dunklem Hintergrund.
   Beim Ausblenden: Blur-to-Focus + Fade → 3D-Raum schwimmt herein.
   ============================================================ */

.designer-boot-overlay {
    position: absolute;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    background: #0a0d12;
}

/* Reveal-Animation: sanftes Fade von dunkel auf transparent */
.designer-boot-overlay--hide {
    pointer-events: none;
    animation: dbo-focus-reveal 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes dbo-focus-reveal {
    from { background: rgba(10, 13, 18, 1.00); }
    to   { background: rgba(10, 13, 18, 0.00); }
}

/* Logo + Tagline (Q als Overlay in der Wortmarke) */
.dbo__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    /* Logo erscheint sofort, faded beim Reveal heraus */
    animation: dbo-content-out 0.45s ease-in forwards;
    animation-play-state: paused; /* startet erst wenn --hide gesetzt */
}
.designer-boot-overlay--hide .dbo__content {
    animation-play-state: running;
}
@keyframes dbo-content-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Logo + Claim: gleiche Spaltenbreite (max von Text- und Bildbreite), Logo skaliert auf volle Breite */
.dbo__brand-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: max-content;
    max-width: min(96vw, 640px);
    margin-top: 0;
}

.dbo__logo-wrap {
    position: relative;
    width: 100%;
    overflow: visible;
}

.dbo__logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0;
    animation: dbo-logo-in 0.7s ease-out 0.25s forwards;
}

/* Q-Lücke: Fallback (Kreis = U-Höhe, mittig in der Lücke) bis logic.js exakt misst */
.dbo__logo-q-overlay-wrap {
    position: absolute;
    left: 28%;
    top: 1.2%;
    width: 24.5%;
    height: 102%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 1;
}

.dbo__logo-q-spin {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: 50% 50%;
    animation: dbo-q-spin 2.8s linear infinite;
    animation-delay: 0.25s;
}

.dbo__logo-q-overlay {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Q.png hat schwarzen Hintergrund: auf dunklem Overlay nur Orange sichtbar machen */
    mix-blend-mode: lighten;
}
@keyframes dbo-logo-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.dbo__tagline {
    margin: 0.5rem 0 0;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: lowercase;
    color: #c5dce8;
    text-shadow:
        0 0 1px rgba(10, 13, 18, 0.9),
        0 1px 3px rgba(0, 0, 0, 0.55);
    opacity: 0;
    animation: dbo-logo-in 0.7s ease-out 0.55s forwards;
}

@keyframes dbo-q-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Touch (Tablet & Co.): Spaltenbreite = Claim, Logo skaliert darauf (nicht umgekehrt) */
@media (pointer: coarse) and (hover: none) {
    .dbo__brand-stack {
        display: inline-grid;
        grid-template-columns: minmax(0, max-content);
        justify-items: stretch;
        width: max-content;
        max-width: min(340px, max(220px, calc(100vw - 440px)));
        margin-top: 0;
    }
    .dbo__logo {
        width: 0;
        min-width: 100%;
    }
    .dbo__tagline {
        justify-self: center;
        max-width: min(340px, max(220px, calc(100vw - 440px)));
        white-space: nowrap;
    }
}

/* Barrierefreiheit: Bewegung reduzieren */
@media (prefers-reduced-motion: reduce) {
    .dbo__logo,
    .dbo__tagline,
    .dbo__logo-q-overlay-wrap { animation: none; opacity: 1; }
    .dbo__logo-q-spin { animation: none; }
    .dbo__content    { animation: none; }
    .designer-boot-overlay--hide {
        animation: none;
        background: rgba(10, 13, 18, 0);
    }
}

/* WebGL-Canvas: keine Browser-Pan/Zoom-Gesten, damit OrbitControls Pinch und Dreh erhält */
#canvas-container canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    touch-action: none;
}

.table-distance-overlay {
    position: absolute; inset: 0; z-index: 60; pointer-events: none;
}
.dimension-label {
    position: absolute;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(20, 20, 20, 0.85);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Rotationssymbol beim Hovern über Referententisch – klickbar für Drehung */
.lecturer-rotate-icon {
    position: absolute;
    z-index: 65;
    pointer-events: auto;
    cursor: ns-resize;
    width: 36px;
    height: 36px;
    color: var(--primary);
    background: rgba(20, 20, 20, 0.9);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
}
.lecturer-rotate-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* 3D-Hinweis unten rechts: feste Zeilen (HTML-<br>), rechtsbündig am unteren Rand */
#canvas-disclaimer {
    position: absolute;
    bottom: 10px;
    right: 15px;
    max-width: min(440px, calc(100% - 24px));
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    line-height: 1.45;
    pointer-events: none;
    z-index: 50;
    text-align: right;
}

@media (max-width: 1100px) {
    #canvas-disclaimer {
        max-width: min(360px, calc(100% - 24px));
        font-size: 0.65rem;
    }
}

/* Hinweiszeilen in der Sidebar (einheitlich zu Labels/Eingaben) */
#sidebar small {
    color: var(--text-muted);
    font-size: var(--sidebar-hint-size);
    font-weight: 400;
    line-height: 1.45;
    display: block;
    margin-top: 3px;
}

/* Tischposition: Zeile mit Info-Icon nebeneinander */
#sidebar small.tischposition-row {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    margin-top: 3px;
    margin-bottom: 0;
}

/* Schritt 2 Tischform: gleicher Abstand Label↔Select, Select↔Tischposition, Tischposition↔Trennlinie */
#step2-table-shape-panel .wizard-panel-card-head {
    margin-bottom: 12px;
}
#step2-table-shape-panel .wizard-panel-card-body {
    gap: 12px;
}
#step2-table-shape-panel small.tischposition-row {
    margin-top: 12px;
    margin-bottom: 0;
    width: 100%;
    justify-content: space-between;
}
#step2-table-shape-panel small.tischposition-row .info-icon {
    margin-left: auto;
    flex-shrink: 0;
}

/* Schritt 2 Personenzahl: Label↔Eingabe und Eingabe↔Hinweis „Tischgröße wird automatisch…“ je 12px */
#step2-capacity-panel .wizard-panel-card-head {
    margin-bottom: 12px;
}
#step2-capacity-panel #capacity-row-rect-boat > small,
#step2-capacity-panel #u-form-rows > small:last-child,
#step2-capacity-panel #parliamentary-rows > small {
    margin-top: 12px;
    margin-bottom: 0;
}

/* Optionaler Block-Hinweis (Abstand nur oben, Farbe wie small) */
.sidebar-hint-block {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: var(--sidebar-hint-size);
    line-height: 1.45;
    font-weight: 400;
}

#sidebar small.sidebar-hint-block {
    margin-top: 4px;
}

/* Schritt 3: nur Kopfzeile „Displaygröße“, Abstand Kopf↔Select 12px (wie Schritt 2/4) */
#step3-display-panel .wizard-panel-card-head {
    margin-bottom: 12px;
}
/* Altes Markup (Display + Displaygröße): Kopf ausblenden, Feld-Label als einzige Überschrift */
#step3-display-panel:has(.wizard-panel-card-body > .input-group > label[for="display-size"]) .wizard-panel-card-head {
    display: none;
    margin-bottom: 0;
}
#step3-display-panel:has(.wizard-panel-card-body > .input-group > label[for="display-size"]) .wizard-panel-card-body > .input-group > label[for="display-size"] {
    display: block;
    margin: 0 0 12px;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--text-muted);
}
#step3-display-panel #display-size-hint,
#step3-display-panel #display-viewing-distance-hint {
    margin-top: 12px;
    margin-bottom: 0;
}
/* Anzahl Displays: zwei Spalten, fester Abstand 20px (wie radio-row) */
#step3-display-panel .wizard-panel-card-body > :last-child {
    margin-bottom: 0;
}
/* Überschrift↔Radios wie Raum-System: Kopf 10px + Inhalt 12px */
#step3-display-panel #display-count-panel > label {
    margin: 0 0 10px;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
#step3-display-panel .display-count-grid {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    margin-top: 12px;
    margin-bottom: 0;
}
#step3-display-panel .display-count-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}
#step3-display-panel .display-count-grid.display-twin-visible .display-count-col {
    gap: 10px; /* Zeilenabstand wie #step6-room-system-panel .radio-row */
}
#step3-display-panel .display-count-grid .radio-label {
    margin-bottom: 0;
}
#step3-display-panel .display-count-grid input[type="radio"] {
    accent-color: var(--primary);
    cursor: pointer;
}
#step3-display-panel .display-twin-option {
    display: none;
}
#step3-display-panel .display-count-grid.display-twin-visible .display-twin-option {
    display: inline-flex;
}

/* Schritt 4 Mikrofonierung: Abstände wie andere Karten (Kopf↔Select, Select↔Toggle 12px) */
#step4-mic-panel .wizard-panel-card-head {
    margin-bottom: 12px;
}
#step4-mic-panel .wizard-panel-card-body > :last-child {
    margin-bottom: 0;
}
#step4-mic-panel #mic-hint:empty {
    display: none;
}
#step4-mic-panel #mic-hint:not(:empty) {
    margin-top: 12px;
    margin-bottom: 0;
}
#step4-mic-panel .wizard-panel-card-body > .input-group:has(> .input-group) > .input-group {
    margin-top: 0;
    margin-bottom: 0;
}
#step4-mic-panel #conference-mic-speech-row {
    margin-top: 12px;
}
#step4-mic-panel #conference-mic-speech-row > label {
    margin-bottom: 0;
}
#step4-mic-panel #conference-mic-speech-row .radio-row {
    margin-top: 12px;
}
#step4-mic-panel #lecturer-mic-row > label {
    margin-bottom: 0;
}
#step4-mic-panel #lecturer-mic-row .lecturer-mic-select-wrap {
    margin-top: 12px;
}
#step4-mic-panel #lecturer-mic-coverage-row {
    margin-top: 12px;
    margin-bottom: 0;
}

/* Referentenbereich: zunächst ausgeblendet (Steuerung in logic.js) */
#lecturer-zone-hint {
    display: none;
}

/* Button-Styles */
#view-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column; 
    gap: 8px;
    z-index: 100;
}
.view-btn {
    width: 55px;
    height: 40px;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.view-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateX(-2px); 
}
.view-btn:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 65px; 
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    border: 1px solid #444;
}

/* Steuerung für Plus/Minus */
.input-dim-wrapper { display: flex; align-items: center; gap: 8px; }
.ctrl-btn {
    display: flex; width: 36px; height: 36px; background: #333; color: white;
    border: 1px solid #555; border-radius: 6px; font-size: 1.2rem; font-weight: bold;
    cursor: pointer; align-items: center; justify-content: center; flex-shrink: 0; user-select: none;
}
.ctrl-btn:active { background: var(--primary); border-color: var(--primary); }
.ctrl-btn:disabled {
    opacity: 0.5; cursor: not-allowed; background: #2a2a2a; border-color: #444;
}
.ctrl-btn--compact {
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
    border-radius: 4px;
}
input[type="number"] { text-align: center; }

/* Schritt 6: Tischanschlussfeld — Toggle links, Anzahl rechtsbündig wie andere Sidebar-Zeilen */
.connection-box-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
}
.connection-box-toggle-row .connection-box-toggle {
    width: auto;
    flex-shrink: 0;
    padding: 6px 0;
}
.connection-box-count-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
}
.connection-box-count-inline .connection-box-count-input {
    width: 2em;
    min-width: 2em;
    height: 26px;
    padding: 2px 4px;
    font-size: 0.85rem;
    box-sizing: border-box;
}
.connection-box-u-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.connection-box-parliamentary-panel,
.connection-box-referent-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

/* Parlamentarisch: Reihen linksbündig, Tische pro Reihe rechtsbündig */
.parl-inline-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.parl-col { display: flex; flex-direction: column; gap: 5px; }
.parl-col-left { align-items: flex-start; }
.parl-col-right { align-items: flex-end; margin-left: auto; }
.parl-dim-small input[type="number"] { width: 2.5em; min-width: 2.5em; padding: 6px 4px; font-size: 0.9rem; }
/* Parlamentarisch: Durchgangsbreite — Label zweizeilig, Eingabe rechts mittig */
.parl-row-spacing-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}
.parl-row-spacing-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}
.parl-row-spacing-input {
    flex-shrink: 0;
    margin-left: auto;
}
/* Parlamentarisch: Tische Wandbündig (links/rechts) und Mittelgang */
.parl-mode-group { display: flex; flex-direction: column; gap: 10px; }
.parl-wandbuendig-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
}
.parl-radio-group { display: flex; align-items: center; gap: 16px; }
.parl-radio-group .radio-label { margin-bottom: 0; font-weight: normal; }
.parl-radio-group input[type="radio"] { accent-color: var(--primary); cursor: pointer; }
/* Schritt 3: Detailgrad (horizontal, links niedrig / rechts hoch) */
.display-detail-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
}
.display-detail-slider-row input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: var(--primary);
    cursor: pointer;
}
.display-detail-slider-end {
    flex-shrink: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}
/* Kleine Ein/Aus-Schalter (iOS-ähnlich): Schiene ca. 2× früherer Punkt-Durchmesser, kleinerer Knopf — keine Radios. */
.parl-toggle-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
    background: none;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: inherit;
    font-weight: 500;
    text-align: left;
    width: 100%;
}
.parl-toggle-option:hover { color: var(--primary); }
.parl-toggle-option:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}
.parl-toggle-dot {
    --parl-toggle-track-w: 34px;
    --parl-toggle-track-h: 18px;
    --parl-toggle-knob: 12px;
    --parl-toggle-inset: 2px;
    position: relative;
    box-sizing: border-box;
    width: var(--parl-toggle-track-w);
    height: var(--parl-toggle-track-h);
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid #555;
    background: #2e2e2e;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.parl-toggle-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: var(--parl-toggle-inset);
    width: var(--parl-toggle-knob);
    height: var(--parl-toggle-knob);
    border-radius: 50%;
    background: #f2f2f2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    transform: translateY(-50%);
    transition: transform 0.22s ease;
    pointer-events: none;
}
.parl-toggle-aisle .parl-toggle-dot { flex-shrink: 0; }
.parl-toggle-option[aria-pressed="true"] .parl-toggle-dot {
    background: var(--primary);
    border-color: rgba(0, 0, 0, 0.22);
}
.parl-toggle-option[aria-pressed="true"] .parl-toggle-dot::after {
    transform: translateY(-50%) translateX(calc(var(--parl-toggle-track-w) - var(--parl-toggle-inset) * 2 - var(--parl-toggle-knob)));
}
.parl-toggle-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .parl-toggle-dot,
    .parl-toggle-dot::after {
        transition: none;
    }
}
.parl-toggle-aisle-row {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    flex-wrap: nowrap; gap: 10px;
}
.parl-toggle-aisle-row > .parl-toggle-option {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
}
.parl-toggle-aisle-row .parl-toggle-option { align-items: center; padding: 6px 0; }
.parl-aisle-toggle-text {
    white-space: nowrap;
    min-width: 0;
}
.parl-mode-aisle-label { flex-shrink: 0; }
.parl-aisle-position-inline { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.parl-lecturer-radios { margin-left: auto; }
.parl-aisle-position-label { font-weight: 600; color: var(--text-muted); font-size: 0.85rem; margin-right: 4px; }
.parl-aisle-width-hint { font-size: 0.78rem; color: #666; font-weight: normal; margin-left: 4px; }
/* Sprechabstand Deckenmikrofon (Schritt 4): Hauptzeile + optionaler Hinweis bei großem Abstand */
.lecturer-ceiling-mic-beam-distance-wrap { margin-top: 6px; }
.lecturer-ceiling-mic-beam-distance-wrap > #lecturer-ceiling-mic-beam-distance { display: block; color: var(--text-muted); font-size: 0.85rem; }
.lecturer-ceiling-mic-beam-distance-warning {
    display: block;
    margin-top: 8px;
    color: var(--primary);
    font-size: 0.85rem;
    line-height: 1.35;
}
.parl-toggle-multiple-aisles {
    align-items: center; padding: 6px 0; margin-top: 4px;
}
.parl-toggle-multiple-aisles:hover,
.parl-toggle-multiple-aisles[aria-pressed="true"] { color: inherit; }

/* Zusatzoptionen: Schriftgröße eine Stufe kleiner */
.parl-mode-group,
#head-seats-row,
#lecturer-row,
#front-speaker-cone-row,
#ceiling-speaker-cone-row,
#ceiling-speaker-overlap-row,
#ceiling-mic-coverage-row,
#table-mic-coverage-row,
#lecturer-mic-coverage-row,
#lecturer-mic-row,
#parl-multiple-aisles-row {
    font-size: 0.875rem;
}

/* Referententisch / Rednerpult: Custom-Dropdown für Tooltip auf deaktivierten Mikrofon-Optionen */
.lecturer-mic-select-wrap {
    position: relative;
}
select#lecturer-mic-type.lecturer-mic-native-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.lecturer-mic-custom {
    width: 100%;
}
.lecturer-mic-custom-trigger {
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    color: white;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}
.lecturer-mic-custom-trigger:hover,
.lecturer-mic-custom-trigger:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(236, 70, 12, 0.2);
}
.lecturer-mic-custom-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 60;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.lecturer-mic-custom-list li {
    padding: 8px 12px;
    cursor: pointer;
}
.lecturer-mic-custom-list li:hover:not(.is-disabled) {
    background: rgba(255, 255, 255, 0.08);
}
.lecturer-mic-custom-list li.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Schritt 5: Kameratyp — Labelzeile; Hinweis-Icon (ID 1.0.1) direkt neben dem Wort „Kameratyp“ */
.camera-type-label-row {
    margin-bottom: 8px;
}
.camera-type-label-with-hint {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.camera-type-label-with-hint > label {
    margin-bottom: 0;
}
.camera-type-select-row {
    display: block;
}

/* Abgesetzte Sidebar-Bereiche (Schritt 4 Audio/Mikrofon, Schritt 5 PTZ — gleiche Kartenoptik) */
.wizard-panel-card,
.ptz-slot-card {
    background: linear-gradient(155deg, rgba(0, 224, 207, 0.06) 0%, var(--bg-panel) 40%, var(--bg-panel) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}
.wizard-panel-card {
    margin-bottom: 18px;
}
.wizard-panel-card-head,
.ptz-slot-head {
    margin-bottom: 10px;
}
.wizard-panel-card-label,
.ptz-slot-label {
    display: block;
    margin: 0;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--text-muted);
}
/* Abstand nur zwischen sichtbaren Blöcken; display:none zählt nicht (kein Leerraum unten in der Karte) */
.wizard-panel-card-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.wizard-panel-card-body > .input-group,
.wizard-panel-card-body > .wizard-panel-card-block {
    margin-bottom: 0;
}
/* Karte mit verschachtelten Zeilen (z. B. Audio/Mikro Schritt 4): Abstand per gap, kein Margin unten */
.wizard-panel-card-body > .input-group:has(> .input-group) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.wizard-panel-card-body > .input-group:has(> .input-group) > .input-group,
.wizard-panel-card-body > .input-group:has(> .input-group) > .warning-msg {
    margin-top: 0;
    margin-bottom: 0;
}
/* Unterabschnitt innerhalb einer Sidebar-Karte (z. B. Referentenplatz in Schritt 2) */
.wizard-panel-card > .wizard-panel-card-body > .wizard-panel-card-block {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
/* PTZ-Schritt: innere ptz-slot-card ohne doppelten Rahmen in wizard-panel-card */
.wizard-panel-card .ptz-slot-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}
.wizard-panel-card #ptz-camera-slot-row.ptz-slot-row {
    margin-bottom: 0;
}

/* Schritt 5: PTZ-Kameraauswahl — FOV-Farbe für aktiven Tab (wie CONFIG.PTZ_FOV_COLOR) */
.ptz-slot-row {
    margin-bottom: 18px;
}
/* FOV-Akzent (#00e0cf) — gleiche Basis wie PTZ_FOV_COLOR in config.js */
.ptz-segment {
    --ptz-fov-accent: #00e0cf;
    display: flex;
    width: 100%;
    padding: 0;
    gap: 0;
    border-radius: 0;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.ptz-segment-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 42px;
    padding: 6px 4px;
    margin: 0;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    transition: background 0.18s ease, color 0.18s ease;
}
.ptz-segment-btn + .ptz-segment-btn {
    box-shadow: -1px 0 0 var(--border-color);
}
.ptz-segment-btn__label {
    line-height: 1.2;
}
.ptz-fov-toggle-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ptz-segment-btn:hover:not(:disabled) {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}
.ptz-segment-btn[aria-selected="true"] {
    color: #e8fffc;
    background: rgba(0, 224, 207, 0.28);
    box-shadow: inset 0 -3px 0 var(--ptz-fov-accent);
}
.ptz-segment-btn:focus-visible {
    outline: 2px solid rgba(0, 224, 207, 0.75);
    outline-offset: 2px;
    z-index: 1;
}
.ptz-segment-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
/* Pan/Tilt und FOV-Toggle in derselben Karte wie die Kamera-Tabs */
.ptz-slot-card > .ptz-slot-card-block {
    margin-top: 14px;
    margin-bottom: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ptz-slot-card #ptz-fov-angle-row.input-group {
    margin-bottom: 0;
}

/* Schritt 5: PTZ-Slider — Wert in einer Zeile mit der Bezeichnung, rechts bündig (gleiche Breite wie der Slider darunter) */
.ptz-compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 6px;
}
.ptz-compact-row > label {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.ptz-compact-value {
    flex: 0 0 auto;
    text-align: right;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ptz-compact-row--spaced {
    margin-top: 10px;
}
