/* Word Hunt: Caveman Circus "Paper and sun" style */
.wh-root {
  --wh-ground: #E9EEFA;
  --wh-ink: #111111;
  --wh-header: #0F2A6B;
  --wh-royal: #1F4FD1;
  --wh-gold: #FFC21A;
  --wh-miss: #353D4E;
  position: relative;
  box-sizing: border-box;
  max-width: 440px;
  margin: 24px auto;
  background: var(--wh-ground);
  color: var(--wh-ink);
  border: 3px solid var(--wh-ink);
  box-shadow: 6px 6px 0 var(--wh-ink);
  font-family: Rubik, system-ui, sans-serif;
  line-height: 1.3;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.wh-root *, .wh-root *::before, .wh-root *::after { box-sizing: border-box; }
.wh-root button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
  text-shadow: none;
}
.wh-root button:focus-visible { outline: 3px solid var(--wh-gold); outline-offset: 2px; }
.wh-root svg { display: block; }

/* Header */
.wh-head {
  background: var(--wh-header);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wh-logo { display: flex; align-items: center; font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: 0.5px; }
.wh-logo span { padding: 5px 9px; border: 3px solid var(--wh-ink); box-shadow: 3px 3px 0 var(--wh-ink); }
.wh-logo-word { background: var(--wh-gold); color: var(--wh-ink); }
.wh-logo-hunt { background: var(--wh-royal); color: #FFFFFF; border-left: none !important; }
.wh-tools { display: flex; gap: 8px; }
.wh-icon {
  width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--wh-ground);
  border: 2px solid var(--wh-ground);
}
.wh-icon:hover { background: rgba(255, 255, 255, 0.12); }

/* Date and points strip */
.wh-strip {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  border-bottom: 3px solid var(--wh-ink);
  gap: 10px;
  font-weight: 700; font-size: 13px; letter-spacing: 1px;
}
.wh-date { white-space: nowrap; }
.wh-points-wrap { display: flex; align-items: center; gap: 8px; }
.wh-clock {
  display: flex; align-items: center; gap: 5px;
  font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 18px; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px; border: 2px solid var(--wh-ink); background: #FFFFFF; color: var(--wh-ink);
}
.wh-clock svg { width: 16px; height: 16px; }
.wh-clock-idle { opacity: 0.6; }
.wh-clock-low { background: var(--wh-gold); animation: wh-tick 1s steps(1) infinite; }
@keyframes wh-tick { 50% { background: #FFFFFF; } }
.wh-points {
  font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 18px; letter-spacing: 0;
  background: var(--wh-header); color: var(--wh-gold); padding: 2px 8px; min-width: 56px; text-align: center;
}

/* Board */
.wh-board { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px 0; }
.wh-row { display: flex; gap: 6px; }
.wh-tile {
  --wh-bg: rgba(255, 255, 255, 0.55);
  --wh-fg: var(--wh-ink);
  width: clamp(46px, 14vw, 58px);
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-family: Rubik, system-ui, sans-serif; font-weight: 800;
  font-size: clamp(24px, 7vw, 28px);
  line-height: 1;
  background: var(--wh-bg);
  color: var(--wh-fg);
  border: 3px solid rgba(17, 17, 17, 0.2);
}
.wh-tile.wh-typed, .wh-tile.wh-filled {
  --wh-bg: #FFFFFF;
  border-color: var(--wh-ink);
  box-shadow: 3px 3px 0 var(--wh-ink);
}
.wh-tile.wh-c { --wh-bg: var(--wh-royal); --wh-fg: #FFFFFF; }
.wh-tile.wh-p { --wh-bg: var(--wh-gold); --wh-fg: var(--wh-ink); }
.wh-tile.wh-x { --wh-bg: var(--wh-miss); --wh-fg: #FFFFFF; }
.wh-tile.wh-blank { --wh-bg: #FFFFFF; }

.wh-pop { animation: wh-pop 0.1s ease-out; }
@keyframes wh-pop { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

.wh-flip { animation: wh-flip 0.5s ease both; animation-delay: calc(var(--i) * 0.2s); }
@keyframes wh-flip {
  0% { transform: rotateX(0); background: #FFFFFF; color: var(--wh-ink); }
  50% { transform: rotateX(90deg); background: #FFFFFF; color: var(--wh-ink); }
  50.1% { transform: rotateX(90deg); background: var(--wh-bg); color: var(--wh-fg); }
  100% { transform: rotateX(0); background: var(--wh-bg); color: var(--wh-fg); }
}

.wh-shake { animation: wh-shake 0.4s ease; }
@keyframes wh-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

.wh-win .wh-tile { animation: wh-bounce 0.5s ease both; animation-delay: calc(var(--i) * 0.08s); }
@keyframes wh-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } 60% { transform: translateY(2px); } }

.wh-status { margin: 16px 0 0; padding: 0; text-align: center; font-weight: 700; font-size: 13px; letter-spacing: 1px; }

/* Keyboard */
.wh-keys { padding: 18px 8px 18px; display: flex; flex-direction: column; gap: 7px; }
.wh-keyrow { display: flex; gap: 5px; }
.wh-keyrow-mid { padding: 0 4.5%; }
.wh-key {
  flex: 1 1 0; min-width: 0; height: 54px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 15px;
  background: #FFFFFF; color: var(--wh-ink);
  border: 2px solid var(--wh-ink);
  box-shadow: 2px 2px 0 var(--wh-ink);
  transition: transform 0.05s;
}
.wh-key:active { transform: translate(2px, 2px); box-shadow: none; }
.wh-key-wide { flex: 1.6 1 0; font-size: 11px; letter-spacing: 0.5px; }
.wh-key.wh-c { background: var(--wh-royal); color: #FFFFFF; }
.wh-key.wh-p { background: var(--wh-gold); color: var(--wh-ink); }
.wh-key.wh-x { background: var(--wh-miss); color: #FFFFFF; }

/* Toast */
.wh-toast {
  position: absolute; left: 50%; top: 74px; transform: translate(-50%, -8px);
  background: var(--wh-ink); color: #FFFFFF;
  font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 14px; letter-spacing: 0.5px;
  padding: 10px 16px; border: 2px solid var(--wh-gold);
  opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.15s; z-index: 5; white-space: nowrap;
}
.wh-toast.wh-show { opacity: 1; transform: translate(-50%, 0); }

/* Modal */
.wh-modal {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(10, 18, 40, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.wh-modal[hidden] { display: none; }
.wh-dialog {
  width: 100%; max-width: 400px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--wh-ground); color: var(--wh-ink);
  border: 3px solid var(--wh-ink); box-shadow: 8px 8px 0 var(--wh-ink);
  font-family: Rubik, system-ui, sans-serif;
}
.wh-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--wh-header); padding: 10px 12px 10px 16px;
}
.wh-dialog-title {
  margin: 0; padding: 0; border: 0;
  font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 20px; letter-spacing: 1px; line-height: 1.1;
  color: var(--wh-gold); text-transform: none;
}
.wh-dialog-body { padding: 18px 18px 20px; font-size: 15px; }
.wh-dialog-body p { margin: 0 0 12px; }
.wh-ex-row { display: flex; gap: 6px; margin: 14px 0 6px; }
.wh-ex-row .wh-tile { width: 44px; font-size: 22px; box-shadow: 2px 2px 0 var(--wh-ink); }
.wh-dialog-body .wh-ex-note { font-size: 14px; margin-bottom: 4px; }
.wh-dialog-body .wh-hard {
  margin: 14px 0 12px; padding: 10px 12px;
  background: #FFFFFF; border: 2px solid var(--wh-ink); border-left: 8px solid var(--wh-gold);
}
.wh-answer { justify-content: center; margin: 2px 0 14px; }
.wh-answer .wh-tile { width: 52px; font-size: 26px; }

.wh-btn {
  display: block; width: 100%; margin-top: 16px; padding: 14px 16px !important;
  font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 16px; letter-spacing: 1px;
  background: var(--wh-gold); color: var(--wh-ink);
  border: 3px solid var(--wh-ink); box-shadow: 4px 4px 0 var(--wh-ink);
}
.wh-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--wh-ink); }

.wh-earned { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }
.wh-earned-num {
  font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 40px; line-height: 1;
  background: var(--wh-header); color: var(--wh-gold); padding: 6px 14px;
  border: 3px solid var(--wh-ink); box-shadow: 4px 4px 0 var(--wh-ink);
}
.wh-earned-label { margin-top: 8px; font-weight: 700; font-size: 12px; letter-spacing: 1.5px; }

.wh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.wh-stat { display: flex; flex-direction: column; align-items: center; text-align: center; background: #FFFFFF; border: 2px solid var(--wh-ink); padding: 8px 4px; }
.wh-stat-num { font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 22px; line-height: 1.1; }
.wh-stat-label { font-size: 11px; font-weight: 700; line-height: 1.2; margin-top: 2px; }

.wh-sub { margin: 0 0 8px; padding: 0; font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 13px; letter-spacing: 1.5px; }
.wh-dist { display: flex; flex-direction: column; gap: 5px; }
.wh-dist-row { display: flex; align-items: center; gap: 8px; }
.wh-dist-n { width: 12px; font-weight: 700; font-size: 13px; }
.wh-dist-bar {
  display: block; text-align: right; padding: 3px 7px;
  font-weight: 700; font-size: 13px;
  background: var(--wh-miss); color: #FFFFFF;
}
.wh-dist-bar.wh-dist-today { background: var(--wh-royal); }
.wh-dialog-body .wh-total { margin: 14px 0 0; font-weight: 700; font-size: 13px; text-align: center; }
.wh-next { display: flex; flex-direction: column; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 3px solid var(--wh-ink); }
.wh-next-label { font-weight: 700; font-size: 12px; letter-spacing: 1.5px; }
.wh-next-clock { font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 28px; letter-spacing: 1px; }

@media (prefers-reduced-motion: reduce) {
  .wh-root *, .wh-modal * { animation: none !important; transition: none !important; }
}
@media (max-width: 400px) {
  .wh-points-label { display: none; }
  .wh-strip { padding: 10px 12px; }
}
@media (max-width: 380px) {
  .wh-key-wide { font-size: 9px; }
  .wh-logo { font-size: 20px; }
  .wh-icon { width: 40px; height: 40px; }
  .wh-key { height: 50px; font-size: 13px; }
}

/* Desktop: wider board, bigger tiles and keys */
@media (min-width: 768px) {
  .wh-root { max-width: 580px; }
  .wh-head { padding: 16px 20px; }
  .wh-logo { font-size: 28px; }
  .wh-strip { padding: 12px 20px; }
  .wh-board { gap: 8px; padding-top: 28px; }
  .wh-row { gap: 8px; }
  .wh-tile { width: 70px; font-size: 34px; }
  .wh-status { margin-top: 20px; font-size: 14px; }
  .wh-keys { padding: 22px 18px 22px; gap: 8px; }
  .wh-keyrow { gap: 6px; }
  .wh-key { height: 60px; font-size: 18px; }
  .wh-key-wide { font-size: 13px; }
  .wh-toast { top: 84px; font-size: 16px; }
}

/* Leaderboard */
.wh-lb { margin: 0 0 18px; }
.wh-lb-form { margin: 0 0 12px; padding: 12px; background: #FFFFFF; border: 2px solid var(--wh-ink); }
.wh-lb-label { display: block; margin-bottom: 8px; font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 13px; letter-spacing: 1px; }
.wh-lb-inputrow { display: flex; gap: 8px; }
.wh-root .wh-lb-input {
  flex: 1 1 auto; min-width: 0; width: 100%; height: 50px; margin: 0; padding: 0 12px;
  font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 26px; letter-spacing: 8px; text-transform: uppercase;
  color: var(--wh-ink); background: var(--wh-ground);
  border: 3px solid var(--wh-ink); border-radius: 0; box-shadow: none; outline: none;
  user-select: text; -webkit-user-select: text;
}
.wh-root .wh-lb-input:focus { border-color: var(--wh-royal); }
.wh-root .wh-lb-input::placeholder { color: rgba(17, 17, 17, 0.3); }
.wh-root .wh-lb-btn { width: auto; margin-top: 0; flex: 0 0 auto; padding: 0 18px !important; height: 50px; }
.wh-root .wh-lb-btn:disabled { opacity: 0.6; cursor: default; }
.wh-dialog-body .wh-lb-msg { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: #B42318; }
.wh-dialog-body .wh-lb-msg:empty { display: none; }
.wh-dialog-body .wh-lb-placed { margin: 0 0 10px; font-weight: 700; font-size: 14px; }
.wh-dialog-body .wh-lb-empty { margin: 0; padding: 12px; font-size: 14px; background: #FFFFFF; border: 2px solid var(--wh-ink); }
.wh-lb-list { list-style: none; margin: 0; padding: 0; border: 2px solid var(--wh-ink); background: #FFFFFF; }
.wh-lb-row {
  display: grid; grid-template-columns: 28px 1fr auto 52px; align-items: center; gap: 10px;
  margin: 0; padding: 7px 12px; font-variant-numeric: tabular-nums;
  border-top: 1px solid rgba(17, 17, 17, 0.12);
}
.wh-lb-row:first-child { border-top: none; }
.wh-lb-row:first-child .wh-lb-rank { background: var(--wh-gold); }
.wh-lb-rank { font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 13px; text-align: center; line-height: 24px; height: 24px; border: 2px solid var(--wh-ink); }
.wh-lb-init { font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 18px; letter-spacing: 3px; }
.wh-lb-pts { font-family: Rubik, system-ui, sans-serif; font-weight: 800; font-size: 15px; color: var(--wh-royal); }
.wh-lb-time { font-weight: 700; font-size: 13px; text-align: right; }
.wh-lb-mine { background: var(--wh-royal); color: #FFFFFF; }
.wh-lb-mine .wh-lb-pts { color: var(--wh-gold); }
.wh-lb-mine .wh-lb-rank { border-color: #FFFFFF; }

/* ---------- Caveman Circus look: cream paper, teal for a hit, yellow for close ---------- */
.wh-root{--wh-ground:#F3EBD8;--wh-ink:#1A1814;--wh-header:#FFFFFF;--wh-royal:#0A8F8F;--wh-gold:#F5E04A;--wh-miss:#5C554B;font-family:Rubik,system-ui,sans-serif;border:1px solid #1A1814;box-shadow:4px 4px 0 #1A1814}
.wh-head{border-bottom:1px solid #1A1814}
.wh-logo{font-family:Rubik,system-ui,sans-serif;font-weight:800;font-size:26px}
.wh-logo span{border:0;box-shadow:none;padding:0}
.wh-logo-word{background:none;color:#1A1814}
.wh-logo-hunt{background:none;color:#0A8F8F;margin-left:6px}
.wh-icon{color:#1A1814;border:1px solid #1A1814;background:#FFFFFF}
.wh-strip{background:#FFFFFF;border-bottom:1px solid #1A1814;font-family:Rubik,system-ui,sans-serif}
.wh-clock{border:1px solid #1A1814;font-family:Rubik,system-ui,sans-serif;font-weight:800}
.wh-points{background:#0A8F8F;color:#FFFFFF;font-family:Rubik,system-ui,sans-serif;font-weight:800}
.wh-tile{font-family:Rubik,system-ui,sans-serif;font-weight:800;border:2px solid rgba(26,24,20,0.18);--wh-bg:rgba(255,255,255,0.6)}
.wh-tile.wh-typed,.wh-tile.wh-filled{border:2px solid #1A1814;box-shadow:3px 3px 0 #1A1814}
.wh-key{font-family:Rubik,system-ui,sans-serif;font-weight:700;border:1px solid #1A1814;box-shadow:2px 2px 0 #1A1814}

.wh-tile.wh-c{--wh-bg:var(--wh-royal);--wh-fg:#FFFFFF;color:var(--wh-fg)}
.wh-tile.wh-p{--wh-bg:var(--wh-gold);--wh-fg:var(--wh-ink);color:var(--wh-fg)}
.wh-tile.wh-x{--wh-bg:var(--wh-miss);--wh-fg:#FFFFFF;color:var(--wh-fg)}
.wh-key.wh-c{background:var(--wh-royal);color:#FFFFFF}
.wh-key.wh-p{background:var(--wh-gold);color:var(--wh-ink)}
.wh-key.wh-x{background:var(--wh-miss);color:#FFFFFF}
.wh-dialog{background:#F3EBD8;border:1px solid #1A1814;box-shadow:6px 6px 0 #1A1814;font-family:Rubik,system-ui,sans-serif}
.wh-dialog-head{background:#FFFFFF;border-bottom:1px solid #1A1814}
.wh-dialog-title{color:#1A1814;font-family:Rubik,system-ui,sans-serif;font-weight:800;letter-spacing:0}
.wh-close{color:#1A1814;border:1px solid #1A1814;background:#FFFFFF}
.wh-dialog .wh-tile{font-family:Rubik,system-ui,sans-serif;font-weight:800}
.wh-dialog-body .wh-hard{border:1px solid #1A1814;border-left:8px solid #0A8F8F}
.wh-btn{font-family:Rubik,system-ui,sans-serif;font-weight:800;background:#F5E04A;border:1px solid #1A1814;box-shadow:3px 3px 0 #1A1814}
.wh-earned-num{background:#0A8F8F;color:#FFFFFF;font-family:Rubik,system-ui,sans-serif;font-weight:800;border:1px solid #1A1814;box-shadow:3px 3px 0 #1A1814}
.wh-stat{border:1px solid #1A1814}
.wh-stat-num,.wh-sub,.wh-next-clock,.wh-lb-label,.wh-lb-rank,.wh-lb-init,.wh-lb-pts{font-family:Rubik,system-ui,sans-serif;font-weight:800}
.wh-lb-form,.wh-lb-list,.wh-dialog-body .wh-lb-empty{border:1px solid #1A1814}
.wh-root .wh-lb-input{font-family:Rubik,system-ui,sans-serif;font-weight:800;background:#F3EBD8;border:1px solid #1A1814}
.wh-root .wh-lb-input:focus{border-color:#0A8F8F}
.wh-next{border-top:1px solid #1A1814}
.wh-toast{font-family:Rubik,system-ui,sans-serif;font-weight:800;border:2px solid #F5E04A;top:42%}
.wh-clock-low{background:#F5E04A}
/* One-strip header: title and buttons on the left, the caveman scene on the right. */
.wh-head{position:relative;min-height:62px;padding:0 14px;background:#F3EBD8;overflow:hidden;justify-content:flex-start;gap:12px}
.wh-strip-artwrap{position:absolute;top:0;right:0;bottom:0;display:block;pointer-events:none}
.wh-strip-art{display:block;height:100%;width:auto}
.wh-logo,.wh-tools{position:relative;z-index:1}
.wh-logo{font-size:20px}
.wh-tools{gap:5px}
.wh-head .wh-icon{width:32px;height:32px;background:#FFFFFF}
.wh-head .wh-icon svg{width:16px;height:16px}
@media (min-width: 768px){.wh-head{min-height:72px;padding:0 18px}.wh-logo{font-size:24px}.wh-head .wh-icon{width:36px;height:36px}}

/* ---------- Rok in the header: little reactions to the game ---------- */
.wh-strip-art .rk-up{transform-origin:92px 66px}
.wh-strip-art .rk-hd{transform-origin:92px 32px}
.wh-strip-art .rk-ga{transform-origin:100px 40px}
.wh-strip-art .rk-gl{transform-origin:138px 14px}
.wh-strip-art .rk-lid{transform-origin:96.3px 17.5px;transform:scaleY(0)}
.wh-strip-art .rk-glint{transform:translateX(-14px)}
.wh-strip-art .rk-grin{opacity:0}
.wh-strip-art .rk-crack{stroke-dasharray:1;stroke-dashoffset:1}
.wh-strip-art .rk-bang,.wh-strip-art .rk-cloud,.wh-strip-art .rk-drop,.wh-strip-art .rk-star,.wh-strip-art .rk-sigh{opacity:0}
.wh-strip-art .rk-bang{transform-origin:116px 6px}
.wh-strip-art .rk-cloud{transform-origin:86px 7px}
.wh-strip-art .rk-t0{transform-origin:160px 36px}.wh-strip-art .rk-t1{transform-origin:170px 22px}.wh-strip-art .rk-t2{transform-origin:158px 8px}
.wh-strip-art .rk-star0{transform-origin:66px 8px}.wh-strip-art .rk-star1{transform-origin:150px 32px}.wh-strip-art .rk-star2{transform-origin:128px 44px}

/* Final poses stay put after a win or a loss (also shown without motion). */
.rk-won .rk-grin{opacity:1}
.rk-won .rk-flat{opacity:0}
.rk-lost .rk-crack{stroke-dashoffset:0}
.rk-lost .rk-up{transform:translateY(2px) rotate(5deg)}
.rk-lost .rk-ga{transform:rotate(8deg)}

/* 1. Waiting: breathing, a blink, a glint across the lens. */
.rk-idle .rk-up{animation:rk-breathe 4s ease-in-out infinite}
.rk-idle .rk-lid{animation:rk-blink 4s infinite}
.rk-idle .rk-glint{animation:rk-glint 4s ease-in-out infinite}
@keyframes rk-breathe{0%,100%{transform:none}50%{transform:translateY(-.6px) rotate(1.2deg)}}
@keyframes rk-blink{0%,88%,96%,100%{transform:scaleY(0)}91%,93%{transform:scaleY(1)}}
@keyframes rk-glint{0%,55%{transform:translateX(-14px)}78%,100%{transform:translateX(16px)}}

/* 2. Typing: a nod and a bob of the glass per letter. */
.rk-type .rk-hd{animation:rk-nod .26s ease-out}
.rk-type .rk-ga{animation:rk-bob .26s ease-out}
@keyframes rk-nod{40%{transform:rotate(6deg)}}
@keyframes rk-bob{40%{transform:rotate(-4deg)}}

/* 3. The row flips: he leans in; "!" for each letter in the right spot. */
.rk-reveal .rk-up{animation:rk-lean 1.5s ease-in-out}
@keyframes rk-lean{12%,78%{transform:rotate(5deg)}}
.rk-pop .rk-bang{animation:rk-bang .6s ease-out}
@keyframes rk-bang{0%{opacity:0;transform:scale(.2)}30%{opacity:1;transform:scale(1.35)}50%,80%{opacity:1;transform:scale(1)}100%{opacity:0}}

/* 4. A miss: glass droops, head tips back, a little cartoon curse. */
.rk-miss .rk-ga{animation:rk-droop 1.6s ease-in-out}
.rk-miss .rk-hd{animation:rk-scoff 1.6s ease-in-out}
.rk-miss .rk-cloud{animation:rk-cloud 1.6s ease-out}
@keyframes rk-droop{20%,75%{transform:rotate(24deg)}}
@keyframes rk-scoff{20%,75%{transform:rotate(-7deg)}}
@keyframes rk-cloud{0%,12%{opacity:0;transform:scale(.3)}22%{opacity:1;transform:scale(1.1)}28%,72%{opacity:1;transform:scale(1)}90%,100%{opacity:0}}
.wh-points-wrap{position:relative}
.wh-minus{position:absolute;right:0;top:100%;margin-top:4px;padding:1px 6px;background:#D33A2C;color:#FFFFFF;border:1px solid #1A1814;font-family:Rubik,system-ui,sans-serif;font-weight:800;font-size:13px;line-height:1.3;letter-spacing:0;pointer-events:none;z-index:3;animation:wh-minus 1.4s ease-in forwards}
@keyframes wh-minus{0%{opacity:0;transform:translateY(-10px)}15%{opacity:1;transform:translateY(0)}55%{opacity:1;transform:translateY(4px)}100%{opacity:0;transform:translateY(26px)}}

/* 5. Under 30 seconds: sweat, a shaky hand. */
.rk-hurry .rk-all{animation:rk-jitter .24s steps(2) infinite}
.rk-hurry .rk-gl{animation:rk-shake .16s ease-in-out infinite alternate}
.rk-hurry .rk-drop{animation:rk-drop 1.2s ease-in infinite}
.rk-hurry .rk-drop1{animation-delay:.4s}
.rk-hurry .rk-drop2{animation-delay:.8s}
@keyframes rk-jitter{0%{transform:translateX(-.5px)}100%{transform:translateX(.5px)}}
@keyframes rk-shake{0%{transform:rotate(-4deg)}100%{transform:rotate(4deg)}}
@keyframes rk-drop{0%{opacity:0;transform:none}15%{opacity:1}100%{opacity:0;transform:translate(-9px,12px)}}

/* 6. Got it: he tosses the glass, it spins, he catches it; stars pop. */
.rk-win .rk-ga{animation:rk-raise 1.9s ease-in-out}
.rk-win .rk-gl{animation:rk-toss 1.9s cubic-bezier(.3,.7,.5,1)}
.rk-win .rk-up{animation:rk-hop 1.9s ease-in-out}
.rk-win .rk-star{animation:rk-star 1.9s ease-out}
.rk-win .rk-star1{animation-delay:.12s}
.rk-win .rk-star2{animation-delay:.24s}
.rk-win .rk-t{animation:rk-tile 1.9s ease-out}
.rk-win .rk-t1{animation-delay:.08s}
.rk-win .rk-t2{animation-delay:.16s}
@keyframes rk-raise{15%,70%{transform:rotate(-14deg)}}
@keyframes rk-toss{0%,18%{transform:none}42%{transform:translate(-10px,-8px) rotate(-200deg)}66%,100%{transform:rotate(-360deg)}}
@keyframes rk-hop{0%,14%,80%,100%{transform:none}20%{transform:translateY(2px)}30%,66%{transform:translateY(-2px)}}
@keyframes rk-star{0%,52%{opacity:0;transform:scale(0)}62%{opacity:1;transform:scale(1.3)}72%{opacity:1;transform:scale(1)}90%,100%{opacity:0}}
@keyframes rk-tile{0%,8%,40%,100%{transform:none}18%{transform:translateY(-6px) rotate(-10deg)}28%{transform:translateY(1px)}}

/* 7. Out of guesses or time: the lens cracks, he slumps and sighs. */
.rk-lose .rk-crack{animation:rk-crack 2s ease-out}
.rk-lose .rk-up{animation:rk-slump 2s ease-in-out}
.rk-lose .rk-ga{animation:rk-sag 2s ease-in-out}
.rk-lose .rk-sigh{animation:rk-sigh 2s ease-out}
.rk-lose .rk-sigh:nth-child(2){animation-delay:.1s}
.rk-lose .rk-sigh:nth-child(3){animation-delay:.2s}
@keyframes rk-crack{0%,15%{stroke-dashoffset:1}30%,100%{stroke-dashoffset:0}}
@keyframes rk-slump{0%,30%{transform:none}55%,100%{transform:translateY(2px) rotate(5deg)}}
@keyframes rk-sag{0%,30%{transform:none}55%,100%{transform:rotate(8deg)}}
@keyframes rk-sigh{0%,45%{opacity:0;transform:none}55%{opacity:1}100%{opacity:0;transform:translate(8px,-4px)}}

/* ---------- Results box: shorter everywhere, two columns and wider on bigger screens ---------- */
.wh-res .wh-answer { margin: 0 0 12px; }
.wh-res .wh-answer .wh-tile { width: 46px; font-size: 23px; }
.wh-res .wh-earned { flex-direction: row; justify-content: center; gap: 10px; margin-bottom: 14px; }
.wh-res .wh-earned-num { font-size: 30px; padding: 4px 12px; }
.wh-res .wh-earned-label { margin-top: 0; }
.wh-res .wh-stats { gap: 6px; margin-bottom: 0; }
.wh-res .wh-stat { padding: 6px 2px; }
.wh-res .wh-stat-num { font-size: 20px; }
.wh-res .wh-stat-label { font-size: 10px; }
.wh-res .wh-dist { gap: 3px; }
.wh-res .wh-dist-bar { padding: 1px 6px; font-size: 12px; }
.wh-res .wh-total { margin-top: 10px; }
.wh-res .wh-next { flex-direction: row; justify-content: center; align-items: baseline; gap: 10px; margin-top: 14px; padding-top: 12px; }
.wh-res .wh-next-clock { font-size: 22px; }
.wh-res .wh-lb { margin: 0 0 14px; }
.wh-res-b { margin-top: 18px; }
.wh-dialog-res .wh-dialog-head { padding-top: 8px; padding-bottom: 8px; }
@media (min-width: 720px) {
  .wh-dialog.wh-dialog-res { max-width: 760px; }
  .wh-res { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 26px; align-items: start; padding: 20px 22px 22px; }
  .wh-res-b { margin-top: 0; }
}
/* Keep site themes from enlarging the box's headings. */
.wh-modal .wh-dialog-title { margin: 0 !important; font-size: 20px !important; line-height: 1.1 !important; }
.wh-modal .wh-sub { margin: 0 0 8px !important; font-size: 13px !important; letter-spacing: 1.5px; line-height: 1.2 !important; }
.wh-modal .wh-dialog-head .wh-icon { width: 36px; height: 36px; }
