@charset "UTF-8";
/* =========================
   TOKENS
========================= */
:root {
  --pink-bg: #ffd1dc;
  --pink-soft: #ffe6ee;
  --cream: #fff6e5;
  --cream-2: #fffaf1;
  --brown: #6b4f3f;
  --brown-soft: #8a6a58;
  --accent: #ff9fb2;
  --accent-2: #ffd166;
  --line: rgba(107, 79, 63, 0.18);
  --shadow: 0 10px 0 #f2d7b6, 0 20px 0 #e6caa6, 0 30px 40px rgba(0, 0, 0, 0.15);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gap-1: clamp(8px, 1.2vw, 12px);
  --gap-2: clamp(10px, 1.6vw, 16px);
  --card-radius: 18px;
  --chat-w: clamp(280px, 34vw, 360px);
  --online-w: clamp(190px, 22vw, 240px);
}

/* =========================
   BREAKPOINTS (SCSS)
========================= */
/* =========================
   BASE
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
  overflow: hidden;
  touch-action: manipulation;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  /* =========================
     LOGIN PAGE
  ========================= */
  /* =========================
     HUB PAGE
  ========================= */
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-size: 24px 24px;
  opacity: 0.35;
  pointer-events: none;
}
body#login {
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  font-family: "Nunito", "Poppins", system-ui, sans-serif;
  color: var(--brown);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 18px) 16px calc(var(--safe-bottom) + 18px);
  background: linear-gradient(180deg, var(--pink-bg), var(--pink-soft));
}
body#login > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
body#login > div .hub-title {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: clamp(18px, 6vh, 40px);
}
body#login > div .hub-title img {
  width: clamp(72px, 14vw, 110px) !important;
  height: auto;
  filter: drop-shadow(0 6px 0 rgba(230, 202, 166, 0.9));
  user-select: none;
  -webkit-user-drag: none;
}
body#login > div .hub-title h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: 1px;
  font-size: clamp(34px, 7vw, 56px);
  line-height: 1.05;
  color: var(--brown);
}
body#login > div .hub-title h1 span {
  color: var(--accent);
}
body#login > div .hub-title p {
  margin: 0;
  font-size: clamp(13px, 2.8vw, 15px);
  color: var(--brown-soft);
  max-width: min(46ch, 92vw);
  line-height: 1.35;
}
body#login > div > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(520px, 100%);
  max-width: 92vw;
  padding: clamp(14px, 3.2vw, 20px) clamp(18px, 4.6vw, 36px) clamp(16px, 3.6vw, 26px);
  background: var(--cream);
  border-radius: 20px;
  text-decoration: none;
  color: var(--brown);
  font-weight: 900;
  font-size: clamp(14px, 3.2vw, 16px);
  box-shadow: var(--shadow);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
body#login > div > a:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 0 #f2d7b6, 0 26px 0 #e6caa6, 0 36px 50px rgba(0, 0, 0, 0.18);
  background: var(--cream-2);
}
body#login > div > a:active {
  transform: translateY(0);
  box-shadow: 0 8px 0 #f2d7b6, 0 16px 0 #e6caa6, 0 24px 35px rgba(0, 0, 0, 0.15);
}
body#login > div > a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 159, 178, 0.35), var(--shadow);
}
body#login > div > a::before {
  content: "G";
  font-size: 18px;
  background: var(--accent);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 0 #e88498;
  flex: 0 0 auto;
}
@media (max-width: 1000px) {
  body#login > div {
    padding: calc(var(--safe-top) + 14px) 14px calc(var(--safe-bottom) + 16px);
  }
  body#login > div .hub-title {
    gap: 8px;
    margin-bottom: clamp(14px, 5vh, 28px);
  }
}
body#hub {
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  font-family: "Nunito", "Poppins", system-ui, sans-serif;
  color: var(--brown);
  overflow: hidden;
  background: #fff;
  /* ===== Shared pill button ===== */
  /* Wrapper pseudo + bouton inventaire */
  /* =========================
     INVENTORY MODAL
  ========================= */
  /* =========================
     ONLINE BOX
  ========================= */
  /* =========================
     TOPBAR (comme avant)
  ========================= */
  /* =========================
     CANVAS
  ========================= */
  /* =========================
     CHAT
  ========================= */
  /* =========================
     Hub responsive (legacy)
  ========================= */
  /* Empêche scroll / gestures quand gated */
}
body#hub .pillBtn, body#hub #shopModal #shopCard #shopHeader #shopCoinsPill, body#hub #shopModal #shopCard #shopHeader #shopClose, body#hub #invModal #invCard #invHeader #invClose {
  color: var(--brown);
  text-decoration: none;
  font-weight: 900;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(107, 79, 63, 0.14);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
