: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.png") 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-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: drop-shadow(0 4px 2px rgba(4, 42, 48, .18));
}
.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;
}

.kh-avatar-sprite {
  display: block;
  width: 100%;
  height: 100%;
  background-image: var(--kh-avatar-atlas, url("../images/kwaker-atlas-yellow-v2.png"));
  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.png");
}
.kh-guest[data-avatar-color="cream"],
.kh-profile-kwaker[data-avatar-color="cream"] {
  --kh-avatar-atlas: url("../images/kwaker-atlas-cream-v2.png");
}
.kh-guest[data-avatar-color="brown"],
.kh-profile-kwaker[data-avatar-color="brown"] {
  --kh-avatar-atlas: url("../images/kwaker-atlas-brown-v2.png");
}
.kh-guest[data-skin="halloween_vampire"],
.kh-profile-kwaker[data-skin="halloween_vampire"] {
  --kh-avatar-atlas: url("../images/skin-vampire-atlas-v2.png");
}
.kh-guest[data-skin="halloween_pumpkin"],
.kh-profile-kwaker[data-skin="halloween_pumpkin"] {
  --kh-avatar-atlas: url("../images/skin-pumpkin-atlas-v2.png");
}
.kh-guest[data-skin="halloween_moonwitch"],
.kh-profile-kwaker[data-skin="halloween_moonwitch"] {
  --kh-avatar-atlas: url("../images/skin-moonwitch-atlas-v2.png");
}

@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: 8;
  left: 50%;
  bottom: calc(100% + 9px);
  width: max-content;
  max-width: min(250px, 42vw);
  padding: 8px 11px;
  opacity: 0;
  transform: translate(-50%, 8px) scale(.95);
  border: 2px solid var(--kh-ink);
  border-radius: 15px 15px 15px 4px;
  color: var(--kh-ink);
  background: var(--kh-cream);
  box-shadow: 0 6px 0 rgba(3, 51, 61, .18);
  font-size: clamp(10px, 1vw, 14px);
  line-height: 1.25;
  transition: opacity .16s ease, transform .16s ease;
}
.kh-speech::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: -8px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--kh-ink);
  border-bottom: 2px solid var(--kh-ink);
  background: var(--kh-cream);
  transform: rotate(45deg);
}
.kh-speech.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }

.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.png");
  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.png"); }
.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.png");
  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-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.png"); }
.kh-skin-thumb[data-skin-item="halloween_vampire"] { background-image: url("../images/skin-vampire-motion-front-v5.png"); }
.kh-skin-thumb[data-skin-item="halloween_pumpkin"] { background-image: url("../images/skin-pumpkin-motion-front-v5.png"); }
.kh-skin-thumb[data-skin-item="halloween_moonwitch"] { background-image: url("../images/skin-moonwitch-motion-front-v5.png"); }

.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.png");
  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.png"); }
