html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  padding: 12px 24px 24px;
  background: url("backgroundimage1.png") center / cover no-repeat fixed;
  font-family: Arial, Helvetica, sans-serif;
}

.kat-whack-login-link {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 56;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  min-height: 116px;
  border-radius: 999px;
  color: #f4fff0;
  filter: drop-shadow(0 8px 14px rgba(18, 9, 40, 0.38));
  transition: transform 160ms ease, filter 160ms ease;
}

.kat-whack-login-link:hover,
.kat-whack-login-link:focus-visible {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 12px 18px rgba(18, 9, 40, 0.46));
  outline: none;
}

.kat-whack-login-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 244, 223, 0.9);
}


.kat-whack-login-link.is-logged-in {
  width: auto;
  max-width: min(340px, calc(100vw - 48px));
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  padding: 8px 14px;
  border: 2px solid rgba(212, 175, 55, 0.72);
  background: rgba(20, 4, 42, 0.82);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
  color: #b7ffcf;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.75);
  white-space: nowrap;
}

.kat-whack-login-link.is-logged-in:hover,
.kat-whack-login-link.is-logged-in:focus-visible {
  transform: none;
}

.kat-whack-login-link img {
  display: block;
  width: 116px;
  height: 116px;
  object-fit: contain;
}

.kat-whack-page {
  width: min(620px, 100%);
}

@media (min-width: 701px) {
  body {
    overflow: hidden;
  }

  .kat-whack-page {
    transform: none;
  }
}

.kat-whack-home-link {
  display: inline-flex;
  margin: 0 0 16px;
  color: #fff4df;
  font-weight: 900;
  text-shadow: 0 2px 0 #2b0f03;
}

.kat-whack-window {
  width: 100%;
}

.kat-whack-confirm {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(18, 9, 40, 0.64);
  backdrop-filter: blur(5px);
}

.kat-whack-confirm.is-open {
  display: flex;
}

.kat-whack-confirm-card {
  position: relative;
  box-sizing: border-box;
  width: min(430px, 100%);
  padding: 30px 24px 24px;
  border: 4px solid rgba(255, 244, 223, 0.9);
  border-radius: 28px;
  background: radial-gradient(circle at top left, #fff4df, #ffd84b 35%, #f08a45 66%, #5a1747);
  color: #2b0f03;
  text-align: center;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46), inset 0 0 0 2px rgba(255, 250, 188, 0.38);
}

.kat-whack-confirm-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 244, 223, 0.9);
  border-radius: 50%;
  background: linear-gradient(135deg, #2b160e, #5a1747);
  color: #fff4df;
  font-size: 1.45rem;
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
}

.kat-whack-confirm-title {
  margin: 0 36px 10px;
  font-size: 1.35rem;
  font-weight: 1000;
  text-shadow: 0 1px 0 rgba(255, 244, 223, 0.75);
}

.kat-whack-confirm-kicker {
  margin: 0 36px 6px;
  color: #5a1747;
  font-size: 0.82rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 244, 223, 0.75);
}

.kat-whack-confirm-copy {
  margin: 0 auto;
  max-width: 310px;
  color: #3b1407;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(255, 244, 223, 0.58);
}

.kat-whack-reset-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, #fff4df 0 18%, transparent 42%),
    linear-gradient(160deg, #ffd84b 0%, #f08a45 48%, #5a1747 100%);
}

.kat-whack-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.kat-whack-confirm-button {
  min-width: 104px;
  min-height: 46px;
  border: 3px solid rgba(255, 244, 223, 0.9);
  border-radius: 999px;
  color: #fff4df;
  font-size: 1rem;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(43, 15, 3, 0.28);
}

