html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Inter, Segoe UI, Arial, Helvetica, sans-serif;
  background: #07120b;
}
html.guide-page-root,
html.site-page-root {
  height: auto;
  overflow: auto;
}
body.guide-page,
body.site-page {
  height: auto;
  min-height: 100vh;
  overflow: auto;
}
canvas { display: block; }
#ui {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: linear-gradient(145deg, rgba(8, 20, 14, 0.82), rgba(20, 34, 24, 0.72));
  color: #f6fff4;
  padding: 14px 16px;
  border: 1px solid rgba(255, 225, 90, 0.22);
  border-radius: 16px;
  max-width: 390px;
  box-shadow: 0 16px 42px rgba(0,0,0,0.34);
  backdrop-filter: blur(10px);
}
#ui h1 {
  margin: 4px 0 8px;
  font-size: 21px;
  letter-spacing: 0.2px;
}
#ui p {
  margin: 5px 0;
  font-size: 13px;
  line-height: 1.38;
  color: rgba(246, 255, 244, 0.86);
}
#status {
  color: #ffe15a !important;
  font-weight: 700;
}
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 225, 90, 0.14);
  color: #ffe15a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

#dashboard {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 3;
  width: 230px;
  padding: 14px;
  color: #f6fff4;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(10, 21, 15, 0.88), rgba(28, 48, 31, 0.78));
  border: 1px solid rgba(255, 225, 90, 0.24);
  box-shadow: 0 18px 46px rgba(0,0,0,0.34);
  backdrop-filter: blur(10px);
}
.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dash-title {
  color: rgba(246,255,244,.7);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .7px;
  font-weight: 800;
}
#editNameBtn {
  cursor: pointer;
  border: 1px solid rgba(255,225,90,.35);
  background: rgba(255,225,90,.13);
  color: #ffe15a;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 800;
}
.player-name {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
}
.currency-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-top: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,.07);
  color: rgba(246,255,244,.9);
}
.currency-row strong { color: #ffe15a; }
#nameTag {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 4;
  pointer-events: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(7, 18, 11, 0.78);
  color: white;
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0,0,0,.9);
  border: 1px solid rgba(255,255,255,.18);
}
#minimapWrap {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  padding: 10px;
  border-radius: 18px;
  background: rgba(8, 20, 14, 0.82);
  border: 1px solid rgba(255, 225, 90, 0.24);
  box-shadow: 0 18px 46px rgba(0,0,0,0.34);
  backdrop-filter: blur(10px);
}
#minimap {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 12px;
  cursor: grab;
  border: 1px solid rgba(255,255,255,.16);
}
#minimap:active { cursor: grabbing; }
.miniHelp {
  margin-top: 7px;
  color: rgba(246,255,244,.72);
  text-align: center;
  font-size: 11px;
}

#interactionPanel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  width: 230px;
  padding: 14px;
  color: #f6fff4;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(10, 21, 15, 0.9), rgba(28, 48, 31, 0.8));
  border: 1px solid rgba(255, 225, 90, 0.24);
  box-shadow: 0 18px 46px rgba(0,0,0,0.34);
  backdrop-filter: blur(10px);
}
#tileDetails p { margin: 0 0 10px; color: rgba(246,255,244,.74); font-size: 13px; }
.tile-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
}
.tile-line span { color: rgba(246,255,244,.68); }
.tile-line strong { color: #ffe15a; }
.tile-note {
  margin: 10px 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: rgba(246,255,244,.78);
  font-size: 12px;
  line-height: 1.35;
}

.color-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 10px 0 4px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
}
.color-choice {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 24px;
  border-radius: 9px;
  cursor: pointer;
  background: var(--swatch);
  border: 2px solid rgba(255,255,255,.22);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
.color-choice.active {
  border-color: #ffe15a;
  box-shadow: 0 0 0 2px rgba(255,225,90,.22), inset 0 0 0 1px rgba(0,0,0,.2);
}
.color-label {
  margin-top: 10px;
  color: rgba(246,255,244,.68);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .55px;
}

#buyTileBtn, #colorTileBtn {
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
  border: 1px solid rgba(255,225,90,.35);
  background: rgba(255,225,90,.14);
  color: #ffe15a;
  border-radius: 12px;
  padding: 9px 10px;
  font-weight: 900;
}
#buyTileBtn:disabled, #colorTileBtn:disabled {
  cursor: not-allowed;
  color: rgba(246,255,244,.42);
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}

