/* Wasserinsel: Vollbild-Landschaft und bedarfsweise Erkundungskarten.
   Gestaltung nach den geteilten LmB-Tokens aus css/lmb-app.css. */
:root {
    color-scheme:dark;
    --lmb-bg-dark:#0A0F1A;
    --lmb-bg-surface:#141B2D;
    --lmb-bg-surface-hover:#1A2338;
    --lmb-primary:#6366F1;
    --lmb-primary-hover:#4F46E5;
    --lmb-secondary:#10B981;
    --lmb-accent:#8B5CF6;
    --lmb-text-main:#F8FAFC;
    --lmb-text-muted:#94A3B8;
    --lmb-grad-primary:linear-gradient(135deg,#6366F1,#8B5CF6);
    --lmb-radius-md:12px;
    --lmb-radius-lg:24px;
    --lmb-radius-full:100px;
    --lmb-shadow-glow:0 0 20px rgba(99,102,241,.2);
    --lmb-trans-fast:.2s ease;
    --lmb-trans-smooth:.4s cubic-bezier(.16,1,.3,1);
    --panel:rgba(20,27,45,.86);
    --line:rgba(248,250,252,.1);
    --line-strong:rgba(248,250,252,.16);
    font-family:Outfit,system-ui,sans-serif;
    color:var(--lmb-text-main);
    background:var(--lmb-bg-dark);
}

* {
    box-sizing:border-box;
}

body {
    margin:0;
}

button,a,input,select,summary {
    -webkit-tap-highlight-color:transparent;
}

button,select {
    font:inherit;
}

button {
    color:inherit;
    cursor:pointer;
    border:0;
    background:transparent;
    transition:background var(--lmb-trans-fast),box-shadow var(--lmb-trans-fast),color var(--lmb-trans-fast);
}

button:disabled {
    opacity:.55;
    cursor:default;
}

button,a,summary,select {
    touch-action:manipulation;
}

button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible,canvas:focus-visible {
    outline:3px solid #A5B4FC;
    outline-offset:3px;
}

button:hover:not(:disabled) {
    background-color:rgba(99,102,241,.16);
}

[hidden] {
    display:none!important;
}

p {
    line-height:1.55;
}

a {
    color:inherit;
}

h1,h2,p {
    margin-top:0;
}

.skip-link {
    position:absolute;
    top:-100px;
    left:16px;
    z-index:2000;
    background:var(--lmb-bg-surface);
    border:1px solid var(--line-strong);
    padding:12px 16px;
    border-radius:var(--lmb-radius-md);
}

.skip-link:focus {
    top:12px;
}

/* Weiche Abdunklung oben und unten: Beschriftungen bleiben über jedem Himmel lesbar. */
.island-stage::before,.island-stage::after {
    content:'';
    position:absolute;
    left:0;
    right:0;
    z-index:1;
    pointer-events:none;
}

.island-stage::before {
    top:0;
    height:160px;
    background:linear-gradient(180deg,rgba(10,15,26,.58),rgba(10,15,26,.18) 55%,rgba(10,15,26,0));
}

.island-stage::after {
    bottom:0;
    height:130px;
    background:linear-gradient(0deg,rgba(10,15,26,.45),rgba(10,15,26,0));
}

.island-stage {
    position:relative;
    height:100dvh;
    min-height:400px;
    overflow:hidden;
    isolation:isolate;
    background:#13344a;
}

#island-canvas {
    display:block;
    width:100%;
    height:100%;
    touch-action:none;
    cursor:grab;
}

#island-canvas:active {
    cursor:grabbing;
}

.glass {
    background:var(--panel);
    border:1px solid var(--line);
    box-shadow:0 16px 48px rgba(5,10,20,.42);
    backdrop-filter:blur(18px) saturate(140%);
    -webkit-backdrop-filter:blur(18px) saturate(140%);
}

/* ---------- Kopfleiste ---------- */
.topbar {
    position:absolute;
    z-index:4;
    inset:24px 28px auto;
    display:flex;
    gap:13px;
    align-items:center;
    pointer-events:none;
}

.topbar>* {
    pointer-events:auto;
}

