.caravan-sim-page {
    max-width: min(1440px, 100%);
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    scroll-padding-top: 5.5rem;
}

.caravan-sim-staging-banner {
    background: linear-gradient(90deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    color: #92400e;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.caravan-sim-breadcrumb {
    font-size: 0.85rem;
    color: #5c6b5e;
    margin-bottom: 1rem;
}

.caravan-sim-breadcrumb a {
    color: #032905;
    text-decoration: none;
}

.caravan-sim-hero {
    margin-bottom: 1.75rem;
}

.caravan-sim-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #6b8f71;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.caravan-sim-title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    color: #032905;
    margin: 0 0 0.35rem;
    font-weight: 800;
}

.caravan-sim-subtitle {
    font-size: 1.15rem;
    color: #2d4a32;
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.caravan-sim-lead {
    color: #4b5a4d;
    max-width: 42rem;
    margin: 0;
}

.caravan-sim-guide-promo {
    margin: 1.1rem 0 0;
    max-width: 42rem;
}

.caravan-sim-guide-promo__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: 2px solid #032905;
    color: #032905;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    background: #fff;
    transition: background 0.15s ease, color 0.15s ease;
}

.caravan-sim-guide-promo__link:hover,
.caravan-sim-guide-promo__link:focus-visible {
    background: #032905;
    color: #fff;
}

.caravan-sim-root {
    min-height: 420px;
}

.caravan-sim-panel {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(3, 41, 5, 0.08), 0 4px 14px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(107, 143, 113, 0.22);
    padding: 1.75rem;
}

.caravan-sim-start {
    text-align: center;
    padding: 2rem 1.5rem 2.5rem;
}

.caravan-sim-hero-svg {
    max-width: 640px;
    width: 100%;
    height: auto;
    margin: 0 auto 1rem;
    display: block;
}

.caravan-sim-screen-title {
    font-size: 1.5rem;
    color: #032905;
    margin: 0 0 0.5rem;
}

.caravan-sim-screen-desc {
    color: #5a685c;
    margin: 0 0 1.5rem;
}

