:root{
  --bdsv-red:#7d0303;
  --bdsv-blue:#1F4D68;
  --bdsv-gold:#D4AF37;
  --bdsv-ink:#17242c;
  --bdsv-muted:#9aa3a9;
  --bdsv-panel:#eef4f7;
}

.bdsv-keyboard-form,.bdsv-keyboard-form *{box-sizing:border-box}
.bdsv-keyboard-form .bdsv-original-keyboard,.bdsv-keyboard-form .bdsv-original-display,.bdsv-keyboard-form .bdsv-hide-duplicate-title,.bdsv-keyboard-form .bdsv-original-submit-wrap,.bdsv-keyboard-form .bdsv-original-submit{display:none!important}
.bdsv-keyboard-form{width:min(100%,980px)!important;max-width:100%!important;margin:0 auto!important;overflow-x:clip!important}

.bdsv-kbd-ui{
  width:100%;max-width:100%;margin:0 auto;padding:clamp(12px,1.8vw,20px);
  overflow:hidden;border:1px solid rgba(31,77,104,.14);border-radius:16px;
  background:linear-gradient(180deg,#f8fbfc 0%,#edf3f6 100%);
  box-shadow:0 14px 38px rgba(16,35,46,.12);
}
.bdsv-kbd-header{display:grid;grid-template-columns:minmax(105px,1fr) auto minmax(155px,1fr);align-items:center;gap:12px;margin-bottom:8px}
.bdsv-kbd-header-spacer{min-width:0}
.bdsv-kbd-title{margin:0;color:var(--bdsv-ink);font-family:Archivo,Arial,sans-serif;font-size:clamp(30px,3.8vw,44px);font-weight:800;line-height:1.05;text-align:center;white-space:nowrap}

.bdsv-kiosk-toggle{justify-self:end;display:flex;align-items:center;justify-content:space-between;gap:9px;min-height:42px;min-width:148px;padding:6px 8px 6px 12px;border:2px solid var(--bdsv-red)!important;border-radius:999px;background:var(--bdsv-red)!important;box-shadow:0 5px 14px rgba(125,3,3,.2);color:#fff!important;font:800 12px/1 Archivo,Arial,sans-serif;cursor:pointer;-webkit-tap-highlight-color:transparent}
.bdsv-kiosk-toggle-text{color:#fff!important;white-space:nowrap}
.bdsv-kiosk-toggle-track{position:relative;flex:0 0 auto;width:42px;height:24px;border-radius:999px;background:rgba(255,255,255,.28);box-shadow:inset 0 0 0 1px rgba(255,255,255,.4);transition:.18s ease}
.bdsv-kiosk-toggle-knob{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.28);transition:.18s ease}
.bdsv-kiosk-toggle.is-on .bdsv-kiosk-toggle-track{background:var(--bdsv-blue)}
.bdsv-kiosk-toggle.is-on .bdsv-kiosk-toggle-knob{transform:translateX(18px)}

.bdsv-kbd-device-logo-wrap{display:flex;align-items:center;justify-content:center;min-height:100px;margin:4px 0 10px;overflow:hidden}
.bdsv-kbd-device-logo{display:block;width:auto;height:auto;max-width:min(31vw,190px);max-height:190px;object-fit:contain;filter:drop-shadow(0 5px 10px rgba(23,36,44,.08))}

.bdsv-kbd-display{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;height:clamp(72px,8.1vh,100px);margin:0 0 clamp(16px,2vh,26px);padding:10px 16px;overflow:hidden;border:2px solid var(--bdsv-blue);border-radius:11px;background:#fff;box-shadow:inset 0 2px 8px rgba(31,77,104,.07);color:var(--bdsv-ink);font-family:Archivo,Arial,sans-serif;font-size:clamp(24px,4vw,42px);font-weight:800;line-height:1;text-align:center;white-space:nowrap;text-overflow:ellipsis}
.bdsv-kbd-display.is-placeholder{color:var(--bdsv-muted);font-size:clamp(17px,3vw,29px);font-weight:700}

.bdsv-kbd-keys{display:flex;flex-direction:column;gap:clamp(7px,1.05vh,13px);width:100%;min-width:0;padding:clamp(10px,1.4vw,16px);border:1px solid rgba(31,77,104,.11);border-radius:14px;background:linear-gradient(180deg,rgba(31,77,104,.045),rgba(31,77,104,.085));box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.bdsv-kbd-row{display:grid;width:100%;min-width:0;gap:clamp(5px,.75vw,10px)}
.bdsv-kbd-row-1{grid-template-columns:repeat(10,minmax(0,1fr))}
.bdsv-kbd-row-2{grid-template-columns:repeat(9,minmax(0,1fr));width:92%;margin-inline:auto}
.bdsv-kbd-row-3{grid-template-columns:repeat(7,minmax(0,1fr));width:72%;margin-inline:auto}
.bdsv-kbd-actions{grid-template-columns:minmax(0,2.2fr) minmax(0,1fr);width:100%;margin-top:clamp(6px,.8vh,10px)}

.bdsv-key{width:100%;min-width:0;height:clamp(48px,6.4vh,72px);margin:0!important;padding:0 1px!important;border:1px solid #d3dde2!important;border-bottom:3px solid #bac8cf!important;border-radius:9px!important;background:linear-gradient(180deg,#fff 0%,#f7fafb 100%)!important;box-shadow:0 4px 9px rgba(31,77,104,.11),inset 0 1px 0 #fff!important;color:var(--bdsv-ink)!important;font-family:Archivo,Arial,sans-serif!important;font-size:clamp(18px,3.2vw,31px)!important;font-weight:800!important;line-height:1!important;text-align:center!important;text-transform:uppercase;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-tap-highlight-color:transparent;transition:transform .1s ease,box-shadow .1s ease,border-color .15s ease,background .15s ease}
.bdsv-key:hover{border-color:#abc1cd!important;background:linear-gradient(180deg,#fff 0%,#edf4f7 100%)!important;color:var(--bdsv-ink)!important}
.bdsv-key.is-pressed,.bdsv-key:active{transform:translateY(2px) scale(.985);border-bottom-width:1px!important;box-shadow:0 1px 3px rgba(31,77,104,.16)!important}
.bdsv-key-space,.bdsv-key-delete{background:var(--bdsv-blue)!important;border-color:var(--bdsv-blue)!important;color:#fff!important;font-size:clamp(14px,2.4vw,22px)!important;letter-spacing:.03em}
.bdsv-key-space:hover,.bdsv-key-delete:hover,.bdsv-key-space.is-pressed,.bdsv-key-space:active,.bdsv-key-delete.is-pressed,.bdsv-key-delete:active{background:var(--bdsv-red)!important;border-color:var(--bdsv-red)!important;color:#fff!important}

html body .bdsv-send-button{display:block!important;width:100%!important;min-width:0!important;min-height:clamp(54px,6.4vh,74px)!important;margin:clamp(12px,1.6vh,20px) 0 0!important;padding:8px 14px!important;border:0!important;border-radius:10px!important;background:#7d0303!important;background-color:#7d0303!important;box-shadow:0 7px 18px rgba(125,3,3,.18)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;font-family:Archivo,Arial,sans-serif!important;font-size:clamp(20px,3vw,30px)!important;font-weight:800!important;line-height:1!important;letter-spacing:.035em;text-transform:uppercase;cursor:pointer;touch-action:manipulation;appearance:none!important;-webkit-appearance:none!important}
html body .bdsv-send-button:hover,html body .bdsv-send-button:focus,html body .bdsv-send-button:focus-visible{background:#1F4D68!important;background-color:#1F4D68!important;color:#fff!important;-webkit-text-fill-color:#fff!important;outline:none!important}
html body .bdsv-send-button:active{transform:translateY(1px)}
html body .bdsv-send-button:disabled{opacity:.8;cursor:wait}

html.bdsv-kiosk-active,body.bdsv-kiosk-active{width:100%;height:100%;margin:0!important;overflow:hidden!important;background:#eaf1f5!important}
body.bdsv-kiosk-active .bdsv-kiosk-form{position:fixed!important;inset:0!important;z-index:2147483000!important;display:flex!important;align-items:center!important;justify-content:center!important;width:100vw!important;max-width:none!important;height:100vh!important;height:100dvh!important;margin:0!important;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;overflow:hidden!important;background:radial-gradient(circle at 50% 0%,#f9fcfd 0%,#e9f1f5 58%,#e3edf2 100%)!important}
body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{width:min(calc(100vw - 20px),760px)!important;max-width:min(calc(100vw - 20px),760px)!important;height:min(calc(100dvh - 20px),1180px)!important;min-height:min(90dvh,900px)!important;display:flex!important;flex-direction:column!important;padding:clamp(16px,2.2vw,24px)!important}
body.bdsv-kiosk-active .bdsv-kbd-header{flex:0 0 auto}
body.bdsv-kiosk-active .bdsv-kbd-device-logo-wrap{flex:1 1 190px;min-height:120px;max-height:235px;margin:0 0 8px}
body.bdsv-kiosk-active .bdsv-kbd-display{flex:0 0 auto}
body.bdsv-kiosk-active .bdsv-kbd-keys{flex:0 0 auto;margin-top:auto!important}
body.bdsv-kiosk-active .bdsv-send-button{flex:0 0 auto}

@media (min-width:700px) and (orientation:portrait){
  body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{height:calc(100dvh - 24px)!important;min-height:0!important;max-height:1180px!important}
  body.bdsv-kiosk-active .bdsv-kbd-header{margin-bottom:2px}
  body.bdsv-kiosk-active .bdsv-kbd-title{font-size:clamp(34px,5vw,46px)!important}
  body.bdsv-kiosk-active .bdsv-kbd-device-logo-wrap{flex-basis:210px;min-height:150px;max-height:245px;margin-bottom:8px}
  body.bdsv-kiosk-active .bdsv-kbd-device-logo{max-width:205px;max-height:205px}
  body.bdsv-kiosk-active .bdsv-kbd-display{height:clamp(86px,8.3vh,104px)!important;font-size:clamp(31px,4.8vw,43px)!important;margin-bottom:clamp(18px,2.2vh,28px)!important}
  body.bdsv-kiosk-active .bdsv-kbd-display.is-placeholder{font-size:clamp(23px,3.7vw,32px)!important}
  body.bdsv-kiosk-active .bdsv-kbd-keys{padding:14px!important;gap:clamp(10px,1.35vh,16px)!important}
  body.bdsv-kiosk-active .bdsv-key{height:clamp(62px,6vh,78px)!important;font-size:clamp(26px,4vw,35px)!important}
  body.bdsv-kiosk-active .bdsv-key-space,body.bdsv-kiosk-active .bdsv-key-delete{font-size:clamp(19px,3vw,25px)!important}
  body.bdsv-kiosk-active .bdsv-kbd-actions{margin-top:clamp(9px,1vh,14px)!important}
  body.bdsv-kiosk-active .bdsv-send-button{min-height:clamp(68px,6.6vh,84px)!important;font-size:clamp(26px,4vw,35px)!important;margin-top:clamp(12px,1.35vh,18px)!important}
}

/* Normalansicht auf kleinen Bildschirmen: immer innerhalb des Viewports bleiben. */
@media (max-width:699px){
  body:not(.bdsv-kiosk-active) .bdsv-keyboard-form{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;margin:8px auto!important}
  body:not(.bdsv-kiosk-active) .bdsv-kbd-ui{width:100%!important;max-width:100%!important;margin:0 auto!important}
  .bdsv-keyboard-form,.bdsv-kbd-ui,body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{min-width:0!important}
  body.bdsv-kiosk-active .bdsv-kiosk-form{padding:6px!important}
  body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;height:calc(100dvh - 12px)!important;min-height:0!important;padding:8px!important;border-radius:12px!important}
  .bdsv-kbd-ui{border-radius:12px;padding:9px}
  .bdsv-kbd-header{grid-template-columns:1fr auto;gap:6px;margin-bottom:3px}
  .bdsv-kbd-header-spacer{display:none}
  .bdsv-kbd-title{font-size:clamp(20px,6vw,27px);text-align:left;padding-left:2px;white-space:nowrap}
  .bdsv-kiosk-toggle{min-width:0;min-height:32px;padding:4px 6px 4px 8px;gap:5px;font-size:8.5px}
  .bdsv-kiosk-toggle-track{width:32px;height:18px}
  .bdsv-kiosk-toggle-knob{top:3px;left:3px;width:12px;height:12px}
  .bdsv-kiosk-toggle.is-on .bdsv-kiosk-toggle-knob{transform:translateX(14px)}
  .bdsv-kbd-device-logo-wrap{min-height:58px;max-height:78px;margin:1px 0 5px}
  .bdsv-kbd-device-logo{max-width:76px;max-height:76px}
  .bdsv-kbd-display{height:52px;margin-bottom:7px;padding:6px 8px;font-size:clamp(19px,7vw,27px)}
  .bdsv-kbd-display.is-placeholder{font-size:clamp(13px,4.4vw,18px)}
  .bdsv-kbd-keys{padding:6px;gap:4px!important;border-radius:10px}
  .bdsv-kbd-row{gap:3px;max-width:100%}
  .bdsv-kbd-row-2{width:94%}.bdsv-kbd-row-3{width:74%}
  .bdsv-key{height:39px;border-radius:7px!important;font-size:clamp(14px,4.8vw,20px)!important;min-width:0!important}
  .bdsv-key-space,.bdsv-key-delete{font-size:clamp(10px,3.2vw,14px)!important}
  .bdsv-kbd-actions{margin-top:4px}
  .bdsv-send-button{min-height:44px!important;font-size:clamp(17px,5vw,22px)!important;margin-top:6px!important}
  body.bdsv-kiosk-active .bdsv-kbd-device-logo-wrap{flex:1 1 auto;min-height:48px;max-height:88px;margin:0 0 4px}
  body.bdsv-kiosk-active .bdsv-kbd-keys{margin-top:auto!important}
}

@media (orientation:landscape) and (max-height:650px){
  body.bdsv-kiosk-active .bdsv-kiosk-form{padding:4px!important}
  body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{width:min(calc(100vw - 8px),900px)!important;max-width:min(calc(100vw - 8px),900px)!important;height:calc(100dvh - 8px)!important;min-height:0!important;padding:5px 7px!important;border-radius:9px!important}
  .bdsv-kbd-header{grid-template-columns:1fr auto;gap:6px;margin-bottom:0}
  .bdsv-kbd-header-spacer{display:none}
  .bdsv-kbd-title{font-size:17px!important;text-align:left}
  .bdsv-kiosk-toggle{min-height:26px;padding:2px 5px 2px 7px;font-size:7.5px}
  .bdsv-kiosk-toggle-track{width:28px;height:15px}.bdsv-kiosk-toggle-knob{top:3px;left:3px;width:9px;height:9px}.bdsv-kiosk-toggle.is-on .bdsv-kiosk-toggle-knob{transform:translateX(13px)}
  .bdsv-kbd-device-logo-wrap{position:absolute;left:50%;top:3px;transform:translateX(-50%);min-height:0;max-height:none;margin:0;pointer-events:none}
  .bdsv-kbd-device-logo{max-width:38px;max-height:38px}
  .bdsv-kbd-display{height:30px!important;margin:1px 0 3px!important;border-width:1px;border-radius:6px;font-size:18px!important}.bdsv-kbd-display.is-placeholder{font-size:12px!important}
  .bdsv-kbd-keys{padding:4px!important;gap:2px!important;border-radius:7px}
  .bdsv-kbd-row{gap:2px!important}
  .bdsv-key{height:26px!important;border-radius:5px!important;border-bottom-width:1px!important;font-size:14px!important}
  .bdsv-key-space,.bdsv-key-delete{font-size:9px!important}
  .bdsv-kbd-actions{margin-top:2px!important}
  .bdsv-send-button{min-height:30px!important;margin-top:3px!important;padding:4px 10px!important;border-radius:6px!important;font-size:14px!important}
}

/* 1.0.7 – Fire HD 8 / Mobil Feinschliff */
.bdsv-kbd-ui{border:2px solid var(--bdsv-blue)!important}

/* Tablet Hochformat: klare Abstände, kompletter Rahmen sichtbar. */
@media (min-width:700px) and (orientation:portrait){
  body.bdsv-kiosk-active .bdsv-kiosk-form{
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    padding:12px!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{
    width:min(calc(100vw - 24px),760px)!important;
    max-width:min(calc(100vw - 24px),760px)!important;
    height:min(calc(100dvh - 24px),1120px)!important;
    min-height:0!important;
    max-height:1120px!important;
    overflow:hidden!important;
    padding:18px!important;
  }
  body.bdsv-kiosk-active .bdsv-kbd-header{margin-bottom:4px!important}
  body.bdsv-kiosk-active .bdsv-kbd-device-logo-wrap{
    flex:0 0 150px!important;
    min-height:150px!important;
    max-height:150px!important;
    margin:2px 0 10px!important;
  }
  body.bdsv-kiosk-active .bdsv-kbd-device-logo{max-width:170px!important;max-height:145px!important}
  body.bdsv-kiosk-active .bdsv-kbd-display{
    flex:0 0 auto!important;
    height:92px!important;
    min-height:92px!important;
    margin:0!important;
  }
  body.bdsv-kiosk-active .bdsv-kbd-keys{
    flex:0 0 auto!important;
    margin-top:74px!important;
  }
  body.bdsv-kiosk-active .bdsv-send-button{
    flex:0 0 auto!important;
    min-height:74px!important;
    height:74px!important;
    margin-top:74px!important;
  }
}

/* Mobil: Vollbild darf vertikal scrollen und bleibt niemals seitlich abgeschnitten. */
@media (max-width:699px){
  html.bdsv-kiosk-active,body.bdsv-kiosk-active{
    width:100%!important;
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-form{
    position:fixed!important;
    inset:0!important;
    display:block!important;
    width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    min-height:100dvh!important;
    padding:6px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{
    width:calc(100vw - 12px)!important;
    max-width:calc(100vw - 12px)!important;
    height:auto!important;
    min-height:calc(100dvh - 12px)!important;
    max-height:none!important;
    margin:0 auto!important;
    overflow:visible!important;
    padding:8px!important;
  }
  body.bdsv-kiosk-active .bdsv-kbd-device-logo-wrap{
    flex:0 0 auto!important;
    min-height:72px!important;
    max-height:90px!important;
    margin:4px 0 8px!important;
  }
  body.bdsv-kiosk-active .bdsv-kbd-device-logo{max-width:88px!important;max-height:86px!important}
  body.bdsv-kiosk-active .bdsv-kbd-display{margin-bottom:14px!important}
  body.bdsv-kiosk-active .bdsv-kbd-keys{margin-top:0!important}
  body.bdsv-kiosk-active .bdsv-send-button{margin-top:10px!important}

  body:not(.bdsv-kiosk-active){overflow-x:hidden!important}
  body:not(.bdsv-kiosk-active) .bdsv-keyboard-form,
  body:not(.bdsv-kiosk-active) .bdsv-kbd-ui{max-width:100%!important;overflow-x:hidden!important}
}

/* Sehr kleine Handys: etwas kompakter, weiterhin scrollbar. */
@media (max-width:420px) and (orientation:portrait){
  .bdsv-kbd-title{font-size:20px!important}
  .bdsv-kiosk-toggle{font-size:8px!important;min-height:30px!important}
  .bdsv-kbd-device-logo-wrap{min-height:64px!important;max-height:76px!important}
  .bdsv-kbd-device-logo{max-width:74px!important;max-height:74px!important}
  .bdsv-kbd-display{height:50px!important;margin-bottom:12px!important}
  .bdsv-kbd-keys{padding:5px!important;gap:3px!important}
  .bdsv-key{height:37px!important}
  .bdsv-send-button{min-height:44px!important}
}

/* Mobil quer: auch hier Scrollen statt abgeschnittenem/fixiertem Bild. */
@media (orientation:landscape) and (max-height:650px){
  html.bdsv-kiosk-active,body.bdsv-kiosk-active{overflow-y:auto!important}
  body.bdsv-kiosk-active .bdsv-kiosk-form{
    display:block!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{
    height:auto!important;
    min-height:calc(100dvh - 8px)!important;
    max-height:none!important;
    margin:0 auto!important;
  }
}

/* 1.0.8 – gleichmaessiger Vollbild-Rahmen und dunkleres Tastenfeld */
.bdsv-kbd-keys{
  background:linear-gradient(180deg,rgba(31,77,104,.10),rgba(31,77,104,.16))!important;
  border-color:rgba(31,77,104,.18)!important;
}

/* Vollbild: die weiße Bedienflaeche bekommt rundum denselben blauen Rahmen. */
body.bdsv-kiosk-active .bdsv-kiosk-form{
  box-sizing:border-box!important;
  padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;
}
body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{
  box-sizing:border-box!important;
  width:min(100%,760px)!important;
  max-width:760px!important;
  margin:0 auto!important;
  border:8px solid var(--bdsv-blue)!important;
  border-radius:18px!important;
  overflow:hidden!important;
}

@media (min-width:700px) and (orientation:portrait){
  body.bdsv-kiosk-active .bdsv-kiosk-form{
    padding:14px!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{
    width:min(100%,760px)!important;
    max-width:760px!important;
    height:calc(100dvh - 28px)!important;
    max-height:1120px!important;
    min-height:0!important;
    border-width:8px!important;
  }
}

/* Mobil Vollbild: Header darf nicht mehr ueber die rechte Kante hinauslaufen. */
@media (max-width:699px){
  body.bdsv-kiosk-active .bdsv-kiosk-form{
    padding:8px!important;
    overflow-x:hidden!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{
    width:100%!important;
    max-width:100%!important;
    min-height:calc(100dvh - 16px)!important;
    margin:0!important;
    padding:10px!important;
    border:7px solid var(--bdsv-blue)!important;
    border-radius:16px!important;
    overflow:hidden!important;
  }
  body.bdsv-kiosk-active .bdsv-kbd-header{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
  }
  body.bdsv-kiosk-active .bdsv-kbd-header-spacer{display:none!important}
  body.bdsv-kiosk-active .bdsv-kbd-title{
    min-width:0!important;
    text-align:left!important;
    white-space:nowrap!important;
    font-size:clamp(22px,7vw,34px)!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-toggle{
    min-width:0!important;
    max-width:46vw!important;
    padding:5px 7px 5px 9px!important;
    gap:6px!important;
    font-size:clamp(8px,2.5vw,11px)!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-toggle-track{
    width:38px!important;
    height:22px!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-toggle-knob{
    width:16px!important;
    height:16px!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-toggle.is-on .bdsv-kiosk-toggle-knob{transform:translateX(16px)!important}
}

@media (max-width:420px) and (orientation:portrait){
  body.bdsv-kiosk-active .bdsv-kiosk-form{padding:6px!important}
  body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{
    min-height:calc(100dvh - 12px)!important;
    border-width:6px!important;
    border-radius:14px!important;
    padding:8px!important;
  }
  body.bdsv-kiosk-active .bdsv-kiosk-toggle{
    max-width:48vw!important;
    min-height:30px!important;
  }
}

@media (orientation:landscape) and (max-height:650px){
  body.bdsv-kiosk-active .bdsv-kiosk-form{padding:6px!important}
  body.bdsv-kiosk-active .bdsv-kiosk-form .bdsv-kbd-ui{
    width:100%!important;
    max-width:100%!important;
    min-height:calc(100dvh - 12px)!important;
    border:6px solid var(--bdsv-blue)!important;
    overflow:visible!important;
  }
}


/* 1.0.9 – Tablet-Flachwitz + kleines BSD-Logo im Kopf */
.bdsv-kbd-header{
  grid-template-columns:minmax(58px,96px) minmax(0,1fr) auto!important;
  gap:10px!important;
}
.bdsv-kbd-header-logo-wrap{display:flex;align-items:center;justify-content:flex-start;min-width:0;height:58px;overflow:hidden}
.bdsv-kbd-header-logo{display:block;width:auto;height:auto;max-width:76px;max-height:56px;object-fit:contain;filter:drop-shadow(0 3px 7px rgba(23,36,44,.08))}
.bdsv-kbd-title{min-width:0;text-align:center!important}

.bdsv-fun-card{display:none}

@media (min-width:600px) and (max-width:1100px) and (min-height:800px) and (orientation:portrait){
  .bdsv-kbd-device-logo-wrap{display:none!important}
  .bdsv-fun-card{
    display:grid;
    grid-template-columns:112px minmax(0,1fr);
    align-items:center;
    gap:16px;
    width:100%;
    min-height:132px;
    margin:8px 0 18px;
    padding:12px 16px;
    border:1px solid rgba(31,77,104,.20);
    border-left:5px solid var(--bdsv-red);
    border-radius:12px;
    background:linear-gradient(135deg,#ffffff 0%,#f2f6f8 100%);
    box-shadow:0 6px 16px rgba(31,77,104,.08);
    overflow:hidden;
  }
  .bdsv-fun-photo-wrap{width:100px;height:100px;border-radius:12px;overflow:hidden;background:#dde8ee;box-shadow:0 4px 12px rgba(31,77,104,.16);border:3px solid #fff}
  .bdsv-fun-photo,.bdsv-fun-photo-placeholder{display:block;width:100%;height:100%;object-fit:cover}
  .bdsv-fun-photo-placeholder{display:flex;align-items:center;justify-content:center;font-size:42px}
  .bdsv-fun-copy{min-width:0}
  .bdsv-fun-label{margin-bottom:3px;color:var(--bdsv-red);font:800 11px/1 Archivo,Arial,sans-serif;letter-spacing:.08em}
  .bdsv-fun-name{margin-bottom:6px;color:var(--bdsv-blue);font:800 clamp(15px,2.3vw,20px)/1.15 Archivo,Arial,sans-serif}
  .bdsv-fun-joke{color:var(--bdsv-ink);font:700 clamp(15px,2.2vw,19px)/1.25 Archivo,Arial,sans-serif}
  .bdsv-fun-card.is-loading{opacity:.72}

  body.bdsv-kiosk-active .bdsv-kbd-header{margin-bottom:0!important}
  body.bdsv-kiosk-active .bdsv-kbd-header-logo-wrap{height:62px}
  body.bdsv-kiosk-active .bdsv-kbd-header-logo{max-width:82px;max-height:60px}
  body.bdsv-kiosk-active .bdsv-fun-card{flex:0 0 auto;margin:5px 0 16px!important}
  body.bdsv-kiosk-active .bdsv-kbd-display{margin:0!important}
  body.bdsv-kiosk-active .bdsv-kbd-keys{margin-top:58px!important}
  body.bdsv-kiosk-active .bdsv-send-button{margin-top:58px!important}
}

/* Handy: Logo klein im Kopf, Flachwitz komplett ausblenden. */
@media (max-width:599px){
  .bdsv-fun-card{display:none!important}
  .bdsv-kbd-header{grid-template-columns:40px minmax(0,1fr) auto!important;gap:6px!important}
  .bdsv-kbd-header-logo-wrap{height:40px!important}
  .bdsv-kbd-header-logo{max-width:38px!important;max-height:38px!important}
  .bdsv-kbd-title{font-size:clamp(18px,6vw,27px)!important}
}

/* Große Desktop-Ansicht: kein Witz – die Tastatur bleibt sachlich. */
@media (min-width:1101px){
  .bdsv-fun-card{display:none!important}
}
\n\n/* 1.0.10 – Flachwitzkarte groesser, ruhiger verteilt */\n@media (min-width:600px) and (max-width:1100px) and (min-height:800px) and (orientation:portrait){\n  .bdsv-fun-card{\n    grid-template-columns:152px minmax(0,1fr)!important;\n    gap:20px!important;\n    min-height:178px!important;\n    margin:10px 0 20px!important;\n    padding:14px 18px!important;\n  }\n  .bdsv-fun-photo-wrap{\n    width:142px!important;\n    height:142px!important;\n    border-radius:14px!important;\n  }\n  .bdsv-fun-name{\n    margin-bottom:10px!important;\n    font-size:clamp(20px,3vw,27px)!important;\n    line-height:1.15!important;\n  }\n  .bdsv-fun-joke{\n    font-size:clamp(19px,2.8vw,25px)!important;\n    line-height:1.3!important;\n  }\n  body.bdsv-kiosk-active .bdsv-fun-card{margin:8px 0 20px!important;}\n}\n
/* 1.0.11 - Tablet-Flachwitz groesser, aber kompakt */
@media (min-width:600px) and (max-width:1100px) and (min-height:800px) and (orientation:portrait){
  .bdsv-fun-card{
    grid-template-columns:128px minmax(0,1fr)!important;
    gap:18px!important;
    min-height:150px!important;
    margin:10px 0 20px!important;
    padding:14px 16px!important;
  }
  .bdsv-fun-photo-wrap{
    width:118px!important;
    height:118px!important;
    border-radius:13px!important;
  }
  .bdsv-fun-name{
    margin-bottom:8px!important;
    font-size:clamp(18px,2.7vw,23px)!important;
    line-height:1.16!important;
  }
  .bdsv-fun-joke{
    font-size:clamp(17px,2.5vw,22px)!important;
    line-height:1.28!important;
  }
  body.bdsv-kiosk-active .bdsv-fun-card{
    margin:8px 0 20px!important;
  }
}
