:root {
  color-scheme: light;
  --ink: #191919;
  --muted: #625e58;
  --line: #d8d0c4;
  --paper: #f7f1e6;
  --hint: #ffdf58;
  --accent: #ffda45;
  --display: "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background-image: var(--paper-grain);
  background-size: 180px 180px;
}
.site-policies {
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
  line-height: 2;
}
.site-policies a {
  display: inline-block;
  padding: 8px 4px;
  color: var(--ink);
  text-underline-offset: 3px;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  touch-action: manipulation;
}
button,
input,
select,
textarea {
  border-radius: 12px;
}
button {
  border: 0;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid #1677a4;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
p {
  line-height: 1.55;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  margin: auto;
  padding: 20px 24px;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 1;
}
.brand-name {
  position: relative;
  padding-bottom: 7px;
}
.brand-name::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 8%;
  width: 78%;
  height: 5px;
  background: #dc3027;
  border-radius: 50%;
  transform: rotate(-3deg);
}
.brand-y {
  display: inline-block;
  transform: rotate(-7deg);
}
.brand-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  transform: rotate(-8deg);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.total {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
  padding: 7px 12px;
  border: 2px solid var(--ink);
  border-radius: 20px 20px 17px 20px;
  background: #ffda45;
  box-shadow: 0 2px 0 var(--ink);
}
.total strong {
  display: inline-block;
  font-size: 24px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.total span {
  font-size: 12px;
  color: var(--muted);
}
.help-button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 2px 0 var(--ink);
}
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 34px 20px 48px;
}
.connection-panel {
  margin-bottom: 26px;
}
h1 {
  max-width: 500px;
  margin: 0 auto 22px;
  font-size: 30px;
  text-align: center;
  text-wrap: balance;
}
.word-collection {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.word-collection li {
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 2px;
  border: 2px solid var(--line);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 750;
}
.empty-word {
  color: #756f66;
  background: #eee7db;
}
.empty-word[aria-current] {
  color: var(--ink);
  border: 2px solid var(--ink);
  background: #fffdf8;
  box-shadow: 0 3px 0 var(--ink);
  transform: rotate(-3deg);
}
.collected-word {
  background: #a9dcf2;
  color: #191919;
  border-color: #369dcb !important;
  box-shadow: 0 3px 0 #369dcb;
}
.revealed-word {
  background: #eee7db;
  color: var(--muted);
}
.revealed-word small {
  font-size: 9px;
  font-weight: 500;
}
.connection-actions {
  margin-top: 14px;
  text-align: center;
}
.connection-button {
  width: 100%;
  min-height: 48px;
  padding: 12px 10px;
  color: var(--ink);
  background: var(--accent);
  font-size: 15px;
  font-weight: 750;
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  border-radius: 16px;
}
.connection-button:disabled {
  border: 0;
  box-shadow: none;
  background: transparent;
  min-height: 30px;
  padding: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 450;
}
.connection-button:not(:disabled):hover {
  background: #b9231c;
}
.connection-status {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
#connection-reveal {
  text-align: center;
  margin-top: 6px;
}
#connection-art { width: clamp(96px, 26vw, 136px); margin: 12px auto 4px; }
#connection-art svg { display: block; width: 100%; height: auto; }
#connection-answer {
  font-size: 23px;
}
#connection-explanation {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}
#connection-form {
  margin-top: 16px;
}
#connection-form label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 8px;
}
#connection-form .text-button {
  margin-top: 6px;
}
#reveal-connection {
  display: block;
  margin: 12px auto 0;
}
.play-area {
  position: relative;
  background: #fffdf9;
  border: 2px solid var(--ink);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 5px 6px 0 #d8d0c4;
}
.play-area::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 26px;
  width: 38px;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: #dc3027;
  transform: rotate(6deg);
}
#clue {
  font-size: 26px;
  margin-bottom: 24px;
  scroll-margin-top: 100px;
}
#clue:focus,
#summary:focus {
  outline: none;
}
.clue-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 10px;
}
.clue-list-heading strong {
  font-weight: 600;
}
#attempt-count {
  color: var(--muted);
  white-space: nowrap;
}
.clue-list {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.hint {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 12px;
  background: #f4efe6;
}
.hint-number {
  font-size: 11px;
  font-weight: 700;
  color: #625e58;
}
.hint p {
  font-size: 16px;
  line-height: 1.45;
}
.hint.latest {
  background: var(--hint);
  border: 1px solid #d6b335;
}
.hint.latest p {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.answer-controls {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
input {
  min-width: 0;
  width: 100%;
  padding: 14px;
  background: white;
  color: var(--ink);
  border: 1.5px solid #369dcb;
  font-size: 16px;
}
input::placeholder {
  color: #355665;
  opacity: 1;
}
.primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  background: #191919;
  color: white;
  font-weight: 750;
  white-space: nowrap;
  border-radius: 15px;
  box-shadow: 0 3px 0 var(--ink);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}
.primary:active,
.connection-button:not(:disabled):active,
.help-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}
.primary:hover {
  background: #333333;
}
.text-button {
  padding: 10px 6px;
  min-height: 44px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button:hover {
  color: #333333;
}
.muted {
  color: var(--muted);
}
#give-up {
  display: block;
  margin: 18px auto -10px;
}
.notice:not(:empty):not(.sr-only) {
  margin-top: 12px;
  font-size: 13px;
  color: #b9231c;
}
#connection-notice {
  text-align: center;
}
.discovery-panel {
  margin-top: 18px;
}
#bank-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.discovery-panel h3,
#guesses-title {
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
.discovery-panel h3 {
  flex: 0 0 auto;
}
.bank-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.bank-letter {
  background: #a9dcf2;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 700;
}
.new-discovery {
  box-shadow: inset 0 -2px #1677a4;
}
#rescue-hint {
  margin-top: 10px;
  font-size: 13px;
}
#rescue-hint span {
  color: var(--muted);
  margin-right: 8px;
}
#guess-history {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.guess-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.guess-entry {
  display: flex;
  align-items: baseline;
  gap: 5px;
  max-width: 100%;
  padding: 5px 8px;
  background: #f4efe6;
  border-radius: 6px;
  font-size: 12px;
}
.guess-number {
  color: var(--muted);
  font-size: 10px;
}
.guess-word {
  overflow-wrap: anywhere;
  letter-spacing: 0.05em;
}
.guess-word mark {
  background: #a9dcf2;
  color: #191919;
  font-weight: 700;
  border-radius: 2px;
}
.correct-guess {
  background: #a9dcf2;
}
.reveal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: var(--hint);
  border-radius: 14px;
  margin: -8px 0 6px;
  border: 1px solid #d6b335;
}
.reveal strong,
#answer-reveal {
  display: block;
}
#award {
  font-size: 20px;
}
#answer-reveal {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.first-clue {
  background: #ffdf58;
}
.solve-badge {
  color: #66500b;
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 8px;
}
#continue-shortcut {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 22px;
}
.summary {
  text-align: center;
}
.finish-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  color: var(--ink);
  background: #ffda45;
  border: 2px solid var(--ink);
  border-radius: 22px;
  transform: rotate(-8deg);
  box-shadow: 3px 3px 0 #dc3027;
  font-size: 38px;
}
.summary h2 {
  font-size: 27px;
}
#finish-caption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}
.final-score {
  margin: 20px 0;
}
.final-score strong,
.final-score span {
  display: block;
}
.final-score strong {
  font-size: 48px;
  letter-spacing: -0.06em;
}
.final-score span {
  color: var(--muted);
  font-size: 12px;
}
.results {
  margin-bottom: 22px;
}
.result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 13px;
  text-align: left;
}
.result-row b {
  flex: 1;
}
.result-row span {
  color: var(--muted);
  font-size: 12px;
}
.summary .text-button {
  display: block;
  margin: 6px auto 0;
}
#share {
  display: flex;
  margin: 12px auto 0;
}
#share-status {
  font-size: 13px;
  color: var(--muted);
}
#share-text {
  width: 100%;
  min-height: 180px;
  padding: 12px;
}
dialog {
  position: fixed;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  padding: 32px 26px 26px;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 90px #19191933;
}
dialog::backdrop {
  background: #19191966;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 26px;
  max-width: 290px;
  padding-right: 20px;
}
.close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  width: 44px;
  height: 44px;
}
.rules-steps {
  list-style: decimal;
  padding-left: 20px;
  margin: 20px 0;
}
.rules-steps li {
  padding-left: 4px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.55;
}
.rules-steps li::marker {
  color: #b9231c;
  font-weight: 800;
}
.more-rules {
  border-top: 1px solid var(--line);
  padding: 12px 0;
  font-size: 13px;
}
.more-rules summary {
  cursor: pointer;
  min-height: 28px;
}
.more-rules p {
  color: var(--muted);
  margin-bottom: 10px;
}
.theme-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  padding: 8px 0 20px;
}
select {
  border: 1px solid var(--line);
  padding: 10px;
  background: white;
  color: var(--ink);
  max-width: 60%;
}
#lets-play {
  width: 100%;
}
#celebration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}
.points-flight,
.solve-spark {
  position: absolute;
  color: #1677a4;
  font-weight: 800;
  font-size: 23px;
}
@media (max-width: 600px) {
  .masthead {
    padding: 12px 16px;
  }
  .brand {
    font-size: 28px;
    gap: 4px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .header-actions {
    gap: 6px;
  }
  .total strong {
    font-size: 22px;
  }
  .total span {
    display: none;
  }
}
@media (max-width: 480px) {
  main {
    padding: 24px 16px 28px;
  }
  h1 {
    font-size: 26px;
    margin-bottom: 18px;
  }
  .word-collection {
    gap: 5px;
  }
  .word-collection li {
    min-height: 46px;
    font-size: 12px;
    border-radius: 10px;
  }
  .connection-panel {
    margin-bottom: 20px;
  }
  .play-area {
    padding: 22px 18px;
    border-radius: 18px;
  }
  #clue {
    font-size: 24px;
    margin-bottom: 20px;
  }
  .hint {
    gap: 10px;
    padding: 12px;
  }
  .hint p {
    font-size: 14px;
  }
  .hint.latest p {
    font-size: 18px;
  }
  .primary {
    padding: 12px 14px;
    font-size: 14px;
  }
  .clue-list-heading {
    font-size: 11px;
  }
  .reveal {
    padding: 12px;
  }
  #award {
    font-size: 18px;
  }
  .solve-badge {
    font-size: 11px;
  }
}
@media (max-width: 380px) {
  .masthead {
    padding-inline: 12px;
  }
  .brand {
    font-size: 26px;
  }
  .brand-mark {
    display: none;
  }
  .header-actions {
    gap: 7px;
  }
  .total span {
    display: none;
  }
  .total {
    padding-inline: 6px;
  }
  .total strong {
    font-size: 18px;
  }
  main {
    padding-inline: 12px;
  }
  .play-area {
    padding-inline: 14px;
  }
  h1 {
    font-size: 24px;
  }
  .word-collection li {
    font-size: 11px;
  }
  .answer-controls {
    gap: 6px;
  }
  .primary {
    padding-inline: 12px;
  }
  .answer-controls .primary span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

#win-breakdown {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  text-align: left;
  border-block: 1px solid var(--line);
  margin: 0 0 18px;
  padding: 16px 0;
  font-size: 13px;
}
#win-breakdown dt {
  color: var(--muted);
}
#win-breakdown dd {
  margin: 0;
  font-weight: 650;
}
#summary {
  scroll-margin-top: 100px;
}

