/* The held vowel: a minimal type piece. Warm paper, one word in a variable typeface with a wide width axis
   (Anybody, width 50 to 150), and a single vermilion line that measures how long the vowel is held. */
:root {
  --paper: #f4f1ea;    /* the page */
  --ink: #171614;      /* the word */
  --held: #e2471d;     /* the line under the held vowel, the only accent */
  --mark: #9a9385;     /* the notes */
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Anybody Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.stage {
  position: fixed;
  inset: 0;
  cursor: pointer;
  outline: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.stage:focus-visible::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--mark);
  border-radius: 6px;
  pointer-events: none;
}

.top {
  position: absolute;
  left: max(20px, 4vw);
  right: max(20px, 4vw);
  top: max(20px, 4vh);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.03em;
  font-variation-settings: 'wdth' 100, 'wght' 420;
  color: var(--mark);
  opacity: 0;
}

.top__brand {
  color: var(--ink);
  font-variation-settings: 'wdth' 100, 'wght' 620;
}

/* ------------------------------------------------------------------ the word */
.row {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.word {
  margin: 0;
  display: flex;
  align-items: baseline;
  font-size: var(--size, 140px);
  font-weight: 400;
  line-height: 1;
  white-space: pre;
}

.l {
  display: inline-block;
  white-space: pre;
}

.base {
  display: inline-block;
  width: 0;
  height: 0;
}

/* ------------------------------------------------------------------ the line of the held vowel */
.held {
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 1px;
  opacity: 0;
}

.held__line {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 100%;
  background: var(--held);
  transform-origin: 0 50%;
}

.held__line b {
  position: absolute;
  top: -4px;
  width: 1px;
  height: 10px;
  background: var(--held);
}

.held__time {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 12px;
  transform: translateY(-50%);
  font-size: 12px;
  font-variation-settings: 'wdth' 100, 'wght' 520;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
}

.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(22px, 5vh);
  margin: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.03em;
  font-variation-settings: 'wdth' 100, 'wght' 420;
  color: var(--mark);
  opacity: 0;
}
