body {
  padding: 0;
  margin: 10px auto;
  font-family: Arial, sans-serif;
}

.table-wrapper {
  width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
}

table {
  border-collapse: collapse;
  /*table-layout: fixed;*/
  table-layout: auto;
}

th,
td {
  padding: 4px 6px;
  font-size: 15px;
  text-align: center;
  vertical-align: middle;
  border-color: black !important;
}

td {
  white-space: nowrap;
}

th {
  background: #e0e0e0;
  font-weight: bold;
}

.sim-col {
  background: #fff3cd !important;
  font-weight: bold;
}

.real-column {
  display: table-cell;
}

.manual-column {
  display: none;
  white-space: nowrap;
}

.manual-input {
  width: 46px;
  text-align: right;
  font-weight: normal;
  border: 1px solid #333;
  padding-right: 4px;
  background: white;
  outline: none;
  box-sizing: border-box;
}

.manual-input:focus {
  border-color: #0066cc;
  background: #f8f9ff;
}

input[type="submit"],
.tablet-toggle button {
  background: #c0c0c0;
  color: #000;
  border: 1px solid #999;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 15px;
  cursor: pointer;
}

input[type="submit"]:hover,
.tablet-toggle button:hover {
  background: #a8a8a8;
}

.desktop-only {
  display: table-cell;
}

.mobile-sim-table {
  display: none;
  justify-content: center;
  margin-top: 15px;
}

.mobile-sim-table h3 {
  font-size: 16px;
  line-height: 1.15;
  margin-bottom: 10px;
}

.mobile-sim-table table {
  width: auto;
  margin: 0;
}

.tablet-toggle {
  display: none;
}

.manual-sum-ok,
.manual-sum-error {
  margin-top: 10px;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
}

.manual-sum-ok {
  color: #cc0000;
}

.manual-sum-error {
  color: #008000;
}

.mode-box {
  margin-top: 40px;
 background: #f0f0f0;
  padding: 20px;
  border-radius: 8px;
  width: 320px;
  max-width: calc(100% - 20px);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.mode-box form {
  display: block;
  margin-top: 14px;
}

.mode-label {
  display: block;
  margin: 10px 20px;
  font-size: 16px;
}

.manual-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}

.step-btn {
  width: 22px;
  height: 22px;
 font-size: 15px;
  font-weight: bold;
  padding: 0;
  line-height: 1;
}

.step-btn:active {
  background: #c0c0c0;
}

/* =========================================================
   MOBILE + TABLET
   BIS 900px
   ========================================================= */

@media (max-width: 900px) {

  .desktop-only {
    display: none !important;
  }

  .table-wrapper col.desktop-only {
    display: none !important;
  }

  .manual-input {
    width: 45px;
    height: 25px;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
  }

  .mobile-sim-table {
    display: flex;
    justify-content: center;
    margin-top: 15px;
  }

  .mobile-sim-table table {
    width: auto;
    margin: 0;
  }

  .mobile-sim-table h3 {
    font-size: 17px;
    line-height: 1.15;
    margin-bottom: 10px;
  }

  .table-wrapper {
    padding: 0 6px;
    overflow-x: auto;
    overflow-y: visible;
    touch-action: pan-x;
  }

  /*).table-wrapper table {
    width: auto;
    min-width: 100%;
    table-layout: auto;
  }*/

  th {
    white-space: normal;
    hyphens: auto;
  }

  thead th {
    font-size: 10px;
    line-height: 1.15;
  }

  h2 {
    font-size: 1.05em !important;
    line-height: 1.15;
    margin-top: 10px !important;
  }

  input[type="submit"] {
    padding: 6px 10px;
    font-size: 13px;
  }

  select {
    font-size: 14px;
    padding: 6px;
    max-width: 95%;
  }

  header {
    padding: 6px 0 !important;
  }

  .header-spacer {
    height: 85px !important;
  }
}

/* =========================================================
   NUR PHONES
   BIS 700px
   ========================================================= */

@media (max-width: 700px) {

  body {
    padding: 0;
    margin: 10px auto;
  }

  th,
  td {
    font-size: 13px;
    padding: 5px 3px;
  }

  .mode-box form {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .mode-box {
    display: block;
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 10px;
  }

  .mode-box form div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    white-space: normal;
    gap: 10px;
  }
}


/* =========================================================
   TABLETS
   701px BIS 900px
   ========================================================= */

@media (min-width: 701px) and (max-width: 900px) {

  body {
    padding: 0 4px;
    margin: 10px auto;
    zoom: 1.25;
  }

  th,
  td {
    font-size: 14px;
    padding: 6px 5px;
    font-size: 16px !important;
  }

  body.tablet-desktop .desktop-only {
    display: table-cell !important;
  }

  body.tablet-desktop .mobile-sim-table {
    display: none !important;
  }

  body.tablet-desktop .table-wrapper table {
    width: auto !important;
    table-layout: auto !important;
  }

  body.tablet-mobile .desktop-only {
    display: none !important;
  }

  body.tablet-mobile .mobile-sim-table {
    display: flex !important;
  }

  .tablet-toggle {
    display: block;
    text-align: center;
    margin-top: 15px;
  }
}

/* =========================================================
   ECHTER DESKTOP
   ========================================================= */

@media (min-width: 901px) and (hover: hover) and (pointer: fine) {

  table {
    max-width: 1300px;
    margin: 0 auto;
  }
}

/* =========================================================
   HOCHAUFLÃ–SENDE TABLETS (iPad Pro / Galaxy Tab S)
   ========================================================= */

@media (min-width: 901px) and (max-width: 1400px) and (-webkit-min-device-pixel-ratio: 2) {
  th,
  td {
    font-size: 16px;
  }

  thead th {
    font-size: 15px;
  }

  h2 {
    font-size: 1.45em !important;
  }

  input,
  select,
  button {
    font-size: 16px;
  }
}

/* =========================================================
   TOUCHGERÄTE / TABLETS / HANDYS
   Fixed Header deaktivieren
   ========================================================= */

@media (max-width: 1400px) {
  header {
    position: static !important;
  }

  .header-spacer {
    display: block;
    height: 20px !important;
  }
}