.casino-panel {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.casino-title {
  color: #ffe15a;
  font-weight: 900;
  margin-bottom: 10px;
}
.casino-game {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  align-items: center;
}
.casino-game label {
  color: rgba(246,255,244,.72);
  font-size: 12px;
  font-weight: 800;
}
.casino-game select,
.casino-game input {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #f6fff4;
  padding: 7px 8px;
  font-weight: 800;
}
#rollDiceBtn,
#spinWheelBtn {
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
  border: 1px solid rgba(255,225,90,.35);
  background: rgba(255,225,90,.14);
  color: #ffe15a;
  border-radius: 12px;
  padding: 9px 10px;
  font-weight: 900;
}
#rollDiceBtn { grid-column: 1 / -1; }
#spinWheelBtn:disabled {
  cursor: not-allowed;
  color: rgba(246,255,244,.42);
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}
.casino-result {
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: rgba(246,255,244,.78);
  font-size: 12px;
  line-height: 1.35;
}

.casino-game-block { display: none; }
#blackjackGame input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #f6fff4;
  padding: 7px 8px;
  font-weight: 800;
}
.full-label {
  display: block;
  margin-bottom: 6px;
  color: rgba(246,255,244,.72);
  font-size: 12px;
  font-weight: 800;
}
#playBlackjackBtn {
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
  border: 1px solid rgba(255,225,90,.35);
  background: rgba(255,225,90,.14);
  color: #ffe15a;
  border-radius: 12px;
  padding: 9px 10px;
  font-weight: 900;
}

.inventory-title {
  margin-top: 12px;
  color: rgba(246,255,244,.68);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .55px;
}
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.inv-slot {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  color: rgba(246,255,244,.78);
  cursor: default;
  padding: 4px;
  box-sizing: border-box;
}
.inv-slot.tool { cursor: pointer; }
.inv-slot.equipped { border-color: #ffe15a; box-shadow: 0 0 0 2px rgba(255,225,90,.18); color: #ffe15a; }
.dice-anim, .wheel-anim {
  margin-top: 8px;
  min-height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  font-size: 28px;
  grid-column: 1 / -1;
}
.dice-anim.rolling { animation: diceShake .55s linear 3; }
.wheel-anim.spinning { animation: wheelSpin 1.35s cubic-bezier(.16,.84,.3,1); }
@keyframes diceShake {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(18deg) scale(1.12); }
  50% { transform: rotate(-22deg) scale(.95); }
  75% { transform: rotate(15deg) scale(1.08); }
  100% { transform: rotate(0deg) scale(1); }
}
@keyframes wheelSpin {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(1440deg) scale(1.15); }
}
.blackjack-cards {
  padding: 8px 10px;
  margin: 8px 0;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: rgba(246,255,244,.82);
  font-size: 12px;
  line-height: 1.35;
}
.blackjack-buttons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.blackjack-buttons button, .action-btn {
  cursor: pointer;
  border: 1px solid rgba(255,225,90,.35);
  background: rgba(255,225,90,.14);
  color: #ffe15a;
  border-radius: 12px;
  padding: 8px 8px;
  font-weight: 900;
}
.blackjack-buttons button:disabled, .action-btn:disabled {
  cursor: not-allowed;
  color: rgba(246,255,244,.42);
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}
.action-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }

.event-log {
  position: fixed;
  top: 185px;
  left: 16px;
  z-index: 3;
  width: 390px;
  max-height: 150px;
  overflow: hidden;
  padding: 10px 12px;
  color: rgba(246,255,244,.86);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(8, 20, 14, 0.76), rgba(20, 34, 24, 0.64));
  border: 1px solid rgba(255, 225, 90, 0.18);
  box-shadow: 0 12px 34px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.log-line {
  font-size: 12px;
  line-height: 1.35;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.inv-slot.empty {
  opacity: .5;
}

#loginOverlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(255, 207, 63, .2), transparent 28%), rgba(5, 12, 8, .82);
  backdrop-filter: blur(8px);
}
.login-card {
  width: min(420px, calc(100vw - 36px));
  padding: 24px;
  border-radius: 22px;
  background: rgba(17, 28, 20, .94);
  border: 1px solid rgba(255, 207, 63, .35);
  color: #f5f3df;
  box-shadow: 0 20px 70px rgba(0,0,0,.4);
  text-align: center;
}
.login-card h2 { margin: 8px 0 8px; font-size: 30px; }
.login-card p { margin: 0 0 18px; color: rgba(245,243,223,.75); line-height: 1.45; }
.login-badge { display:inline-block; padding: 5px 10px; border-radius: 99px; background: rgba(255,207,63,.14); color:#ffdb60; font-size: 12px; font-weight: 800; }
#loginNameInput {
  width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); color: #fff;
  font-size: 16px; outline: none; margin-bottom: 12px;
}
#loginBtn {
  width: 100%; padding: 13px 14px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #ffe067, #ffb72f); color: #1e1505; font-weight: 900; font-size: 15px;
}
#loginBtn:disabled { opacity: .55; cursor: not-allowed; }
.secondary-login {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff9c7;
  font-weight: 900;
  font-size: 14px;
}
#loginStatus { margin-top: 12px; font-size: 13px; color: rgba(245,243,223,.68); }
.remote-name-tag {
  position: fixed;
  left: 0; top: 0;
  z-index: 15;
  pointer-events: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(20, 26, 20, .8);
  color: #dfffe1;
  border: 1px solid rgba(255,255,255,.15);
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 2px #000;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 91, 132, .12), transparent 22%, transparent 74%, rgba(58, 210, 255, .14)),
    linear-gradient(180deg, rgba(255, 225, 90, .12), transparent 34%, rgba(42, 255, 155, .08));
  mix-blend-mode: screen;
}

#ui,
#dashboard,
#interactionPanel,
#minimapWrap,
#economyDock,
.event-log {
  border-color: rgba(255, 225, 90, .34);
}

#ui {
  background:
    linear-gradient(145deg, rgba(12, 32, 24, .9), rgba(32, 55, 38, .75)),
    linear-gradient(90deg, rgba(255, 91, 132, .16), rgba(58, 210, 255, .12));
}

#dashboard {
  background:
    linear-gradient(145deg, rgba(16, 28, 24, .94), rgba(40, 64, 38, .78)),
    linear-gradient(120deg, rgba(255, 207, 63, .12), rgba(100, 108, 255, .14));
}

#interactionPanel {
  background:
    linear-gradient(145deg, rgba(13, 28, 26, .94), rgba(32, 50, 42, .82)),
    linear-gradient(120deg, rgba(255, 124, 64, .12), rgba(72, 185, 245, .14));
}

.currency-row,
.tile-note,
.blackjack-cards,
.casino-result,
.inv-slot {
  background: rgba(255, 255, 255, .095);
}

.login-card {
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 225, 90, .22), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(72, 185, 245, .2), transparent 28%),
    rgba(17, 28, 20, .96);
}

.login-card h2 {
  letter-spacing: 0;
}

#loginEmailInput,
#loginPasswordInput,
#verificationCodeInput {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 16px;
  outline: none;
  margin-bottom: 12px;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
}

.step-dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(245, 243, 223, .66);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 12px;
  font-weight: 900;
}

.step-dot.active,
.step-dot.done {
  color: #1e1505;
  background: linear-gradient(135deg, #ffe067, #ff8c42);
  border-color: rgba(255, 255, 255, .24);
}

.step-line {
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .15);
}