body#hub .pillBtn:hover, body#hub #shopModal #shopCard #shopHeader #shopCoinsPill:hover, body#hub #shopModal #shopCard #shopHeader #shopClose:hover, body#hub #invModal #invCard #invHeader #invClose:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(230, 202, 166, 0.95);
  background: var(--cream-2);
}
body#hub .pillBtn:active, body#hub #shopModal #shopCard #shopHeader #shopCoinsPill:active, body#hub #shopModal #shopCard #shopHeader #shopClose:active, body#hub #invModal #invCard #invHeader #invClose:active {
  transform: translateY(0);
  box-shadow: 0 3px 0 rgba(230, 202, 166, 0.95);
}
body#hub .pillBtn:focus-visible, body#hub #shopModal #shopCard #shopHeader #shopCoinsPill:focus-visible, body#hub #shopModal #shopCard #shopHeader #shopClose:focus-visible, body#hub #invModal #invCard #invHeader #invClose:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 159, 178, 0.35), 0 4px 0 rgba(230, 202, 166, 0.95);
}
body#hub #topbar .meHead {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body#hub #invModal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
}
body#hub #invModal.open {
  display: flex;
}
body#hub #invModal #invCard {
  width: min(980px, 100%);
  max-height: min(78svh, 820px);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(107, 79, 63, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  color: var(--brown);
  display: flex;
  flex-direction: column;
}
body#hub #invModal #invCard #invHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--cream), var(--cream-2));
  border-bottom: 1px solid rgba(107, 79, 63, 0.16);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
}
body#hub #invModal #invCard #invHeader h3 {
  margin: 0;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.2px;
}
body#hub #invModal #invCard #invHeader #invClose {
  padding: 7px 10px;
}
body#hub #invModal #invCard #invBody {
  padding: 12px;
  overflow: auto;
}
body#hub #invModal #invCard #invBody #invGridCats, body#hub #invModal #invCard #invBody #invGridUniques {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
body#hub #invModal #invCard #invBody .invItem {
  background: var(--cream-2);
  border: 1px solid rgba(107, 79, 63, 0.14);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.85);
  border-radius: 16px;
  padding: 10px;
  display: grid;
  gap: 8px;
  justify-items: center;
  cursor: pointer;
  /* ===== Shared pill button ===== */
}
body#hub #invModal #invCard #invBody .invItem img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
body#hub #invModal #invCard #invBody .invItem .invName {
  font-weight: 900;
  font-size: 12px;
  text-align: center;
}
body#hub #invModal #invCard #invBody .invItem .invMeta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 900;
  color: rgba(107, 79, 63, 0.75);
  text-align: center;
  white-space: nowrap;
}
body#hub #invModal #invCard #invBody .invItem.locked {
  filter: grayscale(1);
  opacity: 0.45;
}
body#hub #invModal #invCard #invBody .invItem.selected {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.95);
  border-radius: 14px; /* adapte à ton style */
}
body#hub #invModal #invCard #invBody .invBonuses {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
body#hub #invModal #invCard #invBody .bonusChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(107, 79, 63, 0.14);
  box-shadow: 0 2px 0 rgba(230, 202, 166, 0.7);
  font: 800 12px Nunito, Poppins, system-ui, sans-serif;
  color: rgba(107, 79, 63, 0.95);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body#hub #invModal #invCard #invBody .bonusIco {
  width: 16px;
  text-align: center;
  flex: 0 0 auto;
  opacity: 0.95;
}
body#hub #invModal #invCard #invBody .bonusTxt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body#hub #invModal #invCard #invBody .bonusMore {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 159, 178, 0.14);
  border: 1px solid rgba(255, 90, 122, 0.28);
  box-shadow: 0 2px 0 rgba(230, 202, 166, 0.55);
  font: 900 12px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: rgba(107, 79, 63, 0.95);
}
@media (max-width: 520px) {
  body#hub #invModal #invCard #invBody #invGrid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
body#hub #onlineBox {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: fixed;
  top: 74px;
  right: 14px;
  z-index: 9998;
  width: var(--online-w);
  max-height: 34svh;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
  /* allow clicks */
}
body#hub #onlineBox .onlineHeader {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(107, 79, 63, 0.18);
  backdrop-filter: blur(0.5px);
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  color: rgba(107, 79, 63, 0.95);
  width: fit-content;
  margin-left: auto;
}
body#hub #onlineBox #onlineList {
  width: 100%;
}
body#hub #onlineBox #onlineList .onlineRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}
body#hub #onlineBox #onlineList .onlineRow .onlineLeft {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(107, 79, 63, 0.18);
  backdrop-filter: blur(0.5px);
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  color: rgba(107, 79, 63, 0.95);
}
body#hub #onlineBox #onlineList .onlineRow .onlineLeft .onlineName {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body#hub #onlineBox #onlineList .onlineRow .onlineLeft .onlineCoords {
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 800;
  color: rgba(107, 79, 63, 0.75);
  white-space: nowrap;
  opacity: 0.95;
}
body#hub #onlineBox #onlineList .onlineRow .onlineLvl {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 900;
  font-size: 12px;
  color: rgba(107, 79, 63, 0.95);
}
body#hub #onlineBox #onlineList,
body#hub #onlineBox .onlineRow,
body#hub #onlineBox .onlineLeft,
body#hub #onlineBox .onlineName {
  pointer-events: auto;
}
@media (max-width: 1000px) {
  body#hub #onlineBox {
    top: 65px;
    right: 14px;
    width: min(210px, 100vw - 20px);
    transform: scale(0.85);
    transform-origin: right;
  }
  body#hub #onlineBox #onlineList .onlineRow .onlineLeft .onlineName {
    max-width: 135px;
  }
}
body#hub #topbar {
  pointer-events: none;
  position: absolute !important;
  width: 100%;
  top: 0;
  z-index: 10;
  height: auto !important;
  padding: 10px 14px !important;
  border-bottom: 0 !important;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
