:root {
  color-scheme: light;
  --paper: #f3f1eb;
  --ink: #24241f;
  --muted: #57574e;
  --rule: #c8c6ba;
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/1.4 system-ui, sans-serif;
}

body { margin: 0; }

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: -2px;
}

.stage {
  --surface: #f9f8f3;
  --letter-ink: #24241f;
  position: relative;
  display: grid;
  isolation: isolate;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--letter-ink);
  cursor: crosshair;
  touch-action: pinch-zoom;
}

.stage[data-waves="off"] { cursor: default; }

.field {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wordmark {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  font: 800 clamp(74px, 16vw, 188px)/1.05 "Bricolage Grotesque", system-ui, sans-serif;
  font-optical-sizing: auto;
  letter-spacing: -.03em;
}

.letter {
  position: relative;
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0 .023em;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.letter span {
  display: block;
  pointer-events: none;
}

.letter-i {
  /* Match the gaps around the narrow glyph without shrinking its touch target to the ink. */
  min-width: 28px;
  margin-inline: -.012em -.018em;
}

.letter[data-grabbed] { cursor: grabbing; }
.letter:focus-visible { outline-offset: 2px; }

.landing {
  min-height: 100vh;
  min-height: 100svh;
  border: 0;
  background: var(--paper);
  cursor: default;
}

@media (forced-colors: active) {
  .field { opacity: .3; }
  .stage { border-color: CanvasText; }
}