.onboarding-step {
  display: none;
}

.onboarding-step.active {
  display: block;
}

#verifyEmailBtn,
#confirmVerificationBtn,
#generateWalletBtn {
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(135deg, #48b9f5, #7be36d);
  color: #07120b;
  font-weight: 900;
  font-size: 15px;
}

.verification-code {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 225, 90, .13);
  border: 1px solid rgba(255, 225, 90, .28);
  color: #ffe15a;
  font-weight: 900;
}

.wallet-preview {
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.13);
  text-align: left;
}

.wallet-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(245,243,223,.7);
}

.wallet-row strong,
.wallet-label {
  color: #ffe15a;
}

.wallet-label {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.secret-key {
  overflow-wrap: anywhere;
  margin-top: 7px;
  padding: 9px;
  border-radius: 10px;
  color: #dfffe1;
  background: rgba(0,0,0,.26);
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
}

.secret-key.muted,
.wallet-empty {
  color: rgba(245,243,223,.58);
}

.wallet-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  color: rgba(245,243,223,.8);
  font-size: 13px;
  font-weight: 800;
}

#economyDock {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 18px;
  box-sizing: border-box;
  color: #f6fff4;
  pointer-events: none;
}

#economyDock::before,
.dock-backdrop {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 7, .58);
  backdrop-filter: blur(8px);
}

.game-modal-shell {
  position: relative;
  pointer-events: auto;
  width: min(840px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 116px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid rgba(255, 225, 90, .38);
  box-shadow: 0 26px 80px rgba(0,0,0,.48), inset 0 0 0 1px rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255, 225, 90, .16), transparent 22%),
    linear-gradient(145deg, rgba(13, 34, 29, .98), rgba(28, 43, 48, .96));
}

.dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 12px;
  background:
    linear-gradient(135deg, rgba(255, 207, 63, .16), rgba(72, 185, 245, .08)),
    rgba(6, 20, 16, .56);
}

.dock-header strong {
  display: block;
  color: #fff9c7;
  font-size: 24px;
  line-height: 1;
}

.modal-kicker {
  display: block;
  margin-bottom: 5px;
  color: #7be36d;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .7px;
}

#economyDock.open {
  display: grid;
}

#dockCloseBtn {
  cursor: pointer;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.18);
  color: #fff9c7;
  background: rgba(0,0,0,.22);
  border-radius: 12px;
  font-weight: 950;
  font-size: 16px;
}

.dock-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  padding: 0 16px 12px;
  background: rgba(6, 20, 16, .56);
}

.dock-tab {
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: rgba(246,255,244,.76);
  border-radius: 16px;
  min-height: 46px;
  padding: 7px 6px;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}

.dock-tab i {
  display: block;
  width: 26px;
  height: 22px;
  margin: 0 auto 3px;
  border-radius: 8px;
  background: rgba(0,0,0,.22);
  color: #fff9c7;
  font-size: 9px;
  font-style: normal;
  line-height: 22px;
}

.dock-tab span {
  display: block;
}

.dock-tab.active {
  color: #1e1505;
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(135deg, #fff08a, #ffbd42);
  transform: translateY(-1px);
}

.dock-tab.active i {
  color: #1e1505;
  background: rgba(255,255,255,.46);
}

.dock-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent),
    rgba(7, 18, 18, .58);
}

.dock-content.inventory-view,
.dock-content.missions-view,
.dock-content.wallet-view,
.dock-content.market-view {
  grid-template-columns: 1fr;
}

.game-panel-topline {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.1);
}