body#hub #topbar > div {
  pointer-events: auto;
}
body#hub #topbar > div:first-child {
  display: flex;
  align-items: flex-start;
}
@media (max-width: 1000px) {
  body#hub #topbar > div:first-child {
    transform: scale(0.85);
    transform-origin: left;
  }
}
body#hub #topbar > div:first-child > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
body#hub #topbar > div:first-child > div:first-child > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.2;
  position: static !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  color: var(--brown-soft);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(107, 79, 63, 0.14);
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
  white-space: nowrap;
  margin-left: 6px;
}
body#hub #topbar > div:first-child > div:first-child > div strong {
  font-weight: 900;
  font-family: "Nunito", "Poppins", system-ui, sans-serif;
  color: var(--brown);
}
body#hub #topbar > div:first-child > div:first-child > div > div > span {
  padding: 0 1.5px;
}
body#hub #topbar > div:first-child > div:nth-child(2) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.2;
  position: static !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  color: var(--brown-soft);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(107, 79, 63, 0.14);
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
  white-space: nowrap;
  margin-left: 6px;
}
body#hub #topbar > div:first-child > div:nth-child(2) .xpWrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
}
body#hub #topbar > div:first-child > div:nth-child(2) .xpBar {
  width: clamp(120px, 18vw, 136px);
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(107, 79, 63, 0.14);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
  position: relative;
}
body#hub #topbar > div:first-child > div:nth-child(2) .xpBar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
}
body#hub #topbar > div:first-child > div:nth-child(2) .xpBar .xpFill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--accent), rgba(255, 159, 178, 0.75));
  box-shadow: inset 0 -2px 0 rgba(107, 79, 63, 0.1);
  transition: width 140ms ease;
  will-change: width;
}
body#hub #topbar > div:first-child > div:nth-child(2) .xpText {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  color: var(--brown-soft);
  white-space: nowrap;
  text-align: right;
  opacity: 0.95;
}
@media (max-width: 1000px) {
  body#hub #topbar > div:first-child > div:nth-child(2) .xpWrap {
    gap: 8px;
  }
  body#hub #topbar > div:first-child > div:nth-child(2) .xpBar {
    width: clamp(70px, 40vw, 70px);
    height: 11px;
  }
  body#hub #topbar > div:first-child > div:nth-child(2) .xpText {
    font-size: 11px;
    min-width: 70px;
  }
}
body#hub #topbar > div:first-child > div:nth-child(3) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
body#hub #topbar > div:first-child > div:nth-child(3) > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.2;
  position: static !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  color: var(--brown-soft);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(107, 79, 63, 0.14);
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
  white-space: nowrap;
  margin-left: 6px;
}
body#hub #topbar > div:first-child > div:nth-child(3) > div strong {
  font-weight: 900;
  font-family: "Nunito", "Poppins", system-ui, sans-serif;
  color: var(--brown);
}
body#hub #topbar > div:first-child > div:nth-child(3) > div > div > span {
  padding: 0 1.5px;
}
body#hub #topbar > div:nth-child(2) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.2;
}
@media (max-width: 1000px) {
  body#hub #topbar > div:nth-child(2) {
    transform: scale(0.85);
    transform-origin: right;
  }
}
body#hub #topbar > div:nth-child(2) #coords {
  position: static !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  font-size: 13px;
  color: var(--brown-soft);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(107, 79, 63, 0.14);
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
  white-space: nowrap;
  margin-left: 6px;
}
body#hub #topbar > div:nth-child(2) a {
  color: var(--brown);
  text-decoration: none;
  font-weight: 900;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(107, 79, 63, 0.14);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