.brand {
    display:flex;
    align-items:center;
    justify-content:center;
    width:46px;
    height:46px;
    border:1px solid var(--line-strong);
    border-radius:50%;
    background:rgba(10,15,26,.6);
}

.brand img {
    object-fit:contain;
}

.title {
    filter:drop-shadow(0 2px 10px rgba(5,10,20,.75));
}

.eyebrow {
    font-size:10px;
    font-weight:600;
    letter-spacing:.14em;
    color:#A5B4FC;
}

h1 {
    margin:3px 0 0;
    font-size:25px;
    font-weight:700;
    letter-spacing:-.03em;
}

.top-actions {
    display:flex;
    align-items:center;
    gap:8px;
    margin-left:auto;
}

.top-actions button {
    min-height:44px;
    border-radius:var(--lmb-radius-full);
}

#btn-samples {
    padding:0 16px;
    font-size:13px;
    font-weight:600;
}

#sample-count {
    display:inline-flex;
    min-width:21px;
    height:21px;
    align-items:center;
    justify-content:center;
    margin-left:7px;
    border-radius:50%;
    background:rgba(99,102,241,.3);
    color:#E0E7FF;
    font-size:11px;
    font-weight:700;
}

.icon-btn {
    display:inline-flex;
    width:44px;
    height:44px;
    flex:none;
    align-items:center;
    justify-content:center;
    font-size:22px;
    line-height:1;
    border-radius:var(--lmb-radius-md);
}

/* ---------- Bühnentexte ---------- */
.world-caption {
    position:absolute;
    top:99px;
    left:88px;
    display:flex;
    gap:9px;
    align-items:center;
    font-size:12px;
    font-weight:500;
    letter-spacing:.015em;
    color:#E2E8F0;
    text-shadow:0 1px 8px rgba(5,10,20,.9);
}

.status-dot {
    width:6px;
    height:6px;
    border-radius:50%;
    background:var(--lmb-secondary);
    box-shadow:0 0 10px rgba(16,185,129,.8);
}

[data-paused="true"] .status-dot {
    background:var(--lmb-text-muted);
    box-shadow:none;
}

.intro {
    position:absolute;
    top:155px;
    left:32px;
    font-weight:700;
    font-size:26px;
    letter-spacing:-.025em;
    pointer-events:none;
    transition:opacity 1s;
    text-shadow:0 2px 14px rgba(5,10,20,.8);
}

.intro span {
    display:block;
    margin-top:8px;
    font-size:13px;
    font-weight:400;
    color:#E2E8F0;
    letter-spacing:0;
    text-shadow:0 1px 10px rgba(10,15,26,.95);
}

.intro.dismissed {
    opacity:0;
}

.scene-signature {
    position:absolute;
    bottom:32px;
    right:30px;
    font-size:9px;
    font-weight:600;
    letter-spacing:.16em;
    color:rgba(203,213,225,.55);
    pointer-events:none;
}

/* ---------- Werkzeuge ---------- */
.tool-area {
    position:absolute;
    z-index:5;
    bottom:max(25px,env(safe-area-inset-bottom));
    left:50%;
    transform:translateX(-50%);
    text-align:center;
}

#tool-hint {
    font-size:12px;
    color:#CBD5E1;
    margin:0 0 12px;
    text-shadow:0 1px 8px rgba(5,10,20,.9);
}

.toolbox {
    display:flex;
    align-items:center;
    padding:6px;
    border-radius:var(--lmb-radius-lg);
    gap:4px;
}

.toolbox button {
    min-width:79px;
    min-height:66px;
    border-radius:var(--lmb-radius-md);
    display:flex;
    flex-direction:column;
    gap:5px;
    align-items:center;
    justify-content:center;
    font-size:11px;
    font-weight:500;
    color:#CBD5E1;
}

.toolbox button.active {
    color:#fff;
    background:rgba(99,102,241,.28);
    box-shadow:inset 0 0 0 1px rgba(99,102,241,.6),var(--lmb-shadow-glow);
}

.toolbox button.armed {
    color:#fff;
    background:rgba(139,92,246,.3);
    box-shadow:inset 0 0 0 1px rgba(139,92,246,.65);
}

