*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;background:#0e0f11;color:#e8eaed;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
body{overscroll-behavior:none}
[hidden]{display:none!important}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}

/* ---------- Einrichtung ---------- */
.seite{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:24px 18px calc(24px + env(safe-area-inset-bottom))}
.karte{width:100%;max-width:420px;text-align:center}
.logo{width:96px;height:96px;margin-bottom:14px}
h1{font-size:28px;font-weight:800;margin-bottom:10px}
h1 span{color:#ff4d55}
.karte p{color:#b4bac2;line-height:1.45;margin-bottom:20px}
#code{width:100%;font:700 34px/1 ui-monospace,Menlo,Consolas,monospace;letter-spacing:.25em;text-align:center;text-transform:uppercase;padding:16px 8px;border-radius:12px;border:2px solid #3a3f46;background:#1a1c20;color:#fff;margin-bottom:14px}
#code:focus{outline:none;border-color:#ff4d55}
.haupt{width:100%;padding:16px;border-radius:12px;background:#c8141c;color:#fff;font-weight:700;font-size:18px}
.neben{margin-top:16px;color:#9aa0a6;text-decoration:underline;font-size:15px}
.fehler{color:#ff8a8f!important;min-height:1.4em;margin:12px 0 0!important}
.liste{list-style:none;text-align:left;max-height:58dvh;overflow:auto;border-radius:12px;border:1px solid #2b2f35}
.liste li+li{border-top:1px solid #2b2f35}
.liste button{width:100%;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 16px;text-align:left;background:#16181b}
.liste button:active{background:#22252a}
.liste b{display:block;font-size:18px}
.liste small{color:#9aa0a6;font-size:13px}
.liste .belegt{font-size:12px;color:#f3a65c;white-space:nowrap}

/* ---------- Bedienteil ---------- */
.bedienteil{padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));align-items:stretch;background:radial-gradient(ellipse at 50% 30%,#2a2d31,#0b0c0d 75%)}
.geraet{width:100%;max-width:390px;margin:0 auto;display:flex;flex-direction:column;gap:clamp(8px,1.4dvh,12px);
  padding:clamp(12px,2dvh,18px) clamp(16px,4.5vw,22px) clamp(14px,2.2dvh,20px);border-radius:30px 30px 42px 42px;
  background:
    radial-gradient(circle at 1px 1px,rgba(255,255,255,.03) 1px,transparent 1.5px) 0 0/4px 4px,
    linear-gradient(90deg,#141518 0%,#2a2c30 8%,#222428 50%,#2a2c30 92%,#141518 100%);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.08),inset 0 -3px 0 rgba(0,0,0,.6),0 18px 40px rgba(0,0,0,.6),0 0 0 2px #070808}
.g-kopf{display:flex;align-items:center;justify-content:space-between;padding:0 4px}
.a-streifen{height:12px;width:44%;border-radius:3px;background:linear-gradient(#ff4b54,#c8141c);box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 0 14px rgba(255,60,70,.6);transition:all .15s}
.a-streifen.aus{background:linear-gradient(#6a2328,#46161a);box-shadow:inset 0 1px 0 rgba(255,255,255,.12)}
.marke{font:700 11px/1 system-ui,sans-serif;letter-spacing:.22em;color:#8d939a;text-transform:uppercase}
.a-fenster{flex:1;display:flex;padding:8px;border-radius:12px;background:linear-gradient(#0c0d0e,#17181a);box-shadow:inset 0 2px 5px rgba(0,0,0,.95),0 1px 0 rgba(255,255,255,.06)}

/* Farbdisplay */
.lcd{position:relative;flex:1;min-height:clamp(250px,40dvh,420px);display:flex;flex-direction:column;overflow:hidden;border-radius:6px;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:#eef3f8;
  background:radial-gradient(ellipse at 50% 0%,#1c3350 0%,#0f1c2e 55%,#0a1320 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06),inset 0 0 30px rgba(0,0,0,.5)}
.lcd::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(120deg,rgba(255,255,255,.07) 0%,rgba(255,255,255,0) 35%)}
.leiste{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;font-size:13px;font-weight:600;color:#cfe0f2;background:rgba(0,0,0,.25)}
.netz{display:flex;align-items:flex-end;gap:2px}
.netz i{width:3px;background:#7fd1ff;border-radius:1px}
.netz i:nth-child(1){height:4px}.netz i:nth-child(2){height:7px}.netz i:nth-child(3){height:10px}.netz i:nth-child(4){height:13px;margin-right:4px}
.netz.aus i{background:#4a5563}
.akku{width:24px;height:11px;border:1.5px solid #cfe0f2;border-radius:2px;position:relative;padding:1px}
.akku::after{content:"";position:absolute;right:-4px;top:2.5px;width:2px;height:4px;background:#cfe0f2}
.akku i{display:block;height:100%;width:75%;background:#5fd36e;border-radius:1px}
.haupt-anzeige{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:8px 12px;gap:6px}
.rufname{font-size:clamp(24px,7.2vw,31px);font-weight:800;letter-spacing:.02em}
.unterzeile{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;font-size:14px;color:#9fb3c8}
.unterzeile span:empty{display:none}
.unterzeile span+span::before{content:"·";margin-right:8px}
.statuskachel{margin-top:8px;width:100%;display:flex;align-items:center;gap:14px;padding:12px 16px;border-radius:12px;background:#334155;box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 4px 14px rgba(0,0,0,.35);transition:background .25s}
.snr{font-size:clamp(48px,15vw,64px);line-height:1;font-weight:800;min-width:46px;text-align:center}
.stext{font-size:17px;font-weight:600;text-align:left;line-height:1.2;white-space:pre-line}
.st-0{background:#d9252e}.st-1{background:#2fa3a3}.st-2{background:#2e8c3b}.st-3{background:#c9a514;color:#1d1a05}.st-4{background:#e07818}
.st-5{background:#b89a0e;color:#1d1a05}.st-6{background:#5b646c}.st-7{background:#7a3e9a}.st-8{background:#3f5bc0}.st-9{background:#46607a}
.hinweis{font-size:14px;min-height:1.3em;font-weight:600;color:#ffd166}
.lcd.blinkt .statuskachel{animation:puls .8s ease-in-out infinite}
@keyframes puls{50%{opacity:.35}}
.lcd.offline .statuskachel{filter:grayscale(.85) brightness(.8)}
.softbar{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid rgba(255,255,255,.1);background:rgba(0,0,0,.28)}
.softbar button{padding:12px 10px;font-size:15px;font-weight:700;color:#cfe0f2;text-align:left}
.softbar button+button{text-align:right}
.softbar button:active{background:rgba(255,255,255,.08)}

.fenster{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% 0%,#1c3350 0%,#0f1c2e 55%,#0a1320 100%)}
.f-kopf{display:flex;justify-content:space-between;padding:9px 12px;font-weight:800;font-size:15px;background:#26415f;letter-spacing:.03em}
.f-kopf.rot{background:#c8141c}
.n-inhalt{flex:1;overflow:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.n-stw{font-size:23px;font-weight:800;color:#ffd166}
.n-adr{font-size:19px;font-weight:600;white-space:pre-line}
.n-info{font-size:16px;white-space:pre-line;color:#c8d6e5;line-height:1.35}
.menue-liste,.statusliste{list-style:none;flex:1;overflow:auto;padding:6px 0}
.menue-liste button{width:100%;display:flex;gap:12px;align-items:center;text-align:left;padding:12px 14px;font-size:17px;color:#eef3f8}
.menue-liste button b{width:26px;height:26px;border-radius:6px;background:#26415f;display:flex;align-items:center;justify-content:center;font-size:14px}
.menue-liste button:active{background:rgba(255,255,255,.08)}
.statusliste li{display:flex;align-items:center;gap:12px;padding:5px 14px;font-size:15px}
.statusliste b{width:30px;height:26px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:15px}

/* Tasten (hell, wie beim analogen Bedienteil) */
.tasten{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(8px,1.3dvh,11px) 14px}
.taste{position:relative;overflow:hidden;height:clamp(42px,6.2dvh,52px);border-radius:9px;
  background:linear-gradient(#f2f1ec,#d8d6cf 70%,#c6c4bc);color:#1c1d1f;
  box-shadow:inset 0 1px 0 #fff,inset 0 -2px 0 rgba(0,0,0,.12),0 3px 0 #0b0c0d,0 4px 7px rgba(0,0,0,.55);
  display:flex;align-items:flex-start;justify-content:center;gap:4px;padding-top:clamp(9px,1.5dvh,13px);user-select:none;-webkit-user-select:none;touch-action:none}
.taste b{font:700 22px/1 system-ui,sans-serif;color:#1c1d1f;position:relative}
.taste small{font:700 9px/1 system-ui,sans-serif;color:#3d3f43;position:relative;letter-spacing:.03em}
.taste .fuell{position:absolute;left:0;bottom:0;width:100%;height:0;background:linear-gradient(#e0262e,#a5121a);opacity:.85}
.taste.halten .fuell{height:100%;transition:height .5s linear}
.taste:active{transform:translateY(2px);box-shadow:inset 0 1px 0 #fff,0 1px 0 #0b0c0d}
.taste.aus b{color:#7a7c80}
.a-fuss{height:8px;width:34%;margin:2px auto 0;border-radius:4px;background:#0b0c0d;box-shadow:0 1px 0 rgba(255,255,255,.06)}
