.play {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  gap: 0.5rem;
  margin: 1rem -1rem 0;
  padding: 0.75rem 1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.play__field {
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 0.375rem;
  background: var(--paper-deep);
  color: var(--ink);
  font: 1.125rem/1.3 var(--text);
}

.play__field::placeholder {
  color: var(--ink-soft);
  font-style: italic;
}

.play__send { width: 100%; }

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--ink-no);
  color: var(--ink-no);
}

.notice--quiet {
  border-left-color: var(--rule);
  color: var(--ink-soft);
}

/* Once the round ended, the ending's own countdown offers the new puzzle. */
.page:has(.ending:not([hidden])) .midnight { display: none; }

.latest {
  min-height: 9rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}

.latest:empty { display: none; }

.answer { margin: 0; }

.answer__question {
  margin: 0 0 0.25rem;
  color: var(--ink-soft);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.answer__ink {
  display: inline-block;
  min-width: 5rem;
}

.answer__word {
  display: block;
  min-height: 1.05em;
  font: 900 clamp(3rem, 15vw, 4.5rem)/1.05 var(--display);
}

.answer__stroke {
  display: block;
  width: 100%;
  height: 0.75rem;
  overflow: visible;
}

.answer__stroke path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.answer--drawing .answer__stroke path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 450ms ease-out 80ms forwards;
}

.answer--pending .answer__ink {
  min-width: 6rem;
  color: var(--ink-soft);
}

.answer--pending .answer__stroke path {
  animation: pulse 900ms ease-in-out infinite alternate;
}

.answer__message {
  margin: 0.5rem 0 0;
  font: 600 1.25rem/1.3 var(--display);
}

.answer__message:empty { display: none; }

.confirmation__guess {
  margin: 0;
  color: var(--ink-soft);
  font-style: italic;
  overflow-wrap: anywhere;
}

.confirmation__message {
  margin: 0.25rem 0 1rem;
  font: 700 1.5rem/1.25 var(--display);
}

.confirmation__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.history {
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--rule);
}

.row__question {
  color: var(--ink);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.row__label {
  flex: none;
  font: 700 1rem/1.2 var(--display);
}

.row.ink-muted .row__label {
  font: italic 400 1rem/1.2 var(--text);
}

.row--new { animation: settle 220ms ease-out; }

.tally {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  color: var(--ink-soft);
}

.tally__surrender {
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0 0.5rem;
  border: 0;
  background: none;
  color: var(--ink-no);
  font: italic 1rem var(--text);
  text-decoration: underline;
  cursor: pointer;
}

.tally__surrender:disabled { opacity: 0.45; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { from { opacity: 0.25; } to { opacity: 1; } }
@keyframes settle { from { opacity: 0; transform: translateY(-0.5rem); } }

@media (prefers-reduced-motion: reduce) {
  .answer--drawing .answer__stroke path {
    animation: none;
    stroke-dashoffset: 0;
  }

  .answer--pending .answer__stroke path {
    animation: none;
    opacity: 0.5;
  }

  .row--new { animation: none; }
}
