/* Khooti hub — Facebook-style game profile inside employee portal */

#tab-khooti.khooti-hub-page {
  --kh-felt: #8fbc9a;
  --kh-felt-deep: #d8e4da;
  --kh-gold: #d4b483;
  --kh-ink: var(--text, #4a5568);
  --kh-muted: var(--muted, #7a8490);
  --kh-line: var(--border, #e2e8f0);
  --kh-surface: var(--panel, #fffbfa);
  --kh-radius: 12px;
  margin: 0;
  min-height: min(72vh, 40rem);
  flex: 1 1 auto;
}

#appMain:has(> #tab-khooti:not(.hidden)) {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#tab-khooti.khooti-hub-page:not(.hidden) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.khooti-hub {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.khooti-hub__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6;
  max-height: min(42vh, 26rem);
  min-height: 11rem;
  overflow: hidden;
  border-radius: 0 0 var(--kh-radius) var(--kh-radius);
  background: #b50000;
}

.khooti-hub__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.khooti-hub__profile {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1.1rem;
  padding: 0.85rem 1rem 0;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.khooti-hub__icon {
  width: 5.5rem;
  height: 5.5rem;
  margin-top: -1.65rem;
  border-radius: 1.1rem;
  border: 3px solid var(--kh-surface);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
  background: var(--kh-felt-deep);
  overflow: hidden;
  flex-shrink: 0;
}

.khooti-hub__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.khooti-hub__meta {
  flex: 1 1 12rem;
  min-width: 0;
  padding-bottom: 0.2rem;
}

.khooti-hub__title {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--kh-ink);
  line-height: 1.15;
}

.khooti-hub__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  color: var(--kh-muted);
}

.khooti-hub__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
  margin-inline-start: auto;
  align-self: flex-end;
}

.khooti-hub__play {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  color: #fffbfa;
  background: linear-gradient(180deg, #e0a87a, #c98b5e);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 4px 12px rgba(74, 85, 104, 0.16);
}

.khooti-hub__play:hover {
  filter: brightness(1.06);
}

.khooti-hub__play:focus-visible {
  outline: 2px solid var(--kh-gold);
  outline-offset: 2px;
}

.khooti-hub__tagline {
  margin: 0.95rem 1rem 0;
  padding: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--kh-ink);
  max-width: 42rem;
}

/* Minimal Play Cards hub */
.khooti-hub--minimal .khooti-hub__cover {
  aspect-ratio: 21 / 6;
  max-height: min(22vh, 11rem);
  min-height: 6.5rem;
  border-radius: 0 0 10px 10px;
}

.khooti-hub--minimal .khooti-hub__profile {
  margin-top: -1.6rem;
  gap: 0.65rem;
  padding: 0 0.15rem;
}

.khooti-hub--minimal .khooti-hub__icon {
  width: 4.25rem;
  height: 4.25rem;
  border-width: 2px;
}

.khooti-hub--minimal .khooti-hub__title {
  font-size: 1.35rem;
}

.khooti-hub--minimal .khooti-hub__subtitle {
  font-size: 0.8rem;
}

.khooti-hub--minimal .khooti-hub__play {
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
}

.khooti-hub--minimal .khooti-hub__body {
  margin-top: 0.35rem;
  gap: 0.85rem;
  padding: 0.85rem 0.75rem 1.5rem;
}

.khooti-hub--minimal .khooti-hub__panel {
  padding: 0.8rem 0.9rem 0.9rem;
}

.khooti-hub--minimal .khooti-hub__panel + .khooti-hub__panel {
  margin-top: 0.7rem;
}

.khooti-hub--minimal .khooti-hub__about {
  font-size: 0.88rem;
  line-height: 1.45;
}

.khooti-hub--minimal .khooti-hub__modes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.khooti-hub--minimal .khooti-hub__modes li {
  padding: 0.35rem 0.45rem;
  font-size: 0.8rem;
}

.khooti-hub--minimal .khooti-hub__rules {
  font-size: 0.84rem;
  line-height: 1.4;
  padding-inline-start: 1rem;
}

.khooti-hub--minimal .khooti-hub__rules li + li {
  margin-top: 0.28rem;
}

.khooti-hub--minimal .khooti-hub__points {
  margin-top: 0.55rem;
  font-size: 0.78rem;
}

.khooti-hub__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 30rem);
  gap: 1.25rem 1.5rem;
  padding: 1.15rem 1rem 2rem;
  align-items: start;
}

@media (max-width: 960px) {
  .khooti-hub__body {
    grid-template-columns: 1fr;
  }

  .khooti-hub__aside {
    order: -1;
  }

  .khooti-hub__actions {
    margin-inline-start: 0;
    width: 100%;
  }

  .khooti-hub__play {
    width: 100%;
    text-align: center;
  }
}

.khooti-hub__panel {
  background: var(--kh-surface);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-radius);
  padding: 1rem 1.05rem 1.1rem;
}

.khooti-hub__panel + .khooti-hub__panel {
  margin-top: 0.85rem;
}

.khooti-hub__panel-title {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--kh-muted);
}

.khooti-hub__about {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--kh-ink);
}

.khooti-hub__rules {
  margin: 0;
  padding-inline-start: 1.15rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--kh-ink);
}

.khooti-hub__rules li + li {
  margin-top: 0.4rem;
}

.khooti-hub__points {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--kh-muted);
}

.khooti-hub__modes {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.khooti-hub__modes li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.86rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--kh-felt) 8%, transparent);
}

.khooti-hub__modes strong {
  font-weight: 650;
  color: var(--kh-ink);
}

.khooti-hub__modes span {
  color: var(--kh-muted);
  text-align: end;
}

.khooti-lb {
  margin: 0;
  padding: 0;
  list-style: none;
}

.khooti-lb__row {
  display: grid;
  grid-template-columns: 1.75rem 2.25rem minmax(0, 1fr);
  gap: 0.55rem 0.65rem;
  align-items: start;
  padding: 0.6rem 0.15rem;
  border-bottom: 1px solid color-mix(in srgb, var(--kh-line) 80%, transparent);
}

.khooti-lb__row:last-child {
  border-bottom: none;
}

.khooti-lb__main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.khooti-lb__rank {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--kh-muted);
  text-align: center;
  padding-top: 0.35rem;
}

.khooti-lb__medal {
  display: grid;
  place-items: center;
  min-width: 1.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  padding-top: 0.15rem;
}

.khooti-lb__medal--gold {
  color: #b45309;
}

.khooti-lb__medal--silver {
  color: #64748b;
}

.khooti-lb__medal--bronze {
  color: #9a3412;
}

.khooti-lb__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  object-fit: cover;
  background: color-mix(in srgb, var(--kh-felt) 18%, transparent);
  margin-top: 0.05rem;
}

.khooti-lb__avatar--fallback {
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--kh-felt);
}

