* {
  box-sizing: border-box;
}

html,
body {
    overscroll-behavior-y: contain;
}

svg {
  --target: 1;
  --tightness: 1.5;
  --base-opacity: 1;
  width: 100%;
  height: 100%;
}

g .tile {
  --diff: calc(abs(var(--level) - var(--target)));
  opacity: calc(0.1 + 0.9 * var(--base-opacity) * exp(0 - pow(2, var(--tightness)) * var(--diff)));
}

text {
  user-select: none;
}

body {
  overflow: hidden;
  display: grid;
  margin: 0;
  height: 100svh;
  width: 100svw;
  grid-template-rows: min-content 1fr;
  font-family: sans-serif;
}
main {
  background: white;
}

#controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5lh 1em;
  justify-content: space-between;
  padding: 0.5lh 0.5em;
  
  & > div {
    display: flex;
    gap: 0.5em;
  }
}

input[type="range"] {
  vertical-align: middle;
}


output {
    width: 2em;
    display: inline-block;
}