.game-panel-topline strong { color: #fff9c7; }
.game-panel-topline span { color: rgba(246,255,244,.68); font-size: 12px; font-weight: 800; }

.banana-pill {
  white-space: nowrap;
  justify-self: end;
  padding: 8px 10px;
  border-radius: 999px;
  color: #1e1505 !important;
  background: linear-gradient(135deg, #fff08a, #ffbd42);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.16);
}

.shop-hero {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 86px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,225,90,.28);
  background:
    linear-gradient(135deg, rgba(255, 225, 90, .24), rgba(123, 227, 109, .1)),
    rgba(0,0,0,.18);
}

.shop-hero strong {
  display: block;
  color: #fff9c7;
  font-size: 18px;
}

.shop-hero span {
  display: block;
  margin-top: 5px;
  max-width: 520px;
  color: rgba(246,255,244,.72);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.shop-hero button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid rgba(255,225,90,.38);
  border-radius: 14px;
  color: #1e1505;
  background: linear-gradient(135deg, #fff08a, #ffbd42);
  font-weight: 950;
}

.shop-card,
.market-card {
  position: relative;
  min-height: 160px;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05)),
    rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.16);
}

.shop-card em,
.market-card em {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 7px;
  border-radius: 999px;
  color: rgba(246,255,244,.78);
  background: rgba(0,0,0,.22);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.shop-card strong,
.market-card strong {
  display: block;
  color: #fff9c7;
  font-size: 16px;
}

.shop-icon,
.market-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 16px;
  color: #07120b;
  background: linear-gradient(135deg, #ffe067, #7be36d);
  font-weight: 950;
  font-size: 22px;
}

.shop-card span,
.market-card span {
  display: block;
  margin-top: 4px;
  color: rgba(246,255,244,.68);
  font-size: 12px;
  font-weight: 850;
}

.shop-card p,
.market-card p {
  margin: 8px 0 14px;
  color: rgba(246,255,244,.66);
  font-size: 12px;
  line-height: 1.35;
}

.shop-card button,
.market-card button,
.mission-node button {
  min-height: 38px;
  cursor: pointer;
  border: 1px solid rgba(255,225,90,.38);
  background: linear-gradient(135deg, rgba(255,240,138,.22), rgba(255,140,66,.16));
  color: #ffe15a;
  border-radius: 13px;
  padding: 8px 10px;
  font-weight: 950;
}

.market-toolbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, max-content) minmax(160px, 1fr);
  gap: 8px;
}

