:root{
  scrollbar-gutter:stable;
}

html{
  min-height:100%;
  overflow-x:hidden;
  overflow-y:scroll;
}

body{
  min-height:100%;
  overflow-x:hidden;
  overflow-y:visible;
}

/* Eine einzige, durchgehende Seitenscrollleiste am rechten Fensterrand. */
.app-shell,
.main-column,
.content,
.view,
.view>div,
#needsForm{
  height:auto!important;
  max-height:none!important;
  overflow-y:visible!important;
}

.main-column{
  width:100%;
  min-width:0;
  padding-right:clamp(10px,1.25vw,24px);
}

.content{
  width:100%;
  max-width:1660px;
  margin:0 auto;
  padding-right:clamp(18px,2vw,34px)!important;
}

.content>.view>div{
  width:100%;
  max-width:1480px;
  margin-inline:auto;
}

/* Alte Höhenbegrenzungen erzeugten Scrollflächen in ganzen Themenblöcken. */
#needsForm .selection-topic,
#needsForm .section-four-block,
#needsForm .compact-choice-body,
#needsForm .handle-picker-list,
#needsForm .catalog-choice-grid{
  max-height:none!important;
  overflow:visible!important;
  overscroll-behavior:auto!important;
  padding-right:0!important;
  scrollbar-gutter:auto!important;
}

/* Nur echte Ergebnis-Auswahllisten bleiben separat scrollbar. */
#needsForm .v12-program-grid,
#needsForm .v12-card-grid,
#needsForm .device-model-grid,
#needsForm .kc18-grid,
#needsForm .kc19-grid,
#needsForm .v13-product-grid{
  max-height:min(58vh,620px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain!important;
  scrollbar-gutter:stable!important;
  padding-right:6px!important;
}

/* Tabellen dürfen horizontal, aber nicht als zweite komplette Seite vertikal scrollen. */
.table-wrap,
.kc-table-wrap,
.wf20-position-table,
.wf20-calendar{
  overflow-x:auto;
  overflow-y:visible;
}

@media(max-width:850px){
  .main-column{padding-right:max(7px,env(safe-area-inset-right))}
  .content{padding-left:max(10px,env(safe-area-inset-left))!important;padding-right:max(10px,env(safe-area-inset-right))!important}
}

@media(max-width:520px){
  .main-column{padding-right:max(5px,env(safe-area-inset-right))}
  .content{padding-left:max(8px,env(safe-area-inset-left))!important;padding-right:max(8px,env(safe-area-inset-right))!important}
}