/* A compact date strip; the calendar stays out of the play area. */
.daily-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; font-size: 14px; }
.daily-bar > div { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.day-kind { font-weight: 800; }
.archive-button { padding: 10px 14px; min-height: 44px; border: 2px solid var(--ink, #191919); border-radius: 12px; background: #fff; color: #191919; font: inherit; font-weight: 700; cursor: pointer; }
#daily-notice, .daily-rules { font-size: 14px; line-height: 1.5; }
#archive { width: min(480px, calc(100% - 24px)); }
.archive-list { display: grid; gap: 8px; margin-top: 20px; }
.archive-day { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; min-height: 56px; padding: 12px; border: 1px solid #d8d0c4; border-radius: 12px; background: #fff; color: #191919; font: inherit; text-align: left; cursor: pointer; }
.archive-day small { font-size: 12px; color: #625e58; }
.archive-day:hover, .archive-day[aria-current] { background: #ffdf58; border-color: #191919; }
@media (max-width: 480px) { .daily-bar { margin-bottom: 12px; font-size: 13px; } }

.help-button svg {
  display: block;
  width: 22px;
  height: 22px;
  margin: auto;
}
#sound[aria-pressed="false"] .wave,
#sound[aria-pressed="true"] .mute {
  display: none;
}

/* Motion from the supplied Hunchy prototype. */
.brand-mark {
  transform-origin: 50% 80%;
  animation: mark-wobble 6s ease-in-out infinite;
}
@keyframes mark-wobble {
  0%, 82%, 100% { transform: rotate(-8deg); }
  86% { transform: rotate(8deg) scale(1.1); }
  90% { transform: rotate(-16deg) scale(1.04); }
  94% { transform: rotate(-4deg); }
}
.empty-word[aria-current] {
  animation: slot-bob 2.4s ease-in-out infinite;
}
@keyframes slot-bob {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-5px); }
}
.connection-button:not(:disabled) {
  position: relative;
  overflow: hidden;
  animation: ready-ping 1.8s ease-out infinite;
}
.connection-button:not(:disabled)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, #ffffffaa 50%, transparent 65%);
  transform: translateX(-100%);
  animation: shimmer 2.6s ease-in-out infinite;
}
@keyframes ready-ping {
  0% { box-shadow: 0 3px 0 var(--ink), 0 0 0 0 #ffda45cc; }
  70%, 100% { box-shadow: 0 3px 0 var(--ink), 0 0 0 12px #ffda4500; }
}
@keyframes shimmer {
  0%, 55% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.fx-clue-in {
  animation: clue-in 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes clue-in {
  0% { opacity: 0; transform: translateY(-16px) scale(0.94) rotate(-1.5deg); }
  60% { opacity: 1; }
  100% { transform: none; }
}
.fx-pop {
  animation: pop 0.45s cubic-bezier(0.3, 1.8, 0.5, 1) both;
}
@keyframes pop {
  0% { opacity: 0; transform: scale(0) rotate(-20deg); }
  100% { opacity: 1; transform: none; }
}
.fx-shake {
  animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
.fx-shake input {
  border-color: #d9534f;
  box-shadow: 0 0 0 3px #dc302766;
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}
.fx-flip {
  animation: flip 0.7s cubic-bezier(0.3, 1.3, 0.5, 1) both;
}
@keyframes flip {
  0% { transform: perspective(400px) rotateX(90deg) scale(0.8); }
  60% { transform: perspective(400px) rotateX(-14deg) scale(1.1); }
  100% { transform: none; }
}
.fx-wave {
  animation: wave 0.65s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
@keyframes wave {
  0%, 100% { transform: none; }
  40% { transform: translateY(-16px) rotate(-5deg) scale(1.1); background: #ffda45; }
}
.fx-slide-in {
  animation: slide-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes slide-in {
  0% { opacity: 0; transform: translateX(48px) rotate(1.5deg); }
  100% { opacity: 1; transform: none; }
}
.fx-sad {
  animation: sad 0.9s ease both;
}
@keyframes sad {
  0% { transform: translateY(-8px); }
  30% { transform: translateY(5px) rotate(-2deg); }
  60% { transform: translateY(-2px) rotate(1deg); }
  100% { transform: none; }
}
.fx-spin {
  animation: spin-in 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes spin-in {
  0% { transform: rotate(-260deg) scale(0); }
  100% { transform: rotate(-8deg) scale(1); }
}
.fx-stamp {
  animation: stamp 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
@keyframes stamp {
  0% { opacity: 0; transform: scale(2.6) rotate(-8deg); }
  100% { opacity: 1; transform: none; }
}
.fx-score-down {
  animation: score-down 0.7s ease;
}
@keyframes score-down {
  0% { color: #d9534f; transform: scale(1.25) rotate(-4deg); }
  100% { transform: none; }
}
#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 11;
}
#fx-layer {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
}
.fx-banner {
  grid-area: 1 / 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0 16px;
  text-align: center;
  animation: banner 1.7s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}
.fx-banner strong {
  font-family: var(--display);
  font-size: clamp(42px, 11vw, 84px);
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--accent);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 5px 0 var(--ink);
  transform: rotate(-6deg);
}
.fx-banner span {
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: clamp(14px, 4vw, 19px);
  font-weight: 800;
}
.fx-banner.big strong {
  font-size: clamp(50px, 14vw, 108px);
}
.fx-banner.bad strong {
  color: #dc3027;
}
.fx-banner.small strong {
  font-size: clamp(30px, 8vw, 56px);
  color: #a9dcf2;
}
@keyframes banner {
  0% { opacity: 0; transform: scale(0.3) rotate(10deg); }
  16% { opacity: 1; transform: scale(1.14) rotate(-2deg); }
  26% { transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.25) translateY(-40px); }
}
.fx-flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, #ffffff88 0, #ffda4555 55%, transparent 100%);
  animation: flash 0.7s ease-out both;
}
@keyframes flash {
  0% { opacity: 0; }
  20% { opacity: 1; }
  100% { opacity: 0; }
}
.fx-float {
  position: absolute;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 950;
  color: #d9534f;
  text-shadow: 2px 2px 0 white;
  animation: float-down 1.2s ease-in both;
}
@keyframes float-down {
  0% { opacity: 0; transform: translateY(-10px) scale(0.7); }
  20% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: translateY(70px) rotate(10deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Leave the new-word heading clear of the sticky header on touch navigation. */
#clue { scroll-margin-top: 112px; }


.connection-links { list-style: none; padding: 0; margin: 20px 0 0; text-align: left; }
.connection-links li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid #d8d0c4; animation: connection-detail-in 350ms ease both; animation-delay: var(--reveal-delay); }
.connection-links strong { color: var(--ink); overflow-wrap: anywhere; }
.connection-links span { line-height: 1.5; font-size: 15px; overflow-wrap: anywhere; }
@keyframes connection-detail-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 400px) { .connection-links li { grid-template-columns: 1fr; gap: 4px; } }
@media (prefers-reduced-motion: reduce) { .connection-links li { animation: none; } }

/* Illustrated solve stickers travel in the clipped, non-interactive effect layer. */
.fx-word-flight {
  position: absolute;
  left: 0;
  top: calc(50% - 125px);
  width: clamp(150px, 38vw, 210px);
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--ink);
  pointer-events: none;
  animation: word-flight 2.1s ease-in-out both;
  filter: drop-shadow(3px 5px 0 #19191920);
}
.fx-word-flight svg { width: 100%; display: block; }
.fx-word-flight strong {
  padding: 4px 16px;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 14px;
  font: 900 clamp(20px, 5vw, 28px) var(--display);
  letter-spacing: .04em;
}
.fx-word-flight span {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 800;
}
@keyframes word-flight {
  0% { transform: translateX(-120%) translateY(45px) rotate(-18deg); opacity: 0; }
  12% { opacity: 1; }
  40% { transform: translateX(calc(50vw - 50%)) translateY(-15px) rotate(5deg); }
  60% { transform: translateX(calc(50vw - 50%)) translateY(-15px) rotate(-4deg); opacity: 1; }
  100% { transform: translateX(calc(100vw + 30px)) translateY(-65px) rotate(18deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-word-flight { display: none; animation: none; }
}

/* Shared daily results; the chart uses the same scale for every score range. */
#results-standings { margin-top: 28px; padding-top: 24px; border-top: 2px solid var(--line); text-align: left; }
#results-standings-title { margin-bottom: 16px; font-size: 24px; }
#results-standings #ranking-refresh { margin-inline: 0; }
#standings { width: min(560px, calc(100% - 32px)); }
.standings-body { padding: 0; }
.standings-body p { line-height: 1.5; }
.ranking-you { font-weight: 800; color: #1677a4; }
#ranking-percentile { font-size: .9rem; }
.score-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; margin-top: 20px; }
.score-column { min-width: 0; text-align: center; }
.score-count { display: block; height: 24px; font-size: .65rem; overflow-wrap: anywhere; }
.score-track { height: 120px; display: flex; align-items: flex-end; border-bottom: 1px solid #756f66; }
.score-bar { width: 100%; background: #87cde9; border-radius: 5px 5px 0 0; }
.your-score .score-bar { background: #b9231c; }
.score-bin { display: block; padding-top: 6px; font-size: .65rem; }
.score-marker { display: block; height: 20px; color: #b9231c; }
.chart-key, .ranking-note { font-size: .78rem; color: #625e58; }
.leaderboard-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; margin-top: 24px; }
.leaderboard-table caption { text-align: left; font-weight: 800; margin-bottom: 12px; }
.leaderboard-table th, .leaderboard-table td { padding: 10px 6px; border-bottom: 1px solid #d8d0c4; }
.leaderboard-table th:last-child, .leaderboard-table td:last-child { text-align: right; }
.your-ranking { background: #d8eff8; font-weight: 800; }
#ranking-refresh { min-height: 44px; }
@media (max-width: 360px) {
  #standings { padding-inline: 16px; }
  .score-chart { gap: 3px; }
  .leaderboard-table { font-size: .8rem; }
}

/* Match Clue Glue's shared drawer while keeping Hunchy's header proportions. */
.games-drawer { border: 0; border-radius: 0; padding: max(24px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom)); width: min(380px, 100%); max-height: none; background: #17110e; color: #fffaf6; }
.game-tools { display: grid; gap: 4px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid #ffffff30; }
.game-tools button { min-height: 44px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; text-align: left; font: 600 16px system-ui, sans-serif; cursor: pointer; }
.game-tools button:hover { background: #ffffff18; }
.game-tools button:disabled { opacity: .5; cursor: default; }


/* Cut Paper: decorative layers only. Keep the existing layout, spacing, type
   metrics, hit targets and game-state visibility rules intact. Clip the paper
   behind controls, never the controls themselves or their focus outlines. */
:root {
  --cut-red: #dc3027;
  --cut-blue: #87cde9;
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%236b5842' opacity='.045' filter='url(%23grain)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
  --paper-edge: polygon(0 3px, 4% 1px, 8% 3px, 13% 0, 18% 2px, 24% 0, 30% 3px, 36% 1px, 43% 3px, 50% 0, 57% 2px, 64% 0, 71% 3px, 78% 1px, 85% 3px, 92% 0, 100% 2px, calc(100% - 2px) 24%, 100% 46%, calc(100% - 2px) 70%, 100% calc(100% - 2px), 94% 100%, 87% calc(100% - 3px), 80% 100%, 73% calc(100% - 2px), 66% 100%, 59% calc(100% - 3px), 52% 100%, 45% calc(100% - 2px), 38% 100%, 31% calc(100% - 3px), 24% 100%, 17% calc(100% - 2px), 10% 100%, 4% calc(100% - 2px), 0 100%, 2px 73%, 0 49%, 2px 25%);
}
.masthead { background-image: var(--paper-grain); border-bottom-style: dashed; }
.brand-name { isolation: isolate; }
.brand-name::after { background: var(--ink); height: 3px; border-radius: 0; }
.brand-letter { position: relative; isolation: isolate; }
.brand-letter::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: 1px -1px -1px; background: var(--cut-blue);
  clip-path: var(--paper-edge); transform: rotate(5deg);
}
.brand-letter:nth-child(3n + 1)::before { background: var(--cut-red); transform: rotate(-7deg); }
.brand-letter:nth-child(3n + 2)::before { background: var(--accent); transform: rotate(3deg); }
.brand-letter:nth-child(4)::before { background: #fffdf9; }
.brand-mark > path:first-child { fill: var(--accent); }
.brand-mark > path:last-child { stroke: var(--cut-red); }

/* Keep real borders transparent to retain their original box dimensions. */
.total, .help-button, .archive-button, .word-collection li, .hint,
.primary, .connection-button:not(:disabled), .reveal, .finish-icon {
  position: relative; isolation: isolate; background: transparent;
  border-color: transparent; border-radius: 0; box-shadow: none;
}
.total::before, .help-button::before, .archive-button::before,
.word-collection li::before, .hint::before, .primary::before,
.connection-button:not(:disabled)::before, .reveal::before, .finish-icon::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  pointer-events: none; clip-path: var(--paper-edge);
  background-color: var(--scrap, #fffdf9); background-image: var(--paper-grain);
}
.total, .finish-icon { --scrap: var(--accent); }
.word-collection .empty-word { --scrap: #eee7db; }
.word-collection .empty-word[aria-current] { --scrap: #fffdf9; border-color: transparent; background: transparent; box-shadow: none; }
.word-collection .empty-word[aria-current]::after {
  content: ""; position: absolute; inset: 1px; pointer-events: none;
  border: 3px solid var(--cut-red); border-radius: 48% 44% 50% 42%;
  transform: rotate(7deg);
}
.word-collection .collected-word { --scrap: var(--cut-blue); border-color: transparent !important; }
.word-collection .revealed-word { --scrap: #eee7db; }
.hint { --scrap: #f4efe6; }
.hint.latest, .reveal { --scrap: var(--hint); background: transparent; border-color: transparent; }
.primary { --scrap: var(--ink); }
.primary:hover { --scrap: #333333; background: transparent; }
.connection-button:not(:disabled) { --scrap: #c82a22; color: white; }
.connection-button:not(:disabled):hover { --scrap: #b9231c; background: transparent; }
.primary:active, .connection-button:not(:disabled):active, .help-button:active { box-shadow: none; }
.connection-button:not(:disabled)::after { opacity: .22; }
@keyframes ready-ping {
  0% { box-shadow: 0 0 0 0 #dc302755; }
  70%, 100% { box-shadow: 0 0 0 10px #dc302700; }
}
.play-area {
  isolation: isolate; background: transparent; border-color: transparent;
  border-radius: 0; box-shadow: 0 4px 6px #1919190c;
}
.play-area::after {
  content: ""; position: absolute; inset: -2px; z-index: -1;
  pointer-events: none; clip-path: var(--paper-edge);
  background: var(--paper-grain), #fffdf9;
}
.play-area::before {
  border-color: transparent; border-radius: 0; background: var(--cut-red);
  clip-path: var(--paper-edge); z-index: 1; pointer-events: none;
}
input { background: #d8eff8; border-color: #69b4d5; border-radius: 2px; }
input::placeholder { color: #355665; }
.bank-letter, .guess-entry, .reveal, .archive-day, select, textarea,
.fx-word-flight strong, .fx-word-flight span, .fx-banner span { border-radius: 2px; }
.text-button:hover { color: #b9231c; }
#next-clue { text-decoration-style: solid; text-decoration-thickness: 2px; }
dialog { border-radius: 2px; background-image: var(--paper-grain); box-shadow: 6px 8px 0 #19191920; }
.archive-day:hover, .archive-day[aria-current] { background: #ffdf58; border-color: var(--ink); }
.score-bar { border-radius: 0; }
.games-menu-button { background: #fffdf9; border-color: var(--ink); border-radius: 2px; }
.games-drawer { background: var(--paper); color: var(--ink); background-image: var(--paper-grain); }
.games-close { background: var(--ink); border-radius: 2px; }
.game-tools { border-bottom-color: var(--line); }
.game-tools button { border-radius: 2px; }
.game-tools button:hover { background: var(--cut-blue); }
.games-link-text { display: grid; gap: 4px; min-width: 0; }
.games-link-name { font-weight: 700; }
.games-description { color: #55504b; font-size: 13px; line-height: 1.4; }
.games-footer { background: transparent; color: var(--ink); border-top: 1px solid var(--line); }
.games-footer .games-list { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.games-drawer .games-link, .games-footer .games-link { color: var(--ink); }
.games-drawer .games-link:hover, .games-footer .games-link:hover { color: #b9231c; }
.games-drawer :focus-visible, .games-footer :focus-visible { outline-color: #1677a4; }
@media (forced-colors: active) {
  .total, .help-button, .archive-button, .word-collection li, .hint,
  .primary, .connection-button:not(:disabled), .reveal, .play-area {
    outline: 1px solid CanvasText;
  }
  .word-collection .empty-word[aria-current]::after { border-color: Highlight; }
}