body#hub #topbar > div:nth-child(2) a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(230, 202, 166, 0.95);
  background: var(--cream-2);
}
body#hub #topbar > div:nth-child(2) a:active {
  transform: translateY(0);
  box-shadow: 0 3px 0 rgba(230, 202, 166, 0.95);
}
body#hub #topbar > div:nth-child(2) a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 159, 178, 0.35), 0 4px 0 rgba(230, 202, 166, 0.95);
}
body#hub #world {
  display: block !important;
  width: 100vw !important;
  width: auto;
  height: auto;
  touch-action: none;
}
body#hub #chatBox {
  position: fixed;
  right: 14px;
  bottom: calc(14px + var(--safe-bottom));
  width: var(--chat-w);
  max-width: calc(100vw - 28px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(107, 79, 63, 0.22);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(0.5px);
  font-family: "Nunito", "Poppins", system-ui, sans-serif;
  color: var(--brown);
  z-index: 9999;
}
body#hub #chatBox::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-size: 18px 18px;
  opacity: 0.25;
  pointer-events: none;
  mix-blend-mode: multiply;
}
body#hub #chatBox #chatHeader {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--cream), var(--cream-2));
  border-bottom: 1px solid rgba(107, 79, 63, 0.16);
  border-top-left-radius: var(--card-radius);
  border-top-right-radius: var(--card-radius);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
}
body#hub #chatBox #chatToggle {
  width: 32px;
  height: 26px;
  border-radius: 12px;
  border: 1px solid rgba(107, 79, 63, 0.18);
  background: #fff;
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
body#hub #chatBox #chatToggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(230, 202, 166, 0.95);
  background: var(--cream-2);
}
body#hub #chatBox #chatToggle:active {
  transform: translateY(0);
  box-shadow: 0 3px 0 rgba(230, 202, 166, 0.95);
}
body#hub #chatBox #chatToggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 159, 178, 0.35), 0 4px 0 rgba(230, 202, 166, 0.95);
}
body#hub #chatBox #chatLog {
  position: relative;
  height: clamp(160px, 22vh, 220px);
  overflow: auto;
  padding: 10px 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  scrollbar-width: thin;
  scrollbar-color: rgba(107, 79, 63, 0.35) transparent;
}
body#hub #chatBox #chatLog::-webkit-scrollbar {
  width: 10px;
}
body#hub #chatBox #chatLog::-webkit-scrollbar-track {
  background: transparent;
}
body#hub #chatBox #chatLog::-webkit-scrollbar-thumb {
  background: rgba(107, 79, 63, 0.28);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