.market-toolbar button,
.market-toolbar input {
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(246,255,244,.82);
  background: rgba(255,255,255,.08);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.market-toolbar button {
  cursor: pointer;
  padding: 0 13px;
}

.market-toolbar button.active {
  color: #07120b;
  background: linear-gradient(135deg, #ffe067, #7be36d);
}

.market-toolbar input {
  min-width: 0;
  padding: 0 13px;
  outline: none;
}

.market-layout {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 142px minmax(0, 1fr) 190px;
  gap: 12px;
}

.market-categories {
  display: grid;
  align-content: start;
  gap: 8px;
}

.market-categories button {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: rgba(246,255,244,.82);
  font-weight: 900;
}

.market-categories button:first-child {
  color: #07120b;
  background: linear-gradient(135deg, #ffe067, #7be36d);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.market-card {
  min-height: 188px;
}

.market-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.market-card-actions button:nth-child(2) {
  color: rgba(246,255,244,.7);
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
}

.market-sell-panel {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 13px;
  border-radius: 18px;
  border: 1px solid rgba(123, 227, 109, .22);
  background:
    linear-gradient(180deg, rgba(123, 227, 109, .12), rgba(255,255,255,.04)),
    rgba(255,255,255,.06);
}

.market-sell-panel strong {
  color: #fff9c7;
}

.market-sell-panel span {
  color: rgba(246,255,244,.66);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.market-sell-panel button {
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(246,255,244,.58);
  background: rgba(255,255,255,.06);
  font-weight: 950;
}

.inventory-window-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.inventory-window-slot {
  min-height: 96px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
}

.inventory-window-slot strong {
  display: block;
  color: #fff9c7;
  font-size: 13px;
}

.inventory-window-slot span,
.mission-reward,
.item-help {
  display: block;
  margin-top: 5px;
  color: rgba(246,255,244,.68);
  font-size: 11px;
  line-height: 1.35;
}

.mission-tree {
  display: grid;
  gap: 10px;
}

.mission-node {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.08);
}

.mission-node strong { color: #fff9c7; }
.mission-node em {
  color: #07120b;
  background: #ffe15a;
  border-radius: 999px;
  padding: 6px 9px;
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
}

.dock-item,
.wallet-card {
  min-height: 72px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}

.dock-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.dock-item strong,
.wallet-card strong {
  display: block;
  color: #fff9c7;
  font-size: 13px;
}

.dock-item span,
.wallet-card span {
  display: block;
  margin-top: 3px;
  color: rgba(246,255,244,.66);
  font-size: 11px;
  font-weight: 800;
}

.dock-item p,
.wallet-card p {
  margin: 6px 0 0;
  color: rgba(246,255,244,.58);
  font-size: 11px;
  line-height: 1.25;
}

.dock-item button {
  align-self: center;
  flex: 0 0 auto;
  cursor: pointer;
  border: 1px solid rgba(255,225,90,.35);
  background: rgba(255,225,90,.14);
  color: #ffe15a;
  border-radius: 11px;
  padding: 8px 9px;
  font-weight: 900;
  font-size: 11px;
}

.dock-item button:disabled {
  cursor: default;
  color: rgba(246,255,244,.54);
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
}

.dock-item em {
  align-self: center;
  color: #7be36d;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.rarity-legendary {
  border-color: rgba(255, 91, 132, .42);
  background: linear-gradient(145deg, rgba(255, 91, 132, .18), rgba(255,255,255,.08));
}

.rarity-rare {
  border-color: rgba(160, 108, 255, .42);
  background: linear-gradient(145deg, rgba(160, 108, 255, .18), rgba(255,255,255,.08));
}

.rarity-uncommon {
  border-color: rgba(72, 185, 245, .42);
  background: linear-gradient(145deg, rgba(72, 185, 245, .18), rgba(255,255,255,.08));
}

#gameMenuBar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 5;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  gap: 7px;
  width: min(590px, calc(100vw - 28px));
  padding: 7px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
    rgba(8, 20, 14, .88);
  border: 2px solid rgba(255, 225, 90, .32);
  box-shadow: 0 18px 46px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
}

#gameMenuBar button,
#gameMenuBar a {
  min-height: 58px;
  display: grid;
  grid-template-rows: 26px auto auto;
  place-items: center;
  cursor: pointer;
  border-radius: 17px;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(246,255,244,.86);
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04)),
    rgba(255,255,255,.06);
  text-decoration: none;
  font: inherit;
  font-size: 11px;
  font-weight: 950;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18);
}

#gameMenuBar i {
  width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #07120b;
  background: linear-gradient(135deg, #ffe067, #7be36d);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
}

#gameMenuBar b {
  color: #fff9c7;
  font-size: 13px;
}

#gameMenuBar span {
  color: rgba(246,255,244,.62);
  font-size: 10px;
}

#gameMenuBar button.active,
#gameMenuBar a:hover {
  color: #07120b;
  background: linear-gradient(135deg, #fff08a, #ffbd42);
  transform: translateY(-2px);
}

#gameMenuBar button.active b,
#gameMenuBar button.active span,
#gameMenuBar button.active i {
  color: #07120b;
}

#gameMenuBar button.active i {
  background: rgba(255,255,255,.42);
}

.mission-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mission-mini {
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.08);
}

.mission-mini strong {
  display: block;
  color: #fff9c7;
  font-size: 13px;
}

.mission-mini span {
  display: block;
  margin-top: 5px;
  color: #7be36d;
  font-size: 11px;
  font-weight: 900;
}

.mission-mini p {
  margin: 6px 0 0;
  color: rgba(246,255,244,.64);
  font-size: 11px;
  line-height: 1.3;
}