.khooti-lb__name {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--kh-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.khooti-person {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.khooti-person__status {
  font-size: 0.72rem;
  font-weight: 550;
  line-height: 1.25;
  color: var(--kh-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.khooti-person__status.is-online {
  color: #15803d;
}

.khooti-person__status.is-offline {
  color: var(--kh-muted);
}

.khooti-lb__name--gold {
  color: #b45309;
  font-weight: 750;
}

.khooti-lb__name--silver {
  color: #64748b;
  font-weight: 750;
}

.khooti-lb__name--bronze {
  color: #9a3412;
  font-weight: 750;
}

.khooti-lb__row--gold {
  background: color-mix(in srgb, #fbbf24 12%, transparent);
  border-radius: 0.45rem;
  margin: 0 -0.25rem;
  padding-inline: 0.25rem;
}

.khooti-lb__row--silver {
  background: color-mix(in srgb, #94a3b8 10%, transparent);
  border-radius: 0.45rem;
  margin: 0 -0.25rem;
  padding-inline: 0.25rem;
}

.khooti-lb__row--bronze {
  background: color-mix(in srgb, #d97706 10%, transparent);
  border-radius: 0.45rem;
  margin: 0 -0.25rem;
  padding-inline: 0.25rem;
}

.khooti-lb__stat {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--kh-felt);
  white-space: nowrap;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28rem;
  padding-top: 0;
  min-width: 0;
}

.khooti-lb__wl--w {
  color: #15803d;
}

.khooti-lb__wl--l {
  color: #b91c1c;
}

.khooti-lb__wl-sep {
  color: var(--kh-muted);
  font-weight: 500;
}

.khooti-lb__avg {
  font-variant-numeric: tabular-nums;
  color: var(--kh-muted);
  font-weight: 600;
}

.khooti-my-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}

.khooti-my-stats--compact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.35rem;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--kh-ink);
  line-height: 1.4;
}

.khooti-my-stats__sep {
  color: var(--kh-muted);
  font-weight: 500;
}

.khooti-my-stats__w {
  color: #059669;
}

.khooti-my-stats__l {
  color: #dc2626;
}

.khooti-my-stats > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.4rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.khooti-my-stats dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--kh-muted);
}

.khooti-my-stats dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: inherit;
}

[data-theme="dark"] .khooti-my-stats > div {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.khooti-hub__glimpse {
  margin: 0.55rem 1rem 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-radius);
  background: color-mix(in srgb, var(--kh-felt) 10%, var(--kh-surface));
  cursor: pointer;
}

.khooti-hub__glimpse:hover {
  border-color: color-mix(in srgb, var(--kh-gold) 55%, var(--kh-line));
}

.khooti-hub__glimpse:focus-visible {
  outline: 2px solid var(--kh-gold);
  outline-offset: 2px;
}

.khooti-glimpse__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--kh-muted);
}

.khooti-glimpse__more {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 650;
  color: color-mix(in srgb, var(--kh-gold) 40%, #8b5a2b);
}

.khooti-hub__more-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: color-mix(in srgb, var(--kh-gold) 35%, #8b5a2b);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  padding: 0.45rem 0 0;
  cursor: pointer;
}

.khooti-hub__more-btn.hidden {
  display: none;
}

.khooti-hub__more-btn:hover {
  text-decoration: underline;
}

.khooti-upd {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.khooti-upd__row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--kh-line) 80%, transparent);
}

.khooti-upd__row:last-child {
  border-bottom: none;
}

.khooti-upd__row--compact {
  padding: 0.28rem 0;
  gap: 0.12rem;
}

.khooti-upd__line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.khooti-upd__side {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
}

.khooti-upd__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--kh-felt) 20%, #fff);
  margin-top: 0.1rem;
}

.khooti-upd__row--compact .khooti-upd__avatar {
  width: 24px;
  height: 24px;
}

.khooti-upd__name {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--kh-ink);
  white-space: normal;
  overflow: visible;
  line-height: 1.3;
  word-break: break-word;
  min-width: 0;
}

.khooti-upd__row--compact .khooti-upd__name {
  font-size: 0.78rem;
}

.khooti-upd__verb {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--kh-gold) 35%, #8b5a2b);
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--kh-gold) 18%, transparent);
  white-space: nowrap;
}

.khooti-upd__row--compact .khooti-upd__verb {
  font-size: 0.66rem;
  padding: 0.12rem 0.32rem;
}

.khooti-upd__meta {
  font-size: 0.72rem;
  font-weight: 550;
  color: var(--kh-muted);
  padding-left: calc(32px + 0.4rem);
  line-height: 1.3;
}

.khooti-upd__row--compact .khooti-upd__meta {
  font-size: 0.66rem;
  padding-left: calc(24px + 0.4rem);
}

.khooti-upd__scroll-hint {
  text-align: center;
  padding: 0.5rem 0 0.25rem !important;
}

.khooti-modal__card--updates {
  width: min(28rem, 100%);
  max-height: min(80vh, 36rem);
  display: flex;
  flex-direction: column;
}

