/* ChaosTeam, Szenario U-Boot: Tiefsee, Messing, genietetes Blech. */
:root {
    --sea-top: #0a4a63;
    --sea-bottom: #021018;
    --steel: #2b3d45;
    --steel-dark: #1b2a30;
    --brass: #c99a44;
    --brass-dark: #7a5a22;
    --text: #e8f4f7;
    --dim: #93b3bd;
    --alarm: #ff4a3d;
    --ok: #4fe08a;
    --amber: #f2c230;
    --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    height: 100%;
    background: var(--sea-bottom);
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
    overscroll-behavior: none;
    user-select: none;
    -webkit-user-select: none;
}

button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }

.ct-sea {
    position: relative;
    min-height: 100dvh;
    background: radial-gradient(ellipse at 50% -10%, var(--sea-top), var(--sea-bottom) 75%);
    overflow: hidden;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Aufsteigende Luftblasen im Hintergrund */
.ct-bubbles span {
    position: absolute;
    bottom: -40px;
    left: calc(var(--i) * 8.3% + 2%);
    width: calc(6px + var(--i) % 4 * 5px);
    height: calc(6px + var(--i) % 4 * 5px);
    border: 2px solid rgba(159, 227, 255, .35);
    border-radius: 50%;
    animation: ct-rise calc(7s + var(--i) % 5 * 2s) linear infinite;
    animation-delay: calc(var(--i) * -1.3s);
    pointer-events: none;
}
@keyframes ct-rise {
    to { transform: translate(calc(sin(var(--i)) * 40px), -110dvh); opacity: 0; }
}

.ct-center {
    position: relative;
    max-width: 440px;
    margin: 0 auto;
    padding: 28px 20px;
    text-align: center;
}

.ct-card {
    background: linear-gradient(var(--steel), var(--steel-dark));
    border: 3px solid var(--brass);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(0, 0, 0, .3);
    padding: 22px 18px;
}
.ct-center.ct-card { margin-top: 5vh; }

.ct-logo { font-size: 44px; font-weight: 900; letter-spacing: 2px; color: var(--amber); text-shadow: 0 3px 0 var(--brass-dark); }
.ct-logo span { color: var(--text); }
.ct-sub { color: var(--dim); margin-top: 0; }

.ct-label { margin: 16px 0 6px; color: var(--dim); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }

.ct-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 18px;
    border-radius: 10px;
    border: 2px solid var(--brass-dark);
    background: #0d1c22;
    color: var(--text);
    user-select: text;
}
.ct-code { text-transform: uppercase; }

.ct-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.ct-row .ct-input { flex: 1; }