@media (max-width: 980px) {
  #economyDock {
    align-items: end;
    padding: 12px 10px 88px;
  }

  .game-modal-shell {
    width: min(560px, calc(100vw - 20px));
    max-height: min(76vh, 720px);
    border-radius: 22px;
  }

  .inventory-window-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mission-node {
    grid-template-columns: 1fr;
  }

  .market-layout {
    grid-template-columns: 1fr;
  }

  .market-categories {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .market-grid {
    grid-template-columns: 1fr;
  }

  .market-toolbar {
    grid-template-columns: repeat(3, 1fr);
  }

  .market-toolbar input {
    grid-column: 1 / -1;
  }

  .shop-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .mission-list {
    grid-template-columns: 1fr;
  }

  #dashboard,
  #interactionPanel {
    display: none;
  }

  #minimapWrap {
    bottom: 92px;
  }

  #gameMenuBar {
    bottom: 10px;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    width: calc(100vw - 16px);
  }

  #gameMenuBar button {
    min-height: 54px;
    border-radius: 15px;
  }

  #gameMenuBar i {
    width: 26px;
    height: 23px;
    border-radius: 8px;
    font-size: 9px;
  }

  #gameMenuBar b {
    font-size: 11px;
  }

  #gameMenuBar span {
    font-size: 9px;
  }
}

.guide-link {
  float: right;
  margin-left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,225,90,.35);
  background: rgba(255,225,90,.13);
  color: #ffe15a;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
}

.site-page {
  color: #f6fff4;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 225, 90, .24), transparent 26%),
    radial-gradient(circle at 84% 4%, rgba(72, 185, 245, .2), transparent 24%),
    linear-gradient(160deg, #07120b 0%, #123520 44%, #111a26 100%);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: rgba(7,18,11,.72);
  border-bottom: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(14px);
}

.site-nav a {
  color: #fff9c7;
  text-decoration: none;
  font-weight: 950;
}

.site-nav div {
  display: flex;
  gap: 10px;
}

.site-nav div a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.site-logo {
  font-size: 18px;
}

.site-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 36px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 22px;
  box-sizing: border-box;
}

.site-hero h1 {
  margin: 18px 0 14px;
  color: #fff9c7;
  font-size: clamp(52px, 8vw, 104px);
  line-height: .9;
  letter-spacing: 0;
  text-shadow: 0 18px 48px rgba(0,0,0,.38);
}

.site-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(246,255,244,.82);
  font-size: 20px;
  line-height: 1.45;
}

.site-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 950;
}

.primary-action {
  color: #07120b;
  background: linear-gradient(135deg, #ffe067, #ff8c42);
}

.secondary-action {
  color: #fff9c7;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}

.site-world-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
  backdrop-filter: blur(12px);
}

.mini-world {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  aspect-ratio: 1.25 / 1;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(72,185,245,.18), transparent), #102016;
  transform: rotateX(52deg) rotateZ(45deg);
  transform-origin: center;
}

.mini-world span {
  border-radius: 8px;
  background: #42bd56;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.mini-world span:nth-child(3n) { background: #ffcf3f; }
.mini-world span:nth-child(4n) { background: #2ea7e0; }
.mini-world span:nth-child(5n) { background: #8f9691; }

.world-card-caption {
  margin-top: 28px;
}

.world-card-caption strong {
  color: #ffe15a;
  font-size: 20px;
}

.world-card-caption p {
  margin: 8px 0 0;
  color: rgba(246,255,244,.72);
  line-height: 1.45;
}

.site-section {
  max-width: 1120px;
  margin: 0 auto 24px;
  padding: 24px 22px;
}

.main-loop {
  grid-template-columns: repeat(3, 1fr);
}

.guide-page {
  min-height: 100%;
  height: auto;
  overflow: auto;
  color: #f6fff4;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 225, 90, .22), transparent 30%),
    radial-gradient(circle at 82% 4%, rgba(72, 185, 245, .2), transparent 26%),
    linear-gradient(160deg, #07120b 0%, #123520 44%, #111a26 100%);
}

.guide-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), transparent);
}

.guide-hero,
.guide-main {
  position: relative;
  z-index: 1;
}

.guide-hero {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  box-sizing: border-box;
}

.guide-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.guide-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #fff7c0;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}

.guide-hero-inner {
  max-width: 980px;
  margin: 54px auto 0;
  width: 100%;
}

.guide-kicker {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 999px;
  color: #07120b;
  background: linear-gradient(135deg, #ffe067, #7be36d);
  font-weight: 950;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .6px;
}

.guide-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(56px, 10vw, 122px);
  line-height: .86;
  letter-spacing: 0;
  color: #fff9c7;
  text-shadow: 0 16px 40px rgba(0,0,0,.4);
}

.guide-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(246,255,244,.86);
  font-size: 20px;
  line-height: 1.45;
}

