:root {
  font-family: "Google Sans Flex", Arial, Helvetica, sans-serif;
  --action-row-height: 54px;
  --info-anchor-height: 42px;
  --segmented-height: 50px;
  --info-bottom-gap: max(18px, env(safe-area-inset-bottom));
  --segmented-overhang: calc((var(--segmented-height) - var(--info-anchor-height)) / 2);
  --segmented-bottom-gap: calc(var(--info-bottom-gap) - var(--segmented-overhang));
}
* { box-sizing: border-box; }
.restoring-game *, .restoring-game *::before, .restoring-game *::after {
  animation: none !important;
  transition: none !important;
}
button, input { font-family: inherit; }
html { min-height: 100%; }
body {
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  justify-items: center;
  font-family: inherit;
  color: #233347;
  background: url("img-desktop.jpg") center / cover no-repeat;
}
@media (max-width: 600px) {
  body { background-image: url("img-mobile.jpg"); }
}
.blur-spread {
  --origin-x: 50vw;
  --origin-y: 50vh;
  --reach: 0px;
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(232,255,239,.092);
  -webkit-backdrop-filter: blur(12px) saturate(132%);
  backdrop-filter: blur(12px) saturate(132%);
  -webkit-clip-path: circle(var(--reach) at var(--origin-x) var(--origin-y));
  clip-path: circle(var(--reach) at var(--origin-x) var(--origin-y));
  transition: -webkit-clip-path 1350ms cubic-bezier(.18,.75,.2,1),
    clip-path 1350ms cubic-bezier(.18,.75,.2,1);
}
body.is-spread .blur-spread { --reach: var(--full-reach); }
main {
  width: min(100%, 560px);
  padding: 0 max(8px, env(safe-area-inset-left), env(safe-area-inset-right));
  text-align: center;
}
#letter-form {
  --form-edge-padding: max(26px, env(safe-area-inset-top), env(safe-area-inset-bottom));
  display: grid;
  /* Equal outer tracks place the wheel's center at 50% of the viewport. */
  grid-template-rows: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  justify-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding-block: var(--form-edge-padding);
}
.wheel-header {
  /* Match the expanded slider's outer bottom edge, while clearing the top safe area. */
  align-self: stretch;
  margin-top: calc(max(var(--segmented-bottom-gap), env(safe-area-inset-top)) - var(--form-edge-padding));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  width: 100%;
}
.wheel-header > .title { grid-row: 1; }
.wheel-footer {
  align-self: start;
  display: grid;
  justify-items: center;
  width: 100%;
}
.info-control-anchor {
  position: fixed;
  left: 50%;
  bottom: var(--info-bottom-gap);
  z-index: 2;
  width: 0;
  height: var(--info-anchor-height);
}
.view-segmented {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112px;
  height: var(--segmented-height);
  border: 0;
  border-radius: 25px;
  background: transparent;
  overflow: hidden;
  transform: translate(-50%, -50%);
  transition: width 600ms cubic-bezier(.22,1,.36,1), background-color 350ms ease;
}
.view-segmented.expanded { width: 252px; background-color: #555F68; }
.view-segmented-slider {
  position: absolute;
  z-index: 1;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(100% - 8px);
  border-radius: 21px;
  background: rgba(255,255,255,.25);
  opacity: 0;
  pointer-events: none;
  transform: translateX(0);
  transition: width 600ms cubic-bezier(.22,1,.36,1),
    transform 350ms cubic-bezier(.22,1,.36,1), opacity 250ms ease 130ms;
}
.view-segmented.expanded .view-segmented-slider { width: calc(50% - 4px); opacity: 1; }
.view-segmented[data-active="countdown"] .view-segmented-slider { transform: translateX(100%); }
.view-segmented-button {
  position: absolute;
  z-index: 2;
  top: 4px;
  bottom: 4px;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.info-button {
  left: 4px;
  width: calc(100% - 8px);
  overflow: hidden;
  transition: width 600ms cubic-bezier(.22,1,.36,1);
}
.view-segmented.expanded .info-button { width: calc(50% - 4px); }
.info-label-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 200%;
  transform: translateY(0);
  transition: transform 600ms cubic-bezier(.22,1,.36,1);
}
.info-label-item {
  display: flex;
  flex: 0 0 50%;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.view-segmented.expanded .info-label-stack { transform: translateY(-50%); }
.countdown-button {
  right: 4px;
  width: calc(50% - 4px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: opacity 280ms ease, transform 400ms ease;
}
.view-segmented.expanded .countdown-button {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 130ms;
}
.view-segmented-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
  border-radius: 20px;
}
.title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 340px;
  max-width: calc(100vw - 20px);
  height: 92px;
  flex: none;
  margin: 0;
  font-size: 72px;
  font-weight: 600;
  line-height: 1;
}
/* Move the ink without moving the 92px grid item or the display below it. */
.title > span { transform: translateY(-20px); }
.title-symbol-viewport {
  color: var(--countdown-color, inherit);
  transition: color .42s ease;
  position: relative;
  display: block;
  width: .64em;
  height: 1em;
  flex: 0 0 .64em;
  overflow: hidden;
  isolation: isolate;
}
.title-symbol-layer {
  position: absolute;
  inset: 0;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  will-change: transform;
}
.title-symbol-layer.digit-layer { transform: translate3d(0, 100%, 0); }
.title-symbol-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.title-glyph-text {
  fill: currentColor;
  font-family: "Google Sans Flex", Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 250px;
  font-optical-sizing: auto;
  text-anchor: middle;
  font-variant-numeric: lining-nums tabular-nums;
}
.title-morph-path { fill: currentColor; shape-rendering: geometricPrecision; }
#title-main-shape, #title-question-dot { opacity: 0; }
.display-area {
  grid-row: 3;
  align-self: end;
  width: 302px;
  max-width: 100%;
  height: var(--action-row-height);
  margin: 0 auto 20px;
  position: relative;
  overflow: hidden;
  transition: margin-bottom 650ms cubic-bezier(.22,.75,.26,1);
}
.display-area.message-sliding,
.display-area.message-complete {
  margin-bottom: 12px;
}
.answer-content {
  position: absolute;
  inset: 0;
}
.answer-content { transform: translateX(0); }
.share-message, .countdown-message {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  color: #233347;
  font-size: clamp(12px, 4.8vw, 16px);
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .65);
  visibility: hidden;
  pointer-events: none;
}
.share-message {
  transform: translateX(100%);
}
.countdown-message {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px) scale(.96);
}
.display-area.message-sliding .answer-content {
  animation: answer-slide-left 650ms cubic-bezier(.22,.75,.26,1) both;
}
.display-area.message-sliding .share-message {
  visibility: visible;
  animation: share-message-slide-in 650ms cubic-bezier(.22,.75,.26,1) both;
}
.display-area.message-complete .answer-content {
  visibility: hidden;
  transform: translateX(-100%);
}
.display-area.message-complete .share-message {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 300ms ease, transform 360ms ease, visibility 0s;
}
.display-area.message-complete .countdown-message {
  transition: opacity 300ms ease, transform 360ms ease, visibility 0s linear 360ms;
}
#letter-form:has(.wheel.countdown-view) .display-area.message-complete .share-message {
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px) scale(.96);
  transition: opacity 300ms ease, transform 360ms ease, visibility 0s linear 360ms;
}
#letter-form:has(.wheel.countdown-view) .display-area.message-complete .countdown-message {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 300ms ease, transform 360ms ease, visibility 0s;
}
@keyframes answer-slide-left {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@keyframes share-message-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.display {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: var(--action-row-height);
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #000;
  caret-color: #000;
  font: inherit;
  font-size: 32px;
  font-weight: 500;
  line-height: var(--action-row-height);
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
.display::selection { background: #444; color: #fff; }
.display.overlay-active { color: transparent; }
.display.answer-revealed { color: transparent; caret-color: transparent; }
.display.tiles-active { caret-color: transparent; }
.display.correct-submitted { color: #4ade80; caret-color: transparent; }
.display.invalid { color: transparent; caret-color: transparent; }
.display.wave-active { color: transparent; caret-color: transparent; }
.typed-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
  color: #000;
  font-size: 32px;
  font-weight: 500;
  white-space: pre;
}
.typed-text.active { visibility: visible; }
.typed-text.invalid { color: #ef4444; }
.typed-text.solved { color: #16a34a; }
.typed-text.answer-reveal { color: #16a34a; }
.typed-text.shake { animation: incorrect-shake .5s ease-in-out 1; }
.typed-letter { display: inline-block; }
.typed-text.tiles-active { gap: 8px; }
.typed-text.tiles-active .typed-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 50px;
  border: 1px solid rgba(35, 51, 71, .55);
  border-radius: 9px;
  background: rgba(255, 255, 255, .18);
}
.typed-text.tile-wave .typed-letter {
  color: #16a34a;
  will-change: transform;
  animation: create-wave 1.05s ease-in-out 1 both;
  animation-delay: calc(var(--index) * 95ms);
}
.typed-letter.grow {
  animation: letter-grow .32s cubic-bezier(.16, 1, .3, 1) 1;
}
.typed-letter.invalid-pop {
  animation: letter-grow var(--invalid-duration) cubic-bezier(.16, 1, .3, 1)
    var(--invalid-delay) 1 reverse both;
}
.typed-text.answer-reveal .typed-letter {
  opacity: 0;
  will-change: transform, opacity;
  animation: answer-letter-drop .58s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--index) * 120ms);
}
.word-wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  visibility: hidden;
  pointer-events: none;
  color: #4ade80;
  font-size: 32px;
  font-weight: 500;
  white-space: pre;
}
.word-wave.active { visibility: visible; }
.word-wave .wave-letter { display: inline-block; }
.word-wave.active .wave-letter {
  will-change: transform;
  animation: create-wave 1.05s ease-in-out 1 both;
  animation-delay: calc(var(--index) * 95ms);
}
@keyframes create-wave {
  0%, 100% { transform: translateY(0); }
  28% { transform: translateY(-12px); }
  58% { transform: translateY(7px); }
  82% { transform: translateY(-3px); }
}
@keyframes letter-grow {
  0% { opacity: 0; transform: scale(.25); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes answer-letter-drop {
  0% { opacity: 0; transform: translateY(-38px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes incorrect-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
@keyframes usage-count-in {
  0% { opacity: 0; transform: scale(.25); }
  100% { opacity: 1; transform: scale(1); }
}
.wheel {
  position: relative;
  width: min(94vw, 360px);
  height: min(94vw, 360px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background: transparent;
  user-select: none;
  transition: height .7s cubic-bezier(.16, 1, .3, 1),
    border-radius .7s cubic-bezier(.16, 1, .3, 1),
    background .45s ease, box-shadow .45s ease;
}
@property --center-opening {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}
.wheel-face {
  --center-opening: 0%;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  -webkit-mask-image: radial-gradient(circle at center, transparent 0 var(--center-opening), #000 calc(var(--center-opening) + .35%));
  mask-image: radial-gradient(circle at center, transparent 0 var(--center-opening), #000 calc(var(--center-opening) + .35%));
  box-shadow: 0 18px 45px #27324135, inset 0 2px 5px #ffffff22;
  pointer-events: none;
  transition: --center-opening 1100ms cubic-bezier(.22,.72,.2,1),
    background-color 900ms ease, -webkit-backdrop-filter 950ms ease,
    backdrop-filter 950ms ease;
}
.result-ring {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.ring-track, .ring-arc { fill: none; stroke-width: 33; }
.ring-track { stroke: rgba(255, 255, 255, .06); opacity: 0; }
.wheel.doughnut-visible .ring-track { opacity: 1; }
.ring-arc {
  stroke: #2f72f4;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 180px 180px;
  stroke-dasharray: 0 1027.3;
  stroke-dashoffset: 0;
  opacity: 0;
}
.wheel.doughnut-visible .wheel-face {
  --center-opening: 58%;
  -webkit-backdrop-filter: blur(0) saturate(100%);
  backdrop-filter: blur(0) saturate(100%);
}
.wheel.doughnut-visible .ring-arc {
  transition: stroke-dasharray 2000ms linear 950ms,
    stroke-dashoffset 2000ms linear 950ms, opacity 320ms ease 950ms;
}
.wheel.ring-morphing .ring-arc {
  transition: stroke-dasharray 800ms cubic-bezier(.2,.8,.2,1),
    stroke-dashoffset 800ms cubic-bezier(.2,.8,.2,1), opacity 320ms ease;
}
.wheel.countdown-ticking .ring-arc {
  transition: stroke-dasharray 1000ms linear, opacity 220ms ease;
}
.wheel.stats-card {
  height: 292px;
  border-radius: 26px;
  background: linear-gradient(145deg, #4b5167 0%, #232838 82%);
  box-shadow: 0 18px 45px #27324135, inset 0 1px 4px #ffffff22;
}
.answer-doughnut {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility 0s linear .35s;
}
.wheel.doughnut-visible .answer-doughnut {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s ease 1.1s, visibility 0s linear 1.1s;
}
.doughnut-center {
  position: absolute;
  inset: 21%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 50%;
  color: #fff;
}
.doughnut-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  text-align: center;
  transform: translateY(8px) scale(.96);
  opacity: 0;
  transition: opacity 300ms ease, transform 360ms ease;
}
.doughnut-ranking { opacity: 1; transform: translateY(0) scale(1); }
.wheel.countdown-view .doughnut-ranking {
  opacity: 0;
  transform: translateY(8px) scale(.96);
}
.wheel.countdown-view .doughnut-countdown {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.doughnut-ranking > span,
.doughnut-countdown > span {
  color: rgba(255, 255, 255, .68);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.doughnut-ranking > .doughnut-percent {
  color: #6d96ff;
  font-size: 13px;
}
.doughnut-ranking > strong,
.doughnut-countdown > strong {
  font-size: clamp(20px, 6vw, 28px);
  font-weight: 600;
  letter-spacing: .08em;
}
.doughnut-ranking > strong { font-size: clamp(16px, 4vw, 21px); }
.doughnut-countdown > strong { font-size: clamp(13px, 3.5vw, 17px); letter-spacing: 0; }
.doughnut-countdown > strong.demo-time {
  font-size: clamp(40px, 12vw, 54px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
}
.doughnut-countdown { gap: 10px; }
.doughnut-countdown > strong.has-digits {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.digit-slot {
  position: relative;
  display: inline-block;
  flex: 0 0 .64em;
  width: .64em;
  height: 1.17em;
  overflow: hidden;
}
.digit-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.countdown-fixed { white-space: pre; }
.letter {
  position: absolute;
  width: 19%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .2);
  outline: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .92);
  font-size: clamp(27px, 7vw, 42px);
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12),
    0 8px 18px rgba(0, 0, 0, .16);
  transition: background-color 120ms, border-color 120ms, box-shadow 120ms,
    left .42s cubic-bezier(.16, 1, .3, 1), top .42s cubic-bezier(.16, 1, .3, 1);
}
.letter:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .28);
}
.letter.is-pressing { animation: letter-press 260ms ease-out; }
@keyframes letter-press {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  35% {
    transform: translate(-50%, calc(-50% + 6px)) scale(.93);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08),
      0 2px 5px rgba(0, 0, 0, .14);
  }
  68% { transform: translate(-50%, calc(-50% - 2px)) scale(1.04); }
}
.wheel.letters-exiting .letter,
.wheel.letters-exiting.hint-visible .hint-pop-button.hint-pop-button {
  pointer-events: none;
  animation: letter-bounce-out 520ms cubic-bezier(.16, 1, .3, 1)
    var(--exit-delay, 0ms) forwards;
}
.wheel.letters-exiting .letter { z-index: 4; }
.wheel.letters-exiting.hint-visible .hint-pop-button.hint-pop-button {
  visibility: visible;
  opacity: 1;
}
.wheel.restored-result .letter,
.wheel.restored-result .hint-pop-button.hint-pop-button {
  opacity: 0;
  visibility: hidden;
  animation: none;
  pointer-events: none;
}
@keyframes letter-bounce-out {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  24% {
    transform: translate(-50%, calc(-50% + 5px)) scale(.82);
    box-shadow: 0 0 0 #7737b5, 0 2px 5px #15132355;
  }
  48% { transform: translate(-50%, calc(-50% - 3px)) scale(1.12); }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.2);
    box-shadow: 0 0 0 #7737b5, 0 2px 5px #15132300;
  }
}
.top    { left: 50%; top: 12%; }
.right  { left: 88%; top: 50%; }
.bottom { left: 50%; top: 88%; }
.left   { left: 12%; top: 50%; }
.wheel.hint-visible .top { left: 50%; top: 12%; }
.wheel.hint-visible .right { left: 86.14%; top: 38.26%; }
.wheel.hint-visible .bottom { left: 72.34%; top: 80.74%; }
.wheel.hint-visible .left { left: 27.66%; top: 80.74%; }
.hint-pop-button {
  position: absolute;
  left: 13.86%;
  top: 38.26%;
  z-index: 12;
  width: 19%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .2);
  outline: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.2);
  display: grid;
  place-items: center;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .92);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12),
    0 8px 18px rgba(0, 0, 0, .16);
  transition: background-color .12s, border-color .12s, box-shadow .12s,
    transform .5s cubic-bezier(.22, 1, .36, 1);
}
.hint-bulb-fill {
  fill: #fbbc04;
  stroke: #fbbc04;
}
.wheel.hint-visible .hint-pop-button {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  animation: hint-pop .38s cubic-bezier(.16, 1, .3, 1);
}
.hint-pop-button svg { width: 48%; height: 48%; }
.hint-pop-button:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .28);
}
.hint-pop-button:active:not(.is-centered) {
  transform: translate(-50%, calc(-50% + 4px)) scale(.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08),
    0 2px 5px rgba(0, 0, 0, .14);
}
.wheel.hint-visible .hint-pop-button.is-centered {
  transform: translate(
    calc(-50% + var(--hint-move-x, 0px)),
    calc(-50% + var(--hint-move-y, 0px))
  );
}
.hint-pop-button.wheel-open {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12),
    0 8px 18px rgba(0, 0, 0, .16);
}
.hint-pop-button[aria-disabled="true"] { cursor: wait; }
@keyframes hint-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.wheel.hint-visible .hint-pop-button.is-returning {
  visibility: visible;
  opacity: 1;
  pointer-events: none;
  animation: none;
}
.wheel.hint-visible .hint-pop-button.hint-used-exit {
  visibility: visible;
  pointer-events: none;
  animation: hint-pop .38s cubic-bezier(.16, 1, .3, 1) reverse both;
}
.hint-menu {
  position: absolute;
  inset: 0;
  z-index: 11;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.hint-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, .14);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.hint-backdrop[hidden] { display: none; }