.kat-whack-confirm-yes {
  background: linear-gradient(135deg, #38b84a, #136b22);
}

.kat-whack-confirm-no {
  background: linear-gradient(135deg, #ff3333, #9f1010);
}

.kat-whack-launch-button {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 3px solid rgba(255, 244, 223, 0.9);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffcf40, #f08a45 52%, #a92d16);
  color: #2b0f03;
  font-size: 1rem;
  font-weight: 1000;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 244, 223, 0.72);
  box-shadow: 0 12px 24px rgba(43, 15, 3, 0.32), inset 0 0 0 2px rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.kat-whack-launch-button:hover,
.kat-whack-launch-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(43, 15, 3, 0.38), inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.kat-whack-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(43, 15, 3, 0.58);
  backdrop-filter: blur(5px);
}

.kat-whack-modal.is-open {
  display: flex;
}

.kat-whack-window {
  position: relative;
  box-sizing: border-box;
  width: min(560px, 100%);
  min-height: min(94vh, 820px);
  transform: translate(30px, -1px);
  padding: 16px 28px 28px;
  border: 4px solid rgba(255, 244, 223, 0.9);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 244, 223, 0.34) 0 3px, transparent 4px),
    radial-gradient(circle at 82% 22%, rgba(255, 224, 101, 0.28) 0 4px, transparent 5px),
    linear-gradient(160deg, #ffd84b 0%, #f08a45 48%, #5a1747 100%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46), inset 0 0 0 2px rgba(255, 250, 188, 0.38);
}

.kat-whack-close {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 244, 223, 0.9);
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3333, #9f1010);
  color: #fff4df;
  font-size: 1.5rem;
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
  z-index: 90;
}

.kat-whack-title {
  margin: 0 52px 8px 0;
  color: #fff4df;
  font-size: clamp(0.85rem, 2.5vw, 1.25rem);
  font-weight: 1000;
  text-shadow: 0 3px 0 #5a1747, 0 8px 18px rgba(43, 15, 3, 0.38);
}

.kat-whack-title-image {
  display: none;
}

.kat-whack-publisher-copy {
  box-sizing: border-box;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 2px solid rgba(255, 244, 223, 0.72);
  border-radius: 18px;
  background: rgba(255, 244, 223, 0.82);
  color: #2b0f03;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: inset 0 0 0 1px rgba(255, 250, 188, 0.32);
}

.kat-whack-publisher-copy h2 {
  margin: 0 0 6px;
  color: #5a1747;
  font-size: 0.95rem;
  font-weight: 1000;
}

.kat-whack-publisher-copy p {
  margin: 0 0 7px;
}

.kat-whack-publisher-copy p:last-child {
  margin-bottom: 0;
}

.kat-whack-window .kat-flash-game {
  width: 100%;
  min-width: 0;
  cursor: none;
}

.kat-whack-window .kat-flash-game.is-won {
  cursor: auto;
}

.kat-flash-game {
  box-sizing: border-box;
  width: min(318px, 34vw);
  min-width: 258px;
  padding: 10px;
  border: 3px solid rgba(43, 15, 3, 0.88);
  border-radius: 18px;
  background: linear-gradient(180deg, #6b3bd8 0%, #22125d 55%, #120928 100%);
  color: #fff4df;
  box-shadow: inset 0 0 0 2px rgba(255, 244, 223, 0.22), 0 12px 22px rgba(43, 15, 3, 0.28);
  cursor: none;
  user-select: none;
}

.kat-flash-game.is-high-scores-open,
.kat-flash-game.is-high-scores-open * {
  cursor: auto;
}

.kat-flash-game.is-high-scores-open button,
.kat-flash-game.is-high-scores-open a,
.kat-flash-game.is-high-scores-open [role="button"] {
  cursor: pointer;
}

.kat-flash-game[hidden] {
  display: none;
}

.kat-flash-game.is-won,
.kat-flash-game.is-won * {
  cursor: auto;
}

.kat-flash-game.is-won .kat-flash-play-again,
.kat-flash-game.is-won .kat-flash-submit-score {
  cursor: pointer;
}

.kat-flash-game-scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.62);
}