.guide-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 34px;
}

.guide-quick-grid div,
.guide-section,
.mission-card,
.story-node,
.ownership-panel > div,
.loop-strip div,
.rules-list p {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 44px rgba(0,0,0,.24);
  backdrop-filter: blur(12px);
}

.guide-quick-grid div {
  min-height: 94px;
  padding: 16px;
  border-radius: 18px;
}

.guide-quick-grid strong {
  display: block;
  color: #ffe15a;
  font-size: 22px;
}

.guide-quick-grid span {
  display: block;
  margin-top: 8px;
  color: rgba(246,255,244,.74);
  line-height: 1.35;
}

.guide-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 22px 80px;
}

.guide-section {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.section-heading span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #07120b;
  background: linear-gradient(135deg, #ffe067, #ff8c42);
  font-weight: 950;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: 0;
}

.guide-columns,
.ownership-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.guide-columns article,
.ownership-panel > div {
  padding: 16px;
  border-radius: 16px;
}

.guide-columns h3,
.ownership-panel h3,
.mission-card h3 {
  margin: 0 0 8px;
  color: #fff9c7;
  font-size: 20px;
}

.guide-columns p,
.ownership-panel p,
.mission-card p,
.rules-list p {
  margin: 0;
  color: rgba(246,255,244,.76);
  line-height: 1.55;
}

.loop-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.loop-strip div {
  min-height: 118px;
  padding: 14px;
  border-radius: 16px;
}

.loop-strip b {
  display: block;
  color: #7be36d;
  font-size: 18px;
}

.loop-strip p {
  margin: 8px 0 0;
  color: rgba(246,255,244,.72);
  line-height: 1.35;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.mission-card {
  padding: 16px;
  border-radius: 18px;
}

.mission-card span {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #07120b;
  background: #ffe15a;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.mission-card ol {
  margin: 14px 0 0;
  padding-left: 20px;
  color: rgba(246,255,244,.82);
  line-height: 1.5;
}

.story-tree {
  display: grid;
  gap: 16px;
}

.story-node {
  padding: 16px;
  border-radius: 18px;
  border-color: rgba(255,225,90,.22);
}

.story-node.root {
  background: linear-gradient(135deg, rgba(255, 225, 90, .2), rgba(72, 185, 245, .12));
}

.story-node.final {
  border-color: rgba(123, 227, 109, .38);
  background: linear-gradient(135deg, rgba(123, 227, 109, .16), rgba(255,255,255,.08));
}

.story-node b {
  display: block;
  color: #fff9c7;
  font-size: 18px;
}

.story-node p {
  margin: 8px 0 0;
  color: rgba(246,255,244,.74);
  line-height: 1.45;
}

.story-branches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.story-path {
  display: grid;
  gap: 12px;
}

.rules-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rules-list p {
  padding: 16px;
  border-radius: 16px;
}

.rules-list strong {
  color: #ffe15a;
}

@media (max-width: 900px) {
  .guide-quick-grid,
  .guide-columns,
  .ownership-panel,
  .loop-strip,
  .mission-grid,
  .story-branches,
  .rules-list {
    grid-template-columns: 1fr;
  }

  .guide-nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .site-hero,
  .main-loop {
    grid-template-columns: 1fr;
  }

  .site-world-card {
    max-width: 520px;
  }

  .site-actions {
    flex-wrap: wrap;
  }
}