.khooti-updates-scroll {
  overflow-y: auto;
  max-height: min(58vh, 26rem);
  padding-right: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.khooti-lb__empty,
.khooti-lb__err {
  margin: 0;
  font-size: 0.86rem;
  color: var(--kh-muted);
  line-height: 1.45;
}

.khooti-lb__err {
  color: #b91c1c;
}

.khooti-play-popup {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  pointer-events: none;
}

.khooti-play-popup.hidden {
  display: none !important;
}

.khooti-play-popup__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #0b1220 55%, transparent);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}

.khooti-play-popup__window {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(980px, 94vw);
  height: min(640px, 86vh);
  max-width: 980px;
  max-height: 86vh;
  border-radius: 14px;
  overflow: hidden;
  background: #0d3d32;
  box-shadow:
    0 24px 64px color-mix(in srgb, #000 45%, transparent),
    0 0 0 1px color-mix(in srgb, #fff 12%, transparent);
  pointer-events: auto;
}

.khooti-play-popup__window:fullscreen,
.khooti-play-popup__window:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
}

.khooti-hub.hidden {
  display: none !important;
}

.khooti-play--booting .khooti-play__bar {
  opacity: 0.55;
}

.khooti-play__bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  padding: 0.45rem 0.65rem;
  background: color-mix(in srgb, #06261f 88%, #000);
  border-bottom: 1px solid color-mix(in srgb, #fff 10%, transparent);
}

.khooti-play__back,
.khooti-play__fs {
  appearance: none;
  border: 1px solid color-mix(in srgb, #fff 18%, transparent);
  background: transparent;
  color: #e8f5ef;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.khooti-play__back:hover,
.khooti-play__fs:hover {
  background: color-mix(in srgb, #fff 10%, transparent);
}

.khooti-play__fs[aria-pressed='true'] {
  background: color-mix(in srgb, var(--kh-gold, #d4a017) 28%, transparent);
  border-color: color-mix(in srgb, var(--kh-gold, #d4a017) 55%, transparent);
}

.khooti-play__title {
  flex: 1 1 auto;
  font-size: 0.9rem;
  font-weight: 650;
  color: #e8f5ef;
  text-align: center;
}

.khooti-play__frame {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: var(--kh-felt-deep, #0a2e24);
  display: block;
  overflow: hidden;
}

@media (max-width: 720px) {
  .khooti-play-popup {
    padding: 0.5rem;
  }
  .khooti-play-popup__window {
    width: 100%;
    height: min(720px, 90vh);
    border-radius: 10px;
  }
}

.khooti-hub__online {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid color-mix(in srgb, var(--kh-gold) 55%, #94a3b8);
  background: color-mix(in srgb, var(--kh-felt) 18%, var(--kh-surface));
  color: var(--kh-ink);
  font-weight: 650;
  font-size: 0.88rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
}

.khooti-hub__online:hover {
  border-color: var(--kh-gold);
  background: color-mix(in srgb, var(--kh-gold) 16%, var(--kh-surface));
}

.khooti-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.khooti-modal.hidden {
  display: none !important;
}

.khooti-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}

.khooti-modal__card {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  max-height: min(80vh, 36rem);
  overflow: auto;
  /* Use --panel (global theme). --kh-surface only exists inside #tab-khooti;
     wait/invite modals live outside that scope and were rendering transparent. */
  background: var(--panel, #fffbfa);
  color: var(--text, #2d3b4f);
  border-radius: 14px;
  border: 1px solid var(--border, var(--kh-line, #e2e8f0));
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  padding: 1rem 1.1rem 1.1rem;
}

[data-theme="dark"] .khooti-modal__card {
  background: var(--panel, #1b2433);
  color: var(--text, #e9eef6);
}

.khooti-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.khooti-modal__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.khooti-modal__x {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--kh-muted);
}

.khooti-modal__hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  line-height: 1.45;
}

.khooti-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.khooti-online-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.khooti-online-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid var(--kh-line);
}

.khooti-online-row__meta {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
}

.khooti-special-request {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--kh-line);
}

.khooti-special-request__panel {
  margin-top: 0.75rem;
}

.khooti-special-request__panel.hidden {
  display: none;
}

.khooti-special-request__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  margin-bottom: 0.35rem;
}

.khooti-special-request__input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--kh-line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
  background: var(--panel, #fff);
  color: inherit;
}

.khooti-special-request__status {
  min-height: 1.1rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
}

.khooti-special-request__results {
  margin-top: 0.45rem;
  max-height: 220px;
  overflow: auto;
}

.khooti-online-row__badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted, #64748b);
}

.khooti-pending-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.khooti-pending-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.15rem;
  border-bottom: 1px solid var(--kh-line);
}

.khooti-pending-row:last-child {
  border-bottom: none;
}

.khooti-pending-row__meta {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
}

.khooti-pending-row__meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.khooti-pending-row__actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.35rem;
}

.khooti-pending-row__actions .btn {
  white-space: nowrap;
}

.khooti-wait-card {
  position: relative;
  overflow: hidden;
  border: 2px solid #e8c547;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 77, 109, 0.45), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(46, 125, 255, 0.42), transparent 46%),
    radial-gradient(circle at 50% 110%, rgba(255, 176, 32, 0.35), transparent 48%),
    linear-gradient(145deg, #3a0a14 0%, #1a0a2e 48%, #0a1628 100%);
  color: #f4f7fb;
  box-shadow: 0 0 0 1px rgba(255, 224, 138, 0.2), 0 18px 40px rgba(0, 0, 0, 0.35);
  animation: khooti-wait-shake 0.46s ease-in-out infinite alternate;
}

.khooti-wait-card::before,
.khooti-wait-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
  z-index: 0;
}

.khooti-wait-card::before {
  width: 9rem;
  height: 9rem;
  left: -2.5rem;
  top: -2.8rem;
  background: radial-gradient(circle, rgba(255, 107, 157, 0.7), transparent 70%);
  animation: khooti-wait-orb 1.84s ease-in-out infinite;
}

.khooti-wait-card::after {
  width: 10rem;
  height: 10rem;
  right: -3rem;
  top: -3.2rem;
  background: radial-gradient(circle, rgba(46, 125, 255, 0.65), transparent 70%);
  animation: khooti-wait-orb 1.84s ease-in-out infinite 0.4s;
}

.khooti-wait-card .khooti-modal__head,
.khooti-wait-card .khooti-wait-body,
.khooti-wait-card .khooti-modal__foot {
  position: relative;
  z-index: 1;
}

.khooti-wait-card .khooti-modal__head h3,
.khooti-wait-card .khooti-wait-name {
  color: #ffe08a;
}

.khooti-wait-card .khooti-wait-status,
.khooti-wait-card .khooti-modal__head .khooti-modal__x {
  color: #c9d8ea;
}

.khooti-wait-card .khooti-wait-countdown {
  border-color: rgba(232, 197, 71, 0.55);
  background: rgba(255, 224, 138, 0.12);
}

.khooti-wait-card .khooti-wait-countdown__num {
  color: #ffe08a;
}

.khooti-wait-card .khooti-wait-pulse {
  background: linear-gradient(90deg, #ff6b9d, #e8c547, #2e7dff);
  background-size: 200% 100%;
  animation: khooti-wait-shimmer 1.4s linear infinite;
}

@keyframes khooti-wait-shake {
  from {
    transform: translate3d(-2px, 1px, 0) scale(1);
  }
  to {
    transform: translate3d(2.5px, -1.2px, 0) scale(1.012);
  }
}

@keyframes khooti-wait-orb {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.85;
  }
}

@keyframes khooti-wait-shimmer {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 200% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .khooti-wait-card,
  .khooti-wait-card::before,
  .khooti-wait-card::after,
  .khooti-wait-card .khooti-wait-pulse {
    animation: none;
  }
}

.khooti-wait-body {
  min-height: 7rem;
}

.khooti-wait-player {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.khooti-wait-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--kh-felt);
}

.khooti-wait-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}

.khooti-wait-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.khooti-wait-status {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
}

.khooti-wait-countdown {
  margin-top: 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.85rem 0.75rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--kh-gold) 45%, var(--kh-line));
  background: color-mix(in srgb, var(--kh-felt, #8fbc9a) 14%, var(--kh-surface, var(--panel, #fff)));
}

.khooti-wait-countdown__num {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--kh-ink);
  letter-spacing: -0.03em;
}

.khooti-wait-countdown__label {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kh-muted);
}

.khooti-wait-pulse {
  margin-top: 1.1rem;
  height: 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, #8fbc9a 55%, #d4b483);
}

/* ---------- Game-styled boards: leaderboard, recent updates, challenge players ---------- */

.khooti-hub__panel--game,
.khooti-modal__card--game {
  --khg-gold: #f5c84a;
  --khg-cream: #fff4d6;
  --khg-soft: #c9d4e8;
  --khg-row-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(0, 0, 0, 0.3));
  --khg-row-line: rgba(255, 227, 163, 0.22);
  color: var(--khg-soft);
}

#tab-khooti .khooti-hub__panel.khooti-hub__panel--game {
  position: relative;
  margin-top: 2rem;
  padding: 0.85rem 0.8rem 0.95rem;
  border: 4px solid transparent;
  border-radius: 22px;
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(255, 216, 119, 0.16), transparent 62%) padding-box,
    linear-gradient(180deg, #22386b, #15244a 55%, #0b1430) padding-box,
    linear-gradient(180deg, #ffe39a, #b07a2e) border-box;
  box-shadow:
    inset 0 0 0 1px rgba(255, 227, 163, 0.22),
    0 5px 0 rgba(5, 10, 20, 0.5),
    0 14px 30px rgba(5, 10, 20, 0.3);
}

#tab-khooti .khooti-hub__panel--game .khooti-hub__panel-title,
.khooti-modal__card--game .khooti-modal__head h3 {
  display: table;
  position: relative;
  z-index: 1;
  min-width: 10.5rem;
  margin: -1.75rem auto 0.9rem;
  padding: 0.5rem 1.5rem 0.55rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5a2e0c;
  text-shadow: 0 1px 0 rgba(255, 246, 214, 0.6);
  background: linear-gradient(180deg, #ffd877, #e8912a);
  border: 2px solid #8a4e12;
  border-radius: 12px;
  box-shadow:
    0 3px 0 #8a4e12,
    inset 0 0 0 1px rgba(255, 246, 214, 0.45);
}

.khooti-modal__card.khooti-modal__card--game {
  width: min(30rem, 100%);
  padding: 1rem 1rem 1.15rem;
  color: var(--khg-soft);
  border: 4px solid transparent;
  border-radius: 22px;
  background:
    radial-gradient(120% 45% at 50% 0%, rgba(255, 216, 119, 0.18), transparent 62%) padding-box,
    linear-gradient(180deg, #22386b, #15244a 55%, #0b1430) padding-box,
    linear-gradient(180deg, #ffe39a, #b07a2e) border-box;
  box-shadow:
    inset 0 0 0 1px rgba(255, 227, 163, 0.22),
    0 6px 0 rgba(5, 10, 20, 0.55),
    0 22px 50px rgba(0, 0, 0, 0.5);
  animation: kh-board-in 0.26s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.khooti-modal__card--game .khooti-modal__head {
  position: relative;
  justify-content: center;
  margin-bottom: 0.4rem;
}

.khooti-modal__card--game .khooti-modal__head h3 {
  margin: 0.1rem auto 0;
}

.khooti-modal__card--game .khooti-modal__x {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0 0 0.1rem;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #ff6a4f, #c0201a);
  border: 2px solid #ffd877;
  box-shadow: 0 2.5px 0 #6e0e0e;
}

.khooti-modal__card--game .khooti-modal__x:active {
  transform: translateY(calc(-50% + 2px));
  box-shadow: 0 0.5px 0 #6e0e0e;
}

.khooti-modal__card--game .khooti-modal__hint,
.khooti-modal__card--game .khooti-modal__hint.muted {
  text-align: center;
  color: var(--khg-soft);
  font-size: 0.8rem;
}

.khooti-hub__panel--game .khooti-lb__empty,
.khooti-modal__card--game .khooti-lb__empty {
  padding: 0.7rem 0.4rem;
  text-align: center;
  color: var(--khg-soft);
}

.khooti-hub__panel--game .khooti-lb__err,
.khooti-modal__card--game .khooti-lb__err {
  text-align: center;
  color: #fca5a5;
}

/* Your rank banner */
#tab-khooti .khooti-hub__panel--game .khooti-hub__my-rank {
  margin: 0 0 0.85rem;
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd877;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.6);
  border-radius: 14px;
  border: 1px solid rgba(245, 200, 74, 0.5);
  background: linear-gradient(90deg, rgba(245, 200, 74, 0.06), rgba(245, 200, 74, 0.25), rgba(245, 200, 74, 0.06));
}

#tab-khooti .khooti-hub__panel--game .khooti-hub__my-rank strong {
  margin-left: 0.3rem;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

#tab-khooti .khooti-hub__panel--game .khooti-hub__my-rank span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--khg-soft);
}

#tab-khooti .khooti-hub__my-rank.hidden {
  display: none;
}

/* Avatar rings + rank coins */
.kh-ring {
  --kh-ring: 44px;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: var(--kh-ring);
  height: var(--kh-ring);
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(180deg, #8fb3ff, #2e4a8a);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.kh-ring--gold {
  background: linear-gradient(180deg, #f6e3a1, #9a6b17);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 0 12px rgba(245, 200, 74, 0.35);
}

.kh-ring--silver {
  background: linear-gradient(180deg, #ffffff, #6b7686);
}

.kh-ring--bronze {
  background: linear-gradient(180deg, #ffc48f, #7a3a14);
}

.kh-ring--dim {
  background: linear-gradient(180deg, #8a96a6, #3a4350);
  opacity: 0.85;
}

.kh-ring__img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(180deg, #34497a, #1a2644);
}

.kh-ring__img--fallback {
  display: grid;
  place-items: center;
  font-size: calc(var(--kh-ring) * 0.3);
  font-weight: 800;
  color: #fff4d6;
}

.kh-ring--online::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 26%;
  height: 26%;
  min-width: 10px;
  min-height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #0b1430;
  animation: kh-online-pulse 1.8s ease-out infinite;
}

.kh-coin {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #f5c84a;
  background: linear-gradient(180deg, #2e4270, #141f3a);
  border: 1.5px solid rgba(245, 200, 74, 0.45);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.kh-coin--gold {
  color: #5a2e0c;
  background: linear-gradient(180deg, #ffefb0, #c8871c);
  border-color: #7a4a0e;
  box-shadow: 0 2px 0 #7a4a0e;
}

.kh-coin--silver {
  color: #333c4a;
  background: linear-gradient(180deg, #ffffff, #8e9aab);
  border-color: #4a5563;
  box-shadow: 0 2px 0 #4a5563;
}

.kh-coin--bronze {
  color: #4a2008;
  background: linear-gradient(180deg, #ffc48f, #a0521f);
  border-color: #5c2a0c;
  box-shadow: 0 2px 0 #5c2a0c;
}

.kh-coin--sm {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.72rem;
}

.kh-name--gold {
  color: #ffd877 !important;
}

.kh-name--silver {
  color: #e6ecf4 !important;
}

.kh-name--bronze {
  color: #ffc48f !important;
}

/* Podium */
.kh-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  padding: 0.2rem 0.15rem 0;
  border-bottom: 3px solid rgba(245, 200, 74, 0.55);
}

.kh-podium__slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  transform-origin: bottom center;
  animation: kh-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--kh-pop-delay, 0ms);
}

.kh-podium__crown {
  position: relative;
  z-index: 2;
  margin-bottom: -0.5rem;
  font-size: 1.55rem;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
  animation: kh-crown-bob 2.4s ease-in-out infinite;
}

.kh-podium__avatar {
  position: relative;
  padding-bottom: 0.6rem;
}

.kh-podium__avatar .kh-coin {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.kh-podium__name {
  max-width: 100%;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.5);
}

.kh-podium__pts {
  font-size: 0.72rem;
  font-weight: 800;
  color: #f5c84a;
  font-variant-numeric: tabular-nums;
}

.kh-podium__base {
  display: grid;
  place-items: center;
  align-self: stretch;
  margin: 0.35rem 0.2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.kh-podium__slot--gold .kh-podium__base {
  height: 3.9rem;
  background: linear-gradient(180deg, #f5c84a, #8a5a12);
}

.kh-podium__slot--silver .kh-podium__base {
  height: 2.9rem;
  background: linear-gradient(180deg, #c8d3e0, #56606e);
}

.kh-podium__slot--bronze .kh-podium__base {
  height: 2.15rem;
  background: linear-gradient(180deg, #e8904e, #6b3212);
}

/* Leaderboard rows */
.kh-lb-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kh-lb-row,
.kh-battle,
.kh-player {
  border-radius: 16px;
  background: var(--khg-row-bg);
  border: 1px solid var(--khg-row-line);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  animation: kh-rise 0.32s ease-out both;
}

.kh-lb-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.kh-lb-row:hover,
.kh-player:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 200, 74, 0.6);
}

.kh-lb-row--gold {
  background: linear-gradient(90deg, rgba(245, 200, 74, 0.35), rgba(245, 200, 74, 0.08));
  border: 1.5px solid rgba(245, 200, 74, 0.7);
}

.kh-lb-row--silver {
  background: linear-gradient(90deg, rgba(214, 222, 232, 0.3), rgba(214, 222, 232, 0.06));
  border: 1.5px solid rgba(214, 222, 232, 0.6);
}

.kh-lb-row--bronze {
  background: linear-gradient(90deg, rgba(232, 144, 78, 0.3), rgba(232, 144, 78, 0.06));
  border: 1.5px solid rgba(232, 144, 78, 0.6);
}

.kh-lb-row__main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.kh-lb-row__name,
.kh-player__name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff4d6;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kh-lb-row__rec,
.kh-player__via {
  font-size: 0.72rem;
  color: var(--khg-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kh-pts-chip {
  flex: 0 0 auto;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #f5c84a;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(245, 200, 74, 0.6);
}

/* Recent updates: winner · VS · loser */
.khooti-hub__panel--game .khooti-upd,
.khooti-modal__card--game .khooti-upd {
  gap: 0.55rem;
}

.kh-battle {
  padding: 0.35rem 0.5rem 0.6rem;
}

.kh-battle__line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.25rem;
}

.kh-fighter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.kh-fighter__avatar {
  position: relative;
  padding-top: 0.75rem;
}

.kh-fighter__crown {
  position: absolute;
  top: -0.05rem;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  font-size: 1rem;
  line-height: 1;
  filter: drop-shadow(0 1.5px 1.5px rgba(0, 0, 0, 0.5));
}

.kh-fighter__name {
  max-width: 100%;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff4d6;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kh-fighter--lose .kh-fighter__name {
  color: var(--khg-soft);
}

.kh-tag {
  padding: 0.1rem 0.45rem;
  border-radius: 8px;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kh-tag--win {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.6);
}

.kh-tag--lose {
  color: #f87171;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.6);
}

.kh-vs {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, #ff7a55, #b01a14);
  border: 2px solid #ffd877;
  box-shadow: 0 2px 0 #6e0e0e, 0 0 14px rgba(255, 106, 79, 0.45);
}

.kh-battle__meta {
  margin-top: 0.45rem;
  text-align: center;
  font-size: 0.72rem;
  color: #9fb0cc;
}

.kh-battle--compact .kh-vs {
  width: 2.1rem;
  height: 2.1rem;
  font-size: 0.75rem;
}

/* Challenge players */
.khooti-modal__card--game .khooti-online-list {
  gap: 0.5rem;
}

.kh-player {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.kh-player__meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.kh-btn-green {
  flex: 0 0 auto;
  appearance: none;
  cursor: pointer;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.45);
  border-radius: 14px;
  border: 1.5px solid #14591c;
  background: linear-gradient(180deg, #8be86a, #26962f);
  box-shadow: 0 3px 0 #14591c, inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}

.kh-btn-green:hover {
  filter: brightness(1.08);
}

.kh-btn-green:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 #14591c, inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.kh-btn-green:disabled {
  cursor: default;
  transform: none;
  filter: grayscale(1) brightness(0.8);
}

.khooti-game-outline-btn,
#tab-khooti .khooti-hub__panel--game .khooti-hub__more-btn {
  display: block;
  width: 100%;
  appearance: none;
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  color: #ffd877;
  border-radius: 14px;
  border: 1.5px solid rgba(245, 200, 74, 0.8);
  background: rgba(245, 200, 74, 0.1);
  transition: background 0.15s ease;
}

#tab-khooti .khooti-hub__panel--game .khooti-hub__more-btn {
  margin-top: 0.7rem;
  text-decoration: none;
}

.khooti-game-outline-btn:hover,
#tab-khooti .khooti-hub__panel--game .khooti-hub__more-btn:hover {
  background: rgba(245, 200, 74, 0.22);
  text-decoration: none;
}

#tab-khooti .khooti-hub__panel--game .khooti-hub__more-btn.hidden {
  display: none;
}

.khooti-modal__card--game .khooti-special-request {
  border-top-color: rgba(245, 200, 74, 0.35);
}

.khooti-modal__card--game .khooti-special-request__label,
.khooti-modal__card--game .khooti-special-request__status {
  color: var(--khg-soft);
}

.khooti-modal__card--game .khooti-special-request__input {
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(245, 200, 74, 0.5);
  border-radius: 12px;
}

.khooti-modal__card--game .khooti-special-request__input::placeholder {
  color: rgba(201, 212, 232, 0.6);
}

/* Tappable profiles → player card */
[data-kh-player] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

[data-kh-player]:focus-visible {
  outline: 2px solid #ffd877;
  outline-offset: 2px;
}

.kh-podium__slot[data-kh-player],
.kh-fighter[data-kh-player] {
  border-radius: 14px;
  transition: filter 0.15s ease;
}

.kh-podium__slot[data-kh-player]:hover,
.kh-fighter[data-kh-player]:hover {
  filter: brightness(1.12) drop-shadow(0 0 8px rgba(255, 216, 119, 0.35));
}

.kh-fighter[data-kh-player]:active,
.kh-lb-row[data-kh-player]:active {
  transform: scale(0.97);
}

.kh-pc {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.kh-pc.hidden,
.kh-pc .hidden {
  display: none !important;
}

.kh-pc__scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(8, 14, 34, 0.6), rgba(2, 5, 14, 0.86));
  backdrop-filter: blur(2px);
  animation: kh-pc-fade 0.18s ease-out;
}

.kh-pc__card {
  --tier-a: #f3b27a;
  --tier-b: #8a4b1f;
  --tier-glow: rgba(243, 178, 122, 0.45);
  position: relative;
  width: min(350px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: hidden auto;
  padding: 18px 16px 18px;
  border-radius: 26px;
  border: 4px solid transparent;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, 0.14), transparent 60%) padding-box,
    linear-gradient(180deg, #22386b 0%, #15244a 55%, #0b1430 100%) padding-box,
    linear-gradient(160deg, var(--tier-a), var(--tier-b) 55%, var(--tier-a)) border-box;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.06),
    0 0 30px var(--tier-glow),
    0 6px 0 rgba(0, 0, 0, 0.5),
    0 24px 50px rgba(0, 0, 0, 0.55);
  color: #f3f6ff;
  text-align: center;
  font-family: inherit;
  scrollbar-width: none;
}

.kh-pc__card::-webkit-scrollbar {
  display: none;
}

.kh-pc__card[data-tier='silver'] {
  --tier-a: #f1f5fb;
  --tier-b: #7d8aa0;
  --tier-glow: rgba(210, 222, 240, 0.4);
}

.kh-pc__card[data-tier='gold'] {
  --tier-a: #ffe39a;
  --tier-b: #b07a2e;
  --tier-glow: rgba(255, 214, 102, 0.5);
}

.kh-pc__card[data-tier='platinum'] {
  --tier-a: #9ff5e6;
  --tier-b: #2b8f86;
  --tier-glow: rgba(120, 240, 220, 0.45);
}

.kh-pc__card[data-tier='diamond'] {
  --tier-a: #d9b8ff;
  --tier-b: #5b3fd6;
  --tier-glow: rgba(180, 140, 255, 0.55);
}

.kh-pc__shine {
  position: absolute;
  top: -40%;
  left: -60%;
  width: 45%;
  height: 180%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: rotate(18deg) translateX(-120%);
}

.kh-pc__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  appearance: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  border-radius: 50%;
  border: 2px solid #ffd877;
  background: linear-gradient(180deg, #ff7a55, #b01a14);
  box-shadow: 0 2px 0 #6e0e0e;
}

.kh-pc__close:hover {
  filter: brightness(1.1);
}

.kh-pc__top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 40px;
}

.kh-pc__rank {
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--tier-a), var(--tier-b));
  color: #14203f;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.kh-pc__tier {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tier-a);
  text-shadow: 0 0 10px var(--tier-glow);
}

.kh-pc__hero {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 10px auto 6px;
}

.kh-pc__avatar {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 200deg, var(--tier-a), var(--tier-b), var(--tier-a), var(--tier-b), var(--tier-a));
  box-shadow: 0 0 22px var(--tier-glow), 0 4px 0 rgba(0, 0, 0, 0.45);
}

.kh-pc__img {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #15244a;
  background: #0b1430;
}

.kh-pc__img--fallback {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff4d6;
  background: linear-gradient(180deg, #2f4b8a, #15244a);
}

.kh-pc__lv {
  position: absolute;
  right: -6px;
  bottom: -2px;
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  line-height: 1;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(180deg, var(--tier-a), var(--tier-b));
  color: #14203f;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.45));
}

.kh-pc__lv small {
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.kh-pc__lv b {
  font-size: 1.15rem;
  font-weight: 900;
}

.kh-pc__online {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: #1f9d55;
  border: 2px solid #15244a;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kh-pc__name {
  margin: 12px 0 0;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.15;
  color: #fff4d6;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
  overflow-wrap: anywhere;
}

.kh-pc__meta {
  margin: 2px 0 0;
  min-height: 1em;
  font-size: 0.74rem;
  color: #9fb0cc;
}

.kh-pc__xp {
  position: relative;
  height: 16px;
  margin: 10px 4px 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.kh-pc__xp-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tier-b), var(--tier-a));
  box-shadow: 0 0 10px var(--tier-glow);
  transition: width 0.6s ease 0.25s;
}

.kh-pc__xp-label {
  position: relative;
  display: block;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.kh-pc__stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.kh-pc__ring {
  --pct: 0;
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #15244a 76%, transparent 78%),
    conic-gradient(#4ade80 calc(var(--pct) * 1%), rgba(255, 255, 255, 0.1) 0);
  line-height: 1.05;
}

.kh-pc__ring b {
  font-size: 1.35rem;
  font-weight: 900;
}

.kh-pc__ring small,
.kh-pc__tile small {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fb0cc;
}

.kh-pc__tiles {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.kh-pc__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.09);
  line-height: 1.1;
}

.kh-pc__tile b {
  font-size: 1.1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.kh-pc__tile--win b {
  color: #4ade80;
}

.kh-pc__tile--loss b {
  color: #fb7185;
}

.kh-pc__h2h {
  display: grid;
  gap: 2px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.14), rgba(0, 0, 0, 0.25), rgba(251, 113, 133, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.kh-pc__label {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tier-a);
}

.kh-pc__h2h-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
}

.kh-pc__h2h-score b {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.kh-pc__h2h-score b:first-child {
  color: #4ade80;
}

.kh-pc__h2h-score b:last-child {
  color: #fb7185;
}

.kh-pc__h2h-score i {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 900;
  color: #9fb0cc;
}

.kh-pc__h2h-sides {
  display: flex;
  justify-content: center;
  gap: 38px;
  font-size: 0.66rem;
  color: #9fb0cc;
}

.kh-pc__form-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  margin-top: 12px;
}

.kh-pc__form {
  display: inline-flex;
  gap: 4px;
}

.kh-pc__pip {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 0.7rem;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

.kh-pc__pip--w {
  background: linear-gradient(180deg, #4ade80, #16a34a);
}

.kh-pc__pip--l {
  background: linear-gradient(180deg, #fb7185, #be123c);
}

.kh-pc__pip--none {
  background: rgba(255, 255, 255, 0.1);
  color: #9fb0cc;
}

.kh-pc__streak {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 900;
  background: rgba(255, 170, 60, 0.2);
  color: #ffc36b;
}

.kh-pc__status {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: #9fb0cc;
}

.kh-pc__card.is-in {
  animation: kh-pc-pop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.kh-pc__card.is-in .kh-pc__shine {
  animation: kh-pc-shine 1.1s ease-out 0.35s both;
}

@keyframes kh-pc-pop {
  from {
    opacity: 0;
    transform: perspective(700px) rotateY(-70deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: perspective(700px) rotateY(0) scale(1);
  }
}

@keyframes kh-pc-shine {
  0% {
    transform: rotate(18deg) translateX(-120%);
  }
  100% {
    transform: rotate(18deg) translateX(520%);
  }
}

@keyframes kh-pc-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes kh-board-in {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes kh-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes kh-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes kh-crown-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-3px) rotate(5deg);
  }
}

@keyframes kh-online-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kh-podium__slot,
  .kh-podium__crown,
  .kh-ring--online::after,
  .kh-lb-row,
  .kh-battle,
  .kh-player,
  .khooti-modal__card.khooti-modal__card--game,
  .kh-pc__scrim,
  .kh-pc__card.is-in,
  .kh-pc__card.is-in .kh-pc__shine {
    animation: none;
  }
}

/* ================================================================
   Game theme: whole Khooti hub page (arena, header, all panels)
   ================================================================ */

#tab-khooti .khooti-hub--game {
  --khg-gold: #f5c84a;
  --khg-cream: #fff4d6;
  --khg-soft: #c9d4e8;
  position: relative;
  flex: 0 0 auto;
  border-radius: 22px;
  color: var(--khg-soft);
  background:
    radial-gradient(90% 40% at 50% 0%, rgba(80, 130, 255, 0.28), transparent 70%),
    radial-gradient(60% 40% at 0% 100%, rgba(245, 200, 74, 0.1), transparent 70%),
    radial-gradient(60% 40% at 100% 100%, rgba(255, 106, 79, 0.1), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 22px),
    linear-gradient(180deg, #13245a 0%, #0c1840 45%, #070e28 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 227, 163, 0.12);
}

/* Profile header band with gold rail */
#tab-khooti .khooti-hub--game .khooti-hub__profile {
  margin-top: 0;
  padding: 1rem 1rem 0.95rem;
  align-items: center;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, transparent, #b07a2e 12%, #ffe39a 50%, #b07a2e 88%, transparent) 1;
  background: radial-gradient(70% 120% at 20% 0%, rgba(255, 216, 119, 0.14), transparent 70%);
}

#tab-khooti .khooti-hub--game .khooti-hub__icon {
  width: 5rem;
  height: 5rem;
  margin-top: 0;
  border: 4px solid transparent;
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, #22386b, #0b1430) padding-box,
    linear-gradient(180deg, #ffe39a, #b07a2e) border-box;
  box-shadow: 0 5px 0 rgba(5, 10, 20, 0.6), 0 0 22px rgba(245, 200, 74, 0.35);
}

#tab-khooti .khooti-hub--game .khooti-hub__title {
  display: inline-block;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
  color: #ffd877;
  background: linear-gradient(180deg, #fff6d0 0%, #ffd877 45%, #e8912a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #5a2e0c) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

#tab-khooti .khooti-hub--game .khooti-hub__subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.kh-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--khg-cream, #fff4d6);
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(245, 200, 74, 0.45);
  white-space: nowrap;
}

#tab-khooti .khooti-hub--game .khooti-hub__actions {
  align-self: center;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0;
}

/* Big glossy PLAY button */
#tab-khooti .khooti-hub--game .khooti-hub__play {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 9rem;
  padding: 0.7rem 1.8rem 0.75rem;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  border: 2px solid #14591c;
  border-radius: 16px;
  background: linear-gradient(180deg, #a6f283 0%, #4cc743 48%, #26962f 100%);
  box-shadow:
    0 4px 0 #14591c,
    0 10px 22px rgba(38, 150, 47, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}

#tab-khooti .khooti-hub--game .khooti-hub__play::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -40%;
  width: 30%;
  height: 220%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: rotate(20deg) translateX(-150%);
  animation: kh-btn-shine 3.2s ease-in-out infinite;
}

#tab-khooti .khooti-hub--game .khooti-hub__play:hover {
  filter: brightness(1.07);
}

#tab-khooti .khooti-hub--game .khooti-hub__play:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #14591c, 0 4px 10px rgba(38, 150, 47, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

#tab-khooti .khooti-hub--game .khooti-hub__play:focus-visible,
#tab-khooti .khooti-hub--game .khooti-hub__online:focus-visible {
  outline: 3px solid #ffd877;
  outline-offset: 3px;
}

.khooti-hub__play-icon {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  padding-left: 0.12rem;
  border-radius: 50%;
  font-size: 0.72rem;
  color: #26962f;
  text-shadow: none;
  background: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

/* Online / challenge button */
#tab-khooti .khooti-hub--game .khooti-hub__online {
  gap: 0.45rem;
  padding: 0.65rem 1.1rem 0.7rem;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.4);
  border: 2px solid #173d80;
  border-radius: 16px;
  background: linear-gradient(180deg, #7cc0ff 0%, #3f86f0 48%, #2a5fc9 100%);
  box-shadow: 0 4px 0 #173d80, 0 8px 18px rgba(46, 111, 216, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}

#tab-khooti .khooti-hub--game .khooti-hub__online:hover {
  filter: brightness(1.07);
  border-color: #173d80;
  background: linear-gradient(180deg, #7cc0ff 0%, #3f86f0 48%, #2a5fc9 100%);
}

#tab-khooti .khooti-hub--game .khooti-hub__online:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #173d80, inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.khooti-hub__online-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid #0b3a1a;
  animation: kh-online-pulse 1.8s ease-out infinite;
}

/* Body + panels */
#tab-khooti .khooti-hub--game .khooti-hub__body {
  gap: 0 1.25rem;
  padding: 0.6rem 1rem 1.6rem;
}

#tab-khooti .khooti-hub--game .khooti-hub__panel + .khooti-hub__panel {
  margin-top: 2rem;
}

#tab-khooti .khooti-hub--game .khooti-hub__about {
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--khg-soft);
}