body#hub #chatBox #chatLog::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 79, 63, 0.38);
  border: 3px solid transparent;
  background-clip: content-box;
}
body#hub #chatBox .chatLine {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  margin-bottom: 8px;
  line-height: 1.25;
  align-items: start;
}
body#hub #chatBox .chatLine .chatTime {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  color: var(--brown-soft);
  opacity: 0.85;
  padding-top: 6px;
}
body#hub #chatBox .chatLine .chatMsg {
  display: inline-block;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--cream-2);
  border: 1px solid rgba(107, 79, 63, 0.14);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.85);
  font-size: 12.5px;
  color: var(--brown);
  word-break: break-word;
}
body#hub #chatBox .chatLine.me .chatMsg {
  background: rgba(255, 159, 178, 0.18);
  border-color: rgba(255, 159, 178, 0.35);
}
body#hub #chatBox .chatLine.sys .chatMsg {
  background: rgba(255, 209, 220, 0.35);
  border-color: rgba(107, 79, 63, 0.12);
  opacity: 0.95;
}
body#hub #chatBox #chatForm {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #fff, var(--cream-2));
  border-top: 1px solid rgba(107, 79, 63, 0.16);
  border-bottom-left-radius: var(--card-radius);
  border-bottom-right-radius: var(--card-radius);
}
body#hub #chatBox #chatForm #chatInput {
  flex: 1;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(107, 79, 63, 0.16);
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  color: var(--brown);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.85);
  outline: none;
  transition: box-shadow 140ms ease, transform 140ms ease, border-color 140ms ease;
}
body#hub #chatBox #chatForm #chatInput::placeholder {
  color: rgba(138, 106, 88, 0.75);
}
body#hub #chatBox #chatForm #chatInput:focus {
  border-color: rgba(255, 159, 178, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 159, 178, 0.25), 0 4px 0 rgba(230, 202, 166, 0.9);
}
body#hub #chatBox #chatForm button {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(107, 79, 63, 0.16);
  background: #fff;
  font-weight: 900;
  color: var(--brown);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
  user-select: none;
}
body#hub #chatBox #chatForm button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(230, 202, 166, 0.95);
  background: var(--cream-2);
}
body#hub #chatBox #chatForm button:active {
  transform: translateY(0);
  box-shadow: 0 3px 0 rgba(230, 202, 166, 0.95);
}
body#hub #chatBox #chatForm button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 159, 178, 0.35), 0 4px 0 rgba(230, 202, 166, 0.95);
}
body#hub #chatBox.collapsed #chatLog,
body#hub #chatBox.collapsed #chatForm {
  display: none;
}
@media (max-width: 1000px) {
  body#hub #chatBox {
    right: 14px;
    bottom: calc(10px + var(--safe-bottom));
    width: min(380px, 100vw - 20px);
    transform: scale(0.85);
    transform-origin: bottom right;
  }
  body#hub #chatBox.collapsed {
    width: 114px;
  }
  body#hub #chatBox #chatLog {
    height: 180px;
  }
}
@media (max-width: 520px) {
  body#hub #topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  body#hub #topbar::after {
    position: static;
    transform: none;
    align-self: center;
    margin-top: 2px;
  }
  body#hub #coords {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  body#hub #world {
    width: auto;
    height: auto;
  }
}
body#hub.gated {
  overflow: hidden;
  touch-action: none;
}