.tool-icon {
    width:27px;
    height:29px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.5;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.tool-divider {
    height:29px;
    width:1px;
    background:var(--line-strong);
    margin:0 4px;
}

.camera-controls {
    position:absolute;
    bottom:28px;
    left:28px;
    display:flex;
    border-radius:var(--lmb-radius-md);
    z-index:4;
}

.camera-controls .icon-btn {
    font-size:21px;
}

.toast {
    position:absolute;
    z-index:7;
    left:50%;
    top:110px;
    transform:translateX(-50%);
    width:max-content;
    max-width:min(480px,calc(100% - 30px));
    padding:11px 18px;
    background:rgba(20,27,45,.94);
    border:1px solid rgba(99,102,241,.4);
    border-radius:var(--lmb-radius-md);
    box-shadow:var(--lmb-shadow-glow);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    text-align:center;
    font-size:13px;
    pointer-events:none;
    opacity:0;
    transition:opacity .25s;
}

.toast.visible {
    opacity:1;
}

/* ---------- Orte ---------- */
.marker {
    position:absolute;
    z-index:2;
    width:44px;
    height:44px;
    transform:translate(-50%,-50%);
    border-radius:50%;
    padding:0;
    display:grid;
    place-items:center;
    background:transparent;
}

.marker:hover {
    background:transparent;
}

.marker::before {
    content:'';
    width:11px;
    height:11px;
    background:#E0E7FF;
    border:2px solid #fff;
    border-radius:50%;
    box-shadow:0 1px 9px rgba(5,10,20,.6),0 0 0 5px rgba(99,102,241,.28);
    transition:transform var(--lmb-trans-fast),box-shadow var(--lmb-trans-fast);
}

.marker:hover::before,.marker:focus-visible::before,.marker.selected::before {
    transform:scale(1.35);
    background:#fff;
    box-shadow:0 1px 9px rgba(5,10,20,.6),0 0 0 7px rgba(99,102,241,.4),var(--lmb-shadow-glow);
}

.marker-name {
    position:absolute;
    left:50%;
    bottom:42px;
    transform:translateX(-50%);
    background:rgba(20,27,45,.96);
    color:var(--lmb-text-main);
    font-size:12px;
    font-weight:500;
    white-space:nowrap;
    padding:6px 11px;
    border:1px solid var(--line-strong);
    border-radius:var(--lmb-radius-md);
    opacity:0;
    pointer-events:none;
}

.marker:hover,.marker:focus-visible {
    z-index:3;
}

.marker:hover .marker-name,.marker:focus-visible .marker-name {
    opacity:1;
}

/* ---------- Erkundungskarte ---------- */
.inspector {
    position:absolute;
    z-index:6;
    right:26px;
    top:142px;
    width:338px;
    max-height:calc(100dvh - 275px);
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    padding:20px;
    border-radius:var(--lmb-radius-lg);
}

.card-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin:-8px -9px 0 0;
    gap:8px;
}

.card-heading .eyebrow {
    font-size:9px;
}

.inspector h2 {
    font-size:25px;
    font-weight:700;
    letter-spacing:-.03em;
    margin:2px 0 10px;
}

.inspector p {
    font-size:13px;
    color:#CBD5E1;
    margin-bottom:16px;
}

.primary,.secondary {
    min-height:44px;
    border-radius:var(--lmb-radius-md);
    padding:10px 14px;
    width:100%;
    font-size:12.5px;
    text-align:center;
    line-height:1.4;
}

.primary {
    background:var(--lmb-grad-primary);
    color:#fff;
    font-weight:600;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    box-shadow:var(--lmb-shadow-glow);
}