.caravan-sim-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.caravan-sim-btn {
    border-radius: 999px;
    border: 2px solid transparent;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.caravan-sim-btn:hover {
    transform: translateY(-1px);
}

.caravan-sim-btn--primary {
    background: linear-gradient(135deg, #032905, #14532d);
    color: #fff;
    box-shadow: 0 8px 24px rgba(3, 41, 5, 0.25);
}

.caravan-sim-btn--ghost {
    background: #f4f6f4;
    color: #032905;
    border-color: rgba(3, 41, 5, 0.12);
}

.caravan-sim-btn--drive {
    width: 100%;
    margin-top: 0.75rem;
    background: #e8702a;
    color: #fff;
}

.caravan-sim-btn--drive:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.caravan-sim-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 960px) {
    .caravan-sim-layout {
        grid-template-columns: 1fr;
    }

    .caravan-sim-cockpit {
        order: -1;
    }
}

.caravan-sim-cockpit {
    position: sticky;
    top: 5.5rem;
    background: linear-gradient(160deg, #f8fbf8, #eef4ee);
    border-radius: 18px;
    border: 1px solid rgba(107, 143, 113, 0.35);
    padding: 1.1rem;
}

.caravan-sim-cockpit.is-warn {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.caravan-sim-cockpit.is-bad {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.caravan-sim-cockpit-title {
    font-size: 1rem;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #032905;
}

.caravan-sim-pill {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
}

.caravan-sim-pill.is-ok {
    background: #d1fae5;
    color: #065f46;
}

.caravan-sim-pill.is-warn {
    background: #fef3c7;
    color: #92400e;
}

.caravan-sim-pill.is-bad {
    background: #fee2e2;
    color: #991b1b;
}

.caravan-sim-metrics {
    margin: 0;
    display: grid;
    gap: 0.45rem;
}

.caravan-sim-metrics div {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    border-bottom: 1px dashed rgba(3, 41, 5, 0.08);
    padding-bottom: 0.2rem;
}

.caravan-sim-metrics dt {
    margin: 0;
    color: #5a685c;
    font-weight: 500;
}

.caravan-sim-metrics dd {
    margin: 0;
    font-weight: 700;
    color: #032905;
}

.is-bad-text {
    color: #b91c1c !important;
}

.caravan-sim-alert {
    font-size: 0.82rem;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    margin: 0 0 0.5rem;
}

.caravan-sim-alert--bad {
    background: #fee2e2;
    color: #991b1b;
}

.caravan-sim-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.caravan-sim-view-toggle {
    display: flex;
    background: #eef2ee;
    border-radius: 999px;
    padding: 3px;
}

.caravan-sim-view-toggle button {
    border: 0;
    background: transparent;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    color: #4b5a4d;
}

.caravan-sim-view-toggle button[aria-selected="true"] {
    background: #fff;
    color: #032905;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.caravan-sim-scenarios {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.caravan-sim-chip {
    border: 1px solid rgba(3, 41, 5, 0.12);
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    cursor: pointer;
}

.caravan-sim-chip.is-active {
    background: #032905;
    color: #fff;
    border-color: #032905;
}

.caravan-sim-stage {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(107, 143, 113, 0.3);
    background: #eef3ee;
    min-height: 320px;
}

.caravan-sim-svg {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    touch-action: none;
}

.caravan-sim-load-box {
    fill: rgba(255, 255, 255, 0.95);
    stroke: #6b8f71;
    stroke-width: 1.5;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.caravan-sim-rack-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin: 0.75rem 0;
    padding: 0.65rem;
    background: rgba(107, 143, 113, 0.1);
    border-radius: 12px;
    font-size: 0.9rem;
}

.caravan-sim-compare-banner {
    font-size: 0.88rem;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
}

.caravan-sim-catalog {
    margin-top: 1rem;
}

.caravan-sim-catalog-title {
    font-weight: 700;
    color: #032905;
    margin: 0 0 0.5rem;
}

.caravan-sim-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}

.caravan-sim-catalog-item {
    border: 1px solid rgba(3, 41, 5, 0.1);
    border-radius: 14px;
    background: #fff;
    padding: 0.65rem;
    text-align: left;
    cursor: grab;
    font-weight: 600;
    color: #032905;
    transition: border-color 0.15s, transform 0.15s;
}

.caravan-sim-catalog-item:hover {
    border-color: #6b8f71;
    transform: translateY(-2px);
}

.caravan-sim-catalog-item span {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    margin-top: 0.2rem;
}

.caravan-sim-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 700px) {
    .caravan-sim-grid2 {
        grid-template-columns: 1fr;
    }
}

.caravan-sim-card {
    background: #f8faf8;
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(3, 41, 5, 0.08);
}

.caravan-sim-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.caravan-sim-card label {
    display: block;
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
    color: #4b5a4d;
}

.caravan-sim-card input {
    display: block;
    width: 100%;
    margin-top: 0.2rem;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.4rem 0.5rem;
}

.caravan-sim-selection-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.65rem;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #6b8f71;
}

.caravan-sim-scenario-hint {
    font-size: 0.92rem;
    background: #ecfdf5;
    border-left: 4px solid #6b8f71;
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
}

.caravan-sim-drive-head h2 {
    margin: 0.35rem 0;
}

.caravan-sim-drive-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.caravan-sim-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.caravan-sim-canvas-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #dde5da;
    min-height: 280px;
}

.caravan-sim-canvas-wrap canvas {
    display: block;
    width: 100%;
}

.caravan-sim-drive-hint {
    margin-top: 0.75rem;
    font-size: 0.92rem;
}

.caravan-sim-drive-hint.is-ok {
    color: #065f46;
}

.caravan-sim-drive-hint.is-warn {
    color: #b45309;
}

.caravan-sim-legal {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #5c6b5e;
    max-width: 48rem;
}

.caravan-sim-legal-links a {
    color: #032905;
}

/* —— Dashboard UI (cs-*) —— */
.cs-accent {
    --cs-accent: #e8702a;
    --cs-green: #032905;
    --cs-ok: #059669;
    --cs-warn: #d97706;
    --cs-bad: #dc2626;
}

.cs-dashboard {
    display: grid;
    grid-template-columns: minmax(200px, 232px) minmax(0, 1fr) minmax(220px, 272px);
    grid-template-areas:
        'left center cockpit';
    gap: 1rem 1.15rem;
    align-items: start;
}

.cs-left { grid-area: left; }
.cs-center { grid-area: center; min-width: 0; }
.cs-cockpit { grid-area: cockpit; }

.cs-panel,
.cs-left,
.cs-cockpit,
.cs-center-head,
.cs-rack-panel,
.cs-catalog {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(3, 41, 5, 0.1);
    box-shadow: 0 16px 48px rgba(3, 41, 5, 0.06);
}

.cs-left,
.cs-cockpit {
    padding: 1rem 1.1rem 1.15rem;
    position: sticky;
    top: 1rem;
}

