/* Koderia 66.1 — native in-world profile deck. Presentation only. */

html[data-world-renderer="classic-clean"] body.worldStandalone {
  --kgu-bg: #06111b;
  --kgu-bg-deep: #030a11;
  --kgu-surface: rgba(17, 37, 52, .88);
  --kgu-surface-soft: rgba(255, 255, 255, .045);
  --kgu-line: rgba(134, 223, 242, .15);
  --kgu-line-strong: rgba(112, 229, 250, .34);
  --kgu-text: #f0fbff;
  --kgu-muted: #9db5c0;
  --kgu-cyan: #70e5f8;
  --kgu-violet: #a995ff;
  --kgu-gold: #ffd36a;
  --kgu-good: #79e0aa;
}

/* Koderia 66.2 — the avatar opens a small HUD card, never the legacy page-sized profile. */
html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerCard {
  position: absolute;
  z-index: 520;
  top: calc(var(--kfc-safe-top, 12px) + 2px);
  left: calc(var(--kfc-safe-left, 12px) + var(--kfc-rail-w, 76px) + 12px);
  width: min(372px, calc(100% - var(--kfc-rail-w, 76px) - 38px));
  padding: 13px;
  overflow: hidden;
  color: #effcff;
  border: 1px solid rgba(118, 229, 248, .34);
  border-radius: 21px;
  background:
    radial-gradient(circle at 12% 0%, rgba(100, 225, 246, .14), transparent 35%),
    linear-gradient(155deg, rgba(8, 31, 44, .98), rgba(4, 17, 28, .985));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(16px) saturate(1.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  opacity: 0;
  transform: translateX(-8px) scale(.985);
  transform-origin: 0 18px;
  transition: opacity .16s ease, transform .18s ease;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerCard[hidden] {
  display: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerCard.show {
  opacity: 1;
  transform: none;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerHead {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 11px;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerAvatar {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(126, 229, 247, .26);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(111, 232, 249, .16), rgba(136, 110, 248, .16));
  font-size: 32px;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerAvatar :is(img, canvas, svg),
html[data-world-renderer="classic-clean"] body.worldStandalone [data-kfc-rail="profile"] > span :is(img, canvas, svg) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerIdentity {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerIdentity small {
  color: #71e7f8;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: .13em;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerIdentity strong {
  margin-top: 2px;
  overflow: hidden;
  color: #f4fdff;
  font-size: 21px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerIdentity span {
  margin-top: 5px;
  overflow: hidden;
  color: #a9c2cb;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerClose {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  align-self: start;
  padding: 0;
  border: 1px solid rgba(137, 220, 238, .13);
  border-radius: 11px;
  color: #c5dae2;
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
  font: 800 20px/1 system-ui;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerStats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerStats > div {
  min-width: 0;
  min-height: 54px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(139, 218, 235, .10);
  border-radius: 13px;
  background: rgba(255, 255, 255, .035);
  text-align: center;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerStats small {
  color: #73939f;
  font-size: 6px;
  font-weight: 1000;
  letter-spacing: .08em;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerStats b {
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  color: #eafaff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerMission {
  min-height: 52px;
  margin-top: 8px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 213, 106, .14);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 213, 106, .075), rgba(255, 255, 255, .025));
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerMission > span {
  font-size: 25px;
  text-align: center;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerMission div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerMission small {
  color: #dcc579;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: .08em;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerMission b {
  margin-top: 3px;
  overflow: hidden;
  color: #f7fcff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerSync {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9db8c2;
  font-size: 9px;
  font-weight: 800;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerSync i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #69dfa1;
  box-shadow: 0 0 10px rgba(105, 223, 161, .5);
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerActions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerActions button {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(119, 224, 244, .16);
  border-radius: 13px;
  color: #e7faff;
  background: linear-gradient(145deg, rgba(99, 220, 240, .10), rgba(122, 101, 237, .09));
  cursor: pointer;
  font: 900 11px/1 Inter, system-ui, sans-serif;
}

html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerActions button:hover,
html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerClose:hover {
  border-color: rgba(119, 224, 244, .38);
  background-color: rgba(112, 227, 247, .12);
}

html[data-world-renderer="classic-clean"] body.worldStandalone.kguPlayerCardOpen [data-kfc-rail="profile"] {
  border-color: rgba(120, 232, 250, .68);
  box-shadow: 0 0 0 3px rgba(104, 226, 246, .10), 0 9px 26px rgba(0, 0, 0, .3);
}

/* Cosmetic effect layers are confined to the old hero if it is opened elsewhere. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroCard {
  overflow: hidden !important;
  isolation: isolate !important;
}

@media (max-width: 560px) {
  html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerCard {
    top: calc(var(--kfc-safe-top, 8px) + 2px);
    left: calc(var(--kfc-safe-left, 8px) + var(--kfc-rail-w, 64px) + 7px);
    width: calc(100% - var(--kfc-rail-w, 64px) - 21px);
    max-width: 340px;
    padding: 10px;
    border-radius: 17px;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerHead {
    grid-template-columns: 52px minmax(0, 1fr) 32px;
    gap: 8px;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerAvatar {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 27px;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerIdentity strong {
    font-size: 18px;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone .kguPlayerStats > div {
    min-height: 49px;
  }
}

/* The world stays visible. The profile behaves like a game system deck, not a page. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) {
  z-index: var(--kui-z-modal, 1000) !important;
  padding: 0 !important;
  place-items: stretch end !important;
  background: rgba(1, 6, 11, .26) !important;
  backdrop-filter: brightness(.7) saturate(.86) blur(2px) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileShell {
  width: min(1120px, calc(100vw - clamp(86px, 16vw, 300px))) !important;
  height: 100dvh !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-left: 1px solid var(--kgu-line-strong) !important;
  border-radius: 0 !important;
  color: var(--kgu-text) !important;
  background:
    linear-gradient(90deg, rgba(102, 228, 249, .06), transparent 42px),
    radial-gradient(circle at 80% -10%, rgba(112, 88, 235, .16), transparent 30%),
    linear-gradient(155deg, rgba(8, 24, 36, .97), rgba(4, 13, 22, .985)) !important;
  box-shadow: -28px 0 70px rgba(0, 0, 0, .38) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileShell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(122, 227, 247, .025) 1px, transparent 1px);
  background-size: 100% 5px;
  mask-image: linear-gradient(90deg, #000, transparent 18%);
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileClose {
  top: max(14px, env(safe-area-inset-top)) !important;
  right: max(14px, env(safe-area-inset-right)) !important;
  z-index: 30 !important;
  width: 44px !important;
  height: 44px !important;
  border: 1px solid var(--kgu-line) !important;
  border-radius: 13px !important;
  color: var(--kgu-text) !important;
  background: rgba(8, 24, 36, .94) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22) !important;
  font-size: 18px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileClose:hover {
  border-color: var(--kgu-line-strong) !important;
  background: rgba(23, 52, 67, .96) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) #profileView:not([hidden]) {
  position: relative;
  z-index: 1;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  color: var(--kgu-text) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  font-size: 16px !important;
}

/* Compact player status bar. Equipped cosmetics stay on the avatar, not across the screen. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroCard,
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroCard[class*="skin-"] {
  flex: 0 0 auto !important;
  min-height: 78px !important;
  margin: max(12px, env(safe-area-inset-top)) 70px 8px 14px !important;
  padding: 10px 14px !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: 12px !important;
  border: 1px solid var(--kgu-line) !important;
  border-radius: 18px !important;
  color: var(--kgu-text) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(108, 226, 247, .12), transparent 38%),
    linear-gradient(135deg, rgba(17, 43, 59, .94), rgba(9, 23, 35, .94)) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 10px 28px rgba(0, 0, 0, .15) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroAvatar {
  width: 52px !important;
  height: 52px !important;
  border-radius: 15px !important;
  border: 1px solid var(--kgu-line) !important;
  background: rgba(118, 225, 245, .08) !important;
  font-size: 28px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroInfo h2 {
  margin: 2px 0 5px !important;
  color: var(--kgu-text) !important;
  font-size: 21px !important;
  line-height: 1.05 !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileModalEyebrow {
  color: var(--kgu-cyan) !important;
  font-size: 11px !important;
  letter-spacing: .12em !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroMeta {
  gap: 6px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroMeta span {
  min-height: 24px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(255, 255, 255, .055) !important;
  color: #bfd0d7 !important;
  background: rgba(255, 255, 255, .04) !important;
  font-size: 12px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroXp {
  display: grid !important;
  grid-template-columns: repeat(2, auto) !important;
  align-items: center !important;
  justify-items: end !important;
  gap: 5px 8px !important;
  text-align: right !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroXp > strong {
  grid-column: 1 / -1;
  color: var(--kgu-text) !important;
  font-size: 18px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroXp > span {
  display: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.profileCoins, .profileRealCoins) {
  min-height: 28px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 1px solid rgba(255, 255, 255, .07) !important;
  border-radius: 10px !important;
  color: #dcebf0 !important;
  background: rgba(255, 255, 255, .045) !important;
  font-size: 12px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .cityProfileObjectExtras,
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileSectionNav,
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileMenuHint {
  display: none !important;
}

/* One navigation level for every section. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs,
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs.profileTabsGrouped {
  flex: 0 0 auto !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 14px 10px !important;
  display: flex !important;
  grid-template-columns: none !important;
  gap: 7px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 0 !important;
  border-bottom: 1px solid var(--kgu-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  scrollbar-width: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs::-webkit-scrollbar {
  display: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs .profileTab:not([hidden]),
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs.profileTabsGrouped .profileTab:not([hidden]) {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(147, 211, 227, .11) !important;
  border-radius: 13px !important;
  color: #9eb5c0 !important;
  background: rgba(255, 255, 255, .035) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: none !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs .profileTab:hover {
  color: var(--kgu-text) !important;
  border-color: var(--kgu-line-strong) !important;
  background: rgba(103, 220, 242, .075) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs .profileTab.active {
  color: #06151d !important;
  border-color: #8be8f6 !important;
  background: linear-gradient(135deg, #a4eef7, #68cfe3) !important;
  box-shadow: 0 6px 18px rgba(77, 211, 235, .16) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs .profileTab[hidden] {
  display: none !important;
}

/* A single scrolling play surface. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 16px 16px max(22px, env(safe-area-inset-bottom)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--kgu-text) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(120, 92, 236, .07), transparent 28%),
    linear-gradient(180deg, rgba(4, 14, 23, .48), rgba(3, 10, 17, .86)) !important;
  box-shadow: none !important;
  scrollbar-color: rgba(112, 229, 248, .25) transparent;
  scrollbar-width: thin;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel:not(.active) {
  display: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel.active {
  display: block !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel :is(h2, h3, h4, strong) {
  color: var(--kgu-text);
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel :is(p, small) {
  color: var(--kgu-muted);
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel h3 {
  font-size: clamp(25px, 3vw, 34px) !important;
  line-height: 1.04 !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel h4 {
  font-size: 18px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel p {
  font-size: 15px !important;
  line-height: 1.48 !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel small {
  font-size: 13px !important;
  line-height: 1.35 !important;
}

/* Shared game headers replace the oversized website banners. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(
  .megaPassHero,
  .kkpHero,
  .questsGameHero,
  .teacherTasksHead,
  .shopHero,
  .wardrobeHero,
  .achievementHero,
  .playersHero,
  .statsHeroV46,
  .adminHero
) {
  min-height: 0 !important;
  margin: 0 0 12px !important;
  padding: 17px 18px !important;
  border: 1px solid var(--kgu-line) !important;
  border-radius: 18px !important;
  color: var(--kgu-text) !important;
  background:
    radial-gradient(circle at 88% 0%, rgba(146, 117, 255, .13), transparent 34%),
    linear-gradient(135deg, rgba(17, 43, 60, .94), rgba(10, 24, 37, .94)) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(
  .questsGameHero,
  .teacherTasksHead,
  .playersHero,
  .statsHeroV46
) p {
  color: var(--kgu-muted) !important;
}

/* When teacher tasks exist, they are the current mission screen; duplicate quest intro is removed. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .questsGamePanel:has(.teacherTasksBlock:not([hidden])) :is(.questsGameHero, .questsGameInfoBar) {
  display: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .teacherTasksBlock {
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .teacherTasksHead {
  align-items: center !important;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 210, 98, .09), transparent 30%),
    linear-gradient(135deg, rgba(19, 47, 62, .96), rgba(10, 25, 38, .96)) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .teacherTasksHead h3 {
  margin: 4px 0 0 !important;
  font-size: 28px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .teacherTasksHead p {
  margin-top: 6px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .teacherTasksLive {
  min-height: 38px !important;
  border: 1px solid rgba(121, 224, 170, .16) !important;
  background: rgba(121, 224, 170, .07) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .teacherTasksLive span {
  color: #bce9d0 !important;
  font-size: 13px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.teacherTasksGrid, .questsProfileGrid, .achievementGrid, .playersGrid) {
  padding: 0 !important;
  gap: 10px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.teacherTasksGrid, .questsProfileGrid) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(
  .teacherTaskCard,
  .questCard,
  .trophyCard,
  .playerProfileCard,
  .statsSummaryCard,
  .statsSection,
  .wardrobeSection,
  .shopItem,
  .skinChoice,
  .avatarChoice,
  .decorChoice
) {
  border: 1px solid rgba(141, 214, 231, .11) !important;
  color: var(--kgu-text) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(112, 229, 248, .055), transparent 36%),
    rgba(255, 255, 255, .035) !important;
  box-shadow: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.teacherTaskCard, .questCard) {
  min-height: 0 !important;
  padding: 15px !important;
  border-radius: 17px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.teacherTaskCard, .questCard) :is(h4, strong) {
  color: var(--kgu-text) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.teacherTaskCard, .questCard) p {
  min-height: 0 !important;
  color: var(--kgu-muted) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.teacherTaskCard.ready, .questCard.claimable) {
  border-color: rgba(255, 211, 106, .42) !important;
  background: linear-gradient(145deg, rgba(255, 211, 106, .095), rgba(255, 255, 255, .035)) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.teacherTaskCard.claimed, .questCard.claimed, .questCard.completed) {
  border-color: rgba(121, 224, 170, .28) !important;
  background: linear-gradient(145deg, rgba(121, 224, 170, .075), rgba(255, 255, 255, .025)) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.teacherTaskTop > span, .questIcon, .statsSummaryIcon) {
  border: 1px solid rgba(130, 220, 239, .11) !important;
  background: rgba(111, 222, 243, .075) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.teacherTaskTop b, .teacherTaskTop em, .teacherTaskPending, .teacherTaskClaimed, .teacherTaskRewards span) {
  color: #b6cbd4 !important;
  background: rgba(255, 255, 255, .05) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .questsGameInfoBar,
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.achievementFilterBar, .playersToolbar, .shopCategoryBar) {
  margin: 0 0 12px !important;
  padding: 8px !important;
  border: 1px solid var(--kgu-line) !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 255, .03) !important;
  box-shadow: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .questsGameInfoBar :is(span, b) {
  min-height: 34px !important;
  color: #b9ccd5 !important;
  background: rgba(255, 255, 255, .035) !important;
  font-size: 13px !important;
}

/* Achievements, players and statistics use the same surfaces. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.achievementPanel, .playersGamePanel, .statsGamePanel) {
  background: transparent !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.nextAchievementCard, .playersHeroPortal, .statsHeroProfileV46, .statsLevelProgressV46) {
  border: 1px solid rgba(138, 215, 232, .12) !important;
  color: var(--kgu-text) !important;
  background: rgba(255, 255, 255, .04) !important;
  box-shadow: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.achievementFilter, .shopCategory) {
  min-height: 38px !important;
  border: 1px solid transparent !important;
  color: var(--kgu-muted) !important;
  background: transparent !important;
  font-size: 14px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.achievementFilter, .shopCategory).active {
  border-color: rgba(112, 229, 248, .22) !important;
  color: var(--kgu-text) !important;
  background: rgba(112, 229, 248, .085) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .playersSearch {
  border: 1px solid var(--kgu-line) !important;
  background: rgba(255, 255, 255, .04) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .playersSearch input {
  color: var(--kgu-text) !important;
  background: transparent !important;
  font-size: 16px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .playersSearch input::placeholder {
  color: #738c98 !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .playerProfileCard :is(.playerProfileName, strong) {
  color: var(--kgu-text) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .playerProfileCard :is(.playerProfileRole, p, small) {
  color: var(--kgu-muted) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .statsSummaryGridV46 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .statsSummaryGridV46 .statsSummaryCard {
  min-height: 170px !important;
  padding: 14px !important;
  border-radius: 17px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .statsSummaryCard > strong {
  color: var(--kgu-text) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .statsSummaryCard > :is(span, small, em) {
  color: var(--kgu-muted) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .statsLowerGridV46 {
  gap: 10px !important;
}

/* PASS: keep rewards and logic, remove its light webpage skin. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .megaPassPanel,
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel.megaPassPanel[data-profile-panel="pass"],
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .kkpRoot {
  --ink: var(--kgu-text) !important;
  --muted: var(--kgu-muted) !important;
  --line: var(--kgu-line) !important;
  --kkp-ink: var(--kgu-text) !important;
  --kkp-muted: var(--kgu-muted) !important;
  padding: 16px !important;
  color: var(--kgu-text) !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .kkpHero {
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .kkpRoot {
  padding: 0 !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .kkpHero h2 {
  font-size: clamp(26px, 3vw, 36px) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(
  .kkpHelp,
  .kkpDashboard > article,
  .kkpTrackSection,
  .kkpHelpGrid article,
  .kkpRewardCard,
  .kkpDetailCard,
  .kkpDetailVisual
) {
  border: 1px solid rgba(139, 215, 232, .11) !important;
  color: var(--kgu-text) !important;
  background: rgba(255, 255, 255, .035) !important;
  box-shadow: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(
  .kkpNextVisual,
  .kkpStatusTop > span,
  .kkpSectionIcon,
  .kkpWaiting,
  .kkpRewardCta,
  .kkpDetailTip,
  .kkpHelpHead > div > span
) {
  color: #c9dce3 !important;
  background: rgba(113, 221, 242, .075) !important;
  border-color: rgba(139, 215, 232, .11) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.kkpPremiumCard, .kkpPremiumCard.on, .kkpRewardCard.premium, .kkpDetailCard.premium) {
  color: var(--kgu-text) !important;
  border-color: rgba(255, 211, 106, .19) !important;
  background: linear-gradient(145deg, rgba(255, 211, 106, .075), rgba(255, 255, 255, .03)) !important;
  box-shadow: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.kkpPremiumCard, .kkpPremiumCard.on, .kkpDetailCard.premium) :is(strong, p, small) {
  color: inherit !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.kkpPageChips button, .kkpPager > button, .kkpNextJump, .kkpHelpHead button, .kkpDetailClose) {
  border-color: rgba(139, 215, 232, .11) !important;
  color: #bfd3dc !important;
  background: rgba(255, 255, 255, .045) !important;
}

/* Store and wardrobe fallback panels, if opened inside the profile. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.megaShopPanel, .wardrobePanel) {
  background: transparent !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.shopFeatureDeck > section, .shopCollectionCard, .wardrobePreviewCard) {
  border: 1px solid var(--kgu-line) !important;
  color: var(--kgu-text) !important;
  background: rgba(255, 255, 255, .04) !important;
  box-shadow: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .wardrobeSection {
  padding: 14px !important;
  border-radius: 18px !important;
}

/* Teacher tools inherit the same console language. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .adminPanel :is(section, article) {
  border-color: rgba(139, 215, 232, .11) !important;
  color: var(--kgu-text) !important;
  background-color: rgba(255, 255, 255, .035) !important;
  box-shadow: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .adminPanel :is(input, textarea, select) {
  border-color: var(--kgu-line) !important;
  color: var(--kgu-text) !important;
  background: rgba(3, 12, 20, .72) !important;
  font-size: 16px !important;
}

/* Profile creation follows the same in-world deck. */
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileSetup {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100% - 36px)) !important;
  max-width: none !important;
  margin: max(70px, calc(env(safe-area-inset-top) + 64px)) auto 28px !important;
  padding: 24px !important;
  border: 1px solid var(--kgu-line) !important;
  border-radius: 20px !important;
  color: var(--kgu-text) !important;
  background: rgba(10, 27, 40, .9) !important;
  box-shadow: none !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileSetup h2 {
  color: var(--kgu-text) !important;
  font-size: 30px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileSetup > p,
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileSetup label > span,
html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileSetup .pickerTitle {
  color: var(--kgu-muted) !important;
  font-size: 14px !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileSetup :is(input, details, .koderiaPortalBox) {
  border-color: var(--kgu-line) !important;
  color: var(--kgu-text) !important;
  background: rgba(255, 255, 255, .04) !important;
}

html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileSetup .avatarChoice {
  min-width: 48px;
  min-height: 48px;
}

@media (max-width: 980px) {
  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileShell {
    width: min(900px, calc(100vw - 54px)) !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .statsSummaryGridV46 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .kkpDashboard {
    grid-template-columns: 1fr 1fr !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .kkpNextCard {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) {
    background: var(--kgu-bg-deep) !important;
    backdrop-filter: none !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileShell {
    width: 100vw !important;
    border-left: 0 !important;
    box-shadow: none !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroCard,
  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroCard[class*="skin-"] {
    min-height: 68px !important;
    margin: max(9px, env(safe-area-inset-top)) 61px 7px 9px !important;
    padding: 8px 10px !important;
    border-radius: 15px !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroAvatar {
    width: 46px !important;
    height: 46px !important;
    font-size: 24px !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroInfo h2 {
    font-size: 18px !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroMeta span:nth-child(n + 3) {
    display: none !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroXp > strong {
    font-size: 15px !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroXp :is(.profileCoins, .profileRealCoins) {
    display: none !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs,
  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs.profileTabsGrouped {
    padding: 0 9px 8px !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabs .profileTab:not([hidden]) {
    min-height: 40px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileTabPanel {
    padding: 11px 10px max(18px, env(safe-area-inset-bottom)) !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(
    .megaPassHero,
    .kkpHero,
    .questsGameHero,
    .teacherTasksHead,
    .shopHero,
    .wardrobeHero,
    .achievementHero,
    .playersHero,
    .statsHeroV46,
    .adminHero
  ) {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
    border-radius: 16px !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(
    .passHeroVisual,
    .shopHeroChest,
    .playersHeroPortal,
    .statsHeroProfileV46,
    .nextAchievementCard
  ) {
    display: none !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) :is(.teacherTasksGrid, .questsProfileGrid) {
    grid-template-columns: 1fr !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .statsSummaryGridV46 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .kkpHero {
    grid-template-columns: 1fr !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .kkpHow,
  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .kkpDashboard {
    grid-template-columns: 1fr !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .kkpHow > i {
    display: none !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileSetup {
    width: calc(100% - 18px) !important;
    margin-top: max(64px, calc(env(safe-area-inset-top) + 56px)) !important;
    padding: 17px !important;
    border-radius: 17px !important;
  }
}

@media (max-width: 430px) {
  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .profileHeroMeta span:nth-child(n + 2) {
    display: none !important;
  }

  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) .statsSummaryGridV46 {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) *,
  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) *::before,
  html[data-world-renderer="classic-clean"] body.worldStandalone #profileModal:not(.cityObjectMode) *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