.primary:hover:not(:disabled) {
    background:linear-gradient(135deg,#4F46E5,#7C3AED);
    box-shadow:0 8px 25px rgba(99,102,241,.4);
}

.secondary {
    border:1px solid var(--line-strong);
    background:rgba(26,35,56,.7);
    color:var(--lmb-text-main);
    font-weight:500;
}

.secondary:hover:not(:disabled) {
    background:rgba(99,102,241,.2);
    border-color:rgba(99,102,241,.5);
}

.text-btn {
    min-height:44px;
    font-size:12px;
    color:#A5B4FC;
    text-decoration:underline;
    text-underline-offset:4px;
}

.sample-kind {
    font-size:10px!important;
    font-weight:600;
    letter-spacing:.07em;
    text-transform:uppercase;
    margin:16px 0 11px!important;
    color:var(--lmb-text-muted)!important;
}

.metrics {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:11px 12px;
}

.metrics>div {
    border-left:2px solid rgba(99,102,241,.5);
    padding-left:10px;
    min-width:0;
}

.metrics>div:nth-child(2) {
    border-left-color:rgba(139,92,246,.55);
}

.metrics>div:nth-child(3) {
    border-left-color:rgba(16,185,129,.5);
}

.metrics>div:nth-child(4) {
    border-left-color:rgba(148,163,184,.45);
}

.metrics span,.metrics small {
    display:block;
    font-size:10px;
    color:var(--lmb-text-muted);
}

.metrics strong {
    font-size:22px;
    letter-spacing:-.04em;
    font-weight:700;
    display:block;
    margin:5px 0 3px;
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
}

/* Härteskala nach dem Dossier; erscheint erst nach einer Messung. */
.hardness {
    margin:17px 0 0;
}

.hardness-bar {
    position:relative;
    height:9px;
    border-radius:var(--lmb-radius-full);
    background:linear-gradient(90deg,#1E293B,#334155 45%,#475569);
    border:1px solid var(--line);
}

.hardness-target {
    position:absolute;
    top:-1px;
    bottom:-1px;
    left:25%;
    width:12.5%;
    border-radius:var(--lmb-radius-full);
    background:rgba(16,185,129,.55);
    box-shadow:0 0 12px rgba(16,185,129,.45);
}

.hardness-pin {
    position:absolute;
    top:-5px;
    width:4px;
    height:19px;
    margin-left:-2px;
    border-radius:var(--lmb-radius-full);
    background:#fff;
    box-shadow:0 0 0 2px rgba(10,15,26,.75);
    transition:left var(--lmb-trans-smooth);
}

.hardness-legend {
    display:flex;
    justify-content:space-between;
    gap:8px;
    margin-top:7px;
    font-size:9.5px;
    color:var(--lmb-text-muted);
}

.hardness-legend em {
    font-style:normal;
    color:#6EE7B7;
}

#hardness-class {
    font-size:11.5px!important;
    margin:9px 0 0!important;
    color:#CBD5E1!important;
}

.sample-note {
    font-size:11.5px!important;
    margin:15px 0!important;
}

details {
    margin-top:13px;
    border-top:1px solid var(--line);
    padding-top:6px;
}

summary {
    font-size:12px;
    font-weight:500;
    cursor:pointer;
    padding:10px 0;
    min-height:40px;
    color:#E2E8F0;
}

details p {
    font-size:12px!important;
    line-height:1.65;
    margin:5px 0 10px!important;
}

.lab-heading {
    display:flex;
    justify-content:space-between;
    gap:8px;
    font-size:10px;
    font-weight:600;
    letter-spacing:.08em;
    text-transform:uppercase;
    margin:18px 0 5px;
    color:var(--lmb-text-muted);
}

.lab-heading span:last-child {
    color:#A5B4FC;
    letter-spacing:.02em;
    text-transform:none;
    font-size:11px;
}

.wetting {
    width:100%;
    height:66px;
}

.wetting path {
    transition:d 1.5s;
}

#surface-note {
    font-size:12px;
}

#local-lab {
    margin-top:14px;
    display:grid;
    gap:9px;
}

#plant-lab {
    border-top:1px solid var(--line);
    margin-top:18px;
    padding-top:16px;
}

#plant-lab label {
    display:block;
    font-size:10px;
    font-weight:600;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:var(--lmb-text-muted);
    margin-bottom:8px;
}

select {
    background:var(--lmb-bg-surface-hover);
    color:var(--lmb-text-main);
    border:1px solid var(--line-strong);
    border-radius:var(--lmb-radius-md);
    width:100%;
    min-height:44px;
    padding:8px 11px;
}

/* Vier Aufbereitungsstufen und der fertige Ansatz. */
.steps {
    list-style:none;
    margin:15px 0;
    padding:0;
    display:grid;
    gap:3px;
}