.cs-left h3,
.cs-cockpit h3 {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b8f71;
    font-weight: 700;
}

.cs-spec {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    font-size: 0.88rem;
}

.cs-spec li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cs-spec span { color: #5c6b5e; }
.cs-spec strong { color: #032905; font-weight: 700; }

.cs-collapse-btn {
    display: none;
    width: 100%;
    text-align: left;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(3, 41, 5, 0.12);
    background: #f8faf8;
    margin-bottom: 0.5rem;
    cursor: pointer;
    color: #032905;
}

.cs-collapse-body { display: block; }

.cs-center-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.cs-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cs-tabs button {
    border: 1px solid rgba(3, 41, 5, 0.12);
    background: #f4f7f4;
    color: #032905;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
}

.cs-tabs button.is-active {
    background: var(--cs-accent, #e8702a);
    border-color: #d65f1c;
    color: #fff;
}

.cs-scenario-select {
    font-size: 0.82rem;
    color: #4b5a4d;
    margin-left: auto;
}

.cs-scenario-select select {
    display: block;
    margin-top: 0.2rem;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.35rem 0.5rem;
    max-width: 14rem;
}

.cs-stage {
    background: #eef4ee;
    border-radius: 16px;
    border: 1px solid rgba(3, 41, 5, 0.12);
    padding: 0;
    overflow: hidden;
}

.cs-editor-svg {
    display: block;
    width: 100%;
    height: auto;
    touch-action: pan-x pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.cs-editor-svg .cs-hero-photo {
    pointer-events: none;
}

.cs-load-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-rack-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
}

.cs-rack-illus {
    flex: 0 0 120px;
}

.cs-rack-illus svg {
    width: 120px;
    height: auto;
    display: block;
}

.cs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cs-chip {
    border: 1px solid rgba(3, 41, 5, 0.14);
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    color: #032905;
}

.cs-chip.is-active {
    background: #032905;
    color: #fff;
    border-color: #032905;
}

.cs-catalog {
    padding: 1rem 1rem 1.15rem;
    margin-top: 0.25rem;
}

.cs-catalog-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    color: #032905;
}

.cs-catalog-sub {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #5c6b5e;
}

.cs-catalog {
    container-type: inline-size;
}

.cs-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 0.55rem;
}

/* Fahrradträger füllt den Rest der letzten Kachelreihe (9 Kacheln); Spaltenzahl folgt aus minmax(108px) + 0.55rem Gap. */
.cs-catalog-grid .cs-rack-panel {
    grid-column: 1 / -1;
    margin: 0;
    box-shadow: none;
    border-radius: 14px;
    background: #fafcfa;
    padding: 0.6rem 0.8rem;
}

@container (min-width: 809.6px) and (max-width: 926.3px) {
    .cs-catalog-grid .cs-rack-panel { grid-column: span 5 / -1; }
}

@container (min-width: 926.4px) and (max-width: 1043.1px) {
    .cs-catalog-grid .cs-rack-panel { grid-column: span 7 / -1; }
}

.cs-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.4rem 0.6rem;
    min-height: 7.5rem;
    -webkit-tap-highlight-color: transparent;
    border-radius: 14px;
    border: 1px solid rgba(3, 41, 5, 0.1);
    background: #fafcfa;
    cursor: grab;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cs-tile:hover {
    border-color: #e8702a;
    box-shadow: 0 6px 18px rgba(232, 112, 42, 0.15);
}

.cs-tile-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #032905;
    text-align: center;
    line-height: 1.2;
}

.cs-tile-weight {
    font-size: 0.72rem;
    color: #6b8f71;
    font-weight: 700;
}

.cs-item-photo {
    object-fit: contain;
    border-radius: 8px;
    max-height: 56px;
    width: auto;
    max-width: 100%;
}

.cs-rack-photo {
    display: block;
    max-width: 140px;
    max-height: 88px;
    object-fit: contain;
    border-radius: 10px;
    background: #f4f7f4;
}

.cs-cockpit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cs-cockpit-head h3 {
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    font-size: 1rem;
    color: #032905;
}

.cs-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #065f46;
}

.cs-cockpit.is-warn .cs-pill {
    background: #fffbeb;
    color: #b45309;
}

.cs-cockpit.is-bad .cs-pill {
    background: #fef2f2;
    color: #b91c1c;
}

.cs-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cs-metric {
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    background: #f8faf8;
    border: 1px solid rgba(3, 41, 5, 0.06);
}

