html, body {
  min-width: 150px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #172846;
  touch-action: pan-y pinch-zoom;
}

#bruecke {
  --c: #7fbfff;
  --c-bg: #284364;
  --track: #3c5373;
  --mut: #bdcce0;
  --ink: #f3f8ff;
  --ink2: #e0ebfa;
  --acc: #8fc7ff;
  display: grid;
  grid-template:
    "title" 34px
    "preset" 34px
    "stage" minmax(52px, 1fr)
    "weight" 43px
    "reading" 27px / minmax(0, 1fr);
  gap: 4px;
  padding: 9px;
  margin: 0;
  height: 100%;
  border-radius: 0;
  background: #172846;
  box-shadow: none;
  color: #eff6ff;
}

#bruecke :is(.head, .obs, .hint, #bruecke-tip),
#bruecke .panel > :not(:has(#bruecke-preset, #bruecke-w, #bruecke-u)),
#bruecke :is([data-p="road"], [data-p="haenge"]),
#bruecke .reads > :not(:has(#bruecke-u)),
#bruecke .legend span:last-child {
  display: none !important;
}

#bruecke :is(.body, .panel) {
  display: contents;
}

.compact-header {
  grid-area: title;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
}

.compact-header h1 {
  margin: 0;
  font-size: clamp(12px, 6.2vw, 16px);
  font-weight: 800;
  letter-spacing: -.035em;
}

#bruecke-play {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #55729c;
  border-radius: 8px;
  background: #263e61;
  color: #edf6ff;
  font: 700 12px/1 system-ui, sans-serif;
}

#bruecke .ctl:has(#bruecke-preset) {
  grid-area: preset;
}

#bruecke .ctl:has(#bruecke-preset) label {
  display: none;
}

#bruecke-preset {
  height: 100%;
  padding: 2px;
  border-radius: 8px;
  background: #213553;
}

#bruecke-preset button {
  padding: 0 4px;
  border-radius: 6px;
  font-size: 12px;
}

#bruecke-preset button[aria-pressed="true"] {
  background: #365680;
  color: #fff;
}

#bruecke-stage {
  grid-area: stage;
  min-height: 0;
  height: 100%;
  border-radius: 10px;
  background: radial-gradient(circle at 1px 1px, #344b6d 1px, transparent 1.3px) 0 0 / 13px 13px, #1b2f50;
  box-shadow: inset 0 0 0 1px #35537a;
  touch-action: pan-y pinch-zoom;
}

#bruecke .legend {
  top: 6px;
  left: 6px;
  gap: 3px;
}

#bruecke .legend span {
  gap: 3px;
  padding: 2px 5px;
  color: #eaf3ff;
  background: #273f63;
  box-shadow: none;
  font-size: 10px;
}

#bruecke .legend i {
  width: 6px;
  height: 6px;
  background: #69baff !important;
}

#bruecke .legend span:nth-child(2) i {
  background: #ff7d71 !important;
}

#bruecke .ctl:has(#bruecke-w) {
  grid-area: weight;
  padding-inline: 3px;
}

#bruecke .ctl:has(#bruecke-w) label {
  margin: 0;
  padding-block-start: 1px;
  font-size: 12px;
}

#bruecke-wv {
  font-size: 12px;
}

#bruecke-w {
  display: block;
  height: 29px;
  margin: 0;
  touch-action: pan-y pinch-zoom;
}

#bruecke .reads {
  grid-area: reading;
  display: block;
  min-width: 0;
}

#bruecke .rd {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 6px;
  border-radius: 7px;
  background: #213959;
}

#bruecke .rd small, #bruecke-u {
  font-size: 11px;
}

@media (max-height: 242px) {
  #bruecke {
    grid-template-rows: 30px 30px minmax(38px, 1fr) 42px 24px;
    padding: 6px;
    gap: 3px;
  }

  #bruecke-play {
    width: 30px;
    height: 30px;
  }
}
