:root {
  color-scheme: dark;
  background: #000;
  --app-height: 100dvh;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: var(--app-height);
  margin: 0;
  overflow: hidden;
  background: #000;
}

body {
  position: fixed;
  inset: 0;
  height: var(--app-height);
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#stage {
  width: 100vw;
  height: var(--app-height);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding:
    calc(18px + env(safe-area-inset-top))
    calc(22px + env(safe-area-inset-right))
    calc(16px + env(safe-area-inset-bottom))
    calc(22px + env(safe-area-inset-left));
  overflow: hidden;
  cursor: pointer;
}

#note {
  width: 100%;
  max-height: 100%;
  overflow: visible;
  color: #fff;
  font-size: 40px;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: normal;
  word-break: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  pointer-events: none;
}

#progressBar {
  width: 100%;
  height: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
}

#counter {
  position: fixed;
  left: calc(12px + env(safe-area-inset-left));
  bottom: 5px;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
}

@media (orientation: landscape) {
  #stage {
    padding:
      calc(12px + env(safe-area-inset-top))
      calc(24px + env(safe-area-inset-right))
      calc(10px + env(safe-area-inset-bottom))
      calc(24px + env(safe-area-inset-left));
  }

  #counter {
    font-size: 16px;
  }
}