.kat-flash-score-meter {
  position: relative;
  flex: 1 1 220px;
  isolation: isolate;
  width: 100%;
  min-height: 28px;
  overflow: hidden;
  border: 2px solid rgba(255, 244, 223, 0.76);
  border-radius: 999px;
  background: #b92222;
  box-shadow: inset 0 2px 5px rgba(43, 15, 3, 0.46), 0 3px 0 rgba(43, 15, 3, 0.42);
}

.kat-flash-score-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: var(--score-percent, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #19a840 0%, #55dc6c 100%);
  transition: width 180ms ease-out;
}

.kat-flash-score-meter-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  min-width: max-content;
  min-height: 28px;
  padding: 0 12px;
  color: #fff7de;
  white-space: nowrap;
}

.kat-flash-timer,
.kat-flash-reset {
  flex: 0 0 auto;
  border: 2px solid rgba(255, 244, 223, 0.72);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(18, 9, 40, 0.72);
  color: #fff7de;
  box-shadow: 0 3px 0 rgba(43, 15, 3, 0.42);
}

.kat-flash-reset {
  background: linear-gradient(135deg, #ffe065, #f08a45);
  color: #2b0f03;
  font-weight: 900;
  cursor: pointer;
}

.kat-flash-high-scores {
  position: relative;
  margin: 0 0 7px;
  padding: 8px 52px 8px 10px;
  border: 2px solid rgba(255, 244, 223, 0.42);
  border-radius: 14px;
  background: rgba(18, 9, 40, 0.58);
  color: #fff7de;
  font-size: 0.75rem;
  font-weight: 800;
}

.kat-flash-high-scores h2 {
  margin: 0 0 5px;
  font-size: 0.82rem;
  text-align: center;
}

.kat-flash-high-score-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin: 0;
  padding-left: 22px;
}

.kat-flash-high-score-list li {
  padding-left: 2px;
}

.kat-flash-high-score-list span {
  display: inline-block;
  max-width: 7.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.kat-flash-high-score-list b {
  float: right;
}

.kat-flash-high-score-summary {
  display: block;
}

.kat-flash-high-score-more {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 2px solid rgba(255, 244, 223, 0.72);
  border-radius: 999px;
  padding: 2px 8px 4px;
  background: linear-gradient(135deg, #ffe065, #f08a45);
  color: #2b0f03;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  transform: scale(0.5);
  transform-origin: top right;
}

.kat-flash-high-score-popup {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(18, 9, 40, 0.72);
}

.kat-flash-high-score-popup.is-open {
  display: grid;
}

.kat-flash-high-score-popup-card {
  position: relative;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 36px));
  max-height: min(520px, 82vh);
  overflow: auto;
  border: 4px solid #aa8b2d;
  border-radius: 22px;
  padding: 18px 20px 20px;
  background: radial-gradient(circle at top, rgba(101, 51, 19, 0.96), rgba(43, 13, 44, 0.98) 52%, rgba(18, 9, 40, 0.98));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.42), inset 0 0 22px rgba(255, 224, 101, 0.16);
  color: #fff7de;
}

.kat-flash-high-score-popup-card h3 {
  margin: 0 38px 12px 0;
  color: #ffe065;
  font-size: 1.1rem;
  text-shadow: 0 2px 0 #2b0f03;
}

.kat-flash-high-score-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 244, 223, 0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffef8d, #f08a45);
  color: #2b0f03;
  font-size: 1.2rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.kat-flash-high-score-popup-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
}

.kat-flash-high-score-popup-list li {
  padding-left: 4px;
}