#tab-khooti .khooti-hub--game .khooti-hub__modes {
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0.5rem;
  margin-top: 0.8rem;
}

#tab-khooti .khooti-hub--game .khooti-hub__modes li {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.15rem;
  padding: 0.6rem 0.4rem 0.55rem;
  text-align: center;
  border-radius: 16px;
  background: var(--khg-row-bg);
  border: 1px solid var(--khg-row-line);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

#tab-khooti .khooti-hub--game .khooti-hub__modes li:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 200, 74, 0.6);
}

#tab-khooti .khooti-hub--game .khooti-hub__modes i {
  font-style: normal;
  font-size: 1.55rem;
  line-height: 1.2;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4));
}

#tab-khooti .khooti-hub--game .khooti-hub__modes strong {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--khg-cream);
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.5);
}

#tab-khooti .khooti-hub--game .khooti-hub__modes span {
  font-size: 0.7rem;
  text-align: center;
  color: var(--khg-soft);
}

/* Rules: numbered gold coins */
#tab-khooti .khooti-hub--game .khooti-hub__rules {
  display: grid;
  gap: 0.4rem;
  padding: 0;
  list-style: none;
  counter-reset: kh-rule;
  color: var(--khg-soft);
}

#tab-khooti .khooti-hub--game .khooti-hub__rules li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  padding: 0.45rem 0.6rem;
  font-size: 0.84rem;
  line-height: 1.4;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  counter-increment: kh-rule;
}