.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/kwaken-hotel-lobby-v1.png") 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-guest-checkin {
  display: block;
  margin: 10px auto 0;
  padding: 7px 10px;
  border: 0;
  color: #557075;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
}
.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="info"] { 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 {
  max-width: min(230px, 32cqw);
  padding: clamp(5px, .85cqw, 8px) clamp(7px, 1.1cqw, 11px);
  border-radius: 12px 12px 12px 4px;
  font-size: clamp(9px, 1.35cqw, 13px);
}

.kh-placed-furniture {
  width: var(--item-width, 18cqw);
  transform: translate(-50%, var(--item-anchor-y, -94%)) 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.png") 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-club { 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-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-settings > 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-settings > button[aria-pressed="true"] { border-color: #8b4f14; color: #65410d; background: #ffdb55; box-shadow: 0 3px 0 #a56a1b; }
.kh-role-badge-settings > button:focus-visible { outline: 3px solid #2b82a2; outline-offset: 2px; }
.kh-role-badge-settings > 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.png");
  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.png"); }
.kh-avatar-preview-sprite[data-avatar-color="brown"] { --kh-avatar-preview-atlas: url("../images/kwaker-motion-front-brown-v5.png"); }
.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; }
.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; place-items: center; width: 34px; height: 34px; padding: 3px; border: 2px solid #8fba69; border-radius: 50%; background: #fffef2; }
.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 span { display: block; width: 22px; height: 22px; border: 2px solid rgba(23,61,38,.18); border-radius: 50%; background: var(--swatch); }
.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;
  width: min(570px, calc(100% - 92px));
  min-height: 43px;
  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 {
  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: 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 small { font-size: 8px; }
body .kh-chat { min-height: 35px; height: 35px; gap: 0; border: 2px solid #286c1a; border-radius: 7px; box-shadow: none; }
body .kh-chat input { min-width: 75px; padding: 0 10px; border-radius: 5px 0 0 5px; box-shadow: none; font-size: 11px; }
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: 58px; 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; padding: 6px 5px; border-width: 2px; border-radius: 9px; }
body .kh-room-tools span { font-size: 18px; }
body .kh-room-tools small { font-size: 8px; }
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-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; width: calc(100% - 12px); gap: 2px; padding: 3px; border-width: 2px; }
  body .kh-dock > button { flex-basis: 29px; min-width: 29px; 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 { 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: 43px; 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.png");
  --kh-avatar-motion-front: url("../images/kwaker-motion-front-yellow-v5.png");
  --kh-avatar-motion-back: url("../images/kwaker-motion-back-yellow-v5.png");
  --kh-avatar-wave: url("../images/kwaker-wave-front-yellow-v2.png");
}
.kh-guest[data-avatar-color="cream"] {
  --kh-avatar-motion-side: url("../images/kwaker-motion-side-cream-v5.png");
  --kh-avatar-motion-front: url("../images/kwaker-motion-front-cream-v5.png");
  --kh-avatar-motion-back: url("../images/kwaker-motion-back-cream-v5.png");
  --kh-avatar-wave: url("../images/kwaker-wave-front-cream-v2.png");
}
.kh-guest[data-avatar-color="brown"] {
  --kh-avatar-motion-side: url("../images/kwaker-motion-side-brown-v5.png");
  --kh-avatar-motion-front: url("../images/kwaker-motion-front-brown-v5.png");
  --kh-avatar-motion-back: url("../images/kwaker-motion-back-brown-v5.png");
  --kh-avatar-wave: url("../images/kwaker-wave-front-brown-v2.png");
}
.kh-guest[data-skin="halloween_vampire"] {
  --kh-avatar-motion-side: url("../images/skin-vampire-motion-side-v5.png");
  --kh-avatar-motion-front: url("../images/skin-vampire-motion-front-v5.png");
  --kh-avatar-motion-back: url("../images/skin-vampire-motion-back-v5.png");
  --kh-avatar-wave: url("../images/skin-vampire-wave-front-v2.png");
}
.kh-guest[data-skin="halloween_pumpkin"] {
  --kh-avatar-motion-side: url("../images/skin-pumpkin-motion-side-v5.png");
  --kh-avatar-motion-front: url("../images/skin-pumpkin-motion-front-v5.png");
  --kh-avatar-motion-back: url("../images/skin-pumpkin-motion-back-v5.png");
  --kh-avatar-wave: url("../images/skin-pumpkin-wave-front-v2.png");
}
.kh-guest[data-skin="halloween_moonwitch"] {
  --kh-avatar-motion-side: url("../images/skin-moonwitch-motion-side-v5.png");
  --kh-avatar-motion-front: url("../images/skin-moonwitch-motion-front-v5.png");
  --kh-avatar-motion-back: url("../images/skin-moonwitch-motion-back-v5.png");
  --kh-avatar-wave: url("../images/skin-moonwitch-wave-front-v2.png");
}

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.png");
}
.kh-profile-kwaker[data-avatar-color="cream"] {
  --kh-avatar-profile: url("../images/kwaker-motion-front-cream-v5.png");
}
.kh-profile-kwaker[data-avatar-color="brown"] {
  --kh-avatar-profile: url("../images/kwaker-motion-front-brown-v5.png");
}
.kh-profile-kwaker[data-skin="halloween_vampire"] {
  --kh-avatar-profile: url("../images/skin-vampire-motion-front-v5.png");
}
.kh-profile-kwaker[data-skin="halloween_pumpkin"] {
  --kh-avatar-profile: url("../images/skin-pumpkin-motion-front-v5.png");
}
.kh-profile-kwaker[data-skin="halloween_moonwitch"] {
  --kh-avatar-profile: url("../images/skin-moonwitch-motion-front-v5.png");
}
.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="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("../images/ui/kwaakfu-staff-badge-v3.png?v=0.14.6-public-room-editor-r4") center / contain no-repeat;
  box-shadow: none;
  text-shadow: none;
}
.kh-avatar-badge[data-team-badge][data-badge-tone="staff"] { top: -37px; }
.kh-guest:has(> .kh-avatar-badge[data-badge-tone="staff"]) > .kh-speech { bottom: calc(100% + 42px); }
.kh-avatar-badge[data-badge-tone="moderator"] {
  border-color: #f1ffff;
  color: white;
  background: linear-gradient(145deg, #55c7cf 0 47%, #278ca3 48% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 2px 0 #175c72, 0 4px 7px rgba(15, 68, 82, .3);
  text-shadow: 0 1px 0 #175c72;
}
.kh-avatar-badge[data-npc-badge] {
  top: -37px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  color: transparent;
  background: url("../images/ui/quackworld-npc-badge-v1.png?v=0.15.3-quackworld-r1") center / contain no-repeat;
  box-shadow: none;
  text-shadow: none;
}
.kh-guest:has(> .kh-avatar-badge[data-npc-badge]) > .kh-speech { bottom: calc(100% + 42px); }
.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 #8c5bac;
  border-radius: 18px;
  color: #fffdf1;
  background: radial-gradient(circle at 12% 0, rgba(255, 220, 91, .2), transparent 30%), linear-gradient(145deg, #56306e, #282855 72%);
  box-shadow: 0 5px 0 #36203f, inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.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 #fff2b1; border-radius: 50%; color: #56306e; background: #ffdc55; box-shadow: 0 3px 0 #c27827; font-size: 27px; font-weight: 950; }
.kh-event-quest header h3 { margin: 2px 0 3px; color: white; font-size: 18px; line-height: 1.05; }
.kh-event-quest header p { margin: 0; color: #e8daf2; font-size: 10px; line-height: 1.35; }
.kh-event-quest header div > small:first-child { color: #ffdc55; 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 rgba(222, 202, 240, .28); border-radius: 11px; color: #e7dced; background: rgba(18, 22, 51, .38); }
.kh-event-steps li > span { display: grid; place-items: center; width: 26px; aspect-ratio: 1; border-radius: 50%; color: #4d355e; background: #d7c3e5; 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: white; font-size: 10px; line-height: 1.15; }
.kh-event-steps small { margin-top: 2px; color: #cbbbd5; font-size: 8px; line-height: 1.25; }
.kh-event-steps li.is-current { border-color: #ffdc55; background: rgba(104, 66, 126, .66); box-shadow: 0 0 0 2px rgba(255, 220, 85, .12); }
.kh-event-steps li.is-current > span { color: #583b0d; background: #ffdc55; }
.kh-event-steps li.is-complete { border-color: #76c765; background: rgba(44, 104, 55, .55); }
.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: #ffdc55; }.kh-event-progress > span { color: #e9ddf0; text-align: right; }
.kh-event-progress i { grid-column: 1 / -1; display: block; height: 7px; overflow: hidden; border-radius: 999px; background: rgba(15, 16, 43, .62); }
.kh-event-progress i span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffbd3d, #fff289); transition: width .35s ease; }
.kh-event-quest.is-complete { border-color: #72c961; background: linear-gradient(145deg, #38634a, #24433d); box-shadow: 0 5px 0 #1c382c; }
.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-settings > button { grid-column: 1 / -1; 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-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-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 { 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-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="info"] { 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. */
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-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; }
body .kh-guest-checkin { margin-top: 3px; padding: 3px 7px; font-size: 8px; }

/* 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-settings > button { grid-column: auto; 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-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 .28s cubic-bezier(.2, .75, .25, 1), bottom .28s 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-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.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] {
  z-index: 8;
  top: -37px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  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;
  box-shadow: none;
  text-shadow: none;
}
.kh-avatar-badge[data-team-badge] { z-index: 9; }
.kh-avatar-badge[data-team-badge][data-badge-tone="moderator"] { top: -26px; }
.kh-profile-kwaker:has(> .kh-avatar-badge[data-team-badge]):has(> .kh-avatar-badge[data-achievement-badge]) > .kh-avatar-badge[data-team-badge] {
  left: calc(50% + 23px);
}
.kh-profile-kwaker:has(> .kh-avatar-badge[data-team-badge]):has(> .kh-avatar-badge[data-achievement-badge]) > .kh-avatar-badge[data-achievement-badge] {
  left: calc(50% - 23px);
}
.kh-guest:has(> .kh-avatar-badge[data-team-badge]):has(> .kh-avatar-badge[data-achievement-badge]) > .kh-avatar-badge[data-achievement-badge] {
  left: calc(50% + 32px);
  top: -19px;
  width: 24px;
  height: 24px;
}
.kh-guest:has(> .kh-avatar-badge[data-achievement-badge]) > .kh-speech,
.kh-guest:has(> .kh-avatar-badge[data-team-badge]) > .kh-speech { bottom: calc(100% + 42px); }

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: 760px;
  height: 507px;
  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: 158px minmax(0, 1fr);
  gap: 10px;
}
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: 12px 10px 10px;
  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-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: 76px;
  height: 76px;
  margin-bottom: 9px;
  filter: grayscale(1) opacity(.45);
}
body .kh-selected-badge-card:not(.has-selected-badge) .kh-selected-badge-preview {
  border: 3px dashed #9fc477;
  border-radius: 20px 15px 21px 16px;
  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: 28px;
  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: 7px; font-weight: 950; text-transform: uppercase; }
body .kh-selected-badge-card strong { display: block; margin-top: 5px; font-size: 12px; line-height: 1.15; }
body .kh-selected-badge-card p { margin: 7px 0 0; color: #5d7259; font-size: 8px; line-height: 1.35; }
body .kh-selected-badge-card > button {
  align-self: end;
  width: 100%;
  padding: 8px 7px;
  border: 2px solid #8c4c22;
  border-radius: 9px 7px 10px 8px;
  color: #723b1b;
  background: #fff0d3;
  box-shadow: 0 2px 0 #d59a58;
  font: inherit;
  font-size: 8px;
  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;
  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(98px, 1fr);
  gap: 7px;
  align-content: start;
  padding: 2px 4px 4px 2px;
  overflow: hidden;
}
body .kh-achievement-card {
  position: relative;
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 4px 7px;
  min-width: 0;
  padding: 8px;
  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 { filter: saturate(.3); }
body .kh-achievement-badge-art {
  grid-row: 1 / -1;
  align-self: center;
  width: 46px;
  height: 46px;
}
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: 10px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
body .kh-achievement-card-copy > p {
  display: -webkit-box;
  margin: 3px 0 4px;
  overflow: hidden;
  color: #60745e;
  font-size: 7px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
body .kh-achievement-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; align-items: center; }
body .kh-achievement-progress > span {
  height: 7px;
  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: 7px; font-weight: 950; }
body .kh-achievement-card-action {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
}
body .kh-achievement-card-action > small { overflow: hidden; color: #83611e; font-size: 7px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
body .kh-achievement-card-action > button {
  flex: 0 0 auto;
  padding: 5px 6px;
  border: 2px solid #2d7627;
  border-radius: 8px 6px 9px 7px;
  color: white;
  background: #48a831;
  box-shadow: 0 2px 0 #276b21;
  font: inherit;
  font-size: 7px;
  font-weight: 950;
  cursor: pointer;
}
body .kh-achievement-card-action > button:disabled { cursor: default; filter: grayscale(.45); opacity: .62; }
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-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.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-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-club::before { content: "H"; }
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; }

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.png");
  --kh-avatar-motion-front: url("../images/lola-motion-front-v1.png");
  --kh-avatar-motion-back: url("../images/lola-motion-back-v1.png");
}

body .kh-guest[data-skin="lotte_hotel"] {
  --kh-avatar-motion-side: url("../images/lotte-motion-side-v1.png?v=0.15.5-lotte-roaming-r2");
  --kh-avatar-motion-front: url("../images/lotte-motion-front-v2.png?v=0.15.5-lotte-roaming-r2");
  --kh-avatar-motion-back: url("../images/lotte-motion-back-v1.png?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(520px, calc(100% - 28px)); text-align: center; }
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 {
  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-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; }
}