.hint-backdrop.open { opacity: 1; pointer-events: auto; }
.wheel.spinner-open { z-index: 11; }
.hint-menu[hidden] { display: none; }
.hint-menu.open { opacity: 1; pointer-events: auto; }
.hint-menu.is-contracting { opacity: 1; pointer-events: none; }
.hint-wheel-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translate(
    calc(-50% + var(--wheel-start-x, 0px)),
    calc(-50% + var(--wheel-start-y, 0px))
  ) scale(.19);
  transition: opacity .42s, transform .48s cubic-bezier(.22, 1, .36, 1);
}
.hint-menu.open .hint-wheel-wrap {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.hint-wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 18px solid #fff;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45));
}
.hint-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: conic-gradient(
    from -45deg,
    rgb(37, 99, 235) 0 25%,
    rgb(217, 119, 6) 25% 50%,
    rgb(22, 163, 74) 50% 75%,
    rgb(220, 38, 38) 75% 100%
  );
  box-shadow: inset 0 0 28px rgba(0, 0, 0, .25);
  transition: transform 2.4s cubic-bezier(.12, .72, .12, 1);
  will-change: transform;
}
.wheel-option {
  position: absolute;
  width: 100px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
.wheel-label {
  display: inline-block;
  transition: transform 2.4s cubic-bezier(.12, .72, .12, 1);
  will-change: transform;
}
.wheel-option:nth-child(1) { top: 26px; left: 50%; transform: translateX(-50%); }
.wheel-option:nth-child(2) { top: 50%; right: 10px; transform: translateY(-50%); }
.wheel-option:nth-child(3) { bottom: 26px; left: 50%; transform: translateX(-50%); }
.wheel-option:nth-child(4) { top: 50%; left: 10px; transform: translateY(-50%); }
.letter-label {
  display: inline-block;
}
.key-usage-count {
  display: inline-block;
  margin-left: 2px;
  font-size: .5em;
  vertical-align: sub;
  transform-origin: left bottom;
  animation: usage-count-in .25s cubic-bezier(.16, 1, .3, 1) both;
}
.wheel-actions {
  display: flex;
  justify-content: center;
  gap: clamp(0px, calc(50vw - 122px), 18px);
  height: var(--action-row-height);
  margin-top: 20px;
  margin-bottom: 24px;
  overflow: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .25s, transform .25s, margin .25s;
}
.wheel.spinner-open ~ .wheel-footer .wheel-actions { position: relative; z-index: 12; }
.wheel.doughnut-visible ~ .wheel-footer .wheel-actions {
  margin-top: 12px;
  margin-bottom: 0;
}
.wheel-action {
  position: relative;
  flex-shrink: 0;
  width: 54px;
  height: var(--action-row-height);
  border: 0;
  outline: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  background: #596176;
  color: white;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 0 #34394b;
  transition: width 380ms ease, margin-right 380ms ease, border-radius 380ms ease, transform 380ms ease, background 100ms, box-shadow 100ms, opacity 260ms ease;
}
.wheel-action.is-morphed { width: 100px; border-radius: 999px; }
.wheel-action:not(.is-morphed):not(.is-action-centered):not(.is-returning) { transition: width 380ms ease, margin-right 380ms ease, border-radius 380ms ease, transform 100ms, background 100ms, box-shadow 100ms, opacity 260ms ease; }
.delete-button.is-action-centered { transform: translateX(var(--back-center-x, 0px)); }
.enter-button.is-spin-retiring { margin-right: 46px; }
.enter-button.is-spin-retiring:disabled { opacity: 1; }
.enter-button.is-spin-retiring .button-morph-icon { opacity: 0; transition-delay: 200ms; }
.enter-button.is-spin-retiring .button-morph-text { transition-delay: 0ms; }
.enter-button.is-spin-hidden { visibility: hidden; pointer-events: none; opacity: 0; }
.wheel.spinner-open ~ .wheel-footer .wheel-actions .delete-button:disabled { opacity: 1; cursor: default; }
.wheel-action:hover { background: #6c748a; }
.wheel-action:active {
  transform: translateY(4px) scale(.94);
  box-shadow: 0 0 0 #34394b;
}
.delete-button.is-action-centered:active {
  transform: translateX(var(--back-center-x, 0px)) translateY(4px) scale(.94);
}
.wheel-action .button-morph-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: left 380ms ease, opacity 260ms ease;
}
.icon-window {
  position: absolute;
  top: 0;
  left: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
}
.icon-track {
  display: flex;
  flex-direction: column;
  width: 54px;
  height: 108px;
  transform: translateY(0);
}
.icon-slot {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
}
.social-icon { width: 26px; height: 26px; color: #fff; }
/* The reveal updates the ring and actions together; explicit endpoints keep the slide observable. */
.wheel-actions.social-visible .icon-track {
  transform: translateY(-54px);
  animation: social-icon-slide 550ms cubic-bezier(.22,.75,.26,1) both;
}
@keyframes social-icon-slide {
  from { transform: translateY(0); }
  to { transform: translateY(-54px); }
}
.wheel-actions.social-visible .wheel-action.wheel-action {
  width: 54px;
  border-radius: 50%;
  visibility: visible;
  opacity: 1;
  transform: none;
  margin-right: 0;
  transition: background-color 400ms ease, transform 380ms ease;
}
.wheel-actions.social-visible .delete-button { background: #1877f2; }
.wheel-actions.social-visible .enter-button { background: #111; }
.wheel-actions.social-visible .button-morph-text { opacity: 0; }
.wheel-action.is-morphed .button-morph-icon { left: 27px; }
.button-morph-text {
  position: absolute;
  top: 50%;
  left: 47px;
  color: white;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: transform 340ms ease, opacity 260ms ease;
}
.back-text--up, .spin-text--up { transform: translateY(calc(-50% + 16px)); }
.wheel-action.is-morphed .button-morph-text {
  transform: translateY(-50%);
  opacity: 1;
  transition-delay: 80ms;
}
.spin-morph-lines { fill: none; stroke: currentColor; stroke-width: 2.4; transition: opacity 130ms ease; }
.spin-custom-rotator { opacity: 0; transform-origin: 26px 26px; transition: opacity 180ms ease; }
.spin-custom-shape { fill: currentColor; stroke: none; }
.enter-button.is-morphed .spin-morph-lines { opacity: 0; transition-delay: 235ms; }
.enter-button.is-morphed .spin-custom-rotator {
  opacity: 1;
  transition-delay: 235ms;
  animation: spin-clockwise 1.2s linear 235ms 1 forwards;
}
@keyframes spin-clockwise { to { transform: rotate(360deg); } }
.center-word {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: clamp(27px, 7vw, 36px);
  font-weight: 800;
  letter-spacing: 3px;
  pointer-events: none;
  opacity: 1;
  transition: opacity .32s ease, transform .32s cubic-bezier(.16, 1, .3, 1);
}
.wheel.answer-transition .center-word {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.82);
}
.answer-stats {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 24px;
  visibility: hidden;
  opacity: 0;
  transform: scale(.94);
  pointer-events: none;
  color: #fff;
  transition: opacity .38s ease, transform .38s cubic-bezier(.16, 1, .3, 1);
}
.wheel.stats-card .answer-stats { visibility: visible; }
.wheel.stats-visible .answer-stats {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.stats-heading {
  margin: 0 0 8px;
  color: #4ade80;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .04em;
}
.answer-message {
  margin: 0 0 17px;
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 0 10px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .32s ease, transform .42s cubic-bezier(.16, 1, .3, 1);
}
.stat-item + .stat-item { border-left: 1px solid rgba(255, 255, 255, .18); }
.wheel.stats-visible .stat-item {
  opacity: 1;
  transform: translateY(0);
}
.wheel.stats-visible .stat-item:nth-child(1) { transition-delay: 0ms; }
.wheel.stats-visible .stat-item:nth-child(2) { transition-delay: 110ms; }
.wheel.stats-visible .stat-item:nth-child(3) { transition-delay: 220ms; }
.stat-value {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}
.stat-label {
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.share-prompt {
  width: min(100%, 270px);
  margin: 15px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
}
.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(100%, 220px);
  height: 42px;
  margin-top: 12px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .12s, border-color .15s;
}
.share-button:hover {
  border-color: rgba(255, 255, 255, .48);
  background: rgba(255, 255, 255, .18);
}
.share-button:active { transform: scale(.97); }
.share-button svg { width: 18px; height: 18px; flex: none; }
.wheel-actions .share-button {
  flex: 0 0 0;
  width: 0;
  height: var(--action-row-height);
  margin: 0 -9px;
  padding: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transform: scaleX(.7);
  pointer-events: none;
  border-width: 0;
  white-space: nowrap;
  transition: flex-basis 550ms cubic-bezier(.22,.75,.26,1),
    width 550ms cubic-bezier(.22,.75,.26,1), margin 550ms cubic-bezier(.22,.75,.26,1),
    padding 550ms cubic-bezier(.22,.75,.26,1), opacity 280ms ease,
    transform 550ms cubic-bezier(.22,.75,.26,1), visibility 0s linear 550ms;
}
.wheel-actions.social-visible .share-button {
  flex-basis: 120px;
  width: 120px;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  visibility: visible;
  opacity: 1;
  transform: scaleX(1);
  pointer-events: auto;
  border-width: 1px;
  transition-delay: 0s;
}
/* Short viewports use content-sized rows so controls can scroll without overlap. */
@media (max-height: 800px) {
  #letter-form {
    min-height: 0;
    grid-template-rows: auto auto auto;
  }
  .info-control-anchor {
    position: relative;
    left: auto;
    bottom: auto;
    justify-self: center;
    margin-bottom: var(--info-bottom-gap);
  }
}
@media (prefers-reduced-motion: reduce) {
  .title-symbol-viewport { transition: none; }
  .typed-text.shake,
  .typed-letter.grow,
  .typed-letter.invalid-pop,
  .typed-text.tile-wave .typed-letter,
  .typed-text.answer-reveal .typed-letter,
  .word-wave.active .wave-letter,
  .key-usage-count { animation: none; }
  .letter { transition: none; }
  .wheel.letters-exiting .letter,
  .wheel.letters-exiting.hint-visible .hint-pop-button.hint-pop-button { opacity: 0; animation: none; }
  .wheel.hint-visible .hint-pop-button { animation: none; }
  .wheel.hint-visible .hint-pop-button.hint-used-exit { opacity: 0; animation: none; }
  .hint-pop-button,
  .hint-backdrop,
  .hint-menu,
  .hint-wheel-wrap,
  .hint-wheel,
  .wheel-label,
  .answer-doughnut,
  .blur-spread,
  .wheel-face,
  .ring-arc,
  .doughnut-center,
  .doughnut-view,
  .display-area.message-complete .share-message,
  .display-area.message-complete .countdown-message,
  #letter-form:has(.wheel.countdown-view) .display-area.message-complete .share-message,
  #letter-form:has(.wheel.countdown-view) .display-area.message-complete .countdown-message,
  .view-segmented,
  .view-segmented-button,
  .info-label-stack,
  .view-segmented-slider,
  .display-area,
  .wheel,
  .center-word,
  .answer-stats,
  .stat-item,
  .wheel-actions,
  .wheel-action,
  .wheel-action .button-morph-icon,
  .icon-track,
  .button-morph-text,
  .spin-morph-lines,
  .spin-custom-rotator,
  .share-button,
  .info-button { transition: none; }
  .wheel-actions.social-visible .wheel-action.wheel-action,
  .wheel-actions .share-button { transition: none; }
  .wheel-actions.social-visible .icon-track { animation: none; }
  .enter-button.is-morphed .spin-custom-rotator { animation: none; }
  .typed-text.answer-reveal .typed-letter {
    opacity: 1;
    transform: none;
  }
}