#tab-khooti .khooti-hub--game .khooti-hub__rules li::before {
  content: counter(kh-rule);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 900;
  color: #5a2e0c;
  background: linear-gradient(180deg, #ffefb0, #c8871c);
  border: 1.5px solid #7a4a0e;
  box-shadow: 0 2px 0 #7a4a0e;
}

/* Card values */
#tab-khooti .khooti-hub--game .khooti-hub__points {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.khooti-hub__points-label {
  flex-basis: 100%;
  text-align: center;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffd877;
}

.kh-val {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.6rem;
  padding: 0.3rem 0.5rem 0.25rem;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff, #e8ecf3);
  border: 1.5px solid #c7ced9;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
  line-height: 1.1;
  transform: rotate(-2deg);
}

.kh-val:nth-child(odd) {
  transform: rotate(2deg);
}

.kh-val i {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 900;
  color: #1b2336;
}

.kh-val b {
  margin-top: 0.1rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 900;
  color: #5a2e0c;
  background: linear-gradient(180deg, #ffe39a, #e8a93a);
}

.kh-val b::after {
  content: " pts";
  font-weight: 700;
}

.kh-val--ace i {
  font-size: 1rem;
  color: #c0201a;
}

/* Your stats HUD */
.kh-me {
  display: grid;
  gap: 0.75rem;
}

.kh-me__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.kh-me__lv {
  flex: 0 0 auto;
  width: 3.3rem;
  height: 3.3rem;
  display: grid;
  place-content: center;
  line-height: 1;
  text-align: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(180deg, #ffe39a, #b07a2e);
  color: #3d2008;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.45));
}

.kh-me__lv small {
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.kh-me__lv b {
  font-size: 1.25rem;
  font-weight: 900;
}

.kh-me__xp {
  flex: 1;
  min-width: 0;
}

.kh-me__xp-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--khg-soft);
}

.kh-me__xp-top strong {
  font-size: 0.9rem;
  color: #ffd877;
  font-variant-numeric: tabular-nums;
}

.kh-me__bar {
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(245, 200, 74, 0.35);
  overflow: hidden;
}

.kh-me__bar span {
  display: block;
  height: 100%;
  min-width: 6px;
  border-radius: inherit;
  background: linear-gradient(90deg, #e8912a, #ffd877);
  box-shadow: 0 0 10px rgba(255, 216, 119, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: width 0.6s ease;
}

.kh-me__ranks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.kh-me__rank {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 14px;
  background: var(--khg-row-bg);
  border: 1px solid var(--khg-row-line);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.kh-me__rank-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.kh-me__rank-text small {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--khg-soft);
}

.kh-me__rank-text b {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--khg-cream);
  white-space: nowrap;
}

.kh-me__grid {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kh-me__ring {
  --pct: 0;
  flex: 0 0 auto;
  width: 5.6rem;
  height: 5.6rem;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.05;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #15244a 76%, transparent 78%),
    conic-gradient(#4ade80 calc(var(--pct) * 1%), rgba(255, 255, 255, 0.1) 0);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.18);
}

.kh-me__ring b {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
}

.kh-me__ring small,
.kh-me__tile small {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--khg-soft);
}

.kh-me__tiles {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.kh-me__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 0.3rem;
  border-radius: 12px;
  line-height: 1.1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.kh-me__tile b {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.kh-me__tile--win b {
  color: #4ade80;
}

.kh-me__tile--loss b {
  color: #fb7185;
}

.kh-me__hint {
  margin: 0;
  text-align: center;
  font-size: 0.74rem;
  color: #ffd877;
}

/* Game requests */
#tab-khooti .khooti-hub--game .khooti-pending-list {
  gap: 0.5rem;
}

#tab-khooti .khooti-hub--game .khooti-pending-row {
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border: 1.5px solid rgba(245, 200, 74, 0.55);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(245, 200, 74, 0.2), rgba(245, 200, 74, 0.04));
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  animation: kh-rise 0.32s ease-out both;
}

#tab-khooti .khooti-hub--game .khooti-pending-row__meta strong {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--khg-cream);
}

#tab-khooti .khooti-hub--game .khooti-pending-row__meta .muted {
  font-size: 0.72rem;
  color: var(--khg-soft);
}

