* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: #777;
  display: grid;
  place-items: start center;
  padding: 8px;
  font-family: Chicago, Geneva, "Helvetica Neue", Arial, sans-serif;
}

.hypercard {
  position: relative;
  width: 416px;
  height: 240px;
  background: #fff;
  overflow: hidden;
  color: #000;
  transform-origin: top center;
}

#cardImage {
  position: absolute;
  inset: 0;
  width: 416px;
  height: 240px;
  display: block;
  image-rendering: pixelated;
  user-select: none;
}

.parts-layer {
  position: absolute;
  inset: 0;
}

.part {
  position: absolute;
  margin: 0;
  padding: 0;
  font: 12px Chicago, Geneva, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
  color: #000;
}

button.part {
  appearance: none;
  border: 0;
  cursor: default;
}

.button-style-0 {
  background: transparent;
}

.button-style-3,
.button-style-9 {
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #777;
  text-align: center;
}

.button-style-3 {
  border-radius: 8px;
}

.button-style-9 {
  border-width: 2px;
  box-shadow: inset -2px -2px 0 #777, inset 1px 1px 0 #fff;
}

.button-style-6 {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  text-align: left;
  white-space: nowrap;
}

.button-style-6::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 1px solid #000;
  border-radius: 50%;
  background: #fff;
}

.hypercard[data-card="titel"] .button-style-6 {
  color: #fff;
}

.hypercard[data-card="titel"] .button-style-6::before {
  border-color: #fff;
  background: #000;
}

.hypercard[data-card="titel"] .part.hilite.button-style-6::before {
  background: #fff;
}

.part.hilite.button-style-6::before {
  box-shadow: inset 0 0 0 2px #fff;
  background: #000;
}

.part.hilite:not(.button-style-0):not(.button-style-6) {
  color: #fff;
  background: #000;
  box-shadow: none;
}

.part.field {
  overflow: hidden;
  white-space: pre-wrap;
  line-height: 15px;
  background: transparent;
}

.visual-effect {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(45deg, #000 0 2px, transparent 2px 4px);
}

.visual-effect.flash {
  animation: flash 150ms steps(2, end);
}

@keyframes flash {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
}
