/* Sat, the heckling neighbor, in Sudoku (sat.js). He floats over the page and never
   moves the board: wide screens put him beside the grid, phones tuck him in the
   top corner over the title. Only his picture takes taps (tap = hush / un-hush). */
.sk-sat { position: fixed; z-index: 5; right: max(10px, calc(50vw - 500px)); bottom: 18vh;
  width: 190px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.sk-sat-face { pointer-events: auto; border: 0; background: none; padding: 0; cursor: pointer; width: 150px;
  transform-origin: 50% 100%; transition: transform .25s ease, opacity .25s ease, filter .25s ease; }
.sk-sat-face img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .22)); }
.sk-sat-face:focus-visible { outline: 3px solid var(--accent, #2f6fed); outline-offset: 4px; border-radius: 12px; }
.sk-sat-snd { pointer-events: auto; order: 3; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #1c1a17;
  background: #fff8ea; color: #1c1a17; display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.sk-sat-snd[aria-pressed="false"] { opacity: .6; }
.sk-sat-snd:focus-visible { outline: 3px solid var(--accent, #2f6fed); outline-offset: 3px; }
.sk-sat[data-quiet="1"] .sk-sat-snd { display: none; }
.sk-sat-bubble { position: relative; max-width: 100%; padding: 10px 14px; border-radius: 16px;
  background: #fff8ea; color: #1c1a17; border: 2px solid #1c1a17;
  font-family: var(--font-display, "Fredoka", system-ui, sans-serif); font-weight: 600; font-size: 1rem; line-height: 1.25;
  text-align: center; text-wrap: balance; box-shadow: 0 4px 0 rgba(0, 0, 0, .18);
  opacity: 0; transform: translateY(8px) scale(.94); transition: opacity .18s ease, transform .18s ease; }
.sk-sat-bubble::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; margin-left: -7px;
  background: inherit; border-right: 2px solid #1c1a17; border-bottom: 2px solid #1c1a17; transform: rotate(45deg); }
.sk-sat.is-talking .sk-sat-bubble { opacity: 1; transform: none; }
.sk-sat.is-talking .sk-sat-face { animation: sk-sat-bob .45s ease; }
.sk-sat[data-quiet="1"] .sk-sat-face { opacity: .45; filter: grayscale(1); transform: scale(.8); }
@keyframes sk-sat-bob { 0% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-8px) rotate(-3deg); } 70% { transform: translateY(0) rotate(2deg); } 100% { transform: none; } }

/* phones and narrow windows: no room beside the board, so he sits small in the top-right corner
   and talks sideways over the title area */
@media (max-width: 980px) {
  .sk-sat { right: 6px; bottom: auto; top: calc(var(--rw-bar-h, 56px) + 4px); width: min(74vw, 330px);
    flex-direction: row; align-items: flex-start; justify-content: flex-end; gap: 10px; }
  .sk-sat-face { width: 62px; flex: none; transform-origin: 50% 0; }
  .sk-sat-snd { position: absolute; right: 16px; top: 78px; width: 30px; height: 30px; }
  .sk-sat-bubble { font-size: .9rem; padding: 8px 11px; text-align: left; margin-top: 6px; }
  .sk-sat-bubble::after { left: auto; right: -9px; bottom: auto; top: 14px; margin: 0;
    border-bottom: 0; border-top: 2px solid #1c1a17; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-sat-face, .sk-sat-bubble { transition: none; }
  .sk-sat.is-talking .sk-sat-face { animation: none; }
}
@media print { .sk-sat { display: none !important; } }