/* Game buttons */
.kh-btn {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 1.05rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.4);
  border-radius: 14px;
  border: 1.5px solid transparent;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}

.kh-btn[hidden] {
  display: none;
}

.kh-btn:hover {
  filter: brightness(1.08);
}

.kh-btn:focus-visible {
  outline: 2px solid #ffd877;
  outline-offset: 2px;
}

.kh-btn:disabled {
  cursor: default;
  transform: none;
  filter: grayscale(1) brightness(0.8);
}

.kh-btn--green {
  border-color: #14591c;
  background: linear-gradient(180deg, #8be86a, #26962f);
  box-shadow: 0 3px 0 #14591c, inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.kh-btn--green:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 0 0 #14591c, inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.kh-btn--red {
  border-color: #6e0e0e;
  background: linear-gradient(180deg, #ff7a55, #c0201a);
  box-shadow: 0 3px 0 #6e0e0e, inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.kh-btn--red:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 0 0 #6e0e0e, inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.kh-btn--sm {
  padding: 0.42rem 0.7rem;
  font-size: 0.7rem;
  border-radius: 11px;
}

/* Invite popup */
.khooti-invite-card__hero {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0.6rem auto 1rem;
  animation: kh-invite-bounce 1.2s ease-in-out infinite;
}

.khooti-invite-card__swords {
  position: absolute;
  bottom: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  font-size: 1rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff7a55, #b01a14);
  border: 2px solid #ffd877;
  box-shadow: 0 2px 0 #6e0e0e;
}

.khooti-invite-card #khootiInviteBody {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--khg-cream);
}

.khooti-modal__card--game .khooti-modal__foot,
.khooti-wait-card .khooti-modal__foot {
  justify-content: center;
  gap: 0.6rem;
}

/* Waiting room avatar ring */
.khooti-wait-card .khooti-wait-player .kh-ring {
  flex: 0 0 auto;
}

/* Play popup chrome */
#khootiPlayView .khooti-play-popup__window {
  border: 4px solid transparent;
  border-radius: 20px;
  background:
    linear-gradient(180deg, #15244a, #0b1430) padding-box,
    linear-gradient(180deg, #ffe39a, #b07a2e) border-box;
  box-shadow: 0 0 30px rgba(245, 200, 74, 0.25), 0 24px 64px rgba(0, 0, 0, 0.55);
}

#khootiPlayView .khooti-play-popup__window:fullscreen {
  border: 0;
  border-radius: 0;
}

#khootiPlayView .khooti-play__bar {
  padding: 0.45rem 0.6rem;
  background: linear-gradient(180deg, #22386b, #15244a);
  border-bottom: 2px solid rgba(245, 200, 74, 0.6);
}

#khootiPlayView .khooti-play__frame {
  background: #0b1430;
}