.steps li {
    display:flex;
    align-items:center;
    gap:9px;
    font-size:11.5px;
    color:var(--lmb-text-muted);
    padding:4px 0;
}

.steps li::before {
    content:'';
    flex:none;
    width:9px;
    height:9px;
    border-radius:50%;
    border:1.5px solid rgba(148,163,184,.5);
}

.steps li[data-state="done"] {
    color:#CBD5E1;
}

.steps li[data-state="done"]::before {
    background:var(--lmb-secondary);
    border-color:var(--lmb-secondary);
}

.steps li[data-state="current"] {
    color:#fff;
    font-weight:600;
}

.steps li[data-state="current"]::before {
    background:var(--lmb-grad-primary);
    border-color:#A5B4FC;
    box-shadow:var(--lmb-shadow-glow);
}

#plant-stage {
    font-size:12px;
    margin:12px 0;
}

/* ---------- Dialoge ---------- */
.island-dialog {
    color:var(--lmb-text-main);
    background:var(--lmb-bg-surface);
    border:1px solid var(--line-strong);
    border-radius:var(--lmb-radius-lg);
    width:min(540px,calc(100% - 28px));
    max-height:85dvh;
    overscroll-behavior:contain;
    padding:24px;
    box-shadow:0 24px 90px rgba(0,0,0,.6);
}

.island-dialog::backdrop {
    background:rgba(10,15,26,.68);
    backdrop-filter:blur(7px);
}

.dialog-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:14px;
}

.dialog-heading h2 {
    font-size:23px;
    font-weight:700;
    letter-spacing:-.025em;
    margin:0;
}

.island-dialog p {
    font-size:13px;
    color:#CBD5E1;
}

.model-note {
    font-size:11px!important;
    color:var(--lmb-text-muted)!important;
    border-left:2px solid rgba(139,92,246,.45);
    padding-left:11px;
}

.location-list {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin:20px 0;
}

.location-list button {
    padding:10px 13px;
    min-height:44px;
    border:1px solid var(--line-strong);
    border-radius:var(--lmb-radius-md);
    background:rgba(26,35,56,.6);
    text-align:left;
    font-size:12px;
    font-weight:500;
}

.location-list button:hover {
    background:rgba(99,102,241,.2);
    border-color:rgba(99,102,241,.5);
}

.menu-links {
    display:flex;
    gap:18px;
    flex-wrap:wrap;
    margin-top:20px;
    font-size:12px;
}

.menu-links a {
    color:var(--lmb-text-muted);
    text-decoration:none;
    min-height:44px;
    display:inline-flex;
    align-items:center;
}

.menu-links a:hover {
    color:var(--lmb-text-main);
    text-decoration:underline;
}

.island-dialog>.secondary {
    margin-top:16px;
}

.sample-table-wrap {
    overflow-x:auto;
}

table {
    border-collapse:collapse;
    width:100%;
    margin:20px 0;
    font-size:12px;
}

th,td {
    text-align:left;
    border-bottom:1px solid var(--line);
    padding:11px 8px;
    vertical-align:top;
}

th {
    font-weight:600;
    color:#A5B4FC;
}

td {
    font-variant-numeric:tabular-nums;
}

td small,.sample-table-wrap th small {
    display:block;
    margin-top:5px;
    color:var(--lmb-text-muted);
    font-size:10px;
    font-weight:400;
}

caption {
    font-size:11px;
    color:var(--lmb-text-muted);
    text-align:left;
    padding:8px;
}

.samples-dialog {
    width:min(700px,calc(100% - 28px));
}

.fallback {
    position:absolute;
    top:40%;
    left:10%;
    right:10%;
    border-radius:var(--lmb-radius-lg);
    padding:20px;
    z-index:3;
}

.lmb-footer {
    margin:0;
    background:var(--lmb-bg-surface);
}

.license-load-notice {
    position:fixed;
    left:10px;
    right:10px;
    bottom:10px;
    padding:12px;
    background:var(--lmb-bg-surface-hover);
    border:1px solid var(--line-strong);
    z-index:99999;
    border-radius:var(--lmb-radius-md);
}

