:root {
  color-scheme: light;
  --kh-ink: #083f49;
  --kh-navy: #06333d;
  --kh-teal: #087c85;
  --kh-aqua: #48c8c7;
  --kh-yellow: #f7b83f;
  --kh-cream: #fff7df;
  --kh-coral: #ed6d5e;
  --kh-paper: #f5ead0;
  --kh-shadow: 0 18px 50px rgba(2, 36, 43, .22);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow: hidden;
  background: #032f38;
  color: var(--kh-ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--kh-yellow);
  outline-offset: 3px;
}

.kh-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kh-client {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  background:
    radial-gradient(circle at 20% 0%, rgba(72, 200, 199, .24), transparent 28rem),
    linear-gradient(145deg, #073f49, #022c34);
}

.kh-topbar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto auto minmax(190px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 10px clamp(14px, 2vw, 28px);
  color: var(--kh-cream);
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  background: rgba(3, 51, 61, .9);
  backdrop-filter: blur(18px);
}

.kh-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: max-content;
  color: inherit;
  text-decoration: none;
}

.kh-brand-mascot {
  position: relative;
  z-index: 2;
  display: block;
  flex: 0 0 auto;
  width: 52px;
  aspect-ratio: 1;
  overflow: visible;
}
.kh-brand-mascot::before {
  position: absolute;
  z-index: 0;
  inset: 1px;
  border: 3px solid #fff7df;
  border-radius: 50%;
  background: #88d33c;
  box-shadow: 0 0 0 2px #267620;
  content: "";
}

.kh-brand-duck {
  position: absolute;
  z-index: 3;
  top: -6px;
  left: -8px;
  display: block;
  width: 66px;
  aspect-ratio: 1;
  background: url("../images/ui/kwaker-logo-wave-yellow-v1.webp") center / contain no-repeat;
}
body.kwakencity-client .kh-brand-duck {
  top: -12px;
  left: -13px;
  width: 76px;
  background: url("../images/ui/kwakencity-mark-yellow-outline-v1.webp") center / contain no-repeat;
}

.kh-brand-wordmark {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: -7px;
  padding: 3px 6px 3px 11px;
  border: 2px solid rgba(255, 247, 223, .92);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: #2f8c24;
  color: var(--kh-cream);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: .9;
  white-space: nowrap;
  -webkit-text-stroke: 1px #07515b;
  paint-order: stroke fill;
}
.kh-brand-name { display: inline-flex; align-items: baseline; }
.kh-brand-wordmark strong,
.kh-brand-wordmark b,
.kh-brand-wordmark small { display: inline-block; }
.kh-brand-wordmark strong { color: #fff7df; font: inherit; transform: rotate(-.5deg); }
.kh-brand-wordmark b { margin-left: .04em; color: #ffd33e; font: inherit; transform: rotate(.7deg); }
.kh-brand-wordmark small {
  margin-left: .12em;
  color: #fff7df;
  font: inherit;
  font-size: .58em;
  letter-spacing: -.035em;
  -webkit-text-stroke-width: .75px;
}
.kh-brand-wordmark em {
  display: block;
  margin: 1px 0 0 2px;
  color: #fff7df;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .055em;
  line-height: 1;
  text-transform: uppercase;
  -webkit-text-stroke: 0;
}

.kh-brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border-radius: 15px 15px 18px 18px;
  color: var(--kh-navy);
  background: var(--kh-yellow);
  border: 3px solid var(--kh-cream);
  box-shadow: 0 5px 0 #c9782f;
  font-size: 25px;
  font-weight: 950;
  transform: rotate(-3deg);
}

.kh-brand strong, .kh-brand small { display: block; }
.kh-brand strong { font-size: 18px; line-height: 1; }
.kh-brand small { margin-top: 4px; color: #b9ece7; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.kh-room-title { text-align: center; }
.kh-room-title strong, .kh-room-title span { display: block; }
.kh-room-title strong { font-size: 17px; }
.kh-room-title span { margin-top: 2px; color: #b9ece7; font-size: 12px; }

.kh-language-switch {
  display: flex;
  gap: 3px;
  align-self: center;
  margin-inline: 15px;
  padding: 3px;
  border: 2px solid rgba(255, 255, 255, .58);
  border-radius: 999px;
  background: rgba(3, 63, 73, .18);
}
.kh-language-switch button {
  min-width: 34px;
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}
.kh-language-switch button[aria-pressed="true"] { color: #315615; background: #ffdc46; box-shadow: 0 2px 0 #d47e25; }

.kh-top-wallet {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 5px;
  align-items: center;
  min-width: 88px;
  padding: 6px 10px;
  border: 2px solid #fff4b8;
  border-radius: 12px;
  color: #5b4314;
  background: #ffdc46;
  box-shadow: 0 3px 0 #c87525;
  font-weight: 950;
}
.kh-top-wallet > span { grid-row: 1 / 3; color: #bb6c1f; font-size: 17px; }
.kh-top-wallet strong, .kh-top-wallet small { display: block; line-height: 1; text-align: left; }
.kh-top-wallet strong { font-size: 12px; }
.kh-top-wallet small { margin-top: 3px; font-size: 8px; text-transform: uppercase; }
.kh-top-wallet:hover { transform: translateY(-1px); background: #ffe66a; }

.kh-connection {
  justify-self: end;
  display: grid;
  grid-template-columns: 10px auto;
  column-gap: 9px;
  align-items: center;
  text-align: right;
}

.kh-connection > span {
  grid-row: 1 / 3;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--kh-yellow);
  box-shadow: 0 0 0 5px rgba(247, 184, 63, .14);
}
.kh-connection.is-online > span { background: #65e59b; box-shadow: 0 0 0 5px rgba(101, 229, 155, .15); }
.kh-connection.is-offline > span { background: var(--kh-coral); box-shadow: 0 0 0 5px rgba(237, 109, 94, .15); }
.kh-connection strong { font-size: 13px; }
.kh-connection small { color: #b9ece7; font-size: 10px; }

.kh-stage-wrap {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 24px) clamp(10px, 2vw, 28px) 102px;
}

.kh-stage {
  position: relative;
  width: min(100%, calc((100svh - 190px) * 1.7778));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  user-select: none;
  touch-action: manipulation;
  border: 4px solid rgba(255, 247, 223, .8);
  border-radius: clamp(18px, 2vw, 32px);
  background: #e9d8b3;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(3, 51, 61, .2);
  isolation: isolate;
}

.kh-lobby-art, .kh-stage-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.kh-lobby-art { z-index: -3; object-fit: cover; }
.kh-stage-shade {
  z-index: -2;
  background: linear-gradient(to bottom, transparent 55%, rgba(1, 47, 55, .11));
  pointer-events: none;
}
.kh-placement-grid {
  position: absolute;
  z-index: 2;
  left: 2%;
  top: 49%;
  width: 96%;
  height: 47%;
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  clip-path: polygon(0 23.4%, 10.4% 12.8%, 27.1% 2.1%, 70.8% 0, 89.6% 6.4%, 96.9% 12.8%, 100% 19.1%, 100% 100%, 0 100%);
  pointer-events: none;
  user-select: none;
}
.kh-placement-grid[hidden] { display: none !important; }
.kh-placement-grid-cell {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 222, .38);
  background: rgba(75, 184, 79, .08);
  box-shadow: inset 0 0 0 1px rgba(25, 92, 41, .08);
}
.kh-placement-grid-cell.is-occupied { background: rgba(255, 195, 39, .24); }
.kh-placement-grid-cell.is-door-clearance {
  border-color: rgba(189, 70, 45, .38);
  background: repeating-linear-gradient(135deg, rgba(211, 80, 52, .12) 0 5px, rgba(255, 230, 166, .08) 5px 10px);
}

.kh-help-bubble {
  position: absolute;
  z-index: 20;
  top: 3.5%;
  left: 50%;
  width: min(440px, calc(100% - 32px));
  padding: 12px 42px 12px 16px;
  transform: translateX(-50%);
  border: 2px solid rgba(8, 63, 73, .22);
  border-radius: 16px;
  background: rgba(255, 247, 223, .95);
  box-shadow: 0 12px 35px rgba(3, 51, 61, .18);
  transition: opacity .2s ease, transform .2s ease;
}
.kh-help-bubble strong, .kh-help-bubble span { display: block; }
.kh-help-bubble strong { font-size: 14px; }
.kh-help-bubble span { margin-top: 2px; font-size: 12px; }
.kh-help-bubble button {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  color: var(--kh-ink);
  background: rgba(8, 63, 73, .09);
  font-size: 21px;
}
.kh-help-bubble.is-dismissed { opacity: 0; transform: translate(-50%, -12px); pointer-events: none; }

.kh-reception-callout {
  position: absolute;
  z-index: 3;
  left: 27%;
  top: 42%;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(3, 51, 61, .78);
  box-shadow: 0 5px 15px rgba(0, 0, 0, .2);
  font-size: clamp(8px, .9vw, 12px);
  pointer-events: none;
}
.kh-reception-callout span { color: var(--kh-yellow); }

.kh-remote-layer {
  position: absolute;
  z-index: 9;
  inset: 0;
  pointer-events: none;
}
.kh-remote-guest[data-user-id]:not([data-user-id=""]) { pointer-events: auto; cursor: pointer; }
.kh-remote-guest[data-user-id]:not([data-user-id=""]):focus-visible { outline: 4px solid #ffdc46; outline-offset: 4px; border-radius: 34%; }

.kh-guest {
  position: absolute;
  z-index: 10;
  left: var(--guest-x);
  top: var(--guest-y);
  width: clamp(110px, 11.8vw, 182px);
  transform: translate(-50%, -92%);
  transition: left var(--walk-time, 1600ms) cubic-bezier(.25, .1, .25, 1), top var(--walk-time, 1600ms) cubic-bezier(.25, .1, .25, 1);
  pointer-events: none;
  filter: none;
}
.kh-guest.is-repathing { transition: none; }
.kh-guest.is-taking-seat {
  transition: left .24s ease-out, top .24s ease-out, width .24s ease-out, transform .24s ease-out;
}

.kh-walk-target {
  position: absolute;
  z-index: 8;
  left: var(--target-x, 50%);
  top: var(--target-y, 75%);
  width: clamp(20px, 2.5vw, 34px);
  aspect-ratio: 1.55 / 1;
  transform: translate(-50%, -50%) scale(.65);
  border: 3px solid rgba(255, 247, 223, .94);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(50, 143, 42, .72), 0 4px 7px rgba(3, 51, 61, .2);
  opacity: 0;
  pointer-events: none;
}
.kh-walk-target.is-visible { animation: kh-walk-target .72s ease-out both; }
.kh-walk-target.is-blocked { box-shadow: 0 0 0 3px rgba(225, 111, 50, .78), 0 4px 7px rgba(3, 51, 61, .2); }

.kh-sprite-flip {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  transform-origin: center bottom;
  transition: transform .18s ease;
  filter: drop-shadow(0 4px 2px rgba(4, 42, 48, .18));
}

.kh-avatar-sprite {
  display: block;
  width: 100%;
  height: 100%;
  background-image: var(--kh-avatar-atlas, url("../images/kwaker-atlas-yellow-v2.webp"));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 400% 300%;
}
.kh-guest[data-direction="left"] .kh-sprite-flip { transform: scaleX(-1); }
.kh-guest[data-direction="up"] .kh-avatar-sprite { background-position: 0 100%; }
.kh-guest[data-direction="down"] .kh-avatar-sprite,
.kh-profile-kwaker .kh-avatar-sprite { background-position: 0 50%; }
.kh-guest.is-walking .kh-avatar-sprite { animation: kh-atlas-walk-side .96s steps(1, end) infinite; }
.kh-guest.is-walking[data-direction="down"] .kh-avatar-sprite { animation-name: kh-atlas-walk-front; }
.kh-guest.is-walking[data-direction="up"] .kh-avatar-sprite { animation-name: kh-atlas-walk-back; }
.kh-guest.is-walking .kh-sprite-flip { animation: kh-waddle .48s ease-in-out infinite alternate; }
.kh-guest[data-direction="left"].is-walking .kh-sprite-flip { animation: kh-waddle-left .48s ease-in-out infinite alternate; }
.kh-guest.is-sitting {
  width: clamp(102px, 9.8vw, 153px);
  transform: translate(-50%, -73%);
}
.kh-guest.is-sitting .kh-sprite-flip { aspect-ratio: 1; animation: none; }
.kh-guest.is-sitting .kh-avatar-sprite {
  background-position: 100% 0;
  background-size: 400% 300%;
  animation: none;
}
.kh-guest.is-sitting .kh-guest-shadow { left: 12%; right: 12%; bottom: 2%; }

.kh-guest,
.kh-profile-kwaker {
  --kh-avatar-atlas: url("../images/kwaker-atlas-yellow-v2.webp");
}
.kh-guest[data-avatar-color="cream"],
.kh-profile-kwaker[data-avatar-color="cream"] {
  --kh-avatar-atlas: url("../images/kwaker-atlas-cream-v2.webp");
}
.kh-guest[data-avatar-color="brown"],
.kh-profile-kwaker[data-avatar-color="brown"] {
  --kh-avatar-atlas: url("../images/kwaker-atlas-brown-v2.webp");
}
.kh-guest[data-skin="halloween_vampire"],
.kh-profile-kwaker[data-skin="halloween_vampire"] {
  --kh-avatar-atlas: url("../images/skin-vampire-atlas-v2.webp");
}
.kh-guest[data-skin="halloween_pumpkin"],
.kh-profile-kwaker[data-skin="halloween_pumpkin"] {
  --kh-avatar-atlas: url("../images/skin-pumpkin-atlas-v2.webp");
}
.kh-guest[data-skin="halloween_moonwitch"],
.kh-profile-kwaker[data-skin="halloween_moonwitch"] {
  --kh-avatar-atlas: url("../images/skin-moonwitch-atlas-v2.webp");
}

@keyframes kh-atlas-walk-side {
  0%, 100% { background-position: 0 0; }
  34% { background-position: 33.333% 0; }
  67% { background-position: 66.667% 0; }
}
@keyframes kh-atlas-walk-front {
  0%, 100% { background-position: 0 50%; }
  34% { background-position: 33.333% 50%; }
  67% { background-position: 66.667% 50%; }
}
@keyframes kh-atlas-walk-back {
  0%, 100% { background-position: 0 100%; }
  34% { background-position: 33.333% 100%; }
  67% { background-position: 66.667% 100%; }
}

@keyframes kh-walk-target {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.55); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.28); }
}

@keyframes kh-waddle {
  from { transform: translateY(0) rotate(-1.3deg); }
  to { transform: translateY(-4px) rotate(1.3deg); }
}
@keyframes kh-waddle-left {
  from { transform: scaleX(-1) translateY(0) rotate(-1.3deg); }
  to { transform: scaleX(-1) translateY(-4px) rotate(1.3deg); }
}
.kh-guest-shadow {
  position: absolute;
  z-index: 1;
  left: 17%;
  right: 17%;
  bottom: 0;
  height: 10%;
  border-radius: 50%;
  background: rgba(4, 42, 48, .25);
  filter: blur(4px);
}

.kh-guest > strong {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -20px;
  max-width: 150px;
  padding: 3px 8px;
  overflow: hidden;
  transform: translateX(-50%);
  border-radius: 999px;
  color: white;
  background: rgba(3, 51, 61, .88);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .18);
  font-size: clamp(8px, .9vw, 12px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kh-remote-guest {
  width: clamp(102px, 11vw, 170px);
}

.kh-visitor {
  position: absolute;
  z-index: 9;
  left: var(--visitor-x);
  top: var(--visitor-y);
  width: clamp(104px, 11.4vw, 174px);
  transform: translate(-50%, -91%);
  transition: left 1.6s ease-in-out, top 1.6s ease-in-out, opacity .25s ease;
  pointer-events: none;
  filter: drop-shadow(0 4px 2px rgba(4, 42, 48, .17));
}
.kh-visitor.is-hidden { opacity: 0; }
.kh-visitor img { position: relative; z-index: 2; display: block; width: 100%; height: auto; transform-origin: center bottom; animation: kh-pip-idle 1.8s ease-in-out infinite alternate; }
.kh-visitor.is-facing-right img { transform: scaleX(-1); }
.kh-visitor > strong {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -18px;
  padding: 3px 9px;
  transform: translateX(-50%);
  border-radius: 999px;
  color: white;
  background: rgba(3, 51, 61, .88);
  font-size: clamp(8px, .9vw, 12px);
  white-space: nowrap;
}
.kh-visitor > small {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  color: var(--kh-ink);
  font-size: clamp(7px, .7vw, 10px);
  font-weight: 900;
  white-space: nowrap;
}
@keyframes kh-pip-idle {
  from { translate: 0 0; rotate: -.7deg; }
  to { translate: 0 -3px; rotate: .7deg; }
}

.kh-speech {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 9px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: min(260px, 42vw);
  max-width: min(260px, 42vw);
  transform: translateX(-50%);
  pointer-events: none;
}
.kh-chat-layer {
  position: absolute;
  z-index: 9000;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
}
.kh-team-badge-layer {
  position: absolute;
  z-index: 8990;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
.kh-chat-bubble {
  position: relative;
  width: max-content;
  min-width: 0;
  max-width: 100%;
  padding: 4px 8px 5px;
  border: 2px solid #173f48;
  border-radius: 8px;
  font-size: clamp(10px, 1vw, 14px);
  line-height: 1.25;
  color: #173f48;
  background: linear-gradient(180deg, #fffef6 0%, #fff8dc 100%);
  box-shadow: 0 3px 0 rgba(3, 51, 61, .2), 0 7px 13px rgba(3, 51, 61, .13);
  overflow-wrap: anywhere;
  transform-origin: center 100%;
  will-change: transform, opacity;
}
.kh-chat-bubble.kh-world-chat {
  position: absolute;
  left: var(--chat-x, 50%);
  top: var(--chat-y, 50%);
  max-width: min(240px, 38cqw);
  margin: 0;
  transform: translate(-50%, -100%);
  transition: top .42s cubic-bezier(.2, .78, .2, 1);
  appearance: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
}
.kh-chat-bubble.kh-world-chat:focus-visible {
  outline: 3px solid #ffd34f;
  outline-offset: 3px;
}
.kh-chat-bubble-name {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  color: #24752f;
  font-size: 1em;
  font-weight: 1000;
  line-height: inherit;
  white-space: nowrap;
}
.kh-chat-bubble-copy { display: inline; }
.kh-chat-bubble.is-entering { animation: kh-chat-bubble-enter .34s cubic-bezier(.2, .78, .2, 1) both; }
.kh-chat-bubble.is-travelling { animation: kh-chat-bubble-travel var(--chat-travel-duration, 16s) linear forwards; }
.kh-chat-bubble.is-leaving { animation: kh-chat-bubble-leave .58s cubic-bezier(.4, 0, .6, 1) forwards; }
@keyframes kh-chat-bubble-enter {
  from { opacity: 0; scale: .94; }
  to { opacity: 1; scale: 1; }
}
@keyframes kh-chat-bubble-leave {
  from { opacity: 1; scale: 1; }
  to { opacity: 0; scale: .97; translate: 0 -22px; }
}
@keyframes kh-chat-bubble-travel {
  0% { opacity: 1; translate: 0 0; }
  82% { opacity: 1; }
  100% { opacity: 0; translate: 0 calc(-1 * var(--chat-rise, 180px)); }
}
@media (prefers-reduced-motion: reduce) {
  .kh-chat-bubble.is-entering,
  .kh-chat-bubble.is-leaving { animation-duration: .01ms; }
  .kh-chat-bubble.is-travelling { animation-timing-function: linear; }
}

body .kh-name-migration { width: min(460px, calc(100% - 28px)); max-width: none; max-height: min(88vh, 640px); margin: auto; padding: 0; overflow: auto; border: 2px solid #398b26; border-radius: 20px; color: #123f43; background: #fff8df; box-shadow: 0 15px 55px rgba(0, 30, 32, .38); }
body .kh-name-migration::backdrop { background: rgba(4, 30, 34, .76); backdrop-filter: blur(4px); }
.kh-name-migration form { display: grid; gap: 13px; padding: clamp(22px, 5vw, 32px); }
.kh-name-migration form > span { color: #277b70; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.kh-name-migration h2 { margin: 0; color: #164d46; font: 900 27px/1.1 'Trebuchet MS', sans-serif; }
.kh-name-migration p { margin: 0; color: #526d69; font-size: 13px; line-height: 1.6; }
.kh-name-migration label { color: #224d42; font-size: 12px; font-weight: 800; }
.kh-name-migration input { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #b9d18e; border-radius: 10px; outline: 0; color: #284b43; background: #fffef8; font: inherit; font-size: 14px; }
.kh-name-migration input:focus { border-color: #4a9b3d; box-shadow: 0 0 0 3px #86c35c32; }
.kh-name-migration .kh-name-migration-error { min-height: 18px; color: #a04c2a; }
.kh-name-migration button { min-height: 45px; border: 1px solid #1e6f26; border-radius: 12px; color: white; background: linear-gradient(180deg, #42ad3a, #28842d); font: 800 14px 'Trebuchet MS', sans-serif; cursor: pointer; }

.kh-furniture-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.kh-placed-furniture {
  position: absolute;
  left: var(--item-x);
  top: var(--item-y);
  width: var(--item-width, clamp(90px, 13vw, 200px));
  aspect-ratio: var(--sprite-ratio, 4 / 5);
  transform: translate(-50%, -68%) scale(var(--item-scale, 1));
  transform-origin: center bottom;
  background-image: url("../images/kwaken-furniture-atlas-v1.webp");
  background-repeat: no-repeat;
  background-size: var(--atlas-size-x, 500%) var(--atlas-size-y, 200%);
  background-position: var(--atlas-x) var(--atlas-y);
  filter: drop-shadow(0 7px 4px rgba(4, 42, 48, .23));
  border: 0;
  background-color: transparent;
  pointer-events: auto;
  cursor: pointer;
}
.kh-placed-furniture.is-rotated { background-image: url("../images/kwaken-furniture-atlas-rotated-v1.webp"); }
.kh-placed-furniture.is-image-furniture,
.kh-placed-furniture.is-image-furniture.is-rotated {
  background-image: var(--furniture-image);
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
}
.kh-placed-furniture:hover { outline: 2px dashed rgba(255, 247, 223, .9); outline-offset: 4px; border-radius: 12px; }
.kh-placed-furniture.is-selected { outline: 3px solid var(--kh-yellow); outline-offset: 5px; border-radius: 14px; }
.kh-placed-furniture.is-moving { opacity: .55; filter: drop-shadow(0 7px 4px rgba(4, 42, 48, .23)) saturate(.75); }
.kh-placed-furniture.is-floor-item { pointer-events: none; }
.kh-floor-item-manage {
  position: absolute;
  z-index: 2300;
  left: calc(var(--item-x) + var(--manage-offset-x, 0%));
  top: var(--item-y);
  display: grid;
  place-items: center;
  width: clamp(21px, 2.8cqw, 27px);
  height: clamp(19px, 2.5cqw, 24px);
  padding: 0 0 4px;
  transform: translate(-50%, -145%);
  border: 2px solid #f8ffe9;
  border-radius: 999px;
  color: #fff7df;
  background: #28751d;
  box-shadow: 0 3px 0 #174c12, 0 5px 10px rgba(3, 51, 61, .2);
  font: 900 clamp(10px, 1.4cqw, 13px) / 1 system-ui, sans-serif;
  letter-spacing: -1px;
  pointer-events: auto;
  cursor: pointer;
}
.kh-floor-item-manage:hover,
.kh-floor-item-manage:focus-visible,
.kh-floor-item-manage.is-selected {
  color: #174c12;
  background: #ffd64a;
  outline: 2px solid #174c12;
  outline-offset: 2px;
}
.kh-floor-item-manage.is-moving { display: none; }
.kh-placed-furniture.is-seat::after {
  content: attr(data-seat-label);
  position: absolute;
  left: 50%;
  bottom: -17px;
  padding: 3px 7px;
  opacity: 0;
  transform: translateX(-50%);
  border-radius: 999px;
  color: white;
  background: rgba(3, 51, 61, .88);
  font-size: 9px;
  font-weight: 900;
  transition: opacity .15s ease;
}
.kh-placed-furniture.is-seat:hover::after { opacity: 1; }
.kh-client[data-room="private"] [data-lobby-only],
.kh-client[data-room="visited"] [data-lobby-only] { display: none; }

.kh-dock {
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: stretch;
  gap: 7px;
  width: min(880px, calc(100% - 30px));
  padding: 8px;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 247, 223, .6);
  border-radius: 21px;
  background: rgba(3, 51, 61, .94);
  box-shadow: var(--kh-shadow);
  backdrop-filter: blur(14px);
}

.kh-dock > button {
  position: relative;
  flex: 0 0 64px;
  min-height: 54px;
  padding: 5px 7px;
  border: 0;
  border-radius: 14px;
  color: var(--kh-cream);
  background: rgba(255, 255, 255, .08);
  transition: transform .16s ease, background .16s ease;
}
.kh-social-badge { position: absolute; right: -5px; top: -7px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border: 2px solid white; border-radius: 999px; color: white; background: #ed684f; font-size: 9px; line-height: 1; }
.kh-social-badge[hidden] { display: none; }
.kh-dock > button:not(:disabled):hover { transform: translateY(-2px); background: rgba(255, 255, 255, .16); }
.kh-dock > button[aria-expanded="true"] { color: var(--kh-navy); background: var(--kh-yellow); }
.kh-dock > button:disabled { cursor: not-allowed; opacity: .42; }
.kh-dock > button span, .kh-dock > button small { display: block; }
.kh-dock > button span { font-size: 22px; font-weight: 900; line-height: 1.05; }
.kh-dock > button small { margin-top: 3px; font-size: 10px; }

.kh-chat { flex: 1; display: flex; gap: 7px; min-width: 0; }
.kh-chat input {
  min-width: 0;
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 0 15px;
  color: var(--kh-ink);
  background: var(--kh-cream);
  box-shadow: inset 0 0 0 2px rgba(8, 63, 73, .16);
}
.kh-chat button {
  border: 0;
  border-radius: 14px;
  padding: 0 17px;
  color: var(--kh-navy);
  background: var(--kh-yellow);
  font-weight: 900;
}

.kh-drawer {
  position: fixed;
  z-index: 60;
  top: 86px;
  right: 20px;
  bottom: 102px;
  width: min(390px, calc(100vw - 40px));
  padding: 20px;
  overflow: auto;
  border: 3px solid var(--kh-paper);
  border-radius: 26px;
  background: var(--kh-cream);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .38);
}
.kh-drawer[hidden] { display: none; }
.kh-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.kh-drawer-head small { color: var(--kh-coral); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.kh-drawer-head h2 { margin: 3px 0 0; font-size: 28px; }
.kh-drawer-head button, .kh-dialog-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 13px;
  color: var(--kh-cream);
  background: var(--kh-ink);
  font-size: 24px;
}
.kh-drawer > p { margin: 13px 0 17px; font-size: 13px; line-height: 1.45; }

.kh-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--kh-navy);
  background: #ffe19a;
  box-shadow: inset 0 0 0 2px rgba(167, 99, 24, .15);
  font-size: 12px;
  font-weight: 900;
  border: 0;
}
.kh-wallet-pill > span { color: #bc6a20; font-size: 17px; }
.kh-wallet-pill:hover { box-shadow: inset 0 0 0 2px rgba(167, 99, 24, .28), 0 3px 0 rgba(167, 99, 24, .15); }

.kh-inventory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kh-inventory-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  min-height: 82px;
  padding: 8px;
  border: 2px solid rgba(8, 63, 73, .13);
  border-radius: 17px;
  color: var(--kh-ink);
  text-align: left;
  background: white;
}
.kh-inventory-item:hover, .kh-inventory-item.is-selected { border-color: var(--kh-teal); background: #e9fbf8; }
.kh-inventory-item:disabled { cursor: not-allowed; opacity: .5; filter: grayscale(.35); }
.kh-inventory-item-preview {
  width: 60px;
  aspect-ratio: var(--sprite-ratio, 4 / 5);
  background-image: url("../images/kwaken-furniture-atlas-v1.webp");
  background-repeat: no-repeat;
  background-size: var(--atlas-size-x, 500%) var(--atlas-size-y, 200%);
  background-position: var(--atlas-x) var(--atlas-y);
}
.kh-inventory-item strong, .kh-inventory-item small { display: block; padding-left: 7px; line-height: 1.2; }
.kh-inventory-item strong { font-size: 12px; }
.kh-inventory-item small { margin-top: 4px; color: #557075; font-size: 10px; }
.kh-clear-furniture {
  width: 100%;
  margin-top: 14px;
  padding: 11px 15px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: var(--kh-coral);
  font-weight: 900;
}

.kh-catalog-section-title { margin: 18px 0 8px; color: var(--kh-ink); font-size: 15px; }
.kh-catalog-grid { display: grid; gap: 10px; }
.kh-catalog-categories { display:flex; flex:0 0 auto; gap:6px; margin:0 0 9px; padding:1px 1px 4px; overflow-x:auto; }
.kh-catalog-categories button { flex:0 0 auto; padding:6px 10px; border:1px solid #b9d889; border-radius:999px; color:#356b33; background:#fff; font-size:10px; font-weight:900; }
.kh-catalog-categories button[aria-pressed="true"] { border-color:#28752d; color:#fff; background:#34892a; }
.kh-catalog-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 2px solid rgba(8, 63, 73, .13);
  border-radius: 17px;
  background: white;
}
.kh-catalog-item .kh-inventory-item-preview { width: 66px; }
.kh-catalog-item strong, .kh-catalog-item small { display: block; }
.kh-catalog-item strong { font-size: 13px; }
.kh-catalog-item small { margin-top: 4px; color: #557075; font-size: 10px; }
.kh-catalog-item button {
  min-width: 72px;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--kh-teal);
  font-size: 11px;
  font-weight: 900;
}
.kh-catalog-item button:disabled { cursor: not-allowed; opacity: .45; }
.kh-catalog-item button.is-low-balance { color: #6f4a12; background: #ffd84a; }
.kh-skin-thumb {
  display: block;
  width: 66px;
  aspect-ratio: 1;
  border-radius: 15px;
  background-color: #e9fbf8;
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 300% 500%;
  box-shadow: inset 0 0 0 2px rgba(8, 63, 73, .12);
}
.kh-skin-thumb.is-base { background-image: url("../images/kwaker-motion-front-yellow-v5.webp"); }
.kh-skin-thumb[data-skin-item="halloween_vampire"] { background-image: url("../images/skin-vampire-motion-front-v5.webp"); }
.kh-skin-thumb[data-skin-item="halloween_pumpkin"] { background-image: url("../images/skin-pumpkin-motion-front-v5.webp"); }
.kh-skin-thumb[data-skin-item="halloween_moonwitch"] { background-image: url("../images/skin-moonwitch-motion-front-v5.webp"); }

.kh-item-menu {
  position: fixed;
  z-index: 65;
  top: 96px;
  right: 22px;
  width: min(330px, calc(100vw - 44px));
  padding: 18px;
  border: 3px solid var(--kh-paper);
  border-radius: 24px;
  color: var(--kh-ink);
  background: var(--kh-cream);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .38);
}
.kh-item-menu[hidden] { display: none; }
.kh-item-menu-head { display: grid; grid-template-columns: 78px minmax(0, 1fr) 38px; align-items: center; gap: 10px; }
.kh-item-menu-head small { color: var(--kh-coral); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.kh-item-menu-head h2 { margin: 3px 0 0; font-size: 22px; line-height: 1.05; }
.kh-item-menu-head > button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 13px;
  color: var(--kh-cream);
  background: var(--kh-ink);
  font-size: 24px;
}
.kh-item-menu-preview {
  width: 74px;
  aspect-ratio: var(--sprite-ratio, 4 / 5);
  background-image: url("../images/kwaken-furniture-atlas-v1.webp");
  background-repeat: no-repeat;
  background-size: var(--atlas-size-x, 500%) var(--atlas-size-y, 200%);
  background-position: var(--atlas-x) var(--atlas-y);
  filter: drop-shadow(0 5px 3px rgba(4, 42, 48, .2));
}
.kh-item-menu-preview.is-rotated { background-image: url("../images/kwaken-furniture-atlas-rotated-v1.webp"); }
.kh-item-menu > p { margin: 14px 0; color: #46686d; font-size: 12px; line-height: 1.45; }
.kh-item-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.kh-item-actions button {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 7px;
  padding: 11px;
  border: 2px solid rgba(8, 63, 73, .13);
  border-radius: 15px;
  color: var(--kh-ink);
  text-align: left;
  background: white;
}
.kh-item-actions button:hover:not(:disabled) { border-color: var(--kh-teal); background: #e9fbf8; }
.kh-item-actions button:disabled { cursor: not-allowed; opacity: .42; }
.kh-item-actions button span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: white; background: var(--kh-teal); font-size: 17px; }
.kh-item-actions button strong { font-size: 11px; }

.kh-dialog {
  width: min(520px, calc(100vw - 30px));
  padding: 30px;
  border: 3px solid var(--kh-paper);
  border-radius: 28px;
  color: var(--kh-ink);
  background: var(--kh-cream);
  box-shadow: 0 30px 110px rgba(0, 0, 0, .52);
}
.kh-dialog::backdrop { background: rgba(0, 34, 40, .72); backdrop-filter: blur(5px); }
.kh-dialog-close { position: absolute; top: 15px; right: 15px; }
.kh-dialog-kicker { color: var(--kh-coral); font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.kh-dialog h2 { margin: 8px 45px 12px 0; font-size: clamp(25px, 5vw, 38px); line-height: 1.04; }
.kh-dialog p, .kh-dialog li { font-size: 14px; line-height: 1.55; }
.kh-dialog ul { padding-left: 20px; }

.kh-navigator { width: min(760px, calc(100vw - 30px)); }
.kh-room-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 20px; }
.kh-room-card {
  padding: 0;
  overflow: hidden;
  border: 3px solid rgba(8, 63, 73, .13);
  border-radius: 20px;
  color: var(--kh-ink);
  text-align: left;
  background: white;
  transition: transform .16s ease, border-color .16s ease;
}
.kh-room-card:hover, .kh-room-card.is-current { transform: translateY(-2px); border-color: var(--kh-teal); }
.kh-room-card img { display: block; width: 100%; aspect-ratio: 16 / 8.5; object-fit: cover; }
.kh-room-card span { display: block; padding: 13px 14px 15px; }
.kh-room-card strong, .kh-room-card small { display: block; }
.kh-room-card small { margin-top: 3px; color: #557075; }
.kh-public-rooms { margin-top: 24px; padding-top: 19px; border-top: 2px dashed rgba(8, 63, 73, .16); }
.kh-public-rooms h3 { margin: 0; font-size: 17px; }
.kh-public-rooms > p { margin: 6px 0 0; color: #557075; }
.kh-public-room-grid { margin-top: 12px; }
.kh-public-room-card small { display: flex; align-items: center; gap: 5px; }

.kh-checkin {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: #073f49;
  transition: opacity .32s ease, visibility .32s ease;
}
.kh-checkin.is-checked-in { opacity: 0; visibility: hidden; pointer-events: none; }
.kh-checkin-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 51, 61, .96), rgba(3, 51, 61, .52)),
    url("../images/kwaakdam-tuincentrum-looproute-v2.webp?v=0.52.0-garden-centre-walkways") center / cover;
  filter: saturate(.88);
}
.kh-checkin-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, .8fr);
  align-items: end;
  width: min(920px, 100%);
  min-height: 530px;
  overflow: hidden;
  border: 4px solid rgba(255, 247, 223, .82);
  border-radius: 38px;
  background: linear-gradient(115deg, rgba(255, 247, 223, .98) 0 58%, rgba(72, 200, 199, .94) 58% 100%);
  box-shadow: 0 34px 120px rgba(0, 0, 0, .44);
}
.kh-checkin-copy { align-self: center; padding: clamp(30px, 6vw, 64px); }
.kh-eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  color: white;
  background: var(--kh-coral);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.kh-checkin h1 { margin: 19px 0 13px; font-size: clamp(38px, 5vw, 64px); line-height: .96; letter-spacing: -.045em; }
.kh-checkin h1 strong { color: var(--kh-teal); }
.kh-checkin-copy > p { max-width: 500px; margin: 0 0 24px; font-size: 16px; line-height: 1.5; }
.kh-auth-tabs { display: flex; gap: 7px; margin: -8px 0 17px; }
.kh-auth-tabs button {
  padding: 8px 12px;
  border: 2px solid rgba(8, 63, 73, .14);
  border-radius: 999px;
  color: var(--kh-ink);
  background: white;
  font-size: 11px;
  font-weight: 900;
}
.kh-auth-tabs button[aria-selected="true"] { border-color: var(--kh-teal); color: white; background: var(--kh-teal); }
.kh-checkin form label { display: block; margin: 12px 0 7px; font-size: 12px; font-weight: 900; }
.kh-checkin input {
  display: block;
  width: 100%;
  padding: 14px 15px;
  border: 2px solid rgba(8, 63, 73, .22);
  border-radius: 15px;
  color: var(--kh-ink);
  background: white;
}
.kh-checkin form button {
  width: 100%;
  margin-top: 14px;
  padding: 12px 17px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: var(--kh-ink);
  box-shadow: 0 5px 0 #002a32;
  font-weight: 900;
}
.kh-checkin form small { display: block; margin-top: 9px; color: #557075; font-size: 11px; }
.kh-auth-error { display: block; min-height: 17px; margin-top: 8px; color: #bd3b34; font-size: 11px; }
.kh-checkin-character { position: relative; align-self: stretch; display: grid; align-items: end; justify-items: center; padding: 34px 18px 0; overflow: hidden; }
.kh-checkin-character::before {
  content: "";
  position: absolute;
  width: 320px;
  aspect-ratio: 1;
  border: 36px solid rgba(255, 247, 223, .27);
  border-radius: 50%;
}
.kh-checkin-character span {
  position: absolute;
  bottom: 26px;
  width: 72%;
  height: 11%;
  border-radius: 50%;
  background: rgba(3, 51, 61, .22);
  filter: blur(10px);
}
.kh-checkin-character .kh-avatar-preview-sprite { position: relative; z-index: 2; width: min(310px, 92%); filter: drop-shadow(0 15px 8px rgba(3, 51, 61, .18)); }

.kh-toast {
  position: fixed;
  z-index: 150;
  left: 50%;
  top: 88px;
  max-width: min(430px, calc(100vw - 28px));
  padding: 10px 14px;
  opacity: 0;
  transform: translate(-50%, -8px);
  border-radius: 13px;
  color: white;
  background: var(--kh-ink);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .28);
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.kh-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .kh-client { grid-template-rows: 58px minmax(0, 1fr); }
  .kh-topbar { grid-template-columns: 1fr auto auto; padding: 7px 11px; }
  .kh-brand-mark { width: 38px; border-radius: 12px; font-size: 20px; }
  .kh-brand strong { font-size: 15px; }
  .kh-brand small, .kh-room-title { display: none; }
  .kh-connection small { display: none; }
  .kh-language-switch { margin-inline: 5px; }
  .kh-language-switch button { min-width: 30px; padding: 4px 6px; }
  .kh-stage-wrap { place-items: start center; padding: 8px 7px 91px; overflow: hidden; }
  .kh-stage { width: 100%; height: calc(100svh - 142px); aspect-ratio: auto; }
  .kh-guest { width: clamp(128px, 22vw, 158px); }
  .kh-guest.is-sitting { width: clamp(132px, 22vw, 165px); }
  .kh-remote-guest { width: clamp(120px, 20.5vw, 150px); }
  .kh-visitor { width: clamp(122px, 21vw, 152px); }
  .kh-placed-furniture { width: var(--item-width, clamp(92px, 17vw, 132px)); }
  .kh-lobby-art { width: auto; min-width: 100%; left: 50%; transform: translateX(-50%); object-position: center; }
  .kh-help-bubble { top: 12px; }
  .kh-dock { bottom: 8px; width: calc(100% - 14px); gap: 4px; padding: 5px; border-radius: 16px; }
  .kh-dock > button { flex-basis: 44px; min-height: 46px; padding: 3px; }
  .kh-dock > button span { font-size: 19px; }
  .kh-dock > button small { display: none; }
  .kh-dock > button[data-action="catalog"] { display: none; }
  .kh-chat button { padding: 0 11px; }
  .kh-chat input { padding: 0 10px; font-size: 13px; }
  .kh-drawer { top: 68px; right: 7px; bottom: 75px; width: calc(100vw - 14px); }
  .kh-item-menu { top: auto; right: 7px; bottom: 75px; width: calc(100vw - 14px); }
  .kh-room-grid { grid-template-columns: 1fr; }
  .kh-checkin { padding: 10px; }
  .kh-checkin-card { display: block; min-height: 0; border-radius: 28px; background: var(--kh-cream); }
  .kh-checkin-copy { padding: 28px 22px 24px; }
  .kh-checkin h1 { font-size: 42px; }
  .kh-checkin-character { display: none; }
  .kh-checkin input, .kh-checkin form button { width: 100%; }
}

/* 0.9.1 — one Panfu-inspired scene contract for every KwaakFu room. */
.kh-client {
  grid-template-rows: 64px minmax(0, 1fr);
  background:
    linear-gradient(#53c9ef 0 42%, #75c956 42% 100%);
}

.kh-topbar {
  min-height: 64px;
  padding-block: 7px;
  border-bottom-width: 4px;
}

.kh-stage-wrap {
  place-items: start center;
  padding: 28px 10px 18px;
  overflow: auto;
}

.kh-stage {
  container: kwaak-world / inline-size;
  width: min(840px, calc(100vw - 20px), calc((100svh - 112px) * 84 / 53));
  max-width: 840px;
  height: auto;
  aspect-ratio: 84 / 53;
  border: 5px solid #4da522;
  border-radius: 17px;
  box-shadow:
    0 0 0 4px #f4ffe4,
    0 8px 0 #2c791d,
    0 24px 60px rgba(28, 82, 31, .3);
}

.kh-lobby-art {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.kh-stage-shade {
  background: linear-gradient(to bottom, transparent 72%, rgba(34, 88, 31, .08));
}

.kh-remote-layer,
.kh-furniture-layer,
.kh-npc-layer {
  z-index: auto;
}

.kh-npc-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.kh-guest,
.kh-remote-guest,
.kh-world-npc {
  width: 7%;
  width: 7cqw;
  transform: translate(-50%, -100%) scale(var(--guest-scale, 1));
  transform-origin: center bottom;
  transition:
    left var(--walk-time, 1600ms) linear,
    top var(--walk-time, 1600ms) linear,
    transform var(--walk-time, 1600ms) linear;
}

.kh-remote-guest,
.kh-world-npc {
  width: 7%;
  width: 7cqw;
}

.kh-visitor {
  width: 14%;
  width: 14cqw;
  transform: translate(-50%, -100%) scale(var(--guest-scale, 1));
  transform-origin: center bottom;
}

.kh-guest.is-taking-seat {
  transition: left .28s ease-out, top .28s ease-out, width .28s ease-out, transform .28s ease-out;
}

.kh-guest.is-sitting,
.kh-remote-guest.is-sitting,
.kh-world-npc.is-sitting {
  width: 7%;
  width: 7cqw;
  transform: translate(-50%, -86%) scale(var(--guest-scale, 1));
}

.kh-guest.is-sitting .kh-sprite-flip {
  aspect-ratio: 1;
}

.kh-guest > strong,
.kh-visitor > strong {
  bottom: -2.15cqw;
  padding: .32cqw .8cqw;
  border-width: 2px;
  font-size: clamp(8px, 1.2cqw, 11px);
}

.kh-visitor > small,
.kh-world-npc > small {
  bottom: -4cqw;
  font-size: clamp(7px, .9cqw, 9px);
}

.kh-guest-shadow {
  left: 17%;
  right: 17%;
  bottom: 1%;
}

.kh-speech {
  width: min(240px, 38cqw);
  max-width: min(240px, 38cqw);
}
.kh-chat-bubble {
  padding: clamp(4px, .6cqw, 5px) clamp(6px, .9cqw, 8px);
  border-radius: 8px;
  font-size: clamp(9px, 1.35cqw, 13px);
}

.kh-placed-furniture {
  width: var(--item-width, 18cqw);
  transform: translate(-50%, calc(var(--item-anchor-y, -94%) - var(--item-stack-z, 0px))) scale(var(--item-scale, 1)) scaleX(var(--item-mirror, 1));
  transform-origin: center bottom;
}
.kh-placed-furniture.is-mirrored { --item-mirror: -1; }
.kh-seat-front {
  clip-path: var(--seat-layer-clip, inset(58% 0 0 0));
  filter: none;
  pointer-events: none !important;
  cursor: default;
}

.kh-seat-front:hover {
  outline: 0;
}

.kh-walk-target {
  width: 3.2cqw;
  min-width: 18px;
  max-width: 28px;
}

.kh-dock {
  z-index: 9000;
  left: 50%;
  bottom: 10px;
  width: min(570px, calc(100% - 92px));
  min-height: 43px;
  gap: 4px;
  padding: 4px;
  transform: translateX(-50%);
  border: 3px solid #f8ffe9;
  border-radius: 10px;
  background: #56aa23;
  box-shadow: 0 4px 0 #2d741d, 0 8px 18px rgba(32, 82, 27, .28);
}

.kh-dock > button {
  flex: 0 0 39px;
  min-width: 39px;
  min-height: 35px;
  height: 35px;
  padding: 2px;
  border: 2px solid #286c1a;
  border-radius: 7px;
  background: #f7ffec;
  box-shadow: 0 2px 0 #286c1a;
}

.kh-dock > button span {
  font-size: 19px;
  line-height: 1;
}

.kh-dock > button small {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  display: block;
  padding: 4px 7px;
  opacity: 0;
  transform: translate(-50%, 4px);
  border: 2px solid white;
  border-radius: 7px;
  color: white;
  background: #286c1a;
  box-shadow: 0 2px 0 rgba(23, 74, 21, .35);
  font-size: 8px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}

.kh-dock > button:hover small,
.kh-dock > button:focus-visible small {
  opacity: 1;
  transform: translate(-50%, 0);
}

.kh-chat {
  min-width: 0;
  min-height: 35px;
  height: 35px;
  border: 2px solid #286c1a;
  border-radius: 7px;
  box-shadow: 0 2px 0 #286c1a;
}

.kh-chat input {
  min-width: 75px;
  padding: 0 10px;
  font-size: 11px;
}

.kh-chat button {
  min-width: 58px;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 950;
}

.kh-emote-tray {
  left: max(12px, calc(50% - 285px));
  bottom: 58px;
  grid-template-columns: repeat(6, 34px);
  gap: 4px;
  padding: 6px;
  border-radius: 10px;
}

.kh-emote-tray button {
  width: 34px;
  height: 32px;
  border-radius: 7px;
  font-size: 17px;
}

.kh-room-tools {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.kh-room-tools button {
  min-width: 52px;
  padding: 6px 5px;
  border-width: 2px;
  border-radius: 9px;
}

.kh-room-tools span { font-size: 18px; }
.kh-room-tools small { font-size: 8px; }

.kh-quest-badge {
  left: 10px;
  bottom: 10px;
  transform: scale(.78);
  transform-origin: left bottom;
}

.kh-public-exit {
  left: 10px;
  top: 10px;
  padding: 6px 9px;
  border-width: 2px;
  border-radius: 9px;
  font-size: 10px;
}

.kh-world-hotspot {
  min-width: 96px;
  padding: 5px 8px;
  border-width: 2px;
  border-radius: 10px;
  opacity: .88;
}

.kh-world-hotspot span { font-size: 10px; }
.kh-world-hotspot small { font-size: 8px; }

@media (max-width: 760px) {
  .kh-client { grid-template-rows: 56px minmax(0, 1fr); }
  .kh-topbar { min-height: 56px; }
  .kh-stage-wrap { place-items: start center; padding: 16px 6px; overflow: auto; }
  .kh-stage {
    width: min(840px, calc(100vw - 12px), calc((100svh - 86px) * 84 / 53));
    height: auto;
    aspect-ratio: 84 / 53;
    border-width: 4px;
    border-radius: 12px;
  }
  .kh-guest,
  .kh-remote-guest,
  .kh-world-npc { width: 7cqw; }
  .kh-visitor { width: 14cqw; }
  .kh-guest.is-sitting,
  .kh-remote-guest.is-sitting { width: 7cqw; }
  .kh-dock {
    bottom: 6px;
    width: calc(100% - 12px);
    gap: 2px;
    padding: 3px;
    border-width: 2px;
  }
  .kh-dock > button {
    flex-basis: 29px;
    min-width: 29px;
    height: 31px;
    min-height: 31px;
    border-width: 1px;
  }
  .kh-dock > button span { font-size: 15px; }
  .kh-dock > button small { display: none; }
  .kh-chat { height: 31px; min-height: 31px; border-width: 1px; }
  .kh-chat input { padding-inline: 6px; font-size: 9px; }
  .kh-chat button { min-width: 43px; padding-inline: 6px; font-size: 8px; }
  .kh-emote-tray {
    left: 6px;
    bottom: 43px;
    grid-template-columns: repeat(6, minmax(25px, 1fr));
    width: min(232px, calc(100% - 12px));
  }
  .kh-emote-tray button { width: 100%; height: 29px; font-size: 15px; }
  .kh-room-tools { right: 6px; top: 18%; transform: none; }
  .kh-room-tools button { min-width: 40px; padding: 4px; }
  .kh-quest-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* KwaakFu 0.5 — getekende wereldlaag */
body { background: linear-gradient(#55c8ef 0 44%, #66bd44 44% 100%); }
.kh-checkin { z-index: 1000; }
.kh-checkin-backdrop {
  background:
    linear-gradient(90deg, rgba(38, 119, 39, .78), rgba(28, 94, 41, .34)),
    url("../images/kwaakdam-havenplein-v2.webp") center / cover;
  filter: saturate(.92);
}
.kh-checkin-card {
  border: 5px solid #f4ffd8;
  border-radius: 24px;
  background: linear-gradient(108deg, #fffce8 0 58%, #72c63e 58% 100%);
  box-shadow: 0 8px 0 #2e791d, 0 28px 70px rgba(20, 69, 29, .36);
}
.kh-checkin h1 { letter-spacing: -.025em; }.kh-checkin h1 strong { color: #34892a; }
.kh-auth-tabs button, .kh-checkin input { border-color: #81b95c; border-radius: 10px; box-shadow: 0 2px 0 rgba(47, 127, 29, .2); }
.kh-auth-tabs button[aria-selected="true"] { border-color: #2f7f1d; background: #58ad20; }
.kh-checkin form button { border: 3px solid #fff6cc; border-radius: 11px; color: #563e16; background: #ffd33e; box-shadow: 0 4px 0 #bd7222; }
.kh-checkin-character .kh-avatar-preview-sprite { filter: drop-shadow(0 7px 0 rgba(43, 104, 31, .2)); }
.kh-profile-avatar img, .kh-checkin-character .kh-avatar-preview-sprite { filter: drop-shadow(0 4px 0 rgba(43, 104, 31, .16)); }
.kh-checkin[data-auth-mode="login"] .kh-avatar-setup { display: none; }
.kh-client { grid-template-rows: 68px minmax(0, 1fr); background: linear-gradient(#55c8ef 0 43%, #69bd48 43% 100%); }
.kh-topbar {
  padding-block: 8px;
  border-bottom: 4px solid #2f7f1d;
  background: #55b91f;
  box-shadow: 0 4px 0 rgba(255, 255, 255, .2) inset, 0 4px 0 rgba(35, 105, 25, .22);
  backdrop-filter: none;
}
.kh-brand small, .kh-room-title span, .kh-connection small { color: #e9ffd9; }
.kh-brand-mark { border-radius: 50%; background: #ffd33e; box-shadow: 0 4px 0 #d47e25; }
.kh-stage-wrap { padding: 12px 14px 92px; }
.kh-stage {
  width: min(100%, calc((100svh - 178px) * 1.5));
  aspect-ratio: 3 / 2;
  border: 6px solid #51ad21;
  border-radius: 22px;
  box-shadow: 0 0 0 4px #efffda, 0 18px 44px rgba(31, 83, 32, .35);
  background: #d7ef9b;
}
.kh-stage-shade { background: linear-gradient(to bottom, transparent 63%, rgba(4, 54, 61, .07)); }
.kh-help-bubble { top: 2.5%; border: 3px solid #2f7f1d; border-radius: 13px; background: #fffce8; box-shadow: 0 5px 0 rgba(39, 105, 31, .26); }
.kh-guest {
  z-index: 150;
  width: clamp(78px, 9vw, 138px);
  transform: translate(-50%, -92%) scale(var(--guest-scale, 1));
  transform-origin: center bottom;
}
.kh-guest.is-sitting { width: clamp(70px, 7.5vw, 114px); transform: translate(-50%, -73%) scale(var(--guest-scale, 1)); }
.kh-remote-guest { width: clamp(76px, 8.7vw, 132px); }
.kh-visitor {
  z-index: 150;
  width: clamp(76px, 8.8vw, 134px);
  transform: translate(-50%, -91%) scale(var(--guest-scale, 1));
  transform-origin: center bottom;
}
.kh-remote-layer, .kh-furniture-layer { z-index: auto; }
.kh-npc-layer { position: absolute; z-index: 9; inset: 0; pointer-events: none; }
.kh-world-npc {
  width: clamp(76px, 8.7vw, 132px);
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
}
.kh-item-actions button[hidden] { display: none; }
.kh-world-npc:hover { filter: brightness(1.05); }
.kh-world-npc:focus-visible { outline: 4px solid #ffdc46; outline-offset: 5px; border-radius: 34%; }
.kh-world-npc > small {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -38px;
  padding: 2px 7px;
  transform: translateX(-50%);
  border-radius: 999px;
  color: #31552c;
  background: #fff5be;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}
.kh-guest > strong, .kh-visitor > strong { border: 2px solid rgba(255,255,255,.8); background: #2e701f; box-shadow: 0 3px 0 rgba(24, 75, 22, .28); }
.kh-reception-callout { left: 4%; top: 4%; padding: 6px 11px; border: 2px solid #fff8d2; background: #2e701f; }

.kh-world-hotspot {
  position: absolute;
  z-index: 220;
  display: grid;
  gap: 1px;
  min-width: 112px;
  padding: 7px 10px;
  opacity: .82;
  transform: translate(-50%, -50%) scale(.92);
  border: 3px solid white;
  border-radius: 14px;
  color: #173d26;
  background: #ffd33e;
  box-shadow: 0 4px 0 #c87525;
  transition: opacity .15s ease, transform .15s ease;
}
.kh-world-hotspot:hover, .kh-world-hotspot:focus-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.kh-world-hotspot span { font-weight: 950; }.kh-world-hotspot small { font-size: 9px; }
.kh-hotspot-garden { left: 14%; top: 26%; }.kh-hotspot-shop { left: 80%; top: 27%; }
.kh-public-exit {
  position: absolute;
  z-index: 225;
  left: 2.5%;
  top: 3%;
  display: none;
  padding: 8px 12px;
  border: 3px solid #fff8d2;
  border-radius: 12px;
  color: #173d26;
  background: #ffd33e;
  box-shadow: 0 4px 0 #bd7222;
  font-weight: 950;
}
.kh-client[data-room="hotel"] .kh-public-exit, .kh-client[data-room="shop"] .kh-public-exit { display: block; }
.kh-quest-badge {
  position: absolute;
  z-index: 224;
  left: 2.5%;
  bottom: 3.2%;
  display: grid;
  grid-template-columns: 38px 1fr;
  column-gap: 8px;
  align-items: center;
  max-width: 210px;
  padding: 8px 11px 8px 8px;
  border: 3px solid #fff6cb;
  border-radius: 14px;
  color: #173d26;
  text-align: left;
  background: #ffd33e;
  box-shadow: 0 5px 0 #c87525;
}
.kh-quest-badge > span { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: white; background: #ed684f; font-size: 22px; }
.kh-quest-badge strong, .kh-quest-badge small { display: block; }.kh-quest-badge strong { font-size: 12px; }.kh-quest-badge small { font-size: 9px; }

.kh-dock {
  bottom: 12px;
  width: min(920px, calc(100% - 24px));
  gap: 5px;
  padding: 6px;
  border: 4px solid #f4ffd8;
  border-radius: 14px;
  background: #58ad20;
  box-shadow: 0 6px 0 #2e791d, 0 15px 35px rgba(25, 72, 25, .28);
  backdrop-filter: none;
}
.kh-dock > button {
  flex-basis: 54px;
  min-height: 48px;
  padding: 4px 7px;
  border: 2px solid #2f7f1d;
  border-radius: 10px;
  color: #214d26;
  background: #f5ffe7;
  box-shadow: 0 3px 0 #2f7f1d;
}
.kh-dock > button:hover, .kh-dock > button:focus-visible, .kh-dock > button[aria-expanded="true"] { color: #664313; background: #ffdc46; }
.kh-dock > button small { font-size: 8px; font-weight: 950; }
.kh-chat {
  min-height: 48px;
  overflow: hidden;
  border: 2px solid #2f7f1d;
  border-radius: 10px;
  background: #fffef2;
  box-shadow: 0 3px 0 #2f7f1d;
}
.kh-chat input { background: #fffef2; }
.kh-chat button { color: #614716; background: #ffdc46; }

.kh-emote-tray {
  position: absolute;
  z-index: 440;
  left: 2.5%;
  bottom: 3.2%;
  grid-template-columns: repeat(3, 44px);
  gap: 5px;
  padding: 7px;
  border: 3px solid #f4ffd8;
  border-radius: 13px;
  background: #58ad20;
  box-shadow: 0 5px 0 #2e791d;
}
.kh-emote-tray:not([hidden]) { display: grid; }
.kh-emote-tray button {
  width: 44px;
  height: 40px;
  border: 2px solid #2f7f1d;
  border-radius: 9px;
  background: #fffef2;
  box-shadow: 0 2px 0 #2f7f1d;
  font-size: 21px;
}
.kh-emote-tray button:hover, .kh-emote-tray button:focus-visible { background: #ffdc46; }

.kh-room-tools {
  position: absolute;
  z-index: 420;
  right: max(18px, calc((100% - min(100%, calc((100svh - 178px) * 1.5))) / 2 + 18px));
  top: 50%;
  display: none;
  gap: 6px;
  transform: translateY(-50%);
}
.kh-client[data-room="private"] .kh-room-tools, .kh-client[data-room^="visit:"] .kh-room-tools { display: grid; }
.kh-client[data-room^="visit:"] .kh-room-tools { display: none; }
.kh-room-tools button {
  display: grid;
  justify-items: center;
  min-width: 62px;
  padding: 8px 7px;
  border: 3px solid #fff7cf;
  border-radius: 12px;
  color: #5a3f13;
  background: #ffd33e;
  box-shadow: 0 4px 0 #bd7222;
}
.kh-room-tools span { font-size: 22px; }.kh-room-tools small { font-size: 9px; font-weight: 950; }
.kh-room-tools .kh-room-tool-icon,
.kh-support-launcher > span {
  display: grid;
  place-items: center;
}
.kh-room-tools .kh-room-tool-icon { width: 28px; height: 28px; }
.kh-room-tools .kh-room-tool-icon img,
.kh-support-launcher > span img { display: block; width: 100%; height: 100%; object-fit: contain; }

.kh-navigator { width: min(900px, calc(100vw - 30px)); }
.kh-world-map {
  position: relative;
  width: 100%;
  margin: 18px 0;
  overflow: hidden;
  border: 5px solid #58ad20;
  border-radius: 18px;
  background: #aee9f2;
  box-shadow: 0 5px 0 #2e791d;
}
.kh-world-map > img { display: block; width: 100%; height: auto; }
.kh-map-pin {
  position: absolute;
  display: grid;
  justify-items: center;
  min-width: 82px;
  padding: 5px 8px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff8d2;
  border-radius: 13px;
  color: #173d26;
  background: #ffd33e;
  box-shadow: 0 4px 0 #bd7222;
}
.kh-map-pin:hover, .kh-map-pin:focus-visible, .kh-map-pin.is-current { background: #fffbe1; transform: translate(-50%, -53%); }
.kh-map-pin span { display: grid; place-items: center; min-width: 26px; height: 26px; padding-inline: 5px; border-radius: 50%; color: white; background: #ed684f; font-weight: 950; }
.kh-map-pin strong { margin-top: 2px; font-size: 10px; white-space: nowrap; }
.kh-map-pin-harbor { left: 15%; top: 35%; }.kh-map-pin-home { left: 82%; top: 73%; }.kh-map-pin-hotel { left: 51%; top: 15%; }.kh-map-pin-shop { left: 28%; top: 19%; }
.kh-public-rooms { margin-top: 24px; }.kh-public-rooms h3 { margin-bottom: 5px; color: #275924; }

.kh-tasks { width: min(640px, calc(100vw - 30px)); }
.kh-task-list { display: grid; gap: 9px; margin: 18px 0; }
.kh-task-list > div {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border: 3px solid #b9dd76;
  border-radius: 14px;
  background: #f8ffe9;
}
.kh-task-list > div > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: white; background: #58ad20; font-size: 18px; font-weight: 950; }
.kh-task-list p, .kh-task-list small { display: block; margin: 0; }.kh-task-list small { margin-top: 3px; color: #5e7760; }.kh-task-list b { padding: 6px 9px; border-radius: 999px; color: #714b10; background: #ffdc46; }
.kh-task-list > div.is-complete { border-color: #58ad20; background: #e3f8ce; }
.kh-task-list > div.is-complete > span { color: #2e701f; background: #ffdc46; }
.kh-task-list > div.is-complete b { color: white; background: #34892a; }
.kh-team-bonus { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 12px; border-radius: 13px; color: white; background: #34892a; }
.kh-team-bonus i { grid-column: 1 / -1; display: block; height: 9px; overflow: hidden; border-radius: 999px; background: #24651f; }
.kh-team-bonus i span { display: block; width: 0; height: 100%; border-radius: inherit; background: #ffdc46; transition: width .35s ease; }
.kh-language-settings { display: grid; gap: 8px; margin: 17px 0; padding: 14px; border: 3px solid #b9dd76; border-radius: 15px; background: #f8ffe9; }
.kh-language-settings > span { color: #55705a; font-size: 13px; line-height: 1.45; }
.kh-language-settings > div { display: flex; gap: 8px; }
.kh-language-settings button { padding: 8px 12px; border: 2px solid #58ad20; border-radius: 999px; color: #2e701f; background: white; font: inherit; font-weight: 900; cursor: pointer; }
.kh-language-settings button[aria-pressed="true"] { color: white; background: #34892a; }

.kh-wallet-dialog { width: min(720px, calc(100vw - 30px)); }
.kh-wallet-balance-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 17px 0;
  padding: 15px 18px;
  border: 3px solid #eab23e;
  border-radius: 17px;
  color: #634513;
  background: linear-gradient(135deg, #fff0a9, #ffd84a);
  box-shadow: 0 4px 0 #c97924;
}
.kh-wallet-balance-card > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #fff4bd; background: #be7123; font-size: 25px; }
.kh-wallet-balance-card small, .kh-wallet-balance-card strong { display: block; }
.kh-wallet-balance-card small { font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.kh-wallet-balance-card strong { margin-top: 2px; font-size: 22px; }
.kh-wallet-balance-card b { font-size: 28px; }

.kh-daily-reward {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 15px;
  border: 3px solid #58ad20;
  border-radius: 17px;
  background: #f7ffe9;
}
.kh-daily-reward-icon { display: grid; place-items: center; width: 56px; height: 56px; border: 3px solid white; border-radius: 50%; color: #8d5a10; background: #ffdc46; box-shadow: 0 3px 0 #c87525; font-size: 27px; }
.kh-daily-reward-copy small { color: #ed684f; font-size: 9px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.kh-daily-reward-copy h3 { margin: 2px 0 3px; font-size: 18px; }
.kh-daily-reward-copy p { margin: 0; color: #577057; font-size: 11px; line-height: 1.35; }
.kh-daily-reward > button { min-width: 145px; padding: 11px 13px; border: 2px solid #276d20; border-radius: 12px; color: white; background: #34892a; box-shadow: 0 3px 0 #205f1c; font-size: 11px; font-weight: 950; }
.kh-daily-reward > button:hover:not(:disabled) { transform: translateY(-1px); background: #409d35; }
.kh-daily-reward > button:disabled { cursor: default; color: #446042; border-color: #a5c890; background: #d5e8c7; box-shadow: none; }
.kh-streak-track { display: flex; gap: 4px; margin-top: 8px; }
.kh-streak-track span { display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid #b9d9a0; border-radius: 50%; color: #76916d; background: white; font-size: 8px; font-weight: 950; }
.kh-streak-track span.is-active { border-color: #e1a92e; color: #6d4910; background: #ffdc46; }
.kh-streak-track span.is-today { box-shadow: 0 0 0 2px #ed684f; }

.kh-wallet-history { margin-top: 18px; }
.kh-wallet-history-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.kh-wallet-history-head h3 { margin: 0; font-size: 16px; }
.kh-wallet-history-head small { color: #67806b; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.kh-wallet-history [data-wallet-history] { display: grid; gap: 6px; max-height: 190px; overflow: auto; padding-right: 3px; }
.kh-wallet-entry { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; padding: 9px 10px; border: 2px solid #dce9c7; border-radius: 12px; background: white; }
.kh-wallet-entry > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: white; background: #58ad20; font-size: 15px; }
.kh-wallet-entry.is-spend > span { background: #ed684f; }
.kh-wallet-entry strong, .kh-wallet-entry small { display: block; }
.kh-wallet-entry strong { font-size: 11px; }.kh-wallet-entry small { margin-top: 2px; color: #718073; font-size: 9px; }
.kh-wallet-entry b { color: #34892a; font-size: 12px; }.kh-wallet-entry.is-spend b { color: #c64f43; }
.kh-wallet-empty { padding: 15px; border: 2px dashed #bfd6a9; border-radius: 12px; color: #6d806b; text-align: center; font-size: 11px; }
.kh-payment-note { margin: 13px 0 0 !important; padding: 10px 12px; border-radius: 11px; color: #6f5a34; background: #f4ecd9; font-size: 10px !important; }

.kh-social-dialog { width: min(760px, calc(100vw - 30px)); max-height: min(88svh, 860px); overflow-y: auto; }
.kh-social-dialog > p { color: #557075; }
.kh-friend-search { margin: 16px 0 12px; padding: 13px; border: 3px solid #b9dd76; border-radius: 16px; background: #f8ffe9; }
.kh-friend-search label { display: block; margin-bottom: 6px; color: #31552c; font-size: 10px; font-weight: 950; text-transform: uppercase; }
.kh-friend-search > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.kh-friend-search input { min-width: 0; padding: 11px 12px; border: 2px solid #9ac66a; border-radius: 11px; color: var(--kh-ink); background: white; font: inherit; }
.kh-friend-search button { padding: 10px 14px; border: 2px solid #276d20; border-radius: 11px; color: white; background: #34892a; font-weight: 950; }
.kh-social-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 17px; }
.kh-social-summary > span { display: grid; justify-items: center; padding: 9px; border-radius: 13px; color: #31552c; background: #e6f5d2; }
.kh-social-summary b { font-size: 20px; }.kh-social-summary small { font-size: 9px; font-weight: 900; text-transform: uppercase; }
.kh-social-section { margin-top: 15px; }.kh-social-section[hidden] { display: none; }
.kh-social-section h3 { margin: 0 0 7px; color: #31552c; font-size: 14px; }
.kh-social-section-note { margin: -2px 0 8px !important; color: #6d806b; font-size: 10px !important; line-height: 1.35 !important; }
.kh-social-list { display: grid; gap: 7px; }
.kh-social-row { display: grid; grid-template-columns: 58px minmax(110px, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border: 2px solid #d6e7c1; border-radius: 14px; background: white; }
.kh-social-row.is-request { border-color: #efc35a; background: #fffae9; }.kh-social-row.is-invite { border-color: #77cdd8; background: #eafaff; }
.kh-social-row.is-blocked { border-color: #d8aaa3; background: #fff5f2; }
.kh-social-row strong, .kh-social-row small { display: block; }.kh-social-row strong { font-size: 12px; }.kh-social-row small { margin-top: 3px; color: #738171; font-size: 9px; }.kh-social-row small.is-online { color: #34892a; font-weight: 950; }
.kh-social-avatar { width: 54px; margin: 0; filter: drop-shadow(0 2px 0 rgba(43, 104, 31, .14)); }
.kh-social-invite-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: white; background: #32a9bb; font-size: 25px; font-weight: 950; }
.kh-social-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.kh-social-row-actions button { padding: 7px 9px; border: 2px solid #2f7f1d; border-radius: 9px; color: white; background: #58ad20; font-size: 9px; font-weight: 950; }
.kh-social-row-actions button.is-secondary { border-color: #9cb2a0; color: #486254; background: white; }
.kh-social-row-actions button:disabled { cursor: not-allowed; opacity: .42; }
.kh-social-empty { margin: 0; padding: 13px; border: 2px dashed #bfd6a9; border-radius: 12px; color: #6d806b; text-align: center; font-size: 11px; }

.kh-public-profile { width: min(580px, calc(100vw - 30px)); }
.kh-public-profile-layout { display: grid; grid-template-columns: 210px 1fr; gap: 20px; align-items: center; margin-top: 15px; }
.kh-public-profile-stage { display: grid; place-items: end center; min-height: 245px; overflow: hidden; border: 4px solid #58ad20; border-radius: 18px; background: linear-gradient(#86dff3 0 57%, #a8dc75 57%); }
.kh-public-profile-stage .kh-profile-kwaker { width: 185px; margin-bottom: 2px; }
.kh-online-state { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; color: #6f746f; background: #e6e9e5; font-size: 9px; font-weight: 950; text-transform: uppercase; }
.kh-online-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9ba39b; }.kh-online-state.is-online { color: #276d20; background: #e0f6d0; }.kh-online-state.is-online::before { background: #58ad20; box-shadow: 0 0 0 3px rgba(88,173,32,.18); }
.kh-public-profile-copy h2 { margin: 8px 0 3px; font-size: 28px; }.kh-public-profile-copy > p { margin: 0; color: #60745e; }
.kh-public-profile-actions { display: grid; gap: 7px; margin-top: 17px; }
.kh-public-profile-actions button { padding: 10px 12px; border: 2px solid #276d20; border-radius: 11px; color: white; background: #34892a; font-weight: 950; }.kh-public-profile-actions button[hidden] { display: none; }.kh-public-profile-actions button:disabled { cursor: not-allowed; opacity: .44; }
.kh-public-profile-actions button.is-safety { display: flex; align-items: center; justify-content: center; gap: 7px; border-color: #a95447; color: #7d342c; background: #fff3ef; box-shadow: none; }
.kh-public-profile-actions button.is-safety[hidden] { display: none; }
.kh-public-profile-actions button.is-safety span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: white; background: #d66253; font-size: 11px; }
.kh-public-profile-actions button.is-safety.is-unblock { border-color: #779c65; color: #315d2a; background: #edf9e8; }
.kh-public-profile-actions button.is-safety.is-unblock span { background: #58ad20; }

/* 0.11 safety tools: reporting, blocking and the role-gated moderation view. */
.kh-report-dialog { width: min(560px, calc(100vw - 30px)); }
.kh-report-dialog > p { margin: 0 0 15px; color: #557075; }
.kh-report-target { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; margin-bottom: 15px; padding: 10px 12px; border: 2px solid #efc7bf; border-radius: 14px; background: #fff6f3; }
.kh-report-target > span { display: grid; place-items: center; width: 40px; height: 40px; border: 3px solid white; border-radius: 50%; color: white; background: #d66253; box-shadow: 0 2px 0 #9d4138; font-size: 20px; font-weight: 1000; }
.kh-report-target small, .kh-report-target strong { display: block; }.kh-report-target small { color: #9d675f; font-size: 9px; font-weight: 950; text-transform: uppercase; }.kh-report-target strong { margin-top: 2px; font-size: 15px; }
.kh-report-dialog form { display: grid; gap: 7px; }
.kh-report-dialog label { margin-top: 5px; color: #31552c; font-size: 10px; font-weight: 950; text-transform: uppercase; }
.kh-report-dialog label small { color: #708172; font-size: 9px; font-weight: 700; text-transform: none; }
.kh-report-dialog select, .kh-report-dialog textarea { width: 100%; padding: 11px 12px; border: 2px solid #a6c586; border-radius: 11px; color: var(--kh-ink); background: white; font: inherit; }
.kh-report-dialog textarea { min-height: 94px; resize: vertical; line-height: 1.4; }
.kh-report-dialog select:focus, .kh-report-dialog textarea:focus { outline: 3px solid rgba(88, 173, 32, .2); border-color: #58ad20; }
.kh-report-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 3px; }
.kh-report-form-footer > small { color: #718073; font-size: 9px; }.kh-report-form-footer > button { padding: 10px 15px; border: 2px solid #8f3c35; border-radius: 11px; color: white; background: #d66253; box-shadow: 0 3px 0 #963a33; font-weight: 950; }
.kh-report-form-footer > button:disabled { cursor: wait; opacity: .55; box-shadow: none; }
.kh-report-status { min-height: 18px; color: #a13d36; font-size: 10px; }

.kh-safety-settings { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 11px; align-items: center; margin: 15px 0; padding: 12px; border: 3px solid #93c873; border-radius: 15px; background: #f2fbe9; }
.kh-safety-shield { display: grid; place-items: center; width: 42px; height: 48px; border: 3px solid white; border-radius: 20px 20px 23px 23px; color: white; background: #34892a; box-shadow: 0 3px 0 #21651c; font-size: 20px; font-weight: 1000; }
.kh-safety-settings strong { color: #31552c; font-size: 13px; }.kh-safety-settings p { margin: 3px 0 0; color: #577057; font-size: 10px; line-height: 1.35; }
.kh-safety-settings > button { padding: 9px 11px; border: 2px solid #55306c; border-radius: 10px; color: white; background: #7b3aa4; box-shadow: 0 3px 0 #52236f; font-size: 9px; font-weight: 950; }
.kh-safety-settings > button[hidden] { display: none; }
.kh-account-settings { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: -5px 0 15px; padding: 10px 12px; border: 2px solid #c7d9bc; border-radius: 13px; background: white; }
.kh-account-settings[hidden] { display: none; }
.kh-account-settings > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: white; background: #32a9bb; box-shadow: 0 2px 0 #217985; font-size: 15px; }
.kh-account-settings strong { color: #31552c; font-size: 11px; }.kh-account-settings p { margin: 2px 0 0; color: #6a7b6b; font-size: 9px; line-height: 1.3; }
.kh-account-settings button { padding: 8px 11px; border: 2px solid #9d4138; border-radius: 9px; color: #8c3b33; background: #fff4f1; font-size: 9px; font-weight: 950; }
.kh-account-settings button:disabled { cursor: wait; opacity: .5; }

.kh-admin-dialog { width: min(820px, calc(100vw - 24px)); max-height: min(88svh, 880px); overflow-y: auto; }
.kh-admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.kh-admin-heading h2 { margin-bottom: 4px; }.kh-admin-heading p { margin: 0; color: #557075; font-size: 11px; }
.kh-admin-heading > button { flex: 0 0 auto; padding: 9px 12px; border: 2px solid #276d20; border-radius: 10px; color: white; background: #58ad20; font-size: 9px; font-weight: 950; }
.kh-admin-filters { display: flex; gap: 6px; margin: 16px 0 10px; }
.kh-admin-filters button { padding: 7px 12px; border: 2px solid #a9bea5; border-radius: 999px; color: #486254; background: white; font-size: 9px; font-weight: 950; }
.kh-admin-filters button[aria-pressed="true"] { border-color: #55306c; color: white; background: #7b3aa4; }
.kh-admin-report-list { display: grid; gap: 9px; }
.kh-admin-report { padding: 12px; border: 2px solid #d8e4c9; border-radius: 15px; background: white; }
.kh-admin-report[data-status="open"] { border-color: #efc35a; background: #fffdf2; }
.kh-admin-report-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.kh-admin-report-head strong, .kh-admin-report-head small { display: block; }.kh-admin-report-head strong { font-size: 13px; }.kh-admin-report-head small { margin-top: 3px; color: #718073; font-size: 9px; }
.kh-admin-report-state { padding: 5px 8px; border-radius: 999px; color: #6f4a12; background: #ffe59a; font-size: 8px; font-weight: 950; text-transform: uppercase; }
.kh-admin-report-body { margin: 9px 0 !important; padding: 9px 10px; border-radius: 10px; color: #425d52; background: #f4f7ef; font-size: 11px !important; line-height: 1.4 !important; white-space: pre-wrap; }
.kh-admin-chat-context { margin: 0 0 10px; padding: 9px; border: 2px solid #c9dce0; border-radius: 11px; background: #f2fbfc; }
.kh-admin-chat-context h4 { margin: 0 0 6px; color: #276d78; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.kh-admin-chat-context > div { display: grid; gap: 5px; max-height: 170px; overflow-y: auto; }
.kh-admin-chat-context article { padding: 6px 8px; border-radius: 8px; background: white; }
.kh-admin-chat-context article > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kh-admin-chat-context strong { color: #31555a; font-size: 9px; }.kh-admin-chat-context small { color: #7d8c8e; font-size: 8px; white-space: nowrap; }
.kh-admin-chat-context p { margin: 2px 0 0 !important; overflow-wrap: anywhere; color: #425d61; font-size: 10px !important; line-height: 1.35 !important; }
.kh-admin-report-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.kh-admin-report-actions button { padding: 7px 9px; border: 2px solid #a1b49c; border-radius: 9px; color: #496152; background: white; font-size: 8px; font-weight: 950; }
.kh-admin-report-actions button[data-admin-action="warn"], .kh-admin-report-actions button[data-admin-action="mute"] { border-color: #ba8024; color: #704c12; background: #fff6d7; }
.kh-admin-report-actions button[data-admin-action="ban"] { border-color: #9d4138; color: white; background: #d66253; }
.kh-admin-report-actions button[data-admin-action="actioned"] { border-color: #276d20; color: white; background: #58ad20; }
.kh-admin-report-actions button:disabled { cursor: wait; opacity: .5; }
.kh-admin-empty { margin: 4px 0 0 !important; padding: 18px; border: 2px dashed #b8d2aa; border-radius: 13px; color: #698067; text-align: center; font-size: 11px !important; }
.kh-admin-empty[hidden] { display: none; }

.kh-purchase-dialog { width: min(560px, calc(100vw - 30px)); overflow: visible; }
.kh-purchase-dialog > h2 { margin-bottom: 6px; }
.kh-purchase-dialog > p { margin: 0; color: #557075; line-height: 1.45; }
.kh-purchase-skin-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 17px;
  align-items: center;
  margin: 19px 0 14px;
  padding: 15px;
  border: 3px solid #7b3aa4;
  border-radius: 20px;
  background: linear-gradient(135deg, #f7edff, #e5fbff);
  box-shadow: 0 4px 0 #58267b;
}
.kh-purchase-skin-card .kh-skin-thumb { width: 112px; border: 3px solid white; background-color: #bcecf3; box-shadow: 0 4px 0 rgba(52, 82, 93, .18); }
.kh-purchase-skin-card small, .kh-purchase-skin-card strong, .kh-purchase-skin-card span { display: block; }
.kh-purchase-skin-card small { color: #7b3aa4; font-size: 9px; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; }
.kh-purchase-skin-card strong { margin-top: 4px; color: #193e45; font-size: 23px; line-height: 1.05; }
.kh-purchase-skin-card div > span { margin-top: 7px; color: #557075; font-size: 11px; line-height: 1.4; }
.kh-purchase-wallet { display: grid; grid-template-columns: 1fr 34px 1fr; gap: 9px; align-items: center; }
.kh-purchase-wallet > span { padding: 11px 13px; border: 2px solid #d9c78b; border-radius: 14px; background: #fffbea; }
.kh-purchase-wallet small, .kh-purchase-wallet strong { display: block; }
.kh-purchase-wallet small { color: #7a6b4d; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.kh-purchase-wallet strong { margin-top: 2px; color: #654614; font-size: 19px; }
.kh-purchase-wallet > i { color: #7b3aa4; text-align: center; font-size: 22px; font-style: normal; font-weight: 950; }
.kh-purchase-status { min-height: 34px; margin-top: 11px !important; padding: 9px 11px; border-radius: 11px; color: #31552c !important; background: #e7f6d6; font-size: 11px; font-weight: 850; }
.kh-purchase-dialog[data-state="insufficient"] .kh-purchase-status { color: #75430e !important; background: #fff0bd; }
.kh-purchase-dialog[data-state="busy"] .kh-purchase-status { color: #28566a !important; background: #dff6fb; }
.kh-purchase-actions { display: grid; grid-template-columns: .72fr 1.28fr; gap: 10px; margin-top: 12px; }
.kh-purchase-actions button { min-height: 48px; padding: 11px 14px; border: 2px solid #aac4b4; border-radius: 14px; color: #31552c; background: white; font-weight: 950; }
.kh-purchase-actions [data-confirm-purchase] { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-color: #276d20; color: white; background: #34892a; box-shadow: 0 3px 0 #205f1c; }
.kh-purchase-actions [data-confirm-purchase] strong { padding: 5px 8px; border-radius: 999px; color: #634513; background: #ffdc46; font-size: 10px; }
.kh-purchase-actions button:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }

.kh-profile { width: min(760px, calc(100vw - 30px)); }
.kh-profile-layout { display: grid; grid-template-columns: minmax(190px, .72fr) 1fr; gap: 20px; margin-top: 16px; }
.kh-profile-avatar { position: relative; display: grid; place-items: end center; min-height: 300px; overflow: hidden; border: 4px solid #58ad20; border-radius: 18px; background: linear-gradient(#86dff3 0 54%, #a8dc75 54%); }
.kh-profile-avatar::before { content: ""; position: absolute; bottom: 10%; width: 76%; height: 15%; border-radius: 50%; background: rgba(47, 99, 37, .2); }
.kh-profile-avatar img { position: relative; z-index: 1; width: min(260px, 108%); max-height: 290px; object-fit: contain; object-position: bottom; }
.kh-profile-avatar > span { position: absolute; z-index: 2; left: 9px; top: 9px; padding: 5px 9px; border: 2px solid white; border-radius: 999px; color: white; background: #ed684f; font-size: 10px; font-weight: 950; }
.kh-profile-kwaker { position: relative; z-index: 1; width: min(235px, 94%); margin-bottom: 4px; filter: drop-shadow(0 4px 0 rgba(43, 104, 31, .16)); }
.kh-role-badge-settings {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 10px;
  border: 3px solid #71bd50;
  border-radius: 15px;
  background: linear-gradient(145deg, #f8ffdf, #edfad4);
  box-shadow: 0 3px 0 rgba(45, 111, 34, .2);
}
.kh-role-badge-settings[hidden] { display: none; }
.kh-role-badge-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #9bcc6f;
  border-radius: 12px;
  background: white;
  box-shadow: inset 0 -3px 0 #e0efc9;
}
.kh-role-badge-preview .kh-avatar-badge {
  position: relative;
  left: auto;
  top: auto;
  transform: rotate(-2deg) scale(.92);
}
.kh-role-badge-preview .kh-avatar-badge[data-badge-tone="staff"] { transform: rotate(-2deg); }
.kh-role-badge-settings.is-badge-hidden .kh-role-badge-preview { opacity: .62; filter: saturate(.5); }
.kh-role-badge-copy strong, .kh-role-badge-copy p, .kh-role-badge-copy small { display: block; margin: 0; }
.kh-role-badge-copy strong { color: #31552c; font-size: 11px; }
.kh-role-badge-copy p { margin-top: 2px; color: #60745e; font-size: 9px; line-height: 1.3; }
.kh-role-badge-copy small { margin-top: 4px; color: #328328; font-size: 8px; font-weight: 950; }
.kh-role-badge-settings.is-badge-hidden .kh-role-badge-copy small { color: #77836f; }
.kh-role-badge-actions { display: grid; gap: 5px; min-width: 124px; }
.kh-role-badge-actions > button {
  min-width: 88px;
  padding: 8px 10px;
  border: 2px solid #2d7625;
  border-radius: 10px;
  color: white;
  background: #4eaa36;
  box-shadow: 0 3px 0 #27651f;
  font: inherit;
  font-size: 9px;
  font-weight: 950;
  cursor: pointer;
}
.kh-role-badge-actions > button[aria-pressed="true"] { border-color: #8b4f14; color: #65410d; background: #ffdb55; box-shadow: 0 3px 0 #a56a1b; }
.kh-role-badge-actions > button:focus-visible { outline: 3px solid #2b82a2; outline-offset: 2px; }
.kh-role-badge-actions > button:disabled { cursor: wait; opacity: .55; }
.kh-avatar-setup, .kh-avatar-options { display: grid; gap: 7px; margin: 12px 0 16px; }
.kh-avatar-setup { grid-template-columns: 132px 1fr; align-items: center; padding: 10px; border: 3px solid #b9dd76; border-radius: 13px; background: #f8ffe9; }
.kh-avatar-live-preview { display: grid; justify-items: center; align-self: stretch; min-height: 154px; overflow: hidden; border: 2px solid #9ac66a; border-radius: 11px; background: linear-gradient(#8bd9ed 0 58%, #a8dc75 58%); }
.kh-avatar-preview-sprite {
  --kh-avatar-preview-atlas: url("../images/kwaker-motion-front-yellow-v5.webp");
  width: 120px;
  aspect-ratio: 1;
  background-image: var(--kh-avatar-preview-atlas);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 300% 500%;
  filter: drop-shadow(0 3px 0 rgba(40,95,35,.18));
}
.kh-avatar-preview-sprite[data-avatar-color="cream"] { --kh-avatar-preview-atlas: url("../images/kwaker-motion-front-cream-v5.webp"); }
.kh-avatar-preview-sprite[data-avatar-color="brown"] { --kh-avatar-preview-atlas: url("../images/kwaker-motion-front-brown-v5.webp"); }
.kh-avatar-live-preview small { align-self: end; width: 100%; padding: 5px 4px; color: white; text-align: center; background: #34892a; font-size: 9px; font-weight: 900; }
.kh-checkin form .kh-avatar-live-preview small { margin: 0; color: white; }
.kh-avatar-setup-controls { display: grid; gap: 7px; }
.kh-avatar-setup-controls > strong, .kh-avatar-options > strong { color: #31552c; font-size: 11px; }
.kh-avatar-options > small { color: #60745e; font-size: 10px; font-weight: 900; }
.kh-kind-options, .kh-color-options { display: flex; flex-wrap: wrap; gap: 6px; }
/* Reserve room for selection/focus rings, including inside scrolling panels. */
.kh-color-options { padding: 4px; }
.kh-kind-options button {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 6px 9px;
  border: 2px solid #9ac66a;
  border-radius: 9px;
  color: #31552c;
  background: #fffef2;
  font-size: 10px;
  font-weight: 900;
}
.kh-kind-options button[aria-pressed="true"] { border-color: #2f7f1d; color: white; background: #58ad20; box-shadow: 0 2px 0 #2f7f1d; }
.kh-color-options button { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; flex: 0 0 auto; width: 34px; height: 34px; min-width: 0; min-height: 0; margin: 0; padding: 3px; overflow: hidden; border: 2px solid #8fba69; border-radius: 50%; background: #fffef2; appearance: none; }
.kh-color-options button:focus-visible { outline: 2px solid #087c85; outline-offset: 1px; }
.kh-checkin form .kh-kind-options button { width: auto; margin: 0; padding: 6px 9px; border: 2px solid #9ac66a; border-radius: 9px; color: #31552c; background: #fffef2; box-shadow: none; }
.kh-checkin form .kh-kind-options button[aria-pressed="true"] { border-color: #2f7f1d; color: white; background: #58ad20; box-shadow: 0 2px 0 #2f7f1d; }
.kh-checkin form .kh-color-options button { width: 34px; height: 34px; margin: 0; padding: 3px; border: 2px solid #8fba69; border-radius: 50%; background: #fffef2; box-shadow: none; }
.kh-checkin form .kh-color-options button[aria-pressed="true"] { border-color: #173d26; box-shadow: 0 0 0 2px #ffd33e; }
.kh-color-options button[aria-pressed="true"] { border-color: #173d26; box-shadow: 0 0 0 2px #ffd33e; }
.kh-color-options button > span { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; border: 2px solid rgba(23,61,38,.18); border-radius: 50%; background: var(--swatch); pointer-events: none; }
.kh-skin-heading { display: block; margin-top: 14px; color: #31552c; }
.kh-skin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 8px; }
.kh-skin-grid button { display: grid; justify-items: center; align-content: start; gap: 5px; min-height: 142px; padding: 9px; border: 3px solid #b9dd76; border-radius: 13px; color: #31552c; background: #f8ffe9; font-weight: 900; }
.kh-skin-grid button.is-worn { border-color: #7b3aa4; background: #f1e4ff; box-shadow: 0 3px 0 #58267b; }
.kh-skin-grid button:disabled { cursor: not-allowed; opacity: .48; filter: grayscale(.35); }
.kh-skin-grid .kh-skin-thumb { width: 72px; }
.kh-skin-grid span, .kh-skin-grid small { display: block; }.kh-skin-grid small { color: #8c6418; font-size: 9px; }
.kh-wardrobe > p { margin-top: 12px; color: #60745e; font-size: 11px; }

.kh-client:not([data-room="lobby"]) [data-lobby-only] { display: none; }

@media (max-width: 760px) {
  .kh-client { grid-template-rows: 58px minmax(0, 1fr); }
  .kh-stage-wrap { place-items: start center; padding: 8px 7px 82px; overflow: auto; }
  .kh-stage { width: 100%; height: calc(100svh - 142px); aspect-ratio: auto; border-width: 4px; border-radius: 15px; }
  .kh-lobby-art { left: 0; width: 100%; height: 100%; min-width: 0; transform: none; object-fit: cover; object-position: center; }
  .kh-guest { width: clamp(72px, 16vw, 104px); }.kh-guest.is-sitting { width: clamp(66px, 14vw, 94px); }
  .kh-remote-guest, .kh-visitor, .kh-world-npc { width: clamp(70px, 15.5vw, 102px); }
  .kh-help-bubble { top: 3%; max-width: 53%; padding: 6px 28px 6px 9px; }.kh-help-bubble span { display: none; }
  .kh-world-hotspot { min-width: 80px; padding: 4px 6px; }.kh-world-hotspot small { display: none; }
  .kh-public-exit { left: 2%; top: 3%; padding: 5px 8px; border-width: 2px; font-size: 9px; }
  .kh-quest-badge { left: 2%; bottom: 3%; grid-template-columns: 28px 1fr; max-width: 158px; padding: 5px; }.kh-quest-badge > span { width: 28px; height: 28px; font-size: 16px; }.kh-quest-badge small { display: none; }
  .kh-dock { bottom: 7px; width: calc(100% - 14px); gap: 3px; padding: 4px; border-width: 3px; }
  .kh-dock > button { flex-basis: 38px; min-height: 42px; padding: 3px; }.kh-dock > button span { font-size: 18px; }.kh-dock > button small { display: none; }
  .kh-chat { min-height: 42px; }.kh-chat button { padding: 0 9px; }
  .kh-room-tools { right: 12px; top: 18%; transform: none; }.kh-room-tools button { min-width: 47px; padding: 5px; }.kh-room-tools small { display: none; }
  .kh-emote-tray { left: 2%; bottom: 3%; grid-template-columns: repeat(3, 36px); }.kh-emote-tray button { width: 36px; height: 34px; font-size: 17px; }
  .kh-map-pin { min-width: 60px; padding: 3px 5px; border-width: 2px; }.kh-map-pin span { min-width: 21px; height: 21px; }.kh-map-pin strong { font-size: 8px; }
  .kh-profile-layout { grid-template-columns: 1fr; }.kh-profile-avatar { min-height: 230px; }.kh-profile-avatar img { max-height: 220px; }
  .kh-skin-grid { grid-template-columns: 1fr 1fr; }
  .kh-topbar { grid-template-columns: 1fr auto auto auto; gap: 7px; }
  .kh-top-wallet { min-width: 0; padding: 5px 7px; }.kh-top-wallet small { display: none; }.kh-top-wallet > span { grid-row: auto; }.kh-top-wallet strong { font-size: 10px; }
  .kh-daily-reward { grid-template-columns: 45px 1fr; }.kh-daily-reward-icon { width: 45px; height: 45px; }.kh-daily-reward > button { grid-column: 1 / -1; width: 100%; }
  .kh-wallet-history-head small { display: none; }
  .kh-purchase-skin-card { grid-template-columns: 92px 1fr; gap: 12px; }.kh-purchase-skin-card .kh-skin-thumb { width: 88px; }.kh-purchase-skin-card strong { font-size: 19px; }
  .kh-purchase-actions { grid-template-columns: 1fr; }
  .kh-friend-search > div { grid-template-columns: 1fr; }.kh-social-row { grid-template-columns: 50px 1fr; }.kh-social-avatar { width: 47px; }.kh-social-row-actions { grid-column: 1 / -1; justify-content: stretch; }.kh-social-row-actions button { flex: 1; }
  .kh-public-profile-layout { grid-template-columns: 1fr; }.kh-public-profile-stage { min-height: 205px; }.kh-public-profile-stage .kh-profile-kwaker { width: 155px; }
  .kh-checkin-card { border-radius: 18px; background: #fffce8; }
}

/* Final scene contract. Keep this last so legacy prototype rules cannot rescale the world. */
body .kh-client { grid-template-rows: 64px minmax(0, 1fr); background: linear-gradient(#53c9ef 0 42%, #75c956 42% 100%); }
body .kh-topbar { min-height: 64px; padding-block: 7px; border-bottom-width: 4px; }
body .kh-stage-wrap { place-items: start center; padding: 28px 10px 18px; overflow: auto; }
body .kh-stage {
  width: min(840px, calc(100vw - 20px), calc((100svh - 112px) * 84 / 53));
  max-width: 840px;
  height: auto;
  aspect-ratio: 84 / 53;
  border: 5px solid #4da522;
  border-radius: 17px;
  box-shadow: 0 0 0 4px #f4ffe4, 0 24px 60px rgba(28, 82, 31, .3);
}
body .kh-stage-shade { background: linear-gradient(to bottom, transparent 72%, rgba(34, 88, 31, .08)); }
body .kh-remote-layer,
body .kh-furniture-layer,
body .kh-npc-layer { z-index: auto; }
body .kh-guest,
body .kh-remote-guest,
body .kh-world-npc {
  width: 7cqw;
  transform: translate(-50%, -100%) scale(var(--guest-scale, 1));
  transform-origin: center bottom;
  transition: left var(--walk-time, 1600ms) linear, top var(--walk-time, 1600ms) linear, transform var(--walk-time, 1600ms) linear;
}
body .kh-guest.is-room-entering { transition: none !important; }
body .kh-remote-guest,
body .kh-world-npc { width: 7cqw; }
body .kh-visitor { width: 7cqw; transform: translate(-50%, -100%) scale(var(--guest-scale, 1)); transform-origin: center bottom; }
body .kh-guest.is-sitting,
body .kh-remote-guest.is-sitting,
body .kh-world-npc.is-sitting {
  width: 7cqw;
  transform: translate(-50%, calc(-100% + var(--seat-pose-y, 0cqw))) scale(var(--guest-scale, 1));
}
body .kh-guest.is-sitting .kh-sprite-flip {
  width: 100%;
  aspect-ratio: 362 / 402;
  margin-inline: 0;
}
body .kh-guest.is-sitting > strong,
body .kh-remote-guest.is-sitting > strong { bottom: calc(-6.2cqw + var(--seat-pose-y, 0cqw)); }
body .kh-guest.is-sitting .kh-guest-shadow,
body .kh-remote-guest.is-sitting .kh-guest-shadow { display: none; }
body .kh-world-npc > small,
body .kh-visitor > small { bottom: -4cqw; font-size: clamp(7px, .9cqw, 9px); }
body .kh-dock {
  z-index: 9000;
  bottom: 10px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: 35px 35px;
  width: min(570px, calc(100% - 92px));
  min-height: 0;
  gap: 4px;
  padding: 4px;
  border: 3px solid #f8ffe9;
  border-radius: 10px;
  background: #56aa23;
  box-shadow: 0 9px 20px rgba(32, 82, 27, .22);
}
body .kh-dock > button {
  grid-row: 2;
  width: 100%;
  min-width: 0;
  min-height: 35px;
  height: 35px;
  padding: 2px;
  border: 2px solid #286c1a;
  border-radius: 7px;
  background: #f7ffec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
body .kh-dock > button span { font-size: 19px; line-height: 1; }
body .kh-dock > button .kh-dock-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 0 auto;
  overflow: visible;
  color: inherit;
  font-size: 0;
}
body .kh-dock > button .kh-dock-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}
body .kh-dock > button .kh-dock-help-icon {
  width: 26px;
  height: 26px;
  border: 2px solid #176487;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(#38b7df, #1f8fc4);
  box-shadow: inset 0 -2px 0 #176487;
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
}
body .kh-dock > button small { font-size: 8px; }
body .kh-chat { grid-column: 1 / -1; grid-row: 1; width: 100%; min-height: 35px; height: 35px; gap: 0; border: 2px solid #286c1a; border-radius: 7px; box-shadow: none; }
body .kh-chat input { width: 100%; min-width: 0; padding: 0 10px; border-radius: 5px; box-shadow: none; font-size: 12px; }
body .kh-chat button { min-width: 58px; padding: 0 10px; border-radius: 0 5px 5px 0; font-size: 10px; }
body .kh-dock > button:focus-visible,
body .kh-chat input:focus-visible,
body .kh-chat button:focus-visible { outline: 3px solid #ffd64a; outline-offset: 2px; }
body .kh-emote-tray { left: max(12px, calc(50% - 285px)); bottom: 99px; grid-template-columns: repeat(6, 34px); gap: 4px; padding: 6px; border-radius: 10px; }
body .kh-emote-tray button { width: 34px; height: 32px; border-radius: 7px; font-size: 17px; }
body .kh-room-tools { right: 10px; top: 50%; transform: translateY(-50%); }
body .kh-room-tools button { min-width: 52px; height: 54px; min-height: 54px; padding: 6px 5px; border-width: 2px; border-radius: 9px; }
body .kh-room-tools span { font-size: 18px; }
body .kh-room-tools small { display: block; font-size: 8px; line-height: 1; }
body .kh-quest-badge {
  left: 10px;
  bottom: 10px;
  grid-template-columns: 29px minmax(0, 1fr);
  column-gap: 4px;
  width: 112px;
  max-width: 112px;
  min-height: 49px;
  height: 49px;
  padding: 5px 6px 5px 5px;
  border-width: 2px;
  border-radius: 9px;
  box-shadow: 0 3px 0 #c87525, 0 5px 12px rgba(63, 72, 29, .18);
  transform: none;
}
body .kh-quest-badge > span {
  width: 29px;
  height: 29px;
  font-size: 16px;
}
body .kh-quest-badge strong {
  font-size: 8px;
  line-height: 1.05;
}
body .kh-quest-badge small {
  display: none;
}
body .kh-help-entry {
  border-color: #f4ffd8;
  background: linear-gradient(#63cf67, #2da84e);
  color: #fff;
  box-shadow: 0 3px 0 #176f35, 0 5px 12px rgba(24, 82, 43, .24);
}
body .kh-help-entry > span {
  background: #1f8fc4;
  box-shadow: inset 0 -2px 0 #176487;
}
body .kh-public-exit { left: 10px; top: 10px; padding: 6px 9px; border-width: 2px; border-radius: 9px; font-size: 10px; }
body .kh-world-hotspot { min-width: 96px; padding: 5px 8px; border-width: 2px; border-radius: 10px; opacity: .88; }
body .kh-world-hotspot span { font-size: 10px; }
body .kh-world-hotspot small { font-size: 8px; }

@media (max-width: 760px) {
  body .kh-client { grid-template-rows: 56px minmax(0, 1fr); }
  body .kh-topbar { min-height: 56px; }
  body .kh-stage-wrap { place-items: start center; padding: 16px 6px; overflow: auto; }
  body .kh-stage { width: min(840px, calc(100vw - 12px), calc((100svh - 86px) * 84 / 53)); height: auto; aspect-ratio: 84 / 53; border-width: 4px; border-radius: 12px; }
  body .kh-guest,
  body .kh-remote-guest,
  body .kh-world-npc { width: 7cqw; }
  body .kh-visitor { width: 14cqw; }
  body .kh-guest.is-sitting,
  body .kh-remote-guest.is-sitting { width: 7cqw; }
  body .kh-dock { bottom: 6px; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: 31px 31px; width: calc(100% - 12px); gap: 2px; padding: 3px; border-width: 2px; }
  body .kh-dock > button { grid-row: 2; width: 100%; min-width: 0; height: 31px; min-height: 31px; padding: 2px; border-width: 1px; }
  body .kh-dock > button span { font-size: 15px; }
  body .kh-dock > button .kh-dock-icon { width: 21px; height: 21px; }
  body .kh-dock > button small { display: none; }
  body .kh-chat { grid-column: 1 / -1; grid-row: 1; width: 100%; height: 31px; min-height: 31px; border-width: 1px; }
  body .kh-chat input { padding-inline: 6px; font-size: 9px; }
  body .kh-chat button { min-width: 43px; padding-inline: 6px; font-size: 8px; }
  body .kh-emote-tray { left: 6px; bottom: 78px; grid-template-columns: repeat(6, minmax(25px, 1fr)); width: min(232px, calc(100% - 12px)); }
  body .kh-emote-tray button { width: 100%; height: 29px; font-size: 15px; }
  body .kh-room-tools { right: 6px; top: 18%; transform: none; }
  body .kh-room-tools button { min-width: 40px; padding: 4px; }
  body .kh-quest-badge { display: none; }
}

/* 0.9.5 public-spaces system.
   Each direction has its own 3x5 sheet with two fully transparent gutter rows.
   Every frame is repacked to one baseline and kept inside its own cell, so
   crests, feet, hats and capes remain visible without animation jitter. */
.kh-guest {
  --kh-avatar-motion-side: url("../images/kwaker-motion-side-yellow-v5.webp");
  --kh-avatar-motion-front: url("../images/kwaker-motion-front-yellow-v5.webp");
  --kh-avatar-motion-back: url("../images/kwaker-motion-back-yellow-v5.webp");
  --kh-avatar-wave: url("../images/kwaker-wave-front-yellow-v2.webp");
}
.kh-guest[data-avatar-color="cream"] {
  --kh-avatar-motion-side: url("../images/kwaker-motion-side-cream-v5.webp");
  --kh-avatar-motion-front: url("../images/kwaker-motion-front-cream-v5.webp");
  --kh-avatar-motion-back: url("../images/kwaker-motion-back-cream-v5.webp");
  --kh-avatar-wave: url("../images/kwaker-wave-front-cream-v2.webp");
}
.kh-guest[data-avatar-color="brown"] {
  --kh-avatar-motion-side: url("../images/kwaker-motion-side-brown-v5.webp");
  --kh-avatar-motion-front: url("../images/kwaker-motion-front-brown-v5.webp");
  --kh-avatar-motion-back: url("../images/kwaker-motion-back-brown-v5.webp");
  --kh-avatar-wave: url("../images/kwaker-wave-front-brown-v2.webp");
}
.kh-guest[data-skin="halloween_vampire"] {
  --kh-avatar-motion-side: url("../images/skin-vampire-motion-side-v5.webp");
  --kh-avatar-motion-front: url("../images/skin-vampire-motion-front-v5.webp");
  --kh-avatar-motion-back: url("../images/skin-vampire-motion-back-v5.webp");
  --kh-avatar-wave: url("../images/skin-vampire-wave-front-v2.webp");
}
.kh-guest[data-skin="halloween_pumpkin"] {
  --kh-avatar-motion-side: url("../images/skin-pumpkin-motion-side-v5.webp");
  --kh-avatar-motion-front: url("../images/skin-pumpkin-motion-front-v5.webp");
  --kh-avatar-motion-back: url("../images/skin-pumpkin-motion-back-v5.webp");
  --kh-avatar-wave: url("../images/skin-pumpkin-wave-front-v2.webp");
}
.kh-guest[data-skin="halloween_moonwitch"] {
  --kh-avatar-motion-side: url("../images/skin-moonwitch-motion-side-v5.webp");
  --kh-avatar-motion-front: url("../images/skin-moonwitch-motion-front-v5.webp");
  --kh-avatar-motion-back: url("../images/skin-moonwitch-motion-back-v5.webp");
  --kh-avatar-wave: url("../images/skin-moonwitch-wave-front-v2.webp");
}

body .kh-guest:not(.is-sitting) .kh-avatar-sprite {
  background-image: var(--kh-avatar-motion-side);
  background-size: 300% 500%;
  animation: kh-motion-idle-side 4.8s steps(1, end) infinite;
}
body .kh-guest:not(.is-sitting)[data-direction="down"] .kh-avatar-sprite {
  background-image: var(--kh-avatar-motion-front);
  animation-name: kh-motion-idle-front;
}
body .kh-guest:not(.is-sitting)[data-direction="up"] .kh-avatar-sprite {
  background-image: var(--kh-avatar-motion-back);
  animation-name: kh-motion-idle-back;
}
body .kh-guest.is-walking:not(.is-sitting) .kh-avatar-sprite {
  animation: kh-motion-walk-side .96s steps(1, end) infinite;
}
body .kh-guest.is-walking:not(.is-sitting)[data-direction="down"] .kh-avatar-sprite {
  animation-name: kh-motion-walk-front;
}
body .kh-guest.is-walking:not(.is-sitting)[data-direction="up"] .kh-avatar-sprite {
  animation-name: kh-motion-walk-back;
}
body .kh-guest.is-waving:not(.is-sitting) .kh-avatar-sprite,
body .kh-guest.is-waving:not(.is-sitting)[data-direction] .kh-avatar-sprite {
  background-image: var(--kh-avatar-wave);
  background-size: 300% 200%;
  animation: kh-motion-friendly-wave 1.6s steps(1, end) both;
}
body .kh-guest.is-waving:not(.is-sitting) .kh-sprite-flip,
body .kh-guest[data-direction="left"].is-waving:not(.is-sitting) .kh-sprite-flip {
  transform: none;
  animation: none;
}
body .kh-guest.is-walking .kh-sprite-flip {
  animation: none;
}
body .kh-guest[data-direction="left"].is-walking .kh-sprite-flip {
  animation: none;
}
body .kh-guest:not(.is-sitting) .kh-sprite-flip {
  transition: none;
}
body .kh-guest.is-sitting .kh-avatar-sprite {
  background-image: var(--kh-avatar-atlas);
  background-position: 100% 0;
  background-size: 400% auto;
  animation: none;
}
body .kh-guest.is-taking-seat { transition: none; }
body .kh-guest.is-taking-seat .kh-avatar-sprite {
  animation: kh-seat-settle .24s ease-out both !important;
}
@keyframes kh-motion-friendly-wave {
  0%, 9% { background-position: 0 0; }
  10%, 21% { background-position: 50% 0; }
  22%, 34% { background-position: 100% 0; }
  35%, 47% { background-position: 0 100%; }
  48%, 58% { background-position: 50% 100%; }
  59%, 69% { background-position: 0 100%; }
  70%, 79% { background-position: 50% 100%; }
  80%, 89% { background-position: 100% 0; }
  90%, 96% { background-position: 50% 0; }
  97%, 100% { background-position: 100% 100%; }
}
@keyframes kh-seat-settle {
  0% { transform: translateY(4px) scale(.96); }
  65% { transform: translateY(-1px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

.kh-profile-kwaker {
  --kh-avatar-profile: url("../images/kwaker-motion-front-yellow-v5.webp");
}
.kh-profile-kwaker[data-avatar-color="cream"] {
  --kh-avatar-profile: url("../images/kwaker-motion-front-cream-v5.webp");
}
.kh-profile-kwaker[data-avatar-color="brown"] {
  --kh-avatar-profile: url("../images/kwaker-motion-front-brown-v5.webp");
}
.kh-profile-kwaker[data-skin="halloween_vampire"] {
  --kh-avatar-profile: url("../images/skin-vampire-motion-front-v5.webp");
}
.kh-profile-kwaker[data-skin="halloween_pumpkin"] {
  --kh-avatar-profile: url("../images/skin-pumpkin-motion-front-v5.webp");
}
.kh-profile-kwaker[data-skin="halloween_moonwitch"] {
  --kh-avatar-profile: url("../images/skin-moonwitch-motion-front-v5.webp");
}
.kh-profile-kwaker .kh-avatar-sprite {
  background-image: var(--kh-avatar-profile);
  background-position: 0 100%;
  background-size: 300% 500%;
  animation: none;
}

@keyframes kh-motion-walk-side {
  0%, 100% { background-position: 0 0; }
  16.667% { background-position: 50% 0; }
  33.333% { background-position: 100% 0; }
  50% { background-position: 0 50%; }
  66.667% { background-position: 50% 50%; }
  83.333% { background-position: 100% 50%; }
}
@keyframes kh-motion-walk-front {
  0%, 100% { background-position: 0 0; }
  16.667% { background-position: 50% 0; }
  33.333% { background-position: 100% 0; }
  50% { background-position: 0 50%; }
  66.667% { background-position: 50% 50%; }
  83.333% { background-position: 100% 50%; }
}
@keyframes kh-motion-walk-back {
  0%, 100% { background-position: 0 0; }
  16.667% { background-position: 50% 0; }
  33.333% { background-position: 100% 0; }
  50% { background-position: 0 50%; }
  66.667% { background-position: 50% 50%; }
  83.333% { background-position: 100% 50%; }
}
@keyframes kh-motion-idle-side {
  0%, 30%, 100% { background-position: 0 100%; }
  31%, 55%, 76%, 99% { background-position: 50% 100%; }
  56%, 75% { background-position: 100% 100%; }
}
@keyframes kh-motion-idle-front {
  0%, 30%, 100% { background-position: 0 100%; }
  31%, 55%, 76%, 99% { background-position: 50% 100%; }
  56%, 75% { background-position: 100% 100%; }
}
@keyframes kh-motion-idle-back {
  0%, 30%, 100% { background-position: 0 100%; }
  31%, 55%, 76%, 99% { background-position: 50% 100%; }
  56%, 75% { background-position: 100% 100%; }
}
@keyframes kh-motion-waddle {
  from { transform: translateY(0) rotate(-.55deg); }
  to { transform: translateY(-1.2px) rotate(.55deg); }
}
@keyframes kh-motion-waddle-left {
  from { transform: scaleX(-1) translateY(0) rotate(-.55deg); }
  to { transform: scaleX(-1) translateY(-1.2px) rotate(.55deg); }
}

/* Reusable 20px resident badges for NPCs and future player badges. */
.kh-avatar-badge {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: -16px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  padding: 0;
  transform: translateX(-50%) rotate(-2deg);
  border: 2px solid #fffbe3;
  border-radius: 6px;
  color: white;
  background: linear-gradient(145deg, #58b83c 0 48%, #34892a 49% 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    0 2px 0 #236b22,
    0 4px 7px rgba(16, 49, 26, .28);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.04em;
  text-shadow: 0 1px 0 rgba(29, 64, 25, .55);
  pointer-events: none;
}
.kh-avatar-badge[data-badge-tone="event"] {
  color: #fff2a8;
  background: linear-gradient(145deg, #8750a8 0 48%, #643284 49% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 2px 0 #45205f, 0 4px 7px rgba(69, 32, 95, .3);
  text-shadow: 0 1px 0 #45205f;
}
.kh-avatar-badge[data-badge-tone="hotel"] {
  color: #fff8d6;
  background: linear-gradient(145deg, #43a3ad 0 48%, #277886 49% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 2px 0 #175863, 0 4px 7px rgba(17, 74, 83, .28);
  text-shadow: 0 1px 0 #175863;
}
.kh-avatar-badge[data-badge-tone="garden"] {
  color: #fffbd0;
  background: linear-gradient(145deg, #70bd3c 0 48%, #398c32 49% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 2px 0 #236a2d, 0 4px 7px rgba(28, 91, 40, .3);
  text-shadow: 0 1px 0 #236a2d;
}
.kh-avatar-badge[data-badge-tone="shop"] {
  color: #654512;
  background: linear-gradient(145deg, #ffe472 0 48%, #ffd34a 49% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .48), 0 2px 0 #b77423, 0 4px 7px rgba(62, 44, 14, .24);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .52);
}
.kh-avatar-badge[data-badge-tone="staff"] {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  color: transparent;
  background: url("../data/badges/ADM.webp?v=0.28.0-dynamic-badges-r1") center / 40px 40px no-repeat;
  box-shadow: none;
  text-shadow: none;
}
.kh-avatar-badge[data-team-badge][data-badge-tone="staff"] { top: -36px; }
.kh-guest:has(> .kh-avatar-badge[data-badge-tone="staff"]) > .kh-speech { bottom: calc(100% + 43px); }
.kh-avatar-badge[data-badge-tone="moderator"] {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  color: transparent;
  background: url("../data/badges/MOD.webp?v=0.28.0-dynamic-badges-r1") center / 40px 40px no-repeat;
  box-shadow: none;
  text-shadow: none;
}
.kh-avatar-badge[data-badge-tone="ambassador"],
.kh-avatar-badge[data-badge-tone="guide"] {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  color: transparent;
  background: url("../data/badges/GUI.webp?v=0.28.0-dynamic-badges-r1") center / 40px 40px no-repeat;
  box-shadow: none;
  text-shadow: none;
}
.kh-avatar-badge[data-npc-badge] {
  top: -16px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 0;
  color: transparent;
  background: url("../data/badges/NPC.webp?v=0.28.0-dynamic-badges-r1") center / 20px 20px no-repeat;
  box-shadow: none;
  text-shadow: none;
  image-rendering: pixelated;
}
.kh-guest:has(> .kh-avatar-badge[data-npc-badge]) > .kh-speech { bottom: calc(100% + 22px); }
.kh-npc-quest-marker {
  position: absolute;
  z-index: 7;
  right: -2%;
  top: 5%;
  display: grid;
  place-items: center;
  width: clamp(18px, 2.05cqw, 25px);
  aspect-ratio: 1;
  border: 2px solid white;
  border-radius: 50% 50% 50% 8px;
  color: #583b0d;
  background: #ffda45;
  box-shadow: 0 3px 0 #be7020, 0 5px 10px rgba(55, 33, 9, .2);
  font-size: clamp(11px, 1.2cqw, 15px);
  font-weight: 1000;
  line-height: 1;
  pointer-events: none;
  animation: kh-npc-quest-bob 1.7s ease-in-out infinite alternate;
}
@keyframes kh-npc-quest-bob { to { translate: 0 -3px; } }

.kh-inventory-item-preview.is-image-furniture,
.kh-item-menu-preview.is-image-furniture,
.kh-event-reward-preview.is-image-furniture {
  background-image: var(--furniture-image);
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
}
.kh-item-menu-preview.is-image-furniture.is-rotated { background-image: var(--furniture-image); }

.kh-tasks { max-height: min(88svh, 860px); overflow-y: auto; }
.kh-event-quest {
  margin: 16px 0 18px;
  padding: 14px;
  overflow: hidden;
  border: 3px solid #3b8d43;
  border-radius: 18px;
  color: #294f31;
  background: radial-gradient(circle at 12% 0, rgba(255, 220, 91, .2), transparent 30%), linear-gradient(145deg, #fffbe8, #eff8d9 72%);
  box-shadow: 0 5px 0 #6eaf5d, inset 0 0 0 2px rgba(255, 255, 255, .6);
}
.kh-event-quest > header { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.kh-event-moon { display: grid; place-items: center; width: 44px; aspect-ratio: 1; border: 3px solid #fff; border-radius: 50%; color: #315f37; background: #ffdc55; box-shadow: 0 3px 0 #c27827; font-size: 27px; font-weight: 950; }
.kh-event-quest header h3 { margin: 2px 0 3px; color: #214d31; font-size: 18px; line-height: 1.05; }
.kh-event-quest header p { margin: 0; color: #516e4d; font-size: 10px; line-height: 1.35; }
.kh-event-quest header div > small:first-child { color: #91621c; font-size: 8px; font-weight: 950; letter-spacing: .08em; }
.kh-event-reward { display: grid; grid-template-columns: 48px auto; grid-template-rows: auto auto; align-items: center; min-width: 112px; padding: 5px 8px 5px 5px; border: 2px solid rgba(255, 239, 164, .72); border-radius: 13px; color: #53310e; background: #fff1a8; box-shadow: 0 3px 0 #b86e25; }
.kh-event-reward-preview { grid-row: 1 / 3; display: block; width: 46px; aspect-ratio: var(--sprite-ratio, 1); }
.kh-event-reward strong, .kh-event-reward small { display: block; white-space: nowrap; }
.kh-event-reward strong { font-size: 12px; }.kh-event-reward small { font-size: 8px; font-weight: 900; }
.kh-event-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 12px 0 10px; padding: 0; list-style: none; }
.kh-event-steps li { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 7px; align-items: center; min-height: 48px; padding: 6px 7px; border: 2px solid #d2e2b1; border-radius: 11px; color: #38583d; background: rgba(255, 255, 248, .82); }
.kh-event-steps li > span { display: grid; place-items: center; width: 26px; aspect-ratio: 1; border-radius: 50%; color: #315f37; background: #e4f0c8; font-size: 10px; font-weight: 950; }
.kh-event-steps p, .kh-event-steps strong, .kh-event-steps small { display: block; margin: 0; }
.kh-event-steps strong { color: #254f32; font-size: 10px; line-height: 1.15; }
.kh-event-steps small { margin-top: 2px; color: #5d7456; font-size: 8px; line-height: 1.25; }
.kh-event-steps li.is-current { border-color: #e6b739; background: #fff5c8; box-shadow: 0 0 0 2px rgba(255, 220, 85, .18); }
.kh-event-steps li.is-current > span { color: #583b0d; background: #ffdc55; }
.kh-event-steps li.is-complete { border-color: #79b76b; background: #eaf6d8; }
.kh-event-steps li.is-complete > span { color: #245523; background: #b9ed8e; }
.kh-event-progress { display: grid; grid-template-columns: auto 1fr; gap: 3px 9px; align-items: center; font-size: 9px; }
.kh-event-progress > strong { color: #315f37; }.kh-event-progress > span { color: #536e4c; text-align: right; }
.kh-event-progress i { grid-column: 1 / -1; display: block; height: 7px; overflow: hidden; border-radius: 999px; background: #dce9c7; }
.kh-event-progress i span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f2bd39, #86c94a); transition: width .35s ease; }
.kh-event-quest.is-complete { border-color: #72c961; background: linear-gradient(145deg, #f4f9d8, #e5f3cd); box-shadow: 0 5px 0 #6eaf5d; }
.kh-daily-heading { margin: 2px 0 8px; color: #31552c; font-size: 15px; }
.kh-daily-heading + .kh-task-list { margin-top: 0; }

@media (max-width: 620px) {
  .kh-event-quest > header { grid-template-columns: 38px minmax(0, 1fr); }
  .kh-event-moon { width: 36px; font-size: 22px; }
  .kh-event-reward { grid-column: 1 / -1; justify-self: stretch; grid-template-columns: 38px auto 1fr; grid-template-rows: auto; }
  .kh-event-reward-preview { grid-row: auto; width: 36px; }
  .kh-event-reward small { text-align: right; }
  .kh-event-steps { grid-template-columns: 1fr; }
  .kh-event-progress { grid-template-columns: 1fr; }
  .kh-event-progress > span { text-align: left; }
}

@media (max-width: 620px) {
  .kh-social-summary { grid-template-columns: repeat(2, 1fr); }
  .kh-safety-settings { grid-template-columns: 38px minmax(0, 1fr); }
  .kh-safety-shield { width: 36px; height: 42px; }
  .kh-safety-settings > button { grid-column: 1 / -1; width: 100%; }
  .kh-account-settings { grid-template-columns: 34px minmax(0, 1fr); }
  .kh-account-settings > span { width: 32px; height: 32px; }.kh-account-settings button { grid-column: 1 / -1; width: 100%; }
  .kh-role-badge-settings { grid-template-columns: 42px minmax(0, 1fr); }
  .kh-role-badge-actions { grid-column: 1 / -1; width: 100%; }
  .kh-role-badge-actions > button { width: 100%; }
  .kh-report-dialog, .kh-admin-dialog { padding: 22px 16px; border-radius: 20px; }
  .kh-report-form-footer { align-items: stretch; flex-direction: column; }
  .kh-report-form-footer > button { width: 100%; }
  .kh-admin-heading { align-items: stretch; flex-direction: column; }
  .kh-admin-heading > button { align-self: start; }
  .kh-admin-report-head { grid-template-columns: 1fr; }
  .kh-admin-report-state { justify-self: start; }
  .kh-admin-chat-context article > div { align-items: start; flex-direction: column; gap: 1px; }
  .kh-admin-report-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 0.11.5 — one contained KwaakFu game shell.
   The world keeps its established 84:53 coordinate system; only the UI frame changes. */
body {
  min-height: 100svh;
  display: grid;
  place-items: start center;
  padding: 18px 10px;
  overflow: auto;
  background: linear-gradient(#53c9ef 0 42%, #75c956 42% 100%);
}

body .kh-client {
  --kh-shell-head: 64px;
  container: kwaak-shell / inline-size;
  position: relative;
  isolation: isolate;
  width: min(840px, calc(100vw - 20px), calc((100svh - 92px) * 84 / 53));
  min-width: 0;
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-rows: var(--kh-shell-head) auto;
  overflow: hidden;
  border: 5px solid #4da522;
  border-radius: 20px;
  background: #55b91f;
  box-shadow: 0 0 0 4px #f4ffe4, 0 24px 60px rgba(28, 82, 31, .3);
}

body .kh-topbar {
  width: 100%;
  min-width: 0;
  min-height: var(--kh-shell-head);
  height: var(--kh-shell-head);
  grid-template-columns: minmax(180px, 1fr) minmax(145px, auto) auto minmax(132px, 1fr);
  gap: 10px;
  padding: 7px 12px;
  overflow: hidden;
  border: 0;
  border-bottom: 3px solid #2f7f1d;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .19);
}
body .kh-topbar-tools { display: flex; align-items: center; justify-self: end; gap: 10px; min-width: 0; }
body .kh-fullscreen-toggle {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 5px;
  border: 2px solid #f9f4bc;
  border-radius: 10px 8px 11px 9px;
  color: #245a2d;
  background: linear-gradient(#fff084, #ffd33e);
  box-shadow: 0 2px 0 #997124;
}
body .kh-fullscreen-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
body .kh-fullscreen-toggle:hover:not(:disabled) { background: #fff5ad; }
body .kh-fullscreen-toggle:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 0 #997124; }
body .kh-fullscreen-toggle:disabled { cursor: not-allowed; opacity: .55; }
body .kh-fullscreen-toggle .kh-fullscreen-collapse,
body .kh-fullscreen-toggle[aria-pressed="true"] .kh-fullscreen-expand { display: none; }
body .kh-fullscreen-toggle[aria-pressed="true"] .kh-fullscreen-collapse { display: initial; }
body .kh-brand { gap: 0; min-width: 0; }
body .kh-brand-mascot { width: 48px; }
body .kh-brand-duck { top: -6px; left: -7px; width: 62px; }
body .kh-brand-wordmark { font-size: 18px; }
body .kh-brand-mark { width: 40px; border-width: 2px; font-size: 21px; }
body .kh-brand strong { font-size: 16px; }
body .kh-brand small { margin-top: 2px; font-size: 8px; }
body .kh-room-title strong { font-size: 14px; }
body .kh-room-title span { font-size: 9px; }
body .kh-language-switch { margin: 0; padding: 2px; }
body .kh-language-switch button { min-width: 30px; padding: 4px 6px; }
body .kh-top-wallet { min-width: 80px; padding: 5px 8px; }
body .kh-top-balances { justify-self: center; display: flex; align-items: center; gap: 6px; min-width: 0; }
body .kh-top-arcade {
  display: none;
  grid-template-columns: auto auto;
  column-gap: 5px;
  align-items: center;
  min-width: 86px;
  padding: 5px 8px;
  border: 2px solid #dfffd1;
  border-radius: 12px;
  color: #174852;
  background: linear-gradient(180deg, #f0ff9a, #9ce565);
  box-shadow: 0 3px 0 #398c3c;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}
body .kh-client[data-room="gamehall"] .kh-top-arcade { display: grid; }
body .kh-top-arcade > span { grid-row: 1 / 3; color: #ef7b35; font-size: 17px; text-shadow: 0 1px 0 #fff8b4; }
body .kh-top-arcade strong,
body .kh-top-arcade small { display: block; line-height: 1; text-align: left; }
body .kh-top-arcade strong { font-size: 12px; }
body .kh-top-arcade small { margin-top: 3px; font-size: 7px; text-transform: uppercase; white-space: nowrap; }
body .kh-top-arcade:hover { transform: translateY(-1px); background: linear-gradient(180deg, #f7ffb9, #b4ee7f); }
body .kh-connection { min-width: 0; column-gap: 7px; }
body .kh-connection strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
body .kh-connection small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

body .kh-stage-wrap {
  width: 100%;
  min-height: 0;
  display: block;
  padding: 0;
  overflow: hidden;
}
body .kh-stage {
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 84 / 53;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body .kh-shell-backdrop {
  position: absolute;
  z-index: 9200;
  inset: 0;
  background: rgba(10, 58, 48, .68);
  backdrop-filter: blur(3px);
}
body .kh-shell-backdrop[hidden] { display: none; }

body .kh-drawer {
  position: absolute;
  z-index: 9100;
  top: calc(var(--kh-shell-head) + 10px);
  right: 10px;
  bottom: 10px;
  width: min(390px, calc(100% - 20px));
  max-height: none;
  overflow: auto;
}
body .kh-item-menu {
  position: absolute;
  z-index: 9150;
  top: calc(var(--kh-shell-head) + 10px);
  right: 10px;
  bottom: auto;
  width: min(330px, calc(100% - 20px));
  max-height: calc(100% - var(--kh-shell-head) - 20px);
  overflow: auto;
}

body .kh-dialog[open] {
  position: absolute;
  z-index: 9300;
  left: 50%;
  top: calc(var(--kh-shell-head) + (100% - var(--kh-shell-head)) / 2);
  width: min(520px, calc(100% - 28px));
  max-width: calc(100% - 28px);
  max-height: calc(100% - var(--kh-shell-head) - 24px);
  margin: 0;
  padding: 22px;
  overflow: auto;
  transform: translate(-50%, -50%);
}
body .kh-navigator[open],
body .kh-wallet-dialog[open],
body .kh-social-dialog[open],
body .kh-admin-dialog[open],
body .kh-profile[open] {
  width: min(760px, calc(100% - 28px));
}
body .kh-dialog::backdrop { display: none; }
body .kh-dialog-close { position: sticky; z-index: 2; top: 0; float: right; margin: -7px -7px 3px 8px; }

body .kh-checkin {
  position: absolute;
  z-index: 12000;
  inset: 0;
  padding: 12px;
  overflow: auto;
  border-radius: inherit;
}
body .kh-checkin-card {
  width: min(808px, 100%);
  min-height: 0;
  max-height: calc(100% - 24px);
  overflow: auto;
}
body .kh-checkin-copy { padding: clamp(22px, 4cqw, 38px); }
body .kh-checkin h1 { margin-block: 12px 9px; font-size: clamp(34px, 5cqw, 48px); }
body .kh-checkin-copy > p { margin-bottom: 16px; font-size: 13px; }

body .kh-toast {
  position: absolute;
  z-index: 14000;
  top: calc(var(--kh-shell-head) + 10px);
  max-width: calc(100% - 24px);
}

@container kwaak-shell (max-width: 760px) {
  body .kh-client { --kh-shell-head: 56px; }
  body .kh-topbar {
    grid-template-columns: auto auto minmax(10px, 1fr);
    gap: 5px;
    padding-inline: 7px;
  }
  body .kh-room-title,
  body .kh-connection strong,
  body .kh-connection small,
  body .kh-top-wallet small,
  body .kh-top-arcade small { display: none; }
  body .kh-brand { gap: 0; }
  body .kh-brand-mascot { width: 38px; }
  body .kh-brand-mascot::before { border-width: 2px; box-shadow: 0 0 0 1px #267620; }
  body .kh-brand-duck { top: -5px; left: -6px; width: 51px; }
  body .kh-brand-wordmark { margin-left: -5px; padding: 3px 4px 3px 8px; font-size: 15px; }
  body .kh-brand-wordmark em { font-size: 6px; }
  body .kh-brand-mark { width: 36px; font-size: 19px; }
  body .kh-language-switch { margin: 0; }
  body .kh-language-switch button { min-width: 28px; padding: 4px 5px; }
  body .kh-top-wallet { min-width: 0; padding: 5px 7px; }
  body .kh-top-wallet > span { grid-row: auto; }
  body .kh-top-balances { gap: 4px; }
  body .kh-top-arcade { min-width: 0; padding: 5px 7px; }
  body .kh-top-arcade > span { grid-row: auto; }
  body .kh-connection { justify-self: end; display: block; }
  body .kh-connection > span { display: block; grid-row: auto; }
  body .kh-drawer { top: calc(var(--kh-shell-head) + 6px); right: 6px; bottom: 6px; width: calc(100% - 12px); }
  body .kh-item-menu { top: calc(var(--kh-shell-head) + 6px); right: 6px; width: calc(100% - 12px); max-height: calc(100% - var(--kh-shell-head) - 12px); }
  body .kh-dialog[open] {
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    max-height: calc(100% - var(--kh-shell-head) - 12px);
    padding: 18px 15px;
  }
  body .kh-checkin { padding: 6px; }
  body .kh-checkin-card { display: block; max-height: calc(100% - 12px); }
  body .kh-checkin-copy { padding: 18px 16px; }
  body .kh-checkin-character { display: none; }
}

@container kwaak-shell (max-width: 700px) {
  body .kh-quest-badge { display: none; }
  body .kh-dock { bottom: 6px; width: calc(100% - 12px); gap: 2px; padding: 3px; border-width: 2px; }
  body .kh-dock > button { flex-basis: 29px; min-width: 29px; width: 29px; height: 31px; min-height: 31px; border-width: 1px; }
  body .kh-dock > button[data-action="catalog"] { display: none; }
  body .kh-chat { flex: 1 1 100px; min-width: 0; height: 31px; min-height: 31px; }
  body .kh-chat input { min-width: 0; padding-inline: 6px; }
  body .kh-chat button { min-width: 40px; padding-inline: 5px; }
}

@media (max-width: 760px) {
  body { padding: 6px; }
  body .kh-client {
    --kh-shell-head: 56px;
    width: min(calc(100vw - 12px), calc((100svh - 70px) * 84 / 53));
    border-width: 4px;
    border-radius: 14px;
  }
}

/* 0.11.6 — one illustrated KwaakFu window language.
   Every interactive surface now belongs to the same green, cream and sunny-yellow UI family. */
/* Native fullscreen uses the entire display. Keep the world's 84:53 coordinates
   intact and scope cqw units to the fitted stage, not the surrounding space. */
body .kh-client.is-fullscreen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  grid-template-rows: var(--kh-shell-head) minmax(0, 1fr);
  background: #164f36;
}
body .kh-client.is-fullscreen .kh-stage-wrap {
  container: kwaak-shell / inline-size;
  width: min(100%, calc((100vh - var(--kh-shell-head)) * 84 / 53));
  width: min(100%, calc((100dvh - var(--kh-shell-head)) * 84 / 53));
  align-self: center;
  justify-self: center;
}
@container kwaak-shell (max-width: 420px) {
  body .kh-brand-wordmark { display: none; }
  body .kh-topbar-tools { gap: 8px; }
}

body .kh-client {
  --kh-ui-surface: #fffce8;
  --kh-ui-surface-soft: #f4fbdc;
  --kh-ui-green: #58ad20;
  --kh-ui-green-dark: #2e791d;
  --kh-ui-green-ink: #173d26;
  --kh-ui-yellow: #ffd33e;
  --kh-ui-orange: #bd7222;
  --kh-ui-line: #cfe5a8;
  --kh-ui-radius: 20px;
}

body .kh-shell-backdrop {
  z-index: 9200;
  cursor: pointer;
  background: rgba(23, 61, 38, .64);
  backdrop-filter: blur(2px) saturate(.8);
  animation: kh-shell-dim-in .16s ease-out both;
}
body .kh-client.has-shell-dialog .kh-shell-backdrop { z-index: 9400; }
body .kh-client.has-shell-dialog .kh-drawer,
body .kh-client.has-shell-dialog .kh-item-menu { z-index: 9300; }

body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden])) {
  box-sizing: border-box;
  color: var(--kh-ui-green-ink);
  border: 4px solid var(--kh-ui-green-dark);
  border-radius: var(--kh-ui-radius);
  background:
    linear-gradient(#ffd33e 0 9px, transparent 9px),
    radial-gradient(circle at 10px 8px, #ffd33e 0 7px, transparent 7.5px) 0 4px / 20px 14px repeat-x,
    linear-gradient(180deg, #fffef3 0%, var(--kh-ui-surface) 58%, #fff8df 100%);
  box-shadow:
    0 0 0 3px #f5ffdc,
    0 6px 0 #24681e,
    0 18px 34px rgba(26, 70, 29, .3),
    inset 0 0 0 2px rgba(196, 226, 142, .46);
  scrollbar-width: thin;
  scrollbar-color: var(--kh-ui-green) #edf6d9;
}

body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden]))::-webkit-scrollbar,
body .kh-checkin-card::-webkit-scrollbar,
body [data-wallet-history]::-webkit-scrollbar { width: 9px; height: 9px; }
body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden]))::-webkit-scrollbar-track,
body .kh-checkin-card::-webkit-scrollbar-track,
body [data-wallet-history]::-webkit-scrollbar-track { border-radius: 999px; background: #edf6d9; }
body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden]))::-webkit-scrollbar-thumb,
body .kh-checkin-card::-webkit-scrollbar-thumb,
body [data-wallet-history]::-webkit-scrollbar-thumb { border: 2px solid #edf6d9; border-radius: 999px; background: var(--kh-ui-green); }

body .kh-drawer {
  z-index: 9300;
  left: 50%;
  right: auto;
  top: calc(var(--kh-shell-head) + (100% - var(--kh-shell-head)) / 2);
  bottom: auto;
  width: 710px;
  max-width: none;
  max-height: 507px;
  padding: 27px 22px 22px;
  transform: translate(-50%, -50%) scale(var(--kh-window-scale, 1));
  transform-origin: center;
  animation: kh-window-pop-in .18s cubic-bezier(.2, .8, .25, 1.08) both;
}

body .kh-item-menu {
  z-index: 9350;
  left: auto;
  right: 14px;
  top: calc(var(--kh-shell-head) + (100% - var(--kh-shell-head)) / 2);
  bottom: auto;
  width: 360px;
  max-width: none;
  max-height: 480px;
  padding: 27px 18px 18px;
  transform: translateY(-50%) scale(var(--kh-window-scale, 1));
  transform-origin: right center;
  animation: kh-window-slide-in .18s cubic-bezier(.2, .8, .25, 1.08) both;
}

body .kh-dialog[open] {
  z-index: 9500;
  width: 560px;
  max-width: none;
  max-height: 507px;
  padding: 27px 22px 22px;
  transform: translate(-50%, -50%) scale(var(--kh-window-scale, 1));
  transform-origin: center;
  animation: kh-window-pop-in .18s cubic-bezier(.2, .8, .25, 1.08) both;
}
body .kh-navigator[open],
body .kh-wallet-dialog[open],
body .kh-social-dialog[open],
body .kh-admin-dialog[open],
body .kh-profile[open],
body .kh-tasks[open] { width: 760px; }

body .kh-navigator[open] > h2 { margin-bottom: 8px; padding-bottom: 8px; }
body .kh-navigator[open] > p { margin: 0 0 8px; font-size: 12px; line-height: 1.35; }
body .kh-navigator-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 205px;
  gap: 15px;
  align-items: start;
}
body .kh-navigator-content .kh-world-map { margin: 0; border-width: 4px; }
body .kh-navigator-content .kh-public-rooms {
  max-height: 286px;
  margin: 0;
  padding: 4px 2px 4px 14px;
  overflow: auto;
  border-top: 0;
  border-left: 2px dashed var(--kh-ui-line);
  scrollbar-width: thin;
  scrollbar-color: var(--kh-ui-green) #edf6d9;
}
body .kh-navigator-content .kh-public-rooms h3 { margin: 0 0 6px; font-size: 15px; }
body .kh-navigator-content .kh-public-rooms > p { margin: 0; font-size: 11px; line-height: 1.35; }
body .kh-navigator-content .kh-public-room-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 9px; }
body .kh-navigator-content .kh-room-card img { aspect-ratio: 16 / 7; }
body .kh-navigator-content .kh-room-card span { padding: 8px 9px 9px; }

body .kh-drawer-head,
body .kh-item-menu-head {
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--kh-ui-line);
}
body .kh-drawer-head > div,
body .kh-item-menu-head > div { min-width: 0; }

body .kh-drawer-head small,
body .kh-item-menu-head small,
body .kh-dialog-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 9px;
  border: 2px solid #e7ae31;
  border-radius: 999px;
  color: #674714;
  background: #ffe78a;
  box-shadow: 0 2px 0 rgba(189, 114, 34, .36);
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body .kh-drawer-head h2,
body .kh-item-menu-head h2,
body .kh-dialog > h2,
body .kh-admin-heading h2 {
  color: var(--kh-ui-green-ink);
  letter-spacing: -.025em;
}
body .kh-drawer-head h2 { margin: 5px 0 0; font-size: 27px; line-height: 1; }
body .kh-item-menu-head h2 { margin: 5px 0 0; font-size: 22px; line-height: 1; }
body .kh-dialog > h2 {
  margin: 8px 43px 13px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--kh-ui-line);
  font-size: clamp(25px, 4cqw, 34px);
}
body .kh-admin-heading {
  margin-top: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--kh-ui-line);
}
body :is(.kh-dialog, .kh-drawer, .kh-item-menu) > p { color: #496650; }

body :is(.kh-drawer-head > button, .kh-item-menu-head > button, .kh-dialog-close) {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0 0 2px;
  border: 2px solid #fff8d0;
  border-radius: 50%;
  color: #624314;
  background: var(--kh-ui-yellow);
  box-shadow: 0 3px 0 var(--kh-ui-orange), 0 5px 10px rgba(116, 72, 18, .18);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  transition: transform .14s ease, filter .14s ease, box-shadow .14s ease;
}
body :is(.kh-drawer-head > button, .kh-item-menu-head > button, .kh-dialog-close):hover:not(:disabled) {
  transform: translateY(-1px) rotate(3deg);
  filter: brightness(1.04);
  box-shadow: 0 4px 0 var(--kh-ui-orange), 0 7px 12px rgba(116, 72, 18, .2);
}
body :is(.kh-drawer-head > button, .kh-item-menu-head > button, .kh-dialog-close):active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--kh-ui-orange);
}
body :is(.kh-drawer-head > button, .kh-item-menu-head > button, .kh-dialog-close):disabled { cursor: wait; opacity: .5; }
body .kh-dialog-close { top: 0; margin: -4px -4px 5px 9px; }

body :is(.kh-dialog, .kh-drawer, .kh-item-menu) :is(input:not([type="color"]), select, textarea) {
  border-color: #a8cb80;
  border-radius: 11px;
  color: var(--kh-ui-green-ink);
  background: #fffef7;
  box-shadow: inset 0 2px 0 rgba(71, 119, 45, .06);
}
body :is(.kh-dialog, .kh-drawer, .kh-item-menu) :is(input, select, textarea):focus {
  outline: 3px solid rgba(255, 211, 62, .48);
  outline-offset: 1px;
  border-color: var(--kh-ui-green);
}

body :is(
  .kh-inventory-item,
  .kh-catalog-item,
  .kh-room-card,
  .kh-task-list > div,
  .kh-wallet-entry,
  .kh-social-row,
  .kh-admin-report,
  .kh-language-settings,
  .kh-safety-settings,
  .kh-account-settings,
  .kh-report-target,
  .kh-purchase-wallet > span
) {
  border-color: var(--kh-ui-line);
  box-shadow: 0 2px 0 rgba(47, 127, 29, .1);
}
body .kh-inventory-item:hover,
body .kh-inventory-item.is-selected,
body .kh-catalog-item:hover,
body .kh-room-card:hover,
body .kh-room-card.is-current {
  border-color: var(--kh-ui-green);
  background-color: #f3fce8;
}
body .kh-catalog-item button { border: 2px solid #276d20; color: white; background: var(--kh-ui-green); box-shadow: 0 2px 0 #276d20; }
body .kh-wallet-pill { border: 2px solid #e7ae31; background: #ffe78a; box-shadow: 0 2px 0 rgba(189, 114, 34, .3); }

body .kh-checkin-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 808px;
  max-width: none;
  height: 530px;
  min-height: 0;
  max-height: none;
  transform: translate(-50%, -50%) scale(var(--kh-window-scale, 1));
  transform-origin: center;
  border: 4px solid var(--kh-ui-green-dark);
  border-radius: 24px;
  box-shadow: 0 0 0 3px #f5ffdc, 0 7px 0 #24681e, 0 22px 46px rgba(19, 60, 27, .34);
  scrollbar-width: thin;
  scrollbar-color: var(--kh-ui-green) #edf6d9;
  animation: kh-checkin-card-in .24s cubic-bezier(.2, .8, .25, 1.08) both;
}
body .kh-eyebrow { border: 2px solid #fff7c6; color: #624314; background: var(--kh-ui-yellow); box-shadow: 0 3px 0 var(--kh-ui-orange); }
body .kh-checkin h1 strong { color: var(--kh-ui-green-dark); }

body .kh-help-bubble {
  border: 3px solid var(--kh-ui-green-dark);
  border-radius: 15px;
  color: var(--kh-ui-green-ink);
  background: rgba(255, 252, 232, .97);
  box-shadow: 0 0 0 2px #f5ffdc, 0 4px 0 #24681e, 0 10px 22px rgba(26, 70, 29, .18);
}
body .kh-help-bubble button {
  border: 2px solid #fff8d0;
  border-radius: 50%;
  color: #624314;
  background: var(--kh-ui-yellow);
  box-shadow: 0 2px 0 var(--kh-ui-orange);
}
body .kh-emote-tray {
  z-index: 9050;
  border: 3px solid var(--kh-ui-green-dark);
  background: var(--kh-ui-surface);
  box-shadow: 0 0 0 2px #f5ffdc, 0 4px 0 #24681e, 0 10px 22px rgba(26, 70, 29, .2);
  animation: kh-popover-in .16s ease-out both;
}
body .kh-emote-tray button { border-color: #7aad52; background: #fffef7; box-shadow: 0 2px 0 #7aad52; }

body .kh-toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 14px 9px 11px;
  border: 3px solid var(--kh-ui-green-dark);
  border-radius: 15px;
  color: var(--kh-ui-green-ink);
  background: var(--kh-ui-surface);
  box-shadow: 0 0 0 2px #f5ffdc, 0 4px 0 #24681e, 0 12px 25px rgba(26, 70, 29, .22);
  font-size: 12px;
  transform: translate(-50%, -8px) scale(var(--kh-window-scale, 1));
  transform-origin: top center;
}
body .kh-toast::before {
  content: "";
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff8d0;
  border-radius: 4px;
  background: var(--kh-ui-yellow);
  box-shadow: 0 2px 0 var(--kh-ui-orange);
  transform: rotate(-8deg);
}
body .kh-toast.is-visible { transform: translate(-50%, 0) scale(var(--kh-window-scale, 1)); }

@keyframes kh-shell-dim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes kh-window-pop-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 11px)) scale(var(--kh-window-scale, 1)); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(var(--kh-window-scale, 1)); }
}
@keyframes kh-window-slide-in {
  from { opacity: 0; transform: translate(12px, -50%) scale(var(--kh-window-scale, 1)); }
  to { opacity: 1; transform: translate(0, -50%) scale(var(--kh-window-scale, 1)); }
}
@keyframes kh-checkin-card-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(var(--kh-window-scale, 1)); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(var(--kh-window-scale, 1)); }
}
@keyframes kh-popover-in {
  from { opacity: 0; transform: translateY(7px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@container kwaak-shell (min-width: 680px) {
  body .kh-drawer .kh-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container kwaak-shell (max-width: 760px) {
  body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden]), .kh-checkin-card, .kh-toast) { --kh-window-scale: .88; }
}
@container kwaak-shell (max-width: 680px) {
  body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden]), .kh-checkin-card, .kh-toast) { --kh-window-scale: .78; }
}
@container kwaak-shell (max-width: 600px) {
  body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden]), .kh-checkin-card, .kh-toast) { --kh-window-scale: .68; }
}
@container kwaak-shell (max-width: 520px) {
  body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden]), .kh-checkin-card, .kh-toast) { --kh-window-scale: .58; }
}
@container kwaak-shell (max-width: 460px) {
  body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden]), .kh-checkin-card, .kh-toast) { --kh-window-scale: .50; }
}
@container kwaak-shell (max-width: 400px) {
  body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden]), .kh-checkin-card, .kh-toast) { --kh-window-scale: .43; }
}

@media (prefers-reduced-motion: reduce) {
  body .kh-shell-backdrop,
  body .kh-drawer,
  body .kh-item-menu,
  body .kh-dialog[open],
  body .kh-checkin-card,
  body .kh-emote-tray { animation: none; }
}

/* 0.11.7 — fixed-window layout.
   The whole game window scales as one artboard. Window chrome never scrolls;
   only collections that can grow with server data receive a contained list. */
body :is(.kh-dialog[open], .kh-drawer:not([hidden]), .kh-item-menu:not([hidden])) {
  overflow: hidden;
}

body .kh-dialog-close {
  position: absolute;
  z-index: 5;
  top: 24px;
  right: 20px;
  float: none;
  margin: 0;
}

body :is(
  .kh-tasks,
  .kh-wallet-dialog,
  .kh-social-dialog,
  .kh-admin-dialog,
  .kh-profile,
  .kh-info-dialog
)[open] {
  height: 507px;
  display: flex;
  flex-direction: column;
}

body .kh-info-dialog[open] { width: 760px; }
body .kh-report-dialog[open] { width: 620px; }

body :is(.kh-tasks, .kh-wallet-dialog, .kh-social-dialog, .kh-info-dialog)[open] > h2,
body .kh-profile[open] > h2 {
  flex: 0 0 auto;
  margin-top: 6px;
  margin-bottom: 7px;
  padding-bottom: 7px;
  font-size: 28px;
  line-height: 1;
}

body :is(.kh-tasks, .kh-wallet-dialog, .kh-social-dialog, .kh-info-dialog)[open] > p {
  flex: 0 0 auto;
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
}

/* Koffer and catalogue */
body .kh-drawer {
  height: 507px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body .kh-drawer-head { flex: 0 0 auto; }
body .kh-drawer-intro {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 9px 0 10px;
}
body .kh-drawer-intro .kh-wallet-pill { margin: 0; white-space: nowrap; }
body .kh-drawer-intro > p {
  margin: 0;
  color: #496650;
  font-size: 10px;
  line-height: 1.35;
}

body .kh-inventory-grid {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 2px 5px 4px 1px;
  overflow: auto;
}
body .kh-inventory-item {
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 70px;
  padding: 6px;
  border-radius: 13px;
}
body .kh-inventory-item-preview { width: 52px; }
body .kh-inventory-item strong { font-size: 10px; }
body .kh-inventory-item small { font-size: 8px; }
body .kh-clear-furniture { flex: 0 0 auto; margin-top: 9px; padding-block: 9px; }

body .kh-catalog-columns {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(250px, .82fr);
  gap: 12px;
}
body .kh-catalog-shelf {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: hidden;
  border: 2px solid var(--kh-ui-line);
  border-radius: 14px;
  background: rgba(244, 251, 220, .72);
}
body .kh-catalog-section-title { flex: 0 0 auto; margin: 0 0 7px; font-size: 13px; }
body .kh-catalog-categories { flex-wrap:nowrap; }
body .kh-catalog-categories button { padding:5px 9px; font-size:9px; }
body .kh-catalog-shelf .kh-catalog-grid {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  grid-template-columns: 1fr;
  gap: 7px;
  padding-right: 4px;
  overflow: auto;
}
body .kh-catalog-item {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 7px;
  min-height: 66px;
  padding: 6px;
  border-radius: 13px;
}
body .kh-catalog-item .kh-inventory-item-preview,
body .kh-catalog-item .kh-skin-thumb { width: 52px; }
body .kh-catalog-item strong { font-size: 11px; }
body .kh-catalog-item small { font-size: 8px; }
body .kh-catalog-item button { min-width: 61px; padding: 7px 8px; font-size: 9px; }

/* Kwaakklussen: event and daily work sit beside each other. */
body .kh-tasks-content {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr);
  gap: 12px;
  margin-top: 9px;
}
body .kh-tasks-content .kh-event-quest {
  min-height: 0;
  margin: 0;
  padding: 11px;
}
body .kh-event-quest > header {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 8px;
}
body .kh-event-moon { width: 38px; font-size: 23px; }
body .kh-event-reward { min-width: 101px; grid-template-columns: 39px auto; }
body .kh-event-reward-preview { width: 37px; }
body .kh-event-steps {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 9px 0 8px;
}
body .kh-event-steps li { min-height: 43px; padding: 5px 6px; }
body .kh-daily-tasks-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 11px;
  overflow: hidden;
  border: 2px solid var(--kh-ui-line);
  border-radius: 15px;
  background: rgba(244, 251, 220, .76);
}
body .kh-daily-heading { margin: 0 0 7px; font-size: 14px; }
body .kh-daily-tasks-panel .kh-task-list {
  min-height: 0;
  align-content: start;
  gap: 6px;
  margin: 0;
  padding-right: 3px;
  overflow: auto;
}
body .kh-daily-tasks-panel .kh-task-list > div {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 7px;
  padding: 7px;
  border-width: 2px;
  border-radius: 11px;
}
body .kh-daily-tasks-panel .kh-task-list > div > span { width: 33px; height: 33px; font-size: 14px; }
body .kh-daily-tasks-panel .kh-task-list p { font-size: 10px; line-height: 1.2; }
body .kh-daily-tasks-panel .kh-task-list small { font-size: 8px; }
body .kh-daily-tasks-panel .kh-task-list b { padding: 4px 6px; font-size: 9px; }
body .kh-daily-progress { margin-top: 7px; padding: 8px 9px; font-size: 9px; }

/* Wallet: stable summary at left, contained history at right. */
body .kh-wallet-content {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 12px;
  margin-top: 9px;
}
body .kh-wallet-summary-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;
}
body .kh-wallet-balance-card {
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-width: 2px;
}
body .kh-wallet-balance-card > span { width: 38px; height: 38px; font-size: 20px; }
body .kh-wallet-balance-card strong { font-size: 17px; }
body .kh-wallet-balance-card b { font-size: 21px; }
body .kh-wallet-summary-column .kh-daily-reward {
  min-height: 0;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 9px;
  align-content: center;
  padding: 10px;
  border-width: 2px;
}
body .kh-wallet-summary-column .kh-daily-reward-icon { width: 42px; height: 42px; font-size: 21px; }
body .kh-wallet-summary-column .kh-daily-reward-copy h3 { font-size: 14px; }
body .kh-wallet-summary-column .kh-daily-reward-copy p { font-size: 9px; }
body .kh-wallet-summary-column .kh-streak-track { gap: 3px; margin-top: 6px; }
body .kh-wallet-summary-column .kh-streak-track span { width: 18px; height: 18px; border-width: 1px; font-size: 7px; }
body .kh-wallet-summary-column .kh-daily-reward > button {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
}
body .kh-wallet-content .kh-wallet-history {
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 11px;
  overflow: hidden;
  border: 2px solid var(--kh-ui-line);
  border-radius: 15px;
  background: rgba(244, 251, 220, .72);
}
body .kh-wallet-content .kh-wallet-history-head { flex: 0 0 auto; margin-bottom: 7px; }
body .kh-wallet-content .kh-wallet-history [data-wallet-history] {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
body .kh-payment-note { flex: 0 0 auto; margin-top: 8px !important; padding: 7px 10px; font-size: 9px !important; }

/* Social hub: fixed tools and four contained noticeboards. */
body .kh-social-tools {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(255px, .82fr);
  gap: 10px;
  margin-top: 8px;
}
body .kh-social-tools .kh-friend-search { margin: 0; padding: 8px 10px; border-width: 2px; border-radius: 12px; }
body .kh-social-tools .kh-friend-search label { margin-bottom: 4px; font-size: 8px; }
body .kh-social-tools .kh-friend-search input { padding: 8px 9px; }
body .kh-social-tools .kh-friend-search button { padding: 8px 10px; font-size: 9px; }
body .kh-social-tools .kh-social-summary { gap: 5px; margin: 0; }
body .kh-social-tools .kh-social-summary > span { align-content: center; padding: 5px; border-radius: 10px; }
body .kh-social-tools .kh-social-summary b { font-size: 15px; }
body .kh-social-tools .kh-social-summary small { font-size: 7px; }
body .kh-social-sections {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
body .kh-social-sections .kh-social-section {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 8px;
  overflow: hidden;
  border: 2px solid var(--kh-ui-line);
  border-radius: 12px;
  background: rgba(244, 251, 220, .7);
}
body .kh-social-sections .kh-social-section[hidden] { display: none; }
body .kh-social-sections .kh-social-section h3 { flex: 0 0 auto; margin-bottom: 5px; font-size: 11px; }
body .kh-social-sections .kh-social-section-note { flex: 0 0 auto; margin: -2px 0 4px !important; font-size: 8px !important; }
body .kh-social-sections .kh-social-list { flex: 1 1 auto; min-height: 0; align-content: start; overflow: auto; }
body .kh-social-sections .kh-social-row {
  grid-template-columns: 38px minmax(80px, 1fr) auto;
  gap: 6px;
  padding: 5px;
  border-radius: 10px;
}
body .kh-social-sections .kh-social-avatar { width: 36px; }
body .kh-social-sections .kh-social-invite-icon { width: 34px; height: 34px; font-size: 18px; }
body .kh-social-sections .kh-social-row strong { font-size: 9px; }
body .kh-social-sections .kh-social-row small { font-size: 7px; }
body .kh-social-sections .kh-social-row-actions button { padding: 4px 5px; font-size: 7px; }
body .kh-social-sections .kh-social-empty { padding: 8px; font-size: 9px; }

/* Profile, public profile and purchasing stay in the desktop artboard layout while scaling. */
body .kh-profile-layout {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(205px, .7fr) minmax(0, 1.3fr);
  gap: 14px;
  margin-top: 9px;
}
body .kh-profile-avatar { height: 100%; min-height: 0; }
body .kh-profile-avatar .kh-profile-kwaker { width: min(195px, 92%); }
body .kh-wardrobe { min-height: 0; overflow: auto; padding-right: 3px; }
body .kh-avatar-options { gap: 5px; margin: 0 0 7px; }
body .kh-avatar-options > strong { font-size: 9px; }
body .kh-avatar-options > small { font-size: 8px; }
body .kh-wardrobe .kh-kind-options button { padding: 5px 8px; font-size: 9px; }
body .kh-wardrobe .kh-color-options button { width: 29px; height: 29px; }
body .kh-skin-heading { display: block; font-size: 10px; }
body .kh-skin-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 5px; }
body .kh-skin-grid button { gap: 3px; min-height: 96px; padding: 5px; border-width: 2px; border-radius: 10px; font-size: 9px; }
body .kh-skin-grid .kh-skin-thumb { width: 52px; }
body .kh-skin-grid small { font-size: 7px; }
body .kh-wardrobe > p { margin: 6px 0 0; font-size: 8px; line-height: 1.3; }
body .kh-role-badge-settings { margin-top: 7px; padding: 7px; border-width: 2px; }

body .kh-public-profile-layout {
  grid-template-columns: 205px minmax(0, 1fr);
  gap: 16px;
  margin-top: 10px;
}
body .kh-public-profile-stage { min-height: 220px; }
body .kh-public-profile-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 11px; }
body .kh-public-profile-actions button { min-height: 37px; padding: 7px 8px; font-size: 9px; }
body .kh-public-profile-progress { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
body .kh-public-profile-progress > span { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 6px 8px; border: 2px solid var(--kh-ui-line); border-radius: 10px; background: #f4fbdc; }
body .kh-public-profile-progress small { color: #55704d; font-size: 7px; font-weight: 900; text-transform: uppercase; }
body .kh-public-profile-progress strong { color: #255d2b; font-size: 13px; }

body .kh-purchase-dialog > h2 { margin-top: 6px; margin-bottom: 5px; padding-bottom: 7px; font-size: 28px; }
body .kh-purchase-dialog > p { font-size: 11px; }
body .kh-purchase-skin-card { grid-template-columns: 82px minmax(0, 1fr); gap: 11px; margin: 10px 0; padding: 9px; border-radius: 15px; }
body .kh-purchase-skin-card .kh-skin-thumb { width: 76px; }
body .kh-purchase-skin-card strong { font-size: 18px; }
body .kh-purchase-skin-card div > span { margin-top: 4px; font-size: 9px; }
body .kh-purchase-wallet > span { padding: 8px 10px; }
body .kh-purchase-wallet strong { font-size: 16px; }
body .kh-purchase-status { min-height: 28px; margin-top: 7px !important; padding: 6px 9px; font-size: 9px; }
body .kh-purchase-actions { grid-template-columns: .72fr 1.28fr; margin-top: 7px; }
body .kh-purchase-actions button { min-height: 40px; padding: 8px 11px; }

/* Safety and moderation */
body .kh-report-dialog > h2 { margin-top: 6px; margin-bottom: 7px; padding-bottom: 7px; font-size: 28px; }
body .kh-report-dialog > p { margin-bottom: 9px; font-size: 11px; line-height: 1.35; }
body .kh-report-target { margin-bottom: 8px; padding: 7px 9px; }
body .kh-report-target > span { width: 34px; height: 34px; }
body .kh-report-dialog form { gap: 5px; }
body .kh-report-dialog label { margin-top: 2px; }
body .kh-report-dialog select { padding: 8px 10px; }
body .kh-report-dialog textarea { min-height: 68px; height: 68px; padding: 8px 10px; resize: none; }
body .kh-report-form-footer > button { padding: 8px 12px; }

body .kh-admin-heading { flex: 0 0 auto; margin-top: 6px; padding-bottom: 8px; }
body .kh-admin-heading h2 { font-size: 25px; }
body .kh-admin-filters { flex: 0 0 auto; margin: 9px 0 7px; }
body .kh-admin-report-list {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  padding-right: 4px;
  overflow: auto;
}
body .kh-admin-empty { flex: 0 0 auto; }

/* Options: settings at left and a compact feature board at right. */
body .kh-info-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 11px;
  margin-top: 9px;
}
body .kh-info-settings-stack { min-width: 0; min-height: 0; display: grid; align-content: start; gap: 7px; }
body .kh-info-settings-stack .kh-language-settings,
body .kh-info-settings-stack .kh-safety-settings,
body .kh-info-settings-stack .kh-account-settings { margin: 0; }
body .kh-info-settings-stack .kh-language-settings { gap: 5px; padding: 9px; border-width: 2px; }
body .kh-info-settings-stack .kh-language-settings > span { font-size: 9px; line-height: 1.3; }
body .kh-info-settings-stack .kh-language-settings button { padding: 6px 8px; font-size: 9px; }
body .kh-info-settings-stack .kh-safety-settings {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  padding: 9px;
  border-width: 2px;
}
body .kh-info-settings-stack .kh-safety-shield { width: 36px; height: 41px; font-size: 16px; }
body .kh-info-settings-stack .kh-safety-settings strong { font-size: 11px; }
body .kh-info-settings-stack .kh-safety-settings p { font-size: 8px; }
body .kh-info-settings-stack .kh-safety-settings > button { grid-column: 1 / -1; width: 100%; padding: 7px; }
body .kh-info-settings-stack .kh-account-settings { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 7px; padding: 7px 8px; }
body .kh-info-settings-stack .kh-account-settings > span { width: 28px; height: 28px; }
body .kh-info-settings-stack .kh-account-settings p { font-size: 8px; }
body .kh-info-settings-stack .kh-account-settings button { padding: 6px 8px; }
body .kh-info-highlights {
  min-width: 0;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  border: 2px solid var(--kh-ui-line);
  border-radius: 15px;
  background: rgba(244, 251, 220, .72);
}
body .kh-info-highlights h3 { margin: 0 0 7px; font-size: 13px; }
body .kh-info-highlights ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body .kh-info-highlights li {
  position: relative;
  margin: 0;
  padding: 5px 6px 5px 20px;
  border-radius: 8px;
  color: #496650;
  background: #fffef7;
  font-size: 8px;
  line-height: 1.22;
}
body .kh-info-highlights li::before {
  content: "✓";
  position: absolute;
  left: 6px;
  top: 5px;
  color: var(--kh-ui-green-dark);
  font-weight: 950;
}

/* Registration is also one fixed illustrated card, never a scrolling page. */
body .kh-checkin { padding: 0; overflow: hidden; }
body .kh-checkin-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(245px, .85fr);
  align-items: stretch;
  overflow: hidden;
}
body .kh-checkin-copy {
  align-self: stretch;
  min-width: 0;
  height: 100%;
  padding: 18px 24px;
  overflow: hidden;
}
body .kh-checkin-character { display: grid; }
body .kh-eyebrow { padding: 5px 9px; font-size: 8px; }
body .kh-checkin h1 { margin: 8px 0 5px; font-size: 36px; line-height: 1; white-space: nowrap; }
body .kh-checkin-copy > p { margin: 0 0 9px; font-size: 10px; line-height: 1.3; }
body .kh-auth-tabs { gap: 5px; margin: 0 0 7px; }
body .kh-auth-tabs button { padding: 6px 9px; font-size: 9px; }
body .kh-avatar-setup {
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  margin: 6px 0 7px;
  padding: 6px;
  border-width: 2px;
}
body .kh-avatar-live-preview { min-height: 82px; }
body .kh-avatar-preview-sprite { width: 72px; }
body .kh-avatar-setup-controls { gap: 4px; }
body .kh-avatar-setup-controls > strong { font-size: 9px; }
body .kh-checkin form .kh-kind-options button { padding: 4px 6px; font-size: 8px; }
body .kh-checkin form .kh-color-options button { width: 25px; height: 25px; padding: 2px; }
body .kh-checkin form label { margin: 5px 0 3px; font-size: 9px; }
body .kh-checkin input { height: 34px; padding: 7px 10px; border-radius: 9px; font-size: 10px; }
body .kh-checkin form > button[type="submit"] { margin-top: 7px; padding: 8px 12px; border-width: 2px; font-size: 10px; }
body .kh-checkin form small { margin-top: 5px; font-size: 8px; }
body .kh-auth-error { min-height: 10px; margin-top: 3px; font-size: 8px; }
/* Email setup must remain reachable, including at short viewport heights. */
body .kh-checkin-copy { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #82b95c transparent; }
body .kh-email-activation:not([hidden]) { display: grid; gap: 7px; margin-top: 10px; padding: 12px; border: 2px solid #81b95c; border-radius: 12px; background: #effbd8; }
body .kh-email-activation strong { font-size: 14px; color: #204833; }
body .kh-email-activation p { margin: 0; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
body .kh-email-activation button { justify-self: start; padding: 7px 12px; border: 2px solid #32933a; border-radius: 8px; background: #ffdf56; color: #204833; font-size: 11px; font-weight: 700; cursor: pointer; }
body .kh-email-activation button:disabled { opacity: .55; cursor: default; }

/* All potentially long lists share one quiet, contained scrollbar. */
body :is(
  .kh-inventory-grid,
  .kh-catalog-shelf .kh-catalog-grid,
  .kh-daily-tasks-panel .kh-task-list,
  .kh-wallet-history [data-wallet-history],
  .kh-social-list,
  .kh-admin-report-list,
  .kh-wardrobe,
  .kh-public-rooms
) {
  scrollbar-width: thin;
  scrollbar-color: var(--kh-ui-green) #edf6d9;
}
body :is(
  .kh-inventory-grid,
  .kh-catalog-shelf .kh-catalog-grid,
  .kh-daily-tasks-panel .kh-task-list,
  .kh-wallet-history [data-wallet-history],
  .kh-social-list,
  .kh-admin-report-list,
  .kh-wardrobe,
  .kh-public-rooms
)::-webkit-scrollbar { width: 7px; height: 7px; }
body :is(
  .kh-inventory-grid,
  .kh-catalog-shelf .kh-catalog-grid,
  .kh-daily-tasks-panel .kh-task-list,
  .kh-wallet-history [data-wallet-history],
  .kh-social-list,
  .kh-admin-report-list,
  .kh-wardrobe,
  .kh-public-rooms
)::-webkit-scrollbar-thumb { border: 1px solid #edf6d9; border-radius: 999px; background: var(--kh-ui-green); }

/* Legacy mobile rules used to reflow these windows. The window itself now
   scales proportionally, so its internal desktop composition must stay fixed. */
body .kh-event-reward {
  grid-column: auto;
  grid-template-rows: auto auto;
  justify-self: auto;
}
body .kh-event-reward-preview { grid-row: 1 / 3; }
body .kh-event-progress { grid-template-columns: auto 1fr; }
body .kh-event-progress > span { text-align: right; }
body .kh-social-tools .kh-friend-search > div { grid-template-columns: 1fr auto; }
body .kh-social-tools .kh-social-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body .kh-social-sections .kh-social-row-actions { grid-column: auto; justify-content: flex-end; }
body .kh-social-sections .kh-social-row-actions button { flex: 0 0 auto; }
body .kh-role-badge-settings { grid-template-columns: 46px minmax(0, 1fr) auto; }
body .kh-role-badge-actions { grid-column: auto; width: auto; }
body .kh-role-badge-actions > button { width: auto; }
body .kh-report-form-footer { align-items: center; flex-direction: row; }
body .kh-admin-heading { align-items: end; flex-direction: row; }
body .kh-admin-heading > button { align-self: auto; }
body .kh-admin-report-head { grid-template-columns: minmax(0, 1fr) auto; }
body .kh-admin-report-state { justify-self: auto; }
body .kh-wallet-history-head small { display: inline; }
body .kh-info-settings-stack .kh-account-settings button { grid-column: auto; width: auto; }
body .kh-checkin-card {
  border-radius: 24px;
  background: linear-gradient(108deg, #fffce8 0 58%, #72c63e 58% 100%);
}

/* 0.12 — Leliehop and persistent player progress.
   The minigame is one fixed 760 × 507 illustrated window, matching every
   other KwaakFu surface and scaling with the game shell without page scroll. */
body .kh-lilyhop-dialog[open] {
  width: 760px;
  height: 507px;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 18px;
}

body .kh-lilyhop-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 0 48px 7px 2px;
  border-bottom: 2px solid var(--kh-ui-line);
}
body .kh-lilyhop-heading h2 {
  margin: 5px 0 0;
  color: var(--kh-ui-green-ink);
  font-size: 29px;
  line-height: .9;
  letter-spacing: -.035em;
}
body .kh-lilyhop-career {
  display: flex;
  gap: 6px;
}
body .kh-lilyhop-career > span {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 5px;
  min-width: 74px;
  padding: 5px 9px;
  border: 2px solid #b8d78e;
  border-radius: 12px 9px 13px 10px;
  color: var(--kh-ui-green-ink);
  background: #f4fbdc;
  box-shadow: 0 2px 0 rgba(47, 127, 29, .12);
  transform: rotate(-.35deg);
}
body .kh-lilyhop-career > span:nth-child(2) { transform: rotate(.45deg); }
body .kh-lilyhop-career small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
body .kh-lilyhop-career strong { color: #2f7f1d; font-size: 15px; }

body .kh-lilyhop-game {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: 37px minmax(0, 1fr) 42px;
  gap: 7px;
  padding-top: 8px;
}
body .kh-lilyhop-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
body .kh-lilyhop-hud > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 4px 10px;
  border: 2px solid #b8d78e;
  border-radius: 11px 14px 10px 13px;
  color: #355c35;
  background: #fffef4;
  box-shadow: 0 2px 0 rgba(47, 127, 29, .1);
}
body .kh-lilyhop-hud > span:nth-child(2) { border-radius: 14px 10px 13px 9px; }
body .kh-lilyhop-hud > span:nth-child(3) { border-radius: 10px 13px 9px 14px; }
body .kh-lilyhop-hud small {
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}
body .kh-lilyhop-hud strong { color: #1f6528; font-size: 16px; line-height: 1; }
body .kh-lilyhop-hud strong b { font: inherit; }
body .kh-lilyhop-hearts strong {
  overflow: hidden;
  color: #ed684f;
  letter-spacing: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .kh-lilyhop-board {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  border: 4px solid #2e791d;
  border-radius: 20px 16px 21px 17px;
  outline: none;
  background:
    radial-gradient(ellipse at 13% 22%, rgba(255, 255, 255, .25) 0 2%, transparent 2.5%),
    radial-gradient(ellipse at 72% 63%, rgba(255, 255, 255, .21) 0 2.3%, transparent 2.8%),
    radial-gradient(ellipse at 88% 18%, rgba(255, 255, 255, .18) 0 1.7%, transparent 2.2%),
    repeating-radial-gradient(ellipse at 20% 15%, transparent 0 18px, rgba(1, 111, 145, .14) 20px 21px, transparent 23px 38px),
    linear-gradient(155deg, #47c7dc 0%, #1d9fbe 48%, #1687a8 100%);
  box-shadow:
    0 0 0 2px #eaffc9,
    inset 0 0 0 3px rgba(255, 255, 255, .2),
    inset 0 -18px 28px rgba(3, 88, 113, .18);
}
body .kh-lilyhop-board:focus-visible {
  outline: 3px solid var(--kh-ui-yellow);
  outline-offset: 2px;
}
body .kh-lilyhop-board::before,
body .kh-lilyhop-board::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: -4%;
  right: -4%;
  height: 21px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 8px 100%, #4b9c28 0 7px, transparent 7.5px) 0 0 / 25px 18px repeat-x,
    linear-gradient(180deg, #77c33a, #398721);
  filter: drop-shadow(0 2px 0 rgba(25, 99, 34, .3));
}
body .kh-lilyhop-board::before { top: -10px; transform: rotate(-.6deg); }
body .kh-lilyhop-board::after { bottom: -10px; transform: rotate(.6deg) scaleY(-1); }

body .kh-lilyhop-water-detail,
body .kh-lilyhop-pad-layer { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
body .kh-lilyhop-pad-layer {
  transform: translateY(0);
  transform-origin: center bottom;
  will-change: transform;
}
body .kh-lilyhop-pad-layer.is-advancing {
  transform: translateY(18%);
  transition: transform .32s cubic-bezier(.24, .72, .26, 1);
}
body .kh-lilyhop-pad-layer.is-resetting { transition: none !important; }
body .kh-lilyhop-water-detail i {
  position: absolute;
  width: 28px;
  height: 7px;
  border: 2px solid rgba(220, 252, 247, .45);
  border-block-color: transparent;
  border-radius: 50%;
  transform: rotate(var(--water-tilt, 0deg));
}
body .kh-lilyhop-water-detail i:nth-child(1) { left: 7%; top: 20%; --water-tilt: -4deg; }
body .kh-lilyhop-water-detail i:nth-child(2) { left: 39%; top: 12%; --water-tilt: 3deg; }
body .kh-lilyhop-water-detail i:nth-child(3) { right: 9%; top: 27%; --water-tilt: -2deg; }
body .kh-lilyhop-water-detail i:nth-child(4) { left: 23%; bottom: 17%; --water-tilt: 2deg; }
body .kh-lilyhop-water-detail i:nth-child(5) { left: 59%; bottom: 25%; --water-tilt: -5deg; }
body .kh-lilyhop-water-detail i:nth-child(6) { right: 4%; bottom: 8%; --water-tilt: 4deg; }

/* JavaScript places pads with data-lane 0–2 and data-row 0–4. The custom
   properties remain available for animation or deliberately irregular pads. */
body .kh-lilyhop-pad {
  position: absolute;
  z-index: 2;
  left: var(--lily-x, 50%);
  bottom: var(--lily-y, 7%);
  width: 76px;
  height: 35px;
  margin: 0;
  padding: 0;
  border: 3px solid #226b28;
  border-radius: 52% 44% 49% 45%;
  color: #173d26;
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, .38) 0 5%, transparent 6%),
    radial-gradient(ellipse at 45% 48%, #82d84c 0 40%, #4fab30 41% 70%, #308527 71% 100%);
  box-shadow: 0 5px 0 rgba(4, 93, 116, .34), inset 0 -3px 0 rgba(26, 104, 35, .24);
  transform: translateX(-50%) rotate(var(--pad-tilt, -1deg));
  transform-origin: center;
  pointer-events: auto;
  cursor: pointer;
  transition: transform .14s ease, filter .14s ease, opacity .14s ease;
}
body .kh-lilyhop-pad::before {
  content: "";
  position: absolute;
  right: -2px;
  top: -4px;
  width: 24px;
  height: 18px;
  background: #2995b2;
  clip-path: polygon(100% 0, 100% 100%, 0 48%);
}
body .kh-lilyhop-pad::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(29, 101, 41, .55);
  box-shadow: -15px -5px 0 rgba(255, 255, 255, .2), 17px 5px 0 rgba(29, 101, 41, .18);
}
body .kh-lilyhop-pad[data-lane="0"], body .kh-lilyhop-pad.is-lane-0 { left: 17%; }
body .kh-lilyhop-pad[data-lane="1"], body .kh-lilyhop-pad.is-lane-1 { left: 50%; }
body .kh-lilyhop-pad[data-lane="2"], body .kh-lilyhop-pad.is-lane-2 { left: 83%; }
body .kh-lilyhop-pad[data-row="0"], body .kh-lilyhop-pad.is-row-0 { bottom: 5%; }
body .kh-lilyhop-pad[data-row="1"], body .kh-lilyhop-pad.is-row-1 { bottom: 23%; }
body .kh-lilyhop-pad[data-row="2"], body .kh-lilyhop-pad.is-row-2 { bottom: 41%; }
body .kh-lilyhop-pad[data-row="3"], body .kh-lilyhop-pad.is-row-3 { bottom: 59%; }
body .kh-lilyhop-pad[data-row="4"], body .kh-lilyhop-pad.is-row-4 { bottom: 77%; }
body .kh-lilyhop-target {
  position: absolute;
  z-index: 1;
  bottom: 21%;
  width: 88px;
  height: 43px;
  transform: translateX(-50%);
  border: 3px dashed rgba(255, 247, 194, .9);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(40, 126, 143, .2);
  pointer-events: none;
  animation: kh-lilyhop-target-pulse .8s ease-in-out infinite alternate;
}
body .kh-lilyhop-target[data-lane="0"] { left: 17%; }
body .kh-lilyhop-target[data-lane="1"] { left: 50%; }
body .kh-lilyhop-target[data-lane="2"] { left: 83%; }
body .kh-lilyhop-pad:hover,
body .kh-lilyhop-pad:focus-visible,
body .kh-lilyhop-pad.is-target {
  z-index: 3;
  outline: none;
  filter: brightness(1.12) saturate(1.08);
  transform: translateX(-50%) translateY(-3px) rotate(var(--pad-tilt, -1deg)) scale(1.06);
}
body .kh-lilyhop-pad.is-golden,
body .kh-lilyhop-pad[data-pad-kind="golden"] {
  border-color: #9e6615;
  background: radial-gradient(circle at 50% 44%, #fff6a6 0 12%, #ffd33e 13% 42%, #f0a82b 43% 70%, #d68920 71% 100%);
  box-shadow: 0 0 0 3px rgba(255, 244, 147, .45), 0 5px 0 rgba(4, 93, 116, .34);
}
body .kh-lilyhop-pad.is-golden::after,
body .kh-lilyhop-pad[data-pad-kind="golden"]::after {
  content: "✿";
  display: grid;
  place-items: center;
  left: calc(50% - 10px);
  top: -13px;
  width: 20px;
  height: 20px;
  color: #fff7cf;
  background: #ed684f;
  box-shadow: 0 2px 0 #aa4f37;
  font-size: 13px;
}
body .kh-lilyhop-pad.is-cracked,
body .kh-lilyhop-pad[data-pad-kind="cracked"] {
  filter: saturate(.6) brightness(.88);
  background: linear-gradient(145deg, #5c9f35 0 47%, #2a6d2c 48% 53%, #69ad3c 54% 100%);
}
body .kh-lilyhop-pad.is-used { opacity: .28; pointer-events: none; }

body .kh-lilyhop-duck {
  position: absolute;
  z-index: 5;
  left: var(--lily-x, 50%);
  bottom: var(--lily-y, 8%);
  width: 70px;
  margin: 0 0 12px;
  filter: drop-shadow(0 5px 0 rgba(4, 80, 94, .22));
  transform: translateX(-50%);
  transform-origin: center bottom;
  transition: left .32s cubic-bezier(.2, .75, .25, 1);
  pointer-events: none;
}
body .kh-lilyhop-duck[data-lane="0"], body .kh-lilyhop-duck.is-lane-0 { left: 17%; }
body .kh-lilyhop-duck[data-lane="1"], body .kh-lilyhop-duck.is-lane-1 { left: 50%; }
body .kh-lilyhop-duck[data-lane="2"], body .kh-lilyhop-duck.is-lane-2 { left: 83%; }
body .kh-lilyhop-duck[data-row="0"], body .kh-lilyhop-duck.is-row-0 { bottom: 5%; }
body .kh-lilyhop-duck[data-row="1"], body .kh-lilyhop-duck.is-row-1 { bottom: 23%; }
body .kh-lilyhop-duck[data-row="2"], body .kh-lilyhop-duck.is-row-2 { bottom: 41%; }
body .kh-lilyhop-duck[data-row="3"], body .kh-lilyhop-duck.is-row-3 { bottom: 59%; }
body .kh-lilyhop-duck[data-row="4"], body .kh-lilyhop-duck.is-row-4 { bottom: 77%; }
body .kh-lilyhop-duck.is-hopping { animation: kh-lilyhop-jump .3s ease-in-out; }

body .kh-lilyhop-panel {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  width: min(580px, calc(100% - 34px));
  min-height: 116px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 14px 15px;
  border: 3px solid #2e791d;
  border-radius: 18px 14px 19px 15px;
  color: var(--kh-ui-green-ink);
  background: rgba(255, 252, 232, .96);
  box-shadow: 0 0 0 3px rgba(245, 255, 220, .9), 0 6px 0 rgba(35, 100, 29, .88), 0 15px 30px rgba(4, 73, 83, .24);
  transform: translate(-50%, -50%) rotate(-.15deg);
}
body .kh-lilyhop-panel[hidden] { display: none; }
body .kh-lilyhop-panel-flower {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 3px solid #fff6bf;
  border-radius: 52% 45% 50% 43%;
  color: white;
  background: #ed684f;
  box-shadow: 0 4px 0 #ad4f38;
  font-size: 30px;
  transform: rotate(-5deg);
}
body .kh-lilyhop-panel small {
  color: #56744b;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body .kh-lilyhop-panel h3 { margin: 2px 0 4px; font-size: 20px; line-height: 1; }
body .kh-lilyhop-panel p { margin: 0; color: #496650; font-size: 9px; line-height: 1.3; }
body .kh-lilyhop-panel p strong { color: #2f7f1d; font-size: 13px; }
body .kh-lilyhop-panel p b { color: #a45d18; }
body .kh-lilyhop-panel [data-lilyhop-result-progress] {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #255d2b;
  background: #dff4bd;
  font-size: 9px;
  font-weight: 900;
}
body .kh-lilyhop-panel > button,
body .kh-lilyhop-controls > button {
  border: 2px solid #fff6bf;
  border-radius: 12px 9px 13px 10px;
  color: #52380f;
  background: var(--kh-ui-yellow);
  box-shadow: 0 3px 0 var(--kh-ui-orange);
  font-weight: 950;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
body .kh-lilyhop-panel > button { min-width: 112px; padding: 10px 12px; font-size: 10px; }
body .kh-lilyhop-panel > button:hover,
body .kh-lilyhop-controls > button:hover { filter: brightness(1.04); transform: translateY(-1px) rotate(.5deg); }
body .kh-lilyhop-panel > button:active,
body .kh-lilyhop-controls > button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--kh-ui-orange); }

body .kh-lilyhop-controls {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 128px;
  gap: 8px;
  align-items: stretch;
}
body .kh-lilyhop-controls > button { padding: 6px 10px; font-size: 11px; }
body .kh-lilyhop-controls > button span { font-size: 17px; vertical-align: -1px; }
body .kh-lilyhop-controls > p {
  display: grid;
  place-content: center;
  margin: 0;
  text-align: center;
  color: #496650;
  line-height: 1.1;
}
body .kh-lilyhop-controls > p strong { font-size: 9px; }
body .kh-lilyhop-controls > p span { margin-top: 2px; font-size: 8px; }

@keyframes kh-lilyhop-jump {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(0); }
  45% { transform: translateX(-50%) translateY(-25px) rotate(-4deg) scale(1.04); }
}
@keyframes kh-lilyhop-target-pulse {
  from { opacity: .55; transform: translateX(-50%) scale(.92); }
  to { opacity: 1; transform: translateX(-50%) scale(1.03); }
}

/* Compact progression card beneath the avatar keeps growth visible without
   adding another scrolling region to the profile window. */
body .kh-profile-overview {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 91px;
  gap: 8px;
}
body .kh-profile-overview .kh-profile-avatar {
  height: auto;
  min-height: 0;
}
body .kh-profile-progress {
  min-width: 0;
  padding: 8px 9px;
  border: 2px solid #b8d78e;
  border-radius: 13px 10px 14px 11px;
  color: var(--kh-ui-green-ink);
  background: linear-gradient(160deg, #fffef4, #edf8d7);
  box-shadow: 0 2px 0 rgba(47, 127, 29, .12);
}
body .kh-profile-progress header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 9px;
}
body .kh-profile-progress header > span { color: #2f7f1d; font-size: 8px; font-weight: 900; }
body .kh-profile-progress header b { font-size: 11px; }
body .kh-profile-xp-track {
  height: 9px;
  margin: 5px 0 6px;
  overflow: hidden;
  border: 2px solid #9abd72;
  border-radius: 999px;
  background: #dfecc9;
  box-shadow: inset 0 1px 2px rgba(40, 92, 36, .15);
}
body .kh-profile-xp-track > i {
  display: block;
  width: var(--profile-xp, 0%);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd33e, #f4b930);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: width .3s ease;
}
body .kh-profile-game-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
body .kh-profile-game-stats > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .68);
}
body .kh-profile-game-stats small {
  overflow: hidden;
  color: #55704d;
  font-size: 7px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-profile-game-stats strong { color: #255d2b; font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  body .kh-lilyhop-pad,
  body .kh-lilyhop-pad-layer,
  body .kh-lilyhop-target,
  body .kh-lilyhop-duck,
  body .kh-profile-xp-track > i { transition: none; }
  body .kh-lilyhop-duck.is-hopping { animation: none; }
  body .kh-lilyhop-target { animation: none; }
}

.kh-avatar-badge[data-badge-tone="game"] {
  border-color: #fff7c2;
  color: #235a29;
  background: linear-gradient(145deg, #ffe46b 0 47%, #79c947 48% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 0 #2b7626, 0 4px 7px rgba(37, 91, 34, .3);
  font-size: 8px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

body .kh-lilyhop-board.is-splashing {
  animation: kh-lilyhop-splash .31s ease-out;
}
body .kh-lilyhop-controls > button:disabled,
body .kh-lilyhop-panel > button:disabled {
  cursor: default;
  filter: grayscale(.35);
  opacity: .48;
  transform: none;
  box-shadow: 0 2px 0 #ba8a38;
}

@keyframes kh-lilyhop-splash {
  0%, 100% { filter: none; }
  40% { filter: saturate(.8) brightness(1.16); }
}

/* 0.15.8 — Canal Race. The second cabinet uses the same fixed game-window
   proportions as Lily Hop, but gets its own illustrated, three-lane course. */
body .kh-canal-race-dialog[open] {
  width: 760px;
  height: 507px;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 18px;
}
body .kh-canal-race-heading {
  flex: 0 0 auto;
  min-height: 52px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 48px 7px 2px;
  border-bottom: 2px solid var(--kh-ui-line);
}
body .kh-canal-race-heading h2 {
  margin: 5px 0 0;
  color: var(--kh-ui-green-ink);
  font-size: 29px;
  line-height: .9;
  letter-spacing: -.035em;
}
body .kh-canal-race-career { display: flex; gap: 6px; }
body .kh-canal-race-career > span {
  min-width: 74px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 5px;
  padding: 5px 9px;
  border: 2px solid #86cbd2;
  border-radius: 12px 9px 13px 10px;
  color: #14596a;
  background: #eafcff;
  box-shadow: 0 2px 0 rgba(8, 100, 122, .13);
  transform: rotate(-.35deg);
}
body .kh-canal-race-career > span:nth-child(2) { transform: rotate(.45deg); }
body .kh-canal-race-career small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
body .kh-canal-race-career strong { color: #09778d; font-size: 15px; }
body .kh-canal-race-game {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: 37px minmax(0, 1fr) 42px;
  gap: 7px;
  padding-top: 8px;
}
body .kh-canal-race-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
body .kh-canal-race-hud > span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 4px 10px;
  border: 2px solid #86cbd2;
  border-radius: 11px 14px 10px 13px;
  color: #345f68;
  background: #f8feff;
  box-shadow: 0 2px 0 rgba(8, 100, 122, .1);
}
body .kh-canal-race-hud > span:nth-child(2) { border-radius: 14px 10px 13px 9px; }
body .kh-canal-race-hud > span:nth-child(3) { border-radius: 10px 13px 9px 14px; }
body .kh-canal-race-hud small {
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}
body .kh-canal-race-hud strong { color: #096d80; font-size: 16px; line-height: 1; }
body .kh-canal-race-hud strong b { font: inherit; }
body .kh-canal-race-hearts strong { color: #ed684f; letter-spacing: 2px; white-space: nowrap; }
body .kh-canal-race-board {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  border: 4px solid #146879;
  border-radius: 20px 16px 21px 17px;
  outline: none;
  background: #23a9d1;
  box-shadow: 0 0 0 2px #dffbff, inset 0 0 0 3px rgba(255, 255, 255, .22), inset 0 -18px 28px rgba(3, 71, 103, .18);
}
body .kh-canal-race-board:focus-visible { outline: 3px solid var(--kh-ui-yellow); outline-offset: 2px; }
body .kh-canal-race-course {
  position: absolute;
  z-index: 0;
  inset: -22% 0 -8%;
  background: url('../images/canal-race-course-v1.webp?v=0.15.8-canal-race-r1') center 24% / cover no-repeat;
  transform: scale(1.03);
  transition: transform .5s ease;
}
body .kh-canal-race-board[data-game-phase="playing"] .kh-canal-race-course {
  animation: kh-canal-water-drift 4.2s ease-in-out infinite alternate;
}
body .kh-canal-race-lanes { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
body .kh-canal-race-lanes i {
  position: absolute;
  top: 8%;
  bottom: 0;
  width: 2px;
  opacity: .26;
  background: repeating-linear-gradient(to bottom, rgba(232, 253, 255, .95) 0 11px, transparent 11px 23px);
  filter: drop-shadow(0 0 2px rgba(8, 105, 137, .35));
}
body .kh-canal-race-lanes i:first-child { left: 33.333%; }
body .kh-canal-race-lanes i:last-child { left: 66.666%; }
body .kh-canal-race-obstacles { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
body .kh-canal-race-marker {
  position: absolute;
  left: var(--marker-from-x, 50%);
  bottom: var(--marker-from-y, 50%);
  width: 44px;
  height: 44px;
  transform: translate(-50%, 50%) scale(var(--marker-from-scale, 1));
  pointer-events: none;
}
body .kh-canal-race-board[data-game-phase="playing"] .kh-canal-race-marker {
  animation: kh-canal-marker-travel var(--race-step-ms, 1000ms) linear forwards;
}
body .kh-canal-race-marker[data-kind="buoy"]::before {
  content: "";
  position: absolute;
  inset: 4px 10px;
  border: 3px solid #8f3f2b;
  border-radius: 48% 48% 38% 38%;
  background: repeating-linear-gradient(155deg, #fff7df 0 8px, #ed684f 8px 16px);
  box-shadow: 0 5px 0 rgba(2, 86, 117, .38), inset 0 2px 0 rgba(255, 255, 255, .6);
}
body .kh-canal-race-marker[data-kind="buoy"]::after {
  content: "";
  position: absolute;
  left: 20px;
  top: -1px;
  width: 5px;
  height: 12px;
  border-radius: 5px 5px 0 0;
  background: #7e3c29;
}
body .kh-canal-race-marker[data-kind="ring"]::before {
  content: "★";
  position: absolute;
  inset: 3px;
  display: grid;
  place-items: center;
  border: 6px solid #ffd541;
  border-radius: 50%;
  color: #fff7ce;
  background: rgba(237, 104, 79, .86);
  box-shadow: 0 0 0 3px #ad7520, 0 5px 0 rgba(2, 86, 117, .32), inset 0 2px 0 rgba(255, 255, 255, .5);
  font-size: 14px;
  line-height: 1;
}
body .kh-canal-race-target {
  position: absolute;
  z-index: 2;
  bottom: 23%;
  width: 25%;
  height: 54px;
  border: 3px dashed rgba(255, 248, 190, .92);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(20, 111, 137, .2);
  pointer-events: none;
  animation: kh-canal-target-pulse .8s ease-in-out infinite alternate;
}
body .kh-canal-race-target[data-lane="0"] { left: 17%; }
body .kh-canal-race-target[data-lane="1"] { left: 50%; }
body .kh-canal-race-target[data-lane="2"] { left: 83%; }
body .kh-canal-race-player {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 3%;
  width: 96px;
  height: 104px;
  transform: translateX(-50%);
  transform-origin: center bottom;
  transition: left .34s cubic-bezier(.2, .76, .24, 1), transform .18s ease;
  pointer-events: none;
  filter: drop-shadow(0 6px 4px rgba(2, 62, 90, .28));
}
body .kh-canal-race-player[data-lane="0"] { left: 17%; }
body .kh-canal-race-player[data-lane="1"] { left: 50%; }
body .kh-canal-race-player[data-lane="2"] { left: 83%; }
body .kh-canal-race-player > img {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
body .kh-canal-race-duck {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 8px;
  width: 54px;
  height: 70px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(0 0 31% 0 round 18%);
  transform: translateX(-50%) scale(.76);
  transform-origin: center bottom;
  pointer-events: none;
}
body .kh-canal-race-player.is-steering-left { transform: translateX(-50%) rotate(-4deg); }
body .kh-canal-race-player.is-steering-right { transform: translateX(-50%) rotate(4deg); }
body .kh-canal-race-board.is-bumping { animation: kh-canal-bump .34s ease-out; }
body .kh-canal-race-board.is-collecting .kh-canal-race-player { filter: drop-shadow(0 0 8px #ffe35b) drop-shadow(0 6px 4px rgba(2, 62, 90, .25)); }
body .kh-canal-race-panel {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  width: min(590px, calc(100% - 34px));
  min-height: 116px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 14px 15px;
  border: 3px solid #146879;
  border-radius: 18px 14px 19px 15px;
  color: #154e5b;
  background: rgba(250, 255, 241, .97);
  box-shadow: 0 0 0 3px rgba(223, 251, 255, .92), 0 6px 0 rgba(11, 92, 111, .9), 0 15px 30px rgba(3, 61, 83, .28);
  transform: translate(-50%, -50%) rotate(-.15deg);
}
body .kh-canal-race-panel[hidden] { display: none; }
body .kh-canal-race-panel-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 3px solid #fff6bf;
  border-radius: 52% 45% 50% 43%;
  color: white;
  background: #ed684f;
  box-shadow: 0 4px 0 #ad4f38;
  font-size: 29px;
  transform: rotate(-5deg);
}
body .kh-canal-race-panel small { color: #4e7378; font-size: 8px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
body .kh-canal-race-panel h3 { margin: 2px 0 4px; font-size: 20px; line-height: 1; }
body .kh-canal-race-panel p { margin: 0; color: #45676d; font-size: 9px; line-height: 1.3; }
body .kh-canal-race-panel p strong { color: #087185; font-size: 13px; }
body .kh-canal-race-panel p b { color: #a45d18; }
body .kh-canal-race-panel [data-canal-race-result-progress] {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #155f6d;
  background: #d8f5f5;
  font-size: 9px;
  font-weight: 900;
}
body .kh-canal-race-panel > button,
body .kh-canal-race-controls > button {
  border: 2px solid #fff6bf;
  border-radius: 12px 9px 13px 10px;
  color: #52380f;
  background: var(--kh-ui-yellow);
  box-shadow: 0 3px 0 var(--kh-ui-orange);
  font-weight: 950;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
body .kh-canal-race-panel > button { min-width: 112px; padding: 10px 12px; font-size: 10px; }
body .kh-canal-race-panel > button:hover,
body .kh-canal-race-controls > button:hover { filter: brightness(1.04); transform: translateY(-1px) rotate(.5deg); }
body .kh-canal-race-panel > button:active,
body .kh-canal-race-controls > button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--kh-ui-orange); }
body .kh-canal-race-controls {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 128px;
  gap: 8px;
  align-items: stretch;
}
body .kh-canal-race-controls > button { padding: 6px 10px; font-size: 11px; }
body .kh-canal-race-controls > button span { font-size: 17px; vertical-align: -1px; }
body .kh-canal-race-controls > button:disabled,
body .kh-canal-race-panel > button:disabled { cursor: default; filter: grayscale(.35); opacity: .48; transform: none; box-shadow: 0 2px 0 #ba8a38; }
body .kh-canal-race-controls > p { display: grid; place-content: center; margin: 0; text-align: center; color: #45676d; line-height: 1.1; }
body .kh-canal-race-controls > p strong { font-size: 9px; }
body .kh-canal-race-controls > p span { margin-top: 2px; font-size: 8px; }
@keyframes kh-canal-water-drift {
  from { transform: scale(1.03) translateY(-2px); }
  to { transform: scale(1.05) translateY(4px); }
}
@keyframes kh-canal-marker-travel {
  from {
    left: var(--marker-from-x, 50%);
    bottom: var(--marker-from-y, 50%);
    opacity: 1;
    transform: translate(-50%, 50%) scale(var(--marker-from-scale, 1));
  }
  to {
    left: var(--marker-to-x, 50%);
    bottom: var(--marker-to-y, 30%);
    opacity: .96;
    transform: translate(-50%, 50%) scale(var(--marker-to-scale, 1));
  }
}
@keyframes kh-canal-target-pulse {
  from { opacity: .5; transform: translateX(-50%) scale(.94); }
  to { opacity: .95; transform: translateX(-50%) scale(1.02); }
}
@keyframes kh-canal-bump {
  0%, 100% { transform: translateX(0); filter: none; }
  30% { transform: translateX(-7px); filter: saturate(.75) brightness(1.18); }
  62% { transform: translateX(5px); }
}
@media (prefers-reduced-motion: reduce) {
  body .kh-canal-race-course,
  body .kh-canal-race-marker,
  body .kh-canal-race-player { animation: none !important; transition: none; }
  body .kh-canal-race-target { animation: none; }
}

/* 0.15.9 — Colour Quack. A compact, illustrated memory cabinet with four
   distinct shapes so the game remains readable without relying on colour. */
body .kh-colour-quack-dialog[open] {
  width: 760px;
  height: 507px;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 18px;
}
body .kh-colour-quack-heading {
  flex: 0 0 auto;
  min-height: 52px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 8px 7px;
}
body .kh-colour-quack-heading h2 { margin: 1px 0 0; color: #4f2d75; font-size: 24px; line-height: 1; }
body .kh-colour-quack-career { display: flex; gap: 6px; }
body .kh-colour-quack-career > span {
  min-width: 74px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 2px solid #bb8cce;
  border-radius: 12px 9px 13px 10px;
  color: #59416f;
  background: #fffdf3;
  box-shadow: 0 2px 0 rgba(93, 47, 119, .16);
}
body .kh-colour-quack-career small { font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
body .kh-colour-quack-career strong { color: #7b3da0; font-size: 15px; }
body .kh-colour-quack-game {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: 47px minmax(0, 1fr) 45px;
  gap: 7px;
}
body .kh-colour-quack-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
body .kh-colour-quack-hud > span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border: 2px solid #d3b4dd;
  border-radius: 11px 14px 10px 13px;
  color: #59416f;
  background: linear-gradient(155deg, #fffef4, #f5ebf8);
  box-shadow: 0 2px 0 rgba(95, 50, 120, .12);
}
body .kh-colour-quack-hud small { font-size: 8px; font-weight: 950; letter-spacing: .07em; text-transform: uppercase; }
body .kh-colour-quack-hud strong { color: #69328b; font-size: 16px; line-height: 1; }
body .kh-colour-quack-hearts strong { color: #ed684f; letter-spacing: 2px; white-space: nowrap; }
body .kh-colour-quack-board {
  position: relative;
  contain: layout paint;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  border: 4px solid #4d296f;
  border-radius: 20px 16px 21px 17px;
  outline: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 233, 126, .3) 0 10%, transparent 30%),
    linear-gradient(150deg, #2a6f83 0 42%, #58427d 43% 100%);
  box-shadow: 0 0 0 2px #fff7c9, inset 0 0 0 3px rgba(255, 255, 255, .16), inset 0 -25px 34px rgba(37, 26, 69, .22);
}
body .kh-colour-quack-board:focus-visible { outline: 3px solid var(--kh-ui-yellow); outline-offset: 2px; }
body .kh-colour-quack-glow { position: absolute; z-index: 0; inset: 0; pointer-events: none; }
body .kh-colour-quack-glow::before,
body .kh-colour-quack-glow::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border: 2px dashed rgba(255, 255, 255, .17);
  border-radius: 47% 53% 45% 55%;
  animation: kh-colour-orbit 16s linear infinite;
}
body .kh-colour-quack-glow::before { left: -105px; top: -125px; }
body .kh-colour-quack-glow::after { right: -105px; bottom: -125px; animation-direction: reverse; }
body .kh-colour-quack-glow i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 246, 174, .72);
  box-shadow: 0 0 9px rgba(255, 235, 92, .65);
  animation: kh-colour-twinkle 1.8s ease-in-out infinite alternate;
}
body .kh-colour-quack-glow i:nth-child(1) { left: 8%; top: 22%; }
body .kh-colour-quack-glow i:nth-child(2) { right: 10%; top: 17%; animation-delay: -.6s; }
body .kh-colour-quack-glow i:nth-child(3) { left: 14%; bottom: 17%; animation-delay: -1.1s; }
body .kh-colour-quack-glow i:nth-child(4) { right: 16%; bottom: 20%; animation-delay: -.3s; }
body .kh-colour-quack-status {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 9px;
  min-width: 150px;
  padding: 6px 14px;
  border: 2px solid #fff4b1;
  border-radius: 999px;
  color: #49356a;
  background: rgba(255, 253, 234, .96);
  box-shadow: 0 3px 0 rgba(56, 29, 85, .38);
  font-size: 10px;
  text-align: center;
  transform: translateX(-50%);
}
body .kh-colour-quack-choices { position: absolute; z-index: 3; inset: 0; }
body .kh-colour-quack-choices > button {
  --colour-pad: #ed684f;
  position: absolute;
  width: 160px;
  height: 82px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 4px solid #fff7ce;
  border-radius: 48% 43% 50% 42%;
  color: #fffdf0;
  background: var(--colour-pad);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--colour-pad) 62%, #3b264c), inset 0 4px 0 rgba(255,255,255,.32), 0 9px 14px rgba(28, 24, 63, .27);
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--pad-turn, -1deg));
  transition: transform .16s cubic-bezier(.2,.75,.25,1), filter .16s ease, box-shadow .16s ease, opacity .16s ease;
}
body .kh-colour-quack-choices > button:nth-child(1) { --colour-pad: #ed684f; --pad-turn: -2deg; left: 25%; top: 34%; }
body .kh-colour-quack-choices > button:nth-child(2) { --colour-pad: #f6c83c; --pad-turn: 2deg; left: 75%; top: 34%; color: #714d12; }
body .kh-colour-quack-choices > button:nth-child(3) { --colour-pad: #24b3c5; --pad-turn: 1.5deg; left: 25%; top: 74%; }
body .kh-colour-quack-choices > button:nth-child(4) { --colour-pad: #a65bc0; --pad-turn: -1.5deg; left: 75%; top: 74%; }
body .kh-colour-quack-choices > button:disabled { cursor: default; opacity: .84; }
body .kh-colour-quack-choices > button span {
  display: block;
  font-size: 31px;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(69, 39, 68, .26);
}
body .kh-colour-quack-choices > button small {
  position: absolute;
  right: 9px;
  bottom: 7px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 50%;
  color: #49345a;
  background: rgba(255,253,236,.9);
  font-size: 8px;
  font-weight: 950;
}
body .kh-colour-quack-choices > button:not(:disabled):hover,
body .kh-colour-quack-choices > button:focus-visible { outline: none; filter: brightness(1.1) saturate(1.08); }
body .kh-colour-quack-choices > button.is-lit,
body .kh-colour-quack-choices > button.is-pressed {
  z-index: 5;
  filter: brightness(1.34) saturate(1.16);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--colour-pad) 52%, #3b264c), inset 0 0 0 5px rgba(255,255,255,.5), 0 0 25px 8px color-mix(in srgb, var(--colour-pad) 72%, transparent);
  transform: translate(-50%, -50%) rotate(var(--pad-turn, -1deg)) scale(1.09);
}
body .kh-colour-quack-host {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 51%;
  width: 76px;
  height: 106px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
body .kh-colour-quack-host > span {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: -5px;
  padding: 3px 7px;
  border: 2px solid #fff6bb;
  border-radius: 999px;
  color: #5c3970;
  background: #fffdf1;
  box-shadow: 0 2px 0 rgba(57,33,78,.35);
  font-size: 7px;
  font-weight: 950;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-1deg);
}
body .kh-colour-quack-host .kh-profile-kwaker { position: absolute; left: 50%; bottom: -4px; width: 66px; transform: translateX(-50%); }
body .kh-colour-quack-board.is-correct .kh-colour-quack-host { animation: kh-colour-happy .42s ease-out; }
body .kh-colour-quack-board.is-wrong { animation: kh-colour-wrong .38s ease-out; }
body .kh-colour-quack-panel {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  width: min(590px, calc(100% - 34px));
  min-height: 116px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 14px 15px;
  border: 3px solid #5d3377;
  border-radius: 18px 14px 19px 15px;
  color: #4a3562;
  background: rgba(255, 254, 241, .98);
  box-shadow: 0 0 0 3px rgba(255, 245, 184, .9), 0 6px 0 #43245b, 0 15px 30px rgba(31, 24, 64, .3);
  transform: translate(-50%, -50%) rotate(-.15deg);
}
body .kh-colour-quack-panel[hidden] { display: none; }
body .kh-colour-quack-panel-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 3px solid #fff6bf;
  border-radius: 52% 45% 50% 43%;
  color: white;
  background: linear-gradient(145deg, #ed684f 0 49%, #9c55b8 50% 100%);
  box-shadow: 0 4px 0 #65367e;
  font-size: 29px;
  transform: rotate(-5deg);
}
body .kh-colour-quack-panel small { color: #72567e; font-size: 8px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
body .kh-colour-quack-panel h3 { margin: 2px 0 4px; color: #4d2b69; font-size: 20px; line-height: 1; }
body .kh-colour-quack-panel p { margin: 0; color: #5f536a; font-size: 9px; line-height: 1.3; }
body .kh-colour-quack-panel p strong { color: #783e9a; font-size: 13px; }
body .kh-colour-quack-panel p b { color: #a45d18; }
body .kh-colour-quack-panel [data-colour-quack-result-progress] { display: inline-block; margin-top: 5px; padding: 3px 7px; border-radius: 999px; color: #664078; background: #f0e0f4; font-size: 9px; font-weight: 900; }
body .kh-colour-quack-panel > button {
  min-width: 112px;
  padding: 10px 12px;
  border: 2px solid #fff6bf;
  border-radius: 12px 9px 13px 10px;
  color: #52380f;
  background: var(--kh-ui-yellow);
  box-shadow: 0 3px 0 var(--kh-ui-orange);
  font-size: 10px;
  font-weight: 950;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
body .kh-colour-quack-panel > button:hover { filter: brightness(1.04); transform: translateY(-1px) rotate(.5deg); }
body .kh-colour-quack-panel > button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--kh-ui-orange); }
body .kh-colour-quack-panel > button:disabled { cursor: default; filter: grayscale(.35); opacity: .48; transform: none; box-shadow: 0 2px 0 #ba8a38; }
body .kh-colour-quack-controls { display: grid; place-items: center; }
body .kh-colour-quack-controls p { display: grid; place-items: center; margin: 0; color: #5a4964; line-height: 1.15; text-align: center; }
body .kh-colour-quack-controls strong { font-size: 10px; }
body .kh-colour-quack-controls span { margin-top: 2px; font-size: 8px; }
@keyframes kh-colour-orbit { to { transform: rotate(360deg); } }
@keyframes kh-colour-twinkle { from { opacity: .32; transform: scale(.75); } to { opacity: 1; transform: scale(1.18); } }
@keyframes kh-colour-happy { 45% { transform: translate(-50%, -50%) translateY(-8px) rotate(3deg); } }
@keyframes kh-colour-wrong { 0%,100% { transform: translateX(0); } 30% { transform: translateX(-7px); } 65% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) {
  body .kh-colour-quack-glow::before,
  body .kh-colour-quack-glow::after,
  body .kh-colour-quack-glow i,
  body .kh-colour-quack-host,
  body .kh-colour-quack-board,
  body .kh-colour-quack-choices > button { animation: none !important; transition: none; }
}

/* 0.16.0 — Claw Game. A compact glass prize cabinet with a smooth rail,
   three server-verifiable grabs and hand-drawn QuackTown prize shapes. */
body .kh-claw-game-dialog[open] {
  width: 760px;
  height: 507px;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 18px;
  overflow: hidden;
}
body .kh-claw-game-heading {
  flex: 0 0 auto;
  min-height: 52px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 8px 7px;
}
body .kh-claw-game-heading h2 { margin: 1px 0 0; color: #176b75; font-size: 24px; line-height: 1; }
body .kh-claw-game-career { display: flex; gap: 6px; }
body .kh-claw-game-career > span {
  min-width: 74px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 2px solid #71b7af;
  border-radius: 12px 9px 13px 10px;
  color: #285e61;
  background: #fffdf3;
  box-shadow: 0 2px 0 rgba(27, 101, 105, .16);
}
body .kh-claw-game-career small { font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
body .kh-claw-game-career strong { color: #167984; font-size: 15px; }
body .kh-claw-game {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: 47px minmax(0, 1fr) 48px;
  gap: 7px;
}
body .kh-claw-game-hud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
body .kh-claw-game-hud > span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border: 2px solid #a8d6c1;
  border-radius: 11px 14px 10px 13px;
  color: #376260;
  background: linear-gradient(155deg, #fffef4, #eaf8ef);
  box-shadow: 0 2px 0 rgba(35, 111, 91, .12);
}
body .kh-claw-game-hud small { font-size: 8px; font-weight: 950; letter-spacing: .07em; text-transform: uppercase; }
body .kh-claw-game-hud strong { color: #167984; font-size: 16px; line-height: 1; }
body .kh-claw-game-board {
  position: relative;
  contain: layout paint;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  border: 4px solid #146272;
  border-radius: 19px 16px 20px 17px;
  outline: none;
  background: #d7f3ec;
  box-shadow: 0 0 0 2px #fff3ae, inset 0 0 0 3px rgba(255,255,255,.3), inset 0 -20px 28px rgba(21,89,98,.16);
}
body .kh-claw-game-board:focus-visible { outline: 3px solid var(--kh-ui-yellow); outline-offset: 2px; }
body .kh-claw-game-machine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255,255,255,.2) 8% 9%, transparent 9% 90%, rgba(255,255,255,.18) 90% 91%, transparent 91%),
    radial-gradient(circle at 22% 20%, rgba(255,255,255,.58) 0 1.5%, transparent 2%),
    linear-gradient(165deg, #8bd8d0 0%, #64c6c5 48%, #4aa4b1 100%);
}
body .kh-claw-game-machine::before,
body .kh-claw-game-machine::after {
  content: "";
  position: absolute;
  z-index: 8;
  top: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, #ee9e2e, #ffd760 45%, #c96f22);
  box-shadow: inset 0 0 0 3px rgba(112,62,27,.2);
}
body .kh-claw-game-machine::before { left: 0; }
body .kh-claw-game-machine::after { right: 0; transform: scaleX(-1); }
body .kh-claw-game-lights {
  position: absolute;
  z-index: 9;
  top: 6px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-around;
}
body .kh-claw-game-lights i { width: 9px; height: 9px; border: 2px solid #fff7ca; border-radius: 50%; background: #ffcf38; box-shadow: 0 0 8px #fff06b; animation: kh-claw-light 1.2s ease-in-out infinite alternate; }
body .kh-claw-game-lights i:nth-child(even) { animation-delay: -.65s; background: #ef6b55; }
body .kh-claw-game-rail { position: absolute; z-index: 3; left: 22px; right: 22px; top: 25px; height: 10px; border: 3px solid #14556b; border-radius: 999px; background: #eef4cf; box-shadow: 0 3px 0 rgba(15,70,82,.35); }
body .kh-claw-game-claw {
  --claw-x: 50%;
  position: absolute;
  z-index: 7;
  left: var(--claw-x);
  top: 17px;
  width: 54px;
  height: 222px;
  pointer-events: none;
  transform: translateX(-50%);
  transition: left .12s linear;
}
body .kh-claw-game-carriage {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 0;
  width: 43px;
  height: 27px;
  border: 3px solid #0f5363;
  border-radius: 9px 9px 12px 12px;
  background: linear-gradient(#ffd956, #e58a27);
  box-shadow: 0 3px 0 rgba(13,67,80,.32);
  transform: translateX(-50%);
}
body .kh-claw-game-cable {
  position: absolute;
  left: calc(50% - 2px);
  top: 24px;
  width: 4px;
  height: 55px;
  border-radius: 999px;
  background: #174d5d;
  box-shadow: 2px 0 0 rgba(255,255,255,.35);
  transition: height .7s cubic-bezier(.4,0,.2,1);
}
body .kh-claw-game-grabber {
  position: absolute;
  left: 50%;
  top: 74px;
  width: 42px;
  height: 36px;
  transform: translateX(-50%);
  transition: top .7s cubic-bezier(.4,0,.2,1);
}
body .kh-claw-game-grabber::before { content: ""; position: absolute; left: 50%; top: 0; width: 20px; height: 14px; border: 3px solid #134f60; border-radius: 50% 50% 42% 42%; background: #ffd456; transform: translateX(-50%); }
body .kh-claw-game-grabber b { position: absolute; top: 9px; width: 18px; height: 26px; border-bottom: 4px solid #153f4e; }
body .kh-claw-game-grabber b:first-child { left: 3px; border-left: 4px solid #153f4e; border-radius: 0 0 0 18px; transform: rotate(-13deg); transform-origin: top right; }
body .kh-claw-game-grabber b:last-child { right: 3px; border-right: 4px solid #153f4e; border-radius: 0 0 18px 0; transform: rotate(13deg); transform-origin: top left; }
body .kh-claw-game-board.is-dropping .kh-claw-game-cable { height: 166px; }
body .kh-claw-game-board.is-dropping .kh-claw-game-grabber { top: 185px; }
body .kh-claw-game-board.is-grabbing .kh-claw-game-grabber b:first-child { transform: rotate(8deg); }
body .kh-claw-game-board.is-grabbing .kh-claw-game-grabber b:last-child { transform: rotate(-8deg); }
body .kh-claw-game-prizes { position: absolute; z-index: 4; left: 18px; right: 18px; bottom: 14px; height: 74px; border-radius: 42% 42% 9px 9px; background: linear-gradient(180deg, rgba(255,239,170,.2), rgba(17,91,101,.28)); box-shadow: inset 0 -8px 0 rgba(16,82,93,.18); }
body .kh-claw-prize {
  --prize-colour: #ffd14e;
  position: absolute;
  left: var(--prize-x);
  bottom: var(--prize-y, 5px);
  width: 43px;
  height: 47px;
  display: grid;
  place-items: center;
  border: 3px solid #144e5d;
  border-radius: 53% 47% 45% 48%;
  color: #fff9dc;
  background: var(--prize-colour);
  box-shadow: inset 0 4px 0 rgba(255,255,255,.38), 0 4px 0 rgba(15,77,88,.28);
  transform: translateX(-50%) rotate(var(--prize-turn, 0deg));
  transition: transform .62s cubic-bezier(.2,.75,.25,1), opacity .35s ease;
}
body .kh-claw-prize:nth-child(3n+2) { --prize-colour: #ee6f59; }
body .kh-claw-prize:nth-child(3n) { --prize-colour: #a65cc0; }
body .kh-claw-prize::before { content: ""; position: absolute; left: 9px; top: 13px; width: 5px; height: 7px; border-radius: 50%; background: #143f4d; box-shadow: 17px 0 0 #143f4d; }
body .kh-claw-prize::after { content: ""; position: absolute; left: 50%; top: 23px; width: 14px; height: 8px; border: 2px solid #9e5b18; border-radius: 65% 42% 55% 42%; background: #ffbd35; transform: translateX(-50%); }
body .kh-claw-prize b { position: absolute; z-index: 2; right: -5px; top: -10px; width: 24px; height: 24px; display: none; place-items: center; border: 2px solid #fff4a7; border-radius: 50%; color: white; background: #9b58bd; box-shadow: 0 2px 0 #553269; font-size: 13px; }
body .kh-claw-prize[data-kind="star"] b,
body .kh-claw-prize[data-kind="crown"] b { display: grid; }
body .kh-claw-prize[data-kind="crown"] b { color: #765011; background: #ffd83e; }
body .kh-claw-prize.is-caught { z-index: 8; opacity: 0; transform: translateX(-50%) translateY(-138px) rotate(4deg) scale(.75); }
body .kh-claw-game-chute { position: absolute; z-index: 6; left: 22px; bottom: 9px; width: 78px; height: 51px; display: grid; place-items: end center; padding-bottom: 4px; border: 4px solid #124f60; border-radius: 13px 13px 7px 7px; color: #6c4812; background: linear-gradient(#273e4c 0 45%, #ffd45a 46%); box-shadow: 0 4px 0 rgba(15,72,83,.36); }
body .kh-claw-game-chute span { font-size: 7px; font-weight: 950; letter-spacing: .08em; }
body .kh-claw-game-status { position: absolute; z-index: 10; left: 50%; top: 43px; min-width: 170px; padding: 5px 13px; border: 2px solid #fff3a6; border-radius: 999px; color: #245a60; background: rgba(255,253,229,.96); box-shadow: 0 3px 0 rgba(15,74,84,.35); font-size: 9px; text-align: center; transform: translateX(-50%); }
body .kh-claw-game-panel { position: absolute; z-index: 12; left: 50%; top: 50%; width: min(590px, calc(100% - 34px)); min-height: 116px; display: grid; grid-template-columns: 62px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 14px 15px; border: 3px solid #176473; border-radius: 18px 14px 19px 15px; color: #285a5d; background: rgba(255,254,241,.98); box-shadow: 0 0 0 3px rgba(255,239,145,.9), 0 6px 0 #104c59, 0 15px 30px rgba(15,65,74,.3); transform: translate(-50%,-50%) rotate(-.15deg); }
body .kh-claw-game-panel[hidden] { display: none; }
body .kh-claw-game-panel-icon { width: 60px; height: 60px; display: grid; place-items: center; border: 3px solid #fff1a8; border-radius: 52% 45% 50% 43%; color: white; background: linear-gradient(145deg,#27aeb1 0 49%,#f0a12f 50% 100%); box-shadow: 0 4px 0 #12616d; font-size: 30px; transform: rotate(-5deg); }
body .kh-claw-game-panel small { color: #537270; font-size: 8px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
body .kh-claw-game-panel h3 { margin: 2px 0 4px; color: #176673; font-size: 20px; line-height: 1; }
body .kh-claw-game-panel p { margin: 0; color: #526864; font-size: 9px; line-height: 1.3; }
body .kh-claw-game-panel p strong { color: #147b84; font-size: 13px; }
body .kh-claw-game-panel p b { color: #a45d18; }
body .kh-claw-game-panel [data-claw-game-result-progress] { display: inline-block; margin-top: 5px; padding: 3px 7px; border-radius: 999px; color: #27666a; background: #dff4e8; font-size: 9px; font-weight: 900; }
body .kh-claw-game-panel > button { min-width: 112px; padding: 10px 12px; border: 2px solid #fff1a8; border-radius: 12px 9px 13px 10px; color: #52380f; background: var(--kh-ui-yellow); box-shadow: 0 3px 0 var(--kh-ui-orange); font-size: 10px; font-weight: 950; transition: transform .12s ease,filter .12s ease,box-shadow .12s ease; }
body .kh-claw-game-panel > button:hover { filter: brightness(1.04); transform: translateY(-1px) rotate(.5deg); }
body .kh-claw-game-panel > button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--kh-ui-orange); }
body .kh-claw-game-panel > button:disabled { cursor: default; filter: grayscale(.35); opacity: .48; transform: none; box-shadow: 0 2px 0 #ba8a38; }
body .kh-claw-game-controls { display: grid; grid-template-columns: 90px minmax(0,1fr) 105px 90px; gap: 7px; align-items: center; }
body .kh-claw-game-controls > button { height: 39px; border: 2px solid #2d7b6a; border-radius: 12px 10px 13px 9px; color: #20584f; background: #effbe9; box-shadow: 0 3px 0 #2d7b6a; font-size: 10px; font-weight: 950; }
body .kh-claw-game-controls > button span { font-size: 16px; vertical-align: -1px; }
body .kh-claw-game-controls > button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #2d7b6a; }
body .kh-claw-game-controls > button:disabled { cursor: default; opacity: .45; filter: grayscale(.3); }
body .kh-claw-game-controls > .kh-claw-game-drop { border-color: #b76d1f; color: #64440e; background: #ffd645; box-shadow: 0 3px 0 #b76d1f; }
body .kh-claw-game-controls p { display: grid; place-items: center; margin: 0; color: #496762; line-height: 1.15; text-align: center; }
body .kh-claw-game-controls strong { font-size: 10px; }
body .kh-claw-game-controls p span { margin-top: 2px; font-size: 8px; }
@keyframes kh-claw-light { from { opacity: .45; transform: scale(.82); } to { opacity: 1; transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) {
  body .kh-claw-game-lights i,
  body .kh-claw-game-claw,
  body .kh-claw-game-cable,
  body .kh-claw-game-grabber,
  body .kh-claw-prize { animation: none !important; transition-duration: .01ms !important; }
}

/* 0.17.1 — rebuilt Quack-O-Matic cabinet and illustrated moving prizes. */
body .kh-claw-game-dialog[open] { border-color:#4c3476; background:#fffbed; box-shadow:0 0 0 4px #fff2a5,0 0 0 8px #225d69,0 14px 35px rgba(28,35,58,.35); }
body .kh-claw-game-heading { border-bottom:3px solid #efc54a; }
body .kh-claw-game-heading h2 { color:#57377a; }
body .kh-claw-game-career > span { border-color:#b794cf; color:#634c72; background:#fff9ec; }
body .kh-claw-game-career strong,body .kh-claw-game-hud strong { color:#71408f; }
body .kh-claw-game-hud > span { border-color:#c5a6d6; background:linear-gradient(155deg,#fffef4,#f4ebf8); }
body .kh-claw-game-board { border-color:#49316f; background:#27274d; box-shadow:0 0 0 2px #f6d96a,inset 0 0 0 3px rgba(255,255,255,.16),inset 0 -22px 32px rgba(24,15,48,.45); }
body .kh-claw-game-machine {
  background:
    linear-gradient(112deg,transparent 0 22%,rgba(255,255,255,.13) 22.5% 27%,transparent 27.5% 100%),
    radial-gradient(circle at 74% 22%,rgba(255,221,92,.24),transparent 22%),
    linear-gradient(155deg,#224f65 0 38%,#3f356e 71%,#5b3471 100%);
}
body .kh-claw-game-machine::before,body .kh-claw-game-machine::after { width:22px; border:3px solid #163d4c; background:repeating-linear-gradient(180deg,#ffc94c 0 16px,#ef7956 16px 31px,#5bc2b4 31px 46px); box-shadow:inset 3px 0 0 rgba(255,255,255,.32),3px 0 0 rgba(18,35,55,.4); }
body .kh-claw-game-lights { top:4px; left:112px; right:112px; height:30px; align-items:center; padding:0 12px; border:3px solid #173e51; border-radius:12px 9px 13px 10px; background:linear-gradient(#ffe168,#e7a532); box-shadow:inset 0 3px 0 rgba(255,255,255,.44),0 4px 0 rgba(18,36,56,.38); }
body .kh-claw-game-lights::before { content:"QUACK-O-MATIC"; position:absolute; left:50%; color:#59336f; font-size:13px; font-weight:1000; letter-spacing:.08em; text-shadow:0 2px 0 #fff1a5; transform:translateX(-50%) rotate(-1deg); }
body .kh-claw-game-lights i { width:7px; height:7px; border-width:1px; box-shadow:0 0 7px #fff8a0; }
body .kh-claw-game-lights i:nth-child(3),body .kh-claw-game-lights i:nth-child(4),body .kh-claw-game-lights i:nth-child(5) { visibility:hidden; }
body .kh-claw-game-rail { left:37px; right:37px; top:43px; height:9px; border-color:#152f4a; background:linear-gradient(#eef6dc,#8ec6bb); box-shadow:inset 0 2px 0 white,0 4px 0 rgba(14,28,49,.46); }
body .kh-claw-game-claw { top:34px; height:205px; }
body .kh-claw-game-carriage { width:46px; height:27px; border-color:#172f4a; border-radius:10px 8px 12px 9px; background:linear-gradient(145deg,#ffdf59 0 52%,#ef8a3e 53%); box-shadow:inset 0 3px 0 rgba(255,255,255,.5),0 4px 0 rgba(13,28,48,.46); }
body .kh-claw-game-carriage::before { content:""; position:absolute; left:7px; right:7px; bottom:5px; height:5px; border-radius:999px; background:#5a3977; box-shadow:inset 0 2px 0 rgba(255,255,255,.25); }
body .kh-claw-game-cable { top:26px; height:43px; background:#e4edf0; box-shadow:inset 1px 0 0 white,2px 0 0 #1c344a; }
body .kh-claw-game-grabber { top:64px; width:48px; }
body .kh-claw-game-grabber::before { width:23px; height:15px; border-color:#1a334a; background:linear-gradient(#ffe06b,#dd9551); }
body .kh-claw-game-grabber b { border-color:#e5edf1; filter:drop-shadow(2px 1px 0 #1b3349); }
body .kh-claw-game-board.is-dropping .kh-claw-game-cable { height:151px; }
body .kh-claw-game-board.is-dropping .kh-claw-game-grabber { top:171px; }
body .kh-claw-game-prizes { left:35px; right:35px; bottom:12px; height:111px; overflow:hidden; border:3px solid rgba(255,235,157,.65); border-radius:28px 24px 12px 14px; background:linear-gradient(180deg,rgba(147,219,211,.17),rgba(24,42,73,.28) 55%,rgba(18,28,58,.67)); box-shadow:inset 0 -15px 0 rgba(19,27,57,.32),inset 0 3px 0 rgba(255,255,255,.18),0 4px 0 rgba(15,24,46,.42); }
body .kh-claw-game-prizes::before { content:""; position:absolute; z-index:1; left:-3%; right:-3%; bottom:0; height:35px; border-radius:50% 50% 0 0; background:repeating-linear-gradient(135deg,#2d4166 0 12px,#3f3264 12px 24px); box-shadow:inset 0 4px 0 rgba(255,255,255,.12); }
body .kh-claw-game-prizes::after { content:""; position:absolute; z-index:8; left:0; right:0; bottom:0; height:12px; background:linear-gradient(90deg,#f4a642,#ffdb59,#e96c58,#71c5b7,#a45bb7); box-shadow:inset 0 3px 0 rgba(255,255,255,.4); }
body .kh-claw-prize { --prize-colour:transparent; z-index:3; width:58px; height:62px; display:block; border:0; border-radius:0; color:inherit; background:none; box-shadow:none; transform:translateX(-50%) rotate(var(--prize-turn,0deg)); transition:transform .62s cubic-bezier(.2,.75,.25,1),opacity .35s ease; will-change:left,transform; }
body .kh-claw-prize[data-row="0"] { z-index:6; } body .kh-claw-prize[data-row="1"] { z-index:4; filter:saturate(.92) brightness(.96); } body .kh-claw-prize[data-row="2"] { z-index:5; }
body .kh-claw-prize::before,body .kh-claw-prize::after { content:none; }
body .kh-claw-prize-art {
  position:absolute;
  inset:-5px -6px -3px;
  background-image:var(--kh-claw-plush-image,url("../images/claw-plush-frog-v1.webp"));
  background-position:center;
  background-repeat:no-repeat;
  background-size:contain;
  filter:drop-shadow(0 4px 0 rgba(15,24,47,.44)) drop-shadow(0 0 2px rgba(255,246,193,.6));
}
body .kh-claw-prize[data-row="1"] .kh-claw-prize-art { transform:scale(.94); transform-origin:center bottom; }
body .kh-claw-prize b { z-index:9; right:-4px; top:-5px; min-width:21px; width:auto; height:21px; padding:0 4px; border:2px solid #fff3ac; color:white; background:#9e54b7; box-shadow:0 2px 0 #503062; font-size:8px; letter-spacing:.02em; }
body .kh-claw-prize.is-caught { z-index:12; opacity:0; transform:translateX(-50%) translateY(-135px) rotate(8deg) scale(.72); }

body .kh-claw-prize-duck { --kh-claw-plush-image:url("../images/claw-plush-frog-v1.webp"); }
body .kh-claw-prize-frog { --kh-claw-plush-image:url("../images/claw-plush-fish-v1.webp"); }
body .kh-claw-prize-fish { --kh-claw-plush-image:url("../images/claw-plush-crab-v1.webp"); }
body .kh-claw-prize-star { --kh-claw-plush-image:url("../images/claw-plush-starfish-v1.webp"); }
body .kh-claw-prize-crown { --kh-claw-plush-image:url("../images/claw-plush-seahorse-v1.webp"); }
body .kh-claw-prize-star b,
body .kh-claw-prize-crown b { display:grid; place-items:center; }
body .kh-claw-prize-crown b { color:#684517; background:#ffd84f; box-shadow:0 2px 0 #a66a1f; }

body .kh-claw-game-chute { left:30px; bottom:18px; width:84px; height:55px; border-color:#172f49; color:#54376d; background:linear-gradient(#17283e 0 43%,#ffd75b 44%); box-shadow:inset 0 3px 0 rgba(255,255,255,.12),0 4px 0 rgba(14,26,45,.45); }
body .kh-claw-game-chute::before { content:""; position:absolute; top:7px; width:54px; height:17px; border:2px solid #7695a1; border-radius:7px 6px 9px 6px; background:#0d1e32; }
body .kh-claw-game-chute span { font-size:8px; letter-spacing:.12em; }
body .kh-claw-game-status { top:62px; border-color:#ffe98c; color:#54366d; box-shadow:0 3px 0 rgba(19,28,50,.4); }
body .kh-claw-game-panel { border-color:#553777; box-shadow:0 0 0 3px rgba(255,226,102,.9),0 6px 0 #34244e,0 15px 30px rgba(20,20,49,.35); }
body .kh-claw-game-panel-icon { background:linear-gradient(145deg,#ee7655 0 48%,#8350a6 49%); box-shadow:0 4px 0 #4c3564; }
body .kh-claw-game-panel h3 { color:#5c397c; }
body .kh-claw-game-controls > button { border-color:#62417d; color:#513665; background:#f2ecf6; box-shadow:0 3px 0 #513566; }
body .kh-claw-game-controls > .kh-claw-game-drop { border-color:#a45d1d; background:#ffd343; box-shadow:0 3px 0 #a45d1d; }

/* 0.17.2 — every cabinet keeps its action buttons together as one compact
   control cluster, with help text alongside instead of between the buttons. */
body .kh-lilyhop-controls,
body .kh-canal-race-controls {
  grid-template-columns:112px 112px minmax(0,1fr);
  gap:6px;
}
body .kh-lilyhop-controls > button:first-child,
body .kh-canal-race-controls > button:first-child { grid-column:1; grid-row:1; }
body .kh-lilyhop-controls > button:last-child,
body .kh-canal-race-controls > button:last-child { grid-column:2; grid-row:1; }
body .kh-lilyhop-controls > p,
body .kh-canal-race-controls > p { grid-column:3; grid-row:1; }

body .kh-claw-game-controls {
  grid-template-columns:88px 100px 88px minmax(0,1fr);
  gap:6px;
}
body .kh-claw-game-controls > button:first-of-type { grid-column:1; grid-row:1; }
body .kh-claw-game-controls > .kh-claw-game-drop { grid-column:2; grid-row:1; }
body .kh-claw-game-controls > button:last-of-type { grid-column:3; grid-row:1; }
body .kh-claw-game-controls > p { grid-column:4; grid-row:1; }

body .kh-colour-quack-choices > button { width:136px; height:74px; }
body .kh-colour-quack-choices > button:nth-child(1) { left:34%; top:34%; }
body .kh-colour-quack-choices > button:nth-child(2) { left:66%; top:34%; }
body .kh-colour-quack-choices > button:nth-child(3) { left:34%; top:74%; }
body .kh-colour-quack-choices > button:nth-child(4) { left:66%; top:74%; }

body .kh-quack-beat-pad { grid-template-columns:repeat(4,48px); gap:3px; }
body .kh-quack-beat-pad > button { width:48px; }

/* 0.18.6 — Harbour Square destinations are now the illustrated doorways themselves. */
body .kh-world-hotspot {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 1.4cqw 1.4cqw .7cqw .7cqw;
  opacity: 1;
  color: #174852;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
  transition: transform .14s ease, filter .14s ease;
}
body .kh-hotspot-garden { left: 15.3%; top: 28.4%; width: 9.5cqw; height: 15cqw; }
body .kh-hotspot-gamehall { left: 66.3%; top: 28.8%; width: 10cqw; height: 16cqw; }
body .kh-hotspot-shop { left: 86.6%; top: 30.2%; width: 10.5cqw; height: 17cqw; }
body .kh-world-hotspot::after {
  position: absolute;
  inset: .25cqw;
  border: .22cqw solid rgba(255, 248, 191, 0);
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 238, 120, 0), rgba(255, 209, 53, 0));
  box-shadow: inset 0 0 1.2cqw rgba(255, 226, 81, 0);
  content: "";
  pointer-events: none;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
body .kh-world-hotspot::before {
  content: "↑";
  position: absolute;
  z-index: 2;
  inset: auto auto 5% 50%;
  display: grid;
  place-items: center;
  width: clamp(19px, 2.6cqw, 25px);
  height: clamp(19px, 2.6cqw, 25px);
  border: 2px solid #fff9c8;
  border-radius: 50%;
  color: #174852;
  background: linear-gradient(180deg, #fff174, #ffc934);
  box-shadow: 0 2px 0 #c46b29, 0 4px 8px rgba(10, 61, 65, .24);
  font-size: clamp(11px, 1.4cqw, 14px);
  font-weight: 950;
  line-height: 1;
  transform: translateX(-50%);
  transition: transform .14s ease, filter .14s ease;
}
body .kh-world-hotspot span {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: auto;
  bottom: -1.35cqw;
  min-width: max-content;
  padding: .35cqw .65cqw;
  border: .18cqw solid #fff9c8;
  border-radius: .75cqw;
  color: #fff;
  background: #174f55;
  box-shadow: 0 .2cqw 0 rgba(11, 52, 52, .38);
  font-size: clamp(7px, .9cqw, 9px);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -.3cqw);
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
body .kh-world-hotspot small { display: none; }
body .kh-world-hotspot:hover,
body .kh-world-hotspot:focus-visible,
body .kh-world-hotspot.is-entering { opacity: 1; transform: translate(-50%, -50%) scale(1.025); }
body .kh-world-hotspot:hover::after,
body .kh-world-hotspot:focus-visible::after,
body .kh-world-hotspot.is-entering::after {
  border-color: rgba(255, 248, 191, .78);
  background: linear-gradient(180deg, rgba(255, 238, 120, .04), rgba(255, 209, 53, .15));
  box-shadow: inset 0 0 1.2cqw rgba(255, 226, 81, .28);
}
body .kh-world-hotspot:hover::before,
body .kh-world-hotspot:focus-visible::before { transform: translateX(-50%) translateY(-.25cqw); filter: brightness(1.06); }
body .kh-world-hotspot:hover span,
body .kh-world-hotspot:focus-visible span,
body .kh-world-hotspot.is-entering span { opacity: 1; transform: translate(-50%, 0); }
body .kh-world-hotspot.is-entering::before { content: "•••"; letter-spacing: -.08em; animation: kh-doorway-wait .7s ease-in-out infinite alternate; }
body .kh-world-hotspot:focus-visible { outline: .32cqw solid white; outline-offset: .12cqw; }

@keyframes kh-doorway-wait {
  from { filter: brightness(.92); transform: translateX(-50%) translateY(0); }
  to { filter: brightness(1.16); transform: translateX(-50%) translateY(-.25cqw); }
}

/* Grain, Maize and the weekly Lifestyle Shop exchange. */
body .kh-top-quacks {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 5px;
  align-items: center;
  min-width: 80px;
  padding: 5px 8px;
  border: 2px solid #d7ffff;
  border-radius: 12px;
  color: #123f4f;
  background: linear-gradient(180deg, #9df7f0, #45c8d0);
  box-shadow: 0 3px 0 #197d91;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}
body .kh-top-quacks > span {
  grid-row: 1 / 3;
  color: #fff;
  font-size: 16px;
  text-shadow: 0 1px 0 #197d91;
}
body .kh-top-quacks strong,
body .kh-top-quacks small { display: block; line-height: 1; text-align: left; }
body .kh-top-quacks strong { font-size: 12px; }
body .kh-top-quacks small { margin-top: 3px; font-size: 8px; text-transform: uppercase; }
body .kh-top-quacks:hover { transform: translateY(-1px); filter: brightness(1.05); }

body .kh-top-club {
  min-width: 62px;
  min-height: 42px;
  display: grid;
  grid-template-columns: 18px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 5px;
  padding: 5px 9px;
  border: 2px solid #fff1a8;
  border-radius: 12px;
  color: #573b00;
  background: linear-gradient(180deg, #ffe567, #ffc52f);
  box-shadow: 0 2px 0 #ba7714, inset 0 1px 0 rgba(255,255,255,.75);
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
body .kh-top-club-badge { grid-row: 1 / 3; display: grid; place-items: center; width: 22px; height: 22px; }
body .kh-top-club-badge img { display: block; width: 100%; height: 100%; object-fit: contain; filter: none; opacity: 1; transition: transform .15s ease; }
body .kh-top-club:hover .kh-top-club-badge img { transform: scale(1.05); }
body .kh-top-club strong,
body .kh-top-club small { display: block; line-height: 1; text-align: left; }
body .kh-top-club strong { font-size: 12px; }
body .kh-top-club small { margin-top: 3px; font-size: 8px; text-transform: uppercase; }
body .kh-top-club:hover { transform: translateY(-1px); filter: brightness(1.04); }

body .kh-club-dialog { width: min(570px, calc(100vw - 30px)); max-height: calc(100dvh - 24px); overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
body .kh-club-dialog > h2 { margin-bottom: 6px; }
body .kh-club-dialog > p { margin: 0; color: #557075; line-height: 1.45; }
body .kh-club-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  padding: 12px 14px;
  border: 2px solid #e3b12c;
  border-radius: 14px;
  background: #fff8d9;
}
body .kh-club-status-badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}
body .kh-club-status-badge img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .66;
  transition: filter .15s ease, opacity .15s ease;
}
body .kh-club-status div { min-width: 0; }
body .kh-club-status small,
body .kh-club-status strong,
body .kh-club-status p { display: block; }
body .kh-club-status small { color: #8c6a13; font-size: 9px; font-weight: 900; text-transform: uppercase; }
body .kh-club-status strong { margin: 2px 0 3px; color: #254b35; font-size: 16px; }
body .kh-club-status p { margin: 0; color: #526d62; font-size: 10px; line-height: 1.35; }
body .kh-club-status.is-active { border-color: #4a9d3c; background: #efffd1; }
body .kh-club-status.is-active .kh-club-status-badge img { filter: none; opacity: 1; }
body .kh-club-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
body .kh-club-benefits > span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #cfe0ae;
  border-radius: 11px;
  background: #f8ffe9;
}
body .kh-club-benefits > span > span { min-width: 0; }
body .kh-club-benefits strong,
body .kh-club-benefits small { display: block; }
body .kh-club-benefits strong { color: #0e7480; font-size: 13px; line-height: 1.1; }
body .kh-club-benefit-icon { display: grid; place-items: center; width: 42px; min-width: 42px; height: 34px; }
body .kh-club-benefit-icon img { width: 32px; height: 32px; object-fit: contain; }
body .kh-club-benefit-icon.is-membership img { filter: grayscale(1); opacity: .66; }
body .kh-club-dialog[data-state="active"] .kh-club-benefit-icon.is-membership img { filter: none; opacity: 1; }
body .kh-club-benefits small { margin-top: 2px; color: #476158; font-size: 8px; font-weight: 800; line-height: 1.2; }
body .kh-club-months { display: grid; gap: 5px; color: #31564d; font-size: 10px; font-weight: 900; }
body .kh-club-months select {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 2px solid #90bf69;
  border-radius: 10px;
  color: #19493e;
  background: #fffef0;
  font: inherit;
}
body .kh-club-order-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
body .kh-club-order-summary span { padding: 9px 11px; border-radius: 10px; background: #edf7e0; }
body .kh-club-order-summary small,
body .kh-club-order-summary strong { display: block; }
body .kh-club-order-summary small { color: #67806d; font-size: 8px; text-transform: uppercase; }
body .kh-club-order-summary strong { margin-top: 3px; color: #234d3c; font-size: 13px; }
body .kh-club-reward-note { padding: 9px 11px; border-radius: 10px; background: #f4ecd9; font-size: 9px !important; }
body .kh-club-payment-status { min-height: 18px; margin-top: 8px !important; color: #28566a !important; font-size: 10px !important; font-weight: 800; }
body .kh-club-buy {
  width: 100%;
  min-height: 43px;
  margin-top: 10px;
  border: 2px solid #bd7514;
  border-radius: 11px;
  color: #4b3100;
  background: linear-gradient(180deg, #ffe36b, #ffc238);
  box-shadow: 0 2px 0 #9b5b0b;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
body .kh-club-buy:disabled { cursor: default; filter: grayscale(.25); opacity: .65; }
body .kh-club-no-subscription { display: block; margin-top: 7px; color: #718078; font-size: 8px; text-align: center; }

@media (max-width: 720px) {
  body .kh-top-club { min-width: 0; padding: 5px 7px; }
  body .kh-top-club small { display: none; }
  body .kh-top-club-badge { grid-row: auto; }
  body .kh-club-benefits { grid-template-columns: 1fr; }
}

body .kh-wallet-balance-grid { display: grid; gap: 7px; }
body .kh-wallet-balance-card.is-quacks {
  border-color: #47c6cf;
  color: #174b59;
  background: linear-gradient(135deg, #e7fffb, #8fe7e6);
  box-shadow: 0 4px 0 #238697;
}
body .kh-wallet-balance-card.is-quacks > span { color: #e9ffff; background: #238697; }

body [data-shop-exchange] { display: none; }
body .kh-client[data-room="shop"] .kh-crumb-exchange-machine {
  position: absolute;
  z-index: 190;
  left: 92.5%;
  top: 72%;
  display: block;
  width: 11cqw;
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 0;
  outline: 0;
  background: url("../images/quackworld-crumb-exchange-machine-v1.webp?v=0.18.5-crumbs-quacks-r1") center / contain no-repeat;
  filter: drop-shadow(0 .7cqw .25cqw rgba(56, 80, 45, .3));
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  cursor: pointer;
}
body .kh-crumb-exchange-machine:hover,
body .kh-crumb-exchange-machine:focus-visible { filter: brightness(1.06) drop-shadow(0 .9cqw .35cqw rgba(56, 80, 45, .36)); transform: translate(-50%, -100%) scale(1.04); }
body .kh-crumb-exchange-machine:focus-visible { outline: .35cqw solid #fff9bd; outline-offset: .15cqw; border-radius: 1.4cqw; }
body .kh-crumb-exchange-machine.is-used { filter: saturate(.72) brightness(.9) drop-shadow(0 .7cqw .25cqw rgba(56, 80, 45, .24)); }
body .kh-hotel-exchange-light,
body .kh-hotel-exchange-slot { display: none; }
body .kh-hotel-exchange-screen {
  position: absolute;
  left: 50%;
  top: 34%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .32cqw;
  width: 62%;
  color: #f9f2b7;
  font-size: clamp(5px, .72cqw, 8px);
  line-height: 1;
  text-shadow: 0 1px 0 #082e3a;
  transform: translate(-50%, -50%);
}
body .kh-hotel-exchange-screen b { color: #ffd55b; }
body .kh-hotel-exchange-screen strong { color: #72f4ef; }
body .kh-hotel-exchange-screen i { color: white; font-style: normal; }
body .kh-crumb-exchange-machine > small {
  position: absolute;
  left: 50%;
  bottom: -1.25cqw;
  padding: .25cqw .55cqw;
  border: .2cqw solid #fff4b8;
  border-radius: 999px;
  color: #fff;
  background: #187b75;
  box-shadow: 0 .2cqw 0 #0e5759;
  font-size: clamp(5px, .66cqw, 8px);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

body .kh-weekly-exchange-dialog[open] { width: min(500px, calc(100% - 28px)); text-align: center; }
body .kh-weekly-exchange-dialog > p { max-width: 39em; margin: 3px auto 12px; color: #476b67; }
body .kh-weekly-exchange-balances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body .kh-weekly-exchange-balances > span {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border: 2px solid #b9dd76;
  border-radius: 12px;
  color: #315615;
  background: #f8ffe9;
}
body .kh-weekly-exchange-balances > span:last-child { border-color: #5fcbd1; color: #174b59; background: #e7fffb; }
body .kh-weekly-exchange-balances small { font-size: 8px; font-weight: 950; letter-spacing: .06em; text-transform: uppercase; }
body .kh-weekly-exchange-balances strong { font-size: 16px; }
body .kh-weekly-exchange-offer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 11px;
  margin: 12px 0;
  padding: 12px;
  border: 3px solid #1b6b63;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff5b7, #dffdf4);
  box-shadow: 0 4px 0 #83b35d;
}
body .kh-weekly-exchange-offer > span { display: grid; gap: 2px; }
body .kh-weekly-exchange-offer b { color: #174852; font-size: 28px; line-height: 1; }
body .kh-weekly-exchange-offer small { color: #497068; font-size: 9px; font-weight: 950; text-transform: uppercase; }
body .kh-weekly-exchange-offer i { color: #ef7b35; font-size: 26px; font-style: normal; font-weight: 950; }
body .kh-weekly-exchange-confirm {
  width: 100%;
  padding: 11px 14px;
  border: 3px solid #155e58;
  border-radius: 13px;
  color: white;
  background: linear-gradient(180deg, #42c8a2, #218a78);
  box-shadow: 0 4px 0 #155e58;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}
body .kh-weekly-exchange-confirm:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
body .kh-weekly-exchange-confirm:disabled { cursor: not-allowed; filter: grayscale(.65); opacity: .58; }
body .kh-weekly-exchange-status { display: block; min-height: 1.3em; margin-top: 11px; color: #22635b; font-size: 10px; }

@container kwaak-shell (max-width: 760px) {
  body .kh-top-quacks { min-width: 0; padding: 5px 7px; }
  body .kh-top-quacks small { display: none; }
  body .kh-top-quacks > span { grid-row: auto; }
  body .kh-client[data-room="shop"] .kh-crumb-exchange-machine { width: 12cqw; }
}

/* 0.18.1 — compact QuackTown player cards and persistent mottos. */
body .kh-guest[data-guest],
body .kh-remote-guest { pointer-events: auto; cursor: pointer; }

body .kh-player-card {
  position: absolute;
  z-index: 9080;
  right: clamp(9px, 1.5cqw, 14px);
  bottom: clamp(56px, 8.3cqw, 72px);
  width: clamp(258px, 37cqw, 318px);
  min-height: clamp(118px, 15.8cqw, 138px);
  display: grid;
  grid-template-columns: clamp(86px, 12cqw, 104px) minmax(0, 1fr);
  gap: clamp(7px, 1.1cqw, 11px);
  padding: clamp(8px, 1.2cqw, 11px);
  overflow: visible;
  border: 3px solid #f9f4bc;
  border-radius: 17px 13px 19px 14px;
  color: #234f3a;
  background:
    linear-gradient(90deg, rgba(255, 215, 65, .22) 0 32%, transparent 32%),
    linear-gradient(155deg, #fffbe1, #edf8ca 76%);
  box-shadow: 0 0 0 3px #2f872c, 0 5px 0 #155d31, 0 12px 23px rgba(4, 45, 46, .27);
  font-family: inherit;
  transform-origin: right bottom;
  animation: kh-player-card-in .18s cubic-bezier(.2, .86, .34, 1.1);
}
body .kh-player-card[hidden] { display: none; }
body .kh-player-card::before {
  content: "";
  position: absolute;
  left: 33%;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 999px;
  background: repeating-linear-gradient(to bottom, #efb837 0 5px, transparent 5px 9px);
  opacity: .58;
}
body .kh-player-card-close {
  position: absolute;
  z-index: 5;
  right: -7px;
  top: -9px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 2px solid #fff4a4;
  border-radius: 50%;
  color: #5d4216;
  background: #ffd64a;
  box-shadow: 0 2px 0 #c9782e;
  font: 950 17px/1 inherit;
  cursor: pointer;
}
body .kh-player-card-stage {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border: 2px solid #5ca840;
  border-radius: 13px 10px 15px 11px;
  background: linear-gradient(#8be0ed 0 55%, #9cd873 55%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .52);
}
body .kh-player-card-platform {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 7px;
  height: 17px;
  border: 2px solid #28734f;
  border-radius: 50%;
  background: #6fbd67;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .28), 0 2px 0 rgba(27, 92, 57, .35);
}
body .kh-player-card-stage .kh-profile-kwaker {
  width: clamp(76px, 10.7cqw, 92px);
  margin: 0 0 5px;
  filter: drop-shadow(0 3px 0 rgba(36, 99, 46, .18));
}
body .kh-player-card-stage .kh-profile-kwaker > .kh-avatar-badge { transform: translate(-50%, 10px) scale(.72); }
body .kh-player-card-copy {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(26px, auto) 44px minmax(32px, auto);
  gap: 3px;
  padding: 3px 2px 0 3px;
}
body .kh-player-card-heading { min-width: 0; display: flex; align-items: center; gap: 5px; padding-right: 14px; }
body .kh-player-card-heading strong {
  min-width: 0;
  overflow: hidden;
  color: #17562f;
  font-size: clamp(14px, 2cqw, 17px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-player-card-heading span {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid #2c7c45;
  border-radius: 999px;
  color: white;
  background: #48a969;
  font-size: 6px;
  font-weight: 950;
  letter-spacing: .08em;
}
body .kh-player-card-heading span.is-self { color: #6b4514; border-color: #d9972e; background: #ffdf59; }
body .kh-player-card-copy > p {
  display: -webkit-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #496b51;
  font-size: clamp(8px, 1.15cqw, 10px);
  font-weight: 750;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
body .kh-player-card-copy > p.is-empty { color: #879a82; font-style: italic; font-weight: 700; }
body .kh-player-card-badges {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: visible;
}
body .kh-player-card-badge {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: #6f4b17;
  background: transparent;
  outline: none;
}
body .kh-player-card-badge-art {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid #fffbe3;
  border-radius: 10px;
  color: white;
  background: linear-gradient(145deg, #58b83c 0 48%, #34892a 49% 100%);
  box-shadow: 0 2px 0 rgba(35, 107, 34, .72);
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
}
body .kh-player-card-badge-art.has-image {
  border: 0;
  border-radius: 0;
  background: var(--kh-card-badge-image, var(--kh-badge-image)) center / 40px 40px no-repeat;
  box-shadow: none;
  transform: translateZ(0);
  backface-visibility: hidden;
}
body .kh-player-card-badge:is([data-tone="staff"], [data-tone="moderator"], [data-tone="guide"], [data-tone="ambassador"], [data-tone="npc"]) .kh-player-card-badge-art.has-image {
  image-rendering: auto;
}
body .kh-player-card-badge[hidden] { display: none; }
body .kh-player-card-badge[data-tone="moderator"] .kh-player-card-badge-art:not(.has-image) { border-color: #f0e9ff; background: linear-gradient(145deg, #8e6bd3, #563b9b); }
body .kh-player-card-badge-tooltip {
  position: absolute;
  z-index: 12;
  left: 0;
  bottom: calc(100% + 7px);
  width: min(168px, 54cqw);
  padding: 7px 9px 8px;
  visibility: hidden;
  border: 2px solid #f9f4bc;
  border-radius: 10px 8px 11px 9px;
  color: #315c3d;
  background: #fffce7;
  box-shadow: 0 0 0 2px #2f872c, 0 4px 0 #155d31, 0 9px 16px rgba(4, 45, 46, .22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(.97);
  transform-origin: left bottom;
  transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s;
}
body .kh-player-card-badge:nth-child(n + 2) .kh-player-card-badge-tooltip {
  right: 0;
  left: auto;
  transform-origin: right bottom;
}
body .kh-player-card-badge:hover .kh-player-card-badge-tooltip,
body .kh-player-card-badge:focus-visible .kh-player-card-badge-tooltip {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}
body .kh-player-card-badge:focus-visible .kh-player-card-badge-art {
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 2px #2e8838);
}
body .kh-player-card-badge-tooltip strong,
body .kh-player-card-badge-tooltip span { display: block; }
body .kh-player-card-badge-tooltip strong { margin-bottom: 4px; color: #17562f; font-size: 10px; font-weight: 1000; line-height: 1.08; }
body .kh-player-card-badge-tooltip span { font-size: 8px; font-weight: 750; line-height: 1.25; }
body .kh-player-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; align-self: end; }
body .kh-player-card[data-own-card="true"] .kh-player-card-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body .kh-player-card-actions .kh-player-card-action-icon { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; }
body .kh-player-card-actions .kh-player-card-action-icon img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
@media (max-width: 760px) {
  body .kh-player-card-actions .kh-player-card-action-icon { width: 13px; height: 13px; flex-basis: 13px; }
}
body .kh-player-card-actions button {
  min-width: 0;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 6px;
  border: 2px solid #27733c;
  border-radius: 9px 7px 10px 8px;
  color: white;
  background: linear-gradient(#50b451, #2e8a39);
  box-shadow: 0 2px 0 #175d31;
  font-family: inherit;
  font-size: clamp(8px, 1.05cqw, 9px);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-player-card-actions button[hidden] { display: none; }
body .kh-player-card-actions button > span { flex: 0 0 auto; }
body .kh-player-card-actions button > b { min-width: 0; overflow: hidden; font: inherit; text-overflow: ellipsis; white-space: nowrap; }
body .kh-player-card-actions button:first-child { color: #5f4219; border-color: #d7902d; background: linear-gradient(#ffec78, #ffd13e); box-shadow: 0 2px 0 #bd712c; }
body .kh-player-card-actions button:disabled { cursor: not-allowed; filter: grayscale(.6); opacity: .45; }
body .kh-player-card-actions button:not(:disabled):active { transform: translateY(2px); box-shadow: none; }
body .kh-player-card[data-card-kind="npc"] .kh-player-card-heading span { border-color: #1f6f68; background: #32948b; }
body .kh-player-card[data-card-kind="npc"] .kh-player-card-actions button[data-player-card-action="npc"] {
  width: 100%;
  color: #5f4219;
  border-color: #d7902d;
  background: linear-gradient(#ffec78, #ffd13e);
  box-shadow: 0 2px 0 #bd712c;
}
/* Only a lone action spans both columns; Talk and Edit share one row. */
body .kh-player-card[data-card-kind="npc"] .kh-player-card-actions:has([data-player-card-action="edit-npc"][hidden]) button[data-player-card-action="npc"],
body .kh-player-card[data-card-kind="npc"] .kh-player-card-actions:has([data-player-card-action="npc"][hidden]) button[data-player-card-action="edit-npc"] {
  grid-column: 1 / -1;
}
body .kh-player-card[data-card-kind="npc"] .kh-player-card-actions button[data-player-card-action="edit-npc"] {
  color: white;
  border-color: #27733c;
  background: linear-gradient(#50b451, #2e8a39);
  box-shadow: 0 2px 0 #175d31;
}

/* 0.18.2 — NPC info stands, admin NPC identity editor and independent staff head effects. */
.kh-profile-kwaker[data-skin="lola_arcade"] {
  --kh-avatar-profile: url("../images/lola-motion-front-v1.webp");
}
.kh-profile-kwaker[data-skin="pip_guide"] {
  --kh-avatar-profile: url("../images/pip-motion-front-v5.webp?v=0.18.9-pip-stable-r2");
}
.kh-profile-kwaker[data-skin="lotte_hotel"] {
  --kh-avatar-profile: url("../images/lotte-motion-front-v2.webp?v=0.15.5-lotte-roaming-r2");
}
body .kh-npc-editor-dialog[open] { width: min(430px, calc(100% - 28px)); }
body .kh-npc-editor-dialog > p { margin: 2px 0 10px; color: #527157; font-size: 10px; font-weight: 750; }
body .kh-npc-editor-form { display: grid; gap: 9px; }
body .kh-npc-editor-form label { display: grid; gap: 4px; color: #2e6337; font-size: 9px; font-weight: 950; }
body .kh-npc-editor-form input,
body .kh-npc-editor-form select {
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 2px solid #8cbd66;
  border-radius: 10px 8px 11px 9px;
  color: #244c36;
  background: #fffef1;
  font: 850 10px/1.2 inherit;
}
body .kh-npc-editor-form input:focus,
body .kh-npc-editor-form select:focus { outline: 3px solid rgba(52, 154, 164, .35); outline-offset: 1px; }
body .kh-npc-editor-form > small { min-height: 12px; color: #a04d2c; font-size: 8px; font-weight: 850; }
body .kh-npc-editor-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body .kh-npc-editor-actions button {
  min-height: 34px;
  border: 2px solid #2c733b;
  border-radius: 10px 8px 11px 9px;
  color: #315d3a;
  background: #edf7d7;
  box-shadow: 0 2px 0 #9bbc67;
  font: 950 9px/1 inherit;
  cursor: pointer;
}
body .kh-npc-editor-actions button[type="submit"] { color: #5d4318; border-color: #d48b2a; background: #ffdc52; box-shadow-color: #b86b26; }
body .kh-npc-editor-actions button:disabled { cursor: wait; opacity: .5; }

body .kh-motto-editor {
  flex: 0 0 37px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  margin: 0 0 2px;
  padding: 5px 7px;
  border: 2px solid #9fc969;
  border-radius: 11px 8px 12px 9px;
  background: #f4fbdc;
}
body .kh-motto-editor label { color: #2d6d32; font-size: 9px; font-weight: 950; }
body .kh-motto-editor input {
  min-width: 0;
  height: 25px;
  padding: 4px 8px;
  border: 2px solid #85b85c;
  border-radius: 8px;
  color: #294f39;
  background: white;
  font: 800 9px/1 inherit;
}
body .kh-motto-editor > span { color: #688061; font-size: 7px; font-weight: 900; }
body .kh-motto-editor button { height: 25px; padding: 3px 10px; border: 2px solid #28743a; border-radius: 8px; color: white; background: #3a9840; box-shadow: 0 2px 0 #1c602e; font: 900 8px/1 inherit; cursor: pointer; }
body .kh-motto-editor button:disabled { cursor: not-allowed; opacity: .45; }
body .kh-motto-editor small { grid-column: 2 / -1; min-height: 0; margin-top: -4px; color: #4e7253; font-size: 7px; line-height: 1; }
body .kh-public-profile-motto {
  min-height: 29px;
  margin: 5px 0 6px !important;
  padding: 6px 9px;
  border: 2px solid #a1c96d;
  border-radius: 10px 7px 11px 8px;
  color: #315d3a !important;
  background: #f3fbd9;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
}
body .kh-public-profile-motto.is-empty { color: #7b9078 !important; font-style: italic; }

@keyframes kh-player-card-in {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@container kwaak-shell (max-width: 610px) {
  body .kh-player-card { right: 7px; bottom: 47px; width: min(270px, calc(100% - 14px)); min-height: 136px; grid-template-columns: 82px minmax(0, 1fr); padding: 7px; }
  body .kh-player-card-stage .kh-profile-kwaker { width: 73px; }
  body .kh-player-card-copy { grid-template-rows: auto minmax(23px, auto) 42px minmax(27px, auto); }
  body .kh-player-card-actions button { height: 26px; }
  body .kh-motto-editor { grid-template-columns: auto minmax(0, 1fr) auto; }
  body .kh-motto-editor > span { display: none; }
  body .kh-motto-editor small { grid-column: 2 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  body .kh-player-card { animation: none; }
}

body .kh-colour-quack-host { top:42%; }
body .kh-colour-quack-choices > button {
  width:108px;
  height:68px;
  top:76%;
}
body .kh-colour-quack-choices > button:nth-child(1) { left:26%; top:76%; }
body .kh-colour-quack-choices > button:nth-child(2) { left:42%; top:76%; }
body .kh-colour-quack-choices > button:nth-child(3) { left:58%; top:76%; }
body .kh-colour-quack-choices > button:nth-child(4) { left:74%; top:76%; }

/* 0.17 — Quack Beat, a smooth four-lane rhythm cabinet. */
body .kh-quack-beat-dialog[open] {
  display: flex;
  flex-direction: column;
  width: 760px;
  height: 507px;
  overflow: hidden;
  border-color: #5c3a86;
  background: #fffdf0;
  box-shadow: 0 0 0 4px #fff3a4, 0 0 0 8px #285b70, 0 13px 34px rgba(30, 38, 62, .34);
}
body .kh-quack-beat-heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 8px; padding: 0 54px 7px 0; border-bottom: 3px solid #f1c645; }
body .kh-quack-beat-heading h2 { margin: 1px 0 0; color: #55337b; font-size: 28px; line-height: 1; }
body .kh-quack-beat-career { display: grid; grid-template-columns: auto auto; align-items: center; gap: 7px; }
body .kh-quack-beat-career span { display: grid; grid-template-columns: auto auto; align-items: center; gap: 7px; padding: 7px 9px; border: 2px solid #b68ad5; border-radius: 12px 9px 13px 10px; color: #5b4275; background: #fff8e9; box-shadow: 0 2px 0 rgba(94,55,132,.18); }
body .kh-quack-beat-career small { font-size: 8px; font-weight: 950; letter-spacing: .06em; text-transform: uppercase; }
body .kh-quack-beat-career strong { color: #7e45a0; font-size: 15px; }
body .kh-quack-beat { flex: 1 1 auto; min-height: 0; display: grid; grid-template-rows: 47px minmax(0,1fr) 58px; gap: 7px; }
body .kh-quack-beat-hud { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
body .kh-quack-beat-hud > span { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 7px 10px; border: 2px solid #cda6df; border-radius: 11px 14px 10px 13px; color: #675274; background: linear-gradient(155deg,#fffef4,#f5eafa); box-shadow: 0 2px 0 rgba(95,53,128,.12); }
body .kh-quack-beat-hud small { font-size: 8px; font-weight: 950; letter-spacing: .07em; text-transform: uppercase; }
body .kh-quack-beat-hud strong { color: #714091; font-size: 15px; line-height: 1; }
body .kh-quack-beat-board { position: relative; contain: layout paint; min-width: 0; min-height: 0; overflow: hidden; isolation: isolate; border: 4px solid #294d6c; border-radius: 19px 16px 20px 17px; outline: none; background: #302c62; box-shadow: 0 0 0 2px #f5d969, inset 0 0 0 3px rgba(255,255,255,.13), inset 0 -22px 34px rgba(19,13,53,.45); }
body .kh-quack-beat-board:focus-visible { outline: 3px solid var(--kh-ui-yellow); outline-offset: 2px; }
body .kh-quack-beat-stage { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(circle at 50% 15%,rgba(255,225,90,.22),transparent 34%), linear-gradient(145deg,#283a6d 0 47%,#59316e 48% 100%); }
body .kh-quack-beat-stage::before { content: ""; position: absolute; inset: 0; opacity: .38; background-image: radial-gradient(circle,rgba(255,255,255,.55) 0 1px,transparent 1.5px); background-size: 31px 27px; animation: kh-beat-stars 7s linear infinite; }
body .kh-quack-beat-spotlight { position: absolute; z-index: 1; top: -12%; width: 34%; height: 115%; opacity: .23; background: linear-gradient(to bottom,rgba(255,238,112,.85),transparent 75%); clip-path: polygon(42% 0,58% 0,100% 100%,0 100%); transform-origin: 50% 0; animation: kh-beat-light 2.8s ease-in-out infinite alternate; }
body .kh-quack-beat-spotlight.is-left { left: 1%; transform: rotate(7deg); }
body .kh-quack-beat-spotlight.is-right { right: 1%; animation-delay: -1.3s; transform: rotate(-7deg); }
body .kh-quack-beat-speaker { position: absolute; z-index: 3; bottom: 13px; width: 76px; height: 128px; padding: 12px; border: 4px solid #162f4b; border-radius: 15px 12px 18px 13px; background: linear-gradient(145deg,#31526d,#172d4c); box-shadow: inset 0 0 0 3px rgba(255,255,255,.1),0 6px 0 rgba(14,21,45,.5); }
body .kh-quack-beat-speaker.is-left { left: 16px; transform: rotate(-2deg); }
body .kh-quack-beat-speaker.is-right { right: 16px; transform: rotate(2deg); }
body .kh-quack-beat-speaker i { display: block; width: 44px; height: 44px; margin: 0 auto 8px; border: 5px solid #15263e; border-radius: 50%; background: radial-gradient(circle,#f4d34c 0 14%,#764ca0 15% 39%,#213b58 40%); box-shadow: 0 0 0 2px #63798b; }
body .kh-quack-beat-speaker i:last-child { width: 31px; height: 31px; background: radial-gradient(circle,#ef7459 0 15%,#513b80 16% 39%,#213b58 40%); }
body .kh-quack-beat-lanes { position: absolute; z-index: 4; top: 14px; bottom: 13px; left: 50%; width: 430px; display: grid; grid-template-columns: repeat(4,1fr); overflow: hidden; border: 3px solid rgba(255,246,172,.78); border-radius: 17px 14px 18px 15px; background: rgba(21,23,66,.72); box-shadow: inset 0 -20px 36px rgba(104,52,127,.42),0 6px 0 rgba(14,20,52,.52); transform: translateX(-50%); }
body .kh-quack-beat-lanes > i { border-right: 2px solid rgba(255,255,255,.14); background: linear-gradient(to bottom,rgba(239,91,83,.08),rgba(239,91,83,.2)); }
body .kh-quack-beat-lanes > i:nth-child(2) { background: linear-gradient(to bottom,rgba(255,207,56,.07),rgba(255,207,56,.19)); }
body .kh-quack-beat-lanes > i:nth-child(3) { background: linear-gradient(to bottom,rgba(52,192,204,.07),rgba(52,192,204,.19)); }
body .kh-quack-beat-lanes > i:nth-child(4) { border-right: 0; background: linear-gradient(to bottom,rgba(171,85,199,.07),rgba(171,85,199,.21)); }
body .kh-quack-beat-notes { position: absolute; z-index: 6; inset: 0; pointer-events: none; }
body .kh-quack-beat-note { --beat-colour:#ef6956; position: absolute; left: var(--beat-x); top: var(--beat-y); width: 48px; height: 34px; display: grid; place-items: center; border: 3px solid #fff5b5; border-radius: 52% 45% 49% 43%; color: white; background: var(--beat-colour); box-shadow: inset 0 4px 0 rgba(255,255,255,.38),0 4px 0 rgba(12,25,54,.5),0 0 12px color-mix(in srgb,var(--beat-colour) 60%,transparent); font-size: 18px; transform: translate(-50%,-50%) rotate(var(--beat-turn,-2deg)); will-change: top,opacity,transform; }
body .kh-quack-beat-note[data-lane="1"] { --beat-colour:#f2b82f; --beat-turn:2deg; color:#704712; }
body .kh-quack-beat-note[data-lane="2"] { --beat-colour:#2eb8c5; --beat-turn:-1deg; }
body .kh-quack-beat-note[data-lane="3"] { --beat-colour:#a656c2; --beat-turn:2deg; }
body .kh-quack-beat-note.is-golden { --beat-colour:#ffd43f; color:#67430c; box-shadow: inset 0 4px 0 #fff7b7,0 4px 0 #9f5d17,0 0 17px #ffe259; }
body .kh-quack-beat-note.is-hit { opacity: 0; transform: translate(-50%,-50%) scale(1.65) rotate(8deg); transition: opacity .18s ease,transform .18s ease; }
body .kh-quack-beat-note.is-missed { opacity: .12; }
body .kh-quack-beat-hit-line { position: absolute; z-index: 5; left: 0; right: 0; bottom: 34px; height: 8px; border-top: 3px solid #fff7a7; border-bottom: 3px solid rgba(255,255,255,.38); background: rgba(255,214,65,.42); box-shadow: 0 0 13px #ffe95c; }
body .kh-quack-beat-lanes.is-pulse-0::after,
body .kh-quack-beat-lanes.is-pulse-1::after,
body .kh-quack-beat-lanes.is-pulse-2::after,
body .kh-quack-beat-lanes.is-pulse-3::after { content:""; position:absolute; z-index:7; left:var(--pulse-left,0); bottom:25px; width:25%; height:52px; background:radial-gradient(ellipse,rgba(255,250,174,.74),transparent 68%); animation:kh-beat-pulse .22s ease-out; pointer-events:none; }
body .kh-quack-beat-lanes.is-pulse-1::after { --pulse-left:25%; } body .kh-quack-beat-lanes.is-pulse-2::after { --pulse-left:50%; } body .kh-quack-beat-lanes.is-pulse-3::after { --pulse-left:75%; }
body .kh-quack-beat-status { position:absolute; z-index:10; left:50%; top:23px; min-width:142px; padding:5px 12px; border:2px solid #fff0a1; border-radius:999px; color:#56326e; background:rgba(255,252,224,.95); box-shadow:0 3px 0 rgba(21,26,61,.46); font-size:9px; text-align:center; transform:translateX(-50%); }
body .kh-quack-beat-panel { position:absolute; z-index:12; left:50%; top:50%; width:min(590px,calc(100% - 34px)); min-height:116px; display:grid; grid-template-columns:62px minmax(0,1fr) auto; gap:13px; align-items:center; padding:14px 15px; border:3px solid #5b397f; border-radius:18px 14px 19px 15px; color:#56426b; background:rgba(255,254,239,.98); box-shadow:0 0 0 3px rgba(255,226,102,.9),0 6px 0 #34234f,0 15px 30px rgba(20,18,54,.36); transform:translate(-50%,-50%) rotate(.1deg); }
body .kh-quack-beat-panel[hidden] { display:none; }
body .kh-quack-beat-panel-icon { width:60px; height:60px; display:grid; place-items:center; border:3px solid #fff0a1; border-radius:52% 45% 50% 43%; color:white; background:linear-gradient(145deg,#ec6b55 0 49%,#8651ad 50% 100%); box-shadow:0 4px 0 #493065; font-size:28px; transform:rotate(-5deg); }
body .kh-quack-beat-panel small { color:#715f79; font-size:8px; font-weight:950; letter-spacing:.08em; text-transform:uppercase; }
body .kh-quack-beat-panel h3 { margin:2px 0 4px; color:#623985; font-size:20px; line-height:1; }
body .kh-quack-beat-panel p { margin:0; color:#665c69; font-size:9px; line-height:1.3; }
body .kh-quack-beat-panel p strong { color:#82459f; font-size:13px; }
body .kh-quack-beat-panel p b { color:#a65f17; }
body .kh-quack-beat-panel [data-quack-beat-result-progress] { display:inline-block; margin-top:5px; padding:3px 7px; border-radius:999px; color:#583e70; background:#eee0f5; font-size:9px; font-weight:900; }
body .kh-quack-beat-panel > button { min-width:112px; padding:10px 12px; border:2px solid #fff1a8; border-radius:12px 9px 13px 10px; color:#52380f; background:var(--kh-ui-yellow); box-shadow:0 3px 0 var(--kh-ui-orange); font-size:10px; font-weight:950; transition:transform .12s ease,filter .12s ease,box-shadow .12s ease; }
body .kh-quack-beat-panel > button:hover { filter:brightness(1.04); transform:translateY(-1px) rotate(.5deg); }
body .kh-quack-beat-panel > button:active { transform:translateY(2px); box-shadow:0 1px 0 var(--kh-ui-orange); }
body .kh-quack-beat-panel > button:disabled { cursor:default; filter:grayscale(.35); opacity:.48; transform:none; box-shadow:0 2px 0 #ba8a38; }
body .kh-quack-beat-controls { display:grid; grid-template-rows:42px 12px; gap:2px; place-items:center; }
body .kh-quack-beat-pad { display:grid; grid-template-columns:repeat(4,52px); gap:7px; align-items:center; justify-content:center; }
body .kh-quack-beat-pad > button { width:52px; height:42px; display:grid; grid-template-columns:1fr auto; place-items:center; padding:4px 7px; border:2px solid #7b467e; border-radius:12px 9px 13px 10px; color:white; background:#e96855; box-shadow:0 3px 0 #693b6b; font:inherit; font-size:14px; font-weight:950; }
body .kh-quack-beat-pad > button:nth-of-type(2) { color:#6c480d; background:#f1bd35; } body .kh-quack-beat-pad > button:nth-of-type(3) { background:#2eb8c5; } body .kh-quack-beat-pad > button:nth-of-type(4) { background:#9f54ba; }
body .kh-quack-beat-pad > button small { font-size:8px; }
body .kh-quack-beat-pad > button:active:not(:disabled),body .kh-quack-beat-pad > button.is-pressed { transform:translateY(2px) scale(.97); box-shadow:0 1px 0 #573257; filter:brightness(1.13); }
body .kh-quack-beat-pad > button:disabled { cursor:default; opacity:.48; filter:grayscale(.35); }
body .kh-quack-beat-controls p { display:flex; align-items:center; justify-content:center; gap:5px; margin:0; color:#5d5062; line-height:1; text-align:center; }
body .kh-quack-beat-controls strong { font-size:8px; }
body .kh-quack-beat-controls p span { font-size:7px; }
@keyframes kh-beat-stars { to { background-position:31px 27px; } }
@keyframes kh-beat-light { from { opacity:.14; } to { opacity:.32; } }
@keyframes kh-beat-pulse { from { opacity:1; transform:scale(.75); } to { opacity:0; transform:scale(1.2); } }
@media (prefers-reduced-motion:reduce) { body .kh-quack-beat-stage::before,body .kh-quack-beat-spotlight { animation:none!important; } body .kh-quack-beat-note { transition-duration:.01ms!important; } }

/* 0.13 — compact achievement book and a separate player-badge layer. */
body:has(> .kh-client.has-shell-overlay) { overflow: hidden; }
.kh-avatar-badge[data-achievement-badge] {
  display: none !important;
}
.kh-avatar-badge[data-team-badge] {
  z-index: 9;
  isolation: isolate;
  filter: none;
}
.kh-avatar-badge[data-team-badge][data-badge-tone="staff"],
.kh-avatar-badge[data-team-badge][data-badge-tone="moderator"],
.kh-avatar-badge[data-team-badge][data-badge-tone="ambassador"],
.kh-avatar-badge[data-team-badge][data-badge-tone="guide"] {
  top: -48px;
  width: 40px;
  height: 40px;
  transform: translateX(-50%) scale(calc(1 / var(--guest-scale, 1)));
  transform-origin: center bottom;
  border: 0;
  border-radius: 0;
  color: transparent;
  box-shadow: none;
  text-shadow: none;
  background: none;
  image-rendering: auto;
}
.kh-avatar-badge[data-team-badge]::before {
  content: none;
  display: none;
}
.kh-avatar-badge[data-team-badge] > .kh-team-badge-core {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 40px 40px;
  image-rendering: auto;
  filter: none;
  animation: none;
}
.kh-avatar-badge[data-team-badge][data-badge-tone="staff"] > .kh-team-badge-core {
  background-image: url("../data/badges/ADM.webp?v=0.28.0-dynamic-badges-r1");
}
.kh-avatar-badge[data-team-badge][data-badge-tone="moderator"] > .kh-team-badge-core {
  background-image: url("../data/badges/MOD.webp?v=0.28.0-dynamic-badges-r1");
}
.kh-avatar-badge[data-team-badge][data-badge-tone="ambassador"] > .kh-team-badge-core,
.kh-avatar-badge[data-team-badge][data-badge-tone="guide"] > .kh-team-badge-core {
  background-image: url("../data/badges/GUI.webp?v=0.28.0-dynamic-badges-r1");
}
.kh-team-badge-layer > .kh-stage-team-badge {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  transform: none !important;
  transform-origin: initial;
  contain: layout style paint;
  will-change: left, top;
}
.kh-team-badge-layer > .kh-stage-team-badge > .kh-team-badge-core {
  image-rendering: auto;
}
@media (prefers-reduced-motion: reduce) {
  .kh-avatar-badge[data-team-badge]::before { display: none; }
}
.kh-guest:has(> .kh-avatar-badge[data-team-badge]) > .kh-speech { bottom: calc(100% + 67px); }
.kh-guest[data-has-team-badge="true"] > .kh-speech { bottom: calc(100% + 67px); }

body .kh-profile-overview { grid-template-rows: minmax(0, 1fr) 124px; }
body .kh-open-badgebook {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  width: 100%;
  margin-top: 6px;
  padding: 5px 7px;
  border: 2px solid #327d28;
  border-radius: 9px 7px 10px 8px;
  color: #31552c;
  background: linear-gradient(160deg, #fff7bd, #e8f7c9);
  box-shadow: 0 2px 0 #9ac76c;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
body .kh-open-badgebook > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px 5px 8px 6px;
  color: #69420d;
  background: #ffd94c;
  box-shadow: inset 0 0 0 2px #fff8ca, 0 2px 0 #bc7620;
  font-size: 13px;
}
body .kh-open-badgebook > strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
body .kh-open-badgebook > small {
  padding: 3px 6px;
  border-radius: 999px;
  color: white;
  background: #34892a;
  font-size: 7px;
  font-weight: 950;
}
body .kh-open-badgebook:hover { filter: brightness(1.03); transform: translateY(-1px); }
body .kh-open-badgebook:focus-visible { outline: 3px solid #2b82a2; outline-offset: 2px; }

body .kh-achievements-dialog[open] {
  display: flex;
  flex-direction: column;
  width: min(940px, calc(100vw - 48px));
  height: min(650px, calc(100vh - var(--kh-shell-head) - 24px));
  min-height: 0;
  max-height: calc(100vh - var(--kh-shell-head) - 24px);
  overflow: hidden;
}
body .kh-achievements-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 5px 0 10px;
  padding: 0 64px 9px 0;
  border-bottom: 3px solid var(--kh-ui-line);
}
body .kh-achievements-heading h2 { margin: 0; color: var(--kh-ui-green-ink); font-size: 28px; line-height: 1; }
body .kh-achievements-heading p { margin: 5px 0 0; color: #526b52; font-size: 10px; line-height: 1.25; }
body .kh-achievements-total {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  min-width: 76px;
  padding: 7px 10px;
  border: 2px solid #74b54a;
  border-radius: 12px 9px 13px 10px;
  color: #31552c;
  background: #f3fbd8;
  box-shadow: 0 2px 0 #b9d986;
}
body .kh-achievements-total strong { font-size: 17px; line-height: 1; }
body .kh-achievements-total small { margin-top: 3px; font-size: 7px; font-weight: 950; text-transform: uppercase; }
body .kh-achievements-content {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(190px, .62fr) minmax(0, 1.85fr);
  gap: 14px;
}
body .kh-selected-badge-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  align-content: start;
  padding: 13px 12px 12px;
  overflow: hidden;
  border: 3px solid #83bb55;
  border-radius: 17px 13px 18px 14px;
  color: #31552c;
  background: linear-gradient(165deg, #fffdf1, #eaf6d2);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75), 0 3px 0 #a4c979;
  text-align: center;
}
body .kh-selected-badge-previews {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-bottom: 10px;
}
body .kh-selected-badge-preview,
body .kh-achievement-badge-art {
  display: grid;
  place-items: center;
  color: transparent;
  background-color: transparent;
  background-image: var(--kh-badge-image, linear-gradient(145deg, #ffd94c, #4ca637));
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  font-size: 0;
}
body .kh-selected-badge-preview {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  filter: grayscale(1) opacity(.45);
}
body .kh-selected-badge-card:not(.has-selected-badge) .kh-selected-badge-preview {
  border: 2px dashed #9fc477;
  border-radius: 50%;
  color: #5f8f43;
  background: radial-gradient(circle at 36% 28%, #fffbd2 0 12%, transparent 13%), linear-gradient(145deg, #edf7d7, #d5eab8);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .58);
  filter: none;
  font-size: 14px;
  text-shadow: 0 2px 0 white;
}
body .kh-selected-badge-card.has-selected-badge .kh-selected-badge-preview { filter: none; }
body .kh-selected-badge-card > div { align-self: start; min-width: 0; }
body .kh-selected-badge-card small { display: block; color: #66805d; font-size: 9px; font-weight: 950; text-transform: uppercase; }
body .kh-selected-badge-card strong { display: block; margin-top: 6px; font-size: 16px; line-height: 1.15; }
body .kh-selected-badge-card p { margin: 8px 0 0; color: #5d7259; font-size: 10px; line-height: 1.4; }
body .kh-selected-badge-card > button {
  align-self: end;
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 2px solid #8c4c22;
  border-radius: 9px 7px 10px 8px;
  color: #723b1b;
  background: #fff0d3;
  box-shadow: 0 2px 0 #d59a58;
  font: inherit;
  font-size: 9px;
  font-weight: 950;
  cursor: pointer;
}
body .kh-selected-badge-card > button:disabled { cursor: default; filter: grayscale(.55); opacity: .5; }
body .kh-achievement-collection {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  min-width: 0;
  overflow: hidden;
}
body .kh-achievement-list {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(118px, auto);
  gap: 10px;
  align-content: start;
  padding: 2px 10px 10px 2px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #62b735 #e5efce;
}
body .kh-achievement-list::-webkit-scrollbar { width: 8px; height: 8px; }
body .kh-achievement-list::-webkit-scrollbar-track { border-radius: 999px; background: #e5efce; }
body .kh-achievement-list::-webkit-scrollbar-thumb { border: 2px solid #e5efce; border-radius: 999px; background: #62b735; }
body .kh-achievement-card {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px 10px;
  min-width: 0;
  min-height: 118px;
  padding: 10px 12px;
  border: 2px solid #8abf60;
  border-radius: 13px 10px 14px 11px;
  color: #31552c;
  background: linear-gradient(160deg, #fffef5, #eef8dd);
  box-shadow: 0 2px 0 #bddb94;
}
body .kh-achievement-card.is-selected {
  border-color: #d58a22;
  background: linear-gradient(160deg, #fff8c8, #eaf8cf);
  box-shadow: 0 2px 0 #c9821e, inset 0 0 0 2px #fff7b0;
}
body .kh-achievement-card.is-locked { color: #425c3f; background: linear-gradient(160deg, #fbfcf3, #eef2e3); }
body .kh-achievement-badge-art {
  grid-row: 1 / -1;
  align-self: center;
  width: 48px;
  height: 48px;
}
body .kh-achievement-card.is-locked .kh-achievement-badge-art { filter: grayscale(1) opacity(.5); }
body .kh-achievement-card-copy { min-width: 0; }
body .kh-achievement-card-copy > strong { display: block; overflow: hidden; font-size: 12px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
body .kh-achievement-card-copy > p {
  display: -webkit-box;
  margin: 4px 0 6px;
  overflow: hidden;
  color: #60745e;
  font-size: 10px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
body .kh-achievement-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; }
body .kh-achievement-progress > span {
  height: 8px;
  overflow: hidden;
  border: 1px solid #9dbe75;
  border-radius: 999px;
  background: #dceac5;
}
body .kh-achievement-progress > span::after {
  content: "";
  display: block;
  width: var(--kh-achievement-progress, 0%);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #62b735, #ffd33e);
}
body .kh-achievement-progress > small { color: #527044; font-size: 9px; font-weight: 950; white-space: nowrap; }
body .kh-achievement-card-action {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-top: 6px;
  border-top: 1px solid #dce8c9;
}
body .kh-achievement-card-action > small { min-width: 0; overflow: hidden; color: #83611e; font-size: 9px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
body .kh-achievement-card-action > button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border: 2px solid #2d7627;
  border-radius: 8px 6px 9px 7px;
  color: white;
  background: #48a831;
  box-shadow: 0 2px 0 #276b21;
  font: inherit;
  font-size: 9px;
  font-weight: 950;
  cursor: pointer;
}
body .kh-achievement-card-action > button:disabled { cursor: default; filter: grayscale(.45); opacity: .62; }
body .kh-achievement-card-action > button[aria-pressed="true"] { border-color: #a66b15; color: #65410d; background: #ffda50; box-shadow: 0 2px 0 #a56a1b; }
body .kh-achievement-card-action.has-head-effect { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
body .kh-achievement-card-action.has-head-effect > small { grid-column: 1 / -1; }
body .kh-achievement-card-action.has-head-effect > button { width: 100%; min-width: 0; padding-inline: 6px; font-size: 8px; }
body .kh-achievement-card-team {
  border-color: #65a83c;
  background: linear-gradient(145deg, #fff9cf, #eff8d7);
}
body .kh-achievement-card-team .kh-achievement-card-copy > p { margin-bottom: 4px; }
body .kh-achievement-team-status { display: block; color: #4f7537; font-size: 9px; font-weight: 900; }
body .kh-achievement-team-action { display: flex; justify-content: flex-end; }
body .kh-achievement-team-action > button[aria-pressed="true"] { border-color: #a66b15; color: #65410d; background: #ffda50; box-shadow: 0 2px 0 #a56a1b; }
body .kh-achievement-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
  margin: -2px 0 10px;
  padding: 4px;
  border: 1px solid #b6d88c;
  border-radius: 12px;
  background: #edf7d9;
}
body .kh-achievement-tabs > button {
  min-height: 34px;
  padding: 7px 16px;
  border: 1px solid #c2dba0;
  border-radius: 8px;
  color: #46663e;
  background: #f9fbe9;
  font: inherit;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}
body .kh-achievement-tabs > button[aria-selected="true"] {
  border-color: #2e772d;
  color: #fff;
  background: linear-gradient(180deg, #56b642, #31832d);
  box-shadow: 0 2px 0 #276b21;
}
body .kh-achievement-empty:not([hidden]) {
  position: static;
  z-index: auto;
  width: auto;
  display: grid;
  min-height: 120px;
  margin: 0;
  place-items: center;
  padding: 22px;
  border: 1px dashed #a7c981;
  border-radius: 12px;
  color: #58724d;
  background: #f5f9e6;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
}
body .kh-achievement-card.is-unlocked:not(.is-claimed)::after {
  content: "!";
  position: absolute;
  top: -5px;
  right: -4px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid white;
  border-radius: 50%;
  color: #633f0a;
  background: #ffd33e;
  box-shadow: 0 2px 0 #b66f1a;
  font-size: 10px;
  font-weight: 950;
}
body .kh-achievement-empty {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 7px;
  margin: 0;
  padding: 5px 8px;
  border: 2px solid #d8a34d;
  border-radius: 999px;
  color: #704814;
  background: #fff3c5;
  font-size: 7px;
  font-weight: 900;
}
body .kh-achievement-empty[hidden] { display: none; }
body .kh-public-profile-progress { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (prefers-reduced-motion: reduce) {
  body .kh-open-badgebook,
  body .kh-achievement-progress > span::after { transition: none; }
}

/* 0.14.6 — role-gated editor for shared public rooms. */
body .kh-client.is-public-editor .kh-room-tools { display: grid; }
body .kh-client.is-room-editor .kh-room-tools { display: grid; }
body .kh-client.is-public-editor .kh-room-tools [data-action="inventory"] {
  border-color: #fff5b5;
  color: #f9fff0;
  background: linear-gradient(145deg, #347f9b, #245f87);
  box-shadow: 0 4px 0 #184966, 0 6px 11px rgba(10, 54, 72, .24);
}
body .kh-client.is-public-editor .kh-room-tools [data-action="inventory"]:hover,
body .kh-client.is-public-editor .kh-room-tools [data-action="inventory"]:focus-visible {
  color: #173f4f;
  background: #ffdb4f;
  outline: 3px solid #173f4f;
  outline-offset: 2px;
}
body .kh-inventory-item.is-admin-palette {
  border-color: #82b8c8;
  background: linear-gradient(145deg, #f7ffff, #e6f6f7);
}
body .kh-inventory-item.is-admin-palette:hover,
body .kh-inventory-item.is-admin-palette.is-selected {
  border-color: #2a7790;
  background: #fff2ae;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .65);
}
body .kh-floor-item-manage.is-public-editor-handle {
  width: clamp(24px, 3.1cqw, 31px);
  height: clamp(24px, 3.1cqw, 31px);
  padding: 0;
  transform: translate(-50%, -130%);
  border-color: #fff5b5;
  color: white;
  background: #246d8b;
  box-shadow: 0 3px 0 #17475e, 0 5px 10px rgba(3, 51, 61, .24);
  font-size: clamp(13px, 1.7cqw, 17px);
  letter-spacing: 0;
}
body .kh-floor-item-manage.is-public-editor-handle:hover,
body .kh-floor-item-manage.is-public-editor-handle:focus-visible,
body .kh-floor-item-manage.is-public-editor-handle.is-selected {
  color: #17475e;
  background: #ffdb4f;
}
body .kh-item-menu-preview.is-mirrored { transform: scaleX(-1); }

/* 0.35.0 — Fleur's Garden Centre and persistent plant care. */
body :is(.kh-placed-furniture, .kh-inventory-item-preview, .kh-item-menu-preview, .kh-garden-card-art, .kh-garden-plant-art, .kh-garden-book-stage-art, .kh-garden-book-stages > span, .kh-garden-produce-chip > span).is-garden-sprite {
  background-image: var(--furniture-image);
  background-repeat: no-repeat;
  background-size: 500% 100%;
  background-position: var(--garden-stage-position, 0%) bottom;
}
body .kh-placed-furniture.is-garden-sprite.is-rotated,
body .kh-item-menu-preview.is-garden-sprite.is-rotated { background-image: var(--furniture-image); }
body .kh-placed-furniture.is-garden-plant { overflow: visible; }
body .kh-garden-world-state {
  position: absolute;
  right: -8%;
  top: -7%;
  display: grid;
  place-items: center;
  width: clamp(19px, 2.5cqw, 26px);
  aspect-ratio: 1;
  border: 2px solid #fffce4;
  border-radius: 50% 50% 50% 9px;
  color: #fff;
  background: #ed704e;
  box-shadow: 0 3px 0 #913824, 0 5px 10px rgba(43, 42, 16, .25);
  font: 1000 clamp(12px, 1.5cqw, 16px) / 1 system-ui, sans-serif;
}
body .kh-placed-furniture.is-garden-harvest-ready .kh-garden-world-state { background: #42a52f; box-shadow: 0 3px 0 #236d21, 0 5px 10px rgba(43, 42, 16, .25); }
body .kh-placed-furniture[data-garden-state="dead"] { filter: drop-shadow(0 7px 4px rgba(4, 42, 48, .23)) saturate(.66); }

body .kh-garden-dialog[open] {
  width: min(940px, calc(100% - 24px));
  height: min(650px, calc(100% - var(--kh-shell-head) - 20px));
  max-width: calc(100% - 24px);
  max-height: calc(100% - var(--kh-shell-head) - 20px);
  display: grid;
  /* The existing garden hero becomes the shared titlebar at runtime. */
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 25px 22px 16px;
  overflow: hidden;
}
body .kh-garden-dialog .kh-dialog-close {
  position: absolute;
  z-index: 5;
  top: 15px;
  right: 15px;
  float: none;
  margin: 0;
}
body .kh-garden-hero { min-width: 0; padding-right: 52px; }
body .kh-garden-hero h2 { margin: 5px 0 2px; font-size: clamp(24px, 3cqw, 34px); }
body .kh-garden-hero p { margin: 0; color: #4d674e; font-size: 11px; }
body .kh-garden-ui-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 34px;
  aspect-ratio: 1;
  background: url("../images/gardening/gardening-ui-icons-v1.webp") 0 center / 300% 100% no-repeat;
  filter: drop-shadow(0 2px 1px rgba(57, 63, 20, .18));
}
body .kh-garden-ui-icon.is-watering { background-position: 50% center; }
body .kh-garden-ui-icon.is-compost { background-position: 100% center; }
body .kh-garden-ui-icon.is-leaf {
  background-image: url("../images/gardening/garden-leaf-v2.svg");
  background-position: center;
  background-size: contain;
}
body .kh-garden-profile {
  display: grid;
  grid-template-columns: 44px 100px minmax(150px, 1fr) 120px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 2px solid #9ccc69;
  border-radius: 16px;
  background: linear-gradient(135deg, #effbd8, #fff4b8);
}
body .kh-garden-profile small,
body .kh-garden-daily small,
body .kh-garden-layout header small { display: block; color: #8c5918; font-size: 7px; font-weight: 1000; letter-spacing: .1em; }
body .kh-garden-profile strong { color: #24552c; font-size: 20px; }
body .kh-garden-xp span { display: flex; justify-content: space-between; color: #355d3b; font-size: 9px; font-weight: 900; }
body :is(.kh-garden-xp, .kh-garden-item-meter) > i {
  display: block;
  height: 9px;
  margin-top: 4px;
  overflow: hidden;
  border: 2px solid #8dbb62;
  border-radius: 999px;
  background: #e8f0ce;
}
body :is(.kh-garden-xp, .kh-garden-item-meter) > i > em {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54b52b, #ffcf3c);
  transition: width .25s ease;
}
body .kh-garden-balance { justify-self: end; text-align: right; }
body .kh-garden-daily {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 2px solid #efb132;
  border-radius: 15px;
  background: #fff2bd;
}
body .kh-garden-daily strong { display: block; margin-top: 1px; font-size: 13px; }
body .kh-garden-daily p { margin: 1px 0 0; color: #5b6849; font-size: 8px; line-height: 1.2; }
body :is(.kh-garden-daily, .kh-garden-card, .kh-garden-item-actions) button {
  min-height: 34px;
  padding: 7px 11px;
  border: 2px solid #257620;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(#50b64f, #27913c);
  box-shadow: 0 3px 0 #17621d;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.05;
}
body :is(.kh-garden-daily, .kh-garden-card, .kh-garden-item-actions) button:disabled { cursor: not-allowed; opacity: .48; filter: grayscale(.28); }
body .kh-garden-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 10px;
}
body :is(.kh-garden-shop, .kh-garden-overview) {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 10px;
  overflow: hidden;
  border: 2px solid #bddc91;
  border-radius: 15px;
  background: rgba(242, 251, 218, .8);
}
body .kh-garden-layout header { display: flex; align-items: end; justify-content: space-between; gap: 10px; padding-bottom: 7px; }
body .kh-garden-layout header h3 { margin: 1px 0 0; color: #285933; font-size: 15px; }
body .kh-garden-layout header > span { color: #647255; font-size: 8px; }
body .kh-garden-catalog {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 7px;
  padding: 1px 4px 5px 1px;
  overflow-y: auto;
}
body .kh-garden-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 72px;
  padding: 7px;
  border: 2px solid #aed37b;
  border-radius: 13px;
  background: #fffef0;
}
body .kh-garden-card.is-locked { background: #eff2df; }
body .kh-garden-card-art,
body .kh-garden-plant-art { display: block; width: 56px; aspect-ratio: var(--sprite-ratio, 1); }
body .kh-garden-card strong,
body .kh-garden-card small { display: block; }
body .kh-garden-card strong { font-size: 10px; line-height: 1.12; }
body .kh-garden-card small { margin-top: 3px; color: #64705b; font-size: 7px; line-height: 1.25; }
body .kh-garden-card button { display: flex; align-items: center; gap: 2px; min-width: 48px; padding: 5px; }
body .kh-garden-card button .kh-garden-ui-icon { width: 22px; }
body .kh-garden-overview > div {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding-right: 3px;
  overflow-y: auto;
}
body .kh-garden-plant-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 57px;
  padding: 5px 7px;
  border: 2px solid #c6de9f;
  border-radius: 12px;
  background: #fffef1;
}
body .kh-garden-plant-row[data-state="dead"] { border-color: #dc9270; background: #fff0df; }
body .kh-garden-plant-art { width: 44px; }
body .kh-garden-plant-row :is(strong, small, span) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .kh-garden-plant-row strong { font-size: 9px; }
body .kh-garden-plant-row small { margin-top: 2px; color: #3c6e3d; font-size: 7px; font-weight: 900; }
body .kh-garden-plant-row div > span { margin-top: 2px; color: #778269; font-size: 7px; }
body .kh-garden-empty { margin: 0; padding: 16px 8px; color: #6b775d; text-align: center; font-size: 9px; }
body .kh-garden-status { min-height: 14px; margin: 0; color: #355f39; font-size: 9px; font-weight: 900; text-align: center; }

body .kh-item-menu.is-garden-item { width: min(380px, calc(100% - 20px)); }
body .kh-garden-item-panel { display: grid; gap: 8px; margin: 9px 0 11px; padding: 10px; border: 2px solid #b5d982; border-radius: 14px; background: #f4fbdc; }
body .kh-garden-item-panel[hidden] { display: none; }
body .kh-garden-item-state { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 8px; }
body .kh-garden-item-state .kh-garden-ui-icon { width: 36px; }
body .kh-garden-item-state small { display: block; color: #a46020; font-size: 7px; font-weight: 1000; letter-spacing: .1em; }
body .kh-garden-item-state strong { display: block; margin-top: 2px; font-size: 13px; }
body .kh-garden-item-meter > span { display: flex; justify-content: space-between; gap: 8px; font-size: 8px; }
body .kh-garden-item-panel > p { margin: 0; color: #4f684d; font-size: 9px; line-height: 1.35; }
body .kh-garden-item-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
body .kh-garden-item-actions button { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 3px; min-width: 0; padding: 5px; }
body .kh-garden-item-actions .kh-garden-ui-icon { width: 25px; }
body .kh-garden-item-actions strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; }

/* 0.36.0 — compact info stands and the persistent garden journal. */
body .kh-garden-dock-button { position: relative; }
body .kh-garden-dock-icon { display: grid !important; place-items: center; }
body .kh-garden-dock-icon .kh-garden-ui-icon { width: 100%; max-width: 34px; }
body .kh-garden-alert-badge {
  position: absolute;
  z-index: 2;
  right: -5px;
  top: -7px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border: 2px solid #fffce5;
  border-radius: 999px;
  color: #fff;
  background: #e86745;
  box-shadow: 0 2px 0 #913824;
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
}
body .kh-garden-alert-badge[hidden] { display: none; }
body .kh-garden-dock-button.is-urgent .kh-garden-alert-badge { animation: kh-garden-alert-pulse 1.25s ease-in-out infinite; }
@keyframes kh-garden-alert-pulse { 50% { transform: scale(1.16); filter: brightness(1.15); } }

body .kh-garden-journal[open] {
  width: min(900px, calc(100% - 22px));
  height: min(620px, calc(100% - var(--kh-shell-head) - 18px));
  max-width: calc(100% - 22px);
  max-height: calc(100% - var(--kh-shell-head) - 18px);
  display: grid;
  /* The existing journal hero becomes the shared titlebar at runtime. */
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 9px;
  padding: 24px 20px 13px;
  overflow: hidden;
}
body .kh-garden-journal .kh-dialog-close { position: absolute; right: 14px; top: 14px; margin: 0; }
body .kh-garden-journal-hero { min-width: 0; padding-right: 50px; }
body .kh-garden-journal-hero h2 { margin: 5px 0 1px; color: #20572e; font-size: clamp(24px, 3cqw, 34px); line-height: 1; }
body .kh-garden-journal-hero p { margin: 3px 0 0; color: #557151; font-size: 10px; font-weight: 800; }
body .kh-garden-journal-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 2px solid #b8d98d;
  border-radius: 14px;
  background: #eaf7cf;
}
body .kh-garden-journal-tabs button {
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 9px;
  border: 2px solid transparent;
  border-radius: 10px;
  color: #326239;
  background: transparent;
  font-size: 10px;
  font-weight: 950;
}
body .kh-garden-journal-tabs button > span:not(.kh-garden-ui-icon) { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: #42a947; }
body .kh-garden-journal-tabs .kh-garden-ui-icon { width: 28px; }
body .kh-garden-journal-tabs button.is-active { border-color: #24752c; color: #fff; background: linear-gradient(#4ebc51, #2d9339); box-shadow: 0 3px 0 #17621d; }
body .kh-garden-journal-body { min-height: 0; overflow: hidden; }
body .kh-garden-journal-panel {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 7px;
  padding: 10px;
  overflow: hidden;
  border: 2px solid #c0dc94;
  border-radius: 15px;
  background: rgba(246, 252, 223, .86);
}
body .kh-garden-journal-panel[hidden] { display: none; }
body .kh-garden-journal-panel > header { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 0 2px 6px; border-bottom: 2px solid #cfe3a9; }
body .kh-garden-journal-panel > header small { color: #9b6420; font-size: 7px; font-weight: 1000; letter-spacing: .1em; }
body .kh-garden-journal-panel > header h3 { margin: 2px 0 0; color: #285a32; font-size: 16px; }
body .kh-garden-journal-panel > header p { max-width: 340px; margin: 0; color: #687c5c; font-size: 8px; text-align: right; }
body .kh-garden-book {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 7px;
  padding: 1px 4px 5px 1px;
  overflow-y: auto;
}
body .kh-garden-book-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px;
  grid-template-areas: "heading stats" "stages stages";
  gap: 6px 9px;
  padding: 8px;
  border: 2px solid #a9d276;
  border-radius: 13px;
  background: #fffef0;
}
body .kh-garden-book-card > header { grid-area: heading; min-width: 0; }
body .kh-garden-book-card > header :is(strong, small) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .kh-garden-book-card > header strong { color: #28562f; font-size: 11px; }
body .kh-garden-book-card > header small { margin-top: 2px; color: #7b7351; font-size: 7px; }
body .kh-garden-book-stages { grid-area: stages; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
body .kh-garden-book-stages > span {
  width: 100%;
  aspect-ratio: 1.15;
  border: 1px solid #bddb92;
  border-radius: 8px;
  background-color: #f1f8dc;
  background-repeat: no-repeat;
}
body .kh-garden-book-stats { grid-area: stats; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
body .kh-garden-book-stats > span { min-width: 0; padding: 3px; border-radius: 7px; text-align: center; background: #eaf6ce; }
body .kh-garden-book-stats :is(b, small) { display: block; }
body .kh-garden-book-stats b { color: #2f7133; font-size: 10px; }
body .kh-garden-book-stats small { overflow: hidden; color: #728064; font-size: 5px; text-overflow: ellipsis; text-transform: uppercase; }
body .kh-garden-book-card.is-locked { border-color: #c8cfb3; background: #eff0e3; }
body .kh-garden-book-card.is-locked .kh-garden-book-stages { filter: grayscale(1); opacity: .23; }
body .kh-garden-tasks,
body .kh-garden-orders { min-height: 0; display: grid; align-content: start; gap: 7px; overflow-y: auto; padding: 1px 4px 5px 1px; }
body .kh-garden-task-card,
body .kh-garden-order-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .65fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 2px solid #afd37d;
  border-radius: 13px;
  background: #fffef0;
}
body :is(.kh-garden-task-card, .kh-garden-order-card).is-complete { opacity: .62; background: #edf7d9; }
body :is(.kh-garden-task-card, .kh-garden-order-card) :is(strong, p) { display: block; margin: 0; }
body :is(.kh-garden-task-card, .kh-garden-order-card) strong { color: #295c33; font-size: 11px; }
body :is(.kh-garden-task-card, .kh-garden-order-card) p { margin-top: 3px; color: #63765b; font-size: 8px; line-height: 1.25; }
body :is(.kh-garden-task-card, .kh-garden-order-card) button {
  min-height: 34px;
  padding: 6px 11px;
  border: 2px solid #27772d;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(#4fba50, #2b9038);
  box-shadow: 0 3px 0 #17621d;
  font-size: 8px;
  font-weight: 950;
}
body :is(.kh-garden-task-card, .kh-garden-order-card) button:disabled { cursor: not-allowed; filter: grayscale(.4); opacity: .48; }
body .kh-garden-task-progress > span { display: flex; justify-content: space-between; gap: 8px; color: #416943; font-size: 8px; }
body .kh-garden-task-progress > i { display: block; height: 9px; margin-top: 4px; overflow: hidden; border: 2px solid #93bd68; border-radius: 999px; background: #e5efce; }
body .kh-garden-task-progress > i > em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #55b62e, #ffd241); }
body .kh-garden-journal-panel[data-garden-journal-panel="orders"] { grid-template-rows: auto auto minmax(0, 1fr); }
body .kh-garden-produce { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
body .kh-garden-produce-chip { min-width: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 4px; padding: 5px; border: 2px solid #b6d787; border-radius: 10px; background: #fffef0; }
body .kh-garden-produce-chip > span { display: block; width: 34px; aspect-ratio: 1; }
body .kh-garden-produce-chip :is(small, strong) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .kh-garden-produce-chip small { color: #69785c; font-size: 6px; }
body .kh-garden-produce-chip strong { color: #2c6832; font-size: 14px; }
body .kh-garden-order-card { grid-template-columns: 36px minmax(0, 1fr) auto; }
body .kh-garden-order-resident { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #fff2a8; border-radius: 50%; color: #fff; background: #2e9b7d; box-shadow: 0 2px 0 #176853; font-size: 15px; font-weight: 1000; }
body .kh-garden-journal-status { min-height: 13px; margin: 0; color: #35653b; font-size: 8px; font-weight: 900; text-align: center; }

/* Habbo-inspired furniture strip: compact, bottom anchored and immediately actionable. */
body .kh-item-menu:not([hidden]) {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 84px;
  width: min(760px, calc(100% - 20px));
  max-width: calc(100% - 20px);
  max-height: none;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 5px 12px;
  padding: 9px 11px;
  transform: translateX(-50%) scale(var(--kh-window-scale, 1));
  transform-origin: center bottom;
  overflow: visible;
  border-width: 3px;
  border-radius: 14px;
  animation: kh-window-pop-in .16s ease-out both;
}
body .kh-item-menu-head { grid-column: 1; grid-row: 1; grid-template-columns: 64px minmax(0, 1fr) 30px; gap: 8px; padding: 0; border: 0; }
body .kh-item-menu-head > button { width: 29px; height: 29px; flex-basis: 29px; font-size: 18px; }
body .kh-item-menu-preview { width: 62px; max-height: 62px; background-color: #eef6d9; border: 2px solid #9dc873; border-radius: 10px; }
body .kh-item-menu-head small { min-height: 18px; padding: 2px 7px; font-size: 6px; }
body .kh-item-menu-head h2 { margin-top: 3px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
body .kh-item-menu > p { grid-column: 1; grid-row: 2; align-self: start; margin: 0; overflow: hidden; font-size: 8px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
body .kh-item-actions { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-self: center; gap: 5px; }
body .kh-item-actions button { min-width: 0; min-height: 48px; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px; padding: 5px; border-radius: 10px; }
body .kh-item-actions button span { width: 27px; height: 27px; border-radius: 8px; font-size: 15px; }
body .kh-item-actions button strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; }
body .kh-item-menu.is-garden-item:not([hidden]) { width: min(790px, calc(100% - 20px)); grid-template-columns: 205px minmax(0, 1fr); }
body .kh-item-menu.is-garden-item .kh-garden-item-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
  grid-template-columns: minmax(130px, .8fr) minmax(130px, 1fr) minmax(130px, 1fr);
  grid-template-areas: "state growth water" "copy actions actions";
  align-items: center;
  gap: 5px 8px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 11px;
}
body .kh-item-menu.is-garden-item .kh-garden-item-state { grid-area: state; grid-template-columns: 31px minmax(0, 1fr); gap: 5px; }
body .kh-item-menu.is-garden-item .kh-garden-item-state .kh-garden-ui-icon { width: 29px; }
body .kh-item-menu.is-garden-item .kh-garden-item-state strong { font-size: 10px; }
body .kh-item-menu.is-garden-item .kh-garden-item-meter:nth-of-type(2) { grid-area: growth; }
body .kh-item-menu.is-garden-item .kh-garden-item-meter:nth-of-type(3) { grid-area: water; }
body .kh-item-menu.is-garden-item .kh-garden-item-panel > p { grid-area: copy; font-size: 7px; line-height: 1.2; }
body .kh-item-menu.is-garden-item .kh-garden-item-actions { grid-area: actions; grid-template-columns: repeat(3, minmax(0, 1fr)); }
body .kh-item-menu.is-garden-item .kh-garden-item-actions button { min-height: 31px; }
body .kh-item-menu.is-garden-item > .kh-item-actions { grid-column: 1 / -1; grid-row: 3; min-height: 0; }
body .kh-item-menu.is-garden-item > .kh-item-actions button { min-height: 31px; }

/* A low player info stand with a single badge and direct Wave/Profile actions. */
body .kh-player-card {
  right: 12px;
  bottom: 82px;
  width: clamp(270px, 34cqw, 310px);
  min-height: 112px;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 7px;
  padding: 7px;
  border-width: 2px;
  border-radius: 13px;
  box-shadow: 0 0 0 2px #2f872c, 0 4px 0 #155d31, 0 9px 18px rgba(4, 45, 46, .22);
}
body .kh-player-card::before { left: 29%; top: 7px; bottom: 7px; }
body .kh-player-card-stage { border: 0; border-radius: 10px; background: transparent; box-shadow: none; }
body .kh-player-card-platform { left: 8%; right: 8%; bottom: 5px; height: 14px; transform: rotate(0deg); background: #dce5cd; }
body .kh-player-card-stage .kh-profile-kwaker { width: 72px; margin-bottom: 3px; }
body .kh-player-card-copy { grid-template-rows: auto minmax(20px, auto) 37px 28px; gap: 2px; padding: 1px 1px 0 4px; }
body .kh-player-card-heading strong { font-size: 14px; }
body .kh-player-card-copy > p { font-size: 8px; -webkit-line-clamp: 1; }
body .kh-player-card-badges { min-height: 37px; }
body .kh-player-card-badge,
body .kh-player-card-badge-art { width: 36px; height: 36px; flex-basis: 36px; }
body .kh-player-card-badge-art.has-image { background-size: 36px 36px; }
body .kh-player-card-actions button { height: 27px; font-size: 8px; }

/* 0.15.2 — five-machine Game Hall, synchronized stools and quiet world markers. */
body .kh-hotspot-gamehall { left: 65%; top: 25%; }
body [data-gamehall-only] { display: none; }
body .kh-client[data-room="gamehall"] [data-gamehall-only] { display: block; }
body .kh-client[data-room="gamehall"] .kh-top-arcade[data-gamehall-only] { display: grid; }
body .kh-client[data-room="gamehall"] .kh-public-exit { display: none; }
body .kh-reception-callout { display: none; }

body .kh-world-hotspot {
  display: block;
  width: clamp(22px, 3.1cqw, 29px);
  min-width: 0;
  height: clamp(22px, 3.1cqw, 29px);
  padding: 0;
  border: 2px solid #fff9c8;
  border-radius: 50%;
  opacity: .68;
  color: #174852;
  background: linear-gradient(180deg, #fff174, #ffc934);
  box-shadow: 0 2px 0 #c46b29, 0 4px 8px rgba(10, 61, 65, .24);
}
body .kh-world-hotspot::before {
  content: "◆";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(9px, 1.2cqw, 12px);
  font-weight: 950;
}
body .kh-hotspot-garden::before { content: "T"; }
body .kh-hotspot-shop::before { content: "◇"; font-size: clamp(12px, 1.55cqw, 15px); }
body .kh-hotspot-gamehall::before { content: "★"; }
body .kh-world-hotspot span {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  min-width: max-content;
  padding: 4px 7px;
  transform: translate(-50%, -3px);
  border: 2px solid #fff9c8;
  border-radius: 8px;
  color: #fff;
  background: #174f55;
  box-shadow: 0 2px 0 rgba(11, 52, 52, .38);
  font-size: clamp(7px, .9cqw, 9px);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
body .kh-world-hotspot small { display: none; }
body .kh-world-hotspot:hover,
body .kh-world-hotspot:focus-visible { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
body .kh-world-hotspot:hover span,
body .kh-world-hotspot:focus-visible span { opacity: 1; transform: translate(-50%, 0); }
body .kh-world-hotspot:focus-visible { outline: 3px solid white; outline-offset: 2px; }

/* 0.18.8 — keep one marker on each illustrated doorway while the full door remains clickable. */
body .kh-world-hotspot {
  width: 9.5cqw;
  min-width: 0;
  height: 15cqw;
  border: 0;
  border-radius: 1.4cqw 1.4cqw .7cqw .7cqw;
  opacity: 1;
  background: transparent;
  box-shadow: none;
}
body .kh-hotspot-gamehall { width: 10cqw; height: 16cqw; }
body .kh-hotspot-shop { width: 10.5cqw; height: 17cqw; }
body .kh-world-hotspot::before {
  position: absolute;
  z-index: 2;
  inset: auto;
  left: 50%;
  top: 50%;
  width: clamp(19px, 2.6cqw, 25px);
  height: clamp(19px, 2.6cqw, 25px);
  border: 2px solid #fff9c8;
  border-radius: 50%;
  color: #174852;
  background: linear-gradient(180deg, #fff174, #ffc934);
  box-shadow: 0 2px 0 #c46b29, 0 4px 8px rgba(10, 61, 65, .24);
  transform: translate(-50%, -50%);
}
body .kh-world-hotspot:hover::before,
body .kh-world-hotspot:focus-visible::before {
  transform: translate(-50%, calc(-50% - .25cqw));
  filter: brightness(1.06);
}
body .kh-world-hotspot span { top: calc(50% + 1.9cqw); bottom: auto; }

body .kh-arcade-machine-layer {
  position: absolute;
  z-index: 218;
  inset: 0;
  pointer-events: none;
}
body .kh-arcade-machine {
  position: absolute;
  display: block;
  place-items: center;
  width: clamp(22px, 3cqw, 28px);
  min-width: 0;
  height: clamp(22px, 3cqw, 28px);
  padding: 0;
  transform: translate(-50%, -50%);
  border: 2px solid #fff4a6;
  border-radius: 50%;
  color: #f8fff5;
  background: linear-gradient(180deg, #3a267f, #24154e);
  box-shadow: 0 2px 0 #0c5d66, 0 4px 8px rgba(7, 39, 54, .28);
  pointer-events: auto;
  cursor: pointer;
  opacity: .68;
  transition: opacity .12s ease, transform .12s ease;
}
body .kh-arcade-machine::before {
  content: "•••";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(7px, .9cqw, 9px);
  font-weight: 950;
  letter-spacing: -1px;
}
body .kh-arcade-machine strong {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  min-width: max-content;
  padding: 4px 7px;
  transform: translate(-50%, -3px);
  border: 2px solid #fff4a6;
  border-radius: 8px;
  color: #fff;
  background: #243d62;
  box-shadow: 0 2px 0 rgba(7, 39, 54, .38);
  font-size: clamp(7px, .88cqw, 9px);
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
body .kh-arcade-machine small { display: none; }
body .kh-arcade-machine:hover,
body .kh-arcade-machine:focus-visible { opacity: 1; transform: translate(-50%, -50%) scale(1.06); outline: 3px solid white; outline-offset: 2px; }
body .kh-arcade-machine:hover strong,
body .kh-arcade-machine:focus-visible strong { opacity: 1; transform: translate(-50%, 0); }
body .kh-arcade-machine.is-live { color: #163e43; background: linear-gradient(180deg, #fff186, #ffc938); box-shadow: 0 3px 0 #d16f2d, 0 5px 10px rgba(7, 39, 54, .28); }
body .kh-arcade-machine.is-live::before { content: "▶"; padding-left: 2px; font-size: clamp(8px, 1cqw, 10px); }
body .kh-arcade-lilyhop { left: 29%; top: 44%; }
body .kh-arcade-race { left: 43%; top: 44%; }
body .kh-arcade-memory { left: 57%; top: 44%; }
body .kh-arcade-crane { left: 70%; top: 44%; }
body .kh-arcade-beats { left: 86%; top: 44%; }

body .kh-gamehall-door {
  position: absolute;
  z-index: 219;
  left: 4.3%;
  top: 10%;
  width: 15.5%;
  height: 43%;
  padding: 0;
  border: 0;
  color: #163e43;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
}
body .kh-gamehall-door span,
body .kh-gamehall-door strong {
  position: absolute;
  bottom: 3%;
  padding: 4px 7px;
  border: 2px solid #fff4a6;
  background: linear-gradient(180deg, #fff180, #ffc836);
  box-shadow: 0 3px 0 #c76b2d, 0 4px 8px rgba(13, 61, 68, .24);
  pointer-events: none;
}
body .kh-gamehall-door span {
  left: 50%;
  width: clamp(22px, 3cqw, 28px);
  height: clamp(22px, 3cqw, 28px);
  padding: 0;
  transform: translateX(-50%);
  border-radius: 50%;
  font-weight: 950;
  line-height: clamp(18px, 2.7cqw, 25px);
  opacity: .68;
  transition: opacity .12s ease, filter .12s ease;
}
body .kh-gamehall-door strong {
  left: 50%;
  bottom: calc(3% - 29px);
  min-width: max-content;
  padding: 4px 7px;
  transform: translate(-50%, -3px);
  border-radius: 8px;
  color: #fff;
  background: #174f55;
  box-shadow: 0 2px 0 rgba(11, 52, 52, .38);
  font-size: clamp(7px, .9cqw, 9px);
  line-height: 1;
  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
}
body .kh-gamehall-door:hover span,
body .kh-gamehall-door:focus-visible span { opacity: 1; filter: brightness(1.08); }
body .kh-gamehall-door:hover strong,
body .kh-gamehall-door:focus-visible strong { opacity: 1; transform: translate(-50%, 0); }
body .kh-gamehall-door:focus-visible { outline: 4px solid white; outline-offset: -4px; border-radius: 16px; }

body .kh-map-pin-gamehall { left: 65%; top: 34%; }

body .kh-guest[data-skin="lola_arcade"] {
  --kh-avatar-motion-side: url("../images/lola-motion-side-v1.webp");
  --kh-avatar-motion-front: url("../images/lola-motion-front-v1.webp");
  --kh-avatar-motion-back: url("../images/lola-motion-back-v1.webp");
}

body .kh-guest[data-skin="pip_guide"] {
  --kh-avatar-motion-side: url("../images/pip-motion-side-v5.webp?v=0.18.9-pip-stable-r2");
  --kh-avatar-motion-front: url("../images/pip-motion-front-v5.webp?v=0.18.9-pip-stable-r2");
  --kh-avatar-motion-back: url("../images/pip-motion-back-v5.webp?v=0.18.9-pip-stable-r2");
}

/* Ground sitting keeps exactly the same foot anchor as standing. */
body .kh-guest.is-sitting[data-seat-kind="ground"],
body .kh-remote-guest.is-sitting[data-seat-kind="ground"] {
  transform: translate(-50%, -100%) scale(var(--guest-scale, 1));
}

/* Names live in the info stand; permanent labels only clutter the room. */
body .kh-guest > strong,
body .kh-remote-guest > strong,
body .kh-world-npc > strong {
  display: none;
}

body .kh-guest[data-skin="lotte_hotel"] {
  --kh-avatar-motion-side: url("../images/lotte-motion-side-v1.webp?v=0.15.5-lotte-roaming-r2");
  --kh-avatar-motion-front: url("../images/lotte-motion-front-v2.webp?v=0.15.5-lotte-roaming-r2");
  --kh-avatar-motion-back: url("../images/lotte-motion-back-v1.webp?v=0.15.5-lotte-roaming-r2");
}

body .kh-guest[data-skin="lotte_hotel"].is-walking:not(.is-sitting) .kh-avatar-sprite {
  animation-name: kh-lotte-motion-walk;
}

@keyframes kh-lotte-motion-walk {
  0%, 100% { background-position: 0 0; }
  16.667% { background-position: 50% 0; }
  33.333% { background-position: 100% 0; }
  50% { background-position: 0 25%; }
  66.667% { background-position: 50% 25%; }
  83.333% { background-position: 100% 25%; }
}

body .kh-arcade-exchange-dialog[open] { width: min(610px, calc(100% - 28px)); text-align: center; }
body .kh-arcade-exchange-dialog > p { margin: 3px auto 5px; color: #356760; }
body .kh-arcade-reward-section { margin-top: 4px; }
body .kh-arcade-reward-section > h3 {
  margin: 0 0 6px;
  color: #315615;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body .kh-arcade-cabinet-dialog[open] { width: min(460px, calc(100% - 28px)); text-align: center; }
body .kh-arcade-cabinet-dialog > p { margin: 4px auto 12px; max-width: 37em; color: #356760; }
body .kh-arcade-cabinet-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
body .kh-arcade-cabinet-actions button {
  min-height: 42px;
  padding: 8px 10px;
  border: 3px solid #1b6b63;
  border-radius: 13px;
  color: #173e43;
  background: linear-gradient(180deg, #fffef0, #e4f7db);
  box-shadow: 0 3px 0 #8cb353;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}
body .kh-arcade-cabinet-actions button:first-child { background: linear-gradient(180deg, #fff18a, #ffc83d); box-shadow: 0 3px 0 #d17a2d; }
body .kh-arcade-cabinet-actions button:disabled { cursor: not-allowed; filter: grayscale(.55); opacity: .5; }
body .kh-guest[data-seat-kind="arcade"] { --seat-pose-y: -.25cqw; }
body .kh-arcade-balance {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 8px;
  margin: 6px auto 12px;
  padding: 7px 16px;
  border: 3px solid #1b6b63;
  border-radius: 999px;
  color: #173e43;
  background: #fff4aa;
  box-shadow: 0 4px 0 #d98536;
}
body .kh-arcade-balance > span { grid-row: 1 / span 2; color: #ef7b35; font-size: 28px; }
body .kh-arcade-balance strong { font-size: 23px; line-height: .9; }
body .kh-arcade-balance small { font-size: 8px; font-weight: 950; letter-spacing: .06em; text-transform: uppercase; }
body .kh-arcade-exchange-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
body .kh-arcade-exchange-options button {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 9px 6px;
  border: 3px solid #1b6b63;
  border-radius: 13px;
  color: #173e43;
  background: linear-gradient(180deg, #fffef0, #e4f7db);
  box-shadow: 0 3px 0 #8cb353;
  cursor: pointer;
}
body .kh-arcade-exchange-options button:disabled { cursor: not-allowed; filter: grayscale(.7); opacity: .48; }
body .kh-arcade-exchange-options button span { color: #bd5a20; font-size: 10px; font-weight: 950; }
body .kh-arcade-exchange-options button strong { font-size: 12px; }
body .kh-arcade-exchange-options button > em {
  position: absolute;
  top: -8px;
  right: 7px;
  padding: 2px 6px;
  border: 2px solid #fff7c0;
  border-radius: 999px;
  color: white;
  background: #ed684f;
  box-shadow: 0 2px 0 #a53d34;
  font-size: 7px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body .kh-arcade-exclusive {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 3px solid #1b6b63;
  border-radius: 15px;
  text-align: left;
  background: linear-gradient(135deg, #e2fff2, #fff7b8);
  box-shadow: 0 4px 0 #8cb353;
}
body .kh-arcade-exclusive > img { width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(22, 89, 65, .18)); }
body .kh-arcade-exclusive > div > small { color: #bd5a20; font-size: 7px; font-weight: 950; letter-spacing: .06em; text-transform: uppercase; }
body .kh-arcade-exclusive h3 { margin: 1px 0 2px; color: #174852; font-size: 17px; }
body .kh-arcade-exclusive p { margin: 0; color: #356760; font-size: 9px; line-height: 1.25; }
body .kh-arcade-exclusive > button {
  display: grid;
  gap: 2px;
  min-width: 112px;
  padding: 8px 10px;
  border: 3px solid #1b6b63;
  border-radius: 12px;
  color: #173e43;
  background: linear-gradient(180deg, #fff18a, #ffc83d);
  box-shadow: 0 3px 0 #d17a2d;
  font: inherit;
  cursor: pointer;
}
body .kh-arcade-exclusive > button:disabled { cursor: not-allowed; filter: grayscale(.65); opacity: .52; }
body .kh-arcade-exclusive > button.is-owned { filter: none; opacity: 1; color: white; background: linear-gradient(180deg, #4db98a, #208064); box-shadow: 0 3px 0 #135b48; }
body .kh-arcade-exclusive > button span { color: #bd5a20; font-size: 9px; font-weight: 950; }
body .kh-arcade-exclusive > button.is-owned span { color: #dfffd1; }
body .kh-arcade-exclusive > button strong { font-size: 10px; }
body .kh-arcade-exchange-status { display: block; min-height: 1.3em; margin-top: 11px; color: #22635b; font-size: 10px; }

@media (max-width: 620px) {
  body .kh-arcade-machine { width: 22px; height: 22px; }
  body .kh-arcade-cabinet-actions { gap: 5px; }
  body .kh-arcade-cabinet-actions button { min-height: 34px; padding: 5px; border-width: 2px; font-size: 9px; }
  body .kh-arcade-exchange-options { gap: 5px; }
  body .kh-arcade-exchange-options button { padding: 7px 3px; border-width: 2px; }
  body .kh-arcade-exclusive { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 6px; padding: 6px; border-width: 2px; }
  body .kh-arcade-exclusive > img { width: 46px; height: 46px; }
  body .kh-arcade-exclusive > button { min-width: 88px; padding: 6px; border-width: 2px; }
}

/* Keep the Quack Beat pad as tight as the other 0.17.2 control clusters.
   This final rule sits after the original cabinet rules on purpose. */
body .kh-quack-beat-pad {
  grid-template-columns:repeat(4,48px);
  gap:3px;
}
body .kh-quack-beat-pad > button { width:48px; }
/* 0.18.7 — QuackTown currency artwork and protected room artwork. */
.kh-lobby-art {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.kh-currency-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.kh-currency-icon > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

body .kh-top-wallet > .kh-currency-icon,
body .kh-top-quacks > .kh-currency-icon {
  grid-row: 1 / 3;
  color: inherit;
  font-size: 0;
  text-shadow: none;
}

body .kh-wallet-pill > .kh-currency-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  color: inherit;
  font-size: 0;
}

body .kh-wallet-balance-card > .kh-currency-icon,
body .kh-wallet-balance-card.is-quacks > .kh-currency-icon {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
/* QuackTown live help, Guide desk and moderation tool */
.kh-support-launcher[hidden],
.kh-support-tool[hidden],
.kh-support-notice[hidden],
.kh-support-player[hidden],
.kh-support-team[hidden],
.kh-support-empty[hidden],
.kh-support-moderate[hidden],
.kh-support-badges[hidden],
.kh-room-alert-compose[hidden],
.kh-room-alert[hidden],
.kh-badge-notice[hidden],
.kh-support-alert[hidden] { display: none !important; }

.kh-support-launcher {
  position: absolute;
  z-index: 9090;
  top: 15.5%;
  right: 1.2%;
  width: 58px;
  min-height: 62px;
  padding: 6px 4px 5px;
  border: 3px solid #176b31;
  border-radius: 16px;
  background: linear-gradient(#fff7a7 0 58%, #f2bd31 59% 100%);
  color: #174e2d;
  box-shadow: 0 3px 0 #0b4f27, 0 7px 16px #123d2766;
  cursor: pointer;
  font: inherit;
}

body .kh-support-launcher {
  width: 52px;
  min-height: 54px;
  padding: 5px 3px 4px;
  border-width: 2px;
  border-radius: 9px;
}

body .kh-support-launcher > span {
  width: 28px;
  height: 28px;
  margin: 0 auto 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: none;
}

body .kh-support-launcher small { font-size: 8px; }

body .kh-client.is-public-editor .kh-support-launcher {
  top: calc(50% + 33px);
  right: 10px;
}

.kh-support-launcher > span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin: 0 auto 2px;
  border: 2px solid #19843e;
  border-radius: 50%;
  background: #2eaa50;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px #12652d;
}

.kh-support-launcher small {
  display: block;
  overflow: hidden;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kh-support-launcher:hover,
.kh-support-launcher[aria-expanded="true"] { transform: translateY(-1px); filter: brightness(1.04); }
.kh-support-launcher:active { transform: translateY(2px); box-shadow: 0 1px 0 #0b4f27, 0 4px 10px #123d2744; }

.kh-support-alert {
  position: absolute;
  top: -9px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 2px solid #fff4a9;
  border-radius: 50%;
  background: #ed3c2f;
  color: #fff;
  box-shadow: 0 0 0 3px #9f261f, 0 0 15px #ffca28;
  font-size: 17px;
  line-height: 1;
  animation: kh-support-alert 0.78s steps(2, end) infinite;
}

@keyframes kh-support-alert {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .48; transform: scale(.88); }
}

.kh-support-tool {
  position: absolute;
  z-index: 9085;
  top: 13.5%;
  right: 8.5%;
  width: min(352px, 76%);
  max-height: 74%;
  overflow: auto;
  padding: 0 12px 13px;
  border: 4px solid #176b31;
  border-radius: 18px;
  background: #f3ffd0;
  color: #194e2e;
  box-shadow: 0 5px 0 #0a4a25, 0 14px 30px #092b236e;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.kh-support-tool::-webkit-scrollbar { width: 0; height: 0; }

.kh-help-tool {
  top: auto;
  right: auto;
  bottom: 70px;
  left: 1.4%;
  width: min(340px, 78%);
  max-height: 68%;
}

.kh-support-tool > header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -12px 11px;
  padding: 10px 11px 9px 14px;
  border-bottom: 2px solid #8fbc4f;
  background: linear-gradient(135deg, #39a84e, #167c3c);
  color: #fff;
}

.kh-support-tool > header div { display: grid; gap: 1px; }
.kh-support-tool > header small { color: #eaffb4; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.kh-support-tool > header strong { font-size: 16px; line-height: 1.1; }
.kh-support-tool > header button,
.kh-support-notice > button {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border: 2px solid #a55f08;
  border-radius: 50%;
  background: #ffd44d;
  color: #744008;
  cursor: pointer;
  font: 900 19px/1 sans-serif;
}

.kh-support-kind-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kh-support-kind-tabs button,
.kh-support-team-head button,
.kh-support-call-actions button,
.kh-support-form-footer button,
.kh-support-moderate form > button,
.kh-support-roles form > button,
.kh-currency-grant-form > button {
  min-height: 34px;
  border: 2px solid #217535;
  border-radius: 9px;
  background: linear-gradient(#fff5a1, #ffc83c);
  color: #174f2c;
  box-shadow: 0 2px 0 #b77616;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}
.kh-support-kind-tabs button[aria-pressed="true"] { background: linear-gradient(#51c563, #2c9c48); color: #fff; box-shadow: 0 2px 0 #17672e; }
.kh-support-player > p,
.kh-support-team-head p { margin: 9px 1px; font-size: 12px; line-height: 1.35; }
.kh-support-tool form { display: grid; gap: 6px; }
.kh-support-tool label { font-size: 11px; font-weight: 900; }
.kh-support-tool textarea,
.kh-support-tool input,
.kh-support-tool select {
  box-sizing: border-box;
  width: 100%;
  border: 2px solid #6da24a;
  border-radius: 9px;
  background: #fffef2;
  color: #193d28;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.35;
  outline: none;
}
.kh-support-tool textarea { padding: 8px; resize: vertical; }
.kh-support-tool input,
.kh-support-tool select { height: 34px; padding: 5px 7px; }
.kh-support-tool textarea:focus,
.kh-support-tool input:focus,
.kh-support-tool select:focus { border-color: #1e913f; box-shadow: 0 0 0 2px #8ada78; }
.kh-support-form-footer,
.kh-support-team-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kh-support-form-footer small { color: #5c704c; }
.kh-support-form-footer button { padding: 0 11px; }
.kh-support-status { min-height: 15px; color: #176d34; font-size: 11px; }

.kh-support-queue { display: grid; gap: 8px; }
.kh-support-call {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 2px solid #84ad52;
  border-radius: 12px;
  background: #fffdf0;
  box-shadow: 0 2px 0 #d5e7a9;
}
.kh-support-call.is-cfh { border-color: #e1982e; }
.kh-support-call-head { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.kh-support-call-head div { display: grid; gap: 1px; }
.kh-support-call-head strong { font-size: 13px; }
.kh-support-call-head small { color: #607457; font-size: 9px; }
.kh-support-call-kind { padding: 3px 6px; border-radius: 999px; background: #dff2b3; color: #316529; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.kh-support-call.is-cfh .kh-support-call-kind { background: #ffe0a3; color: #88430f; }
.kh-support-call > p { margin: 0; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.kh-support-call-response { min-height: 50px; }
.kh-support-call-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.kh-support-call-actions button { flex: 1 1 90px; min-height: 31px; padding: 4px 6px; }
.kh-support-call-actions button[data-support-action="invalid"] { border-color: #9a392d; background: linear-gradient(#ffe3bc, #f0a44b); color: #6e2b20; }
.kh-support-empty { margin: 10px 0 2px; padding: 13px; border: 2px dashed #80ae51; border-radius: 11px; color: #557344; text-align: center; font-size: 12px; font-weight: 800; }

.kh-room-alert-compose {
  display: grid;
  gap: 7px;
  margin-top: 11px;
  padding: 10px;
  border: 2px solid #de941e;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff5b7, #ffe39a);
  box-shadow: inset 0 0 0 2px #fffbd6;
}
.kh-room-alert-compose > div { display: grid; gap: 1px; }
.kh-room-alert-compose > div strong { color: #7c470b; font-size: 13px; }
.kh-room-alert-compose > div small { color: #795d35; font-size: 10px; line-height: 1.25; }
.kh-room-alert-compose code { color: #315a2b; font-family: Consolas, monospace; font-size: 9px; font-weight: 800; }
.kh-room-alert-compose button {
  min-height: 34px;
  padding: 4px 10px;
  border: 2px solid #a85b0b;
  border-radius: 9px;
  background: linear-gradient(#ffdf58, #f2a91f);
  color: #653606;
  box-shadow: 0 2px 0 #a85b0b;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
}
.kh-room-alert-compose button:disabled { cursor: wait; filter: grayscale(.4); opacity: .7; }

.kh-support-moderate { margin-top: 11px; border-top: 2px solid #9abb63; padding-top: 8px; }
.kh-support-moderate summary { cursor: pointer; font-size: 12px; font-weight: 900; }
.kh-support-moderate form { margin-top: 8px; }
.kh-support-moderate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.kh-support-moderate-grid label { display: grid; gap: 3px; }

.kh-support-badges {
  margin-top: 11px;
  padding-top: 8px;
  border-top: 2px solid #9abb63;
}
.kh-support-badges summary { cursor: pointer; color: #125d31; font-size: 12px; font-weight: 900; }
.kh-support-badges form { margin-top: 8px; }
.kh-support-roles form > small { color: #607457; font-size: 9px; line-height: 1.35; }
.kh-admin-badge-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.kh-admin-badge-actions button {
  min-height: 34px;
  border: 2px solid #217535;
  border-radius: 9px;
  background: linear-gradient(#fff5a1, #ffc83c);
  color: #174f2c;
  box-shadow: 0 2px 0 #b77616;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}
.kh-admin-badge-actions button[value="revoke"] {
  border-color: #9a392d;
  background: linear-gradient(#ffe3bc, #f0a44b);
  color: #6e2b20;
}
.kh-admin-badge-actions button:disabled { cursor: wait; filter: grayscale(.35); opacity: .7; }

.kh-message-window {
  position: absolute;
  z-index: 9120;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(580px, calc(100% - 34px));
  max-height: calc(100% - 34px);
  padding: 0;
  overflow: hidden;
  border: 4px solid #176b31;
  border-radius: 17px;
  background: #fffdf0;
  color: #194d2d;
  box-shadow: 0 0 0 3px #f1ffd1, 0 6px 0 #0a4a25, 0 18px 38px #152d2470;
  transform: translate(-50%, -50%);
  animation: kh-room-alert-arrive .24s cubic-bezier(.2, .8, .25, 1.08) both;
}
.kh-support-notice { z-index: 9110; }
.kh-message-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 10px 8px 17px;
  border-bottom: 3px solid #e0a728;
  background: linear-gradient(180deg, #34aa57, #187d3e);
  color: #fff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .28);
}
.kh-message-window-head > strong { min-width: 0; font-size: 18px; line-height: 1.1; overflow-wrap: anywhere; }
.kh-message-window-head > button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid #965012;
  border-radius: 50%;
  background: linear-gradient(#ffe36a, #f4b82c);
  color: #6c3909;
  box-shadow: 0 2px 0 #7c420e, inset 0 1px 0 #fff5ba;
  cursor: pointer;
  font: 1000 20px/1 sans-serif;
}
.kh-message-window-body {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  min-height: 124px;
  padding: 18px 22px;
  overflow: auto;
  background: linear-gradient(180deg, #fffef4, #f8f5e7);
}
.kh-message-window-body > img { display: block; width: 88px; height: 88px; object-fit: contain; }
.kh-message-window-body > p { margin: 0; font-size: 16px; font-weight: 850; line-height: 1.4; overflow-wrap: anywhere; }
.kh-message-window-copy { display: grid; min-width: 0; gap: 5px; }
.kh-message-window-copy small { color: #c27a13; font-size: 9px; font-weight: 1000; letter-spacing: .12em; }
.kh-message-window-copy strong { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.kh-message-window-copy em { color: #61705c; font-size: 10px; font-style: normal; font-weight: 800; }
.kh-message-window-actions {
  display: flex;
  justify-content: center;
  padding: 10px 14px 13px;
  border-top: 2px solid #d8e5bd;
  background: #f4f1e4;
}
.kh-message-window-actions > button {
  min-width: 142px;
  min-height: 37px;
  padding: 7px 20px;
  border: 2px solid #176b31;
  border-radius: 10px;
  background: linear-gradient(#4cc364, #249044);
  color: #fff;
  box-shadow: 0 3px 0 #0f592b, inset 0 1px 0 rgba(255, 255, 255, .25);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
}
.kh-message-window :is(button:hover, button:focus-visible) { filter: brightness(1.05); }
.kh-message-window :is(button:focus-visible) { outline: 3px solid #ffd646; outline-offset: 2px; }
@keyframes kh-room-alert-arrive {
  from { opacity: 0; transform: translate(-50%, calc(-50% - 12px)) scale(.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.kh-badge-notice {
  position: absolute;
  z-index: 9130;
  top: 23%;
  right: 2.2%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 9px;
  width: min(300px, 72%);
  padding: 9px;
  border: 3px solid #176b31;
  border-radius: 14px;
  background: #f5ffd2;
  color: #194e2e;
  box-shadow: 0 4px 0 #0a4a25, 0 12px 24px #153d2d55;
  animation: kh-badge-notice-arrive .28s ease-out;
}
.kh-badge-notice-art {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #14542c;
  background-color: #d8f3aa;
  background-image: var(--kh-badge-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 40px 40px;
  border: 2px solid #6eaa43;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 900;
  image-rendering: auto;
}
.kh-badge-notice > div { min-width: 0; }
.kh-badge-notice small { display: block; color: #558032; font-size: 8px; font-weight: 950; letter-spacing: .08em; }
.kh-badge-notice strong { display: block; margin-top: 1px; font-size: 13px; line-height: 1.1; }
.kh-badge-notice p { margin: 3px 0 0; font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; }
.kh-badge-notice > button {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 2px solid #a55f08;
  border-radius: 50%;
  background: #ffd44d;
  color: #744008;
  cursor: pointer;
  font: 900 16px/1 sans-serif;
}
@keyframes kh-badge-notice-arrive {
  from { opacity: 0; transform: translateX(14px) scale(.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (max-width: 720px) {
  .kh-support-launcher { top: 14%; right: 1%; transform: scale(.9); transform-origin: top right; }
  .kh-support-tool { top: 12%; right: 9%; width: min(340px, 84%); max-height: 76%; }
  .kh-help-tool { top: auto; right: auto; bottom: 60px; left: 2%; width: min(340px, 90%); max-height: 70%; }
  .kh-support-notice { width: 82%; }
  .kh-badge-notice { top: 20%; right: 2%; width: 82%; }
}

/* Mandatory authenticator step for Staff accounts */
body .kh-two-factor-dialog[open] {
  z-index: 12500;
  width: min(470px, calc(100% - 22px));
  max-height: calc(100% - var(--kh-shell-head) - 12px);
  padding: 16px 18px;
  border-color: #176b31;
  background: #fffce8;
  box-shadow: 0 0 0 4px #dfff9d, 0 0 0 8px #176b31, 0 18px 42px rgba(8, 49, 34, .42);
}
body .kh-client:has(.kh-two-factor-dialog[open]) .kh-checkin { filter: brightness(.62) blur(1px); pointer-events: none; }
body .kh-two-factor-dialog > h2 { margin: 5px 40px 6px 0; padding-bottom: 6px; font-size: 28px; }
.kh-two-factor-dialog > p { margin: 2px 0 8px; color: #496650; font-size: 11px; line-height: 1.35; }
.kh-two-factor-dialog form { display: grid; gap: 4px; }
.kh-two-factor-dialog label { color: #31552c; font-size: 11px; font-weight: 950; }
.kh-two-factor-dialog input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 3px solid #78aa50;
  border-radius: 11px;
  background: #fff;
  color: #173d28;
  font: 900 19px/1.1 Consolas, monospace;
  letter-spacing: .34em;
  text-align: center;
}
.kh-two-factor-dialog input:focus { outline: 3px solid rgba(88, 173, 32, .24); border-color: #208940; }
.kh-two-factor-dialog form > button,
.kh-two-factor-setup button {
  min-height: 34px;
  border: 2px solid #176b31;
  border-radius: 10px;
  background: linear-gradient(#fff5a1, #ffc83c);
  color: #174f2c;
  box-shadow: 0 2px 0 #b77616;
  cursor: pointer;
  font-family: inherit;
  font-weight: 900;
}
.kh-two-factor-dialog form > button:disabled { cursor: wait; opacity: .65; }
.kh-two-factor-setup[hidden] { display: none !important; }
.kh-two-factor-setup {
  display: grid;
  gap: 4px;
  margin: 0 0 7px;
  padding: 8px;
  border: 2px solid #65a346;
  border-radius: 12px;
  background: #edffc6;
}
.kh-two-factor-setup > strong { color: #176331; font-size: 13px; }
.kh-two-factor-setup > p { margin: 0; color: #47634d; font-size: 9px; line-height: 1.3; }
.kh-two-factor-setup > .kh-two-factor-setup-grid { display: grid; grid-template-columns: 122px minmax(0, 1fr); gap: 9px; align-items: center; }
.kh-two-factor-qr {
  display: grid;
  place-items: center;
  width: 122px;
  height: 122px;
  box-sizing: border-box;
  padding: 5px;
  border: 2px solid #4f8f3c;
  border-radius: 10px;
  background: #fff;
  color: #55705d;
  font-size: 10px;
  font-weight: 900;
}
.kh-two-factor-qr img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.kh-two-factor-manual { display: grid; gap: 5px; min-width: 0; }
.kh-two-factor-manual > small { color: #47634d; font-size: 9px; font-weight: 950; text-transform: uppercase; }
.kh-two-factor-setup code {
  min-width: 0;
  padding: 7px;
  border: 2px dashed #6e984c;
  border-radius: 8px;
  background: #fffef2;
  color: #194e2e;
  font: 900 13px/1.2 Consolas, monospace;
  overflow-wrap: anywhere;
}
.kh-two-factor-setup button { min-height: 31px; padding: 0 10px; }
.kh-two-factor-note { display: block; margin-top: 5px; color: #6a765b; font-size: 8px; line-height: 1.25; }
@media (max-width: 520px) {
  .kh-two-factor-setup > .kh-two-factor-setup-grid { grid-template-columns: 1fr; justify-items: center; }
  .kh-two-factor-manual { width: 100%; }
}

/* 0.23.0 — compact Staff 2FA and the list-based Nest Navigator. */
body .kh-two-factor-dialog[open] {
  width: 440px;
  max-height: calc(100% - var(--kh-shell-head) - 10px);
  padding: 14px 16px 12px;
  overflow: auto;
  scrollbar-width: none;
}
body .kh-two-factor-dialog[open]::-webkit-scrollbar { display: none; }
body .kh-two-factor-dialog .kh-dialog-close { top: 12px; right: 12px; }
body .kh-two-factor-dialog > h2 { margin: 3px 38px 4px 0; padding-bottom: 4px; font-size: 24px; }
body .kh-two-factor-dialog > p { margin-bottom: 5px; font-size: 10px; }
body .kh-two-factor-setup { gap: 3px; margin-bottom: 5px; padding: 6px; }
body .kh-two-factor-setup > strong { font-size: 11px; }
body .kh-two-factor-setup > .kh-two-factor-setup-grid { grid-template-columns: 104px minmax(0, 1fr); gap: 7px; }
body .kh-two-factor-qr { width: 104px; height: 104px; padding: 4px; border-radius: 8px; }
body .kh-two-factor-setup code { padding: 5px 6px; font-size: 11px; }
body .kh-two-factor-setup button { min-height: 27px; }
body .kh-two-factor-dialog input { height: 38px; padding: 5px 9px; font-size: 17px; }
body .kh-two-factor-dialog form > button { min-height: 30px; }
body .kh-two-factor-note { margin-top: 3px; font-size: 7px; }

body .kh-navigator[open] {
  width: 760px;
  height: 490px;
  max-height: calc(100% - var(--kh-shell-head) - 12px);
  padding: 24px 20px 16px;
  overflow: hidden;
}
body .kh-navigator[open] > h2 { margin: 5px 44px 3px 0; padding: 0; font-size: 28px; }
body .kh-navigator[open] > p { margin: 0 0 8px; color: #496650; font-size: 11px; }
.kh-navigator-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 7px;
  padding: 4px 5px 0;
  border-radius: 12px 12px 0 0;
  background: #267ca2;
  box-shadow: inset 0 -3px 0 #185f7c;
}
.kh-navigator-tabs button {
  min-height: 34px;
  padding: 5px 7px;
  border: 2px solid #174d67;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: #d8eff4;
  color: #19465a;
  cursor: pointer;
  font: 900 11px/1.05 inherit;
}
.kh-navigator-tabs button span { color: #ec5c71; font-size: 13px; }
.kh-navigator-tabs button[aria-selected="true"] { background: #fffce8; color: #174d2a; transform: translateY(2px); }
body .kh-navigator-content { display: block; min-height: 0; }
.kh-navigator-panel {
  height: 292px;
  padding: 9px 10px 8px;
  border: 2px solid #94b77d;
  border-radius: 0 0 12px 12px;
  background: rgba(250, 255, 238, .86);
  box-sizing: border-box;
  overflow: hidden;
}
.kh-navigator-panel[hidden] { display: none !important; }
.kh-navigator-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.kh-navigator-panel > header small { display: block; color: #477058; font-size: 8px; font-weight: 950; letter-spacing: .08em; }
.kh-navigator-panel > header h3 { margin: 1px 0 0; color: #174d2a; font-size: 15px; }
.kh-navigator-panel > header button,
.kh-navigator-create-toggle {
  min-height: 27px;
  padding: 3px 10px;
  border: 2px solid #1b7535;
  border-radius: 9px;
  background: linear-gradient(#fff49c, #ffd344);
  color: #174d2a;
  box-shadow: 0 2px 0 #b87714;
  cursor: pointer;
  font: 900 10px/1 inherit;
}
.kh-navigator-room-list,
.kh-my-nests {
  display: grid;
  gap: 5px;
  max-height: 244px;
  overflow: auto;
  scrollbar-width: none;
}
.kh-navigator-room-list::-webkit-scrollbar,
.kh-my-nests::-webkit-scrollbar { display: none; }
.kh-navigator-room-list > button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 45px;
  padding: 5px 8px;
  border: 2px solid #9fb695;
  border-radius: 9px;
  background: linear-gradient(#ffffff, #f1f5e9);
  color: #274535;
  box-shadow: 0 2px 0 #d1dbc8;
  cursor: pointer;
  text-align: left;
}
.kh-navigator-room-list > button:hover:not(:disabled) { border-color: #4a9d4b; background: #f3ffd9; }
.kh-navigator-room-list > button:disabled { cursor: not-allowed; opacity: .66; }
.kh-room-symbol {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #247e45;
  border-radius: 50%;
  background: #fff48a;
  color: #1c6d3a;
  font-size: 15px;
  font-weight: 950;
}
.kh-navigator-room-list > button > span:nth-child(2) { min-width: 0; }
.kh-navigator-room-list strong,
.kh-navigator-room-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-navigator-room-list strong { font-size: 11px; }
.kh-navigator-room-list small { margin-top: 2px; color: #66766c; font-size: 8px; }
.kh-room-access { color: #52705d; font-size: 12px; }
.kh-room-visitors { min-width: 42px; padding: 3px 6px; border-radius: 999px; background: #ffe06b; color: #684b0f; font-size: 9px; text-align: center; }
.kh-official-room-list > button { grid-template-columns: 34px minmax(0, 1fr) auto; }
.kh-official-room-list > button > b { color: #1d763b; font-size: 9px; }
.kh-navigator-empty,
.kh-navigator-login-note { margin: 18px auto 0; color: #6c7c6f; font-size: 10px; text-align: center; }
.kh-navigator-empty-card[hidden],
.kh-navigator-room-list[hidden] { display: none !important; }
.kh-navigator-empty-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(100%, 400px);
  margin: auto;
  padding: 12px 14px;
  border: 2px solid #9cbd78;
  border-radius: 16px;
  background: linear-gradient(135deg, #f4ffdc, #fffdf0 78%);
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #d6e4c4;
  color: #28543a;
}
.kh-navigator-empty-card > img {
  display: block;
  width: 66px;
  height: 66px;
  object-fit: contain;
}
.kh-navigator-empty-copy { min-width: 0; }
.kh-navigator-empty-copy > strong { display: block; color: #205533; font-size: 13px; line-height: 1.2; }
.kh-navigator-empty-copy > p { margin: 4px 0 0; color: #607761; font-size: 10px; line-height: 1.35; }
.kh-navigator-empty-copy > button {
  min-height: 28px;
  margin-top: 8px;
  padding: 4px 10px;
  border: 2px solid #216d39;
  border-radius: 9px;
  background: linear-gradient(#fff49c, #ffd344);
  color: #174d2a;
  box-shadow: 0 2px 0 #b87714;
  cursor: pointer;
  font: 900 10px/1 inherit;
}
.kh-navigator-empty-copy > button:hover { filter: brightness(1.04); transform: translateY(-1px); }
.kh-navigator-search { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.kh-navigator-search input { flex: 1; height: 32px; }
.kh-nest-create {
  grid-template-columns: repeat(2, minmax(0, 1fr)) 130px;
  align-items: end;
  margin-bottom: 7px;
  padding: 7px;
  border: 2px solid #71a357;
  border-radius: 10px;
  background: #edffc9;
}
.kh-nest-create:not([hidden]) { display: grid; gap: 7px; }
.kh-nest-create label,
.kh-nest-editor-card label { display: grid; gap: 2px; color: #35553f; font-size: 8px; font-weight: 900; }
.kh-nest-create input,
.kh-nest-create textarea,
.kh-nest-create select,
.kh-nest-editor-card input,
.kh-nest-editor-card textarea,
.kh-nest-editor-card select { width: 100%; min-width: 0; box-sizing: border-box; padding: 5px 7px; font-size: 9px; }
.kh-nest-create textarea,
.kh-nest-editor-card textarea { resize: none; }
.kh-nest-create input,
.kh-nest-create textarea,
.kh-nest-create select {
  min-height: 32px;
  border: 2px solid #9dbf7b;
  border-radius: 10px;
  background: linear-gradient(#fff, #fbfff4);
  box-shadow: inset 0 1px 2px rgba(39, 103, 50, .08);
}
.kh-nest-create textarea { height: 32px; overflow: hidden; }
.kh-nest-create input:focus,
.kh-nest-create textarea:focus,
.kh-nest-create select:focus {
  outline: 3px solid rgba(87, 184, 62, .25);
  outline-offset: 1px;
  border-color: #4ea13b;
}
.kh-nest-create > div { display: flex; grid-column: 1 / -1; gap: 6px; justify-content: flex-end; }
.kh-nest-editor button,
.kh-nest-editor-card button {
  min-height: 25px;
  padding: 3px 9px;
  border: 2px solid #1d7438;
  border-radius: 8px;
  background: #fff06e;
  color: #174d2a;
  cursor: pointer;
  font: 900 9px/1 inherit;
}
.kh-nest-editor-card {
  display: grid;
  grid-template-columns: minmax(110px, .9fr) minmax(150px, 1.4fr) 110px auto;
  align-items: end;
  gap: 6px;
  padding: 7px;
  border: 2px solid #a4b89a;
  border-radius: 9px;
  background: #fff;
}
.kh-nest-editor-card > .kh-nest-card-actions { display: grid; grid-template-columns: repeat(2, auto); gap: 4px; }
.kh-nest-editor-card .is-danger { border-color: #9b4237; background: #ffd8bf; color: #7e281d; }
.kh-navigator-status { min-height: 14px; margin: 5px 0 0 !important; color: #2b6839; font-size: 9px !important; font-weight: 900; text-align: center; }
.kh-navigator-status.is-error { color: #a02d20; }

@container kwaak-shell (max-width: 680px) {
  body .kh-navigator[open] { --kh-window-scale: .78; }
}

.kh-navigator-hero {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: -4px 34px 8px 0;
  padding: 7px 10px;
  border: 2px solid #2a7d44;
  border-radius: 14px;
  background:
    radial-gradient(circle at 84% 20%, rgba(255,255,255,.4) 0 12%, transparent 12.5%),
    linear-gradient(110deg, #eaffba, #c9f087 58%, #8fd956);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.48), 0 3px 0 #276a36;
}
.kh-navigator-compass {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid #1f6d3c;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8a8 0 38%, #ffcf3b 39% 64%, #fff6b8 65%);
  color: #1e7440;
  box-shadow: 0 2px 0 #a76b15;
  font-size: 25px;
  font-weight: 950;
}
.kh-navigator-hero .kh-dialog-kicker { padding: 2px 7px; font-size: 7px; }
.kh-navigator-hero h2 { margin: 2px 0 0; color: #174d2a; font-size: 23px; line-height: 1; }
.kh-navigator-hero p { margin: 3px 0 0; color: #42664b; font-size: 9px; line-height: 1.25; }
.kh-navigator-total {
  display: grid;
  min-width: 68px;
  padding: 5px 8px;
  border: 2px solid #2a7d44;
  border-radius: 10px;
  background: #fffceb;
  color: #52705a;
  font-size: 7px;
  text-align: center;
  text-transform: uppercase;
}
.kh-navigator-total b { color: #216f3b; font-size: 15px; line-height: 1; }
.kh-navigator-tabs {
  gap: 5px;
  padding: 5px 6px 0;
  border: 2px solid #236f3c;
  border-bottom: 0;
  background: linear-gradient(#69ba39, #388d2b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -3px 0 #246b2b;
}
.kh-navigator-tabs button {
  position: relative;
  border-color: #246638;
  color: #315d39;
  background: linear-gradient(#f8ffe8, #dcefc3);
  box-shadow: inset 0 1px 0 #fff;
}
.kh-navigator-tabs button[aria-selected="true"] {
  border-color: #235f34;
  background: linear-gradient(#ffe55d, #fff8a9 38%, #fffce8 78%);
  color: #17552d;
}
.kh-navigator-tabs button:hover:not([aria-selected="true"]) { background: linear-gradient(#fff, #ebf8d5); }
.kh-navigator-panel {
  background:
    linear-gradient(rgba(255,255,255,.76), rgba(248,255,228,.9)),
    repeating-linear-gradient(135deg, rgba(91,173,60,.035) 0 8px, transparent 8px 16px);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7);
}
.kh-navigator-room-list > button {
  grid-template-columns: 62px minmax(0, 1fr) auto auto;
  min-height: 50px;
  padding: 4px 8px 4px 4px;
  border-color: #91ad89;
  background: linear-gradient(90deg, #f6ffe4, #fff 40%, #f8f9ed);
}
.kh-room-preview {
  position: relative;
  display: block;
  width: 58px;
  height: 38px;
  overflow: hidden;
  border: 2px solid #2b8145;
  border-radius: 7px;
  background: #dff7de;
  box-shadow: inset 0 0 0 1px #fff;
}
.kh-room-preview img { width: 100%; height: 100%; object-fit: cover; }
.kh-room-preview i {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffe45b;
  color: #1c6d3a;
  box-shadow: 0 0 0 1px #236f3c;
  font: normal 900 9px/1 inherit;
}
.kh-official-room-list > button { grid-template-columns: 62px minmax(0, 1fr) auto; padding-left: 4px; }
.kh-nest-editor-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
  padding: 7px 9px 8px;
  border-color: #87a879;
  background: linear-gradient(100deg, #f3ffe0, #fff 42%);
  box-shadow: 0 2px 0 #d6e0cd;
}
.kh-nest-card-head {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.kh-nest-card-head .kh-room-preview { width: 48px; height: 31px; }
.kh-nest-card-head > span:last-child { min-width: 0; }
.kh-nest-card-head strong,
.kh-nest-card-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-nest-card-head strong { color: #205533; font-size: 10px; }
.kh-nest-card-head small { margin-top: 2px; color: #64806a; font-size: 7px; }
.kh-nest-card-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1.05fr 1.8fr .72fr;
  align-items: end;
  gap: 8px;
  min-width: 0;
}
.kh-nest-editor-card input,
.kh-nest-editor-card textarea,
.kh-nest-editor-card select { min-height: 28px; padding: 5px 8px; font-size: 9px; }
.kh-nest-editor-card textarea { height: 28px; overflow: hidden; }
.kh-nest-editor-card > .kh-nest-card-actions {
  display: flex;
  grid-row: 1;
  grid-column: 2;
  grid-template-columns: none;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.kh-nest-editor-card > .kh-nest-card-actions button {
  min-width: 0;
  min-height: 23px;
  padding: 3px 8px;
  border-width: 1px;
  border-radius: 7px;
  font-size: 8px;
}
.kh-nest-editor-card > .kh-nest-card-actions .is-danger { grid-column: auto; }
.kh-nest-editor-card > .kh-nest-card-actions button:first-child {
  border-color: #176b36;
  background: linear-gradient(#65c965, #32a34a);
  color: #fff;
  box-shadow: 0 2px 0 #16632d;
}
.kh-nest-editor-card > .kh-nest-card-actions button:nth-child(2) {
  background: linear-gradient(#fff49c, #ffd344);
  color: #174d2a;
  box-shadow: 0 2px 0 #b87714;
}
.kh-nest-editor-card > .kh-nest-card-actions .is-danger {
  border-color: #a85f4e;
  background: linear-gradient(#fff1e7, #ffd7c2);
  color: #8b3427;
  box-shadow: 0 1px 0 #c8866f;
}
.kh-navigator-panel > header h3 { letter-spacing: -.01em; }

/* 0.24.0 — everyday Quacker skins, kept on the standard yellow-duck frame grid. */
.kh-guest[data-skin="meadow_dress"] {
  --kh-avatar-atlas: url("../images/skin-meadow-dress-atlas-v1.webp");
  --kh-avatar-motion-side: url("../images/skin-meadow-dress-motion-side-v2.webp");
  --kh-avatar-motion-front: url("../images/skin-meadow-dress-motion-front-v2.webp");
  --kh-avatar-motion-back: url("../images/skin-meadow-dress-motion-back-v2.webp");
  --kh-avatar-wave: url("../images/skin-meadow-dress-wave-front-v2.webp");
}
.kh-guest[data-skin="country_farmer"] {
  --kh-avatar-atlas: url("../images/skin-country-farmer-atlas-v1.webp");
  --kh-avatar-motion-side: url("../images/skin-country-farmer-motion-side-v2.webp");
  --kh-avatar-motion-front: url("../images/skin-country-farmer-motion-front-v2.webp");
  --kh-avatar-motion-back: url("../images/skin-country-farmer-motion-back-v2.webp");
  --kh-avatar-wave: url("../images/skin-country-farmer-wave-front-v2.webp");
}
.kh-guest[data-skin="cozy_baker"] {
  --kh-avatar-atlas: url("../images/skin-cozy-baker-atlas-v1.webp");
  --kh-avatar-motion-side: url("../images/skin-cozy-baker-motion-side-v2.webp");
  --kh-avatar-motion-front: url("../images/skin-cozy-baker-motion-front-v2.webp");
  --kh-avatar-motion-back: url("../images/skin-cozy-baker-motion-back-v2.webp");
  --kh-avatar-wave: url("../images/skin-cozy-baker-wave-front-v2.webp");
}
.kh-guest[data-skin="harbour_sailor"] {
  --kh-avatar-atlas: url("../images/skin-harbour-sailor-atlas-v1.webp");
  --kh-avatar-motion-side: url("../images/skin-harbour-sailor-motion-side-v2.webp");
  --kh-avatar-motion-front: url("../images/skin-harbour-sailor-motion-front-v2.webp");
  --kh-avatar-motion-back: url("../images/skin-harbour-sailor-motion-back-v2.webp");
  --kh-avatar-wave: url("../images/skin-harbour-sailor-wave-front-v2.webp");
}
.kh-guest[data-skin="little_artist"] {
  --kh-avatar-atlas: url("../images/skin-little-artist-atlas-v1.webp");
  --kh-avatar-motion-side: url("../images/skin-little-artist-motion-side-v2.webp");
  --kh-avatar-motion-front: url("../images/skin-little-artist-motion-front-v2.webp");
  --kh-avatar-motion-back: url("../images/skin-little-artist-motion-back-v2.webp");
  --kh-avatar-wave: url("../images/skin-little-artist-wave-front-v2.webp");
}
.kh-profile-kwaker[data-skin="meadow_dress"] {
  --kh-avatar-atlas: url("../images/skin-meadow-dress-atlas-v1.webp");
  --kh-avatar-profile: url("../images/skin-meadow-dress-motion-front-v2.webp");
}
.kh-profile-kwaker[data-skin="country_farmer"] {
  --kh-avatar-atlas: url("../images/skin-country-farmer-atlas-v1.webp");
  --kh-avatar-profile: url("../images/skin-country-farmer-motion-front-v2.webp");
}
.kh-profile-kwaker[data-skin="cozy_baker"] {
  --kh-avatar-atlas: url("../images/skin-cozy-baker-atlas-v1.webp");
  --kh-avatar-profile: url("../images/skin-cozy-baker-motion-front-v2.webp");
}
.kh-profile-kwaker[data-skin="harbour_sailor"] {
  --kh-avatar-atlas: url("../images/skin-harbour-sailor-atlas-v1.webp");
  --kh-avatar-profile: url("../images/skin-harbour-sailor-motion-front-v2.webp");
}
.kh-profile-kwaker[data-skin="little_artist"] {
  --kh-avatar-atlas: url("../images/skin-little-artist-atlas-v1.webp");
  --kh-avatar-profile: url("../images/skin-little-artist-motion-front-v2.webp");
}
.kh-skin-thumb[data-skin-item="meadow_dress"] { background-image: url("../images/skin-meadow-dress-motion-front-v2.webp"); }
.kh-skin-thumb[data-skin-item="country_farmer"] { background-image: url("../images/skin-country-farmer-motion-front-v2.webp"); }
.kh-skin-thumb[data-skin-item="cozy_baker"] { background-image: url("../images/skin-cozy-baker-motion-front-v2.webp"); }
.kh-skin-thumb[data-skin-item="harbour_sailor"] { background-image: url("../images/skin-harbour-sailor-motion-front-v2.webp"); }
.kh-skin-thumb[data-skin-item="little_artist"] { background-image: url("../images/skin-little-artist-motion-front-v2.webp"); }

/* 0.24.3 — one compact lifestyle shop with two catalogues and usable armchairs. */
body .kh-client[data-room="private"] .kh-room-tools [data-action="catalog"] { display: none; }
body [data-catalog] .kh-catalog-quacks { display: none; }
body [data-catalog][data-catalog-mode="skins"] .kh-catalog-quacks { display: inline-flex; }
body [data-catalog][data-catalog-mode="furniture"] [data-catalog-skins-shelf],
body [data-catalog][data-catalog-mode="skins"] [data-catalog-furniture-shelf] { display: none; }
body [data-catalog][data-catalog-mode="furniture"] .kh-catalog-columns,
body [data-catalog][data-catalog-mode="skins"] .kh-catalog-columns { grid-template-columns: minmax(0, 1fr); }
body [data-catalog][data-catalog-mode="furniture"] .kh-catalog-shelf .kh-catalog-grid,
body [data-catalog][data-catalog-mode="skins"] .kh-catalog-shelf .kh-catalog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 760px) {
  body [data-catalog][data-catalog-mode="furniture"] .kh-catalog-shelf .kh-catalog-grid,
  body [data-catalog][data-catalog-mode="skins"] .kh-catalog-shelf .kh-catalog-grid { grid-template-columns: 1fr; }
}

body .kh-shop-seat-layer {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}
body .kh-client[data-room="shop"] .kh-shop-seat-layer { display: block; }

body .kh-shop-seat {
  position: absolute;
  z-index: 1800;
  padding: 0;
  border: 2px dashed transparent;
  border-radius: 42%;
  outline: none;
  color: #174e39;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}
body .kh-shop-seat.is-cream { left: 61.7%; top: 50.1%; width: 11.2%; height: 18.9%; }
body .kh-shop-seat.is-blue { left: 75.7%; top: 50.5%; width: 11.8%; height: 20.7%; }
body .kh-shop-seat:hover,
body .kh-shop-seat:focus-visible { border-color: rgba(255, 237, 92, .96); background: rgba(255, 246, 160, .12); }
body .kh-shop-seat span {
  position: absolute;
  left: 50%;
  bottom: -13px;
  translate: -50% 0;
  padding: 3px 8px;
  border: 2px solid #fff7bd;
  border-radius: 999px;
  background: #31a457;
  box-shadow: 0 2px 0 #18733d;
  color: white;
  font-size: clamp(7px, .8cqw, 10px);
  font-weight: 950;
  opacity: 0;
  transition: opacity .12s ease, translate .12s ease;
  white-space: nowrap;
}
body .kh-shop-seat:hover span,
body .kh-shop-seat:focus-visible span { translate: -50% -3px; opacity: 1; }

body .kh-shop-seat-front {
  position: absolute;
  /* Seats render around depth 61; all walkable actors start at y=68 (z=1680). */
  z-index: 1670;
  inset: 0;
  background: url("../images/quacktown-lifestyle-shop-v1.webp?v=0.24.3-lifestyle-shop-r5") center / cover no-repeat;
  pointer-events: none;
}
body .kh-shop-seat-front.is-cream-left { clip-path: polygon(61.8% 55%, 64.5% 53.8%, 65.1% 68.5%, 62.3% 69.5%); }
body .kh-shop-seat-front.is-cream-right { clip-path: polygon(69.7% 53.6%, 72.5% 54.9%, 72% 69.2%, 69.3% 68.4%); }
body .kh-shop-seat-front.is-cream-base { clip-path: polygon(63.4% 63.6%, 71.7% 63.4%, 72% 69.5%, 63.1% 69.6%); }
body .kh-shop-seat-front.is-blue-left { clip-path: polygon(75.8% 55.7%, 78.8% 54.2%, 79.3% 70.5%, 76.3% 71.5%); }
body .kh-shop-seat-front.is-blue-right { clip-path: polygon(84% 53.8%, 86.8% 55.2%, 86.2% 71.5%, 83.7% 70.7%); }
body .kh-shop-seat-front.is-blue-base { clip-path: polygon(77.4% 64.6%, 85.8% 64.3%, 86.1% 71.8%, 77.1% 72%); }

body .kh-guest[data-seat-kind="shop"],
body .kh-remote-guest[data-seat-kind="shop"] { --seat-pose-y: .1cqw; }

@media (max-width: 760px) {
  body .kh-shop-seat { border-width: 1px; }
  body .kh-shop-seat span { bottom: -10px; padding: 2px 5px; border-width: 1px; }
}
.kh-catalog-item button[data-currency="quacks"] {
  color: #eaffff;
  background: linear-gradient(#3abfd0, #238697);
  box-shadow: 0 2px 0 #17616f;
}

/* 0.24.2 — compact role-aware moderation panel with tabbed tools. */
body .kh-team-tool {
  display: flex;
  flex-direction: column;
  height: min(510px, 76%);
  width: min(570px, 82%);
  max-height: 76%;
  overflow: hidden;
  padding: 0 12px 12px;
}

body .kh-team-tool > header {
  flex: 0 0 auto;
  margin-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.kh-support-team {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(440px, 61vh);
  min-height: 310px;
}
body .kh-team-tool .kh-support-team { flex: 1 1 auto; height: auto; min-height: 0; }

.kh-moderation-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 5px;
  padding: 9px 0 8px;
  border-bottom: 2px solid #8fbc4f;
  background: #f3ffd0;
}

.kh-moderation-tabs > button {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 40px;
  padding: 5px 7px;
  border: 2px solid #74a44c;
  border-radius: 10px;
  background: linear-gradient(#fffef0, #e6f4bd);
  color: #31572e;
  box-shadow: 0 2px 0 #aecb78;
  cursor: pointer;
  font: inherit;
}

.kh-moderation-tabs > button > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #d6efa4;
  color: #246b37;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
}

.kh-moderation-tabs > button > b {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.05;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kh-moderation-tabs > button > em {
  position: absolute;
  top: -6px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border: 2px solid #fff5a3;
  border-radius: 999px;
  background: #df3d31;
  color: #fff;
  box-shadow: 0 2px 0 #8f251f;
  font-size: 9px;
  font-style: normal;
  font-weight: 1000;
}

.kh-moderation-tabs > button:hover { background: #fff9bd; }
.kh-moderation-tabs > button:focus-visible { outline: 3px solid rgba(255, 198, 39, .65); outline-offset: 1px; }
.kh-moderation-tabs > button[aria-selected="true"] {
  border-color: #166e35;
  background: linear-gradient(#43ba5a, #238f44);
  color: #fff;
  box-shadow: 0 3px 0 #145c30;
}
.kh-moderation-tabs > button[aria-selected="true"] > span { background: #fff2a1; color: #166e35; }

.kh-moderation-panel {
  min-height: 0;
  overflow: auto;
  padding: 11px 3px 3px 1px;
  overscroll-behavior: contain;
  scrollbar-color: #71a44c transparent;
  scrollbar-width: thin;
}
.kh-moderation-panel[hidden],
.kh-moderation-tabs > button[hidden] { display: none !important; }

.kh-support-team-head {
  align-items: flex-start;
  margin-bottom: 9px;
  padding: 2px 1px 8px;
  border-bottom: 1px solid #bdd68b;
}
.kh-support-team-head > div { display: grid; gap: 1px; }
.kh-support-team-head > div > strong { color: #174f2c; font-size: 14px; }
.kh-support-team-head p { margin: 0; color: #5a7051; font-size: 10px; }
.kh-support-team-head button { flex: 0 0 auto; padding: 0 11px; }

.kh-moderation-card {
  box-sizing: border-box;
  margin: 0;
  padding: 11px;
  border: 2px solid #83ad55;
  border-radius: 13px;
  background: linear-gradient(145deg, #fffef3, #eefacb);
  box-shadow: 0 3px 0 #d2e5a6, inset 0 0 0 1px #fff;
}

.kh-moderation-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #bfd58f;
}
.kh-moderation-card-head > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 2px solid #258243;
  border-radius: 10px;
  background: #48b75d;
  color: #fff6a6;
  font-size: 17px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 1px #14652f;
}
.kh-moderation-card-head > div { display: grid; gap: 1px; }
.kh-moderation-card-head strong { color: #174f2c; font-size: 14px; }
.kh-moderation-card-head small { color: #607457; font-size: 9px; line-height: 1.25; }

body .kh-support-moderate,
body .kh-room-alert-compose,
body .kh-support-badges {
  margin-top: 0;
  padding-top: 11px;
  border-top: 2px solid #83ad55;
}
body .kh-room-alert-compose { background: linear-gradient(145deg, #fffbd2, #ffe69a); }

.kh-moderation-admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.kh-currency-grant-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kh-currency-grant-form > div { min-width: 0; display: grid; gap: 4px; }
.kh-currency-grant-form .kh-currency-grant-wide { grid-column: 1 / -1; }
.kh-currency-grant-form input, .kh-currency-grant-form select { width: 100%; min-width: 0; }
.kh-currency-grant-form > small { color: #607457; font-size: 9px; line-height: 1.35; }
.kh-currency-grant-form > button:disabled { cursor: wait; opacity: .6; }
.kh-currency-notice-art { width: 40px; height: 40px; object-fit: contain; justify-self: center; }
.kh-badge-notice:not(.kh-currency-notice):not([hidden]) ~ .kh-currency-notice { top: calc(23% + 90px); }
.kh-moderation-admin-grid:not([hidden]) { display: grid; }
.kh-moderation-admin-grid .kh-moderation-card { align-self: start; }
.kh-moderation-admin-grid .kh-moderation-card-head { min-height: 34px; }

@media (max-width: 720px) {
  body .kh-team-tool { right: 7%; width: min(560px, 88%); }
  .kh-support-team { height: min(430px, 64vh); }
  .kh-moderation-tabs { gap: 4px; }
  .kh-moderation-tabs > button { grid-template-columns: 1fr; justify-items: center; min-height: 43px; padding: 4px 3px; }
  .kh-moderation-tabs > button > b { width: 100%; font-size: 8px; text-align: center; }
  .kh-moderation-admin-grid { grid-template-columns: 1fr; }
}

.kh-word-filter-manager { grid-column: 1 / -1; }
.kh-word-filter-mark { font-size: 9px !important; letter-spacing: -.04em; }
.kh-word-filter-add { display: grid; gap: 5px; margin-top: 2px; }
.kh-word-filter-add > label {
  color: #245333;
  font-size: 10px;
  font-weight: 900;
}
.kh-word-filter-add > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.kh-word-filter-add input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 2px solid #78a552;
  border-radius: 10px;
  outline: 0;
  background: #fffef0;
  color: #214e31;
  font: inherit;
  font-size: 11px;
  box-shadow: inset 0 1px 2px rgba(32, 82, 44, .09);
}
.kh-word-filter-add input:focus { border-color: #278f47; box-shadow: 0 0 0 2px rgba(39, 143, 71, .16); }
.kh-word-filter-manager button {
  min-height: 31px;
  box-sizing: border-box;
  padding: 6px 12px;
  border: 2px solid #1e743a;
  border-radius: 9px;
  background: linear-gradient(#4fc267, #279246);
  color: #fff;
  box-shadow: 0 2px 0 #155d31;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 1000;
}
.kh-word-filter-manager button:hover { filter: brightness(1.04); transform: translateY(-1px); }
.kh-word-filter-manager button:active { transform: translateY(1px); box-shadow: none; }
.kh-word-filter-manager button:disabled { cursor: wait; filter: none; transform: none; }
.kh-word-filter-add button {
  min-width: 54px;
  border-color: #b4780e;
  background: linear-gradient(#ffe875, #ffca3b);
  color: #4d4315;
  box-shadow: 0 2px 0 #bd7d0e;
}
.kh-word-filter-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin-top: 9px;
  padding: 7px;
  border: 1px solid #c1d99a;
  border-radius: 10px;
  background: rgba(255, 254, 240, .72);
}
.kh-word-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 5px 4px 8px;
  border: 1px solid #78a552;
  border-radius: 999px;
  background: #fffef0;
  color: #245333;
  font-size: 10px;
  font-weight: 800;
}
.kh-word-filter-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-word-filter-chip > button {
  min-width: 22px;
  min-height: 22px;
  padding: 0 6px;
  border-color: #aa6237;
  border-radius: 999px;
  background: linear-gradient(#ffb07e, #ef814c);
  color: #63301c;
  box-shadow: 0 1px 0 #9a512e;
  line-height: 1;
}
.kh-word-filter-empty { margin: -30px 8px 10px; color: #607457; font-size: 10px; pointer-events: none; }
.kh-word-filter-roles { display: grid; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #bfd58f; }
.kh-word-filter-roles fieldset { display: flex; flex-wrap: wrap; gap: 6px 13px; margin: 0; padding: 0; border: 0; }
.kh-word-filter-roles legend { width: 100%; margin-bottom: 5px; color: #245333; font-size: 10px; font-weight: 900; }
.kh-word-filter-roles label { display: inline-flex; align-items: center; gap: 4px; color: #3f6245; font-size: 10px; font-weight: 800; }
.kh-word-filter-roles input { width: 15px !important; height: 15px; margin: 0; accent-color: #238f44; }
.kh-word-filter-roles > button { justify-self: start; min-width: 104px; }
.kh-word-filter-manager .kh-support-status { display: block; min-height: 14px; margin-top: 8px; color: #426848; font-size: 9px; line-height: 1.35; }
.kh-word-filter-manager.is-busy :is(input, button) { pointer-events: none; opacity: .62; }

.kh-maintenance-screen[hidden] { display: none !important; }
.kh-maintenance-screen {
  position: absolute;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: none;
  touch-action: pan-y;
  background: linear-gradient(135deg, rgba(3, 54, 60, .88), rgba(9, 85, 69, .9));
  backdrop-filter: blur(7px);
}
.kh-maintenance-card {
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 30px);
  width: min(760px, calc(100% - 12px));
  max-height: calc(100% - 12px);
  box-sizing: border-box;
  padding: clamp(20px, 4vw, 34px);
  overflow: auto;
  border: 4px solid #237c39;
  border-radius: 25px;
  outline: 3px solid #fff6b2;
  background: linear-gradient(145deg, #fffef3, #f4f8da);
  box-shadow: 0 8px 0 #164f2b, 0 16px 40px rgba(0, 26, 31, .38), inset 0 0 0 2px #fff;
  color: #18452d;
  text-align: left;
}
.kh-maintenance-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid #8dc85b;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 30%, #fff7b9 0 22%, transparent 23%), linear-gradient(155deg, #e5f6bb, #c2e98a 55%, #8ccc55);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.75), 0 4px 0 #55983e;
}
.kh-maintenance-art img {
  display: block;
  width: 112%;
  max-height: none;
  margin: 0;
  object-fit: contain;
  filter: drop-shadow(0 5px 4px rgba(36, 88, 37, .18));
}
.kh-maintenance-signal {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 3px solid #fff8d3;
  border-radius: 50%;
  background: #e85139;
  color: #fff;
  box-shadow: 0 3px 0 #a53125;
  font-size: 27px;
  font-weight: 1000;
  line-height: 1;
}
.kh-maintenance-copy { display: grid; justify-items: start; min-width: 0; }
.kh-maintenance-kicker {
  padding: 5px 11px;
  border: 2px solid #e9a817;
  border-radius: 999px;
  background: #fff0a2;
  color: #81580b;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .09em;
}
.kh-maintenance-phase {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 17px;
  color: #8a5620;
  font-size: 11px;
  font-weight: 900;
}
.kh-maintenance-phase i {
  width: 9px;
  height: 9px;
  border: 2px solid #b87417;
  border-radius: 50%;
  background: #ffd357;
  box-shadow: 0 0 0 3px rgba(255, 211, 87, .25);
}
.kh-maintenance-card h2 { max-width: 430px; margin: 7px 0 0; color: #17472b; font-size: clamp(25px, 3vw, 36px); line-height: 1.04; }
.kh-maintenance-card p { max-width: 430px; margin: 10px 0 18px; color: #48634d; font-size: 14px; line-height: 1.5; }
.kh-maintenance-card button {
  min-width: 170px;
  padding: 10px 22px;
  border: 2px solid #b5790d;
  border-radius: 12px;
  background: #ffd550;
  color: #24472a;
  box-shadow: 0 3px 0 #bd7e0e;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 1000;
}
.kh-maintenance-card button:disabled { cursor: wait; opacity: .65; }
.kh-maintenance-card small { max-width: 420px; margin-top: 12px; color: #6d785b; font-size: 10px; line-height: 1.45; }

@media (max-width: 620px) {
  .kh-maintenance-screen { padding: 10px; }
  .kh-maintenance-card { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 12px; width: min(430px, 100%); padding: 18px; text-align: center; }
  .kh-maintenance-art { width: min(150px, 42vw); }
  .kh-maintenance-copy { justify-items: center; }
  .kh-maintenance-phase { margin-top: 4px; }
  .kh-maintenance-card h2 { font-size: clamp(25px, 7vw, 32px); }
  .kh-maintenance-card p { margin: 8px 0 14px; font-size: 13px; }
  .kh-maintenance-card small { font-size: 10px; }
}
@media (max-height: 560px) and (min-width: 621px) {
  .kh-maintenance-screen { padding: 8px; }
  .kh-maintenance-card { width: min(700px, calc(100% - 12px)); gap: 16px; padding: 15px 20px; }
  .kh-maintenance-art { width: 150px; }
  .kh-maintenance-phase { margin-top: 7px; }
  .kh-maintenance-card p { margin: 6px 0 10px; font-size: 12px; }
  .kh-maintenance-card small { margin-top: 8px; }
}

/* Furniture placement preview: the same footprint rules are used by the
   final placement check, so the colour on screen matches the click result. */
body .kh-stage.is-placing-furniture { cursor: crosshair; }
body .kh-placement-preview {
  isolation: isolate;
  pointer-events: none !important;
  cursor: crosshair;
  transition: left .045s linear, top .045s linear, opacity .12s ease, filter .12s ease;
  will-change: left, top, opacity, filter;
}
body .kh-placement-preview::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -2%;
  width: var(--placement-footprint-width, 7cqw);
  height: var(--placement-footprint-height, 3cqw);
  transform: translate(-50%, 42%);
  border: 2px solid rgba(31, 132, 50, .92);
  border-radius: 50%;
  background: rgba(99, 204, 68, .25);
  box-shadow: 0 0 0 2px rgba(244, 255, 228, .72), 0 3px 8px rgba(9, 72, 30, .2);
}
body .kh-placement-preview.is-valid {
  opacity: 1;
  filter: drop-shadow(0 7px 4px rgba(4, 42, 48, .23));
}
body .kh-placement-preview.is-invalid {
  opacity: .44;
  filter: grayscale(.2) sepia(.35) saturate(1.8) hue-rotate(316deg) drop-shadow(0 0 4px rgba(186, 43, 32, .95));
}
body .kh-placement-preview.is-invalid::after {
  border-color: rgba(178, 37, 28, .98);
  background: rgba(235, 78, 55, .34);
  box-shadow: 0 0 0 2px rgba(255, 239, 209, .8), 0 3px 9px rgba(115, 18, 13, .3);
}

@media (prefers-reduced-motion: reduce) {
  body .kh-placement-preview { transition: none; }
}

/* 0.36.1 — small Habbo-style context stands.
   These deliberately shed the shared window chrome: a selected thing should
   feel attached to the room instead of opening another dialog. */
body .kh-item-menu:not([hidden]) {
  --kh-window-scale: 1;
  position: fixed;
  z-index: 9300;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 82px;
  width: min(430px, calc(100vw - 18px));
  min-width: 0;
  max-width: calc(100vw - 18px);
  height: auto;
  min-height: 0;
  max-height: none;
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  grid-template-rows: 58px 28px;
  gap: 5px 7px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateX(-50%) !important;
  animation: kh-context-stand-in .14s ease-out both;
}
body .kh-item-menu-head {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  height: 58px;
  padding: 3px 5px 3px 3px;
  border: 2px solid #f8f1a9;
  border-radius: 9px;
  background: linear-gradient(150deg, #f9fbdc, #e8f6c8);
  box-shadow: 0 0 0 2px #2f872c, 0 3px 0 #155d31, 0 7px 12px rgba(4, 45, 46, .2);
}
body .kh-item-menu-preview {
  width: 50px;
  max-height: 50px;
  align-self: center;
  border: 0;
  border-radius: 7px;
  background-color: rgba(255, 255, 255, .62);
  filter: drop-shadow(0 3px 2px rgba(4, 42, 48, .18));
}
body .kh-item-menu-head small {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #9a651f;
  background: transparent;
  font-size: 5px;
  line-height: 1.1;
  letter-spacing: .07em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-item-menu-head h2 {
  margin: 3px 0 0;
  overflow: hidden;
  color: #244f36;
  font-size: 11px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-item-menu-head > button {
  position: absolute;
  z-index: 3;
  right: -7px;
  top: -7px;
  width: 20px;
  min-width: 20px;
  height: 20px;
  padding: 0 0 1px;
  border: 2px solid #fff1a1;
  border-radius: 50%;
  color: #654515;
  background: #ffd647;
  box-shadow: 0 2px 0 #bb7627;
  font-size: 13px;
  line-height: 1;
}
body .kh-item-menu > p { display: none; }
body .kh-item-menu > .kh-item-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  padding: 3px;
  border: 2px solid #2f872c;
  border-radius: 8px;
  background: rgba(238, 248, 218, .94);
  box-shadow: 0 3px 0 #155d31, 0 6px 10px rgba(4, 45, 46, .18);
}
body .kh-item-menu > .kh-item-actions button {
  min-width: 0;
  min-height: 27px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 4px;
  border: 1px solid #b9c8b4;
  border-radius: 6px;
  color: #274f3b;
  background: #fff;
  box-shadow: 0 1px 0 rgba(21, 93, 49, .18);
}
body .kh-item-menu > .kh-item-actions button span {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border-radius: 5px;
  font-size: 11px;
}
body .kh-item-menu > .kh-item-actions button strong {
  min-width: 0;
  overflow: hidden;
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .kh-item-menu.is-garden-item:not([hidden]) {
  width: min(560px, calc(100vw - 18px));
  grid-template-columns: 122px minmax(0, 1fr);
  grid-template-rows: 67px 28px;
}
body .kh-item-menu.is-garden-item .kh-item-menu-head { grid-row: 1; }
body .kh-item-menu.is-garden-item .kh-garden-item-panel {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: minmax(82px, .85fr) minmax(90px, 1fr) minmax(90px, 1fr);
  grid-template-areas: "state growth water" "actions actions actions";
  align-items: center;
  gap: 4px 7px;
  min-width: 0;
  height: 67px;
  margin: 0;
  padding: 5px 6px;
  overflow: hidden;
  border: 2px solid #f8f1a9;
  border-radius: 9px;
  background: linear-gradient(150deg, #f1fad8, #e3f2c3);
  box-shadow: 0 0 0 2px #2f872c, 0 3px 0 #155d31, 0 7px 12px rgba(4, 45, 46, .2);
}
body .kh-item-menu.is-garden-item .kh-garden-item-state {
  grid-area: state;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
}
body .kh-item-menu.is-garden-item .kh-garden-item-state .kh-garden-ui-icon { width: 25px; }
body .kh-item-menu.is-garden-item .kh-garden-item-state small {
  overflow: hidden;
  font-size: 5px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-item-menu.is-garden-item .kh-garden-item-state strong {
  margin-top: 2px;
  overflow: hidden;
  font-size: 8px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-item-menu.is-garden-item .kh-garden-item-meter { min-width: 0; }
body .kh-item-menu.is-garden-item .kh-garden-item-meter:nth-of-type(2) { grid-area: growth; }
body .kh-item-menu.is-garden-item .kh-garden-item-meter:nth-of-type(3) { grid-area: water; }
body .kh-item-menu.is-garden-item .kh-garden-item-meter > span { gap: 3px; font-size: 5px; line-height: 1; }
body .kh-item-menu.is-garden-item .kh-garden-item-meter > span small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-item-menu.is-garden-item .kh-garden-item-meter > i { height: 7px; margin-top: 3px; border-width: 1px; }
body .kh-item-menu.is-garden-item .kh-garden-item-panel > p { display: none; }
body .kh-item-menu.is-garden-item .kh-garden-item-actions {
  grid-area: actions;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}
body .kh-item-menu.is-garden-item .kh-garden-item-actions button {
  min-width: 0;
  min-height: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 4px;
  border-radius: 6px;
  font-size: 6px;
}
body .kh-item-menu.is-garden-item .kh-garden-item-actions .kh-garden-ui-icon { width: 18px; flex: 0 0 18px; }
body .kh-item-menu.is-garden-item .kh-garden-item-actions strong { font-size: 6px; white-space: nowrap; }
body .kh-item-menu.is-garden-item > .kh-item-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-self: stretch;
  padding: 2px;
}
body .kh-item-menu.is-garden-item > .kh-item-actions button { min-height: 24px; height: 24px; }
body .kh-item-menu :is(.kh-garden-item-actions, .kh-item-actions) button:disabled {
  filter: grayscale(.7);
  opacity: .38;
}

body .kh-player-card {
  right: 12px;
  bottom: 82px;
  width: 238px;
  min-width: 0;
  height: 142px;
  min-height: 0;
  display: block;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body .kh-player-card::before { display: none; }
body .kh-player-card-stage {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 68px;
  width: 102px;
  height: 91px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body .kh-player-card-platform {
  left: 3px;
  right: 3px;
  bottom: 1px;
  height: 36px;
  border: 2px solid #275b42;
  border-radius: 0;
  background: linear-gradient(145deg, #edf0dd 0 48%, #cbd8c4 49% 100%);
  box-shadow: 0 2px 0 rgba(21, 80, 52, .35);
  clip-path: polygon(50% 0, 100% 38%, 50% 76%, 0 38%);
}
body .kh-player-card-stage .kh-profile-kwaker {
  position: relative;
  z-index: 2;
  width: 74px;
  margin: 0 0 12px;
  filter: drop-shadow(0 3px 1px rgba(19, 74, 48, .2));
}
body .kh-player-card-copy {
  position: absolute;
  z-index: 2;
  inset: 83px 0 auto;
  display: grid;
  grid-template-rows: 22px 17px 27px;
  gap: 2px;
  padding: 0;
}
body .kh-player-card-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 25px 2px 7px;
  border: 2px solid #f8f1a9;
  border-radius: 999px;
  background: linear-gradient(#64806c, #486955);
  box-shadow: 0 0 0 2px #2f872c, 0 2px 0 #155d31;
}
body .kh-player-card-heading strong {
  color: #fffef0;
  font-size: 9px;
  line-height: 1;
}
body .kh-player-card-heading span,
body .kh-player-card-heading span.is-self {
  padding: 1px 4px;
  border: 0;
  color: #6a4716;
  background: #ffdc4c;
  font-size: 4px;
}
body .kh-player-card-copy > p {
  display: block;
  margin: 0 4px;
  padding: 3px 7px;
  overflow: hidden;
  border-radius: 5px;
  color: #315c43;
  background: rgba(255, 253, 229, .92);
  box-shadow: 0 1px 0 rgba(21, 93, 49, .18);
  font-size: 6px;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-player-card-badges {
  position: absolute;
  z-index: 4;
  right: 7px;
  top: -42px;
  min-height: 0;
  display: block;
  overflow: visible;
}
body .kh-player-card-badge,
body .kh-player-card-badge-art {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}
body .kh-player-card-badge-art.has-image { background-size: 36px 36px; }
body .kh-player-card-actions {
  grid-row: 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 0 3px;
}
body .kh-player-card-actions button {
  height: 25px;
  gap: 3px;
  padding: 2px 5px;
  border-width: 1px;
  border-radius: 6px;
  box-shadow: 0 2px 0 #175d31;
  font-size: 6px;
}
body .kh-player-card-close {
  right: 4px;
  top: 86px;
  width: 18px;
  height: 18px;
  padding: 0 0 1px;
  border-width: 1px;
  box-shadow: 0 1px 0 #c9782e;
  font-size: 12px;
}

@keyframes kh-context-stand-in {
  from { opacity: 0; transform: translateX(-50%) translateY(5px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 0.36.2 — literal room info stands: anchored at the bottom-right, with the
   preview above thin information strips and loose action pills underneath. */
body .kh-item-menu:not([hidden]) {
  left: auto;
  right: max(12px, calc((100vw - min(840px, 100vw)) / 2 + 12px));
  bottom: 82px;
  width: min(300px, calc(100vw - 18px));
  height: 94px;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none !important;
}
body .kh-item-menu-head {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body .kh-item-menu-preview {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 45px;
  width: 52px;
  height: 52px;
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  filter: drop-shadow(0 3px 1px rgba(4, 42, 48, .2));
  isolation: isolate;
}
body .kh-item-menu-preview::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -7px;
  width: 72px;
  height: 29px;
  border: 2px solid #285f45;
  background: linear-gradient(145deg, #eef0df 0 49%, #c8d6c3 50% 100%);
  box-shadow: 0 2px 0 rgba(18, 72, 46, .35);
  clip-path: polygon(50% 0, 100% 38%, 50% 76%, 0 38%);
  transform: translateX(-50%);
}
body .kh-item-menu-head > div {
  position: absolute;
  z-index: 3;
  right: 0;
  top: 47px;
  width: 220px;
  height: 20px;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 1px 23px 1px 8px;
  border: 2px solid #f6efaa;
  border-radius: 999px;
  background: linear-gradient(#617b68, #496653);
  box-shadow: 0 0 0 2px #2f872c, 0 2px 0 #155d31;
}
body .kh-item-menu-head small { display: none; }
body .kh-item-menu-head h2 {
  width: 100%;
  margin: 0;
  overflow: hidden;
  color: #fffef0;
  font-size: 8px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-item-menu-head > button {
  right: 2px;
  top: 49px;
  width: 16px;
  min-width: 16px;
  height: 16px;
  border-width: 1px;
  background: #ffd74d;
  box-shadow: none;
  font-size: 10px;
}
body .kh-item-menu > .kh-item-actions {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: 23px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body .kh-item-menu > .kh-item-actions button,
body .kh-item-menu.is-garden-item .kh-garden-item-actions button {
  min-width: 0;
  min-height: 23px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 5px;
  border: 1px solid #9eafa8;
  border-radius: 999px;
  color: #244b38;
  background: rgba(255, 255, 250, .97);
  box-shadow: 0 1px 0 rgba(24, 75, 48, .28);
}
body .kh-item-menu > .kh-item-actions button span {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border-radius: 50%;
  font-size: 9px;
}
body .kh-item-menu > .kh-item-actions button strong,
body .kh-item-menu.is-garden-item .kh-garden-item-actions strong {
  min-width: 0;
  overflow: hidden;
  font-size: 5.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .kh-item-menu.is-garden-item:not([hidden]) {
  width: min(440px, calc(100vw - 18px));
  height: 119px;
  display: block;
}
body .kh-item-menu.is-garden-item .kh-item-menu-preview { right: 57px; width: 58px; height: 58px; }
body .kh-item-menu.is-garden-item .kh-item-menu-preview::after { width: 80px; height: 31px; }
body .kh-item-menu.is-garden-item .kh-item-menu-head > div { top: 50px; width: 270px; }
body .kh-item-menu.is-garden-item .kh-item-menu-head > button { top: 52px; }
body .kh-item-menu.is-garden-item .kh-garden-item-panel {
  position: absolute;
  z-index: 3;
  top: 73px;
  right: 0;
  width: 330px;
  height: 21px;
  display: grid;
  grid-template-columns: minmax(82px, .82fr) minmax(100px, 1fr) minmax(100px, 1fr);
  grid-template-areas: "state growth water";
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body .kh-item-menu.is-garden-item .kh-garden-item-state,
body .kh-item-menu.is-garden-item .kh-garden-item-meter {
  height: 21px;
  min-width: 0;
  padding: 2px 4px;
  border: 2px solid #2f872c;
  border-radius: 5px;
  background: rgba(235, 247, 209, .97);
  box-shadow: 0 2px 0 #155d31;
}
body .kh-item-menu.is-garden-item .kh-garden-item-state {
  grid-area: state;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 2px;
}
body .kh-item-menu.is-garden-item .kh-garden-item-state .kh-garden-ui-icon { width: 16px; }
body .kh-item-menu.is-garden-item .kh-garden-item-state small { display: none; }
body .kh-item-menu.is-garden-item .kh-garden-item-state strong {
  margin: 0;
  font-size: 5.5px;
  line-height: 1;
}
body .kh-item-menu.is-garden-item .kh-garden-item-meter:nth-of-type(2) { grid-area: growth; }
body .kh-item-menu.is-garden-item .kh-garden-item-meter:nth-of-type(3) { grid-area: water; }
body .kh-item-menu.is-garden-item .kh-garden-item-meter > span { font-size: 4.5px; line-height: 1; }
body .kh-item-menu.is-garden-item .kh-garden-item-meter > i { height: 5px; margin-top: 2px; border-width: 1px; }
body .kh-item-menu.is-garden-item .kh-garden-item-actions {
  position: absolute;
  z-index: 5;
  top: 25px;
  right: 0;
  width: 223px;
  height: 23px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}
body .kh-item-menu.is-garden-item .kh-garden-item-actions .kh-garden-ui-icon { width: 15px; flex: 0 0 15px; }
body .kh-item-menu.is-garden-item > .kh-item-actions {
  left: 0;
  right: auto;
  width: 211px;
}

body .kh-player-card {
  right: 12px;
  bottom: 82px;
  width: 190px;
  height: 119px;
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body .kh-player-card-stage {
  top: 0;
  left: auto;
  right: 37px;
  width: 78px;
  height: 70px;
}
body .kh-player-card-platform {
  left: 1px;
  right: 1px;
  bottom: 0;
  height: 29px;
}
body .kh-player-card-stage .kh-profile-kwaker { width: 56px; margin-bottom: 9px; }
body .kh-player-card-copy {
  inset: 65px 0 auto;
  grid-template-rows: 18px 13px 23px;
  gap: 2px;
}
body .kh-player-card-heading {
  gap: 3px;
  padding: 1px 20px 1px 7px;
  border-width: 1px;
  background: linear-gradient(#68766b, #505e53);
  box-shadow: 0 0 0 1px #2f872c, 0 2px 0 #155d31;
}
body .kh-player-card-heading strong { font-size: 7px; text-align: center; }
body .kh-player-card-heading span,
body .kh-player-card-heading span.is-self { padding: 1px 3px; font-size: 3.5px; }
body .kh-player-card-copy > p {
  margin: 0;
  padding: 1px 4px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 5.5px;
  text-align: center;
}
body .kh-player-card-badges { right: 18px; top: -38px; }
body .kh-player-card-badge,
body .kh-player-card-badge-art { width: 28px; height: 28px; flex-basis: 28px; }
body .kh-player-card-badge-art.has-image { background-size: 28px 28px; }
body .kh-player-card-actions { gap: 3px; padding: 0; }
body .kh-player-card-actions button,
body .kh-player-card-actions button:first-child,
body .kh-player-card[data-card-kind="npc"] .kh-player-card-actions button[data-player-card-action="npc"],
body .kh-player-card[data-card-kind="npc"] .kh-player-card-actions button[data-player-card-action="edit-npc"] {
  height: 23px;
  gap: 3px;
  padding: 2px 5px;
  border: 1px solid #9eafa8;
  border-radius: 999px;
  color: #244b38;
  background: rgba(255, 255, 250, .97);
  box-shadow: 0 1px 0 rgba(24, 75, 48, .28);
  font-size: 5.5px;
}
body .kh-player-card-close {
  z-index: 6;
  right: 2px;
  top: 67px;
  width: 14px;
  height: 14px;
  border-width: 1px;
  background: #ffd74d;
  box-shadow: none;
  font-size: 9px;
}

/* 0.36.3 — readability pass for the literal stands. */
body .kh-player-card { height: 119px; }
body .kh-player-card-copy { grid-template-rows: 18px 23px; gap: 3px; }
body .kh-player-card-copy > p { display: none; }
body .kh-player-card-actions { grid-row: 2; }
body .kh-player-card-badges { top: -47px; }
body .kh-player-card-badge-tooltip {
  right: 0;
  left: auto;
  bottom: calc(100% + 4px);
  width: 118px;
  padding: 5px 6px;
  border: 1px solid #f7efaa;
  border-radius: 6px;
  color: #fffef0;
  background: #3f5c49;
  box-shadow: 0 0 0 1px #2f872c, 0 3px 6px rgba(4, 45, 46, .25);
  transform-origin: right bottom;
}
body .kh-player-card-badge-tooltip strong { margin-bottom: 2px; color: #ffdf59; font-size: 7px; }
body .kh-player-card-badge-tooltip span { color: #fffef0; font-size: 5.5px; line-height: 1.2; }

body .kh-item-menu.is-garden-item .kh-garden-item-state strong { font-size: 6.5px; }
body .kh-item-menu.is-garden-item .kh-garden-item-meter > span { font-size: 5.5px; }
body .kh-item-menu.is-garden-item .kh-garden-item-actions strong,
body .kh-item-menu.is-garden-item > .kh-item-actions button strong { font-size: 6px; }
body .kh-item-menu.is-garden-item > .kh-item-actions button[data-item-action="sit"] { display: none; }
body .kh-item-menu.is-garden-item > .kh-item-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 0.36.4 — preserve the real plant-stage ratio and use one button system. */
body .kh-item-menu.is-garden-item .kh-item-menu-preview {
  z-index: 6;
  top: -22px;
  right: 57px;
  width: 42px;
  height: auto;
  max-height: none;
  aspect-ratio: var(--sprite-ratio, 320 / 533);
  background-size: 500% 100%;
  background-position: var(--garden-stage-position, 0%) bottom;
}
body .kh-item-menu.is-garden-item .kh-item-menu-preview::after {
  bottom: -4px;
  width: 64px;
  height: 25px;
}
body .kh-item-menu.is-garden-item :is(.kh-garden-item-actions, .kh-item-actions) button {
  min-height: 23px;
  height: 23px;
  gap: 3px;
  padding: 2px 5px;
  border: 1px solid #9eafa8;
  border-radius: 999px;
  color: #244b38;
  background: #fffef7;
  box-shadow: 0 1px 0 rgba(24, 75, 48, .28);
  filter: none;
  opacity: 1;
}
body .kh-item-menu.is-garden-item :is(.kh-garden-item-actions, .kh-item-actions) button:disabled {
  border-color: #b7c1b9;
  color: #849087;
  background: #f1f3ea;
  box-shadow: 0 1px 0 rgba(61, 83, 67, .18);
  filter: none;
  opacity: 1;
}
body .kh-item-menu.is-garden-item .kh-garden-item-actions .kh-garden-ui-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border-radius: 50%;
  background-color: #0b8e91;
  box-shadow: inset 0 0 0 1px rgba(3, 78, 78, .35);
}
body .kh-item-menu.is-garden-item .kh-garden-item-actions button:disabled .kh-garden-ui-icon {
  background-color: #a8b4aa;
  filter: grayscale(.55);
}

/* 0.36.5 — desktop room scale. Mobile keeps its existing dedicated layout. */
@media (min-width: 900px) and (min-height: 650px) {
  body {
    padding: 16px 20px;
  }

  body .kh-client:not(.is-fullscreen) {
    width: min(1180px, calc(100vw - 40px), calc((100svh - 112px) * 84 / 53));
  }

  body .kh-item-menu:not([hidden]) {
    position: absolute;
    left: auto;
    right: 16px;
    top: auto;
    bottom: 86px;
    transform: scale(1.15) !important;
    transform-origin: right bottom;
  }

  body .kh-player-card {
    right: 16px;
    bottom: 86px;
    transform: scale(1.12);
    transform-origin: right bottom;
  }
}

/* 0.36.6 — desktop HUD scales with the enlarged room. */
@media (min-width: 900px) and (min-height: 650px) {
  body .kh-dock {
    bottom: 12px;
    width: min(820px, calc(100% - 48px));
    grid-template-columns: repeat(9, minmax(0, 1fr));
    grid-template-rows: 44px 44px;
    gap: 6px;
    padding: 6px;
    border-width: 3px;
    border-radius: 13px;
  }

  body .kh-dock > button {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    height: 44px;
    padding: 3px;
    border-radius: 9px;
  }

  body .kh-dock > button .kh-dock-icon {
    width: 33px;
    height: 33px;
  }

  body .kh-dock > button .kh-dock-help-icon {
    width: 33px;
    height: 33px;
    font-size: 21px;
  }

  body .kh-chat {
    min-height: 44px;
    height: 44px;
    border-radius: 9px;
  }

  body .kh-chat input {
    padding-inline: 14px;
    font-size: 14px;
  }

  body .kh-emote-tray {
    left: max(14px, calc(50% - 410px));
    bottom: 124px;
  }

  body .kh-item-menu:not([hidden]) {
    bottom: 128px;
    transform: scale(1.35) !important;
  }

  body .kh-player-card {
    bottom: 128px;
    transform: scale(1.5);
  }
}

/* 0.36.7 — desktop visual audit fixes.
   Keep the illustrated room large, but never shrink interactive copy to
   decorative sizes. The mobile client has its own stylesheet and breakpoints. */
@media (min-width: 900px) {
  body {
    padding: 8px 10px 14px;
  }

  body .kh-client:not(.is-fullscreen) {
    width: min(1320px, calc(100vw - 20px), calc((100svh - 82px) * 84 / 53));
  }

  /* The dock remains compact enough to leave the room readable. */
  body .kh-dock {
    bottom: 10px;
    width: min(880px, calc(100% - 56px));
    grid-template-rows: 42px 42px;
    gap: 5px;
    padding: 5px;
  }
  body .kh-dock > button {
    min-height: 42px;
    height: 42px;
  }
  body .kh-dock > button .kh-dock-icon,
  body .kh-dock > button .kh-dock-help-icon {
    width: 31px;
    height: 31px;
  }
  body .kh-chat {
    min-height: 42px;
    height: 42px;
  }
  body .kh-chat input { font-size: 14px; }

  /* Every desktop dialog fits inside the game shell. Long content scrolls
     inside the window while headings and primary actions stay reachable. */
  body .kh-dialog[open] {
    --kh-window-scale: 1;
    max-height: calc(100% - var(--kh-shell-head) - 20px);
    overflow-x: hidden;
    overflow-y: auto;
    transform: translate(-50%, -50%) !important;
  }
  body :is(.kh-profile, .kh-achievements-dialog, .kh-garden-dialog, .kh-navigator)[open] {
    width: min(940px, calc(100% - 28px));
    height: min(650px, calc(100% - var(--kh-shell-head) - 20px));
    max-height: calc(100% - var(--kh-shell-head) - 20px);
  }
  body :is(.kh-social-dialog, .kh-tasks, .kh-wallet-dialog, .kh-info-dialog)[open] {
    width: min(860px, calc(100% - 28px));
    height: auto;
    min-height: 380px;
    max-height: calc(100% - var(--kh-shell-head) - 20px);
  }
  body .kh-club-dialog[open] {
    width: min(650px, calc(100% - 28px));
    height: auto;
    max-height: calc(100% - var(--kh-shell-head) - 20px);
    padding-bottom: 22px;
    overflow-y: auto;
  }
  body .kh-club-buy {
    position: sticky;
    z-index: 2;
    bottom: 0;
  }

  /* Sparse lists should not turn into large empty canvases. */
  body .kh-social-dialog[open] .kh-social-layout,
  body .kh-tasks[open] .kh-task-layout,
  body .kh-wallet-dialog[open] .kh-wallet-layout {
    flex: 0 1 auto;
    min-height: 0;
  }

  /* Furniture stand: small and room-attached, with readable controls. */
  body .kh-item-menu:not([hidden]) {
    position: absolute;
    left: auto;
    right: 18px;
    top: auto;
    bottom: 112px;
    width: 400px;
    max-width: calc(100% - 36px);
    height: 150px;
    transform: none !important;
  }
  body .kh-item-menu .kh-item-menu-preview {
    top: -4px;
    right: 67px;
    width: 70px;
    height: 70px;
  }
  body .kh-item-menu .kh-item-menu-preview::after {
    width: 88px;
    height: 34px;
  }
  body .kh-item-menu .kh-item-menu-head > div {
    top: 58px;
    width: 300px;
    height: 29px;
    padding-inline: 12px 32px;
  }
  body .kh-item-menu .kh-item-menu-head h2 {
    font-size: 11px;
  }
  body .kh-item-menu .kh-item-menu-head > button {
    top: 61px;
    width: 22px;
    min-width: 22px;
    height: 22px;
    font-size: 14px;
  }
  body .kh-item-menu > .kh-item-actions {
    height: 36px;
    gap: 6px;
  }
  body .kh-item-menu > .kh-item-actions button,
  body .kh-item-menu.is-garden-item .kh-garden-item-actions button {
    min-height: 36px;
    height: 36px;
    gap: 5px;
    padding: 4px 9px;
    border-width: 2px;
  }
  body .kh-item-menu > .kh-item-actions button span,
  body .kh-item-menu.is-garden-item .kh-garden-item-actions .kh-garden-ui-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    font-size: 13px;
  }
  body .kh-item-menu > .kh-item-actions button strong,
  body .kh-item-menu.is-garden-item .kh-garden-item-actions strong {
    font-size: 10px;
  }

  /* Plant stand: preserve the sprite ratio and give care information its own
     two readable rows instead of squeezing everything into 21 pixels. */
  body .kh-item-menu.is-garden-item:not([hidden]) {
    width: 560px;
    max-width: calc(100% - 36px);
    height: 184px;
  }
  body .kh-item-menu.is-garden-item .kh-item-menu-preview {
    top: -22px;
    right: 78px;
    width: 64px;
    height: auto;
    max-height: none;
  }
  body .kh-item-menu.is-garden-item .kh-item-menu-preview::after {
    width: 86px;
    height: 33px;
  }
  body .kh-item-menu.is-garden-item .kh-item-menu-head > div {
    top: 43px;
    width: 410px;
    height: 30px;
  }
  body .kh-item-menu.is-garden-item .kh-item-menu-head > button { top: 46px; }
  body .kh-item-menu.is-garden-item .kh-garden-item-panel {
    top: 80px;
    right: 0;
    width: 450px;
    height: 46px;
    grid-template-columns: 112px minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-state,
  body .kh-item-menu.is-garden-item .kh-garden-item-meter {
    height: 46px;
    padding: 6px 8px;
    border-radius: 8px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-state {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 5px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-state .kh-garden-ui-icon {
    width: 27px;
    height: 27px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-state strong {
    font-size: 10px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-meter > span {
    font-size: 9px;
    line-height: 1.1;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-meter > i {
    height: 9px;
    margin-top: 6px;
    border-width: 1px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-actions {
    top: auto;
    bottom: 0;
    width: 320px;
    height: 36px;
    gap: 6px;
  }
  body .kh-item-menu.is-garden-item > .kh-item-actions {
    left: 0;
    right: auto;
    width: 230px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Player/NPC stand: retain the Habbo-like silhouette, without 3–7px text. */
  body .kh-player-card {
    right: 18px;
    bottom: 112px;
    width: 286px;
    height: 158px;
    transform: none !important;
  }
  body .kh-player-card-stage {
    top: 0;
    right: 92px;
    width: 102px;
    height: 92px;
  }
  body .kh-player-card-stage .kh-profile-kwaker {
    width: 74px;
    margin-bottom: 12px;
  }
  body .kh-player-card-copy {
    inset: 88px 0 auto;
    grid-template-rows: 28px 36px;
    gap: 6px;
  }
  body .kh-player-card-heading {
    min-height: 28px;
    padding: 4px 30px 4px 10px;
    border-width: 2px;
  }
  body .kh-player-card-heading strong {
    font-size: 12px;
    text-align: left;
  }
  body .kh-player-card-heading span,
  body .kh-player-card-heading span.is-self {
    padding: 2px 5px;
    font-size: 7px;
  }
  body .kh-player-card-copy > p { display: none; }
  body .kh-player-card-badges {
    right: 37px;
    top: -54px;
  }
  body .kh-player-card-badge,
  body .kh-player-card-badge-art {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  body .kh-player-card-badge-art.has-image { background-size: 40px 40px; }
  body .kh-player-card-actions {
    grid-row: 2;
    gap: 6px;
    padding: 0;
  }
  body .kh-player-card-actions button,
  body .kh-player-card-actions button:first-child,
  body .kh-player-card[data-card-kind="npc"] .kh-player-card-actions button[data-player-card-action="npc"],
  body .kh-player-card[data-card-kind="npc"] .kh-player-card-actions button[data-player-card-action="edit-npc"] {
    height: 34px;
    padding: 5px 9px;
    border-width: 2px;
    font-size: 10px;
  }
  body .kh-player-card-close {
    right: 4px;
    top: 91px;
    width: 22px;
    height: 22px;
    font-size: 14px;
  }
  body .kh-player-card-badge-tooltip {
    right: 0;
    left: auto;
    bottom: calc(100% + 7px);
    width: 180px;
    padding: 8px 10px;
    border-width: 2px;
    border-radius: 9px;
  }
  body .kh-player-card-badge-tooltip strong { font-size: 11px; }
  body .kh-player-card-badge-tooltip span { font-size: 9px; line-height: 1.3; }

  /* The moderation panel stays above the HUD and sizes to its active tab. */
  body .kh-team-tool {
    top: calc(var(--kh-shell-head) + 14px);
    right: 72px;
    width: min(590px, calc(100% - 100px));
    height: auto;
    min-height: 0;
    max-height: calc(100% - var(--kh-shell-head) - 132px);
    overflow: hidden;
  }
  body .kh-team-tool .kh-support-team {
    flex: 0 1 auto;
    height: auto;
    min-height: 0;
    max-height: calc(100% - 58px);
  }
  body .kh-moderation-panel {
    min-height: 0;
    max-height: 430px;
    overflow-y: auto;
  }

  /* Garden and achievement copy needs to remain readable at desktop scale. */
  body .kh-garden-profile small,
  body .kh-garden-daily small,
  body .kh-garden-layout header small,
  body .kh-achievement-card-copy > p,
  body .kh-achievement-progress > small,
  body .kh-achievement-card-action > small {
    font-size: 9px;
  }
  body .kh-garden-task-card strong,
  body .kh-garden-order-card strong,
  body .kh-achievement-card-copy > strong { font-size: 12px; }
  body .kh-garden-task-card p,
  body .kh-garden-order-card p { font-size: 10px; }
  body .kh-achievement-card-action > button { font-size: 9px; }

  /* Final readability floor for information that was still rendered at
     5–8px in the desktop dialogs. */
  body .kh-profile-game-stats small,
  body .kh-wallet-summary-column .kh-streak-track span,
  body .kh-social-tools .kh-social-summary small,
  body .kh-social-sections .kh-social-row small,
  body .kh-social-sections .kh-social-row-actions button,
  body .kh-skin-grid small,
  body .kh-public-profile-progress small,
  body .kh-motto-editor > span,
  body .kh-motto-editor small,
  body .kh-achievements-total small,
  body .kh-selected-badge-card small,
  body .kh-achievement-card-copy > p,
  body .kh-achievement-progress > small,
  body .kh-achievement-card-action > small,
  body .kh-garden-layout header small,
  body .kh-garden-card small,
  body .kh-garden-plant-row small,
  body .kh-garden-plant-row div > span,
  body .kh-garden-journal-panel > header small,
  body .kh-garden-book-card > header small,
  body .kh-garden-produce-chip small,
  body .kh-nest-card-head small,
  body .kh-two-factor-note {
    font-size: 9px;
  }
  body .kh-garden-book-stats small { font-size: 8px; }
  body .kh-daily-tasks-panel .kh-task-list small,
  body .kh-info-settings-stack :is(.kh-safety-settings, .kh-account-settings) p,
  body .kh-club-benefits small,
  body .kh-club-order-summary small,
  body .kh-club-no-subscription { font-size: 9px; }
  body .kh-auth-error { font-size: 10px; }
  body .kh-navigator-hero .kh-dialog-kicker,
  body .kh-navigator-total { font-size: 9px; }
  body .kh-player-card-heading span,
  body .kh-player-card-heading span.is-self { font-size: 8px; }
}

/* 0.36.9 — measured desktop readability and content-sized windows.
   Dialog content used 5–10px labels in several screens, and the navigator
   reserved 650px even when its active tab only contained one or two rows. */
@media (min-width: 900px) {
  body .kh-dialog[open] :is(small, label, .kh-dialog-kicker, [class*="meta"], [class*="kicker"]) {
    font-size: max(12px, .8em) !important;
    line-height: 1.25;
  }
  body .kh-dialog[open] :is(p, li) {
    font-size: max(13px, .875em) !important;
    line-height: 1.4;
  }
  body .kh-dialog[open] button:not(.kh-dialog-close) {
    font-size: max(12px, .875em) !important;
    line-height: 1.2;
  }
  body .kh-dialog[open] :is(input:not([type="checkbox"]), select, textarea) {
    font-size: max(13px, .875em) !important;
  }

  body .kh-drawer:not([hidden]) :is(small, label, [class*="meta"], [class*="kicker"]) {
    font-size: max(12px, .8em) !important;
    line-height: 1.25;
  }
  body .kh-drawer:not([hidden]) :is(p, li) {
    font-size: max(13px, .875em) !important;
    line-height: 1.4;
  }
  body .kh-drawer:not([hidden]) button {
    font-size: max(12px, .875em) !important;
    line-height: 1.2;
  }

  /* Keep short navigator tabs close to their content; longer lists scroll
     inside the panel and the dialog remains bounded by the game shell. */
  body .kh-navigator[open] {
    height: auto;
    min-height: 0;
    max-height: min(650px, calc(100% - var(--kh-shell-head) - 20px));
    overflow-x: hidden;
    overflow-y: auto;
  }
  body .kh-navigator[open] .kh-navigator-panel {
    height: auto;
    min-height: 0;
    max-height: 340px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body .kh-navigator-tabs button { min-height: 40px; }

  /* The badge book had a fixed 650px desktop height with only six cards.
     Keep the full badge list visible while sizing the window to its content. */
  body .kh-achievements-dialog[open] {
    height: auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* The empty friends dialog had a 380px floor and stretched two empty-state
     sections into a large blank lower half. Let its content set the height. */
  body .kh-social-dialog[open] {
    height: auto;
    min-height: 0;
  }
  body .kh-social-dialog[open] .kh-social-sections {
    flex: 0 1 auto;
    min-height: 0;
    grid-template-rows: auto;
  }
  body .kh-profile[open] .kh-motto-editor span b,
  body .kh-profile[open] .kh-profile-avatar b { font-size: 12px !important; }
  body .kh-profile[open] .kh-profile-progress header :is(strong, b),
  body .kh-profile[open] .kh-profile-game-stats :is(strong, b) { font-size: 12px !important; }
  body .kh-profile[open] .kh-profile-progress header strong { font-size: 14px !important; }
  body .kh-profile[open] .kh-skin-heading { font-size: 14px !important; }
  body .kh-profile[open] .kh-role-badge-copy strong { font-size: 13px !important; }

  /* The plant stand now has enough width and height for care status and both
     rows of actions to remain readable without touching the room HUD. */
  body .kh-item-menu:not([hidden]):not(.is-garden-item) {
    width: min(450px, calc(100% - 36px));
    height: 166px;
  }
  body .kh-item-menu .kh-item-menu-head h2 { font-size: 15px !important; }
  body .kh-item-menu .kh-item-menu-head small {
    font-size: 12px !important;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  body .kh-item-menu > p,
  body .kh-item-menu .kh-garden-item-panel p {
    font-size: 13px !important;
    line-height: 1.3;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  body .kh-item-menu > .kh-item-actions button strong,
  body .kh-item-menu .kh-garden-item-actions button strong {
    font-size: 12px !important;
    white-space: nowrap;
  }
  body .kh-item-menu > .kh-item-actions button,
  body .kh-item-menu .kh-garden-item-actions button {
    min-height: 40px;
    height: 40px;
    padding: 4px 7px;
  }
  body .kh-item-menu.is-garden-item:not([hidden]) {
    width: min(640px, calc(100% - 36px));
    height: 198px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-panel {
    top: 80px;
    width: min(620px, 100%);
    height: 54px;
    grid-template-columns: 153px minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-state,
  body .kh-item-menu.is-garden-item .kh-garden-item-meter {
    height: 54px;
    padding: 7px 9px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-state {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 5px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-state .kh-garden-ui-icon {
    width: 22px;
    height: 22px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-state small {
    display: block !important;
    font-size: 12px !important;
    line-height: 1.15;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-state strong {
    font-size: 12px !important;
    line-height: 1.15;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-meter > span,
  body .kh-item-menu.is-garden-item .kh-garden-item-meter > span small {
    font-size: 12px !important;
    line-height: 1.2;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-meter > i {
    height: 8px;
    margin-top: 5px;
  }
  body .kh-item-menu.is-garden-item .kh-garden-item-actions {
    bottom: 0;
    width: min(450px, 72%);
    height: 40px;
    gap: 7px;
  }
  body .kh-item-menu.is-garden-item > .kh-item-actions {
    left: 0;
    right: auto;
    width: min(350px, 56%);
    height: 40px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  /* Player cards and the help panel share the same readable desktop scale. */
  body .kh-player-card-heading span,
  body .kh-player-card-heading span.is-self { font-size: 12px !important; }
  body .kh-player-card-actions button {
    min-height: 34px;
    height: 34px;
    font-size: 12px !important;
  }
  body .kh-player-card-badge-tooltip strong { font-size: 12px; }
  body .kh-player-card-badge-tooltip span { font-size: 11px; }
  body .kh-help-tool :is(small, label) { font-size: max(12px, .8em) !important; }
  body .kh-help-tool p { font-size: max(13px, .875em) !important; line-height: 1.4; }
  body .kh-help-tool button { font-size: max(12px, .875em) !important; }
  body .kh-support-launcher small { font-size: 12px !important; }
}

@media (min-width: 900px) {
  /* Read the short labels and status copy that are not marked up as small or
     paragraph text in the original components. */
  body .kh-navigator-room-list strong { font-size: 14px !important; }
  body .kh-navigator-room-list > button > b { font-size: 12px !important; }
  body .kh-nest-create label,
  body .kh-nest-editor-card label { font-size: 12px !important; }
  body .kh-nest-editor-card .kh-nest-card-head strong { font-size: 14px !important; }

  body .kh-event-steps li > span { font-size: 12px !important; }
  body .kh-event-steps strong,
  body .kh-daily-tasks-panel .kh-task-list strong { font-size: 13px !important; }
  body .kh-event-progress :is(strong, span),
  body .kh-daily-progress :is(strong, span) { font-size: 12px !important; }
  body .kh-daily-tasks-panel .kh-task-list b { font-size: 12px !important; }

  body .kh-garden-dialog b { font-size: 12px !important; }
  body .kh-garden-journal b { font-size: 12px !important; }
  body .kh-garden-shop > header > span { font-size: 12px !important; }
  body .kh-garden-catalog .kh-garden-card strong { font-size: 13px !important; }
  body .kh-garden-journal-tabs button strong { font-size: 14px !important; }
  body .kh-garden-book-card > header strong,
  body .kh-garden-task-card strong,
  body .kh-garden-order-card strong { font-size: 13px !important; }
  body .kh-garden-book-stats b { font-size: 12px !important; }
  body .kh-garden-book-stats small { font-size: 12px !important; }
  body .kh-garden-produce { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body .kh-garden-produce-chip :is(small, strong) {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }
  body .kh-garden-produce-chip small { line-height: 1.2; }
  body .kh-garden-produce-chip strong { font-size: 14px !important; }

  body .kh-wallet-dialog .kh-streak-track span { font-size: 12px !important; }
  body .kh-wallet-empty { font-size: 12px !important; }
  body .kh-club-dialog option { font-size: 14px; }
  body .kh-purchase-skin-card > div > span { font-size: 12px !important; }
  body .kh-purchase-wallet strong { font-size: 14px !important; }
  body .kh-social-sections h3 { font-size: 15px !important; }
  body .kh-report-form-footer b { font-size: 12px !important; }

  body .kh-arcade-exchange-options button :is(span, strong, em) {
    font-size: 12px !important;
  }
  body .kh-arcade-exclusive > div > small,
  body .kh-arcade-exclusive > div > p,
  body .kh-arcade-exclusive > button :is(span, strong) { font-size: 12px !important; }
  body .kh-arcade-exchange-status,
  body .kh-weekly-exchange-status { font-size: 12px !important; }

  body .kh-skin-grid button { font-size: 14px !important; }
  body .kh-skin-grid button strong { font-size: 13px !important; }
  body .kh-profile-game-stats b,
  body .kh-open-badgebook strong,
  body .kh-avatar-options strong { font-size: 13px !important; }
  body .kh-news-dialog[open] :is(b, em) { font-size: 12px !important; }
  body .kh-info-dialog strong { font-size: 14px !important; }

  body .kh-catalog-grid > * > strong,
  body .kh-catalog-grid > * > span > strong { font-size: 13px !important; }
  body .kh-inventory-item strong { font-size: 12px !important; }

  body :is(.kh-lilyhop-controls, .kh-canal-race-controls,
    .kh-colour-quack-controls, .kh-claw-game-controls,
    .kh-quack-beat-controls) > p strong { font-size: 12px !important; }
  body :is(.kh-lilyhop-controls, .kh-canal-race-controls,
    .kh-colour-quack-controls, .kh-claw-game-controls,
    .kh-quack-beat-controls) > p span { font-size: 12px !important; line-height: 1.2; }
  body :is(.kh-colour-quack-status, .kh-claw-game-status, .kh-quack-beat-status) {
    font-size: 12px !important;
  }
  body .kh-colour-quack-host > span,
  body .kh-claw-game-chute > span { font-size: 12px !important; }
  body :is(.kh-lilyhop-result-panel, .kh-canal-race-result-panel,
    .kh-colour-quack-result-panel, .kh-claw-game-result-panel,
    .kh-quack-beat-result-panel) :is(b, span) { font-size: 12px !important; }
}

/* 0.36.21 — keep room context cards sharp, readable and fixed at the right. */
@media (min-width: 560px) {
  body .kh-client .kh-item-menu:not([hidden]) {
    position: absolute !important;
    inset: auto !important;
    z-index: 9300;
    display: grid !important;
    grid-template-columns: 124px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) 40px !important;
    align-content: start;
    gap: 8px;
    width: min(460px, calc(100% - 24px)) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100% - 94px);
    padding: 12px;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    border: 2px solid #fff5d9;
    border-radius: 22px;
    color: #244f38;
    background: linear-gradient(145deg, #fff9e5 0%, #f2f8dc 64%, #eaf5d6 100%);
    box-shadow: 0 0 0 3px #328d36, 0 5px 0 #17612e, 0 15px 32px rgba(16, 58, 36, .28);
    transform: none !important;
  }
  body .kh-client .kh-item-menu[hidden] { display: none !important; }
  body .kh-client .kh-item-menu.is-garden-item:not([hidden]) {
    grid-template-columns: 124px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) 40px !important;
  }
  body .kh-client .kh-item-menu .kh-item-menu-head {
    position: relative !important;
    inset: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 126px minmax(0, 1fr) !important;
    align-items: center;
    gap: 5px;
    min-height: 0;
    height: auto !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100%;
    align-self: stretch;
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview {
    position: relative !important;
    inset: auto !important;
    z-index: 2;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 76px !important;
    height: 126px !important;
    max-height: none !important;
    align-self: center;
    justify-self: center;
    border: 0;
    border-radius: 18px;
    background-color: #e2f0c7;
    filter: drop-shadow(0 4px 2px rgba(25, 75, 42, .2));
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview::after {
    bottom: -5px;
    width: 78px;
    height: 31px;
    border: 2px solid #39784d;
    border-radius: 5px;
    background: linear-gradient(145deg, #f0f0df 0 49%, #cfddc8 50% 100%);
    box-shadow: 0 2px 0 rgba(18, 72, 46, .28);
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-item-menu-preview {
    width: 76px !important;
    height: 126px !important;
    background-size: 500% auto;
    background-position: var(--garden-stage-position, 0%) bottom;
  }
  body .kh-client .kh-item-menu .kh-item-menu-head > div {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: grid !important;
    gap: 4px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
  }
  body .kh-client .kh-item-menu .kh-item-menu-head small {
    display: block !important;
    min-height: 0;
    padding: 0;
    overflow: visible;
    color: #a26423;
    background: transparent;
    font-size: 11px !important;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }
  body .kh-client .kh-item-menu .kh-item-menu-head h2 {
    margin: 0;
    padding: 7px 11px;
    overflow: hidden;
    border: 2px solid rgba(255, 248, 204, .8);
    border-radius: 14px;
    color: #fffde8;
    background: linear-gradient(135deg, #3b9143, #287638);
    box-shadow: 0 2px 0 #1b5e30;
    font-size: 17px !important;
    font-weight: 950;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: normal;
  }
  body .kh-client .kh-item-menu .kh-item-menu-head > button {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    bottom: auto !important;
    left: auto !important;
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    padding: 0 0 2px;
    border: 2px solid #f7ebaf;
    border-radius: 50%;
    color: #6b4b18;
    background: #ffd84d;
    box-shadow: 0 2px 0 #ba7928;
    font-size: 20px !important;
    line-height: 1;
  }
  body .kh-client .kh-item-menu > p {
    display: block !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center;
    margin: 0;
    color: #4e6d4c;
    font-size: 13px !important;
    font-weight: 650;
    line-height: 1.35;
  }
  body .kh-client .kh-item-menu.is-garden-item > p { display: none !important; }
  body .kh-client .kh-item-menu.is-garden-item:not([hidden]) .kh-garden-item-panel {
    position: static !important;
    inset: auto !important;
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-areas: "state state" "growth water" "copy copy" "care care" !important;
    gap: 6px;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    margin: 0;
    padding: 9px;
    overflow: visible;
    border: 2px solid #c5dfa1;
    border-radius: 16px;
    background: linear-gradient(145deg, #f7fbdc, #eaf5d2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
  }
  body .kh-client .kh-item-menu .kh-garden-item-panel[hidden] { display: none !important; }
  body .kh-client .kh-item-menu .kh-garden-item-panel:has(.kh-garden-item-actions[hidden]) {
    grid-template-areas: "state state" "growth water" "copy copy" !important;
  }
  body .kh-client .kh-item-menu .kh-garden-item-state {
    grid-area: state;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  body .kh-client .kh-item-menu .kh-garden-item-state .kh-garden-ui-icon { width: 32px; height: 32px; }
  body .kh-client .kh-item-menu .kh-garden-item-state small {
    display: block !important;
    overflow: visible;
    color: #a26423;
    font-size: 12px !important;
    font-weight: 950;
    letter-spacing: .08em;
    line-height: 1.1;
    text-overflow: clip;
    white-space: normal;
  }
  body .kh-client .kh-item-menu .kh-garden-item-state strong {
    display: block;
    margin-top: 3px;
    overflow: visible;
    color: #285c37;
    font-size: 14px !important;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }
  body .kh-client .kh-item-menu .kh-garden-item-meter {
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #c7dda5;
    border-radius: 10px;
    background: rgba(255, 255, 244, .86);
  }
  body .kh-client .kh-item-menu .kh-garden-item-meter > span {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
    font-size: 13px !important;
    line-height: 1.2;
  }
  body .kh-client .kh-item-menu .kh-garden-item-meter > span b { color: #4d6f47; font-size: 13px !important; }
  body .kh-client .kh-item-menu .kh-garden-item-meter > span small {
    min-width: 0;
    overflow: hidden;
    color: #436344;
    font-size: 12px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body .kh-client .kh-item-menu .kh-garden-item-meter > i {
    display: block;
    height: 8px;
    margin-top: 5px;
    overflow: hidden;
    border: 1px solid #a8ca7a;
    border-radius: 999px;
    background: #e0ebcb;
  }
  body .kh-client .kh-item-menu .kh-garden-item-meter > i em {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #54b850, #2d9139);
  }
  body .kh-client .kh-item-menu .kh-garden-item-panel > p {
    grid-area: copy;
    display: block !important;
    margin: 0;
    color: #536c4c;
    font-size: 12px !important;
    line-height: 1.3;
  }
  body .kh-client .kh-item-menu .kh-garden-item-actions {
    position: static !important;
    inset: auto !important;
    grid-area: care;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    min-height: 36px;
  }
  body .kh-client .kh-item-menu .kh-garden-item-actions button,
  body .kh-client .kh-item-menu > .kh-item-actions button {
    min-width: 0;
    min-height: 36px !important;
    height: 36px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1.5px solid #c1d2a7;
    border-radius: 999px;
    color: #315b3c;
    background: linear-gradient(#fffef4, #f7f8e9);
    box-shadow: 0 2px 0 rgba(44, 101, 53, .17);
    font-size: 12px !important;
    line-height: 1.1;
  }
  body .kh-client .kh-item-menu .kh-garden-item-actions button:hover:not(:disabled),
  body .kh-client .kh-item-menu > .kh-item-actions button:hover:not(:disabled) {
    border-color: #6caf55;
    background: #f5fadf;
  }
  body .kh-client .kh-item-menu .kh-garden-item-actions .kh-garden-ui-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }
  body .kh-client .kh-item-menu .kh-garden-item-actions button {
    flex-direction: column;
    gap: 1px;
    padding: 2px 4px;
    min-height: 42px !important;
    height: 42px !important;
  }
  body .kh-client .kh-item-menu .kh-garden-item-actions[hidden],
  body .kh-client .kh-item-menu .kh-garden-item-actions button[hidden] {
    display: none !important;
  }
  body .kh-client .kh-item-menu .kh-garden-item-actions .kh-garden-ui-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }
  body .kh-client .kh-item-menu .kh-garden-item-actions strong,
  body .kh-client .kh-item-menu > .kh-item-actions button strong {
    min-width: 0;
    overflow: hidden;
    font-size: 12px !important;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body .kh-client .kh-item-menu > .kh-item-actions {
    position: static !important;
    inset: auto !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-row: 2 !important;
    grid-column: 1 / -1 !important;
    align-self: stretch;
    gap: 6px;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body .kh-client .kh-item-menu:not(.is-garden-item) > .kh-item-actions:has([data-item-action="sit"]:not([hidden])) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body .kh-client .kh-item-menu > .kh-item-actions button[hidden] { display: none !important; }
  body .kh-client .kh-item-menu > .kh-item-actions button span {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    font-size: 13px;
  }
  body .kh-client .kh-item-menu button:disabled { opacity: .55; }

  body .kh-stage .kh-player-card:not([hidden]) {
    position: absolute !important;
    inset: auto !important;
    z-index: 9300;
    width: min(320px, calc(100% - 24px)) !important;
    height: auto !important;
    min-height: 188px;
    max-height: calc(100% - 110px);
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 104px auto !important;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    overflow: visible;
    border: 2px solid #fff5d9;
    border-radius: 22px;
    color: #244f38;
    background: linear-gradient(145deg, #fff9e5 0%, #f2f8dc 64%, #eaf5d6 100%);
    box-shadow: 0 0 0 3px #328d36, 0 5px 0 #17612e, 0 15px 32px rgba(16, 58, 36, .28);
    transform: none !important;
    animation: none !important;
  }
  body .kh-stage .kh-player-card::before { display: none !important; }
  body .kh-stage .kh-player-card-close {
    position: absolute !important;
    inset: -9px -9px auto auto !important;
    z-index: 8;
    width: 28px;
    height: 28px;
    padding: 0 0 2px;
    border: 2px solid #f7ebaf;
    border-radius: 50%;
    color: #6b4b18;
    background: #ffd84d;
    box-shadow: 0 2px 0 #ba7928;
    font-size: 18px;
    line-height: 1;
  }
  body .kh-stage .kh-player-card-stage {
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    min-height: 104px;
    display: grid;
    place-items: end center;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body .kh-stage .kh-player-card-platform {
    left: 35%;
    right: 35%;
    bottom: 7px;
    height: 34px;
    border: 2px solid #39784d;
    border-radius: 5px;
    background: linear-gradient(145deg, #f0f0df 0 49%, #cfddc8 50% 100%);
    box-shadow: 0 2px 0 rgba(18, 72, 46, .28);
    clip-path: polygon(50% 0, 100% 38%, 50% 76%, 0 38%);
  }
  body .kh-stage .kh-player-card-stage .kh-profile-kwaker {
    position: relative;
    z-index: 2;
    width: 76px;
    margin: 0 0 19px;
    filter: drop-shadow(0 4px 2px rgba(30, 80, 44, .24));
  }
  body .kh-stage .kh-player-card-copy {
    position: relative !important;
    inset: auto !important;
    min-width: 0;
    display: grid !important;
    grid-template-rows: auto auto auto auto !important;
    align-content: start;
    gap: 8px;
    padding: 0;
  }
  body .kh-stage .kh-player-card-heading {
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 2px solid #dce9b6;
    border-radius: 14px;
    color: #fffde8;
    background: linear-gradient(135deg, #3b9143, #287638);
    box-shadow: 0 2px 0 #1b5e30;
  }
  body .kh-stage .kh-player-card-heading strong {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 15px !important;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body .kh-stage .kh-player-card-heading span,
  body .kh-stage .kh-player-card-heading span.is-self {
    flex: 0 0 auto;
    padding: 3px 6px;
    border: 1px solid #e7efc4;
    border-radius: 999px;
    color: #315537;
    background: #f2edb8;
    font-size: 10px !important;
    font-weight: 950;
    letter-spacing: .04em;
  }
  body .kh-stage .kh-player-card-copy > p {
    display: -webkit-box !important;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #4e6d4c;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  body .kh-stage .kh-player-card-badges {
    position: relative !important;
    inset: auto !important;
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  body .kh-stage .kh-player-card-badge,
  body .kh-stage .kh-player-card-badge-art {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  body .kh-stage .kh-player-card-badge-art.has-image { background-size: 34px 34px; }
  body .kh-stage .kh-player-card-actions {
    grid-row: auto !important;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 0;
  }
  body .kh-stage .kh-player-card-actions button,
  body .kh-stage .kh-player-card-actions button:first-child,
  body .kh-stage .kh-player-card[data-card-kind="npc"] .kh-player-card-actions button[data-player-card-action="npc"],
  body .kh-stage .kh-player-card[data-card-kind="npc"] .kh-player-card-actions button[data-player-card-action="edit-npc"] {
    min-width: 0;
    min-height: 36px;
    height: auto;
    gap: 5px;
    padding: 5px 8px;
    border: 1.5px solid #c1d2a7;
    border-radius: 999px;
    color: #315b3c;
    background: linear-gradient(#fffef4, #f7f8e9);
    box-shadow: 0 2px 0 rgba(44, 101, 53, .17);
    font-size: 12px !important;
    line-height: 1.1;
  }
  body .kh-stage .kh-player-card-actions button[hidden] { display: none !important; }
  body .kh-stage .kh-player-card[data-card-kind="npc"] .kh-player-card-actions { grid-template-columns: 1fr; }
  body .kh-stage .kh-player-card[data-card-kind="npc"] .kh-player-card-actions button[data-player-card-action="npc"],
  body .kh-stage .kh-player-card[data-card-kind="npc"] .kh-player-card-actions button[data-player-card-action="edit-npc"] {
    color: #fffde8;
    border-color: #358348;
    background: linear-gradient(#50b451, #2e8a39);
    box-shadow: 0 2px 0 #175d31;
  }
}

@media (min-width: 700px) and (max-width: 899px) {
  body .kh-client .kh-item-menu:not([hidden]) { width: min(430px, calc(100% - 24px)) !important; }
  body .kh-stage .kh-player-card:not([hidden]) { width: min(330px, calc(100% - 24px)) !important; }
}

@media (min-width: 560px) and (max-width: 699px) {
  body .kh-client .kh-item-menu:not([hidden]) {
    width: min(430px, calc(100% - 16px)) !important;
    max-height: calc(100% - 82px);
    padding: 9px;
    gap: 6px;
    grid-template-columns: 116px minmax(0, 1fr) !important;
  }
  body .kh-client .kh-item-menu.is-garden-item:not([hidden]) {
    grid-template-columns: 116px minmax(0, 1fr) !important;
  }
  body .kh-client .kh-item-menu .kh-item-menu-head {
    grid-template-rows: 113px minmax(0, 1fr) !important;
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview,
  body .kh-client .kh-item-menu.is-garden-item .kh-item-menu-preview {
    width: 68px !important;
    height: 113px !important;
  }
  body .kh-client .kh-item-menu .kh-item-menu-head h2 { font-size: 14px !important; }
  body .kh-client .kh-item-menu .kh-garden-item-state strong { font-size: 13px !important; }
  body .kh-client .kh-item-menu .kh-garden-item-meter > span,
  body .kh-client .kh-item-menu .kh-garden-item-meter > span small { font-size: 11px !important; }
  body .kh-client .kh-item-menu .kh-garden-item-actions { gap: 4px; }
  body .kh-client .kh-item-menu .kh-garden-item-actions button { min-height: 32px !important; height: 32px !important; padding-inline: 4px; }
  body .kh-client .kh-item-menu .kh-garden-item-actions strong { font-size: 10px !important; }
  body .kh-client .kh-item-menu .kh-garden-item-actions button {
    min-height: 40px !important;
    height: 40px !important;
    gap: 1px;
  }
  body .kh-client .kh-item-menu .kh-garden-item-actions .kh-garden-ui-icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }
  body .kh-client .kh-item-menu .kh-garden-item-actions strong { font-size: 11px !important; }
}

/* 0.36.22 — keep the garden info stand as crisp as the player card. */
@media (min-width: 560px) {
  body .kh-client .kh-item-menu.is-garden-item:not([hidden]) {
    animation: none !important;
    transition: none !important;
    background: #fffbea;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-item-menu-head small,
  body .kh-client .kh-item-menu.is-garden-item .kh-garden-item-state small {
    color: #7d4d1d;
    font-size: 13px !important;
    font-weight: 950;
    text-shadow: none;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-item-menu-head h2 {
    font-size: 18px !important;
    font-weight: 950;
    text-shadow: none;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-garden-item-panel {
    border-color: #a9ca82;
    background: #f7f8e8;
    box-shadow: inset 0 1px 0 #fffef6;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-garden-item-state {
    background: #edf5d8;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-garden-item-state strong {
    color: #244d32;
    font-size: 16px !important;
    font-weight: 950;
    text-shadow: none;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-garden-item-meter {
    border-color: #a9c781;
    background: #fffef7;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-garden-item-meter > span,
  body .kh-client .kh-item-menu.is-garden-item .kh-garden-item-meter > span small {
    color: #244d32;
    font-size: 14px !important;
    font-weight: 800;
    text-shadow: none;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-garden-item-meter > span b {
    color: #244d32;
    font-size: 14px !important;
    font-weight: 950;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-garden-item-panel > p {
    color: #365d3b;
    font-size: 14px !important;
    font-weight: 700;
    text-shadow: none;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-garden-item-state .kh-garden-ui-icon,
  body .kh-client .kh-item-menu.is-garden-item .kh-item-menu-preview {
    filter: none !important;
  }
  body .kh-client .kh-item-menu.is-garden-item > .kh-item-actions button strong {
    font-size: 13px !important;
    font-weight: 950;
    text-shadow: none;
  }
}

/* 0.36.23 — align the item close control with the profile card. */
@media (min-width: 560px) {
  body .kh-client .kh-item-menu:not([hidden]) > .kh-item-menu-head {
    position: static !important;
  }
  body .kh-client .kh-item-menu:not([hidden]) > .kh-item-menu-head > button {
    top: 6px !important;
    right: 6px !important;
    z-index: 8;
  }
  body .kh-client .kh-item-menu.is-garden-item:not([hidden]) .kh-garden-item-state {
    margin-right: 38px;
  }
}

/* 0.36.26 — use a square preview canvas and preserve each furniture sprite's proportions. */
@media (min-width: 761px) {
  body .kh-client .kh-item-menu .kh-item-menu-head {
    grid-template-rows: 100px minmax(0, 1fr) !important;
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview {
    position: relative !important;
    inset: auto !important;
    display: block;
    width: 90px !important;
    height: 90px !important;
    aspect-ratio: 1 !important;
    align-self: center;
    justify-self: center;
    box-sizing: border-box;
    overflow: hidden;
    border: 2px solid #c2d997 !important;
    border-radius: 20px !important;
    background: linear-gradient(145deg, #fffef4, #edf5d8) !important;
    box-shadow: inset 0 1px 0 #fff, 0 3px 0 #adca82, 0 7px 13px rgba(35, 79, 40, .14);
    filter: none !important;
    transform: none !important;
  }
  body .kh-client .kh-item-menu.is-garden-item .kh-item-menu-preview {
    width: 90px !important;
    height: 90px !important;
    max-height: none !important;
    aspect-ratio: 1 !important;
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    width: var(--item-menu-art-width, 58px);
    height: var(--item-menu-art-height, 58px);
    background-repeat: no-repeat;
    filter: drop-shadow(0 4px 3px rgba(36, 64, 35, .2));
    transform: translate(-50%, -50%);
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview:not(.is-image-furniture):not(.is-garden-sprite)::before {
    background-image: url("../images/kwaken-furniture-atlas-v1.webp");
    background-size: var(--atlas-size-x) var(--atlas-size-y);
    background-position: var(--atlas-x) var(--atlas-y);
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview.is-rotated:not(.is-image-furniture):not(.is-garden-sprite)::before {
    background-image: url("../images/kwaken-furniture-atlas-rotated-v1.webp");
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview.is-image-furniture::before {
    background-image: var(--furniture-image);
    background-position: center bottom;
    background-size: contain;
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview.is-garden-sprite::before {
    top: 100%;
    background-image: var(--furniture-image);
    background-size: 500% 100%;
    background-position: var(--garden-stage-position, 0%) bottom;
    transform: translate(-50%, -100%) scale(1.16);
    transform-origin: 50% 100%;
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview.is-mirrored::before {
    transform: translate(-50%, -50%) scaleX(-1);
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview.is-garden-sprite.is-mirrored::before {
    transform: translate(-50%, -100%) scale(1.16) scaleX(-1);
    transform-origin: 50% 100%;
  }
  body .kh-client .kh-item-menu .kh-item-menu-preview::after {
    display: none !important;
  }
}

/* 0.36.28 — give the desktop Nest navigator a compact, portrait game-window shape. */
@media (min-width: 900px) {
  body .kh-navigator[open] {
    --kh-window-scale: 1;
    width: min(520px, calc(100% - 28px)) !important;
    height: min(630px, calc(100% - var(--kh-shell-head) - 34px)) !important;
    min-height: min(580px, calc(100% - var(--kh-shell-head) - 34px));
    max-height: calc(100% - var(--kh-shell-head) - 34px);
    display: grid;
    /* The existing hero becomes the shared titlebar at runtime. */
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    align-content: stretch;
    gap: 0;
    padding: 14px !important;
    overflow: hidden !important;
    border-radius: 23px;
  }

  body .kh-navigator[open] > .kh-dialog-close {
    top: 20px;
    right: 19px;
  }

  body .kh-navigator[open] .kh-navigator-hero {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 78px;
    margin: 0 0 8px;
    padding: 8px 50px 8px 9px;
    border-color: #246d39;
    border-radius: 15px;
    background:
      radial-gradient(circle at 84% 18%, rgba(255,255,255,.18) 0 12%, transparent 12.5%),
      linear-gradient(115deg, #287a3a, #4da83a 62%, #7bc943);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 3px 0 #1f6032;
  }
  body .kh-navigator[open] .kh-navigator-compass {
    width: 38px;
    height: 38px;
    border-width: 2px;
    border-color: #f0d35c;
    font-size: 22px;
  }
  body .kh-navigator[open] .kh-navigator-hero .kh-dialog-kicker {
    padding: 0;
    color: #fff1a0;
    font-size: 10px !important;
    letter-spacing: .07em;
  }
  body .kh-navigator[open] .kh-navigator-hero h2 {
    margin: 2px 0 0;
    color: #fffef0;
    font-size: 20px;
    line-height: 1.05;
  }
  body .kh-navigator[open] .kh-navigator-hero p {
    margin: 3px 0 0;
    color: #e9f5d7;
    font-size: 10px !important;
    line-height: 1.2;
  }
  body .kh-navigator[open] .kh-navigator-total {
    min-width: 58px;
    padding: 4px 6px;
    border-color: #d2e6a5;
    border-radius: 10px;
    background: #fffce9;
  }

  body .kh-navigator[open] .kh-navigator-tabs {
    align-self: start;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 5px 5px 0;
    border: 2px solid #246b38;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(#69b943, #388d35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.38), inset 0 -3px 0 #246b2b;
  }
  body .kh-navigator[open] .kh-navigator-tabs button {
    min-width: 0;
    min-height: 42px;
    padding: 5px 3px;
    border-color: #2e7540;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    color: #315d39;
    background: linear-gradient(#f8ffe8, #dcefc3);
    box-shadow: inset 0 1px 0 #fff;
    font-size: 12px !important;
    font-weight: 950;
    line-height: 1.05;
  }
  body .kh-navigator[open] .kh-navigator-tabs button span {
    color: #d57232;
    font-size: 12px;
  }
  body .kh-navigator[open] .kh-navigator-tabs button[aria-selected="true"] {
    position: relative;
    z-index: 1;
    border-color: #235f34;
    background: linear-gradient(#ffe55d, #fff8a9 38%, #fffce8 78%);
    color: #17552d;
    box-shadow: inset 0 1px 0 #fff;
    transform: translateY(2px);
  }

  body .kh-navigator[open] .kh-navigator-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    overflow: hidden;
  }
  body .kh-navigator[open] .kh-navigator-panel {
    display: flex;
    height: 100%;
    min-height: 0;
    max-height: none;
    flex-direction: column;
    padding: 12px;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
  }
  body .kh-navigator[open] .kh-navigator-panel > header {
    flex: 0 0 auto;
    margin-bottom: 9px;
  }
  body .kh-navigator[open] .kh-navigator-room-list,
  body .kh-navigator[open] .kh-my-nests {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #88b96a #edf5d9;
  }
  body .kh-navigator[open] .kh-my-nests > .kh-nest-editor-card {
    align-self: start;
    width: 100%;
  }
  body .kh-navigator[open] .kh-nest-card-head strong { font-size: 11px; }
  body .kh-navigator[open] .kh-nest-card-head small { font-size: 8px; }
  body .kh-navigator[open] .kh-nest-editor-card label { font-size: 9px; }
  body .kh-navigator[open] .kh-nest-editor-card input,
  body .kh-navigator[open] .kh-nest-editor-card textarea,
  body .kh-navigator[open] .kh-nest-editor-card select { min-height: 30px; font-size: 10px; }
  body .kh-navigator[open] .kh-nest-create:not([hidden]) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  body .kh-navigator[open] .kh-nest-create > label:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  body .kh-navigator[open] .kh-nest-create > label:nth-child(3) { grid-column: 2; grid-row: 1; }
  body .kh-navigator[open] .kh-nest-create textarea { height: 42px; min-height: 42px; overflow-y: auto; }
  body .kh-navigator[open] .kh-nest-create > div { grid-row: 3; }
  body .kh-navigator[open] .kh-navigator-room-list > button {
    min-height: 48px;
    border-radius: 10px;
  }
  body .kh-navigator[open] .kh-navigator-status {
    min-height: 16px;
    margin: 4px 0 0 !important;
  }
}

/* 0.36.34 — contain plant art and keep all visible garden cards fully framed. */
body .kh-garden-card {
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  min-height: 72px;
  gap: 8px;
  padding: 5px 7px;
}
body .kh-garden-card-canvas,
body .kh-garden-plant-canvas {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 1px solid #d2e5b1;
  border-radius: 10px;
  background: linear-gradient(145deg, #f6f8df, #e9f3d5);
}
body .kh-garden-card-art {
  width: var(--garden-art-width, 32px);
  height: var(--garden-art-height, 52px);
  max-width: 52px;
}
body .kh-garden-card > div { min-width: 0; }
body .kh-garden-card button {
  width: 58px;
  min-width: 58px;
  justify-content: center;
}
body .kh-garden-overview {
  align-self: start;
  height: fit-content;
  max-height: 100%;
}
body .kh-garden-plant-canvas { width: 44px; height: 44px; }
body .kh-garden-plant-art {
  width: var(--garden-art-width, 24px);
  height: var(--garden-art-height, 40px);
  max-width: 40px;
}

body .kh-garden-book-card {
  grid-template-columns: minmax(0, 1fr) minmax(205px, 216px);
  gap: 8px 10px;
  padding: 9px;
}
body .kh-garden-book-stats { gap: 5px; }
body .kh-garden-book-stats > span {
  min-height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 3px;
}
body .kh-garden-journal .kh-garden-book-stats small {
  overflow: visible;
  color: #52694b;
  font-size: 10px !important;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-overflow: clip;
  text-transform: none;
  white-space: normal;
}
body .kh-garden-book-stages > .kh-garden-book-stage {
  display: grid;
  place-items: center;
  aspect-ratio: 1.15;
  overflow: hidden;
}
body .kh-garden-book-stage-art {
  display: block;
  width: var(--garden-art-width, 30px);
  height: var(--garden-art-height, 50px);
  max-width: 90%;
}

@media (max-width: 760px) {
  body .kh-garden-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(230px, 1fr) minmax(130px, .55fr);
  }
  body .kh-garden-overview { min-height: 130px; }
  body .kh-garden-book { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  body .kh-garden-catalog { grid-template-columns: minmax(0, 1fr); }
  body .kh-garden-book-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "heading" "stats" "stages";
  }
  body .kh-garden-book-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 0.36.35 — readable badge cards and five compact info stand slots. */
body .kh-achievements-dialog[open] {
  display: flex;
  flex-direction: column;
  width: min(940px, calc(100vw - 48px));
  height: min(650px, calc(100vh - var(--kh-shell-head) - 24px));
  min-height: min(500px, calc(100vh - var(--kh-shell-head) - 24px));
  max-height: calc(100vh - var(--kh-shell-head) - 24px);
  overflow: hidden;
}
body .kh-achievements-heading { flex: 0 0 auto; }
body .kh-achievements-content {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(190px, .62fr) minmax(0, 1.85fr);
  gap: 14px;
}
body .kh-achievement-collection { min-width: 0; min-height: 0; overflow: hidden; }
body .kh-achievement-list {
  grid-auto-rows: minmax(118px, auto);
  gap: 10px;
  padding: 2px 10px 10px 2px;
  scrollbar-width: thin;
  scrollbar-color: #62b735 #e5efce;
}
body .kh-achievement-card {
  grid-template-columns: 50px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px 10px;
  min-height: 118px;
  padding: 10px 12px;
}
body .kh-achievement-badge-art { grid-column: 1; grid-row: 1; }
body .kh-achievement-card-copy { grid-column: 2; grid-row: 1; }
body .kh-achievement-card-copy > strong { font-size: 12px !important; }
body .kh-achievement-card-copy > p { font-size: 10px !important; line-height: 1.35; }
body .kh-achievement-card.is-role-award .kh-achievement-card-copy > p {
  display: block;
  margin: 3px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-achievement-card-action {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #dce8c9;
}
body .kh-achievement-card-action > small { min-width: 0; font-size: 9px !important; }
body .kh-achievement-card-action > button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 9px !important;
  white-space: nowrap;
}
body .kh-achievement-card.is-locked {
  color: #425c3f;
  background: linear-gradient(160deg, #fbfcf3, #eef2e3);
  filter: none;
}
body .kh-achievement-card.is-locked .kh-achievement-badge-art { filter: grayscale(1) opacity(.5); }
body .kh-achievement-card-team {
  border-color: #65a83c;
  background: linear-gradient(145deg, #fff9cf, #eff8d7);
}
body .kh-achievement-card-team .kh-achievement-card-copy > p { margin-bottom: 4px; }
body .kh-achievement-team-status { display: block; color: #4f7537; font-size: 9px; font-weight: 900; }
body .kh-achievement-team-action { display: flex; justify-content: flex-end; }
body .kh-achievement-team-action > button[aria-pressed="true"] {
  border-color: #a66b15;
  color: #65410d;
  background: #ffda50;
  box-shadow: 0 2px 0 #a56a1b;
}
body .kh-selected-badge-previews { min-height: 32px; gap: 3px; margin-bottom: 10px; }
body .kh-selected-badge-preview { width: 22px; height: 22px; flex-basis: 22px; }
body .kh-player-card-badges { flex-wrap: nowrap; gap: 3px; }
body .kh-player-card-badge,
body .kh-player-card-badge-art { width: 27px; height: 27px; flex-basis: 27px; }
body .kh-player-card-badge-art.has-image { background-size: 27px 27px; }

@media (max-width: 760px) {
  body .kh-achievements-dialog[open] {
    width: calc(100vw - 24px);
    height: min(760px, calc(100vh - 24px));
    min-height: 0;
    max-height: calc(100vh - 24px);
    padding: 20px 14px 14px;
  }
  body .kh-achievements-content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
  }
  body .kh-selected-badge-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-items: start;
    gap: 8px 12px;
    padding: 10px 12px;
    text-align: left;
  }
  body .kh-selected-badge-previews { grid-column: 1; grid-row: 1; margin: 0; }
  body .kh-selected-badge-card > div { grid-column: 2; grid-row: 1; align-self: center; }
  body .kh-selected-badge-card > button { grid-column: 1 / -1; grid-row: 2; }
  body .kh-achievement-list { grid-template-columns: minmax(0, 1fr); grid-auto-rows: minmax(112px, auto); }
}

@media (max-width: 520px) {
  body .kh-achievements-dialog[open] { padding: 20px 10px 10px; }
  body .kh-achievements-heading { gap: 8px; padding-right: 42px; }
  body .kh-achievements-heading h2 { font-size: 22px; }
  body .kh-achievements-heading p { font-size: 9px; }
  body .kh-achievements-total { min-width: 56px; padding: 6px; }
  body .kh-achievement-card { grid-template-columns: 40px minmax(0, 1fr); gap: 6px 8px; padding: 9px; }
  body .kh-achievement-badge-art { width: 38px; height: 38px; }
  body .kh-achievement-card-action > small { font-size: 8px !important; }
  body .kh-player-card-badge,
  body .kh-player-card-badge-art { width: 22px; height: 22px; flex-basis: 22px; }
  body .kh-player-card-badge-art.has-image { background-size: 22px 22px; }
}

/* A single segmented balance bar keeps all balances connected. */
body .kh-top-balances {
  justify-self: center;
  display: flex;
  align-items: stretch;
  gap: 0;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  padding: 3px;
  overflow: hidden;
  border: 2px solid #f7ffe8;
  border-radius: 13px;
  background: #347b24;
  box-shadow: 0 3px 0 #2a681d, inset 0 1px 0 rgba(255,255,255,.36);
}
body .kh-top-balances > button {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 38px;
  height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(83, 118, 39, .28);
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.58);
  transition: filter .15s ease, background-color .15s ease;
}
body .kh-top-balances > button + button { border-left: 0; }
body .kh-top-balances > button:first-child { border-radius: 7px 0 0 7px; }
body .kh-top-balances > button:last-child { border-radius: 0 7px 7px 0; }
body .kh-top-balances > .kh-top-leaves {
  width: 72px;
  background: linear-gradient(180deg, #e4f8a4, #a7dc64);
}
body .kh-top-balances > .kh-top-wallet {
  width: 96px;
  background: linear-gradient(180deg, #ffec84, #ffd446);
}
body .kh-top-balances > .kh-top-quacks {
  width: 82px;
  background: linear-gradient(180deg, #9df7f0, #45c8d0);
}
body .kh-top-balances > .kh-top-club {
  width: 70px;
  min-height: 38px;
  grid-template-columns: none;
  grid-template-rows: none;
  gap: 6px;
  padding-inline: 7px;
  background: linear-gradient(180deg, #ffe567, #ffc52f);
}
body .kh-top-balances > .kh-top-arcade { display: none; }
body .kh-top-balances > button > span {
  grid-row: auto;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-width: 22px;
}
body .kh-top-balances > button > .kh-currency-icon { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body .kh-top-balances > button > .kh-currency-icon img { width: 100%; height: 100%; }
body .kh-top-balances > button strong { display: block; margin: 0; font-size: 12px; line-height: 1; text-align: left; white-space: nowrap; }
body .kh-top-balances > .kh-top-club strong { font-size: 11px; }
body .kh-top-balances > .kh-top-arcade small { margin-top: 2px; font-size: 7px; }
body .kh-top-balances > button:hover { transform: none; filter: brightness(1.06); }
body .kh-top-balances > button:active { transform: translateY(1px); filter: brightness(.98); }
body .kh-top-balances > button:focus-visible { z-index: 1; outline: 2px solid #083f49; outline-offset: -3px; }

@container kwaak-shell (max-width: 760px) {
  body .kh-top-balances { width: min(100%, 228px); }
  body .kh-top-balances > .kh-top-leaves,
  body .kh-top-balances > .kh-top-wallet,
  body .kh-top-balances > .kh-top-quacks,
  body .kh-top-balances > .kh-top-club { flex: 1 1 0; width: auto; min-width: 0; padding-inline: 5px; }
}

/* Keep equipped role badges crisp and fully legible in the player info stand. */
body .kh-stage .kh-player-card-badges { min-height: 42px; gap: 5px; }
body .kh-stage .kh-player-card-badge,
body .kh-stage .kh-player-card-badge-art { width: 40px; height: 40px; flex-basis: 40px; }
body .kh-stage .kh-player-card-badge-art.has-image { background-size: 40px 40px; }
body .kh-avatar-badge[data-team-badge][data-badge-tone="staff"],
body .kh-avatar-badge[data-team-badge][data-badge-tone="moderator"],
body .kh-avatar-badge[data-team-badge][data-badge-tone="ambassador"],
body .kh-avatar-badge[data-team-badge][data-badge-tone="guide"] {
  top: -54px;
  width: 46px;
  height: 46px;
}
body .kh-avatar-badge[data-team-badge] > .kh-team-badge-core,
body .kh-team-badge-layer > .kh-stage-team-badge,
body .kh-team-badge-layer > .kh-stage-team-badge > .kh-team-badge-core {
  width: 46px;
  height: 46px;
  background-size: 46px 46px;
}
body .kh-guest:has(> .kh-avatar-badge[data-team-badge]) > .kh-speech,
body .kh-guest[data-has-team-badge="true"] > .kh-speech { bottom: calc(100% + 73px); }

/* Window headers are drag handles; close and form controls remain clickable. */
body .kh-dialog-drag-handle {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
body .kh-dialog.is-dragging .kh-dialog-drag-handle { cursor: grabbing; }

/* Match the Club window to the wallet on desktop and mid-size game shells. */
@media (min-width: 761px) {
  body .kh-club-dialog[open] {
    width: min(760px, calc(100% - 28px));
    height: 507px;
    max-height: calc(100% - var(--kh-shell-head) - 24px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

@media (min-width: 900px) {
  body .kh-wallet-dialog[open],
  body .kh-club-dialog[open] {
    width: min(860px, calc(100% - 28px));
    height: min(545px, calc(100% - var(--kh-shell-head) - 20px));
    min-height: 0;
    max-height: calc(100% - var(--kh-shell-head) - 20px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body .kh-club-benefits {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 10px;
  }
  body .kh-club-status { margin: 12px 0 8px; padding: 10px 12px; }
  body .kh-club-months select { min-height: 36px; }
  body .kh-club-buy { min-height: 40px; margin-top: 8px; }
  body .kh-club-no-subscription { margin-top: 5px; }
  body .kh-club-payment-status:empty { display: none; min-height: 0; margin: 0 !important; }
  body .kh-club-reward-note { padding: 7px 9px; }
}

/* Dark lettering keeps the Navigator's yellow label clear against the green header. */
body .kh-navigator[open] .kh-navigator-hero .kh-dialog-kicker {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid #d5ad34;
  border-radius: 999px;
  color: #4d4a23;
  background: linear-gradient(180deg, #fff1a4, #ffe066);
  text-shadow: none;
}

/* Quack Quest board and staff quest editor. */
body .kh-tasks[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 4px;
  width: min(900px, calc(100% - 38px));
  height: min(670px, calc(100% - var(--kh-shell-head) - 38px));
  max-height: none;
  padding: 28px 26px 22px;
  overflow: hidden;
}
body .kh-tasks[open] > h2 { margin: 5px 42px 0 0; font-size: 27px; }
body .kh-tasks[open] > p { margin: 2px 0 7px; color: #58714e; font-size: 11px; line-height: 1.35; }
body .kh-tasks .kh-dialog-kicker { width: max-content; max-width: 100%; color: #63480c; }
body .kh-tasks-content {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}
body .kh-daily-tasks-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 5px;
  padding: 11px;
  overflow: hidden;
  border: 2px solid var(--kh-ui-line);
  border-radius: 15px;
  background: linear-gradient(145deg, #fffef5, #f1f8d9);
}
body .kh-daily-heading { margin: 0; color: #31552e; font-size: 14px; }
body .kh-daily-tasks-panel > .kh-task-list,
body .kh-quest-section .kh-task-list {
  min-height: 0;
  align-content: start;
  gap: 6px;
  margin: 0;
  padding: 1px 3px 4px 1px;
  overflow: auto;
}
body .kh-task-list > .kh-quest-card {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: start;
  gap: 7px;
  padding: 8px;
  border: 2px solid #b6d28b;
  border-radius: 11px;
  background: #fffef3;
  box-shadow: 0 2px 0 rgba(47, 127, 29, .09);
}
body .kh-task-list > .kh-quest-card > span { width: 30px; height: 30px; font-size: 13px; }
body .kh-task-list > .kh-quest-card p { display: grid; gap: 3px; min-width: 0; margin: 0; font-size: 10px; line-height: 1.25; }
body .kh-task-list > .kh-quest-card p > strong { color: #204a30; font-size: 11px; line-height: 1.15; }
body .kh-task-list > .kh-quest-card p > small { margin: 0; color: #5b7255; font-size: 9px; line-height: 1.28; }
body .kh-task-list > .kh-quest-card p > small:nth-of-type(2) { color: #347642; font-weight: 800; }
body .kh-task-list > .kh-quest-card p > em { color: #85600e; font-size: 8px; font-style: normal; font-weight: 850; }
body .kh-task-list > .kh-quest-card > b { align-self: center; max-width: 94px; padding: 5px 7px; color: #63480c; background: #ffe477; font-size: 9px; line-height: 1.1; text-align: center; }
body .kh-task-list > .kh-quest-card.is-complete { border-color: #69ad50; background: #edf8d8; }
body .kh-task-list > .kh-quest-card.is-complete > b { color: #fff; background: #368e3d; }
body .kh-quest-card-progress { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: #dcebc7; }
body .kh-quest-card-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #eac13c, #43a84d); transition: width .25s ease; }
body .kh-quest-empty { margin: 0; padding: 11px; color: #66805d; font-size: 10px; line-height: 1.4; }
body .kh-daily-progress { margin: 0; padding: 7px 9px; font-size: 9px; }
body .kh-long-quest-panel { grid-template-rows: minmax(0, 1.05fr) minmax(0, 1fr) auto; }
body .kh-quest-section { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 5px; overflow: hidden; }
body .kh-open-badgebook { justify-self: start; min-height: 32px; padding: 5px 12px; border: 2px solid #287b35; border-radius: 999px; color: #fff; background: linear-gradient(#49b550, #2e913e); box-shadow: 0 2px 0 #246a30; font-size: 10px; font-weight: 900; }
body .kh-open-badgebook span { margin-right: 4px; color: #ffe16a; }
body .kh-task-list > .kh-quest-admin-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.kh-quest-manager-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 12px; align-items: start; }
.kh-quest-manager-layout > form { display: grid; gap: 8px; min-width: 0; }
.kh-quest-manager-layout label { display: grid; gap: 4px; color: #31552e; font-size: 10px; font-weight: 850; }
.kh-quest-manager-layout :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 34px; padding: 7px 9px; border: 2px solid #c2d99b; border-radius: 8px; color: #244632; background: #fffef5; font: inherit; font-size: 11px; }

/* 0.36.11 — size room furniture by its visible footprint and keep the HUD below it. */
@media (min-width: 761px) {
  body {
    padding: 8px 10px 14px;
  }

  body .kh-client:not(.is-fullscreen) {
    height: min(calc(100svh - 22px), calc((100vw - 30px) * 53 / 84 + 166px), calc(1320px * 53 / 84 + 166px));
    grid-template-rows: var(--kh-shell-head) minmax(0, 1fr) 92px;
    width: min(1330px, calc(100vw - 20px), calc((100svh - 188px) * 84 / 53 + 10px));
  }

  body .kh-stage-wrap {
    grid-row: 2;
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  body .kh-stage {
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: 84 / 53;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body .kh-dock {
    position: relative;
    z-index: 9000;
    grid-row: 3;
    grid-column: 1 / -1;
    left: auto;
    bottom: auto;
    justify-self: stretch;
    align-self: stretch;
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    grid-template-rows: 38px 38px;
    gap: 4px;
    padding: 4px 10px;
    transform: none;
    border: 0;
    border-top: 3px solid #2e791d;
    border-radius: 0;
    background: #56aa23;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2);
  }

  body .kh-dock > button {
    grid-row: 2;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    height: 38px;
    padding: 2px;
    border-radius: 8px;
  }

  body .kh-dock > button .kh-dock-icon,
  body .kh-dock > button .kh-dock-help-icon {
    width: 30px;
    height: 30px;
  }

  body .kh-chat {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    height: 38px;
  }
}

body .kh-client.is-fullscreen {
  grid-template-rows: var(--kh-shell-head) minmax(0, 1fr) 92px;
}
body .kh-client.is-fullscreen .kh-stage-wrap {
  width: min(100%, calc((100dvh - var(--kh-shell-head) - 92px) * 84 / 53));
}
body:has(.kh-client.is-fullscreen) {
  padding: 0;
  overflow: hidden;
  place-items: stretch;
}

/* 0.36.14 — make bottom-bar button hints readable at a glance. */
body .kh-dock > button small {
  z-index: 10;
  min-height: 27px;
  padding: 5px 9px;
  border-width: 2px;
  border-radius: 8px;
  font-size: 12px !important;
  font-weight: 850;
  line-height: 1.2;
}
.kh-quest-manager-layout textarea { resize: vertical; }
.kh-quest-manager-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.kh-quest-step-editor { padding: 8px; border: 1px solid #c5dba0; border-radius: 10px; background: #f4f9e5; }
.kh-quest-step-head, .kh-quest-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.kh-quest-step-head { margin-bottom: 7px; color: #285536; font-size: 11px; }
.kh-quest-step-head button, .kh-quest-admin-actions button, .kh-quest-editor-actions button { min-height: 29px; padding: 5px 9px; border: 1px solid #8db36b; border-radius: 8px; color: #275535; background: #fffef5; font-size: 9px; font-weight: 850; }
.kh-quest-step-head button:disabled, .kh-quest-admin-actions button:disabled { opacity: .5; }
.kh-quest-step-list { display: grid; gap: 7px; max-height: 210px; overflow: auto; }
.kh-quest-step-row { position: relative; display: grid; grid-template-columns: 1.2fr 1.3fr 90px 26px; gap: 6px; align-items: end; padding: 7px; border: 1px solid #d4e3b9; border-radius: 8px; background: #fffef7; }
.kh-quest-step-row > button { width: 25px; height: 29px; border: 1px solid #d5a848; border-radius: 8px; color: #77520d; background: #ffefbd; font-size: 16px; font-weight: 900; }
.kh-quest-step-row > button:disabled { opacity: .4; }
.kh-quest-admin-list-wrap { min-width: 0; }
.kh-quest-admin-list-wrap h3 { margin: 0 0 7px; color: #245333; font-size: 14px; }
.kh-quest-admin-list { display: grid; gap: 6px; max-height: 600px; overflow: auto; }
.kh-quest-admin-list > article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; padding: 8px; border: 1px solid #bdd696; border-radius: 9px; background: #fffef2; }
.kh-quest-admin-list > article.is-inactive { opacity: .65; background: #f0f1e4; }
.kh-quest-admin-list > article > div:first-child { display: grid; gap: 3px; min-width: 0; }
.kh-quest-admin-list > article strong { color: #254f32; font-size: 10px; }
.kh-quest-admin-list > article small { color: #607554; font-size: 8px; line-height: 1.3; }
.kh-quest-admin-list > article em { align-self: start; color: #5a752f; font-size: 8px; font-style: normal; font-weight: 900; }
.kh-quest-admin-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; }
.kh-quest-admin-list-wrap > p { margin: 0; color: #647756; font-size: 10px; }
.kh-quest-editor-actions { justify-content: flex-start; }
.kh-quest-editor-actions [data-quest-save] { border-color: #287b35; color: #fff; background: linear-gradient(#49b550, #2e913e); }
.kh-quest-manager .kh-support-status { min-height: 16px; color: #3b6f3a; font-size: 10px; }

@media (max-width: 760px) {
  body .kh-tasks[open] {
    top: calc(var(--kh-shell-head) + (100% - var(--kh-shell-head)) / 2);
    width: min(680px, calc(100% - 24px));
    height: min(790px, calc(100% - var(--kh-shell-head) - 18px));
    padding: 21px 15px 15px;
  }
  body .kh-tasks-content { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, .85fr) minmax(0, 1.15fr); gap: 8px; }
  body .kh-daily-tasks-panel { padding: 8px; }
  .kh-quest-manager-layout { grid-template-columns: 1fr; }
  .kh-quest-admin-list { max-height: 240px; }
}
@media (max-width: 480px) {
  body .kh-tasks[open] { width: calc(100% - 12px); padding-inline: 10px; }
  body .kh-task-list > .kh-quest-card { grid-template-columns: 27px minmax(0, 1fr) auto; gap: 5px; padding: 6px; }
  body .kh-task-list > .kh-quest-card > span { width: 25px; height: 25px; font-size: 11px; }
  body .kh-task-list > .kh-quest-card p > strong { font-size: 10px; }
  body .kh-task-list > .kh-quest-card p > small { font-size: 8px; }
  body .kh-task-list > .kh-quest-card > b { max-width: 72px; padding: 4px 5px; font-size: 8px; }
  .kh-quest-manager-fields { grid-template-columns: 1fr; }
  .kh-quest-step-row { grid-template-columns: minmax(0, 1fr) 68px 26px; }
  .kh-quest-step-row label:first-child { grid-column: 1 / -1; }
}

/* Quest board: roomy category tabs with one real scroll area per category. */
body .kh-tasks[open] {
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1060px, calc(100% - 24px));
  height: min(740px, calc(100% - var(--kh-shell-head) - 14px));
  max-height: calc(100% - var(--kh-shell-head) - 14px);
  padding: 24px 22px 18px;
  overflow: hidden;
}
body .kh-tasks[open] > h2 { margin: 5px 46px 0 0; font-size: 28px; line-height: 1.08; }
body .kh-tasks[open] > p { max-width: 760px; margin: 3px 0 9px; color: #58714e; font-size: 12px; line-height: 1.4; }
body .kh-tasks-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  overflow: hidden;
}
body .kh-quest-tabs {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 2px solid #347d36;
  border-radius: 15px;
  background: linear-gradient(180deg, #3d973f, #267333);
  box-shadow: 0 3px 0 #1e672d;
}
body .kh-quest-tabs > button {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1.5px solid #c5dca0;
  border-radius: 10px;
  color: #315b39;
  background: linear-gradient(#fffef5, #eaf3d5);
  box-shadow: 0 2px 0 rgba(31, 83, 37, .2);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, color .12s ease;
}
body .kh-quest-tabs > button:hover { transform: translateY(-1px); }
body .kh-quest-tabs > button[aria-selected="true"] {
  border-color: #246c31;
  color: #fff;
  background: linear-gradient(180deg, #51b850, #2e8739);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 0 #1c602c;
}
body .kh-quest-tabs > button > b {
  min-width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border: 1px solid #bed593;
  border-radius: 999px;
  color: #456640;
  background: #f8f4d1;
  font-size: 11px;
  line-height: 1;
}
body .kh-quest-tabs > button[aria-selected="true"] > b { border-color: #fbe27c; color: #66500f; background: #ffe36c; }
body .kh-quest-category-panel:not([hidden]) {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border: 2px solid #b7d686;
  border-radius: 17px;
  background: linear-gradient(155deg, #fffef5 0%, #f2f8de 100%);
  box-shadow: 0 3px 0 rgba(54, 126, 41, .08), inset 0 1px 0 #fff;
}
body .kh-quest-category-panel[hidden] { display: none !important; }
body .kh-quest-category-panel[data-quest-panel="journeys"] { grid-template-rows: minmax(0, 1fr); }
body .kh-task-list {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  grid-auto-rows: minmax(92px, auto);
  gap: 9px;
  margin: 0;
  padding: 1px 5px 5px 1px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-color: #68b33d #e7f0d1;
  scrollbar-width: thin;
}
body .kh-task-list::-webkit-scrollbar { width: 9px; }
body .kh-task-list::-webkit-scrollbar-track { border-radius: 999px; background: #e7f0d1; }
body .kh-task-list::-webkit-scrollbar-thumb { border: 2px solid #e7f0d1; border-radius: 999px; background: #68b33d; }
body .kh-task-list > .kh-quest-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(126px, 165px);
  grid-template-rows: auto;
  align-items: center;
  gap: 8px 13px;
  padding: 12px 14px;
  border: 1.5px solid #c3d99d;
  border-radius: 13px;
  color: #38563a;
  background: #fffef8;
  box-shadow: 0 2px 0 rgba(50, 119, 40, .08);
}
body .kh-task-list > .kh-quest-card > span {
  grid-column: 1;
  grid-row: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #afd27e;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #5ab952, #32883e);
  box-shadow: 0 2px 0 #286d35;
  font-size: 17px;
  font-weight: 950;
}
body .kh-task-list > .kh-quest-card[data-quest-type="journey"] > span { color: #624908; background: linear-gradient(145deg, #ffe982, #f3c53d); box-shadow: 0 2px 0 #c48d1c; }
body .kh-task-list > .kh-quest-card[data-quest-type="achievement"] > span { color: #fff; background: linear-gradient(145deg, #39a6a0, #167a82); box-shadow: 0 2px 0 #11616a; }
body .kh-task-list > .kh-quest-card p {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.32;
}
body .kh-task-list > .kh-quest-card p > strong { color: #204a30; font-size: 15px; line-height: 1.18; }
body .kh-task-list > .kh-quest-card p > small { margin: 0; color: #5b7255; font-size: 11px; line-height: 1.35; }
body .kh-task-list > .kh-quest-card p > small:nth-of-type(2) { color: #347642; font-weight: 800; }
body .kh-task-list > .kh-quest-card p > em { width: max-content; max-width: 100%; color: #80611b; font-size: 10px; font-style: normal; font-weight: 800; }
body .kh-task-list > .kh-quest-card > b {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  max-width: 165px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #664b0e;
  background: #ffdf69;
  font-size: 12px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}
body .kh-task-list > .kh-quest-card.is-complete { border-color: #8cc678; background: #f0f8e2; }
body .kh-task-list > .kh-quest-card.is-complete > b { color: #fff; background: #368e3d; }
body .kh-quest-card-progress { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: #e2eccf; }
body .kh-quest-card-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #eac13c, #43a84d); transition: width .25s ease; }
body .kh-quest-empty { margin: 0; padding: 18px; border: 1px dashed #bdd797; border-radius: 12px; color: #66805d; background: rgba(255,255,255,.5); font-size: 12px; line-height: 1.45; }
body .kh-daily-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #c5dca0;
  border-radius: 12px;
  color: #2d6336;
  background: #eaf5d6;
  font-size: 11px;
}
body .kh-daily-progress strong { font-size: 12px; }
body .kh-daily-progress > span { justify-self: end; color: #617954; text-align: right; }
body .kh-daily-progress > i { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 999px; background: #d7e7bf; }
body .kh-daily-progress > i > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f5cf4c, #54b74e); }
body .kh-open-badgebook {
  justify-self: stretch;
  min-height: 42px;
  padding: 8px 14px;
  border: 2px solid #287b35;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(#49b550, #2e913e);
  box-shadow: 0 2px 0 #246a30;
  font-size: 12px;
  font-weight: 900;
}
body .kh-open-badgebook span { margin-right: 5px; color: #ffe16a; }
@media (max-width: 700px) {
  body .kh-tasks[open] { width: calc(100% - 16px); padding: 20px 12px 13px; }
  body .kh-quest-tabs { gap: 4px; padding: 4px; }
  body .kh-quest-tabs > button { min-height: 42px; gap: 5px; padding: 6px; font-size: 11px; }
  body .kh-quest-tabs > button > b { min-width: 21px; height: 21px; font-size: 10px; }
  body .kh-quest-category-panel:not([hidden]) { padding: 10px; }
  body .kh-task-list > .kh-quest-card { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 6px 9px; padding: 9px; }
  body .kh-task-list > .kh-quest-card > span { width: 29px; height: 29px; font-size: 14px; }
  body .kh-task-list > .kh-quest-card p > strong { font-size: 13px; }
  body .kh-task-list > .kh-quest-card p > small { font-size: 10px; }
  body .kh-task-list > .kh-quest-card > b { grid-column: 2 / -1; grid-row: 2; justify-self: start; max-width: none; padding: 5px 9px; font-size: 10px; }
}
@media (max-width: 460px) {
  body .kh-tasks[open] { padding: 19px 9px 10px; }
  body .kh-tasks[open] > h2 { font-size: 23px; }
  body .kh-tasks[open] > p { font-size: 10px; }
  body .kh-quest-tabs > button { flex-direction: column; gap: 3px; font-size: 10px; line-height: 1.1; }
  body .kh-quest-tabs > button > b { min-width: 18px; height: 18px; font-size: 9px; }
  body .kh-task-list > .kh-quest-card { grid-template-columns: 27px minmax(0, 1fr); }
  body .kh-task-list > .kh-quest-card > span { width: 25px; height: 25px; font-size: 12px; }
}

/* Pixel-art preview for Harbour Square. The regular art remains the default. */
body .kh-client.is-pixel-art-preview .kh-lobby-art,
body .kh-client.is-pixel-art-preview .kh-avatar-sprite,
body .kh-client.is-pixel-art-preview .kh-placed-furniture,
body .kh-client.is-pixel-art-preview .kh-garden-plant-art,
body .kh-client.is-pixel-art-preview .kh-garden-book-stage-art {
  image-rendering: pixelated;
}
body .kh-client.is-pixel-art-preview .kh-guest[data-avatar-color="yellow"],
body .kh-client.is-pixel-art-preview .kh-profile-kwaker[data-avatar-color="yellow"] {
  --kh-avatar-atlas: url("../images/pixel-preview/kwaker-atlas-yellow-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-motion-side: url("../images/pixel-preview/kwaker-atlas-yellow-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-motion-front: url("../images/pixel-preview/kwaker-atlas-yellow-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-motion-back: url("../images/pixel-preview/kwaker-atlas-yellow-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-wave: url("../images/pixel-preview/kwaker-atlas-yellow-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-profile: url("../images/pixel-preview/kwaker-atlas-yellow-v1.webp?v=0.36.18-pixel-preview");
}
body .kh-client.is-pixel-art-preview .kh-guest[data-avatar-color="cream"],
body .kh-client.is-pixel-art-preview .kh-profile-kwaker[data-avatar-color="cream"] {
  --kh-avatar-atlas: url("../images/pixel-preview/kwaker-atlas-cream-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-motion-side: url("../images/pixel-preview/kwaker-atlas-cream-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-motion-front: url("../images/pixel-preview/kwaker-atlas-cream-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-motion-back: url("../images/pixel-preview/kwaker-atlas-cream-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-wave: url("../images/pixel-preview/kwaker-atlas-cream-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-profile: url("../images/pixel-preview/kwaker-atlas-cream-v1.webp?v=0.36.18-pixel-preview");
}
body .kh-client.is-pixel-art-preview .kh-guest[data-avatar-color="brown"],
body .kh-client.is-pixel-art-preview .kh-profile-kwaker[data-avatar-color="brown"] {
  --kh-avatar-atlas: url("../images/pixel-preview/kwaker-atlas-brown-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-motion-side: url("../images/pixel-preview/kwaker-atlas-brown-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-motion-front: url("../images/pixel-preview/kwaker-atlas-brown-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-motion-back: url("../images/pixel-preview/kwaker-atlas-brown-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-wave: url("../images/pixel-preview/kwaker-atlas-brown-v1.webp?v=0.36.18-pixel-preview");
  --kh-avatar-profile: url("../images/pixel-preview/kwaker-atlas-brown-v1.webp?v=0.36.18-pixel-preview");
}
body .kh-client.is-pixel-art-preview .kh-guest:not(.is-sitting) .kh-avatar-sprite {
  background-size: 400% 300% !important;
  animation: none !important;
}
body .kh-client.is-pixel-art-preview .kh-guest:not(.is-sitting)[data-direction="down"] .kh-avatar-sprite,
body .kh-client.is-pixel-art-preview .kh-guest.is-waving:not(.is-sitting) .kh-avatar-sprite,
body .kh-client.is-pixel-art-preview .kh-profile-kwaker .kh-avatar-sprite {
  background-position: 0 50% !important;
}
body .kh-client.is-pixel-art-preview .kh-guest:not(.is-sitting)[data-direction="up"] .kh-avatar-sprite {
  background-position: 0 100% !important;
}
body .kh-client.is-pixel-art-preview .kh-guest.is-sitting .kh-avatar-sprite {
  background-image: var(--kh-avatar-atlas) !important;
  background-size: 400% 300% !important;
  animation: none !important;
}
body .kh-client.is-pixel-art-preview .kh-guest.is-walking:not(.is-sitting) .kh-avatar-sprite {
  animation: kh-atlas-walk-side .96s steps(1, end) infinite !important;
}
body .kh-client.is-pixel-art-preview .kh-guest.is-walking:not(.is-sitting)[data-direction="down"] .kh-avatar-sprite {
  animation-name: kh-atlas-walk-front !important;
}
body .kh-client.is-pixel-art-preview .kh-guest.is-walking:not(.is-sitting)[data-direction="up"] .kh-avatar-sprite {
  animation-name: kh-atlas-walk-back !important;
}
body .kh-client.is-pixel-art-preview .kh-profile-kwaker .kh-avatar-sprite {
  background-image: var(--kh-avatar-profile) !important;
  background-size: 400% 300% !important;
  animation: none !important;
}
body .kh-client.is-pixel-art-preview .kh-placed-furniture:not(.is-rotated):not(.is-image-furniture):not(.is-garden-sprite) {
  background-image: url("../images/pixel-preview/furniture-atlas-v1.webp?v=0.36.18-pixel-preview");
}
body .kh-client.is-pixel-art-preview .kh-placed-furniture.is-rotated:not(.is-image-furniture):not(.is-garden-sprite) {
  background-image: url("../images/pixel-preview/furniture-atlas-rotated-v1.webp?v=0.36.18-pixel-preview");
}

/* The Lifestyle Shop catalogue now has room for useful browsing controls and richer item cards. */
body [data-catalog][data-catalog-mode="furniture"] {
  height: min(620px, calc(100dvh - 130px));
  max-height: none;
  padding: 28px 25px 22px;
}
body [data-catalog] { width: 720px; }
body [data-catalog][data-catalog-mode="furniture"] .kh-drawer-intro {
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
}
body [data-catalog][data-catalog-mode="furniture"] .kh-catalog-quacks { display: inline-flex; }
body [data-catalog][data-catalog-mode="furniture"] .kh-drawer-head h2 { font-size: 30px; }
body [data-catalog][data-catalog-mode="furniture"] .kh-drawer-intro { margin: 11px 0 14px; }
body [data-catalog][data-catalog-mode="furniture"] .kh-catalog-columns { gap: 0; }
body [data-catalog][data-catalog-mode="furniture"] .kh-catalog-shelf {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(247, 252, 230, .96), rgba(235, 247, 212, .86));
}
body [data-catalog][data-catalog-mode="furniture"] .kh-catalog-section-title { margin-bottom: 10px; font-size: 17px; }
body .kh-catalog-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 9px; flex: 0 0 auto; }
body .kh-catalog-search {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  padding: 0 11px;
  border: 2px solid #bfdb91;
  border-radius: 13px;
  color: #398347;
  background: #fffef4;
  box-shadow: inset 0 1px 2px rgba(46, 99, 47, .08);
}
body .kh-catalog-search > span { font-size: 22px; line-height: 1; }
body .kh-catalog-search input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0 !important;
  outline: 0;
  color: #214b30;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px;
}
body .kh-catalog-search:focus-within { border-color: #3f9d4b; box-shadow: 0 0 0 3px rgba(77, 163, 66, .16); }
body .kh-catalog-toolbar > select {
  min-width: 0;
  height: 44px;
  padding: 0 11px;
  border: 2px solid #bfdb91;
  border-radius: 13px;
  color: #315b37;
  background: #fffef4;
  font-size: 12px;
  font-weight: 750;
}
body .kh-catalog-summary { flex: 0 0 auto; margin: 8px 1px 5px; color: #687d5c; font-size: 10px; font-weight: 750; }
body .kh-catalog-categories {
  gap: 7px;
  margin-bottom: 11px;
  padding: 1px 1px 5px;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 18px), transparent 100%);
}
body .kh-catalog-categories::-webkit-scrollbar { display: none; }
body .kh-catalog-categories button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #bfd997;
  color: #355f39;
  background: linear-gradient(#fffef5, #eff7df);
  font-size: 11px;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
body .kh-catalog-categories button:hover { transform: translateY(-1px); border-color: #71b65b; }
body .kh-catalog-categories button[aria-pressed="true"] {
  border-color: #286d2d;
  color: white;
  background: linear-gradient(#4caf38, #32852d);
  box-shadow: 0 2px 0 #246a29;
}
body .kh-catalog-categories button small {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  color: #3b7138;
  background: #e4f0ca;
  font-size: 9px;
  font-weight: 950;
}
body .kh-catalog-categories button[aria-pressed="true"] small { color: #226c2e; background: #fff9d7; }
body .kh-catalog-item {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 82px;
  padding: 8px;
  border: 1px solid #c6dda2;
  border-radius: 16px 13px 16px 12px;
  background: linear-gradient(145deg, #fffef7, #fbfced);
  box-shadow: 0 2px 0 rgba(127, 174, 81, .24);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
body .kh-catalog-item:hover { transform: translateY(-1px); border-color: #76b553; box-shadow: 0 3px 0 rgba(87, 147, 58, .28); }
body .kh-catalog-item .kh-catalog-preview {
  display: block;
  width: 62px;
  border-radius: 12px;
  background-color: #f0f7db;
  box-shadow: inset 0 0 0 1px #d6e6b8;
}
body .kh-catalog-item-copy { display: grid; justify-items: start; gap: 3px; min-width: 0; }
body .kh-catalog-item strong { overflow: hidden; max-width: 100%; color: #244c31; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
body .kh-catalog-item-category {
  padding: 2px 7px;
  border-radius: 999px;
  color: #487342;
  background: #eaf3d7;
  font-size: 9px;
  font-weight: 850;
}
body .kh-catalog-item-category.is-limited { color: #835011; background: #ffedaa; }
body .kh-catalog-item small { margin: 0; color: #687a60; font-size: 10px; }
body .kh-catalog-item button {
  min-width: 84px;
  padding: 9px 11px;
  border: 2px solid #276f26;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(#51b941, #31852b);
  box-shadow: 0 2px 0 #276f26;
  font-size: 11px;
}
body .kh-catalog-item button:not(:disabled):hover { filter: brightness(1.06); transform: translateY(-1px); }
body .kh-catalog-item button:disabled { color: #597056; background: #dce8ca; box-shadow: none; border-color: #bed2a7; opacity: .8; }
body .kh-catalog-item button.is-low-balance { color: #6f4a12; background: linear-gradient(#ffe278, #ffd040); border-color: #d99c27; box-shadow: 0 2px 0 #bd8220; }
body .kh-catalog-empty { grid-column: 1 / -1; padding: 24px 12px; border: 1px dashed #a9c883; border-radius: 14px; color: #58724f; text-align: center; background: #f8fbe9; font-size: 13px; }
@container kwaak-shell (max-width: 760px) {
  body [data-catalog][data-catalog-mode="furniture"] { height: 507px; padding: 27px 22px 22px; }
  body .kh-catalog-toolbar { grid-template-columns: minmax(0, 1fr) 150px; }
  body .kh-catalog-item { grid-template-columns: 54px minmax(0, 1fr) auto; min-height: 70px; gap: 7px; }
  body .kh-catalog-item .kh-catalog-preview { width: 52px; }
  body .kh-catalog-item button { min-width: 66px; padding: 7px 8px; }
}

/* The shop uses a compact storefront with a page area and a clear side menu. */
body [data-catalog][data-catalog-mode="furniture"] .kh-catalog-quacks,
body [data-catalog][data-catalog-mode="skins"] .kh-catalog-quacks { display: inline-flex; }
body [data-catalog-page][hidden] { display: none !important; }
body .kh-catalog-layout {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
body .kh-catalog-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #76b84b #e8f0d3;
}
body .kh-catalog-page { flex: 1 1 auto; min-width: 0; min-height: 0; }
body .kh-catalog-shelf {
  padding: 12px;
  border: 1px solid #b8d78c;
  border-radius: 13px;
  background: linear-gradient(150deg, #fffef5, #f4f8e4);
}
body .kh-catalog-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  overflow: auto;
  border: 1px solid #a8ca7a;
  border-radius: 12px;
  background: #fffef4;
  box-shadow: inset 0 0 0 3px #edf4dc;
}
body .kh-catalog-nav-heading {
  padding: 10px 11px;
  border-radius: 11px 11px 0 0;
  color: #fff;
  background: linear-gradient(#4ca53a, #32832e);
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  text-shadow: 0 1px #286b2c;
}
body .kh-catalog-nav > button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid #d2e2bd;
  border-radius: 0;
  color: #284a36;
  background: #fffef5;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
body .kh-catalog-nav > button > span { width: 17px; color: #398d41; font-size: 15px; text-align: center; }
body .kh-catalog-nav > button:hover { background: #f0f7df; }
body .kh-catalog-nav > button[aria-current="true"] { color: #fff; background: linear-gradient(#44a438, #32842d); }
body .kh-catalog-nav > button[aria-current="true"] > span { color: #ffdf55; }
body .kh-catalog-nav-categories {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 4px 5px 7px 14px;
  overflow: visible;
  border-bottom: 1px solid #d2e2bd;
  background: #f4f8e9;
  mask-image: none;
}
body .kh-catalog-nav-categories button {
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  padding: 5px 6px;
  border: 0;
  border-radius: 6px;
  color: #54714d;
  background: transparent;
  font-size: 9px;
  text-align: left;
}
body .kh-catalog-nav-categories button[aria-pressed="true"] { color: #215f2e; background: #e3efd0; box-shadow: inset 3px 0 #54a63d; }
body .kh-catalog-nav-categories button small { min-width: 17px; height: 17px; color: #477442; background: #e7efd5; }
body .kh-catalog-nav-categories button[aria-pressed="true"] small { color: #fff; background: #44963a; }
body [data-catalog-view="front"] .kh-catalog-nav-categories,
body [data-catalog-view="skins"] .kh-catalog-nav-categories,
body [data-catalog-view="voucher"] .kh-catalog-nav-categories { display: none; }
body .kh-catalog-front,
body .kh-catalog-voucher-page {
  padding: 17px;
  border: 1px solid #b8d78c;
  border-radius: 13px;
  background: linear-gradient(150deg, #fffef6, #f4f8e4);
}
body .kh-catalog-front > h3,
body .kh-catalog-voucher-page > h3 { margin: 7px 0 5px; color: #234b32; font-size: 22px; }
body .kh-catalog-front > p,
body .kh-catalog-voucher-page > p { margin: 0 0 14px; color: #59714f; font-size: 11px; line-height: 1.5; }
body .kh-catalog-front-actions { display: grid; gap: 8px; margin: 12px 0; }
body .kh-catalog-feature {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #a9cf7a;
  border-radius: 11px;
  color: #284d33;
  background: linear-gradient(110deg, #eef7da, #fffef5);
  text-align: left;
  cursor: pointer;
}
body .kh-catalog-feature.is-skin { background: linear-gradient(110deg, #e2f5f1, #fffef5); }
body .kh-catalog-feature-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid #9bc96d; border-radius: 10px; color: #fff; background: #45a13b; font-size: 19px; }
body .kh-catalog-feature.is-skin .kh-catalog-feature-icon { border-color: #63bcb1; background: #15959a; }
body .kh-catalog-feature strong,
body .kh-catalog-feature small { display: block; }
body .kh-catalog-feature strong { font-size: 12px; }
body .kh-catalog-feature small { margin-top: 3px; color: #657b5d; font-size: 9px; }
body .kh-catalog-feature > b { padding: 5px 7px; border-radius: 7px; color: #fff; background: #3d9534; font-size: 9px; }
body .kh-shop-voucher { display: grid; gap: 7px; margin-top: 12px; padding: 12px; border: 1px solid #b6d593; border-radius: 11px; background: #edf5de; }
body .kh-shop-voucher h4 { margin: 3px 0; color: #274d34; font-size: 14px; }
body .kh-shop-voucher > div > p { margin: 0; color: #5c7554; font-size: 10px; }
body .kh-shop-voucher-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
body .kh-shop-voucher-controls label { min-width: 0; }
body .kh-shop-voucher-controls input { width: 100%; min-width: 0; height: 37px; padding: 0 10px; border: 1px solid #adc982; border-radius: 8px; color: #234b33; background: #fffef7; font-size: 11px; }
body .kh-shop-voucher-controls button { min-width: 68px; padding: 7px 10px; border: 2px solid #2e792f; border-radius: 8px; color: #fff; background: linear-gradient(#4bac3e, #32842d); box-shadow: 0 2px #286b2b; font-size: 10px; font-weight: 900; }
body .kh-shop-voucher-controls button:disabled { opacity: .6; }
body .kh-shop-voucher-status { min-height: 13px; margin: 0; color: #317c38; font-size: 10px; line-height: 1.35; }
body .kh-shop-voucher-status.is-error { color: #a14724; }
body .kh-shop-voucher.is-large { max-width: 460px; margin: 18px 0 10px; padding: 15px; }
body .kh-shop-voucher.is-large > label { color: #345a3a; font-size: 11px; font-weight: 850; }
body .kh-shop-voucher.is-large .kh-shop-voucher-controls input { height: 42px; font-size: 13px; }
body .kh-catalog-voucher-page > small { color: #758365; font-size: 10px; }
body .kh-catalog-shelf .kh-catalog-summary { margin-bottom: 9px; }
body .kh-catalog-shelf .kh-catalog-grid { grid-template-columns: 1fr; }
body [data-catalog][data-catalog-view="furniture"] .kh-catalog-shelf .kh-catalog-grid { grid-template-columns: 1fr; }

@container kwaak-shell (max-width: 760px) {
  body [data-catalog] { width: min(720px, calc(100cqw - 24px)); }
  body .kh-catalog-layout { grid-template-columns: minmax(0, 1fr) 126px; gap: 7px; }
  body .kh-catalog-nav > button { gap: 4px; padding-inline: 6px; font-size: 9px; }
  body .kh-catalog-front, body .kh-catalog-voucher-page { padding: 11px; }
  body .kh-catalog-front > h3, body .kh-catalog-voucher-page > h3 { font-size: 18px; }
}
@media (max-width: 520px) {
  body .kh-catalog-layout { grid-template-columns: minmax(0, 1fr) 112px; gap: 6px; }
  body .kh-catalog-nav > button { min-height: 31px; padding: 5px; font-size: 8px; }
  body .kh-catalog-nav > button > span { width: 13px; font-size: 12px; }
  body .kh-catalog-nav-categories { padding-left: 5px; }
  body .kh-catalog-nav-categories button { font-size: 8px; }
  body .kh-catalog-feature { grid-template-columns: 30px minmax(0, 1fr); gap: 6px; padding: 7px; }
  body .kh-catalog-feature-icon { width: 28px; height: 28px; }
  body .kh-catalog-feature > b { display: none; }
  body .kh-shop-voucher-controls { grid-template-columns: 1fr; }
}

/* Give the shop enough room to browse. Keep every page, including skins, the same size. */
body [data-catalog][data-catalog-mode] {
  width: min(760px, calc(100% - 36px));
  height: min(680px, calc(100dvh - 100px));
  max-height: min(680px, calc(100dvh - 100px));
  padding: 30px 28px 26px;
}
body [data-catalog][data-catalog-mode] .kh-drawer-intro {
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  margin: 14px 0 18px;
}
body [data-catalog][data-catalog-mode] .kh-drawer-intro .kh-wallet-pill {
  width: max-content;
  padding: 9px 13px;
  font-size: 13px;
}
body [data-catalog][data-catalog-mode] .kh-catalog-quacks { display: inline-flex; }
body [data-catalog][data-catalog-mode] .kh-drawer-intro > p { font-size: 12px; }
body .kh-catalog-layout { grid-template-columns: minmax(0, 1fr) 148px; gap: 14px; }
body .kh-catalog-shelf { padding: 17px; border-radius: 16px; }
body .kh-catalog-shelf .kh-catalog-grid { gap: 12px; }
body [data-catalog][data-catalog-view="skins"] .kh-catalog-shelf .kh-catalog-grid {
  grid-template-columns: minmax(0, 1fr);
}
body .kh-catalog-item {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 100px;
  padding: 12px;
  border-radius: 17px;
}
body .kh-catalog-item .kh-catalog-preview { width: 68px; }
body .kh-catalog-item .kh-skin-thumb { width: 68px; }
body .kh-catalog-item-copy { gap: 5px; }
body .kh-catalog-item strong { font-size: 15px; }
body .kh-catalog-item small { font-size: 11px; }
body .kh-catalog-item button { min-width: 102px; padding: 10px 13px; font-size: 12px; }
body .kh-catalog-nav > button { min-height: 41px; padding: 8px 10px; font-size: 11px; }
body .kh-catalog-nav-categories button { min-height: 30px; padding: 6px 7px; font-size: 10px; }

@container kwaak-shell (max-width: 760px) {
  body [data-catalog][data-catalog-mode] {
    width: min(760px, calc(100cqw - 28px));
    height: min(680px, calc(100dvh - 100px));
    max-height: min(680px, calc(100dvh - 100px));
    padding: 27px 22px 22px;
  }
  body .kh-catalog-layout { grid-template-columns: minmax(0, 1fr) 132px; gap: 10px; }
  body .kh-catalog-item { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 9px; min-height: 90px; padding: 9px; }
  body .kh-catalog-item .kh-catalog-preview,
  body .kh-catalog-item .kh-skin-thumb { width: 58px; }
  body .kh-catalog-item button { min-width: 86px; padding: 8px 9px; font-size: 11px; }
}

@container kwaak-shell (max-width: 520px) {
  body [data-catalog][data-catalog-mode] .kh-drawer-intro { grid-template-columns: repeat(2, max-content); }
  body [data-catalog][data-catalog-mode] .kh-drawer-intro > p { grid-column: 1 / -1; }
  body .kh-catalog-layout { grid-template-columns: minmax(0, 1fr) 108px; gap: 7px; }
  body .kh-catalog-nav > button { padding-inline: 5px; font-size: 8px; }
  body .kh-catalog-item { grid-template-columns: 48px minmax(0, 1fr); min-height: 0; }
  body .kh-catalog-item .kh-catalog-preview,
  body .kh-catalog-item .kh-skin-thumb { width: 46px; }
  body .kh-catalog-item button { grid-column: 2; justify-self: start; }
}

/* One shared title bar for every dialog, drawer, item window and message window. */
body .kh-modal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 8px 13px 8px 18px;
  border: 2px solid #f1d34a;
  border-radius: 13px 13px 11px 11px;
  color: #fff;
  background: linear-gradient(180deg, #46ad3b, #287a2b);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .28), 0 3px 0 rgba(31, 93, 31, .22);
}
body .kh-dialog .kh-modal-titlebar {
  margin: -14px -16px 16px;
}
body .kh-drawer .kh-modal-titlebar {
  flex: 0 0 auto;
  margin: -14px -16px 15px;
}
body .kh-modal-title-copy { display: grid; gap: 3px; min-width: 0; }
body .kh-modal-titlebar .kh-modal-title,
body .kh-modal-titlebar h1,
body .kh-modal-titlebar h2 {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
body .kh-modal-titlebar .kh-dialog-kicker,
body .kh-modal-titlebar .kh-modal-kicker,
body .kh-modal-titlebar small {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  color: #e2f3c7;
  background: transparent;
  box-shadow: none;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body .kh-modal-titlebar p { margin: 0; color: #e2f3c7; font-size: 10px; line-height: 1.25; }
body .kh-modal-titlebar .kh-dialog-close,
body .kh-modal-titlebar .kh-modal-close {
  position: static;
  inset: auto;
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0 0 2px;
  border: 2px solid #fff4bb;
  border-radius: 50%;
  color: #624314;
  background: linear-gradient(#ffe778, #ffc935);
  box-shadow: 0 2px 0 #a9631e, inset 0 1px 0 #fff9d7;
  font-size: 23px;
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
}
body .kh-modal-titlebar :is(.kh-dialog-close, .kh-modal-close):hover { filter: brightness(1.05); transform: translateY(-1px); }
body .kh-modal-titlebar .kh-item-menu-preview { flex: 0 0 38px; width: 38px; height: 38px; }
body .kh-modal-titlebar .kh-item-menu-preview + div { flex: 1 1 auto; min-width: 0; }
body .kh-modal-titlebar .kh-message-window-head { border: 0; background: transparent; }
body .kh-message-window-head.kh-modal-titlebar {
  min-height: 56px;
  border-radius: 13px 13px 0 0;
  cursor: grab;
}
body .kh-drawer-head.kh-modal-titlebar,
body .kh-item-menu-head.kh-modal-titlebar { padding-bottom: 8px; border-bottom: 0; }
body .kh-drawer-head.kh-modal-titlebar > div { display: grid; gap: 3px; }
body .kh-item-menu-head.kh-modal-titlebar { display: flex; }
body .kh-item-menu-head.kh-modal-titlebar > div { flex: 1 1 auto; }
body .kh-modal-titlebar .kh-item-menu-head > button,
body .kh-modal-titlebar .kh-drawer-head > button { position: static; }
body .kh-dialog-drag-handle { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
body .is-dragging .kh-dialog-drag-handle { cursor: grabbing; }

/* Seat each draggable bar flush against the modal's inside border. */
body .kh-dialog .kh-modal-titlebar {
  margin: -27px -22px 16px;
  border-radius: 14px 14px 0 0;
}
body .kh-drawer .kh-modal-titlebar {
  margin: -27px -22px 15px;
  border-radius: 14px 14px 0 0;
}
body [data-catalog][data-catalog-mode] .kh-modal-titlebar {
  margin: -30px -28px 18px;
  border-radius: 15px 15px 0 0;
}

@container kwaak-shell (max-width: 760px) {
  body .kh-dialog .kh-modal-titlebar { margin: -18px -15px 14px; }
  body [data-catalog][data-catalog-mode] .kh-modal-titlebar { margin: -27px -22px 15px; }
}

/* Keep category filters vertical, roomy and text-aligned in the shop rail. */
body [data-catalog][data-catalog-mode] .kh-catalog-layout {
  grid-template-columns: minmax(0, 1fr) 205px;
  gap: 14px;
}
body .kh-catalog-nav {
  min-width: 0;
  overflow-x: hidden;
}
body .kh-catalog-nav > button {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 12px;
  white-space: nowrap;
}
body .kh-catalog-nav > button[aria-current="true"] {
  color: #215f2e;
  background: #e3efd0;
  box-shadow: none;
}
body .kh-catalog-nav > button[aria-current="true"] > span { color: #398d41; }
body .kh-catalog-nav-categories {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 5px 7px 8px;
  border-bottom: 1px solid #d2e2bd;
  background: #f4f8e9;
}
body .kh-catalog-nav-categories button {
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #54714d;
  background: transparent;
  font-size: 11px;
  text-align: left;
}
body .kh-catalog-nav-categories button[aria-pressed="true"] {
  border-color: #c4dba3;
  color: #215f2e;
  background: #e3efd0;
  box-shadow: none;
}
body .kh-catalog-nav-categories button small {
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
}
body .kh-catalog-nav-categories button[aria-pressed="true"] small {
  color: #477442;
  background: #e7efd5;
}

@container kwaak-shell (max-width: 760px) {
  body [data-catalog][data-catalog-mode] .kh-catalog-layout {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 10px;
  }
}
@container kwaak-shell (max-width: 520px) {
  body [data-catalog][data-catalog-mode] .kh-catalog-layout {
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 7px;
  }
  body .kh-catalog-nav > button { padding-inline: 7px; font-size: 10px; }
  body .kh-catalog-nav-categories { padding-inline: 4px; }
  body .kh-catalog-nav-categories button { padding-inline: 6px; font-size: 9px; }
}

/* 0.42.2 — group personal destinations and anchor the emote picker to its button. */
body .kh-dock {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: visible;
}
body .kh-dock > button,
body .kh-dock-control > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding: 2px 8px;
  overflow: visible;
}
body .kh-dock-control > button {
  border: 2px solid #286c1a;
  border-radius: 7px;
  color: #214d26;
  background: #f7ffec;
  box-shadow: 0 2px 0 #286c1a, inset 0 1px 0 rgba(255, 255, 255, .8);
}
body .kh-dock-control {
  position: relative;
  z-index: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: visible;
}
body .kh-dock-control > button .kh-dock-icon,
body .kh-dock > button .kh-dock-icon,
body .kh-dock > button .kh-dock-help-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 0 auto;
}
body .kh-dock-control > button .kh-dock-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
body .kh-dock > button small,
body .kh-dock-control > button small {
  position: static;
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 1px 0 0;
  padding: 0;
  transform: none;
  border: 0;
  border-radius: 0;
  color: #24512f;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  font-size: 10px !important;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
body .kh-dock > button:not(:disabled):hover,
body .kh-dock-control > button:not(:disabled):hover,
body .kh-dock > button:focus-visible,
body .kh-dock-control > button:focus-visible {
  border-color: #73a83d;
  color: #24512f;
  background: #e9f4d5;
  box-shadow: 0 2px 0 #286c1a, inset 0 1px 0 rgba(255, 255, 255, .8);
}
body .kh-dock > button:not(:disabled):hover,
body .kh-dock-control > button:not(:disabled):hover {
  transform: none;
}
body .kh-dock > button[aria-expanded="true"],
body .kh-dock-control > button[aria-expanded="true"] {
  border-color: #73a83d;
  color: #24512f;
  background: #e9f4d5;
  box-shadow: 0 2px 0 #286c1a, inset 0 1px 0 rgba(255, 255, 255, .8);
}
body .kh-dock > button:hover small,
body .kh-dock > button:focus-visible small {
  position: static;
  left: auto;
  bottom: auto;
  padding: 0;
  transform: none;
  border: 0;
  color: #24512f;
  background: transparent;
  box-shadow: none;
  opacity: 1;
}
body .kh-dock-control > button:focus-visible,
body .kh-dock-submenu button:focus-visible { outline: 3px solid #ffd64a; outline-offset: 2px; }
body .kh-personal-wrap { z-index: 4; }
body .kh-dock-submenu {
  position: absolute;
  z-index: 9060;
  left: 50%;
  bottom: calc(100% + 50px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: min(350px, calc(100vw - 16px));
  padding: 9px;
  transform: translateX(-50%);
  border: 3px solid var(--kh-ui-green-dark, #2e791d);
  border-radius: 14px;
  background: var(--kh-ui-surface, #fffce8);
  box-shadow: 0 0 0 2px #f5ffdc, 0 4px 0 #24681e, 0 10px 22px rgba(26, 70, 29, .24);
}
body .kh-dock-submenu[hidden] { display: none !important; }
body .kh-dock-submenu > button {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 47px;
  padding: 6px 9px;
  border: 1px solid #b8d78f;
  border-radius: 9px;
  color: #285237;
  background: #f7f9e9;
  box-shadow: inset 0 1px 0 #fff;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}
body .kh-dock-submenu > button:hover,
body .kh-dock-submenu > button:focus-visible { border-color: #87bd59; background: #eaf4d8; }
body .kh-dock-submenu > button .kh-dock-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}
body .kh-dock-submenu > button .kh-dock-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
body .kh-dock-submenu > button .kh-dock-icon .kh-garden-ui-icon { width: 26px; }
body .kh-dock-submenu > button .kh-social-badge {
  position: static;
  min-width: 20px;
  height: 20px;
  border: 0;
  box-shadow: none;
}
body .kh-dock-submenu > button .kh-garden-alert-badge { top: 2px; right: 2px; }
body .kh-emote-wrap { z-index: 5; }
body .kh-emote-tray {
  left: 0;
  right: auto;
  bottom: calc(100% + 50px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  width: min(250px, calc(100vw - 16px));
  box-sizing: border-box;
  padding: 7px;
  transform: none;
}
body .kh-emote-tray[hidden] { display: none !important; }
body .kh-emote-tray button { width: 100%; height: 34px; font-size: 18px; }

@media (min-width: 761px) {
  body .kh-dock { grid-template-rows: 38px 44px; }
  body .kh-client:not(.is-fullscreen) {
    height: min(calc(100svh - 22px), calc((100vw - 30px) * 53 / 84 + 166px), calc(1320px * 53 / 84 + 166px));
    grid-template-rows: var(--kh-shell-head) minmax(0, 1fr) 92px;
    width: min(1330px, calc(100vw - 20px), calc((100svh - 188px) * 84 / 53 + 10px));
  }
  body .kh-dock > button .kh-dock-icon,
  body .kh-dock > button .kh-dock-help-icon,
  body .kh-dock-control > button .kh-dock-icon { flex-basis: 30px; width: 30px; height: 30px; }
  body .kh-dock > button,
  body .kh-dock-control > button {
    display: grid;
    grid-template-columns: 32px max-content;
    align-items: center;
    justify-content: start;
    column-gap: 8px;
    padding: 4px 12px;
    text-align: left;
  }
  body .kh-dock > button small,
  body .kh-dock-control > button small { margin: 0; font-size: 12px !important; line-height: 1.1; }
  body .kh-dock > button:not(:disabled):hover,
  body .kh-dock > button:focus-visible { justify-content: start; }
}
body .kh-client.is-fullscreen { grid-template-rows: var(--kh-shell-head) minmax(0, 1fr) 92px; }
body .kh-client.is-fullscreen .kh-stage-wrap {
  width: min(100%, calc((100dvh - var(--kh-shell-head) - 92px) * 84 / 53));
}

@media (max-width: 760px) {
  body .kh-dock { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: 31px 31px; overflow: visible; }
  body .kh-dock > button,
  body .kh-dock-control > button { grid-row: 2; min-height: 31px; height: 31px; gap: 0; padding: 2px; }
  body .kh-dock > button { grid-row: 2; min-height: 31px; height: 31px; gap: 0; padding: 2px; }
  body .kh-dock > button .kh-dock-icon,
  body .kh-dock > button .kh-dock-help-icon,
  body .kh-dock-control > button .kh-dock-icon { flex-basis: 18px; width: 18px; height: 18px; }
  body .kh-dock > button .kh-dock-help-icon { font-size: 13px; }
  body .kh-dock > button small,
  body .kh-dock-control > button small { display: none; }
  body .kh-dock-submenu { bottom: calc(100% + 41px); gap: 5px; padding: 7px; }
  body .kh-dock-submenu > button { min-height: 43px; grid-template-columns: 27px minmax(0, 1fr) auto; gap: 5px; padding: 5px 6px; font-size: 11px; }
  body .kh-dock-submenu > button .kh-dock-icon { width: 25px; height: 25px; }
  body .kh-emote-tray { bottom: calc(100% + 41px); gap: 3px; padding: 5px; }
  body .kh-emote-tray button { height: 30px; font-size: 16px; }
}

/* 0.37.15 — keep the shared titlebar in the existing heading row. */
body .kh-dialog .kh-modal-titlebar {
  flex: 0 0 auto;
  margin-bottom: 8px;
}
body .kh-garden-dialog > .kh-modal-titlebar { margin: -25px -22px 0; }
body .kh-garden-journal > .kh-modal-titlebar { margin: -24px -20px 0; }
body .kh-navigator > .kh-modal-titlebar { margin: -14px -14px 0; }
body .kh-tasks > .kh-modal-titlebar { margin: -24px -22px 0; }
body :is(.kh-lilyhop-dialog, .kh-canal-race-dialog, .kh-colour-quack-dialog, .kh-claw-game-dialog) > .kh-modal-titlebar {
  margin: -24px -20px 8px;
}
body .kh-quack-beat-dialog > .kh-modal-titlebar { margin: -27px -22px 8px; }
body .kh-two-factor-dialog > .kh-modal-titlebar { margin: -14px -16px 8px; }
body .kh-news-dialog > .kh-modal-titlebar { margin: -27px -22px 0; }
body .kh-achievements-heading.kh-modal-titlebar { margin-top: -27px; margin-bottom: 8px; }
body .kh-public-profile-layout { margin-top: 0; }
body .kh-navigator[open] .kh-navigator-hero.kh-modal-titlebar {
  margin: -14px -14px 0;
  padding: 8px 9px;
  border: 2px solid #f0d35c;
  border-radius: 14px 14px 0 0;
}

/* 0.46.0 — make room for the independent city-wide chat action. */
body .kh-dock {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
body .kh-items-drawer {
  box-sizing: border-box;
  width: min(930px, calc(100% - 32px));
  height: min(650px, calc(100% - var(--kh-shell-head) - 26px));
  max-height: calc(100% - var(--kh-shell-head) - 26px);
  padding: 27px 22px 18px;
  overflow: hidden;
}
body .kh-items-drawer:not([hidden]) { display: flex; }
body .kh-items-drawer > .kh-drawer-head { flex: 0 0 auto; }
body .kh-inventory-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
  margin: 14px 0 10px;
  padding: 0 0 8px;
  border-bottom: 2px solid #d5e7bd;
}
body .kh-inventory-tabs > button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 132px;
  min-height: 38px;
  padding: 6px 13px;
  border: 2px solid #b8d993;
  border-radius: 10px 8px 11px 8px;
  color: #345b36;
  background: #f4f9e5;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
body .kh-inventory-tabs > button[aria-selected="true"] {
  border-color: #387d2a;
  color: #fff;
  background: linear-gradient(#4cab3d, #287a2b);
  box-shadow: 0 2px 0 #28631f;
}
body .kh-inventory-tabs > button > span { font-size: 17px; line-height: 1; }
body .kh-inventory-tabs > button > b {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  color: #365c35;
  background: #e4f1c8;
  font-size: 10px;
}
body .kh-inventory-tabs > button[aria-selected="true"] > b { color: #325d2c; background: #f8f6d8; }
body .kh-inventory-view {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body .kh-inventory-view[hidden] { display: none !important; }
body .kh-items-drawer .kh-inventory-grid[hidden],
body .kh-items-drawer .kh-drawer-intro .kh-wallet-pill[hidden],
body .kh-inventory-actions > button[hidden] { display: none !important; }
body .kh-items-drawer .kh-drawer-intro { margin: 0 0 10px; }
body .kh-items-drawer .kh-inventory-grid {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  gap: 9px;
  padding: 2px 5px 7px 1px;
  overflow: auto;
}
body .kh-items-drawer .kh-inventory-item {
  grid-template-columns: 56px minmax(0, 1fr);
  min-height: 74px;
  padding: 7px;
  border-radius: 12px;
}
body .kh-items-drawer .kh-inventory-item-preview { width: 52px; height: 52px; }
body .kh-items-drawer .kh-inventory-item strong { font-size: 12px; }
body .kh-items-drawer .kh-inventory-item small { font-size: 10px; }
body .kh-inventory-empty {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 20px;
  color: #58734e;
  text-align: center;
}
body .kh-inventory-empty[hidden] { display: none !important; }
body .kh-inventory-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #dce9c9;
}
body .kh-inventory-actions > p { flex: 1 1 auto; margin: 0; color: #58734e; font-size: 11px; }
body .kh-inventory-actions > button {
  min-height: 38px;
  padding: 7px 13px;
  border: 2px solid #6b9b3b;
  border-radius: 9px;
  color: #2e6332;
  background: #f6f9e8;
  box-shadow: 0 2px 0 #a8c97b;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
body .kh-inventory-actions > .kh-begin-placement {
  border-color: #347d2b;
  color: #fff;
  background: linear-gradient(#50b346, #2d832e);
  box-shadow: 0 2px 0 #24621f;
}
body .kh-inventory-actions > .kh-clear-furniture { width: auto; margin: 0; flex: 0 0 auto; }
body .kh-inventory-actions > button:disabled { cursor: default; filter: grayscale(.55); opacity: .52; }
body .kh-inventory-badges .kh-achievements-heading {
  flex: 0 0 auto;
  align-items: center;
  margin: 0 0 9px;
  padding: 0 0 9px;
}
body .kh-inventory-badges .kh-achievements-heading h3 { margin: 0; color: var(--kh-ui-green-ink); font-size: 20px; }
body .kh-inventory-badges .kh-achievements-heading p { max-width: 610px; margin: 5px 0 0; font-size: 11px; }
body .kh-inventory-badges .kh-achievement-tabs { flex: 0 0 auto; margin: 0 0 10px; }
body .kh-inventory-badges .kh-achievements-content { flex: 1 1 auto; min-height: 0; }
body .kh-inventory-badges .kh-achievement-list { max-height: 100%; }
body .kh-inventory-badges .kh-selected-badge-card[hidden] { display: none !important; }
body .kh-inventory-badges.is-badgebook .kh-achievements-content { grid-template-columns: minmax(0, 1fr); }
body .kh-inventory-badges.is-badgebook .kh-selected-badge-card { display: none !important; }
body .kh-inventory-badges.is-badgebook .kh-achievement-card-action { display: none !important; }

@media (max-width: 760px) {
  body .kh-dock { grid-template-columns: repeat(6, minmax(0, 1fr)); width: calc(100% - 14px); }
  body .kh-items-drawer {
    width: calc(100% - 18px);
    height: min(650px, calc(100% - var(--kh-shell-head) - 16px));
    max-height: calc(100% - var(--kh-shell-head) - 16px);
    padding: 24px 12px 12px;
  }
  body .kh-items-drawer .kh-inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body .kh-inventory-actions { flex-wrap: wrap; }
  body .kh-inventory-actions > p { flex-basis: 100%; }
  body .kh-inventory-badges .kh-achievements-content { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  body .kh-inventory-badges .kh-selected-badge-card { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; justify-items: start; gap: 8px 12px; padding: 9px; text-align: left; }
  body .kh-inventory-badges .kh-selected-badge-previews { grid-column: 1; grid-row: 1; margin: 0; }
  body .kh-inventory-badges .kh-selected-badge-card > div { grid-column: 2; grid-row: 1; }
  body .kh-inventory-badges .kh-selected-badge-card > button { grid-column: 1 / -1; grid-row: 2; }
}

@media (min-width: 761px) and (max-width: 900px) {
  body .kh-dock > button,
  body .kh-dock-control > button { column-gap: 4px; padding-inline: 5px; }
  body .kh-dock > button small,
  body .kh-dock-control > button small { font-size: 11px !important; }
}

@media (min-width: 761px) {
  body .kh-dock {
    left: auto;
    right: auto;
    width: 100%;
    transform: none;
  }
}

/* 0.44.0 — put dressing under My Quacker and keep new-item counts beside their collection. */
body .kh-dock > button,
body .kh-dock-control > button { position: relative; }
body .kh-dock-new-count {
  position: absolute;
  z-index: 2;
  top: 1px;
  right: 3px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border: 2px solid #fffef2;
  border-radius: 999px;
  color: white;
  background: #db6743;
  box-shadow: 0 1px 2px rgba(34, 70, 33, .25);
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
}
body .kh-dock-new-count[hidden],
body .kh-inventory-tabs > button > b[hidden] { display: none !important; }
body .kh-personal-wrap > button.has-new-items .kh-dock-icon,
body .kh-dock > button.has-new-items .kh-dock-icon { filter: drop-shadow(0 0 4px rgba(255, 212, 64, .72)); }
body .kh-dock-submenu > button[data-action="dress"] > b[hidden] { display: none !important; }

body .kh-new-item-label {
  position: absolute;
  z-index: 3;
  top: 7px;
  right: 7px;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 2px solid #fffbe6;
  border-radius: 999px;
  color: #603a07;
  background: #ffdb51;
  box-shadow: 0 2px 0 #cc9023;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}
body .kh-items-drawer .kh-inventory-item,
body .kh-inventory-badges .kh-achievement-card,
body .kh-dressing-dialog .kh-skin-grid > button { position: relative; }

body .kh-dressing-dialog[open] {
  width: min(960px, calc(100% - 32px));
  max-height: calc(100% - var(--kh-shell-head) - 28px);
  padding: 24px;
  overflow-y: auto;
}
body .kh-dressing-dialog > h2 { margin-bottom: 5px; }
body .kh-dressing-intro { margin: 0 0 15px !important; color: #55745d; font-size: 13px !important; }
body .kh-dressing-layout {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.65fr);
  gap: 14px;
  align-items: start;
}
body .kh-dressing-customization,
body .kh-dressing-collection {
  min-width: 0;
  padding: 13px;
  border: 2px solid #c7dda2;
  border-radius: 16px 13px 17px 12px;
  background: #fffef2;
  box-shadow: 0 2px 0 rgba(66, 111, 47, .1);
}
body .kh-clothing-preview {
  display: grid;
  place-items: end center;
  height: 205px;
  margin-bottom: 11px;
  overflow: hidden;
  border: 3px solid #71bd50;
  border-radius: 14px;
  background: linear-gradient(#8bd9ed 0 59%, #b8df76 59% 72%, #f5f0cc 72%);
}
body .kh-dressing-dialog .kh-clothing-preview .kh-profile-kwaker {
  width: min(175px, 78%);
  margin-bottom: 4px;
}
body .kh-dressing-dialog .kh-avatar-options { gap: 7px; margin: 0; }
body .kh-dressing-dialog .kh-avatar-options > strong { font-size: 16px; }
body .kh-dressing-dialog .kh-avatar-options > small { font-size: 11px; }
body .kh-dressing-dialog .kh-kind-options { gap: 6px; }
body .kh-dressing-dialog .kh-kind-options button { padding: 7px 10px; font-size: 11px; }
body .kh-dressing-dialog .kh-color-options button { width: 37px; height: 37px; }
body .kh-dressing-dialog [data-avatar-choice-copy] { color: #53734f; font-size: 10px; }

/* KwakenCity photos */
.kh-photo-layer { position: absolute; z-index: 6; inset: 0; pointer-events: none; }
.kh-wall-photo-frame {
  position: absolute; left: var(--photo-x); top: var(--photo-y); width: clamp(72px, 12cqw, 142px);
  padding: 4px 4px 15px; transform: translate(-50%, -50%); border: 3px solid #9b6b2e;
  border-radius: 3px; color: #684517; background: #fff9df; box-shadow: 0 3px 0 #724819, 0 6px 10px #173c3870;
  pointer-events: auto; cursor: zoom-in;
}
.kh-wall-photo-frame img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #dce9cf; }
.kh-wall-photo-frame time { position: absolute; right: 4px; bottom: 2px; left: 4px; overflow: hidden; font-size: clamp(7px, .72cqw, 10px); line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.kh-photo-collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.kh-photo-collection-item { display: grid; grid-template-rows: auto auto auto; gap: 5px; padding: 8px; border: 2px solid #c9dfa4; border-radius: 12px; color: #254c38; background: #fffef2; text-align: left; cursor: pointer; }
.kh-photo-collection-item.is-selected { border-color: #329b37; box-shadow: 0 0 0 2px #329b3740; }
.kh-photo-collection-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 3px solid #9b6b2e; background: #e8f0d8; }
.kh-photo-collection-item time { overflow: hidden; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.kh-photo-collection-item small { color: #67806a; font-size: 10px; }
.kh-photo-camera { width: min(700px, calc(100% - 30px)); max-height: min(92vh, 720px); padding: 0 18px 14px; overflow: hidden; }
.kh-photo-camera > header { position: relative; z-index: 2; top: auto; display: flex; justify-content: space-between; align-items: center; margin: 0 -18px 10px; padding: 11px 18px; border-bottom: 3px solid #c9dfa4; background: linear-gradient(#3eaa36, #267d2b); color: white; }
.kh-photo-camera > header h2 { margin: 2px 0 0; font-size: 22px; }
.kh-photo-camera > header .kh-dialog-kicker { color: #e7f3d2; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.kh-photo-camera > header .kh-dialog-close { position: static; flex: 0 0 36px; width: 36px; height: 36px; border: 2px solid white; border-radius: 50%; color: #714716; background: #ffd842; font-size: 22px; }
.kh-camera-preview { position: relative; display: grid; width: 100%; max-width: min(100%, 300px); aspect-ratio: 1 / 1; place-items: center; margin: 0 auto; overflow: hidden; box-sizing: border-box; border: 8px solid #634b2d; border-radius: 10px; background: #d9e9c5; box-shadow: inset 0 0 0 2px #f7efcf, 0 3px 0 #382e1f; cursor: grab; touch-action: none; user-select: none; }
.kh-camera-preview.is-dragging { cursor: grabbing; }
.kh-camera-preview .kh-camera-live-scene { position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.kh-camera-preview .kh-camera-live-scene[hidden] { display: none !important; }
.kh-camera-preview .kh-camera-live-scene > .kh-stage { position: absolute !important; top: 0 !important; left: 0 !important; margin: 0 !important; max-width: none !important; max-height: none !important; transform-origin: 0 0 !important; }
.kh-camera-preview canvas { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 100%; }
.kh-camera-preview canvas[hidden] { display: none !important; }
.kh-camera-preview .kh-camera-frame { position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(#fff 0 0) left top / 22px 3px no-repeat, linear-gradient(#fff 0 0) left top / 3px 22px no-repeat, linear-gradient(#fff 0 0) right top / 22px 3px no-repeat, linear-gradient(#fff 0 0) right top / 3px 22px no-repeat, linear-gradient(#fff 0 0) left bottom / 22px 3px no-repeat, linear-gradient(#fff 0 0) left bottom / 3px 22px no-repeat, linear-gradient(#fff 0 0) right bottom / 22px 3px no-repeat, linear-gradient(#fff 0 0) right bottom / 3px 22px no-repeat; filter: drop-shadow(0 1px 2px #0009); }
.kh-camera-preview [data-camera-placeholder] { position: relative; z-index: 1; padding: 40px 12px; color: #52704e; font-weight: 800; }
.kh-camera-framing { display: grid; grid-template-columns: 38px minmax(100px, 1fr) 38px auto auto; align-items: center; gap: 8px; margin: 12px 0 4px; }
.kh-camera-framing button { min-height: 34px; border: 1px solid #96c75c; border-radius: 8px; color: #285f30; background: #f2f8df; font-weight: 850; cursor: pointer; }
.kh-camera-framing button[data-camera-zoom-out], .kh-camera-framing button[data-camera-zoom-in] { font-size: 20px; line-height: 1; }
.kh-camera-framing input { width: 100%; accent-color: #39a438; }
.kh-camera-framing output { min-width: 42px; color: #466848; font-size: 12px; font-weight: 850; text-align: center; }
.kh-camera-framing-hint { display: block; margin: 0 0 8px; color: #668067; font-size: 11px; }
.kh-photo-camera-status { min-height: 20px; margin: 10px 0; color: #34613d; font-size: 12px; }
.kh-photo-camera-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.kh-photo-camera-actions button, .kh-photo-pickup { min-height: 43px; padding: 8px 13px; border: 2px solid #2b7e2f; border-radius: 11px; color: white; background: linear-gradient(#50b342, #29882d); box-shadow: 0 3px 0 #1e6325; font-weight: 850; cursor: pointer; }
.kh-photo-camera-actions .kh-photo-capture { color: #613f0a; background: linear-gradient(#ffe381, #ffc83c); border-color: #d89921; box-shadow: 0 3px 0 #a8751d; }
.kh-photo-camera-actions button:disabled { opacity: .55; cursor: not-allowed; }
.kh-photo-viewer { width: min(800px, calc(100% - 30px)); padding: 28px; border: 8px solid #754f26; border-radius: 8px; background: #fff8dc; box-shadow: 0 5px 0 #442f18; }
.kh-photo-viewer > .kh-dialog-close { color: #704915; background: #ffd842; }
.kh-photo-viewer figure { margin: 0; padding: 10px 10px 14px; background: #fff; box-shadow: 0 2px 12px #2a261d30; }
.kh-photo-viewer figure img { display: block; width: 100%; max-height: 65vh; object-fit: contain; background: #e4ead8; }
.kh-photo-viewer figcaption { display: flex; justify-content: space-between; gap: 10px; padding: 12px 4px 0; color: #3b593e; }
.kh-photo-viewer figcaption time { color: #71836b; font-size: 12px; }
.kh-photo-pickup { display: block; margin: 13px auto 0; }
.kh-public-profile-photo figure { margin: 0; padding: 8px 8px 5px; border: 3px solid #976b30; background: #fff; }
.kh-public-profile-photo img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.kh-public-profile-photo figcaption { padding: 7px 2px 3px; color: #67806a; font-size: 11px; }

@media (max-width: 560px) {
  .kh-photo-camera-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kh-photo-camera-actions button { padding: 7px; font-size: 11px; }
  .kh-camera-framing { grid-template-columns: 34px minmax(70px, 1fr) 34px auto; gap: 5px; }
  .kh-camera-framing [data-camera-reset] { grid-column: 1 / -1; }
  .kh-photo-viewer { padding: 19px; }
}
@media (max-height: 760px) {
  .kh-photo-camera { max-height: calc(100svh - 18px); padding-bottom: 10px; }
  .kh-photo-camera > header { margin-bottom: 8px; padding-top: 9px; padding-bottom: 9px; }
  .kh-camera-framing { margin-top: 8px; }
  .kh-camera-framing-hint { margin-bottom: 4px; }
  .kh-photo-camera-status { min-height: 14px; margin: 5px 0; }
  .kh-photo-camera-actions { gap: 7px; }
  .kh-photo-camera-actions button { min-height: 38px; }
}
body .kh-dressing-dialog .kh-motto-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 14px 0 0;
  padding: 11px;
  border: 2px solid #b9d98c;
  border-radius: 12px;
  background: #f3f9e4;
}
body .kh-dressing-dialog .kh-motto-editor label { grid-column: 1 / -1; font-size: 12px; }
body .kh-dressing-dialog .kh-motto-editor input { grid-column: 1 / -1; height: 39px; font: 500 13px/1.2 system-ui, sans-serif; }
body .kh-dressing-dialog .kh-motto-editor > span { align-self: center; font-size: 10px; }
body .kh-dressing-dialog .kh-motto-editor button { height: 36px; padding: 6px 12px; font: 900 11px/1 system-ui, sans-serif; }
body .kh-dressing-dialog .kh-motto-editor small { grid-column: 1 / -1; min-height: 14px; margin: 0; font-size: 10px; line-height: 1.25; }
body .kh-clothing-heading { margin: 0 0 10px; }
body .kh-clothing-heading h3 { margin: 0; color: #285237; font-size: 19px; }
body .kh-clothing-heading p,
body .kh-clothing-new-hint { margin: 4px 0 0 !important; color: #5c755d; font-size: 11px !important; line-height: 1.4 !important; }
body .kh-dressing-dialog .kh-skin-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  max-height: 465px;
  margin: 0;
  padding: 3px 5px 7px 2px;
  overflow: auto;
}
body .kh-dressing-dialog .kh-skin-grid > button {
  min-height: 147px;
  padding: 9px 7px;
  gap: 6px;
  border: 2px solid #b9d98c;
  border-radius: 13px;
  background: #f7fae9;
  font-size: 12px;
}
body .kh-dressing-dialog .kh-skin-grid > button.is-worn {
  border-color: #387d2a;
  background: #edf7d8;
  box-shadow: 0 2px 0 #28631f;
}
body .kh-dressing-dialog .kh-skin-grid .kh-skin-thumb { width: 78px; }
body .kh-dressing-dialog .kh-skin-grid strong { line-height: 1.2; text-align: center; }
body .kh-dressing-dialog .kh-skin-grid small { color: #52734a; font-size: 10px; }
body .kh-dressing-dialog .kh-skin-grid .kh-new-item-label { top: 5px; right: 5px; min-height: 18px; font-size: 8px; }

body .kh-profile[open] { width: min(640px, calc(100% - 28px)); }
body .kh-profile-layout { grid-template-columns: minmax(0, 1fr); }
body .kh-profile-overview {
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
}
body .kh-profile-overview .kh-profile-avatar { min-height: 250px; }
body .kh-profile-progress { align-self: stretch; }

@media (max-width: 760px) {
  body .kh-dressing-dialog[open] { width: calc(100% - 18px); padding: 20px 12px 14px; }
  body .kh-dressing-layout { grid-template-columns: 1fr; }
  body .kh-dressing-dialog .kh-skin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 360px; }
  body .kh-profile-overview { grid-template-columns: 1fr; grid-template-rows: minmax(220px, 1fr) auto; }
}

/* Openbare profielen: look, badges, Nesten, respect en gastenboek. */
body .kh-public-profile[open] {
  width: min(980px, calc(100% - 36px));
  max-width: calc(100% - 36px);
  padding: 14px;
  overflow: hidden;
  border-color: #fffdf0;
  border-radius: 24px;
  background: linear-gradient(155deg, #fffdf0, #f5f8db);
}
body .kh-public-profile > .kh-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  float: none;
  margin: 0;
}
body .kh-public-profile-scroll {
  max-height: calc(100cqh - var(--kh-shell-head) - 72px);
  padding: 8px 7px 12px;
  overflow: auto;
  scrollbar-color: #72b742 #e8f0d2;
  scrollbar-width: thin;
}
body .kh-public-profile-scroll > .kh-dialog-kicker { display: block; margin: 0 0 10px; color: #9a5d17; font-size: 10px; }
body .kh-public-profile-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: stretch;
  margin: 0;
}
body .kh-public-profile-stage {
  min-height: 255px;
  border: 4px solid white;
  border-radius: 20px;
  background: linear-gradient(#83d7eb 0 57%, #addb76 57% 70%, #f4ebc9 70%);
  box-shadow: 0 0 0 3px #66ac35, 0 5px 0 #3d8025;
}
body .kh-public-profile-stage .kh-profile-kwaker { width: min(205px, 96%); margin-bottom: 0; }
body .kh-public-profile-copy { align-self: center; min-width: 0; padding: 9px 5px; }
body .kh-public-profile-copy h2 { margin: 8px 0 4px; color: #06434b; font-size: clamp(25px, 3vw, 34px); }
body .kh-public-profile-copy > p { margin: 4px 0 0; color: #60745e; font-size: 13px; }
body .kh-public-profile-copy > .kh-public-profile-motto { min-height: 21px; color: #25594e; font-size: 15px; font-weight: 800; }
body .kh-public-profile-motto.is-empty { color: #83907d !important; font-weight: 600 !important; }
body .kh-public-profile-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
body .kh-public-profile-progress > span { display: grid; gap: 3px; padding: 8px 9px; border: 2px solid #d3e6ad; border-radius: 12px; background: #f4f9df; }
body .kh-public-profile-progress small { color: #65785e; font-size: 8px; font-weight: 900; line-height: 1.25; text-transform: uppercase; }
body .kh-public-profile-progress strong { color: #28652a; font-size: 17px; line-height: 1; }
body .kh-public-profile-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
body .kh-public-profile-actions button { min-height: 36px; padding: 7px 11px; border-radius: 10px; font-size: 10px; }
body .kh-public-profile-actions button small { margin-left: 3px; font-size: 8px; font-weight: 700; }
body .kh-public-profile-respect-note { margin: 5px 0 0 !important; color: #76836e !important; font-size: 9px !important; line-height: 1.35 !important; }
body .kh-public-profile-respect-note[hidden] { display: none !important; }
body .kh-public-profile-feedback { min-height: 18px; color: #32862b !important; font-size: 10px !important; font-weight: 800; }
body .kh-public-profile-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
body .kh-public-profile-panel { min-width: 0; padding: 13px; border: 2px solid #cee2a5; border-radius: 16px; background: rgba(255, 255, 250, .88); }
body .kh-public-profile-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
body .kh-public-profile-panel h3 { margin: 2px 0 0; color: #174f39; font-size: 17px; }
body .kh-public-profile-eyebrow { color: #ad691d; font-size: 8px; font-weight: 950; letter-spacing: .1em; }
body .kh-public-profile-count { padding: 5px 8px; border: 1px solid #d6e6bd; border-radius: 999px; color: #486d46; background: #f1f8df; font-size: 9px; font-weight: 900; white-space: nowrap; }
body .kh-public-profile-badges { display: flex; flex-wrap: wrap; gap: 7px; }
body .kh-public-profile-badge { display: flex; min-width: 135px; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #d6e6bb; border-radius: 11px; background: #f7f9e7; }
body .kh-public-profile-badge-art { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; color: #367830; background-image: var(--kh-badge-image, linear-gradient(145deg, #ffd94c, #4ca637)); background-position: center; background-repeat: no-repeat; background-size: contain; font-size: 0; }
body .kh-public-profile-badge strong { color: #38593b; font-size: 10px; line-height: 1.25; }
body .kh-public-profile-nests { display: grid; gap: 7px; }
body .kh-public-profile-nest { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px; border: 1px solid #d6e6bb; border-radius: 11px; background: #f7f9e7; }
body .kh-public-profile-nest-icon { display: grid; width: 36px; height: 36px; place-items: center; border: 2px solid white; border-radius: 11px; color: white; background: #278a83; box-shadow: 0 2px 0 #17615d; font-size: 23px; font-weight: 900; line-height: 1; }
body .kh-public-profile-nest strong, body .kh-public-profile-nest small { display: block; }
body .kh-public-profile-nest strong { overflow: hidden; color: #355a39; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
body .kh-public-profile-nest small { margin-top: 3px; color: #6b7c65; font-size: 9px; }
body .kh-public-profile-nest-visit { min-width: 66px; padding: 7px 9px; border: 2px solid #367f26; border-radius: 8px; color: white; background: #4eaa2a; font-size: 9px; font-weight: 900; }
body .kh-public-profile-nest-visit:disabled { border-color: #cbd8bd; color: #899483; background: #edf1e5; box-shadow: none; }
body .kh-public-profile-empty { margin: 0 !important; padding: 12px; border: 1px dashed #c6dca7; border-radius: 11px; color: #74846a !important; text-align: center; font-size: 10px !important; }
body .kh-public-profile-empty[hidden] { display: none !important; }
body .kh-public-profile-guestbook { grid-column: 1 / -1; }
body .kh-public-profile-guestbook-form { display: grid; gap: 7px; margin-bottom: 10px; }
body .kh-public-profile-guestbook-form[hidden] { display: none !important; }
body .kh-public-profile-guestbook-form textarea { width: 100%; min-height: 72px; padding: 10px 12px; resize: vertical; border: 2px solid #c6dca7; border-radius: 11px; color: #214d3e; background: #fffef7; font: 500 12px/1.4 system-ui, sans-serif; }
body .kh-public-profile-guestbook-form textarea:focus { outline: 3px solid rgba(88, 173, 32, .2); border-color: #63aa35; }
body .kh-public-profile-guestbook-form > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
body .kh-public-profile-guestbook-form small { color: #76836e; font-size: 9px; }
body .kh-public-profile-guestbook-form button { min-height: 34px; padding: 7px 12px; border: 2px solid #347c25; border-radius: 9px; color: white; background: #4da72c; box-shadow: 0 2px 0 #2f6e22; font-size: 10px; font-weight: 900; }
body .kh-public-profile-guestbook-form button:disabled { cursor: wait; opacity: .55; }
body .kh-public-profile-guestbook-list { display: grid; gap: 7px; max-height: 260px; overflow: auto; }
body .kh-public-profile-guestbook-entry { position: relative; padding: 9px 11px; border: 1px solid #d6e6bb; border-radius: 11px; background: #f8f9e9; }
body .kh-public-profile-guestbook-entry > header { display: flex; justify-content: space-between; gap: 10px; }
body .kh-public-profile-guestbook-entry > header strong { color: #285c3b; font-size: 11px; }
body .kh-public-profile-guestbook-entry time { color: #819078; font-size: 8px; }
body .kh-public-profile-guestbook-entry > p { margin: 5px 0 0; color: #3f5e4e; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
body .kh-public-profile-guestbook-delete { position: absolute; right: 8px; bottom: 6px; padding: 3px 6px; border: 1px solid #e1c0ae; border-radius: 6px; color: #8b4f3d; background: #fff5ed; font-size: 8px; }
body .kh-public-profile-guestbook-entry:has(.kh-public-profile-guestbook-delete) > p { padding-right: 72px; }

@container kwaak-shell (max-width: 760px) {
  body .kh-public-profile[open] { width: calc(100% - 18px); max-width: calc(100% - 18px); padding: 11px; }
  body .kh-public-profile-scroll { max-height: calc(100cqh - var(--kh-shell-head) - 62px); padding: 7px 5px 10px; }
  body .kh-public-profile-layout { grid-template-columns: 150px minmax(0, 1fr); gap: 13px; }
  body .kh-public-profile-stage { min-height: 220px; }
  body .kh-public-profile-stage .kh-profile-kwaker { width: min(170px, 98%); }
  body .kh-public-profile-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body .kh-public-profile-actions { gap: 5px; }
  body .kh-public-profile-actions button { min-height: 32px; padding: 5px 8px; font-size: 9px; }
  body .kh-public-profile-sections { gap: 8px; }
}

/* 0.46.0 — a persistent city-wide chat, separate from each room's local chat. */
body .kh-general-chat-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
body .kh-dock > button[data-action="general-chat"] { position: relative; }
body .kh-general-chat[open] { display: flex; flex-direction: column; width: min(760px, calc(100vw - 36px)); height: min(660px, calc(100vh - 72px)); max-height: calc(100vh - 72px); padding: 0 22px 20px; overflow: hidden; border: 4px solid #f7ffe9; border-radius: 20px; background: #fffdeb; }
body .kh-general-chat .kh-general-chat-head { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; min-height: 68px; margin: 0 -22px 14px; padding: 10px 20px; border: 0; border-bottom: 3px solid #8fc64b; border-radius: 15px 15px 0 0; background: linear-gradient(#4eaa36, #318c2d); color: #fffbea; box-shadow: none; }
body .kh-general-chat-head .kh-dialog-kicker { display: block; color: #e5f5b8; font-size: 9px; letter-spacing: .12em; }
body .kh-general-chat .kh-general-chat-head h2 { margin: 3px 0 0; color: white; font-size: 24px; line-height: 1.1; }
body .kh-general-chat-head .kh-dialog-close { position: static; flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; border: 2px solid white; border-radius: 50%; color: #714716; background: #ffd842; box-shadow: 0 2px 0 #cf9028; font-size: 22px; }
body .kh-general-chat-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; margin: 1px 0 3px; padding-bottom: 9px; border-bottom: 1px solid #dce8bf; }
body .kh-general-chat-intro { flex: 1 1 auto; margin: 0; color: #58745c; font-size: 12px; line-height: 1.35; }
body .kh-general-chat-notifications { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 5px 9px; border: 1px solid #d3e4ad; border-radius: 9px; background: #f3f7df; cursor: pointer; }
body .kh-general-chat-notifications input { width: 16px; height: 16px; margin: 0; accent-color: #399b32; }
body .kh-general-chat-notifications span { display: block; }
body .kh-general-chat-notifications strong { color: #315b38; font-size: 10px; }
body .kh-general-chat-status { flex: 0 0 auto; min-height: 18px; margin: 9px 1px 6px; color: #5e7b5b; font-size: 10px; }
body .kh-general-chat-status:empty { display: none; }
body .kh-general-chat-status[data-state="error"] { color: #a74430; }
body .kh-general-chat-messages { display: flex; flex: 1 1 0; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 150px; padding: 6px 2px 10px; overflow: auto; overscroll-behavior: contain; }
body .kh-general-chat-empty { display: grid; flex: 1 0 150px; align-content: center; justify-items: center; gap: 6px; padding: 20px; color: #72866a; text-align: center; }
body .kh-general-chat-empty::before { content: ""; width: 44px; height: 34px; border: 2px solid #b5d48a; border-radius: 12px 12px 12px 3px; background: linear-gradient(transparent 44%, #b5d48a 45% 49%, transparent 50%), #f2f7df; box-shadow: inset 0 -4px 0 #e2edc4; }
body .kh-general-chat-empty strong { color: #406744; font-size: 13px; }
body .kh-general-chat-empty span { font-size: 11px; }
body .kh-general-chat-message { display: flex; align-items: flex-end; align-self: flex-start; gap: 8px; width: min(88%, 650px); flex: 0 0 auto; padding: 0; border: 0; border-radius: 0; background: transparent; }
body .kh-general-chat-message.is-own { align-self: flex-end; flex-direction: row-reverse; }
body .kh-general-chat-avatar { position: relative; flex: 0 0 42px; width: 42px; height: 42px; margin: 0; overflow: hidden; border: 2px solid #fff4c8; border-radius: 50%; background: linear-gradient(#cceef0, #e9f3c8); box-shadow: 0 0 0 2px #a6c96f, 0 3px 7px rgba(30, 81, 37, .16); filter: none; }
body .kh-general-chat-avatar .kh-sprite-flip { position: absolute; top: -5px; left: 50%; width: 64px; height: 64px; transform: translateX(-50%); filter: none; }
body .kh-general-chat-avatar .kh-avatar-sprite { background-position: 0 100%; }
body .kh-general-chat-content { min-width: 0; max-width: calc(100% - 50px); padding: 9px 12px 10px; border: 1px solid #d8e7b9; border-radius: 15px 15px 15px 4px; background: #f6f8e9; box-shadow: 0 2px 0 rgba(130, 170, 77, .15); }
body .kh-general-chat-message.is-own .kh-general-chat-content { border-color: #bed990; border-radius: 15px 15px 4px 15px; background: #eaf4d7; }
body .kh-general-chat-message > .kh-general-chat-content > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
body .kh-general-chat-name { min-width: 0; padding: 0; border: 0; color: #276036; background: transparent; font: 800 11px/1.25 system-ui, sans-serif; text-align: left; text-decoration: underline; text-decoration-color: rgba(39, 96, 54, .35); text-underline-offset: 2px; cursor: pointer; }
body .kh-general-chat-name:hover { color: #188078; text-decoration-color: currentColor; }
body .kh-general-chat-name:disabled { text-decoration: none; cursor: default; }
body .kh-general-chat-message > .kh-general-chat-content > header time { flex: 0 0 auto; color: #87937d; font-size: 9px; }
body .kh-general-chat-content > p { margin: 4px 0 0; color: #3e5948; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
body .kh-general-chat-moderation { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; padding-top: 7px; border-top: 1px solid #e1e9cd; }
body .kh-general-chat-moderation button { min-height: 25px; padding: 3px 7px; border: 1px solid #9bbd75; border-radius: 7px; color: #315f34; background: #f2f7e2; font: 700 9px/1.2 system-ui, sans-serif; cursor: pointer; }
body .kh-general-chat-moderation button:first-child { border-color: #d89a74; color: #8d472d; background: #fff3e9; }
body .kh-general-chat-form { display: flex; flex: 0 0 auto; gap: 8px; margin-top: 9px; padding-top: 11px; border-top: 2px solid #dce8bf; }
body .kh-general-chat-form input { flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; border: 2px solid #b9d38c; border-radius: 10px; color: #244e39; background: white; font: 500 12px/1.3 system-ui, sans-serif; }
body .kh-general-chat-form input:focus { outline: 3px solid rgba(88, 173, 32, .18); border-color: #61a73b; }
body .kh-general-chat-form button { min-width: 105px; min-height: 42px; padding: 8px 13px; border: 2px solid #2e7d24; border-radius: 10px; color: white; background: linear-gradient(#4fb33d, #368e2d); box-shadow: 0 3px 0 #286a20; font: 800 11px system-ui, sans-serif; }
body .kh-general-chat-form button:disabled,
body .kh-general-chat-form input:disabled { cursor: not-allowed; opacity: .58; }
body .kh-general-chat [hidden] { display: none !important; }
@media (max-width: 600px) {
  body .kh-general-chat[open] { width: calc(100vw - 20px); height: calc(100vh - 30px); max-height: calc(100vh - 30px); padding: 0 12px 13px; border-width: 3px; border-radius: 15px; }
  body .kh-general-chat-head { min-height: 64px; margin-inline: -12px; padding-inline: 13px; }
  body .kh-general-chat-head h2 { font-size: 20px; }
  body .kh-general-chat-topline { align-items: flex-start; flex-direction: column; gap: 7px; }
  body .kh-general-chat-form { gap: 5px; }
  body .kh-general-chat-form button { min-width: 83px; padding-inline: 8px; }
}
body .kh-general-chat-blocked { flex: 0 0 auto; max-height: 95px; margin-top: 8px; padding: 8px 10px; overflow: auto; border: 1px solid #e0bf83; border-radius: 10px; background: #fff7df; }
body .kh-general-chat-blocked > strong { display: block; margin-bottom: 5px; color: #855c27; font-size: 10px; }
body .kh-general-chat-blocked-list { display: grid; gap: 4px; }
body .kh-general-chat-blocked-list > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #4e624a; font-size: 10px; }
body .kh-general-chat-blocked-list button { min-height: 24px; padding: 3px 7px; border: 1px solid #9bbd75; border-radius: 7px; color: #315f34; background: #f2f7e2; font: 700 9px system-ui, sans-serif; }
body .kh-general-chat[open] { box-sizing: border-box; }
body .kh-general-chat[open] .kh-general-chat-head { margin-top: 0; }

/* Club checkout: compact layout with a clear EUR total and Mollie options. */
body .kh-club-dialog[open] {
  box-sizing: border-box;
  width: min(760px, calc(100% - 28px));
  height: auto;
  min-height: 0;
  max-height: calc(100% - var(--kh-shell-head) - 20px);
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: auto;
}
body .kh-club-purchase-options {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}
body .kh-club-dialog .kh-club-months { min-width: 0; }
body .kh-club-dialog .kh-club-months select { box-sizing: border-box; min-height: 54px; }
body .kh-club-price-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 7px 12px;
  border: 1px solid #cfe0ae;
  border-radius: 11px;
  background: #f4f9e7;
}
body .kh-club-price-summary > span { display: grid; gap: 3px; min-width: 0; }
body .kh-club-price-summary > span + span { padding-left: 10px; border-left: 1px solid #d5e5b8; }
body .kh-club-price-summary small { color: #617a5b; font-size: 8px; font-weight: 800; }
body .kh-club-price-summary strong { color: #20583c; font-size: 13px; line-height: 1.15; }
body .kh-club-price-summary > span:last-child strong { color: #087985; font-size: 17px; }
body .kh-club-payment-methods {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 11px;
  border: 1px solid #d4e3b5;
  border-radius: 10px;
  background: #f7faeb;
}
body .kh-club-payment-methods > span { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: #399738; font-size: 14px; font-weight: 950; }
body .kh-club-payment-methods p { margin: 0; color: #476650; font-size: 10px; line-height: 1.35; }
body .kh-club-dialog .kh-club-buy { margin-top: 10px; }
body .kh-club-dialog .kh-club-no-subscription { margin: 7px 0 0; font-size: 9px; }
body .kh-club-dialog .kh-club-reward-note { margin-top: 10px; }
@media (max-width: 700px) {
  body .kh-club-purchase-options { grid-template-columns: 1fr; align-items: stretch; }
  body .kh-club-price-summary { min-height: 48px; }
  body .kh-club-dialog .kh-club-months select { min-height: 42px; }
}

/* 0.47.0 — ten complete 5x3 Kwaker skin atlases. */
.kh-guest[data-skin="canal_guide"], .kh-profile-kwaker[data-skin="canal_guide"] { --kh-avatar-atlas: url("../images/skin-canal-guide-atlas-v1-yellow.png"); }
.kh-guest[data-skin="bloom_keeper"], .kh-profile-kwaker[data-skin="bloom_keeper"] { --kh-avatar-atlas: url("../images/skin-bloom-keeper-atlas-v1-yellow.png"); }
.kh-guest[data-skin="storybook_scholar"], .kh-profile-kwaker[data-skin="storybook_scholar"] { --kh-avatar-atlas: url("../images/skin-storybook-scholar-atlas-v1-yellow.png"); }
.kh-guest[data-skin="forest_ranger"], .kh-profile-kwaker[data-skin="forest_ranger"] { --kh-avatar-atlas: url("../images/skin-forest-ranger-atlas-v1-yellow.png"); }
.kh-guest[data-skin="airmail_pilot"], .kh-profile-kwaker[data-skin="airmail_pilot"] { --kh-avatar-atlas: url("../images/skin-airmail-pilot-atlas-v1-yellow.png"); }
.kh-guest[data-skin="harbour_musician"], .kh-profile-kwaker[data-skin="harbour_musician"] { --kh-avatar-atlas: url("../images/skin-harbour-musician-atlas-v1-yellow.png"); }
.kh-guest[data-skin="club_harbour_captain"], .kh-profile-kwaker[data-skin="club_harbour_captain"] { --kh-avatar-atlas: url("../images/skin-club-harbour-captain-atlas-v1-yellow.png"); }
.kh-guest[data-skin="club_cloud_keeper"], .kh-profile-kwaker[data-skin="club_cloud_keeper"] { --kh-avatar-atlas: url("../images/skin-club-cloud-keeper-atlas-v1-yellow.png"); }
.kh-guest[data-skin="club_star_traveler"], .kh-profile-kwaker[data-skin="club_star_traveler"] { --kh-avatar-atlas: url("../images/skin-club-star-traveler-atlas-v1-yellow.png"); }
.kh-guest[data-skin="club_royal_regent"], .kh-profile-kwaker[data-skin="club_royal_regent"] { --kh-avatar-atlas: url("../images/skin-club-royal-regent-atlas-v1-yellow.png"); }
.kh-skin-thumb[data-skin-item="canal_guide"] { background-image: url("../images/skin-canal-guide-atlas-v1-yellow.png"); }
.kh-skin-thumb[data-skin-item="bloom_keeper"] { background-image: url("../images/skin-bloom-keeper-atlas-v1-yellow.png"); }
.kh-skin-thumb[data-skin-item="storybook_scholar"] { background-image: url("../images/skin-storybook-scholar-atlas-v1-yellow.png"); }
.kh-skin-thumb[data-skin-item="forest_ranger"] { background-image: url("../images/skin-forest-ranger-atlas-v1-yellow.png"); }
.kh-skin-thumb[data-skin-item="airmail_pilot"] { background-image: url("../images/skin-airmail-pilot-atlas-v1-yellow.png"); }
.kh-skin-thumb[data-skin-item="harbour_musician"] { background-image: url("../images/skin-harbour-musician-atlas-v1-yellow.png"); }
.kh-skin-thumb[data-skin-item="club_harbour_captain"] { background-image: url("../images/skin-club-harbour-captain-atlas-v1-yellow.png"); }
.kh-skin-thumb[data-skin-item="club_cloud_keeper"] { background-image: url("../images/skin-club-cloud-keeper-atlas-v1-yellow.png"); }
.kh-skin-thumb[data-skin-item="club_star_traveler"] { background-image: url("../images/skin-club-star-traveler-atlas-v1-yellow.png"); }
.kh-skin-thumb[data-skin-item="club_royal_regent"] { background-image: url("../images/skin-club-royal-regent-atlas-v1-yellow.png"); }

@keyframes kh-new-skin-walk-side {
  0%, 100% { background-position: 0 0; }
  34% { background-position: 25% 0; }
  67% { background-position: 50% 0; }
}
@keyframes kh-new-skin-walk-front {
  0%, 100% { background-position: 0 50%; }
  34% { background-position: 25% 50%; }
  67% { background-position: 50% 50%; }
}
@keyframes kh-new-skin-walk-back {
  0%, 100% { background-position: 0 100%; }
  34% { background-position: 25% 100%; }
  67% { background-position: 50% 100%; }
}
@keyframes kh-new-skin-idle-side {
  0%, 100% { background-position: 100% 0; }
}
@keyframes kh-new-skin-idle-front {
  0%, 30%, 100% { background-position: 0 50%; }
  31%, 58% { background-position: 25% 50%; }
  59%, 80% { background-position: 50% 50%; }
}
@keyframes kh-new-skin-idle-back {
  0%, 30%, 100% { background-position: 0 100%; }
  31%, 58% { background-position: 25% 100%; }
  59%, 80% { background-position: 50% 100%; }
}
@keyframes kh-new-skin-wave {
  0%, 42% { background-position: 75% 50%; }
  58%, 100% { background-position: 100% 50%; }
}
@keyframes kh-new-skin-profile-idle {
  0%, 48%, 100% { background-position: 75% 100%; }
  52% { background-position: 100% 100%; }
}

body .kh-guest:not(.is-sitting):is([data-skin="canal_guide"], [data-skin="bloom_keeper"], [data-skin="storybook_scholar"], [data-skin="forest_ranger"], [data-skin="airmail_pilot"], [data-skin="harbour_musician"], [data-skin="club_harbour_captain"], [data-skin="club_cloud_keeper"], [data-skin="club_star_traveler"], [data-skin="club_royal_regent"]) .kh-avatar-sprite {
  background-image: var(--kh-avatar-atlas) !important;
  background-size: 500% 300% !important;
  background-position: 0 0;
  animation: kh-new-skin-idle-side 4.8s steps(1, end) infinite !important;
}
body .kh-guest:not(.is-sitting)[data-direction="down"]:is([data-skin="canal_guide"], [data-skin="bloom_keeper"], [data-skin="storybook_scholar"], [data-skin="forest_ranger"], [data-skin="airmail_pilot"], [data-skin="harbour_musician"], [data-skin="club_harbour_captain"], [data-skin="club_cloud_keeper"], [data-skin="club_star_traveler"], [data-skin="club_royal_regent"]) .kh-avatar-sprite {
  background-position: 75% 100%;
  animation-name: kh-new-skin-profile-idle !important;
}
body .kh-guest:not(.is-sitting)[data-direction="up"]:is([data-skin="canal_guide"], [data-skin="bloom_keeper"], [data-skin="storybook_scholar"], [data-skin="forest_ranger"], [data-skin="airmail_pilot"], [data-skin="harbour_musician"], [data-skin="club_harbour_captain"], [data-skin="club_cloud_keeper"], [data-skin="club_star_traveler"], [data-skin="club_royal_regent"]) .kh-avatar-sprite {
  background-position: 0 100%;
  animation-name: kh-new-skin-idle-back !important;
}
body .kh-guest.is-walking:not(.is-sitting):is([data-skin="canal_guide"], [data-skin="bloom_keeper"], [data-skin="storybook_scholar"], [data-skin="forest_ranger"], [data-skin="airmail_pilot"], [data-skin="harbour_musician"], [data-skin="club_harbour_captain"], [data-skin="club_cloud_keeper"], [data-skin="club_star_traveler"], [data-skin="club_royal_regent"]) .kh-avatar-sprite {
  animation: kh-new-skin-walk-side .96s steps(1, end) infinite !important;
}
body .kh-guest.is-walking:not(.is-sitting)[data-direction="down"]:is([data-skin="canal_guide"], [data-skin="bloom_keeper"], [data-skin="storybook_scholar"], [data-skin="forest_ranger"], [data-skin="airmail_pilot"], [data-skin="harbour_musician"], [data-skin="club_harbour_captain"], [data-skin="club_cloud_keeper"], [data-skin="club_star_traveler"], [data-skin="club_royal_regent"]) .kh-avatar-sprite { animation-name: kh-new-skin-walk-front !important; }
body .kh-guest.is-walking:not(.is-sitting)[data-direction="up"]:is([data-skin="canal_guide"], [data-skin="bloom_keeper"], [data-skin="storybook_scholar"], [data-skin="forest_ranger"], [data-skin="airmail_pilot"], [data-skin="harbour_musician"], [data-skin="club_harbour_captain"], [data-skin="club_cloud_keeper"], [data-skin="club_star_traveler"], [data-skin="club_royal_regent"]) .kh-avatar-sprite { animation-name: kh-new-skin-walk-back !important; }
body .kh-guest.is-waving:not(.is-sitting):is([data-skin="canal_guide"], [data-skin="bloom_keeper"], [data-skin="storybook_scholar"], [data-skin="forest_ranger"], [data-skin="airmail_pilot"], [data-skin="harbour_musician"], [data-skin="club_harbour_captain"], [data-skin="club_cloud_keeper"], [data-skin="club_star_traveler"], [data-skin="club_royal_regent"]) .kh-avatar-sprite {
  background-image: var(--kh-avatar-atlas) !important;
  background-size: 500% 300% !important;
  animation: kh-new-skin-wave 1.6s steps(1, end) both !important;
}
body .kh-guest.is-sitting:is([data-skin="canal_guide"], [data-skin="bloom_keeper"], [data-skin="storybook_scholar"], [data-skin="forest_ranger"], [data-skin="airmail_pilot"], [data-skin="harbour_musician"], [data-skin="club_harbour_captain"], [data-skin="club_cloud_keeper"], [data-skin="club_star_traveler"], [data-skin="club_royal_regent"]) .kh-avatar-sprite {
  background-image: var(--kh-avatar-atlas) !important;
  background-position: 75% 0 !important;
  background-size: 500% 300% !important;
  animation: none !important;
}
body .kh-profile-kwaker:is([data-skin="canal_guide"], [data-skin="bloom_keeper"], [data-skin="storybook_scholar"], [data-skin="forest_ranger"], [data-skin="airmail_pilot"], [data-skin="harbour_musician"], [data-skin="club_harbour_captain"], [data-skin="club_cloud_keeper"], [data-skin="club_star_traveler"], [data-skin="club_royal_regent"]) .kh-avatar-sprite {
  background-image: var(--kh-avatar-atlas) !important;
  background-position: 75% 100% !important;
  background-size: 500% 300% !important;
  animation: kh-new-skin-profile-idle 5s steps(1, end) infinite !important;
}
.kh-skin-thumb:is([data-skin-item="canal_guide"], [data-skin-item="bloom_keeper"], [data-skin-item="storybook_scholar"], [data-skin-item="forest_ranger"], [data-skin-item="airmail_pilot"], [data-skin-item="harbour_musician"], [data-skin-item="club_harbour_captain"], [data-skin-item="club_cloud_keeper"], [data-skin-item="club_star_traveler"], [data-skin-item="club_royal_regent"]) {
  background-position: 25% 50%;
  background-size: 500% 300%;
}

/* Achievement claims belong in Quack Quests; the badge book stays a visual catalogue. */
body .kh-task-list > .kh-quest-card > .kh-quest-claim-button {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  min-width: 118px;
  max-width: 165px;
  min-height: 38px;
  padding: 7px 11px;
  border: 2px solid #287b35;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(#50b342, #29882d);
  box-shadow: 0 2px 0 #1e6325;
  font: 850 11px/1.15 system-ui, sans-serif;
  cursor: pointer;
}
body .kh-task-list > .kh-quest-card > .kh-quest-claim-button:disabled { opacity: .65; cursor: default; }
body .kh-task-list > .kh-quest-card > span.kh-quest-achievement-art {
  grid-column: 1;
  grid-row: 1;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 0;
  background: var(--kh-badge-image, none) center / contain no-repeat;
  box-shadow: none;
}
body .kh-task-list > .kh-quest-card.is-claimable { border-color: #e1a52c; background: linear-gradient(145deg, #fff8d7, #f2f8df); }
body .kh-task-list > .kh-quest-card .kh-quest-new {
  width: max-content;
  padding: 2px 7px;
  border-radius: 999px;
  color: #68480a;
  background: #ffe16b;
  font-size: 9px;
  font-weight: 950;
  line-height: 1.2;
}
body .kh-task-list > .kh-quest-card .kh-quest-achievement-reward { color: #846214; font-weight: 800; }
body .kh-photo-camera[open] {
  width: min(600px, calc(100% - 28px));
  max-height: calc(100% - var(--kh-shell-head) - 24px);
  padding: 27px 22px 20px;
  background: #fffef3;
}
body .kh-photo-camera > header.kh-modal-titlebar {
  box-sizing: border-box;
  position: sticky;
  top: -27px;
  margin: -27px -22px 14px;
  min-height: 72px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 3px solid #c9dfa4;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(#3eaa36, #267d2b);
  box-shadow: none;
}
body .kh-photo-camera .kh-camera-preview canvas[hidden] { display: none !important; }

/* Keep the camera fully visible without a dialog scrollbar. */
body .kh-photo-camera[open] {
  max-height: min(calc(100svh - 20px), 720px);
  padding: 0 18px 14px;
  overflow: hidden !important;
}
body .kh-photo-camera > header.kh-modal-titlebar {
  position: relative;
  top: auto;
  margin: 0 -18px 10px;
  padding: 11px 18px;
}
@media (max-height: 760px) {
  body .kh-photo-camera[open] { max-height: calc(100svh - 18px); padding-bottom: 10px; }
  body .kh-photo-camera > header.kh-modal-titlebar { margin-bottom: 8px; padding-top: 9px; padding-bottom: 9px; }
}

@container kwaak-shell (max-width: 760px) {
  body .kh-task-list > .kh-quest-card > .kh-quest-claim-button {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-self: start;
    min-width: 105px;
  }
}

/* Use the supplied 26×15 left-pointing floor-arrow artwork; mirror it for doors on the right. */
body .kh-world-hotspot::before,
body .kh-world-hotspot::after { display: none !important; content: none !important; }
body .kh-world-hotspot { opacity: 1; filter: none; }
body .kh-world-hotspot:hover,
body .kh-world-hotspot:focus-visible,
body .kh-world-hotspot.is-entering { transform: translate(-50%, -50%); }
body .kh-world-hotspot > .kh-door-arrow-icon {
  position: absolute;
  z-index: 3;
  display: block;
  left: 50%;
  top: 75%;
  width: 26px;
  height: 15px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
body .kh-world-hotspot > .kh-door-arrow-icon img,
body .kh-gamehall-door > .kh-door-arrow-icon img,
body .kh-public-exit > .kh-door-arrow-icon img {
  display: block;
  width: 26px;
  height: 15px;
  max-width: none;
  object-fit: fill;
  transform: scaleX(var(--door-arrow-scale-x, 1));
}
body .kh-hotspot-gamehall,
body .kh-hotspot-shop { --door-arrow-scale-x: -1; }
body .kh-hotspot-garden > .kh-door-arrow-icon { left: 52%; top: 78%; }
body .kh-hotspot-gamehall > .kh-door-arrow-icon { left: 60%; top: 90%; }
body .kh-hotspot-shop > .kh-door-arrow-icon { left: 49%; top: 77%; }
body .kh-world-hotspot:focus-visible,
body .kh-gamehall-door:focus-visible,
body .kh-public-exit:focus-visible { outline: none; }

body .kh-public-exit {
  position: absolute;
  z-index: 225;
  display: none;
  width: clamp(28px, 4cqw, 40px);
  min-width: 0;
  height: clamp(28px, 4cqw, 40px);
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 0;
  color: white;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
body .kh-public-exit > .kh-door-arrow-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  display: block;
  width: 26px;
  height: 15px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
body .kh-client[data-room="hotel"] .kh-public-exit { display: block; left: 49%; top: 38%; --door-arrow-scale-x: -1; }
body .kh-client[data-room="shop"] .kh-public-exit { display: block; left: 58%; top: 57%; }
body .kh-client[data-room="private"] .kh-public-exit,
body .kh-client[data-room="visited"] .kh-public-exit { display: block; left: 78%; top: 52%; --door-arrow-scale-x: -1; }
body .kh-client[data-room="private"] .kh-public-exit { display: block; left: 78%; top: 52%; --door-arrow-scale-x: -1; }

/* Keep a clear line of breathing room between the draggable navigator header and its tabs. */
body .kh-navigator[open] .kh-navigator-hero.kh-modal-titlebar { margin-bottom: 10px; }

body .kh-gamehall-door {
  left: 13%;
  top: 52%;
  width: clamp(28px, 4cqw, 40px);
  height: clamp(28px, 4cqw, 40px);
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body .kh-gamehall-door { --door-arrow-scale-x: -1; }
body .kh-gamehall-door > .kh-door-arrow-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  display: block;
  width: 26px;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
body .kh-gamehall-door:hover,
body .kh-gamehall-door:focus-visible { transform: translate(-50%, -50%); }
body .kh-gamehall-door:focus-visible { outline: 3px solid white; outline-offset: 3px; }

/* Header polish: clearer room context, live status and membership duration. */
body .kh-brand { gap: 0; align-items: center; min-width: 0; }
body .kh-brand-mark {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 6px;
  overflow: visible;
  border: 2px solid #fff8dc;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #43b936, #1f842d);
  box-shadow: 0 0 0 2px #267620, 0 3px 0 #19551d;
  transform: none;
}
body .kh-brand-mark img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: contain; image-rendering: pixelated; }
body .kh-brand-wordmark { z-index: 1; margin-left: -14px; padding-left: 19px; border-left: 0; border-radius: 0 12px 12px 0; }

body .kh-room-title {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  padding: 4px 12px;
  border-inline: 1px solid rgba(244, 255, 228, .3);
  border-radius: 11px;
  background: rgba(9, 93, 34, .11);
  text-align: center;
}
body .kh-room-title-kicker {
  margin: 0 !important;
  color: #e0f5a2 !important;
  font-size: 7px !important;
  font-weight: 950;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
}
body .kh-room-title strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body .kh-room-title-subtitle {
  margin: 0 !important;
  color: #e9ffd9 !important;
  font-size: 9px !important;
  line-height: 1;
}

body .kh-connection {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  grid-template-rows: auto auto;
  justify-self: end;
  align-items: center;
  gap: 2px 8px;
  min-width: 125px;
  min-height: 38px;
  padding: 5px 11px;
  border: 1px solid rgba(244, 255, 228, .32);
  border-radius: 999px;
  background: rgba(8, 78, 34, .16);
  text-align: left;
}
body .kh-connection > span {
  grid-row: 1 / 3;
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 4px rgba(101, 229, 155, .16);
}
body .kh-connection strong { color: #fffbe6; font-size: 10px; line-height: 1.1; }
body .kh-connection small { color: #e7f5d2; font-size: 8px; line-height: 1.1; }

body .kh-top-balances > .kh-top-club > .kh-top-club-copy {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  width: auto;
  height: auto;
  min-width: 0;
  overflow: hidden;
}
body .kh-top-balances > .kh-top-club .kh-top-club-copy strong {
  min-width: 0;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
body .kh-top-balances > .kh-top-club .kh-top-club-copy small {
  margin: 0;
  color: #71501a;
  font-size: 7px;
  line-height: 1;
  text-transform: none;
}

/* Use the complete badge artwork; no second circle is drawn in CSS. */
body .kh-brand-mark.kh-brand-duck-mark {
  display: block;
  flex: 0 0 52px;
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body .kh-brand-mark.kh-brand-duck-mark img {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  width: 58px;
  height: 58px;
  max-width: none;
  transform: translate(-50%, -50%);
  object-fit: contain;
  image-rendering: auto;
  pointer-events: none;
}

/* Keep the roster above the scene and allow it to hang below the header. */
body .kh-topbar {
  position: relative;
  z-index: 20;
  overflow: visible;
}
body .kh-topbar-tools { position: relative; z-index: 21; }
body .kh-topbar-tools .kh-online-roster { z-index: 22; }
body .kh-stage-wrap { position: relative; z-index: 0; }

/* The online count doubles as the presence button; the popup lists the global online roster. */
body .kh-topbar-tools { position: relative; }
body .kh-connection {
  display: flex;
  grid-template-columns: none;
  grid-template-rows: none;
  justify-self: end;
  align-items: center;
  gap: 7px;
  min-width: 104px;
  min-height: 36px;
  padding: 4px 9px 4px 6px;
  border: 1px solid rgba(244, 255, 228, .4);
  border-radius: 10px 8px 11px 9px;
  color: #fffbe6;
  background: rgba(7, 105, 46, .3);
  text-align: left;
  cursor: pointer;
}
body .kh-connection:hover { background: rgba(8, 91, 37, .52); }
body .kh-connection:focus-visible { outline: 3px solid #ffe66f; outline-offset: 2px; }
body .kh-connection > span {
  display: block;
  grid-row: auto;
  width: auto;
  height: auto;
  box-shadow: none;
}
body .kh-connection.is-online > span {
  background: transparent;
  box-shadow: none;
}
body .kh-online-avatar-stack { display: flex !important; flex: 0 0 auto; align-items: center; padding-left: 5px; }
body .kh-online-avatar-stack .kh-online-avatar { width: 25px; height: 25px; margin-left: -5px; border-width: 1.5px; }
body .kh-online-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
body .kh-connection .kh-online-copy strong { display: block; overflow: visible; color: #fffbe6; font-size: 10px; line-height: 1.1; text-overflow: clip; white-space: nowrap; }
body .kh-connection .kh-online-copy small { display: block; }
body .kh-online-roster[hidden] { display: none !important; }
body .kh-online-roster {
  position: absolute;
  z-index: 90;
  top: calc(100% + 9px);
  right: 42px;
  width: min(290px, calc(100vw - 24px));
  max-height: min(62vh, 430px);
  overflow: auto;
  padding: 11px;
  border: 2px solid #357f2b;
  border-radius: 16px;
  color: #285d32;
  background: #fffbea;
  box-shadow: 0 8px 0 rgba(30, 88, 35, .22), 0 16px 34px rgba(17, 54, 25, .25);
}
body .kh-online-roster > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 1px 2px 8px; border-bottom: 1px solid #d5e6b9; }
body .kh-online-roster > header > div { display: grid; gap: 2px; }
body .kh-online-roster > header span { color: #69914e; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
body .kh-online-roster > header strong { font-size: 14px; line-height: 1.1; }
body .kh-online-roster > header small { color: #66815a; font-size: 10px; white-space: nowrap; }
body .kh-online-roster-list { display: grid; gap: 4px; }
body .kh-online-player {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 4px 7px;
  border: 1px solid #dce9c7;
  border-radius: 11px;
  color: #315d37;
  background: #f9fbea;
  text-align: left;
}
body .kh-online-player:hover { border-color: #8dbd5f; background: #eff7de; }
body .kh-online-player > strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
body .kh-online-player-action { color: #5a9d3d; font-size: 20px; line-height: 1; text-align: center; }
body .kh-online-avatar {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1.5px solid #b6d38d;
  border-radius: 50%;
  background: linear-gradient(#d9f3f2, #f4f5d4);
}
body .kh-online-avatar > .kh-profile-kwaker {
  position: absolute;
  top: -2px;
  left: 50%;
  display: block;
  width: 38px;
  margin: 0;
  transform: translateX(-50%);
  filter: none;
}
body .kh-online-avatar .kh-sprite-flip { width: 38px; filter: none; }
body .kh-online-roster-empty { margin: 0; padding: 15px 8px; color: #70836a; font-size: 11px; text-align: center; }

@container kwaak-shell (max-width: 760px) {
  body .kh-room-title { display: none; }
  body .kh-brand-mark { flex-basis: 36px; width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 5px; }
  body .kh-brand-wordmark { font-size: 15px; }
  body .kh-brand-mark.kh-brand-duck-mark { flex-basis: 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; }
  body .kh-brand-mark.kh-brand-duck-mark img { width: 48px; height: 48px; }
  body .kh-brand-wordmark { margin-left: -12px; padding-left: 17px; }
  body .kh-connection { display: flex; min-width: 95px; min-height: 32px; padding: 3px 6px 3px 4px; border: 1px solid rgba(244, 255, 228, .4); background: rgba(7, 105, 46, .3); }
  body .kh-connection > span { display: block; width: auto; height: auto; }
  body .kh-online-avatar-stack .kh-online-avatar { width: 23px; height: 23px; }
  body .kh-connection .kh-online-copy strong { font-size: 9px; }
  body .kh-online-roster { right: 39px; width: min(270px, calc(100vw - 20px)); }
  body .kh-top-balances > .kh-top-club .kh-top-club-copy strong { font-size: 9px; }
  body .kh-top-balances > .kh-top-club .kh-top-club-copy small { font-size: 6px; }
  body .kh-top-balances > .kh-top-club > .kh-top-club-badge { flex-basis: 18px; width: 18px; height: 18px; min-width: 18px; }
}