.ct-big {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 14px 18px;
    font-size: 20px;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    background: linear-gradient(#ffd75a, var(--amber));
    color: #2b1d00;
    box-shadow: 0 4px 0 var(--brass-dark);
}
.ct-big:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brass-dark); }
.ct-row .ct-big { width: auto; margin-top: 0; }
.ct-secondary { background: linear-gradient(#5b7c87, #3f5a63); color: var(--text); box-shadow: 0 4px 0 #1b2a30; }

.ct-or { margin: 18px 0 4px; color: var(--dim); }
.ct-link { margin-top: 16px; background: none; border: none; color: var(--dim); text-decoration: underline; }
.ct-error { color: var(--alarm); font-weight: 700; }
.ct-dim { color: var(--dim); }
.ct-wait { color: var(--amber); animation: ct-blink 1.6s ease-in-out infinite; }
@keyframes ct-blink { 50% { opacity: .4; } }

.ct-gamecode { font-size: 38px; font-weight: 900; letter-spacing: 3px; color: var(--amber); }
.ct-qr { width: 190px; height: 190px; margin: 10px auto; display: block; background: #fff; border-radius: 10px; padding: 6px; }
.ct-wifi summary { color: var(--dim); cursor: pointer; }

.ct-crew { list-style: none; padding: 0; margin: 0; }
.ct-crew li { padding: 6px 0; border-bottom: 1px dashed rgba(201, 154, 68, .35); font-size: 18px; }
.ct-crew li.ct-gone { color: var(--dim); text-decoration: line-through; }

.ct-modes { display: flex; gap: 8px; }
.ct-mode { flex: 1; padding: 10px 6px; border-radius: 10px; border: 2px solid var(--brass-dark); background: #0d1c22; font-size: 14px; }
.ct-mode.on { border-color: var(--amber); background: #3a2f10; }
.ct-adjust { justify-content: center; display: flex; align-items: center; gap: 8px; }
.ct-adjust b { min-width: 70px; text-align: center; white-space: nowrap; }
.ct-setting { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed rgba(201, 154, 68, .35); text-align: left; }
.ct-setting small { display: block; color: var(--dim); font-size: 12px; }
.ct-hint { font-size: 13px; margin: 6px 0; }
.ct-timer-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ct-timer-row .ct-timer { flex: 1; margin-top: 0; }
.ct-secs { font-weight: 900; font-variant-numeric: tabular-nums; min-width: 54px; text-align: right; font-size: 18px; }
.ct-adjust button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--brass); background: var(--steel-dark); font-size: 22px; }

.ct-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 20;
    padding: 8px; text-align: center; background: var(--alarm); font-weight: 700;
}

/* ----- Im Spiel ----- */
.ct-game {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 520px;
    height: 100dvh;
    margin: 0 auto;
    padding: 10px;
}

.ct-status { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ct-round { font-weight: 800; color: var(--amber); white-space: nowrap; }
.ct-score { flex: 1; font-size: 20px; }
.ct-progress, .ct-leak {
    position: relative; flex: 1; height: 22px; border-radius: 11px; overflow: hidden;
    background: #0d1c22; border: 2px solid var(--brass-dark);
}
.ct-progress div { height: 100%; background: linear-gradient(90deg, #2bb673, var(--ok)); transition: width .3s; }
.ct-leak div { height: 100%; background: linear-gradient(90deg, #ff8a3d, var(--alarm)); transition: width .4s linear; }
.ct-progress span, .ct-leak span { position: absolute; inset: 0; text-align: center; line-height: 18px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.ct-lamps { display: flex; gap: 5px; }
.ct-lamps span { width: 18px; height: 18px; border-radius: 50%; background: #3a1512; border: 2px solid var(--brass-dark); }
.ct-lamps span.on { background: var(--alarm); box-shadow: 0 0 10px var(--alarm); }

/* Anweisung: Messingplatte mit Nieten, darin eine beleuchtete Anzeige; die Zeit läuft als Leuchtbalken im Schlitz ab */
.ct-order {
    position: relative; isolation: isolate;
    padding: 16px 22px 14px;
    min-height: 100px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
    color: #2b1d00;
}
.ct-order::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    border: 22px solid transparent;
    border-image: url(../img/plate-brass.webp) 66 fill / 22px stretch;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6));
}
.ct-order-text {
    font-size: clamp(22px, 7vw, 32px); font-weight: 900; line-height: 1.15; text-align: center;
    padding: 10px 12px;
    /* Anzeige immer zweizeilig hoch, damit das Pult darunter nicht springt; kurze Befehle stehen mittig */
    box-sizing: border-box; height: calc(2 * 1.15em + 20px);
    display: flex; align-items: center; justify-content: center;
    text-wrap: balance; overflow: hidden;
    border-radius: 6px;
    background: radial-gradient(ellipse at 50% 40%, #2a1a06, #0d0804 75%);
    color: #ffc552;
    text-shadow: 0 0 6px rgba(255, 170, 40, .75), 0 0 18px rgba(255, 140, 20, .35);
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, .9), 0 0 0 3px #3c3226, 0 0 0 4px #8a7a5a, 0 1px 0 4px rgba(255, 255, 255, .25);
}
/* Lange Befehle etwas kleiner, damit sie in zwei Zeilen passen */
.ct-order-text.long { font-size: clamp(18px, 5.8vw, 28px); }
.ct-order-text.ct-dim { color: rgba(255, 197, 82, .4); }
.ct-order.overdue .ct-order-text { color: #ff6a50; text-shadow: 0 0 8px rgba(255, 70, 40, .9); animation: ct-alarm .6s steps(2) infinite; }
@keyframes ct-alarm { 50% { background: radial-gradient(ellipse at 50% 40%, #4a0d06, #1a0503 75%); } }
.ct-timer {
    height: 14px; margin-top: 0; border-radius: 7px; overflow: hidden;
    background: #050607;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .35);
}
.ct-timer-fill {
    height: 100%; width: var(--w); border-radius: 7px;
    background: linear-gradient(90deg, #ff3b22, #ffb020 40%, #ffe08a);
    box-shadow: 0 0 8px rgba(255, 170, 40, .8);
    animation: ct-shrink linear forwards;
}
.ct-timer-fill.stopped { animation-play-state: paused; }
@keyframes ct-shrink { from { width: var(--w); } to { width: 0; } }
.ct-timer-alarm { text-align: center; font-size: 11px; font-weight: 900; letter-spacing: 3px; line-height: 14px; color: #fff; background: #d8261a; text-shadow: 0 0 4px #fff; box-shadow: 0 0 10px #ff3b22; }
.ct-order .ct-secs { color: rgba(0, 0, 0, .88); text-shadow: 0 1px 0 rgba(255, 255, 255, .45); }

/* Pult: Metallplatten Kante an Kante, lückenlos (Anordnung aus PanelLayout) */
.ct-panel {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 0;
    padding: 0;
    border: 3px solid #0b1214;
    border-radius: 8px;
    background: #0b1214;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
    min-height: 0;
    overflow: hidden;   /* nie scrollen: PanelLayout bekommt die passende Zeilenzahl */
    isolation: isolate;   /* Plattenbilder liegen hinter den Bändern, aber vor dem Pultgrund */
}

/* Eine Platte (Bild aus dem Canva-Entwurf, 9-teilig gedehnt, damit die Nieten rund bleiben): Stahl, Messing oder Marineblau */
.ct-ctl {
    --plate-img: url(../img/plate-steel.webp);
    --ink: rgba(0, 0, 0, .62); --ink-hi: rgba(255, 255, 255, .5); --ink-on: #000;
    position: relative;
    container-type: inline-size;   /* Bandschrift richtet sich nach der Plattenbreite */
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 8px 10px 9px;
    min-width: 0; min-height: 0;
    color: var(--ink);
    background: none;   /* Plattenbild liegt im ::before dahinter */
    animation: ct-pop .45s ease-out;
}
.ct-ctl::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    border: 20px solid transparent;
    border-image: var(--plate-img) 66 fill / 20px stretch;
}
.ct-tint-1 { --plate-img: url(../img/plate-brass.webp); }
.ct-tint-2 { --plate-img: url(../img/plate-navy.webp); --ink: rgba(236, 231, 216, .8); --ink-hi: rgba(0, 0, 0, .7); --ink-on: #fff; }
@keyframes ct-pop { from { filter: brightness(2.2); } }

/* Beschriftung: Prägeband wie vom alten Etikettenprägegerät – farbiges Kunststoffband, weiße erhabene Großbuchstaben */
.ct-ctl-name {
    --tape: #b3221b;
    /* Band darf seitlich insgesamt etwa zwei Buchstaben über die Platte ragen (auf die Nachbarplatte oder aus dem Bild) */
    position: relative; z-index: 2;
    max-width: calc(100% + 20px + 1.3em);
    color: #f7f6f0;
    font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
    font-weight: 700; font-size: clamp(8px, min(3.4vw, 13cqw, (100cqw - 16px) / (var(--len, 8) * .75 - 1.5)), 15px); letter-spacing: .8px; line-height: 1.75;
    text-transform: uppercase;
    text-align: center; overflow-wrap: normal;   /* Umbruch nur zwischen den Wortteilen, ohne Bindestrich */
    flex-shrink: 0;
}
/* Jede Zeile ein eigenes Bandstück (box-decoration-break: clone) */
.ct-tape {
    padding: 2px 8px 1px;
    border-radius: 1px;
    background:
        linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .06) 35%, transparent 55%, rgba(0, 0, 0, .22)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 2px, rgba(0, 0, 0, .03) 2px 3px),
        var(--tape);
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
    /* erhaben: Licht von oben, Schatten unten */
    text-shadow: 0 -1px 0 rgba(255, 255, 255, .45), 0 1px 0 rgba(0, 0, 0, .55), 0 2px 1px rgba(0, 0, 0, .25);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 -1px 0 rgba(0, 0, 0, .3) inset, 0 2px 3px rgba(0, 0, 0, .45);
}
/* Flacher Regler: Band einzeilig, damit der Regler Platz behält */
.ct-ctl-hfader .ct-ctl-name { white-space: nowrap; letter-spacing: 0; font-size: clamp(8px, min(3vw, (100cqw - 16px) / (var(--len, 16) * .72 - 1.5)), 14px); }
.ct-tape-1 .ct-ctl-name { --tape: #1d4f9e; }   /* blau */
.ct-tape-2 .ct-ctl-name { --tape: #161819; }   /* schwarz */
.ct-tape-3 .ct-ctl-name { --tape: #1d7038; }   /* grün */
.ct-tape-4 .ct-ctl-name { --tape: #6b2a7a; }   /* violett */
/* Handgeprägt: Buchstaben einzeln versetzt, unterschiedlich tief geprägt; Band minimal schief aufgeklebt */
.ct-ctl-name { rotate: var(--tilt, 0deg); }
.ct-seg { white-space: nowrap; }
.ct-seg > span {
    display: inline-block;
    translate: 0 var(--y, 0);
    rotate: var(--r, 0deg);
    margin-right: var(--m, 0);
    color: rgba(247, 246, 240, var(--o, 1));
}

/* Fläche unter (oder neben) dem Band: das Bedienelement richtet sich nur nach ihr, so überdeckt es das Band nie */
.ct-body {
    position: relative;
    flex: 1 1 0; min-height: 0; width: 100%;
    display: flex; align-items: center; justify-content: center;
    container-type: size;
    overflow: clip; overflow-clip-margin: 8px;   /* Bedienelemente bleiben auf ihrer Platte */
}
.ct-flat .ct-body { flex: 1 1 0; width: auto; height: 100%; min-width: 0; }

/* Knopf: rote Kuppel im Chromring */
.ct-press {
    flex-shrink: 0;
    width: min(100px, 90cqw, calc(100cqh - 4px)); aspect-ratio: 1; border-radius: 50%;
    border: none; padding: 0;
    background: url(../img/btn.webp) center / contain no-repeat;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .55));
    transition: transform .06s;
}
.ct-press:active { transform: scale(.94); filter: brightness(.8) drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }

/* Kipphebel: Bild zeigt "an" (Hebel oben); "aus" ist das gespiegelte Bild. Daneben eine Lampe */
.ct-lever-box { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-height: 0; justify-content: center; }
.ct-engrave { font-size: 11px; font-weight: 900; letter-spacing: 1px; color: var(--ink); text-shadow: 0 1px 0 var(--ink-hi); line-height: 1; }
.ct-lever {
    position: relative; flex-shrink: 1; min-height: 0;
    height: min(110px, calc(100cqh - 34px)); aspect-ratio: 160 / 234;
    border: none; padding: 0;
    background: url(../img/lever.webp) center / contain no-repeat;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .5));
    transform: scaleY(-1);
    transition: transform .12s;
}
.ct-lever.on { transform: none; }
.ct-led {
    position: absolute; right: 2px; top: 2px;
    width: 20px; height: 20px;
    background: url(../img/led.webp) center / contain no-repeat;
    filter: hue-rotate(-115deg) brightness(.42) saturate(1.4);
}
.ct-led.on { filter: drop-shadow(0 0 6px #2fe07a); }
@container (max-height: 110px) { .ct-engrave { display: none; } .ct-lever { height: min(110px, 96cqh); } }

/* Leuchttaste: Bild 9-teilig, damit der Rahmen bei jeder Form passt; aus = abgedunkelt */
.ct-key {
    flex-shrink: 0;
    width: min(120px, 92cqw); height: min(72px, calc(100cqh - 4px));
    position: relative; isolation: isolate;
    border: none; padding: 0;
    background: none;
    color: rgba(255, 222, 160, .55);
    font-family: inherit; font-weight: 900; font-size: max(12px, min(22px, 20cqw, 35cqh)); letter-spacing: 2px; line-height: 1;
}
.ct-key::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    border: 14px solid transparent;
    border-image: url(../img/key.webp) 46 fill / 14px stretch;
    filter: brightness(.38) saturate(.7) drop-shadow(0 3px 2px rgba(0, 0, 0, .5));
}
.ct-key.on { color: #4a2a00; }
.ct-key.on::before { filter: drop-shadow(0 0 10px rgba(255, 176, 40, .75)); }
.ct-key:active { transform: translateY(2px); }

/* Schieberegler (Fader) mit Skala; waagerecht oder senkrecht */
.ct-fader { display: flex; flex-direction: column; gap: 4px; width: 100%; height: 100%; min-height: 0; justify-content: center; }
.ct-fader-scale {
    display: flex; justify-content: space-between; padding: 0 11px;
    font-size: 12px; font-weight: 900; color: var(--ink); text-shadow: 0 1px 0 var(--ink-hi); line-height: 1;
}
.ct-fader-scale span { width: 0; display: flex; justify-content: center; }
.ct-fader-scale span.on { color: var(--ink-on); }
.ct-fader-input {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 28px; margin: 0;
    background: transparent;
    touch-action: none;
}
.ct-fader-input::-webkit-slider-runnable-track {
    height: 10px; border-radius: 5px;
    background: #050607;
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .35);
}
.ct-fader-input::-moz-range-track {
    height: 10px; border-radius: 5px; background: #050607;
}
.ct-fader-input::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 26px; height: 28px; margin-top: -9px; border: none;
    background: url(../img/cap.webp) center / 100% 100% no-repeat;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .7));
}
.ct-fader-input::-moz-range-thumb {
    width: 26px; height: 28px; border: none; border-radius: 0;
    background: url(../img/cap.webp) center / 100% 100% no-repeat;
}
.ct-ctl-hfader { padding-top: 4px; padding-bottom: 4px; gap: 2px; justify-content: space-evenly; }
.ct-ctl-hfader .ct-fader { flex: 0 0 auto; }
/* Senkrecht: 0 unten, Skala links */
.ct-ctl-vfader .ct-fader { flex-direction: row; gap: 4px; align-items: stretch; justify-content: center; padding: 4px 0; }
.ct-ctl-vfader .ct-fader-scale { flex-direction: column-reverse; padding: 11px 0; }
.ct-ctl-vfader .ct-fader-scale span { width: auto; height: 0; align-items: center; }
.ct-ctl-vfader .ct-fader-input { writing-mode: vertical-lr; direction: rtl; width: 32px; height: auto; }
.ct-ctl-vfader .ct-fader-input::-webkit-slider-runnable-track { width: 10px; height: auto; }
.ct-ctl-vfader .ct-fader-input::-webkit-slider-thumb {
    width: 30px; height: 26px; margin-top: 0; margin-left: -10px;
    background-image: url(../img/cap-v.webp);
}
.ct-ctl-vfader .ct-fader-input::-moz-range-thumb { width: 30px; height: 26px; background-image: url(../img/cap-v.webp); }

/* Drehknopf mit Ziffernkranz (Ziffern antippen oder Knopf drehen) */
.ct-dial {
    --size: min(210px, 100cqw, 100cqh);
    position: relative; width: var(--size); aspect-ratio: 1; flex-shrink: 0;
    touch-action: none;
}
.ct-dial-num {
    position: absolute; left: 50%; top: 50%;
    width: 26px; height: 26px; margin: -13px 0 0 -13px; padding: 0;
    border: none; background: none;
    font-family: inherit; font-weight: 900; font-size: 15px; color: var(--ink); text-shadow: 0 1px 0 var(--ink-hi);
    transform: rotate(calc(-135deg + 270deg * var(--i) / var(--max))) translateY(calc(var(--size) * -0.40)) rotate(calc(135deg - 270deg * var(--i) / var(--max)));
}
.ct-dial-num.on { color: var(--ink-on); font-size: 18px; }
.ct-dial-knob {
    position: absolute; inset: 21%;
    background: url(../img/knob.webp) center / contain no-repeat;
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .55));
    transform: rotate(calc(-135deg + 270deg * var(--v) / var(--max)));
    transition: transform .1s;
    cursor: grab;
}

/* Niedrige Zelle: nebeneinander statt untereinander */
.ct-ctl.ct-flat { flex-direction: row; justify-content: space-evenly; gap: 8px; padding: 6px 22px; }
.ct-ctl.ct-flat .ct-ctl-name { max-width: 60%; font-size: clamp(8px, min(3.2vw, (55cqw - 16px) / (var(--len, 8) * .75)), 15px); }
.ct-flat .ct-fader { flex: 1; max-width: 70%; }
/* Breite der flachen Zelle hängt vom Inhalt ab: Größe hier aus der Höhe ableiten */
.ct-flat .ct-key { width: min(120px, 100cqw, calc((100cqh - 4px) * 1.3)); height: min(72px, calc(100cqh - 4px), calc(100cqw * .85)); font-size: max(10px, min(20px, 22cqw, 35cqh)); letter-spacing: 1px; }
.ct-flat .ct-press { width: min(100px, 100cqw, calc(100cqh - 4px)); }

/* Viele Elemente oder kleiner Bildschirm: kleinere Schrift */
.ct-panel.compact .ct-ctl { padding: 4px 5px 5px; gap: 2px; }
.ct-panel.compact .ct-ctl:not(.ct-ctl-hfader) .ct-ctl-name { font-size: clamp(8px, min(3.2vw, 13cqw, (100cqw - 16px) / (var(--len, 8) * .75 - 1.5)), 13px); }

.ct-overlay {
    position: fixed; inset: 0; z-index: 10;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(2, 16, 24, .75);
    backdrop-filter: blur(3px);
}
.ct-overlay .ct-card { max-width: 400px; text-align: center; }
.ct-overlay h2 { margin-top: 0; color: var(--amber); }

#blazor-error-ui {
    background: #ffd75a; color: #2b1d00; bottom: 0; display: none; left: 0; position: fixed; width: 100%; z-index: 1000;
    padding: .6rem 1.25rem .7rem 1.25rem; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.ct-order .ct-timer-row { margin-top: 0; }