/* ---------- Grössen ---------- */
@media(min-width:1500px) {
    .intro {
        left:48px;
        top:178px;
    }
    .inspector {
        right:36px;
        top:150px;
    }
    .topbar {
        left:40px;
        right:40px;
    }
    .world-caption {
        left:100px;
    }
}

@media(max-width:950px) {
    .scene-signature {
        display:none;
    }
    .camera-controls {
        bottom:125px;
        left:18px;
        flex-direction:column;
    }
    .inspector {
        right:18px;
        width:306px;
    }
    .intro {
        font-size:22px;
        top:143px;
    }
    .world-caption {
        left:30px;
        top:100px;
    }
    .topbar {
        inset:20px 20px auto;
    }
    .title .eyebrow {
        font-size:8px;
    }
}

@media(max-width:600px) {
    .topbar {
        inset:max(14px,env(safe-area-inset-top)) 14px auto;
        gap:9px;
    }
    .brand {
        width:38px;
        height:38px;
    }
    .brand img {
        width:29px;
        height:29px;
    }
    .title .eyebrow {
        font-size:7px;
        letter-spacing:.08em;
    }
    h1 {
        font-size:21px;
    }
    .top-actions {
        gap:5px;
    }
    .top-actions .icon-btn {
        width:40px;
        height:44px;
        font-size:19px;
    }
    #btn-samples {
        font-size:11px;
        padding:0 9px;
    }
    #sample-count {
        min-width:18px;
        height:18px;
        margin-left:3px;
    }
    .world-caption {
        top:81px;
        left:18px;
        font-size:11px;
    }
    .intro {
        top:115px;
        left:18px;
        font-size:20px;
    }
    .intro span {
        font-size:11px;
        max-width:230px;
    }
    .toast {
        top:76px;
        font-size:11px;
        padding:9px 12px;
    }
    .tool-area {
        bottom:max(15px,env(safe-area-inset-bottom));
        width:max-content;
        max-width:calc(100% - 20px);
    }
    .toolbox {
        border-radius:19px;
        gap:0;
        padding:4px;
    }
    .toolbox button {
        min-width:67px;
        min-height:62px;
        font-size:10px;
    }
    .tool-divider {
        margin:0 2px;
    }
    .tool-icon {
        width:25px;
        height:26px;
    }
    #tool-hint {
        font-size:10px;
        margin-bottom:9px;
    }
    .camera-controls {
        left:12px;
        bottom:115px;
    }
    .camera-controls .icon-btn {
        width:40px;
        height:44px;
    }
    .inspector {
        top:auto;
        bottom:119px;
        left:63px;
        right:12px;
        width:auto;
        max-height:43dvh;
        padding:15px;
        border-radius:18px;
    }
    .inspector h2 {
        font-size:22px;
    }
    .inspector p {
        font-size:12px;
    }
    .inspector .card-heading {
        margin-top:-5px;
    }
    .metrics strong {
        font-size:20px;
    }
    .hardness {
        margin-top:14px;
    }
    .marker-name {
        font-size:10px;
    }
    .island-dialog {
        padding:20px;
    }
}

@media(max-width:600px) and (max-height:650px) {
    .inspector {
        max-height:32dvh;
        bottom:112px;
        padding:12px;
    }
    .inspector h2 {
        font-size:20px;
    }
    .inspector p {
        font-size:11px;
        margin-bottom:10px;
    }
}

@media(max-width:360px) {
    .brand {
        display:none;
    }
    .topbar {
        gap:3px;
    }
    .title .eyebrow {
        font-size:6px;
    }
    h1 {
        font-size:20px;
    }
    .toolbox button {
        min-width:65px;
    }
    .metrics {
        gap:7px 8px;
    }
    .metrics strong {
        font-size:18px;
    }
    .metrics>div {
        padding-left:7px;
    }
    .inspector {
        left:58px;
    }
    .dialog-heading h2 {
        font-size:20px;
    }
    .location-list {
        grid-template-columns:1fr;
    }
}