.cs-metric.is-bad {
    border: 2px solid #dc2626;
    background: #fef2f2;
}

.cs-metric.is-bad strong,
.cs-metric.is-bad span {
    color: #b91c1c;
}

.cs-metric.is-warn {
    border-color: rgba(217, 119, 6, 0.5);
    background: #fffbeb;
}

.cs-mass-table {
    width: 100%;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.cs-mass-table caption {
    text-align: left;
    font-weight: 700;
    color: #032905;
    padding-bottom: 0.3rem;
}

.cs-mass-table th {
    text-align: left;
    font-weight: 400;
    color: #5c6b5e;
    padding: 0.2rem 0;
}

.cs-mass-table td {
    text-align: right;
    color: #032905;
    font-variant-numeric: tabular-nums;
    padding: 0.2rem 0;
}

.cs-mass-total th,
.cs-mass-total td {
    font-weight: 700;
    color: #032905;
    border-top: 1px solid rgba(3, 41, 5, 0.2);
    padding-top: 0.35rem;
}

.cs-mass-total.is-bad th,
.cs-mass-total.is-bad td,
.cs-load-total.is-bad th,
.cs-load-total.is-bad td {
    color: #b91c1c;
    background: #fef2f2;
}

.cs-mass-split th,
.cs-mass-split td {
    font-size: 0.75rem;
    color: #6b8f71;
}

.cs-spec-note,
.cs-field-hint {
    font-size: 0.75rem;
    color: #5c6b5e;
    margin: -0.5rem 0 1rem;
    line-height: 1.4;
}

.cs-field-hint {
    margin: 0 0 0.75rem;
}

.cs-metric span {
    display: block;
    font-size: 0.75rem;
    color: #5c6b5e;
}

.cs-metric strong {
    font-size: 1.15rem;
    color: #032905;
}

.cs-metric em {
    font-size: 0.72rem;
    color: #6b8f71;
    font-style: normal;
}

.cs-alert {
    font-size: 0.82rem;
    margin: 0 0 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
}

.cs-alert--bad {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #dc2626;
    font-weight: 600;
}

.cs-alert--warn {
    background: #fffbeb;
    color: #92400e;
}

.cs-btn {
    font-weight: 700;
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    cursor: pointer;
    border: none;
    font-size: 0.92rem;
}

.cs-btn--accent {
    background: #e8702a;
    color: #fff;
}

.cs-btn--accent:hover {
    background: #d65f1c;
}

.cs-btn--accent:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cs-btn--outline {
    background: #fff;
    border: 1px solid rgba(3, 41, 5, 0.2);
    color: #032905;
}

.cs-btn--ghost {
    background: transparent;
    border: 1px dashed #6b8f71;
    color: #032905;
}

.cs-btn--block {
    width: 100%;
}

.cs-selection-bar {
    padding: 0.65rem 0.85rem 0.75rem;
    margin: 0 0 0.75rem;
    background: #fff;
    border: 2px solid #e8702a;
    border-radius: 14px;
    font-size: 0.88rem;
}

.cs-rack-weight {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
}

.cs-rack-weight {
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.cs-rack-weight input {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.3rem 0.4rem;
    width: 4.5rem;
}

.cs-scenario-hint {
    font-size: 0.88rem;
    background: #ecfdf5;
    border-left: 4px solid #6b8f71;
    padding: 0.5rem 0.75rem;
    margin: 0 0 0.5rem;
    border-radius: 0 10px 10px 0;
}

.cs-load-list {
    padding: 0.75rem;
    overflow-x: auto;
}

.cs-load-list table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.cs-load-list th,
.cs-load-list td {
    padding: 0.4rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cs-load-group th,
.cs-load-group td {
    background: #eef4ee;
    color: #032905;
    font-weight: 700;
}

.cs-load-fixed td,
.cs-load-empty td {
    color: #5c6b5e;
}

.cs-load-total th,
.cs-load-total td {
    font-weight: 700;
    border-top: 2px solid rgba(3, 41, 5, 0.2);
}

.cs-h2 {
    margin: 0 0 0.5rem;
    color: #032905;
}

.cs-lead {
    color: #4b5a4d;
    max-width: 36rem;
    margin: 0 auto 1.25rem;
}

.cs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.cs-grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.cs-card {
    background: #f8faf8;
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(3, 41, 5, 0.08);
}

.cs-card label {
    display: block;
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
}

.cs-card input {
    display: block;
    width: 100%;
    margin-top: 0.2rem;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.4rem 0.5rem;
}

@media (max-width: 1024px) {
    .cs-dashboard {
        grid-template-columns: 1fr;
        grid-template-areas:
            'center'
            'cockpit'
            'left';
    }

    .cs-left,
    .cs-cockpit {
        position: static;
    }

    .cs-collapse-btn {
        display: block;
    }

    .cs-collapse-body:not(.open) {
        display: none;
    }

    .cs-scenario-select {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .cs-center-head {
        flex-direction: column;
        align-items: stretch;
    }

    .cs-tabs {
        justify-content: center;
    }
}
/* —— Bühne: Foto (SVG) + Gegenstände als HTML-Buttons —— */
.cs-stage-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

.cs-stage-canvas {
    position: relative;
}

.cs-stage.is-compact {
    --cs-marker: 54px;
}

/* Handy/Tablet: Ausschnitt mindestens 900 px breit, seitlich wischbar — Proportionen bleiben (SVG-viewBox). */
.cs-stage.is-compact .cs-stage-canvas {
    width: max(100%, 900px);
}

.cs-stage-canvas.is-drop-target {
    outline: 3px dashed #e8702a;
    outline-offset: -3px;
}

.cs-markers {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cs-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    width: var(--cs-marker, 46px);
    height: var(--cs-marker, 46px);
    min-width: 44px;
    min-height: 44px;
    padding: 2px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border-radius: 12px;
    border: 1.5px solid rgba(3, 41, 5, 0.25);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    cursor: grab;
    pointer-events: auto;
    touch-action: pan-x pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.cs-marker * {
    pointer-events: none;
}

.cs-marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76%;
    height: 60%;
}

.cs-marker-icon img,
.cs-marker-icon svg {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    border-radius: 4px;
}

.cs-marker-kg {
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: #e8702a;
    border-radius: 999px;
    padding: 2px 5px;
    white-space: nowrap;
}

.cs-stage.is-compact .cs-marker-kg {
    font-size: 11px;
}

/* Ausgewählt: auf Touch ziehbar (touch-action: none), sonst scrollt eine Wischgeste die Seite. */
.cs-marker.is-selected {
    z-index: 2;
    border: 3px solid #e8702a;
    box-shadow: 0 0 0 4px rgba(232, 112, 42, 0.3), 0 6px 16px rgba(0, 0, 0, 0.25);
    touch-action: none;
}

.cs-marker.is-dragging {
    z-index: 3;
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.08);
}

.cs-marker:focus-visible {
    outline: 3px solid #032905;
    outline-offset: 2px;
}

.cs-stage-hint {
    font-size: 0.82rem;
    color: #5c6b5e;
    margin: -0.25rem 0 0.75rem;
}

/* —— Wertezeile direkt unter dem Wohnwagen (Handy/Tablet) —— */
.cs-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0.6rem 0 0.75rem;
}

.cs-value {
    min-width: 0;
    padding: 0.5rem 0.6rem 0.55rem;
    border-radius: 14px;
    border: 2px solid #059669;
    background: #ecfdf5;
    color: #032905;
}

.cs-value.is-warn {
    border-color: #d97706;
    background: #fffbeb;
}

.cs-value.is-bad {
    border-color: #dc2626;
    background: #fef2f2;
}

.cs-value-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #2d4a32;
    white-space: nowrap;
}

.cs-value-num {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.cs-value-num small {
    font-size: 0.8rem;
    font-weight: 700;
}

.cs-value.is-warn .cs-value-num,
.cs-value.is-warn .cs-value-label {
    color: #92400e;
}

.cs-value.is-bad .cs-value-num,
.cs-value.is-bad .cs-value-label {
    color: #b91c1c;
}

.cs-value-limit {
    display: block;
    font-size: 0.72rem;
    color: #5c6b5e;
    white-space: nowrap;
}

.cs-value-bar {
    display: block;
    height: 6px;
    margin-top: 0.35rem;
    border-radius: 3px;
    background: rgba(3, 41, 5, 0.12);
    overflow: hidden;
}

.cs-value-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #059669;
}

.cs-value.is-warn .cs-value-bar i { background: #d97706; }
.cs-value.is-bad .cs-value-bar i { background: #dc2626; }

.cs-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 380px) {
    .cs-l-long { display: none; }

    .cs-value {
        padding: 0.45rem 0.45rem 0.5rem;
    }

    .cs-value-num {
        font-size: 1.05rem;
    }

    .cs-value-limit {
        font-size: 0.68rem;
    }
}

@media (min-width: 1025px) {
    .cs-values {
        display: none;
    }
}

/* —— Auswahl: Gewicht und Position —— */
.cs-sel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.6rem;
    color: #032905;
}

.cs-sel-head span {
    font-size: 0.78rem;
    color: #6b8f71;
    font-weight: 600;
}

.cs-sel-hint {
    margin: 0.2rem 0 0.55rem;
    font-size: 0.82rem;
    color: #5c6b5e;
}

.cs-sel-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.cs-sel-controls .cs-btn {
    min-height: 44px;
}

.cs-stepper {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.cs-step {
    width: 44px;
    height: 44px;
    border: 0;
    background: #f4f7f4;
    color: #032905;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.cs-step:active {
    background: #e2ebe2;
}

.cs-step-field {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0 0.4rem;
    font-weight: 700;
    color: #032905;
}

.cs-step-field input {
    width: 3.6rem;
    border: 0;
    padding: 0.4rem 0;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #032905;
    background: transparent;
}

/* —— Kopfbereich —— */
.cs-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* —— Kataloge: größere Grafiken, Touch-Ziehen —— */
.cs-tile {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.cs-tile .cs-item-photo {
    max-height: 64px;
}

.cs-tile.is-lifted {
    border-color: #e8702a;
    box-shadow: 0 0 0 3px rgba(232, 112, 42, 0.3);
}

.cs-drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2001;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 3px solid #e8702a;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0.92;
}

.cs-drag-ghost img,
.cs-drag-ghost svg {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* —— Mitlaufende Statusleiste (nur Handy/Tablet, wenn Wertezeile nicht im Blick) —— */
.cs-statusbar {
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    max-width: 640px;
    margin: 0 auto;
    padding: 0.4rem;
    border: 0;
    border-radius: 16px;
    background: rgba(3, 41, 5, 0.94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.cs-statusbar.is-visible {
    display: grid;
}

.cs-status-item {
    min-width: 0;
    padding: 0.3rem 0.5rem;
    border-radius: 10px;
    background: #065f46;
    color: #fff;
}

.cs-status-item.is-warn { background: #b45309; }
.cs-status-item.is-bad { background: #dc2626; }

.cs-status-item span {
    display: block;
    font-size: 0.7rem;
    opacity: 0.92;
}

.cs-status-item strong {
    display: block;
    font-size: 1rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

html.cs-modal-open .cs-statusbar {
    display: none;
}

@media (min-width: 1025px) {
    .cs-statusbar.is-visible {
        display: none;
    }
}

/* —— Fahrzeugdaten als Panel —— */
html.cs-modal-open {
    overflow: hidden;
}

.cs-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(3, 20, 5, 0.55);
}

.cs-modal-panel {
    width: min(760px, 100%);
    margin: auto 0;
    padding: 1.1rem 1.1rem 1.25rem;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    color: #032905;
}

.cs-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cs-modal-head .cs-h2 {
    margin: 0;
    font-size: 1.25rem;
    outline: none;
}

.cs-modal-close {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(3, 41, 5, 0.15);
    background: #f4f7f4;
    color: #032905;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.cs-modal .cs-card label {
    color: #2d4a32;
    font-weight: 600;
}

.cs-modal .cs-card input {
    min-height: 44px;
    font-size: 16px;
    color: #032905;
    background: #fff;
}

.cs-modal-actions {
    justify-content: flex-end;
}

.cs-modal-actions .cs-btn {
    min-height: 44px;
}

@media (max-width: 600px) {
    .cs-modal {
        padding: 0;
    }

    .cs-modal-panel {
        min-height: 100%;
        margin: 0;
        border-radius: 0;
        padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    }

    .cs-modal-actions .cs-btn {
        flex: 1 1 0;
    }
}

/* —— Touch-Größen im einspaltigen Layout —— */
@media (max-width: 1024px) {
    .cs-dashboard.is-compact {
        padding-bottom: 5rem;
    }

    .cs-tabs button,
    .cs-head-actions .cs-btn,
    .cs-chip,
    .cs-collapse-btn {
        min-height: 44px;
    }

    .cs-head-actions {
        width: 100%;
    }

    .cs-head-actions .cs-btn {
        flex: 1 1 0;
    }

    .cs-scenario-select select {
        width: 100%;
        max-width: none;
        min-height: 44px;
        font-size: 16px;
    }

    .cs-rack-weight input,
    .cs-load-list input {
        min-height: 44px;
        font-size: 16px;
    }

    .cs-load-list button {
        min-width: 44px;
        min-height: 44px;
    }
}