/* =========================
   MOBILE GATE
========================= */
#mobileGate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 18px) 18px calc(var(--safe-bottom) + 18px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(2px);
  pointer-events: all;
}
#mobileGate .gateCard {
  width: min(520px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(107, 79, 63, 0.18);
  background: #fff;
  box-shadow: 0 10px 0 rgba(230, 202, 166, 0.9), 0 22px 40px rgba(0, 0, 0, 0.18);
  padding: clamp(14px, 3.5vw, 18px) clamp(12px, 3vw, 14px);
  color: rgba(107, 79, 63, 0.95);
}
#mobileGate h2 {
  margin: 0 0 10px;
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 900;
  line-height: 1.15;
}
#mobileGate p {
  margin: 0 0 12px;
  font-size: clamp(12.5px, 3.2vw, 13.5px);
  line-height: 1.35;
  color: rgba(107, 79, 63, 0.85);
  max-width: 52ch;
}
#mobileGate .gateRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
#mobileGate .gateBtn {
  appearance: none;
  border: 1px solid rgba(107, 79, 63, 0.16);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 44px;
  min-width: 120px;
  font-weight: 900;
  color: rgba(107, 79, 63, 0.95);
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
#mobileGate .gateBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(230, 202, 166, 0.95);
  background: var(--cream-2);
}
#mobileGate .gateBtn:active {
  transform: translateY(1px);
  box-shadow: 0 3px 0 rgba(230, 202, 166, 0.9);
}
#mobileGate .gateBtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 159, 178, 0.35), 0 4px 0 rgba(230, 202, 166, 0.95);
}
@media (max-width: 1000px) {
  #mobileGate {
    padding: 0;
    width: 100vw;
  }
  #mobileGate .gateCard {
    scale: 0.85;
    border-radius: 16px;
  }
  #mobileGate .gateCard > h2 {
    margin-bottom: 18px;
  }
  #mobileGate .gateRow {
    justify-content: center;
  }
  #mobileGate .gateBtn {
    width: min(320px, 100%);
  }
  #mobileGate h2,
  #mobileGate p {
    text-align: center;
  }
}

body#hub #shopModal {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
}
body#hub #shopModal.open {
  display: flex;
}
body#hub #shopModal #shopCard {
  width: min(980px, 100%);
  max-height: min(78svh, 820px);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(107, 79, 63, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  color: var(--brown);
  display: flex;
  flex-direction: column;
}
body#hub #shopModal #shopCard #shopHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--cream), var(--cream-2));
  border-bottom: 1px solid rgba(107, 79, 63, 0.16);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.9);
}
body#hub #shopModal #shopCard #shopHeader h3 {
  margin: 0;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.2px;
}
body#hub #shopModal #shopCard #shopHeader #shopClose {
  padding: 7px 10px;
}
body#hub #shopModal #shopCard #shopHeader #shopCoinsPill {
  padding: 7px 10px;
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.85);
}
body#hub #shopModal #shopCard #shopBody {
  padding: 12px;
  overflow: auto;
}
body#hub #shopModal #shopCard #shopBody #shopGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
body#hub #shopModal #shopCard #shopBody .shopSection {
  background: rgba(255, 250, 241, 0.75);
  border: 1px solid rgba(107, 79, 63, 0.12);
  border-radius: 16px;
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.65);
  padding: 10px;
}
body#hub #shopModal #shopCard #shopBody .shopSection .shopSectionTitle {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.25px;
  color: rgba(107, 79, 63, 0.92);
  margin: 2px 2px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