@media(max-height:550px) and (min-width:601px) {
    .topbar {
        top:12px;
    }
    .world-caption {
        top:72px;
    }
    .intro {
        top:100px;
    }
    .tool-area {
        bottom:12px;
    }
    .toolbox button {
        min-height:54px;
    }
    .inspector {
        top:80px;
        bottom:90px;
        max-height:none;
        width:296px;
        padding:15px;
    }
    .camera-controls {
        bottom:17px;
        flex-direction:row;
    }
    .toast {
        top:78px;
    }
}

@media(prefers-reduced-motion:reduce) {
    *,*::before,*::after {
        transition:none!important;
        scroll-behavior:auto!important;
    }
}
/* Wetter und Tageszeit bleiben bis zum Öffnen eine einzige ruhige Anzeige. */
.climate-clock{position:absolute;right:28px;top:92px;z-index:6;min-height:44px;padding:8px 14px;border-radius:100px;display:flex;align-items:center;gap:8px;font-size:12px;font-variant-numeric:tabular-nums}
#weather-name{color:#CBD5E1;border-left:1px solid var(--line-strong);padding-left:8px}
.climate-panel{position:absolute;z-index:8;right:28px;top:145px;width:310px;max-height:calc(100% - 260px);overflow:auto;overscroll-behavior:contain;padding:18px;border-radius:24px}
.climate-panel h2{font-size:19px;margin:0}.climate-panel .card-heading{margin-bottom:12px}
.weather-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.weather-options button{min-height:44px;border:1px solid var(--line-strong);border-radius:12px;font-size:12px}
.weather-options [aria-pressed=true]{background:rgba(99,102,241,.3);border-color:#818CF8}
.climate-panel p,.climate-panel label{font-size:12px;line-height:1.5}.climate-panel p{color:#CBD5E1;min-height:36px;margin:12px 0}
.climate-panel output{float:right;font-variant-numeric:tabular-nums}.climate-panel input[type=range]{width:100%;min-height:44px;accent-color:#818CF8;cursor:pointer}
.clock-toggle{display:flex;gap:10px;align-items:center;min-height:44px}.clock-toggle input{width:18px;height:18px;accent-color:#818CF8}
.climate-panel small{display:block;color:#CBD5E1;font-size:11px;line-height:1.5;margin-top:10px}
.water-key{position:absolute;left:28px;top:140px;z-index:3;width:235px;padding:12px 15px;border-radius:16px;pointer-events:none}
.water-key p{margin:0;font-size:11px;line-height:1.6;color:#E2E8F0}.water-key p+p:not([hidden]){margin-top:10px}.water-key small{display:block;font-size:10px;margin-top:6px;color:#CBD5E1}
.flow-dot{display:inline-block;background:#A5ECE0;width:6px;height:6px;border-radius:50%;margin-right:5px}
#ground-state{color:#A5B4FC}.island-stage:has(.inspector:not([hidden])) .water-key{display:none}
@media(max-width:600px){
 .climate-clock{top:70px;right:12px;min-height:44px;padding:5px 10px;font-size:11px}
 .world-caption{top:87px;max-width:calc(100% - 175px);font-size:10px;white-space:nowrap;overflow:hidden}
 .intro{top:130px}.climate-panel{top:120px;left:12px;right:12px;width:auto;max-height:calc(100% - 230px);padding:14px}
 .toolbox button{min-width:0;width:calc((100vw - 42px)/5);max-width:74px;font-size:9px}
 .tool-divider{margin:0;width:1px}.toolbox{gap:0}.tool-icon{width:23px;height:25px}
 .water-key{top:124px;left:14px;width:210px;padding:9px 12px}.water-key p{font-size:10px}
}
@media(max-height:550px) and (min-width:601px){.climate-clock{top:66px}.climate-panel{top:115px;max-height:calc(100% - 195px)}.water-key{top:106px;width:195px}}
.ground-level{display:grid;grid-template-columns:32px 1fr;align-items:center;gap:4px 8px;margin-top:8px;font-size:10px;color:#CBD5E1}.ground-level meter{width:100%;height:9px}.ground-level meter::-webkit-meter-bar{background:#334155;border:0}.ground-level meter::-webkit-meter-optimum-value{background:#A7DFF2}#storage-south::-webkit-meter-optimum-value{background:#F0D493}#ground-key:not([hidden]){margin-top:8px}