.kat-flash-high-score-popup-list span {
  display: inline-block;
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.kat-flash-high-score-popup-list b {
  float: right;
  margin-left: 12px;
}

.kat-flash-high-score-empty,
.kat-flash-high-score-note {
  margin: 0;
}

.kat-flash-high-score-note.success { color: #86ff9d; }
.kat-flash-high-score-note.error { color: #ffb1a6; }

.kat-flash-high-score-auth {
  display: grid;
  gap: 5px;
  justify-items: center;
  max-width: 280px;
}

.kat-flash-high-score-auth a,
.kat-flash-submit-score {
  position: relative;
  z-index: 6;
  border: 2px solid rgba(43, 15, 3, 0.8);
  border-radius: 999px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #86ff9d, #55dc6c);
  color: #2b0f03;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.kat-flash-game-stage {
  position: relative;
  height: clamp(260px, 44vh, 380px);
  overflow: hidden;
  border: 2px solid rgba(255, 244, 223, 0.42);
  border-radius: 14px;
  background: #653313;
}

.kat-flash-hole {
  position: absolute;
  z-index: 1;
  width: 62px;
  height: 30px;
  background: url("hole.png") center / contain no-repeat;
}

.kat-flash-hole,
.kat-flash-target {
  left: var(--kat-flash-grid-x);
  top: var(--kat-flash-grid-y);
  right: auto;
  bottom: auto;
}

.kat-flash-hole {
  transform: translate(-50%, -50%);
}

.kat-flash-hole.hole-0,
.kat-flash-target.lane-0 { --kat-flash-grid-x: 17%; --kat-flash-grid-y: 23%; }
.kat-flash-hole.hole-1,
.kat-flash-target.lane-1 { --kat-flash-grid-x: 50%; --kat-flash-grid-y: 23%; }
.kat-flash-hole.hole-2,
.kat-flash-target.lane-2 { --kat-flash-grid-x: 83%; --kat-flash-grid-y: 23%; }
.kat-flash-hole.hole-3,
.kat-flash-target.lane-3 { --kat-flash-grid-x: 17%; --kat-flash-grid-y: 52%; }
.kat-flash-hole.hole-4,
.kat-flash-target.lane-4 { --kat-flash-grid-x: 50%; --kat-flash-grid-y: 52%; }
.kat-flash-hole.hole-5,
.kat-flash-target.lane-5 { --kat-flash-grid-x: 83%; --kat-flash-grid-y: 52%; }
.kat-flash-hole.hole-6,
.kat-flash-target.lane-6 { --kat-flash-grid-x: 17%; --kat-flash-grid-y: 81%; }
.kat-flash-hole.hole-7,
.kat-flash-target.lane-7 { --kat-flash-grid-x: 50%; --kat-flash-grid-y: 81%; }
.kat-flash-hole.hole-8,
.kat-flash-target.lane-8 { --kat-flash-grid-x: 83%; --kat-flash-grid-y: 81%; }

.kat-flash-target {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 244, 223, 0.9);
  font-size: 2rem;
  box-shadow: 0 9px 0 rgba(43, 15, 3, 0.42), 0 12px 20px rgba(0, 0, 0, 0.34);
  cursor: none;
  animation: kat-flash-pop 380ms ease-out;
}


.kat-flash-target {
  transform: translate(-50%, -50%);
  animation-name: kat-flash-pop-desktop;
}

.kat-flash-target.cheese {
  background: transparent;
}

.kat-flash-target.cheese img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.kat-flash-target.mouse {
  background: transparent;
}

.kat-flash-target.mouse,
.kat-flash-target.cheese {
  top: calc(var(--kat-flash-grid-y) - 14px);
  box-shadow: none;
}

.kat-flash-target.powerup {
  overflow: visible;
  background: radial-gradient(circle, rgba(246, 213, 255, 0.98), rgba(178, 72, 255, 0.92) 58%, rgba(69, 20, 137, 0.88));
  box-shadow: 0 0 16px rgba(209, 89, 255, 0.95), 0 0 30px rgba(143, 53, 255, 0.68), 0 9px 0 rgba(43, 15, 3, 0.42);
}

.kat-flash-crystal {
  position: relative;
  display: block;
  width: 28px;
  height: 40px;
  background: linear-gradient(135deg, #f1c6ff 0%, #a83dff 48%, #4b168f 100%);
  clip-path: polygon(50% 0, 82% 18%, 100% 58%, 50% 100%, 0 58%, 18% 18%);
  filter: drop-shadow(0 0 8px rgba(230, 124, 255, 0.92));
  animation: kat-flash-crystal-pulse 900ms ease-in-out infinite alternate;
}

.kat-flash-crystal::after {
  content: "";
  position: absolute;
  inset: 7px 12px 8px 7px;
  background: rgba(255, 255, 255, 0.44);
  clip-path: polygon(38% 0, 100% 20%, 64% 100%, 0 40%);
}

.kat-flash-paw.is-powerup-active {
  filter: drop-shadow(0 0 4px #f7d1ff) drop-shadow(0 0 12px #b84dff) drop-shadow(0 0 22px rgba(124, 45, 255, 0.92));
}

.kat-flash-game.is-powerup-active .kat-flash-game-stage {
  border-color: rgba(233, 170, 255, 0.82);
  box-shadow: inset 0 0 14px rgba(188, 75, 255, 0.48), 0 0 18px rgba(143, 53, 255, 0.34);
}

@keyframes kat-flash-crystal-pulse {
  from { transform: scale(0.92) rotate(-3deg); }
  to { transform: scale(1.08) rotate(3deg); }
}

.kat-flash-target.mouse img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.kat-flash-paw {
  position: absolute;
  left: var(--paw-x);
  top: var(--paw-y);
  z-index: 4;
  width: 58px;
  height: 58px;
  background: url("pawmallet.png") center / contain no-repeat;
  transform: translate(-28%, -66%) rotate(-18deg);
  transform-origin: 78% 82%;
  filter: drop-shadow(0 5px 3px rgba(0, 0, 0, 0.4));
  pointer-events: none;
  transition: transform 90ms ease-out;
}

.kat-flash-paw.is-swiping {
  transform: translate(-8%, -36%) rotate(28deg);
}

.kat-flash-paw.is-win-paw {
  z-index: 5;
  width: 70px;
  height: 70px;
  transform: translate(-20%, -66%) rotate(-18deg);
}

.kat-flash-game-hint {
  margin: 7px 0 0;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.kat-flash-win {
  position: absolute;
  inset: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border-radius: 12px;
  background: rgba(18, 9, 40, 0.88);
  text-align: center;
  font-weight: 900;
}

.kat-flash-play-again {
  position: relative;
  z-index: 6;
  border: 2px solid rgba(43, 15, 3, 0.8);
  border-radius: 999px;
  padding: 7px 16px;
  background: linear-gradient(135deg, #ffe065, #f08a45);
  color: #2b0f03;
  font-weight: 900;
  cursor: pointer;
}

@keyframes kat-flash-pop {
  from { transform: translateY(22px) scale(0.7); opacity: 0; }
  to { transform: translateY(-8px) scale(1); opacity: 1; }
}

@keyframes kat-flash-pop-desktop {
  from { transform: translate(-50%, calc(-50% + 30px)) scale(0.7); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@media (max-width: 700px) and (orientation: portrait) {
  body {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: 12px;
  }

  .kat-whack-page {
    display: flex;
    min-height: 0;
  }

  .kat-whack-window {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    min-height: 0;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    transform: none;
    padding: 16px 16px 20px;
  }

  .kat-whack-window .kat-flash-game {
    width: 100%;
    min-width: 0;
    margin-top: 0;
  }

  .kat-whack-login-link {
    min-width: calc(116px * 0.75);
    min-height: calc(116px * 0.75);
  }

  .kat-whack-login-link img {
    width: calc(116px * 0.75);
    height: calc(116px * 0.75);
  }
}

.kat-whack-side-showcase {
  position: fixed;
  top: 50%;
  z-index: 40;
  width: min(260px, 22vw);
  max-height: min(74vh, 520px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.94);
  transition: opacity 450ms ease, transform 450ms ease;
}

.kat-whack-side-showcase.side-left {
  left: max(18px, calc((100vw - 1100px) / 2));
}

.kat-whack-side-showcase.side-right {
  right: max(18px, calc((100vw - 1100px) / 2));
}

.kat-whack-side-showcase.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.kat-whack-side-card {
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  max-height: inherit;
  padding: 12px;
  border: 3px solid rgba(255, 244, 223, 0.92);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 216, 75, 0.96), rgba(240, 138, 69, 0.96) 52%, rgba(90, 23, 71, 0.96));
  color: #2b0f03;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), inset 0 0 0 2px rgba(255, 250, 188, 0.24);
  text-align: center;
}

.kat-whack-side-showcase.kind-kat {
  max-height: calc(100vh - 36px);
}


.kat-whack-side-card {
  display: flex;
  flex-direction: column;
  max-height: none;
}

.kat-whack-side-label {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(43, 15, 3, 0.84);
  color: #fff4df;
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kat-whack-side-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  color: #3b2018;
  font-size: 0.85rem;
  font-weight: 1000;
  text-align: left;
}

.kat-whack-side-name {
  color: #551a8b;
  font-weight: 1000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kat-whack-side-card img {
  display: block;
  width: 100%;
  max-height: 245px;
  object-fit: cover;
  border: 2px solid rgba(255, 244, 223, 0.82);
  border-radius: 16px;
  background: rgba(43, 15, 3, 0.22);
}

.kat-whack-side-card p {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: #fff4df;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(43, 15, 3, 0.64);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.kat-whack-side-reactions {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-bottom: 2px;
}

.kat-whack-side-reactions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(43, 15, 3, 0.32);
}

.kat-whack-side-reactions button[aria-pressed="true"] {
  outline: 3px solid rgba(255, 244, 223, 0.9);
  outline-offset: 2px;
}

.kat-whack-side-reactions button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.kat-whack-side-menu-wrap {
  position: relative;
  display: inline-flex;
}

.kat-whack-side-menu-button {
  min-width: 34px;
  min-height: 30px;
  border: 2px solid rgba(255, 244, 223, 0.72);
  border-radius: 999px;
  background: rgba(43, 15, 3, 0.18);
  color: #3b2018;
  font-weight: 1000;
  cursor: pointer;
}

.kat-whack-side-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 3;
  min-width: 150px;
  padding: 8px;
  border: 2px solid rgba(255, 244, 223, 0.9);
  border-radius: 14px;
  background: #fff4df;
  box-shadow: 0 10px 24px rgba(43, 15, 3, 0.32);
}

.kat-whack-side-menu.is-open {
  display: grid;
  gap: 6px;
}

.kat-whack-side-menu button {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  color: #fff4df;
  font-weight: 1000;
  cursor: pointer;
}

.kat-whack-side-follow {
  background: linear-gradient(135deg, #38b84a, #136b22);
}

.kat-whack-side-follow[aria-pressed="true"] {
  background: linear-gradient(135deg, #7e2f20, #2b160e);
}

.kat-whack-side-report {
  background: linear-gradient(135deg, #ef1737, #9f1010);
}

.kat-whack-side-menu button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.kat-whack-side-reactions .heart {
  background: #ef1737;
}

.kat-whack-side-reactions .laugh {
  background: #ffd84b;
  color: #5a1747;
}

.kat-whack-signin-toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 5;
  transform: translate(-50%, 12px) scale(0.92);
  min-width: max-content;
  padding: 10px 16px;
  border: 2px solid rgba(255, 244, 223, 0.96);
  border-radius: 999px;
  background: linear-gradient(135deg, #5a1747, #2b0f03 58%, #f08a45);
  color: #fff4df;
  font-weight: 1000;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 12px 28px rgba(43, 15, 3, 0.42), inset 0 0 0 2px rgba(255, 224, 101, 0.24);
  transition: opacity 180ms ease, transform 180ms ease;
}

.kat-whack-signin-toast::before {
  content: "🐾";
  margin-right: 6px;
}

.kat-whack-signin-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}


.kat-whack-side-skip {
  margin-top: 10px;
  min-height: 38px;
  padding: 0 16px;
  border: 2px solid rgba(255, 244, 223, 0.9);
  border-radius: 999px;
  background: linear-gradient(135deg, #38b84a, #136b22);
  color: #fff4df;
  font-weight: 1000;
  cursor: pointer;
}

.kat-whack-side-skip:disabled {
  cursor: wait;
  opacity: 0.7;
  filter: grayscale(0.35);
}

@media (max-width: 1120px) {
  body {
    align-items: flex-start;
  }

  .kat-whack-page {
    margin-top: min(16vh, 150px);
  }

  .kat-whack-side-showcase {
    top: 12px;
    width: min(274px, calc(50vw - 28px));
    max-height: min(35vh, 300px);
    transform: translateY(-16px) scale(0.94);
  }

  .kat-whack-side-showcase.side-left {
    left: 12px;
  }

  .kat-whack-side-showcase.side-right {
    right: 12px;
  }

  .kat-whack-side-showcase.is-visible {
    transform: translateY(0) scale(1);
  }


  .kat-whack-side-card {
    padding: 9px;
    border-radius: 18px;
  }

  .kat-whack-side-card img {
    max-height: 120px;
  }

  .kat-whack-side-card p {
    font-size: 0.76rem;
    -webkit-line-clamp: 2;
  }

}

@media (max-width: 700px) and (orientation: portrait) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body {
    min-height: 100vh;
    min-height: 100dvh;
    align-items: flex-end;
    padding: 12px 12px 0;
  }

  .kat-whack-login-link {
    top: calc(clamp(160px, 35dvh, 310px) - 100px - (116px * 0.75));
    right: 12px;
  }

  .kat-whack-login-link.is-logged-in {
    transform: scale(0.5);
    transform-origin: top right;
  }

  .kat-whack-page {
    width: min(620px, 100%);
    margin-top: clamp(160px, 35dvh, 310px);
    transform: scale(0.9);
    transform-origin: top center;
  }

  body.kat-facebook-in-app .kat-whack-page {
    /*
      Facebook's in-app browser spends extra portrait height on its chrome.
      Keep the game bottom-anchored and shrink it upward from the bottom so
      the top edge clears the rotating kat card instead of sliding underneath it.
      The wrapper is widened by the inverse of the scale so the visible game
      does not inherit large side gutters from Facebook's reduced viewport.
    */
    width: min(620px, calc((100vw - 8px) / 0.82));
    margin-top: clamp(180px, 39dvh, 330px);
    transform: scale(0.82);
    transform-origin: bottom center;
  }

  .kat-whack-window {
    height: auto;
    min-height: 0;
    max-height: none;
    transform: none;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .kat-whack-title {
    position: absolute;
    right: 8px;
    bottom: calc(100% + 8px);
    left: auto;
    width: calc(min(204px, 42vw) + 10px);
    margin: 0;
  }

  .kat-whack-title-text {
    display: none;
  }

  .kat-whack-title-image {
    display: block;
    width: 100%;
    height: calc(min(87.04px, 17.92vw) + 15px);
    object-fit: fill;
  }

  .kat-whack-about-button {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 5;
    box-sizing: border-box;
    max-width: calc(100% - min(204px, 42vw) - 16px);
    min-height: 30px;
    margin: 0;
    padding: 0 12px;
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform-origin: bottom left;
  }

  .kat-whack-about-button:hover,
  .kat-whack-about-button:focus-visible {
    transform: translateY(-1px);
  }

  body.kat-facebook-in-app .kat-whack-title {
    right: 8px;
    bottom: calc(100% + 8px);
    width: calc(min(204px, 42vw) + 10px);
    transform: none;
  }

  body.kat-facebook-in-app .kat-whack-about-button {
    left: 0;
    max-width: calc(100% - min(204px, 42vw) - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
    transform: none;
  }

  body.kat-facebook-in-app .kat-whack-about-button:hover,
  body.kat-facebook-in-app .kat-whack-about-button:focus-visible {
    transform: translateY(-1px);
  }

  .kat-whack-close {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: calc(env(safe-area-inset-right, 0px) + 8px);
    bottom: auto;
    z-index: 90;
  }

  .kat-flash-high-score-popup {
    left: 50%;
    right: auto;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 16px;
    transform: translateX(-50%);
  }

  .kat-flash-high-score-popup-card {
    width: min(100%, 360px);
    max-height: min(78vh, 520px);
    max-height: min(78dvh, 520px);
    padding: 16px 16px 18px;
    border-width: 3px;
    border-radius: 20px;
    transform: translateY(-175px);
  }

  .kat-flash-high-score-popup-card h3 {
    margin-right: 42px;
    font-size: clamp(1rem, 7vw, 1.35rem);
    line-height: 1.12;
  }

  .kat-flash-high-score-popup-list {
    gap: 10px;
    padding-left: 28px;
    font-size: clamp(1rem, 6vw, 1.2rem);
  }

  .kat-flash-high-score-popup-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    padding-left: 2px;
  }

  .kat-flash-high-score-popup-list span {
    max-width: none;
  }

  .kat-flash-high-score-popup-list b {
    float: none;
    margin-left: 0;
  }

  .kat-whack-side-showcase {
    top: 12px;
    left: 12px;
    right: auto;
    max-height: 31vh;
  }

  .kat-whack-side-showcase.side-left,
  .kat-whack-side-showcase.side-right {
    left: 12px;
    right: auto;
  }

  .kat-whack-side-showcase.kind-kat {
    width: min(61.37vw, 235.28px);
    max-height: min(34.1vh, 286px);
    max-height: min(34.1dvh, 286px);
  }

  .kat-whack-side-showcase.kind-kat .kat-whack-side-card {
    max-height: inherit;
  }

  .kat-whack-side-card-header > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }


  .kat-whack-side-reactions {
    gap: 6px;
  }

  .kat-whack-side-reactions button {
    min-width: 38px;
    min-height: 38px;
    padding: 0 9px;
  }

  .kat-whack-side-label {
    margin-bottom: 5px;
    padding: 3px 7px;
    font-size: 0.58rem;
  }

  .kat-whack-side-card img {
    height: clamp(70.4px, 11dvh, 90.2px);
    max-height: clamp(70.4px, 11dvh, 90.2px);
    object-fit: contain;
  }

  .kat-whack-side-card p {
    font-size: 0.68rem;
    margin-top: 6px;
    -webkit-line-clamp: 1;
  }

  .kat-whack-side-card-header {
    margin-bottom: 6px;
    font-size: 0.72rem;
  }


  .kat-whack-side-skip {
    min-height: 30px;
    margin-top: 6px;
    padding: 0 10px;
    font-size: 0.76rem;
  }
}

.kat-whack-about-button {
  display: block;
  margin: 12px auto 0;
  min-height: 42px;
  padding: 0 18px;
  border: 3px solid rgba(255, 244, 223, 0.9);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff4df, #ffd84b 48%, #f08a45);
  color: #5a1747;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(43, 15, 3, 0.28), inset 0 0 0 1px rgba(255, 250, 188, 0.45);
}

.kat-whack-about-button:hover,
.kat-whack-about-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 10px 22px rgba(43, 15, 3, 0.34), 0 0 0 3px rgba(255, 244, 223, 0.65);
}

.kat-whack-about-dialog {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 20px;
  background: rgba(18, 9, 40, 0.56);
  backdrop-filter: blur(5px);
}

.kat-whack-about-dialog.is-open {
  display: flex;
}

.kat-whack-about-dialog .kat-whack-publisher-copy {
  position: relative;
  width: min(520px, 100%);
  margin: 0;
  padding: 22px 20px 18px;
  font-size: 0.95rem;
}

.kat-whack-about-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 244, 223, 0.9);
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3333, #9f1010);
  color: #fff4df;
  font-size: 1.3rem;
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 700px) and (orientation: portrait) {
  .kat-whack-about-button {
    min-height: 34px;
    margin-top: 8px;
    padding: 0 14px;
    font-size: 0.76rem;
  }

  body.kat-facebook-in-app .kat-whack-about-button {
    padding: 0 8px;
    font-size: 0.6rem;
  }
}
