* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: #fff; color: #17191c; font-family: Arial, Helvetica, sans-serif; overflow: hidden; }
button { font: inherit; }
.letter-stage { display: flex; flex-direction: column; min-height: 100svh; padding: clamp(22px, 3.5vw, 54px) clamp(22px, 5.8vw, 90px); }
.stage-kicker, .stage-bottom { align-items: center; display: flex; font: 11px/1.4 'Courier New', monospace; gap: 20px; justify-content: space-between; letter-spacing: .08em; }
.stage-kicker { color: #74777b; }
.stage-center { margin: auto 0; text-align: center; }
h1 { font: 400 clamp(26px, 8.3vw, 142px)/1.04 Georgia, 'Times New Roman', serif; letter-spacing: -.065em; margin: 0; }
.words { align-items: center; display: flex; justify-content: center; min-height: 1.35em; position: relative; touch-action: pan-y pinch-zoom; }
.word { display: inline-flex; flex-shrink: 0; }
.space { width: .28em; }
.letter { align-items: center; display: inline-grid; flex-shrink: 0; height: 1.08em; pointer-events: none; position: relative; transition: padding-inline .55s cubic-bezier(.22,1,.36,1); }
.char { grid-area: 1 / 1; justify-self: center; line-height: 1; }
.letter.active .char, .letter.pending .char { visibility: hidden; }
.letter.returning .char { animation: letter-soft-return var(--exit-duration, 620ms) cubic-bezier(.22,1,.36,1) both; }
.sticker { left: 50%; pointer-events: none; position: absolute; top: calc(50% + var(--offset, 0em)); translate: -50% -50%; z-index: 1; }
.sticker img { display: block; height: var(--height, 1.08em); max-width: var(--maxwidth, 1.377em); object-fit: contain; width: auto; }
.hit-layer { align-items: center; color: transparent; display: flex; inset: 0; justify-content: center; pointer-events: none; position: absolute; user-select: none; z-index: 3; }
.hit { align-items: center; display: inline-flex; height: 1.35em; line-height: 1; pointer-events: auto; transition: padding-inline .55s cubic-bezier(.22,1,.36,1); }
.stage-center p { color: #74777b; font: clamp(15px, 1.5vw, 20px)/1.5 Georgia, 'Times New Roman', serif; margin: 10px 0 0; }
.stage-bottom { border-top: 1px solid #dedfe0; color: #74777b; padding-top: 20px; }
.stage-bottom a { color: inherit; text-decoration: none; }
.stage-bottom a:hover, .stage-bottom a:focus-visible { color: #020560; text-decoration: underline; }
.controls { display: flex; gap: 20px; }
.controls button { background: transparent; border: 0; border-bottom: 1px solid #aeb0b3; color: #34373c; cursor: pointer; font-size: 11px; padding: 4px 0; }
.controls button:hover { border-color: #020560; color: #020560; }
.controls button:focus-visible { outline: 2px solid #020560; outline-offset: 4px; }
.controls button:disabled { cursor: wait; opacity: .4; }
.sr-only { clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
@keyframes letter-soft-return { 0%,20% { opacity: 0; transform: scale(.88); } 65% { opacity: 1; transform: scale(1.035); } 100% { opacity: 1; transform: scale(1); } }
@media (max-width: 640px) {
  .letter-stage { min-height: 100svh; padding: 22px; }
  .stage-kicker { font-size: 9px; }
  .stage-kicker span:last-child { display: none; }
  .stage-bottom { align-items: flex-start; flex-direction: column; font-size: 9px; gap: 12px; }
  .controls { gap: 16px; }
  .controls button { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .letter, .hit { transition: none; }
  .letter.returning .char { animation: none; }
  .sticker { display: none; }
}