#khootiPlayView .khooti-play__title {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffd877;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

#khootiPlayView .khooti-play__back,
#khootiPlayView .khooti-play__fs {
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.4);
  border-radius: 11px;
}

#khootiPlayView .khooti-play__back {
  border: 1.5px solid #6e0e0e;
  background: linear-gradient(180deg, #ff7a55, #c0201a);
  box-shadow: 0 2px 0 #6e0e0e;
}

#khootiPlayView .khooti-play__fs {
  border: 1.5px solid rgba(245, 200, 74, 0.8);
  background: rgba(245, 200, 74, 0.12);
  color: #ffd877;
}

#khootiPlayView .khooti-play__back:hover,
#khootiPlayView .khooti-play__fs:hover {
  filter: brightness(1.1);
}

#khootiPlayView .khooti-play__back:hover {
  background: linear-gradient(180deg, #ff7a55, #c0201a);
}

@media (max-width: 960px) {
  #tab-khooti .khooti-hub--game .khooti-hub__actions {
    flex-wrap: nowrap;
  }

  #tab-khooti .khooti-hub--game .khooti-hub__play {
    flex: 1 1 auto;
  }

  #tab-khooti .khooti-hub--game .khooti-hub__online {
    flex: 0 0 auto;
  }
}

@media (max-width: 360px) {
  .kh-me__grid {
    flex-direction: column;
  }

  .kh-me__tiles {
    width: 100%;
  }
}

@keyframes kh-btn-shine {
  0%,
  60% {
    transform: rotate(20deg) translateX(-150%);
  }
  100% {
    transform: rotate(20deg) translateX(520%);
  }
}

@keyframes kh-invite-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  #tab-khooti .khooti-hub--game .khooti-hub__play::after,
  .khooti-hub__online-dot,
  .khooti-invite-card__hero,
  #tab-khooti .khooti-hub--game .khooti-pending-row {
    animation: none;
  }
}