body#hub #shopModal #shopCard #shopBody .shopSection .shopSectionTitle::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: rgba(255, 159, 178, 0.9);
  box-shadow: 0 3px 0 rgba(230, 202, 166, 0.85);
}
body#hub #shopModal #shopCard #shopBody .shopSection .shopRow {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
body#hub #shopModal #shopCard #shopBody .shopItem {
  background: var(--cream-2);
  border: 1px solid rgba(107, 79, 63, 0.14);
  box-shadow: 0 4px 0 rgba(230, 202, 166, 0.85);
  border-radius: 16px;
  padding: 10px;
  display: grid;
  gap: 8px;
  justify-items: center;
  cursor: pointer;
  user-select: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, filter 120ms ease, opacity 120ms ease;
}
body#hub #shopModal #shopCard #shopBody .shopItem img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 6px 0 rgba(230, 202, 166, 0.75));
}
body#hub #shopModal #shopCard #shopBody .shopItem .shopName {
  font-weight: 900;
  font-size: 12px;
  text-align: center;
}
body#hub #shopModal #shopCard #shopBody .shopItem .shopMeta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 900;
  color: rgba(107, 79, 63, 0.75);
  text-align: center;
  white-space: nowrap;
}
body#hub #shopModal #shopCard #shopBody .shopItem:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(230, 202, 166, 0.95);
  background: var(--cream-2);
}
body#hub #shopModal #shopCard #shopBody .shopItem:active {
  transform: translateY(0);
  box-shadow: 0 3px 0 rgba(230, 202, 166, 0.95);
}
body#hub #shopModal #shopCard #shopBody .shopItem.locked {
  filter: grayscale(1);
  opacity: 0.5;
}
body#hub #shopModal #shopCard #shopBody .shopItem.locked .shopMeta {
  color: rgba(181, 124, 0, 0.9);
}
body#hub #shopModal #shopCard #shopBody .shopItem.selected {
  border-color: rgba(255, 215, 0, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.92), 0 6px 0 rgba(230, 202, 166, 0.95);
}
@media (max-width: 520px) {
  body#hub #shopModal #shopCard #shopBody .shopSection .shopRow {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
body#hub #toastStack {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, 100vw - 24px);
  pointer-events: none;
}
body#hub .toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-10px);
  opacity: 0;
  animation: toastIn 260ms ease-out forwards;
}
body#hub .toast .toastIcon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.04);
  font-size: 18px;
  line-height: 1;
}
body#hub .toast .toastIcon > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
body#hub .toast .toastBody {
  flex: 1 1 auto;
  min-width: 0;
}
body#hub .toast .toastBody .toastTitle {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
  margin-top: 2px;
  color: #2b2b2b;
}
body#hub .toast .toastBody .toastMsg {
  font-weight: 600;
  font-size: 12px;
  margin-top: 3px;
  color: rgba(0, 0, 0, 0.65);
  line-height: 1.2;
  word-break: break-word;
}
body#hub .toast.out {
  animation: toastOut 320ms ease-in forwards;
}
body#hub .toastCapture {
  border-color: rgba(255, 59, 107, 0.2);
}
body#hub .toastNew {
  border-color: rgba(31, 111, 235, 0.2);
}
body#hub .toastLevel {
  border-color: rgba(255, 193, 7, 0.25);
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/*# sourceMappingURL=style.css.map */
