/* CoreCraftia UI override layer.
   Loaded after style.css to neutralize duplicate HUD/shop/inventory rules. */

:root{
  --cc-navy: #06172b;
  --cc-panel: #0b2a4d;
  --cc-cyan: #22c7ff;
  --cc-blue: #49a8ff;
  --cc-text: #f4fbff;
  --cc-success: #18e06f;
  --cc-danger: #ff4d5a;
  --cc-border: rgba(115, 219, 255, 0.34);
  --cc-border-strong: rgba(34, 199, 255, 0.78);
  --cc-shadow: 0 18px 36px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255,255,255,0.12);
  --cc-radius: 18px;
  --cc-gap: 10px;
}

/* Final viewport sync overrides */
#auth,
#lobby,
#game-container,
#hud,
#blast-overlay,
#worldchanger-overlay,
#namechanger-overlay,
#quests-overlay,
#skills-overlay,
#menu-overlay,
#blast-success,
#blast-modal,
#worldchanger-modal,
#namechanger-modal,
#megaphone-modal,
#grant-modal,
#craft-modal,
#door-modal,
#lock-modal,
#world-key-modal,
#world-key-info-modal,
#region-lock-modal,
#news-modal,
#friends-modal,
#trade-modal,
#trade-qty-overlay,
#trade-final-overlay,
#drop-modal,
#info-modal,
#player-info-modal,
#gift-overlay,
#wheel-overlay{
  width: var(--app-vw, 100vw) !important;
  height: var(--app-vh, 100dvh) !important;
  max-height: var(--app-vh, 100dvh) !important;
}

#auth .auth-shell,
#lobby .lobby-card{
  max-height: calc(var(--app-height, 100dvh) - 24px) !important;
}

#lobby .lobby-card{
  height: var(--app-vh, 100dvh) !important;
  min-height: var(--app-vh, 100dvh) !important;
}

#settings-modal .settings-card,
#news-modal .news-card,
#friends-modal .friends-card,
#player-info-modal .player-info-card,
#shop-modal .shop-shell,
#trade-modal .trade-modal-box,
#drop-modal .legacy-inventory-modal,
#info-modal #info-content,
#grant-modal .grant-box,
#craft-modal .craft-layout,
.mini-reward-modal,
.blast-modal .blast-box,
.door-modal-box,
.lock-modal,
.world-key-modal .modal-content{
  height: auto !important;
  max-height: calc(var(--app-height, 100dvh) - 24px) !important;
}

/* Compact game HUD for short landscape phone viewports. */
@media (max-width: 1020px) and (max-height: 560px) and (orientation: landscape){
  #chat-container{
    top: max(8px, env(safe-area-inset-top)) !important;
    left: max(8px, env(safe-area-inset-left)) !important;
    right: auto !important;
    width: min(34vw, 290px) !important;
    min-height: 112px !important;
    max-height: calc(100dvh - 16px) !important;
    padding: 4px !important;
    gap: 6px !important;
  }

  #chat-container.chat-compact{
    width: min(30vw, 250px) !important;
    min-height: 96px !important;
    max-height: 132px !important;
  }

  #chat-box{
    min-height: 72px !important;
    padding: 8px 10px !important;
    font-size: 10px !important;
  }

  #chat-box > div,
  #chat-box .chat-system-alpha{
    font-size: 10px !important;
  }

  #chat-input-bar{
    gap: 6px !important;
  }

  #chat-input,
  #player-info-content input[type="text"],
  #player-info-content input[type="number"],
  #trade-chat-input,
  #clear-chat-button{
    height: 34px !important;
  }

  #clear-chat-button{
    min-width: 62px !important;
  }

  #chat-toggle-button{
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
  }

  #hud-actions{
    top: auto !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + 8px) !important;
    left: auto !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 6px !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
  }

  #hud-actions .hud-actions-group{
    gap: 6px !important;
  }

  #hud-actions .hud-actions-group-main > *,
  #hud-actions .hud-actions-group-wallet > *{
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  #coin-display{
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  #quests-button-hud,
  #friends-button,
  #inventory-button-hud,
  #shop-button-hud{
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  #mini-map-stack{
    top: max(8px, env(safe-area-inset-top)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    width: min(160px, 22vw) !important;
    gap: 6px !important;
  }

  #mini-map-panel{
    padding: 8px !important;
  }

  .mini-map-head{
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .mini-map-view{
    height: 98px !important;
  }

  #fps-badge{
    margin-top: 6px !important;
    padding: 6px 8px !important;
    font-size: 10px !important;
  }

  #inventory-toolbar{
    left: max(8px, env(safe-area-inset-left)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 8px) !important;
    padding: 8px 10px !important;
    gap: 8px !important;
    max-height: min(22vh, 180px) !important;
  }

  .inv-actions{
    gap: 6px !important;
    max-width: min(100%, 440px) !important;
  }

  .inv-actions > *{
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
  }

  .inv-actions .inv-handle,
  .inv-actions .inv-resize{
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
  }

  #gameplay-quick-panel{
    width: min(72vw, 520px) !important;
    max-width: 520px !important;
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 8px) !important;
    padding: 8px !important;
  }

  #gameplay-history{
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .gameplay-hotbar-slot-icon-wrap{
    width: 46px !important;
    height: 46px !important;
  }

  .gameplay-hotbar-slot-empty{
    width: 40px !important;
    height: 40px !important;
  }

  #touch-left,
  #touch-right{
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 8px) !important;
    gap: 8px !important;
  }

  #touch-zoom{
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 78px) !important;
    gap: 8px !important;
  }

  #touch-left button,
  #touch-right button{
    width: calc(var(--game-btn-size, 84px) * 0.82) !important;
    height: calc(var(--game-btn-size, 84px) * 0.82) !important;
  }

  #touch-zoom button{
    width: calc(var(--game-btn-size, 84px) * 0.72) !important;
    height: calc(var(--game-btn-size, 84px) * 0.72) !important;
  }

  #mini-profile-stack{
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + 8px) !important;
  }
}

body.in-game #hud,
body.in-game #mini-map-panel,
body.in-game #fps-badge,
body.in-game #settings-modal,
body.in-game #news-modal,
body.in-game #friends-modal,
body.in-game #player-info-modal,
body.in-game #shop-modal,
body.in-game #trade-modal,
body.in-game #trade-qty-overlay,
body.in-game #trade-final-overlay,
body.in-game #drop-modal,
body.in-game #info-modal,
body.in-game #grant-modal,
body.in-game #craft-modal,
body.in-game #door-modal,
body.in-game #lock-modal,
body.in-game #world-key-modal,
body.in-game #region-lock-modal,
body.in-game #megaphone-modal,
body.in-game #quests-overlay,
body.in-game #skills-overlay,
body.in-game #worldchanger-modal,
body.in-game #namechanger-modal{
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  filter: none !important;
}

body.in-game #hud *,
body.in-game #mini-map-panel *,
body.in-game #fps-badge *,
body.in-game #settings-modal *,
body.in-game #news-modal *,
body.in-game #friends-modal *,
body.in-game #player-info-modal *,
body.in-game #shop-modal *,
body.in-game #trade-modal *,
body.in-game #trade-qty-overlay *,
body.in-game #trade-final-overlay *,
body.in-game #drop-modal *,
body.in-game #info-modal *,
body.in-game #grant-modal *,
body.in-game #craft-modal *,
body.in-game #door-modal *,
body.in-game #lock-modal *,
body.in-game #world-key-modal *,
body.in-game #region-lock-modal *,
body.in-game #megaphone-modal *,
body.in-game #quests-overlay *,
body.in-game #skills-overlay *,
body.in-game #worldchanger-modal *,
body.in-game #namechanger-modal *{
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Compact no-scroll mode for shorter phone/tablet viewports.
   This removes secondary columns instead of allowing the page to scroll. */
@media (max-width: 980px) and (max-height: 900px){
  html body #auth,
  html body #lobby{
    overflow: hidden !important;
  }

  html body #auth{
    align-items: center !important;
    justify-content: center !important;
    padding: 4px !important;
  }

  html body #auth .auth-shell{
    width: min(100%, 920px) !important;
    max-height: calc(var(--app-height, 100dvh) - 8px) !important;
    gap: 8px !important;
    grid-template-columns: 1fr !important;
  }

  html body #auth .auth-hero-wrap{
    gap: 4px !important;
  }

  html body #auth .auth-hero{
    padding: 8px !important;
    gap: 6px !important;
  }

  html body #auth .auth-hero-logo-outside{
    width: min(180px, 54vw) !important;
    margin-bottom: -2px !important;
  }

  html body #auth .auth-feature-copy{
    display: none !important;
  }

  html body #auth .auth-rail{
    display: none !important;
  }

  html body #auth .auth-card{
    padding: 8px 10px !important;
    gap: 6px !important;
  }

  html body #auth .auth-form{
    gap: 5px !important;
  }

  html body #auth .auth-field,
  html body #auth .auth-btn{
    min-height: 34px !important;
  }

  html body #auth .auth-label{
    font-size: 9px !important;
  }

  html body #auth .auth-foot-copy{
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  html body #lobby{
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
  }

  html body #lobby .lobby-card{
    height: 100dvh !important;
    min-height: 100dvh !important;
    padding: 8px !important;
    overflow: hidden !important;
  }

  html body #lobby .lobby-topbar{
    padding: 6px 8px !important;
    gap: 8px !important;
  }

  html body #lobby .lobby-brand-logo{
    width: min(180px, 26vw) !important;
  }

  html body #lobby .lobby-player-strip{
    padding: 10px 12px !important;
  }

  html body #lobby .lobby-player-avatar{
    width: 60px !important;
    height: 60px !important;
  }

  html body #lobby .lobby-stage{
    gap: 6px !important;
  }

  html body #lobby .lobby-stage-right{
    display: none !important;
  }

  html body #lobby .lobby-stage-left{
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) !important;
    gap: 6px !important;
  }

  html body #lobby .lobby-news-panel{
    min-width: 0 !important;
  }

  html body #lobby .lobby-news-text{
    display: none !important;
  }

  html body #lobby .lobby-news-item{
    padding: 6px 7px !important;
    gap: 6px !important;
  }

  html body #lobby .lobby-actions-stack{
    gap: 6px !important;
  }

  html body #lobby .lobby-action-button{
    min-height: 40px !important;
    padding: 6px 8px !important;
  }

  html body #lobby .lobby-action-sub{
    display: none !important;
  }

  html body #lobby .lobby-join{
    padding: 8px 10px !important;
    gap: 6px !important;
  }

  html body #lobby .lobby-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  html body #lobby .lobby-worlds-panel{
    height: min(18vh, 150px) !important;
  }

  html body #lobby .lobby-worlds-panel:nth-child(3){
    display: none !important;
  }

  html body #lobby .lobby-hint{
    min-height: 12px !important;
    margin-top: 0 !important;
  }
}
/* Unified responsive tiers for the main game UI.
   This keeps the existing layout but makes the phone/tablet behavior predictable. */
@media (max-width: 980px){
  html body #auth{
    padding: 8px !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }

  html body #auth .auth-shell{
    width: min(calc(100% - 8px), 860px) !important;
    max-height: calc(var(--app-height, 100dvh) - 16px) !important;
    height: calc(var(--app-height, 100dvh) - 16px) !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  html body #auth .auth-rail{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body #auth .auth-feature-copy{
    display: none !important;
  }

  html body #auth .auth-hero-logo-outside{
    width: min(230px, 64vw) !important;
  }

  html body #lobby{
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  html body #lobby .lobby-card{
    min-height: 100dvh !important;
    height: 100dvh !important;
    overflow: hidden !important;
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  html body #lobby .lobby-topbar{
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  html body #lobby .lobby-top-left{
    grid-template-columns: minmax(210px, auto) minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
  }

  html body #lobby .lobby-brand-logo{
    width: min(220px, 28vw) !important;
    max-width: 240px !important;
  }

  html body #lobby .lobby-stage{
    flex: 1 1 auto !important;
    min-height: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: start !important;
  }

  html body #lobby .lobby-stage-right,
  html body #lobby .lobby-news-panel{
    display: block !important;
  }

  html body #lobby .lobby-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  html body #lobby .lobby-worlds-panel{
    display: flex !important;
    height: clamp(180px, 28vh, 240px) !important;
    max-height: none !important;
  }

  html body #lobby .lobby-join{
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 1fr !important;
  }

  html body #lobby button#joinWorld.lobby-cta{
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 700px){
  html body #auth .auth-shell{
    width: min(100%, 540px) !important;
  }

  html body #auth .auth-rail{
    grid-template-columns: 1fr !important;
  }

  html body #auth .auth-feature-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body #auth .auth-field,
  html body #auth .auth-btn{
    min-height: 40px !important;
  }

  html body #lobby .lobby-card{
    padding: 10px !important;
  }

  html body #lobby .lobby-topbar{
    flex-direction: column !important;
    align-items: stretch !important;
  }

  html body #lobby .lobby-top-left{
    grid-template-columns: 1fr !important;
  }

  html body #lobby .lobby-stage{
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  html body #lobby .lobby-stage-right,
  html body #lobby .lobby-news-panel{
    display: none !important;
  }

  html body #lobby .lobby-grid{
    grid-template-columns: 1fr !important;
  }

  html body #lobby .lobby-worlds-panel{
    height: min(22vh, 180px) !important;
  }

  html body #lobby .lobby-action-button{
    min-height: 48px !important;
  }

  html body #mobile-controls{
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px)) !important;
  }
}

@media (max-width: 430px){
  html body #auth .auth-shell{
    width: min(100%, 380px) !important;
  }

  html body #auth .auth-hero-logo-outside{
    width: min(210px, 72vw) !important;
  }

  html body #auth .auth-hero-headline{
    font-size: 12px !important;
  }

  html body #lobby .lobby-card{
    padding: 8px !important;
  }

  html body #lobby .lobby-action-button{
    min-height: 40px !important;
    padding: 6px 8px !important;
  }

  html body #lobby .lobby-action-title{
    font-size: 10px !important;
  }
}

/* Viewport sync overrides */
:root{
  --app-vw: 100vw;
  --app-vh: 100dvh;
  --app-height: 100dvh;
}

html,
body{
  width: var(--app-vw, 100vw) !important;
  min-height: var(--app-vh, 100dvh) !important;
  height: var(--app-vh, 100dvh) !important;
}

body.ui-loading{
  width: var(--app-vw, 100vw) !important;
  min-height: var(--app-vh, 100dvh) !important;
  height: var(--app-vh, 100dvh) !important;
}

#auth,
#lobby,
#game-container,
#hud,
#blast-overlay,
#worldchanger-overlay,
#namechanger-overlay,
#quests-overlay,
#skills-overlay,
#menu-overlay,
#blast-success,
#blast-modal,
#worldchanger-modal,
#namechanger-modal,
#megaphone-modal,
#grant-modal,
#craft-modal,
#door-modal,
#lock-modal,
#world-key-modal,
#world-key-info-modal,
#region-lock-modal,
#news-modal,
#friends-modal,
#trade-modal,
#trade-qty-overlay,
#trade-final-overlay,
#drop-modal,
#info-modal,
#player-info-modal,
#gift-overlay,
#wheel-overlay{
  width: var(--app-vw, 100vw) !important;
  height: var(--app-vh, 100dvh) !important;
  max-height: var(--app-vh, 100dvh) !important;
}

#auth .auth-shell,
#lobby .lobby-card,
#settings-modal .settings-card,
#news-modal .news-card,
#friends-modal .friends-card,
#player-info-modal .player-info-card,
#shop-modal .shop-shell,
#trade-modal .trade-modal-box,
#drop-modal .legacy-inventory-modal,
#info-modal #info-content,
#grant-modal .grant-box,
#craft-modal .craft-layout,
.mini-reward-modal,
.blast-modal .blast-box,
.door-modal-box,
.lock-modal,
.world-key-modal .modal-content{
  height: auto !important;
  max-height: calc(var(--app-height, 100dvh) - 24px) !important;
}

#lobby .lobby-card{
  height: var(--app-vh, 100dvh) !important;
  min-height: var(--app-vh, 100dvh) !important;
}

html, body{
  height: 100%;
  min-height: 100%;
  background: var(--cc-navy);
  color: var(--cc-text);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar{
  width: 0;
  height: 0;
}

html{
  scrollbar-width: none;
}

body{
  scrollbar-width: none;
}

body.is-game-world{
  width: 100vw !important;
  height: 100dvh !important;
  zoom: var(--app-ui-scale, 1);
}

@supports not (zoom: 1){
  body.is-game-world{
    transform-origin: top left !important;
    transform: scale(var(--app-ui-scale, 1)) !important;
    width: calc(var(--app-vw, 100vw) / var(--app-ui-scale, 1)) !important;
    height: calc(var(--app-vh, 100dvh) / var(--app-ui-scale, 1)) !important;
  }
}

body.ui-loading{
  overflow: hidden !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
}

body.booting,
body.login-ready,
body.auth-checking{
  overflow: hidden !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
}

html.is-game-world,
body.is-game-world{
  overflow: hidden !important;
  height: 100% !important;
}

#game-container{
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

#game-container canvas{
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
}

body:not(.is-game-world) #game-container{
  opacity: 0 !important;
  visibility: hidden !important;
}

body.is-game-world #game-container{
  pointer-events: auto !important;
  z-index: 2 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.is-game-world #game-container canvas{
  pointer-events: auto !important;
  image-rendering: pixelated !important;
}

body.is-game-world #lobby{
  display: none !important;
}

body.booting > :not(#auth):not(#bg),
body.login-ready > :not(#auth):not(#bg),
body.auth-checking > :not(#auth):not(#bg){
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.booting #auth,
body.login-ready #auth,
body.auth-checking #auth{
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.authenticated #auth,
body.lobby-ready #auth,
body.in-game #auth{
  display: none !important;
}

body.authenticated #lobby,
body.lobby-ready #lobby{
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.in-game #game-container{
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.ui-loading #hud,
body.ui-loading #lobby,
body.ui-loading #chat-container,
body.ui-loading #chat-header,
body.ui-loading #mobile-controls,
body.ui-loading #mini-profile-stack,
body.ui-loading #mini-profile,
body.ui-loading #mine-hud,
body.ui-loading #gameplay-quick-panel,
body.ui-loading #inventory-toolbar,
body.ui-loading .gameplay-hotbar,
body.ui-loading .pi-hotbar-card,
body.ui-loading .pi-hotbar-editor,
body.ui-loading #shop-modal,
body.ui-loading #news-modal,
body.ui-loading #gift-overlay,
body.ui-loading #wheel-overlay,
body.ui-loading #quests-overlay,
body.ui-loading #skills-overlay,
body.ui-loading #player-info-modal,
body.ui-loading #trade-modal,
body.ui-loading #trade-qty-overlay,
body.ui-loading #menu-overlay,
body.ui-loading #exit-menu{
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.ui-loading #game-container{
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
}

body.booting #hud,
body.booting #chat-container,
body.booting #chat-header,
body.booting #mobile-controls,
body.booting #mini-profile-stack,
body.booting #mini-profile,
body.booting #mine-hud,
body.booting #gameplay-quick-panel,
body.booting #inventory-toolbar,
body.booting .gameplay-hotbar,
body.booting .pi-hotbar-card,
body.booting .pi-hotbar-editor,
body.booting #shop-modal,
body.booting #news-modal,
body.booting #gift-overlay,
body.booting #wheel-overlay,
body.booting #quests-overlay,
body.booting #skills-overlay,
body.booting #player-info-modal,
body.booting #trade-modal,
body.booting #trade-qty-overlay,
body.booting #menu-overlay,
body.booting #exit-menu,
body.booting #inventory,
body.booting [class*="sparkle"],
body.booting [class*="particle"],
body.booting [class*="effect"],
body.booting [class*="fx"],
body.login-ready #hud,
body.login-ready #chat-container,
body.login-ready #chat-header,
body.login-ready #mobile-controls,
body.login-ready #mini-profile-stack,
body.login-ready #mini-profile,
body.login-ready #mine-hud,
body.login-ready #gameplay-quick-panel,
body.login-ready #inventory-toolbar,
body.login-ready .gameplay-hotbar,
body.login-ready .pi-hotbar-card,
body.login-ready .pi-hotbar-editor,
body.login-ready #shop-modal,
body.login-ready #news-modal,
body.login-ready #gift-overlay,
body.login-ready #wheel-overlay,
body.login-ready #quests-overlay,
body.login-ready #skills-overlay,
body.login-ready #player-info-modal,
body.login-ready #trade-modal,
body.login-ready #trade-qty-overlay,
body.login-ready #menu-overlay,
body.login-ready #exit-menu,
body.login-ready #inventory,
body.login-ready [class*="sparkle"],
body.login-ready [class*="particle"],
body.login-ready [class*="effect"],
body.login-ready [class*="fx"],
body.auth-checking #hud,
body.auth-checking #chat-container,
body.auth-checking #chat-header,
body.auth-checking #mobile-controls,
body.auth-checking #mini-profile-stack,
body.auth-checking #mini-profile,
body.auth-checking #mine-hud,
body.auth-checking #gameplay-quick-panel,
body.auth-checking #inventory-toolbar,
body.auth-checking .gameplay-hotbar,
body.auth-checking .pi-hotbar-card,
body.auth-checking .pi-hotbar-editor,
body.auth-checking #shop-modal,
body.auth-checking #news-modal,
body.auth-checking #gift-overlay,
body.auth-checking #wheel-overlay,
body.auth-checking #quests-overlay,
body.auth-checking #skills-overlay,
body.auth-checking #player-info-modal,
body.auth-checking #trade-modal,
body.auth-checking #trade-qty-overlay,
body.auth-checking #menu-overlay,
body.auth-checking #exit-menu,
body.auth-checking #inventory,
body.auth-checking [class*="sparkle"],
body.auth-checking [class*="particle"],
body.auth-checking [class*="effect"],
body.auth-checking [class*="fx"]{
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.ui-loading #bg{
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  opacity: 1 !important;
  background:
    radial-gradient(circle at 50% 40%, rgba(12, 42, 75, 0.22), rgba(2, 8, 22, 0.78) 72%),
    url("/photos/BGobby1.png") center center / cover no-repeat !important;
  transition: opacity 160ms linear;
}

body.ui-loading{
  overflow: hidden !important;
}

body.in-game.is-world-loading #world-ready-overlay{
  display: flex !important;
  position: fixed !important;
  right: 18px !important;
  top: 18px !important;
  left: auto !important;
  transform: none !important;
  z-index: 3200 !important;
  pointer-events: none !important;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

body:not(.in-game).is-world-loading #world-ready-overlay,
body.in-game:not(.is-world-loading) #world-ready-overlay{
  display: none !important;
}

.world-ready-card{
  min-width: min(72vw, 260px);
  padding: 12px 16px 11px;
  border-radius: 18px;
  border: 1px solid rgba(115, 219, 255, 0.34);
  background:
    radial-gradient(circle at top, rgba(73, 168, 255, 0.22), rgba(8, 24, 44, 0.92) 72%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255,255,255,0.10);
  text-align: center;
  color: var(--cc-text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: worldReadyPulse 1.6s ease-in-out infinite;
}

.world-ready-kicker{
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(169, 233, 255, 0.92);
  margin-bottom: 6px;
}

.world-ready-title{
  font-size: 18px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(73, 168, 255, 0.22);
}

.world-ready-timer{
  margin-top: 7px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(241, 249, 255, 0.96);
  letter-spacing: 0.08em;
}

@keyframes worldReadyPulse{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-3px); }
}

body:not(.ui-loading) #bg{
  opacity: 0 !important;
}

body.ui-loading:not(.is-game-world),
body.ui-loading.is-game-world{
  background:
    radial-gradient(circle at 50% 40%, rgba(12, 42, 75, 0.22), rgba(2, 8, 22, 0.78) 72%),
    url("/photos/BGobby1.png") center center / cover no-repeat !important;
}

body.ui-loading:not(.is-game-world)::before,
body.ui-loading.is-game-world::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 8, 22, 0.18), rgba(2, 8, 22, 0.56)),
    radial-gradient(circle at 50% 42%, rgba(73, 168, 255, 0.10), transparent 52%);
  z-index: 0;
}

body.ui-loading > *{
  position: relative;
  z-index: 1;
}

#hud{
  position: fixed !important;
  inset: 0 !important;
  z-index: 3100 !important;
  pointer-events: none;
}

#hud *,
#player-info-modal,
#player-info-modal *,
#friends-modal,
#friends-modal *,
#settings-modal,
#settings-modal *,
#shop-modal,
#shop-modal *,
#exit-menu,
#exit-menu *,
#inventory,
#inventory *{
  pointer-events: auto !important;
}

#friends-modal{
  background:
    radial-gradient(circle at 20% 10%, rgba(73, 168, 255, 0.16), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(34, 199, 255, 0.10), transparent 26%),
    rgba(2, 10, 18, 0.74) !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px !important;
}

#settings-modal{
  position: fixed !important;
  inset: 0 !important;
  z-index: 13040 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  background:
    radial-gradient(circle at 18% 12%, rgba(73, 168, 255, 0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(34, 199, 255, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(1, 8, 18, 0.76), rgba(2, 10, 18, 0.90)) !important;
  backdrop-filter: blur(6px) saturate(1.1) !important;
}

#settings-modal::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04) 0, rgba(255,255,255,0.02) 18%, transparent 18.1%) 0 0 / 14px 14px,
    radial-gradient(circle at center, rgba(255,255,255,0.04), transparent 64%);
  opacity: 0.35;
  pointer-events: none;
}

#settings-modal .settings-card{
  position: relative;
  width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 22px 22px 18px;
  border-radius: 26px;
  border: 1px solid rgba(115, 219, 255, 0.28);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.10), rgba(255,255,255,0) 28%),
    linear-gradient(180deg, rgba(10, 30, 53, 0.98), rgba(5, 18, 33, 0.98));
  box-shadow:
    0 28px 70px rgba(0,0,0,0.56),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(34, 199, 255, 0.10) inset;
}

#settings-modal .settings-card::before{
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 1px solid rgba(73, 168, 255, 0.10);
  pointer-events: none;
}

#settings-modal .settings-title{
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f4fbff;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.6),
    0 0 18px rgba(34, 199, 255, 0.18);
}

#settings-modal .settings-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(115, 219, 255, 0.10);
  background: rgba(3, 15, 28, 0.34);
}

#settings-modal .settings-row label{
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  color: rgba(233, 247, 255, 0.96);
}

#settings-modal #settings-volume-value,
#settings-modal #settings-skin-current{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: rgba(177, 232, 255, 0.92);
}

#settings-modal #settings-volume{
  width: 100%;
  margin-top: 10px;
  accent-color: #22c7ff;
}

#settings-modal .settings-toggle-row{
  min-height: 54px;
}

#settings-modal .settings-toggle-row input[type="checkbox"]{
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #22c7ff;
  filter: drop-shadow(0 0 6px rgba(34,199,255,0.18));
}

#settings-modal .settings-skin-row{
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#settings-modal .settings-skin-palette{
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

#settings-modal .settings-skin-btn{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid rgba(115, 219, 255, 0.22);
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.34), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0)),
    var(--skin-color);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    0 10px 18px rgba(0,0,0,0.26);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

#settings-modal .settings-skin-btn:hover{
  transform: translateY(-1px) scale(1.03);
  border-color: rgba(34, 199, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    0 14px 22px rgba(0,0,0,0.28),
    0 0 0 2px rgba(34, 199, 255, 0.10);
}

#settings-modal .settings-skin-btn:focus-visible{
  outline: 2px solid rgba(34, 199, 255, 0.95);
  outline-offset: 2px;
}

#settings-modal .settings-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

#settings-modal .settings-actions button,
#settings-modal #settings-close{
  min-width: 120px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(115, 219, 255, 0.26);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(34, 199, 255, 0.96), rgba(11, 120, 196, 0.96));
  color: #f4fbff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow:
    0 10px 22px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

#settings-modal .settings-actions button:hover,
#settings-modal #settings-close:hover{
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-1px);
}

#settings-modal .settings-actions button:active,
#settings-modal #settings-close:active{
  transform: translateY(0);
}

@media (max-width: 640px){
  #settings-modal{
    padding: 12px !important;
  }

  #settings-modal .settings-card{
    width: min(100%, calc(100vw - 24px));
    padding: 18px 16px 16px;
    border-radius: 22px;
  }

  #settings-modal .settings-title{
    font-size: 22px;
  }

  #settings-modal .settings-skin-palette{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #settings-modal .settings-actions{
    justify-content: stretch;
  }

  #settings-modal .settings-actions button,
  #settings-modal #settings-close{
    width: 100%;
  }
}

#blast-overlay,
#worldchanger-overlay,
#namechanger-overlay,
#quests-overlay,
#skills-overlay,
#menu-overlay,
#blast-success{
  position: fixed !important;
  inset: 0 !important;
  display: none;
  z-index: 12000 !important;
  pointer-events: auto !important;
}

#blast-modal,
#worldchanger-modal,
#namechanger-modal,
#megaphone-modal,
#grant-modal,
#craft-modal,
#door-modal,
#lock-modal,
#world-key-modal,
#world-key-info-modal,
#region-lock-modal,
#news-modal,
#friends-modal,
#trade-modal,
#trade-qty-overlay,
#trade-final-overlay,
#drop-modal,
#info-modal,
#player-info-modal{
  position: fixed !important;
  inset: 0 !important;
  display: none;
  z-index: 13040 !important;
  pointer-events: auto !important;
  overflow: auto !important;
}

#drop-modal,
#info-modal{
  background:
    radial-gradient(circle at 20% 0%, rgba(73, 168, 255, 0.18), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(34, 199, 255, 0.12), transparent 24%),
    rgba(2, 10, 18, 0.74) !important;
  backdrop-filter: blur(14px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.08) !important;
}

#megaphone-modal{
  background:
    radial-gradient(circle at 50% 16%, rgba(73, 168, 255, 0.16), transparent 30%),
    radial-gradient(circle at 18% 0%, rgba(34, 199, 255, 0.12), transparent 24%),
    rgba(2, 10, 18, 0.78) !important;
  backdrop-filter: blur(14px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.08) !important;
}

#player-info-modal{
  background:
    radial-gradient(circle at 20% 10%, rgba(73, 168, 255, 0.16), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(34, 199, 255, 0.10), transparent 26%),
    rgba(2, 10, 18, 0.74) !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 10px 14px 14px !important;
}

#blast-modal,
#worldchanger-modal,
#namechanger-modal,
#megaphone-modal{
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
}

#lock-modal,
#friends-modal,
#trade-modal,
#craft-modal,
#grant-modal,
#door-modal,
#info-modal,
#player-info-modal,
#drop-modal,
#region-lock-modal,
#world-key-modal,
#world-key-info-modal,
#news-modal,
#trade-qty-overlay,
#trade-final-overlay{
  align-items: center !important;
  justify-content: center !important;
}

#drop-modal{
  padding: 24px !important;
}

#drop-modal .legacy-inventory-modal{
  position: relative;
  width: min(92vw, 440px);
  border-radius: 24px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background:
    radial-gradient(circle at 18% 0%, rgba(73, 168, 255, 0.22), rgba(73, 168, 255, 0) 36%),
    radial-gradient(circle at 82% 8%, rgba(34, 199, 255, 0.16), rgba(34, 199, 255, 0) 28%),
    linear-gradient(180deg, rgba(7, 21, 39, 0.98), rgba(4, 14, 28, 0.98));
  box-shadow:
    0 28px 70px rgba(0,0,0,0.50),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    inset 0 1px 0 rgba(255,255,255,0.07);
  color: #eaf7ff;
  overflow: hidden;
}

#drop-modal .legacy-inventory-modal::before{
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  pointer-events: none;
  border: 1px solid rgba(115, 219, 255, 0.10);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    inset 0 0 42px rgba(73, 168, 255, 0.08);
}

#drop-modal .legacy-inventory-modal::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 18%),
    linear-gradient(300deg, rgba(255,255,255,0.10), rgba(255,255,255,0) 22%),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.10), transparent 28%);
  mix-blend-mode: screen;
  opacity: 0.55;
}

#drop-modal .drop-frame-ornaments{
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

#drop-modal .drop-frame-line{
  position: absolute;
  left: -12%;
  right: -12%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.0), rgba(115, 219, 255, 0.86), rgba(255,255,255,0.96), rgba(115, 219, 255, 0.86), rgba(255,255,255,0.0), transparent);
  filter:
    drop-shadow(0 0 8px rgba(73, 168, 255, 0.48))
    drop-shadow(0 0 18px rgba(255,255,255,0.28));
  opacity: 0.72;
  animation: dropFramePulse 3.8s ease-in-out infinite;
}

#drop-modal .drop-frame-line-a{
  top: 22px;
  transform: rotate(-2deg);
}

#drop-modal .drop-frame-line-b{
  bottom: 22px;
  transform: rotate(2deg);
  animation-delay: 1.2s;
}

#drop-modal .drop-frame-spark{
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(115, 219, 255, 0.08) 55%, transparent 70%),
    linear-gradient(45deg, transparent 35%, rgba(255,255,255,0.95) 50%, transparent 65%);
  filter:
    drop-shadow(0 0 12px rgba(255,255,255,0.84))
    drop-shadow(0 0 22px rgba(73, 168, 255, 0.82));
  opacity: 0.85;
  clip-path: polygon(50% 0%, 62% 28%, 100% 38%, 70% 58%, 82% 100%, 50% 74%, 18% 100%, 30% 58%, 0 38%, 38% 28%);
  animation: dropSparkFlicker 1.9s steps(2, end) infinite;
}

#drop-modal .drop-frame-spark-a{
  top: 12px;
  right: 20px;
}

#drop-modal .drop-frame-spark-b{
  bottom: 14px;
  left: 18px;
  animation-delay: .8s;
}

#drop-modal .legacy-inventory-modal-head{
  position: relative;
  z-index: 1;
  padding: 18px 18px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

#drop-modal .legacy-inventory-modal-icon{
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 16px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background: rgba(3, 15, 28, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#drop-modal .legacy-inventory-modal-meta{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#drop-modal .legacy-inventory-modal-title{
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  color: #f5fbff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#drop-modal .legacy-inventory-modal-subtitle{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(214, 235, 250, 0.76);
}

#drop-modal .legacy-inventory-modal-body{
  position: relative;
  z-index: 1;
  padding: 0 18px 18px;
  display: grid;
  gap: 14px;
}

#drop-modal .legacy-inventory-modal-body{
  margin: 0 12px 10px;
  padding: 14px 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(115, 219, 255, 0.10);
  background:
    radial-gradient(circle at 20% 0%, rgba(73, 168, 255, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(5, 16, 31, 0.80), rgba(4, 14, 28, 0.90));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 0 30px rgba(73, 168, 255, 0.05);
}

#drop-modal .drop-amount-controls{
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 10px;
  align-items: center;
}

#drop-modal .drop-amount-controls input[type="range"]{
  width: 100%;
  accent-color: #49a8ff;
}

#drop-modal #drop-amount{
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(115, 219, 255, 0.20);
  background: rgba(8, 23, 43, 0.92);
  color: #f4fbff;
  font-weight: 900;
  text-align: center;
  outline: none;
}

#drop-modal #drop-amount-live{
  justify-self: end;
  min-width: 52px;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(115, 219, 255, 0.20);
  background: rgba(8, 23, 43, 0.92);
  color: #f4fbff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

#drop-modal .legacy-inventory-modal-warning{
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(249, 115, 22, 0.10);
  border: 1px solid rgba(251, 146, 60, 0.22);
  color: #ffd9bf;
  font-size: 13px;
  line-height: 1.35;
}

#drop-modal .legacy-inventory-modal-actions{
  position: relative;
  z-index: 1;
  padding: 0 18px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#drop-modal .legacy-btn{
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

#drop-modal .legacy-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.04);
}

#drop-modal .legacy-btn:active{
  transform: translateY(1px);
}

#drop-modal .legacy-btn-cancel{
  color: #d9e8f5;
  background: linear-gradient(180deg, rgba(25, 49, 76, 0.98), rgba(15, 31, 48, 0.98));
  border: 1px solid rgba(115, 219, 255, 0.14);
}

#drop-modal .legacy-btn-confirm{
  color: #effdf8;
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.98), rgba(15, 118, 64, 0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}

#drop-modal .legacy-btn-delete{
  color: #fff5f5;
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.98), rgba(153, 27, 27, 0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

@keyframes dropFramePulse{
  0%, 100%{
    opacity: .55;
    transform: translateX(0) rotate(-2deg) scaleX(0.98);
  }
  50%{
    opacity: .92;
    transform: translateX(0) rotate(-2deg) scaleX(1);
  }
}

@keyframes dropSparkFlicker{
  0%, 100%{
    opacity: .55;
    transform: scale(0.92) rotate(0deg);
  }
  30%{
    opacity: .98;
    transform: scale(1.06) rotate(8deg);
  }
  60%{
    opacity: .72;
    transform: scale(0.98) rotate(-6deg);
  }
}

#info-modal{
  z-index: 13100 !important;
  padding: 24px !important;
  align-items: center !important;
  justify-content: center !important;
}

#info-modal #info-content{
  width: min(92vw, 820px);
  border-radius: 30px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  background:
    radial-gradient(circle at 14% 0%, rgba(168, 85, 247, 0.22), rgba(168, 85, 247, 0) 36%),
    radial-gradient(circle at 90% 10%, rgba(251, 191, 36, 0.10), rgba(251, 191, 36, 0) 24%),
    linear-gradient(180deg, rgba(8, 10, 26, 0.98), rgba(4, 8, 18, 0.99));
  box-shadow:
    0 30px 84px rgba(0,0,0,0.56),
    inset 0 1px 0 rgba(255,255,255,0.08);
  color: #eaf7ff;
  padding: 24px 24px 22px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

#info-modal #info-content::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(168, 85, 247, 0.08), rgba(168, 85, 247, 0) 26%),
    linear-gradient(300deg, rgba(251, 191, 36, 0.06), rgba(251, 191, 36, 0) 18%);
  opacity: 0.9;
}

#info-modal #info-content > *{
  position: relative;
  z-index: 1;
}

#info-modal #info-close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
  border: 1px solid rgba(115, 219, 255, 0.18);
  color: #f4fbff;
  font-size: 22px;
  cursor: pointer;
}

#info-modal #info-details{
  margin-top: 14px;
  color: #eaf7ff;
  line-height: 1.55;
  display: grid;
  gap: 14px;
}

#info-modal .reward-claim-shell{
  display: grid;
  gap: 16px;
}

#info-modal .reward-claim-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

#info-modal .reward-claim-card{
  display: grid;
  gap: 10px;
  padding: 14px;
  min-height: 152px;
  border-radius: 20px;
  border: 1px solid rgba(168, 85, 247, 0.14);
  background:
    radial-gradient(circle at 18% 0%, rgba(168, 85, 247, 0.12), rgba(168, 85, 247, 0) 40%),
    linear-gradient(180deg, rgba(13, 16, 37, 0.96), rgba(7, 10, 22, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 12px 24px rgba(0,0,0,0.18);
  position: relative;
  overflow: hidden;
}

#info-modal .reward-claim-card::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 30%);
}

#info-modal .reward-claim-card > *{
  position: relative;
  z-index: 1;
}

#info-modal .reward-claim-card.is-coin{
  border-color: rgba(251, 191, 36, 0.24);
  background:
    radial-gradient(circle at 18% 0%, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0) 42%),
    linear-gradient(180deg, rgba(36, 24, 6, 0.94), rgba(12, 20, 36, 0.98));
}

#info-modal .reward-claim-card.is-rare{
  border-color: rgba(96, 165, 250, 0.24);
}

#info-modal .reward-claim-card-icon{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.14), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(25, 18, 48, 0.96), rgba(8, 10, 22, 0.98));
  border: 1px solid rgba(168, 85, 247, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 12px 24px rgba(0,0,0,0.20);
  overflow: visible;
}

#info-modal .reward-claim-card-icon::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
  pointer-events: none;
}

#info-modal .reward-claim-card-icon .inventory-icon,
#info-modal .reward-claim-card-icon img{
  width: 58px !important;
  height: 58px !important;
  object-fit: contain;
}

#info-modal .reward-claim-card-icon .reward-claim-card-amount{
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.98), rgba(217, 119, 6, 0.98));
  color: #1b1200;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.10),
    0 10px 18px rgba(0,0,0,0.18);
}

#info-modal .reward-claim-card-name{
  font-size: 15px;
  font-weight: 900;
  color: #f8fbff;
}

#info-modal .reward-claim-card-amount{
  display: none;
  font-size: 19px;
  font-weight: 900;
  color: #f8c04f;
}

#news-modal{
  padding: 18px !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(73, 168, 255, 0.20), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(109, 73, 255, 0.14), transparent 26%),
    rgba(2, 10, 18, 0.80) !important;
  backdrop-filter: blur(14px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.08) !important;
}

#news-modal .news-card{
  width: min(94vw, 960px);
  max-height: calc(100vh - 36px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background:
    radial-gradient(circle at 15% 0%, rgba(73, 168, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(8, 24, 44, 0.98), rgba(4, 12, 24, 0.98)) !important;
  box-shadow:
    0 34px 90px rgba(0,0,0,0.58),
    inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
}

#news-modal .news-card::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 20%),
    radial-gradient(circle at 85% 0%, rgba(73,168,255,0.10), transparent 25%);
  opacity: 0.9;
}

#news-modal .news-head,
#news-modal .news-body,
#news-modal .news-foot{
  position: relative;
  z-index: 1;
}

#news-modal .news-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(115, 219, 255, 0.10);
}

#news-modal .news-title-wrap{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

#news-modal .news-title{
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  font-weight: 1000;
  color: #f7fdff;
  letter-spacing: 0.01em;
}

#news-modal .news-chip-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#news-modal .news-chip{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background: rgba(6, 21, 40, 0.66);
  color: rgba(214, 235, 250, 0.90);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#news-modal .news-close{
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
      background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
}

#news-modal .news-body{
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.25fr);
  gap: 14px;
  overflow: hidden;
}

#news-modal .news-section{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background:
    radial-gradient(circle at 18% 0%, rgba(73, 168, 255, 0.10), transparent 30%),
    linear-gradient(180deg, rgba(11, 31, 55, 0.92), rgba(6, 18, 34, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 12px 26px rgba(0,0,0,0.18);
  overflow: hidden;
}

#news-modal .news-section-featured{
  position: relative;
  min-height: 100%;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

#news-modal .news-section-featured .news-section-title{
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(4, 16, 31, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(115, 219, 255, 0.18);
}

#news-modal .news-section-title{
  color: rgba(177, 232, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#news-modal .news-image-wrap{
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(115, 219, 255, 0.12);
  background: rgba(4, 16, 31, 0.66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#news-modal .news-image{
  display: block;
  width: 100%;
  height: 100%;
  object-position: center;
}

#news-modal .news-list{
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: rgba(233, 247, 255, 0.92);
  line-height: 1.45;
  font-size: 13px;
}

#news-modal .news-list li{
  margin: 0;
}

#news-modal .news-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 6px;
  border-top: 1px solid rgba(115, 219, 255, 0.10);
}

#news-modal .news-hide-today{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(214, 235, 250, 0.86);
  font-size: 13px;
  font-weight: 700;
}

#news-modal .news-btn{
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 900;
      background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
}

@media (max-width: 820px){
  #news-modal .news-card{
    width: calc(100vw - 24px);
    padding: 14px;
  }

  #news-modal .news-body{
    grid-template-columns: 1fr;
  }

  #news-modal .news-foot{
    flex-direction: column;
    align-items: stretch;
  }

  #news-modal .news-btn{
    width: 100%;
  }
}

.cc-panel,
#chat-container,
#inventory,
#mini-profile,
#mini-map-panel,
#player-info-modal .player-info-card,
#shop-modal .shop-shell,
.friends-card,
.exit-menu{
  background:
radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  border: 1px solid var(--cc-border) !important;
  border-radius: var(--cc-radius) !important;
  box-shadow: var(--cc-shadow) !important;
  color: var(--cc-text) !important;
  box-sizing: border-box;
}

.cc-panel,
#chat-container,
#inventory,
#mini-profile,
#mini-map-panel,
#player-info-modal .player-info-card,
#shop-modal .shop-shell,
.friends-card,
.exit-menu::before{
    background: linear-gradient(180deg, rgb(0 0 0 / 72%), rgb(3 1 28 / 72%) 24%), radial-gradient(circle at 50% 0%, rgb(9 18 40 / 39%), transparent 42%) !important;
}

.cc-panel,
#chat-container,
#inventory,
#mini-profile,
#mini-map-panel,
#player-info-modal .player-info-card,
#shop-modal .shop-shell,
.friends-card,
.exit-menu,
#gameplay-quick-panel{
  box-shadow:
    0 24px 56px rgba(0,0,0,0.42),
    0 0 28px rgba(66, 172, 255, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

#friends-modal .friends-card{
  width: min(760px, calc(100vw - 24px)) !important;
  max-height: calc(100vh - 24px) !important;
  overflow: hidden !important;
  padding: 18px !important;
  border-radius: 28px !important;
  border: 1px solid rgba(115, 219, 255, 0.20) !important;
  background:
   radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.54),
    inset 0 1px 0 rgba(255,255,255,0.07) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  position: relative !important;
}

#friends-modal .friends-card::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
  linear-gradient(180deg, rgb(35 0 0 / 12%), rgb(3 1 28) 24%), radial-gradient(circle at 50% 0%, rgb(9 18 40), transparent 42%) !important;
  pointer-events: none;
}

#friends-modal .friends-card > *{
  position: relative;
  z-index: 1;
}

#friends-modal .friends-card-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#friends-modal .friends-card-top > div:first-child{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#friends-modal .friends-card-top > div:first-child::after{
  content: "";
  font-size: 12px;
  font-weight: 700;
  color: rgba(214, 235, 250, 0.74);
}

#friends-modal .friends-title{
  font-size: 22px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  color: #f5fbff !important;
  letter-spacing: 0.02em !important;
}

#friends-modal .friends-close{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
  color: #f4fbff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

#friends-modal .friends-search-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

#friends-modal .friends-search-row input{
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(115, 219, 255, 0.20);
  background: rgba(8, 23, 43, 0.92);
  color: #f4fbff;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#friends-modal .friends-search-row input::placeholder{
  color: rgba(214, 235, 250, 0.52);
}

#friends-modal #friends-add{
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(34, 199, 255, 0.28);
  background: linear-gradient(180deg, rgba(48, 146, 244, 0.98), rgba(20, 90, 180, 0.98));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
}

#friends-modal #friends-status{
  min-height: 20px !important;
  margin: 0 !important;
  padding: 0 2px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #d9f99d !important;
}

#friends-modal .friends-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
  max-height: min(58vh, 640px);
}

#friends-modal .friend-row{
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background:
    radial-gradient(circle at 20% 0%, rgba(73, 168, 255, 0.12), rgba(73, 168, 255, 0) 38%),
    linear-gradient(180deg, rgba(11, 34, 62, 0.92), rgba(6, 18, 34, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

#friends-modal .friend-row:hover{
  border-color: rgba(115, 219, 255, 0.28);
  transform: translateY(-1px);
}

#friends-modal .friend-row.is-empty{
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 16px 14px;
  background:
    radial-gradient(circle at 20% 0%, rgba(73, 168, 255, 0.10), rgba(73, 168, 255, 0) 38%),
    linear-gradient(180deg, rgba(8, 25, 48, 0.92), rgba(4, 14, 28, 0.96));
  border-style: dashed;
}

#friends-modal .friend-avatar{
  width: 50px;
  height: 50px;
  border-radius: 16px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background: rgba(3, 15, 28, 0.44);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#friends-modal .friend-avatar.is-online{
  box-shadow: 0 0 0 1px rgba(34,197,94,0.25), 0 0 18px rgba(34,197,94,0.18);
}

#friends-modal .friend-avatar.is-offline{
  opacity: 0.78;
}

#friends-modal .friend-avatar-badge{
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(4, 14, 28, 0.96);
  background: #94a3b8;
}

#friends-modal .friend-avatar.is-online .friend-avatar-badge{
  background: #22c55e;
}

#friends-modal .friend-meta{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#friends-modal .friend-name{
  font-size: 15px;
  font-weight: 900;
  color: #f5fbff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#friends-modal .friend-status{
  font-size: 12px;
  font-weight: 700;
  color: rgba(214, 235, 250, 0.72);
  line-height: 1.35;
}

#friends-modal .friend-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

#friends-modal .friend-action{
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(115, 219, 255, 0.16);
  background: linear-gradient(180deg, rgba(18, 55, 100, 0.98), rgba(10, 31, 58, 0.98));
  color: #f4fbff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
}

#friends-modal .friend-action-remove{
  border-color: rgba(248, 113, 113, 0.32);
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.98), rgba(153, 27, 27, 0.98));
}

#friends-modal .friend-action-warp{
  border-color: rgba(34, 199, 255, 0.26);
}

#friends-modal .friend-action-pm{
  border-color: rgba(168, 85, 247, 0.30);
  background: linear-gradient(180deg, rgba(91, 33, 182, 0.98), rgba(67, 20, 122, 0.98));
}

@media (max-width: 720px){
  #friends-modal .friends-card{
    width: calc(100vw - 12px) !important;
    padding: 14px !important;
  }

  #friends-modal .friend-row{
    grid-template-columns: 50px minmax(0, 1fr);
  }

  #friends-modal .friend-actions{
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.cc-button,
#quests-button-hud,
#friends-button,
#coin-display,
#backToLobbyButton,
#clear-chat-button,
#chat-toggle-button,
#shop-close,
#touch-left button,
#touch-right button,
#touch-zoom button{
  background:
    radial-gradient(120% 120% at 20% -8%, rgba(255,255,255,0.22), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, rgba(73, 168, 255, 0.98), rgba(17, 110, 214, 0.98)) !important;
  border: 1px solid rgba(34, 199, 255, 0.42) !important;
  border-radius: 16px !important;
  color: var(--cc-text) !important;
  box-shadow:
    0 10px 22px rgba(0,0,0,0.36),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -10px 18px rgba(3, 17, 42, 0.34) !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.45) !important;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease, border-color 140ms ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.cc-button:hover,
#quests-button-hud:hover,
#friends-button:hover,
#coin-display:hover,
#backToLobbyButton:hover,
#clear-chat-button:hover,
#chat-toggle-button:hover,
#shop-close:hover,
#touch-left button:hover,
#touch-right button:hover,
#touch-zoom button:hover{
  transform: translateY(-1px) !important;
  filter: brightness(1.06) saturate(1.05) !important;
  border-color: var(--cc-border-strong) !important;
}

.cc-button:active,
#quests-button-hud:active,
#friends-button:active,
#coin-display:active,
#backToLobbyButton:active,
#clear-chat-button:active,
#chat-toggle-button:active,
#shop-close:active,
#touch-left button:active,
#touch-right button:active,
#touch-zoom button:active{
  transform: translateY(1px) scale(0.99) !important;
}

#mini-profile-stack{
  position: fixed !important;
  top: max(12px, env(safe-area-inset-top)) !important;
  left: max(12px, env(safe-area-inset-left)) !important;
  z-index: 3220 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px !important;
  pointer-events: auto !important;
}

#mini-profile{
  padding: 12px !important;
  cursor: pointer !important;
}

body:not(.is-game-world) #mini-profile-stack{
  display: none !important;
  z-index: 1 !important;
}

body.is-game-world #mini-profile-stack{
  display: flex !important;
}

#mini-profile .mini-profile-top{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

#mini-profile .mini-avatar-shell{
  flex: 0 0 auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#mini-profile .mini-avatar-stage{
  background: transparent !important;
}

#mini-profile .mini-profile-meta{
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

#mini-profile .mini-profile-name-row{
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

#mini-profile .mini-profile-name{
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  color: #fff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#mini-profile .mini-profile-hp-tag::before{
  content: "" !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 20px !important;
  height: 20px !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 220px 160px !important;
  image-rendering: pixelated !important;
  pointer-events: none !important;
}

#mini-profile .mini-profile-badges{
  min-height: 0 !important;
}

#mini-profile .mini-profile-stats{
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  align-items: stretch !important;
}

#mini-profile .mini-profile-hp-track,
#mini-profile .mini-profile-mana-track,
#mini-profile .mini-profile-xp-track{
  position: relative !important;
  min-height: 22px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  border: 1px solid rgba(115, 219, 255, 0.16) !important;
  background: rgba(4, 16, 30, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

#mini-profile .mini-profile-hp-track{
  border-color: rgba(52, 211, 153, 0.22) !important;
}

#mini-profile .mini-profile-mana-track{
  border-color: rgba(64, 163, 255, 0.22) !important;
}

#mini-profile .mini-profile-xp-track{
  border-color: rgba(255, 176, 0, 0.22) !important;
}

#mini-profile .mini-profile-hp-fill,
#mini-profile .mini-profile-mana-fill,
#mini-profile .mini-profile-xp-fill{
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 0%;
  border-radius: inherit !important;
}

#mini-profile .mini-profile-hp-fill{
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.98), rgba(27, 196, 111, 0.96)) !important;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.22) !important;
}

#mini-profile .mini-profile-mana-fill{
  background: linear-gradient(90deg, rgba(64, 163, 255, 0.98), rgba(34, 199, 255, 0.96)) !important;
  box-shadow: 0 0 12px rgba(64, 163, 255, 0.22) !important;
}

#mini-profile .mini-profile-xp-fill{
  background: linear-gradient(90deg, rgba(255, 176, 0, 0.98), rgba(255, 122, 24, 0.96)) !important;
  box-shadow: 0 0 12px rgba(255, 176, 0, 0.22) !important;
}

#mini-profile .mini-profile-hp-label{
  position: relative !important;
  z-index: 1 !important;
  min-height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: #f4fbff !important;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.82),
    0 0 6px rgba(0,0,0,0.5) !important;
}

#mini-profile .mini-profile-hp-tag{
  color: rgba(188, 238, 255, 0.95) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

#mini-profile .mini-profile-hp-tag-hp::before{
  background-position: 0px -80px !important;
}

#mini-profile .mini-profile-hp-tag-mana::before{
  background-position: -20px -40px !important;
}

#mini-profile .mini-profile-hp-tag-xp::before{
  background-position: -40px -20px  !important;
}

#mini-profile .mini-profile-hp{
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #f4fbff !important;
}

#mini-profile-stack .mini-profile-actions{
  margin-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  align-items: flex-start !important;
  pointer-events: auto !important;
}

#mini-profile-stack .mini-profile-action{
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  min-height: 76px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(115, 219, 255, 0.44) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.12), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(18, 18, 22, 0.86), rgba(2, 2, 6, 0.82)) !important;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -10px 18px rgba(0, 0, 0, 0.28) !important;
  color: #f4fbff !important;
  padding: 8px 8px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  position: relative !important;
  overflow: hidden !important;
  text-align: center !important;
}

#mini-profile-stack .mini-profile-action:hover{
  transform: translateY(-1px) !important;
  filter: brightness(1.05) saturate(1.04) !important;
}

#mini-profile-stack .mini-profile-action:active{
  transform: translateY(1px) scale(0.99) !important;
}

#mini-profile-stack .mini-profile-action-icon{
  width: 50px !important;
  height: 50px !important;
  display: block !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 550px 400px !important;
  image-rendering: pixelated !important;
  flex: 0 0 auto !important;
  margin: 0 auto 0px !important;
}

#mini-profile-stack .mini-profile-action-label{
  display: block !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: #f4fbff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.72) !important;
}

#mini-profile-stack .mini-profile-action-timer .mini-profile-action-icon{
  background-position: -400px 0 !important;
}

#mini-profile-stack .mini-profile-action-daily .mini-profile-action-icon{
  background-position: -500px 0 !important;
}

#mini-profile-stack .mini-profile-action-events .mini-profile-action-icon{
  background-position: -50px 0 !important;
}

#mini-profile-stack .mini-profile-action.is-claim-ready .mini-profile-action-icon{
  transform-origin: 50% 70%;
  animation: miniProfileClaimDance 7.5s ease-in-out infinite;
  will-change: transform;
}

@keyframes miniProfileClaimDance{
  0%, 78%, 100%{
    transform: translateY(0) rotate(0deg) scale(1);
  }
  80%{
    transform: translateY(-1px) rotate(-9deg) scale(1.03);
  }
  82%{
    transform: translateY(-2px) rotate(8deg) scale(1.04);
  }
  84%{
    transform: translateY(-1px) rotate(-6deg) scale(1.03);
  }
  86%{
    transform: translateY(0) rotate(4deg) scale(1.01);
  }
  88%{
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

#mini-profile-stack .mini-profile-bottom-row{
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  pointer-events: auto !important;
}

#mini-profile-stack .monster-profile-card{
  width: clamp(240px, 21vw, 308px) !important;
  min-width: clamp(240px, 21vw, 308px) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(115, 219, 255, 0.30) !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(73, 168, 255, 0.18), rgba(73, 168, 255, 0) 42%),
    radial-gradient(circle at 80% 0%, rgba(34, 199, 255, 0.10), rgba(34, 199, 255, 0) 34%),
    linear-gradient(180deg, rgba(8, 22, 41, 0.94), rgba(4, 12, 22, 0.92)) !important;
  box-shadow:
    0 16px 30px rgba(0,0,0,0.36),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -18px 24px rgba(0, 0, 0, 0.26) !important;
  padding: 12px 12px 11px !important;
  position: relative !important;
  overflow: hidden !important;
  backdrop-filter: blur(10px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.05) !important;
  color: #f4fbff !important;
}

#mini-profile-stack .monster-profile-card::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 38%) !important;
  pointer-events: none !important;
}

#mini-profile-stack .monster-profile-close{
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(115, 219, 255, 0.18) !important;
  background: rgba(4, 15, 28, 0.72) !important;
  color: #e8f7ff !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  display: grid !important;
  place-items: center !important;
  box-shadow: 0 8px 14px rgba(0,0,0,0.28) !important;
  cursor: pointer !important;
}

#mini-profile-stack .monster-profile-close:hover{
  filter: brightness(1.08) saturate(1.05) !important;
}

#mini-profile-stack .monster-profile-head{
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding-right: 28px !important;
  margin-bottom: 10px !important;
}

#mini-profile-stack .monster-profile-avatar{
  width: 64px !important;
  height: 64px !important;
  flex: 0 0 64px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(115, 219, 255, 0.20) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.10), rgba(255,255,255,0) 42%),
    rgba(2, 12, 22, 0.56) !important;
  overflow: hidden !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

#mini-profile-stack .monster-profile-meta{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

#mini-profile-stack .monster-profile-name{
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  color: #f7fcff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#mini-profile-stack .monster-profile-sub{
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: rgba(173, 237, 255, 0.92) !important;
}

#mini-profile-stack .monster-profile-hp{
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

#mini-profile-stack .monster-profile-hp-row{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #ecf8ff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.75) !important;
}

#mini-profile-stack .monster-profile-label{
  color: rgba(188, 238, 255, 0.95) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

#mini-profile-stack .monster-profile-value{
  color: #ffffff !important;
}

#mini-profile-stack .monster-profile-hp-track{
  position: relative !important;
  height: 10px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  border: 1px solid rgba(115, 219, 255, 0.16) !important;
  background: rgba(4, 16, 30, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

#mini-profile-stack .monster-profile-hp-fill{
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 0%;
  border-radius: inherit !important;
  background: linear-gradient(90deg, rgba(255, 91, 120, 0.98), rgba(255, 163, 95, 0.96)) !important;
  box-shadow: 0 0 12px rgba(255, 122, 95, 0.22) !important;
}

#player-info-modal .player-info-card{
  width: min(1180px, calc(100vw - 24px)) !important;
  max-width: 1180px !important;
  max-height: calc(100vh - 24px) !important;
  padding: 18px !important;
  overflow: auto !important;
  position: relative !important;
}

#player-info-modal .pinfobutton{
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 2 !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(115, 219, 255, 0.28) !important;
  background: rgba(3, 18, 36, 0.82) !important;
  color: #fff !important;
  font-size: 22px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.28) !important;
}

#player-info-modal .pinfobutton:hover{
  filter: brightness(1.1) !important;
  border-color: rgba(115, 219, 255, 0.42) !important;
}

#gift-overlay,
#wheel-overlay{
  position: fixed;
  inset: 0;
  z-index: 13040;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background:
    radial-gradient(circle at 16% 14%, rgba(168, 85, 247, 0.22), rgba(168, 85, 247, 0) 28%),
    radial-gradient(circle at 88% 10%, rgba(251, 191, 36, 0.16), rgba(251, 191, 36, 0) 24%),
    radial-gradient(circle at 50% 0%, rgba(73, 168, 255, 0.16), rgba(0, 0, 0, 0.76) 60%),
    rgba(0, 0, 0, 0.62);
}

.mini-reward-modal{
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(115, 219, 255, 0.22);
  background:
    radial-gradient(circle at 18% 0%, rgba(73, 168, 255, 0.18), rgba(73, 168, 255, 0) 40%),
    linear-gradient(180deg, rgba(7, 21, 39, 0.98), rgba(4, 14, 28, 0.98));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #f4fbff;
  position: relative;
}

.mini-reward-modal-gift{
  width: min(1140px, calc(100vw - 20px));
  padding: 20px;
  border-color: rgba(168, 85, 247, 0.28);
  background:
  radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  isolation: isolate;
}

.mini-reward-modal-gift::before,
.mini-reward-modal-gift::after{
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 24px;
  pointer-events: none;
  z-index: 0;
}

.mini-reward-modal-gift::before{
  border: 1px solid rgba(168, 85, 247, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    inset 0 0 72px rgba(168, 85, 247, 0.05);
}

.mini-reward-modal-gift::after{
  inset: 0;
  background:
    linear-gradient(90deg, rgba(168, 85, 247, 0.08), rgba(168, 85, 247, 0) 18%),
    linear-gradient(270deg, rgba(251, 191, 36, 0.06), rgba(251, 191, 36, 0) 14%);
  opacity: 0.8;
  mix-blend-mode: screen;
}

.mini-reward-modal-wheel{
  width: min(1080px, calc(100vw - 24px));
}

#drop-modal{
  z-index: 13150 !important;
}

.mini-reward-hero{
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(168, 85, 247, 0.16);
  background:
    radial-gradient(circle at 14% 0%, rgba(168, 85, 247, 0.22), rgba(168, 85, 247, 0) 40%),
    radial-gradient(circle at 92% 10%, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0) 28%),
    linear-gradient(180deg, rgba(12, 14, 35, 0.96), rgba(5, 10, 22, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 16px 30px rgba(0,0,0,0.18);
}

.mini-reward-hero-art{
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 auto;
}

.mini-reward-hero-orb{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.32), rgba(255,255,255,0) 38%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.42), rgba(168, 85, 247, 0.10) 44%, rgba(168, 85, 247, 0) 70%);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.18),
    0 18px 36px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

.mini-reward-hero-giftbox{
  position: absolute;
  left: 50%;
  top: 52%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%) rotate(3deg);
  border-radius: 14px;
  background: linear-gradient(180deg, #facc15, #d97706);
  box-shadow:
    0 12px 24px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.mini-reward-hero-giftbox::before,
.mini-reward-hero-giftbox::after{
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.86);
}

.mini-reward-hero-giftbox::before{
  left: 24px;
  top: -10px;
  width: 8px;
  height: 76px;
  border-radius: 999px;
}

.mini-reward-hero-giftbox::after{
  left: -10px;
  top: 24px;
  width: 76px;
  height: 8px;
  border-radius: 999px;
}

.mini-reward-hero-spark{
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 16px rgba(125, 211, 252, 0.52);
}

.mini-reward-hero-spark-a{ left: 0; top: 16px; }
.mini-reward-hero-spark-b{ right: 6px; top: 12px; background: #fbbf24; box-shadow: 0 0 16px rgba(251, 191, 36, 0.52); }
.mini-reward-hero-spark-c{ right: 0; bottom: 18px; background: #c084fc; box-shadow: 0 0 16px rgba(192, 132, 252, 0.52); }

.mini-reward-hero-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-reward-hero-title{
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #f5fbff;
}

.mini-reward-hero-subtitle{
  color: rgba(228, 245, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  max-width: 42ch;
}

.mini-reward-streak{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.mini-reward-streak-label{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 171, 252, 0.92);
}

.mini-reward-streak-track{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-reward-streak-track span{
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,0.16), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(29, 18, 53, 0.98), rgba(11, 10, 26, 0.98));
  color: rgba(228, 245, 255, 0.88);
  font-size: 12px;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 18px rgba(0,0,0,0.18);
}

.mini-reward-streak-track span.is-active{
  border-color: rgba(251, 191, 36, 0.55);
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,0.22), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(251, 191, 36, 0.98), rgba(217, 119, 6, 0.98));
  color: #1c1200;
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.16),
    0 0 24px rgba(251, 191, 36, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

.mini-reward-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-reward-head > div:first-child{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.mini-reward-head-icon{
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,0.18), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, rgba(22, 16, 48, 0.98), rgba(8, 10, 22, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 12px 20px rgba(0,0,0,0.18);
  overflow: hidden;
}

.mini-reward-head-icon-orb{
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.24), rgba(255,255,255,0) 38%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.42), rgba(168, 85, 247, 0.08) 54%, rgba(168, 85, 247, 0) 72%);
}

.mini-reward-head-icon-giftbox{
  position: absolute;
  left: 50%;
  top: 51%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%) rotate(2deg);
  border-radius: 6px;
  background: linear-gradient(180deg, #fbbf24, #d97706);
  box-shadow:
    0 8px 14px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.16);
}

.mini-reward-head-icon-giftbox::before,
.mini-reward-head-icon-giftbox::after{
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.88);
  border-radius: 999px;
}

.mini-reward-head-icon-giftbox::before{
  left: 9px;
  top: -4px;
  width: 4px;
  height: 30px;
}

.mini-reward-head-icon-giftbox::after{
  left: -4px;
  top: 9px;
  width: 30px;
  height: 4px;
}

.mini-reward-kicker{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(173, 237, 255, 0.92);
  margin-bottom: 4px;
}

.mini-reward-head h2{
  margin: 0;
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.05;
  font-weight: 900;
  color: #f5fbff;
}

.mini-reward-close{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(115, 219, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
  color: #f4fbff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.mini-reward-body{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  overflow: auto;
  padding-right: 2px;
}

.mini-reward-modal-gift .mini-reward-body{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-reward-card,
.mini-reward-wheel-stage,
.mini-reward-wheel-panel{
  border-radius: 22px;
  border: 1px solid rgba(168, 85, 247, 0.16);
  background:
    radial-gradient(circle at 20% 0%, rgba(168, 85, 247, 0.14), rgba(168, 85, 247, 0) 38%),
    linear-gradient(180deg, rgba(14, 12, 34, 0.95), rgba(6, 9, 22, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 18px 36px rgba(0,0,0,0.18);
}

.mini-reward-card{
  min-height: 142px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-reward-card-title{
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f5fbff;
}

.mini-reward-card p{
  margin: 0;
  color: rgba(228, 245, 255, 0.84);
  line-height: 1.6;
  font-size: 13px;
  font-weight: 700;
}

.mini-reward-card-note{
  margin-top: auto;
  color: rgba(228, 245, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.mini-reward-card-topline{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 171, 252, 0.94);
}

.mini-reward-modal-gift .mini-reward-card:nth-child(1){
  background:
    radial-gradient(circle at 18% 0%, rgba(59, 130, 246, 0.24), rgba(59, 130, 246, 0) 34%),
    linear-gradient(180deg, rgba(9, 18, 42, 0.98), rgba(5, 10, 24, 0.98));
}

.mini-reward-modal-gift .mini-reward-card:nth-child(2){
  background:
    radial-gradient(circle at 18% 0%, rgba(168, 85, 247, 0.22), rgba(168, 85, 247, 0) 34%),
    linear-gradient(180deg, rgba(17, 10, 42, 0.98), rgba(6, 8, 22, 0.98));
}

.mini-reward-modal-gift .mini-reward-card:nth-child(3){
  background:
    radial-gradient(circle at 18% 0%, rgba(251, 191, 36, 0.22), rgba(251, 191, 36, 0) 34%),
    linear-gradient(180deg, rgba(40, 24, 7, 0.98), rgba(10, 8, 20, 0.98));
}

.mini-reward-gift-layout{
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.mini-reward-gift-art{
  position: relative;
  width: 150px;
  height: 118px;
  border-radius: 22px;
  border: 1px solid rgba(168, 85, 247, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 16px 28px rgba(0,0,0,0.24);
  overflow: hidden;
}

.mini-reward-gift-art::before,
.mini-reward-gift-art::after{
  content: "";
  position: absolute;
}

.mini-reward-gift-art-blue{
  background:
    url("/photos/chest_tilemap.png") 0 0 / 1200px 832px no-repeat,
    linear-gradient(180deg, rgba(8, 12, 32, 0.98), rgba(4, 8, 18, 0.98));
  background-position: 0px 0px, 0 0;
  image-rendering: pixelated;
}

.mini-reward-gift-art-purple{
  background:
    url("/photos/chest_tilemap.png") -200px 0px / 1200px 832px no-repeat,
    linear-gradient(180deg, rgba(11, 7, 32, 0.98), rgba(4, 8, 18, 0.98));
  background-position: -300px 0px, 0 0;
  image-rendering: pixelated;
}

.mini-reward-gift-art-gold{
  background:
    url("/photos/chest_tilemap.png") -300px 0px / 1200px 832px no-repeat,
    linear-gradient(180deg, rgba(25, 14, 6, 0.98), rgba(4, 8, 18, 0.98));
  background-position: -450px 0px, 0 0;
  image-rendering: pixelated;
}

.mini-reward-gift-art::before{
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -42%) rotate(4deg);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(0,0,0,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.mini-reward-gift-art::after{
  left: 50%;
  top: 50%;
  width: 78px;
  height: 10px;
  transform: translate(-50%, -6px);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  box-shadow:
    0 20px 0 rgba(255,255,255,0.9),
    0 0 0 8px rgba(255,255,255,0.0);
}

.mini-reward-gift-art-blue::before,
.mini-reward-gift-art-blue::after,
.mini-reward-gift-art-purple::before,
.mini-reward-gift-art-purple::after,
.mini-reward-gift-art-gold::before,
.mini-reward-gift-art-gold::after{
  content: none;
}

.mini-reward-gift-content{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-reward-gift-subtitle{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 171, 252, 0.9);
}

.mini-reward-gift-list{
  display: grid;
  gap: 8px;
}

.mini-reward-gift-row{
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  color: rgba(228, 245, 255, 0.92);
}

.mini-reward-gift-row strong{
  font-weight: 900;
  color: #f8fbff;
  text-align: right;
}

.mini-reward-gift-ico{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255,255,255,0.18);
}

.mini-reward-gift-coin{ background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.5), rgba(255,255,255,0) 34%), linear-gradient(180deg, #fbbf24, #d97706); }
.mini-reward-gift-xp{ background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.4), rgba(255,255,255,0) 34%), linear-gradient(180deg, #60a5fa, #2563eb); }
.mini-reward-gift-block{ background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0) 34%), linear-gradient(180deg, #34d399, #059669); }
.mini-reward-gift-rare{ background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0) 34%), linear-gradient(180deg, #c084fc, #7c3aed); }
.mini-reward-gift-mat{ background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0) 34%), linear-gradient(180deg, #34d399, #15803d); }
.mini-reward-gift-box{ background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0) 34%), linear-gradient(180deg, #f472b6, #db2777); }
.mini-reward-gift-aura{ background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0) 34%), linear-gradient(180deg, #22d3ee, #0ea5e9); }

.mini-reward-progress-wrap{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-reward-progress-label{
  font-size: 12px;
  font-weight: 800;
  color: rgba(240, 171, 252, 0.9);
  letter-spacing: 0.04em;
}

.mini-reward-progress-bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(4, 16, 30, 0.72);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.mini-reward-progress-bar span{
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.98), rgba(251, 191, 36, 0.98));
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.28);
}

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

.mini-reward-bonus-tile{
  min-height: 74px;
  border-radius: 18px;
  border: 1px solid rgba(168, 85, 247, 0.16);
  background:
    radial-gradient(circle at 30% 0%, rgba(251, 191, 36, 0.14), rgba(251, 191, 36, 0) 40%),
    linear-gradient(180deg, rgba(15, 11, 34, 0.96), rgba(6, 8, 20, 0.98));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.mini-reward-bonus-tile span{
  font-size: 22px;
  font-weight: 900;
  color: #f8fbff;
  line-height: 1;
}

.mini-reward-bonus-tile strong{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(173, 237, 255, 0.9);
}

.mini-reward-card-footer{
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-reward-status{
  display: block;
  min-height: 18px;
  color: rgba(240, 171, 252, 0.92);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.mini-reward-wheel-status{
  margin-top: -2px;
}

.mini-reward-card-btn{
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  background:
    radial-gradient(120% 120% at 20% -8%, rgba(255,255,255,0.18), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, rgba(251, 191, 36, 0.98), rgba(217, 119, 6, 0.98));
  color: #f4fbff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    0 10px 18px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.mini-reward-card-btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

.mini-reward-modal-gift .mini-reward-card-accent{
  grid-column: 1 / -1;
  min-height: 170px;
  background:
    radial-gradient(circle at 18% 0%, rgba(168, 85, 247, 0.22), rgba(168, 85, 247, 0) 36%),
    radial-gradient(circle at 82% 0%, rgba(251, 191, 36, 0.14), rgba(251, 191, 36, 0) 30%),
    linear-gradient(180deg, rgba(12, 10, 31, 0.98), rgba(5, 7, 18, 0.98));
}

.mini-reward-modal-gift .mini-reward-card-accent .mini-reward-bonus-grid{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-reward-modal-gift .mini-reward-card-accent .mini-reward-card-note{
  text-align: center;
  color: rgba(240, 171, 252, 0.9);
}

.mini-reward-modal-gift > *{
  position: relative;
  z-index: 1;
}

.mini-reward-visual-row,
.mini-reward-trophy-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-reward-visual-chip,
.mini-reward-trophy-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background: rgba(4, 16, 30, 0.58);
  color: #f4fbff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mini-reward-preview{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 2px;
}

.mini-reward-preview-icon{
  aspect-ratio: 1;
  border-radius: 18px;
  border: 1px solid rgba(115, 219, 255, 0.16);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.24), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, rgba(12, 32, 58, 0.98), rgba(5, 15, 30, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 10px 18px rgba(0,0,0,0.24);
  position: relative;
  overflow: hidden;
}

.mini-reward-preview-icon::before,
.mini-reward-preview-icon::after{
  content: "";
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
}

.mini-reward-preview-xp::before{
  width: 46%;
  height: 46%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.96), rgba(96, 165, 250, 0.18));
}

.mini-reward-preview-block::before{
  width: 52%;
  height: 52%;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.92), rgba(16, 185, 129, 0.42));
}

.mini-reward-preview-rare::before{
  width: 54%;
  height: 54%;
  background: conic-gradient(from 0deg, #fbbf24, #f97316, #8b5cf6, #fbbf24);
}

.mini-reward-preview-coin::before{
  width: 54%;
  height: 54%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.44), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(251, 191, 36, 0.98), rgba(217, 119, 6, 0.92));
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.24);
}

.mini-reward-preview-box::before{
  width: 58%;
  height: 58%;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.96), rgba(37, 99, 235, 0.92));
}

.mini-reward-preview-mat::before{
  width: 50%;
  height: 50%;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.96), rgba(21, 128, 61, 0.92));
}

.mini-reward-preview-cosmetic::before{
  width: 50%;
  height: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.42), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(236, 72, 153, 0.96), rgba(190, 24, 93, 0.92));
}

.mini-reward-preview-aura::before{
  width: 54%;
  height: 54%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.98), rgba(45, 212, 191, 0.10) 68%);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.32);
}

.mini-reward-preview-lock::before{
  width: 52%;
  height: 42%;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.96), rgba(71, 85, 105, 0.92));
}

.mini-reward-preview-lock::after{
  width: 28%;
  height: 28%;
  top: 35%;
  background: rgba(255,255,255,0.94);
  border-radius: 999px;
}

.mini-reward-bullets{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.mini-reward-bullets li{
  position: relative;
  padding-left: 18px;
  color: rgba(228, 245, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.mini-reward-bullets li::before{
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #7dd3fc;
  font-weight: 900;
}

.mini-reward-card-accent{
  border-color: rgba(251, 191, 36, 0.30);
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0) 38%),
    linear-gradient(180deg, rgba(18, 30, 51, 0.96), rgba(7, 17, 30, 0.98));
}

.mini-reward-wheel-banner{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  margin-bottom: 12px;
  border-radius: 24px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background:
    radial-gradient(circle at 50% 24%, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0) 44%),
    radial-gradient(circle at 50% 50%, rgba(73, 168, 255, 0.16), rgba(73, 168, 255, 0) 58%),
    linear-gradient(180deg, rgba(9, 26, 48, 0.96), rgba(5, 15, 30, 0.98));
  overflow: hidden;
}

.mini-reward-wheel-banner-ring{
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.18);
  box-shadow: inset 0 0 0 10px rgba(125, 211, 252, 0.03);
}

.mini-reward-wheel-banner-stat{
  position: relative;
  z-index: 1;
  text-align: center;
}

.mini-reward-wheel-banner-value{
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  color: #f8fbff;
}

.mini-reward-wheel-banner-label{
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(173, 237, 255, 0.92);
}

.mini-reward-wheel-body{
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr);
  align-items: stretch;
  gap: 14px;
}

.mini-reward-wheel-stage{
  position: relative;
  min-height: 590px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 28px;
  --wheel-start: -112.5deg;
  --wheel-radius: min(212px, 37vw);
  background:
    radial-gradient(circle at 50% 44%, rgba(73, 168, 255, 0.20), rgba(73, 168, 255, 0) 28%),
    radial-gradient(circle at 50% 50%, rgba(12, 40, 82, 0.96), rgba(4, 14, 28, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(115, 219, 255, 0.10),
    inset 0 0 70px rgba(34, 199, 255, 0.10);
}

.mini-reward-wheel-glow{
  position: absolute;
  inset: 4% 2%;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.16), rgba(59, 130, 246, 0) 38%),
    radial-gradient(circle at 50% 48%, rgba(34, 199, 255, 0.12), rgba(34, 199, 255, 0) 58%);
  filter: blur(8px);
  pointer-events: none;
}

.mini-reward-wheel-shell{
  position: relative;
  width: min(540px, 90%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  animation: rewardWheelFloat 7s ease-in-out infinite;
}

.mini-reward-wheel-pointer{
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 30px solid #fbbf24;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.42));
  z-index: 2;
}

.mini-reward-wheel{
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 10px solid rgba(27, 77, 149, 0.96);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06), rgba(255,255,255,0) 28%),
    conic-gradient(
      from var(--wheel-start),
      #fbbf24 0deg 45deg,
      #1d4ed8 45deg 90deg,
      #22c55e 90deg 135deg,
      #7c3aed 135deg 180deg,
      #f59e0b 180deg 225deg,
      #16a34a 225deg 270deg,
      #ef4444 270deg 315deg,
      #2563eb 315deg 360deg
    );
  box-shadow:
    0 36px 82px rgba(0, 0, 0, 0.52),
    0 0 0 10px rgba(34, 199, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 0 0 1px rgba(255,255,255,0.12),
    inset 0 0 28px rgba(255,255,255,0.08);
  transform: rotate(var(--wheel-rotation, 0deg));
  transition: transform 4.8s cubic-bezier(0.12, 0.78, 0.08, 1);
  will-change: transform;
  overflow: hidden;
}

.mini-reward-wheel.is-spinning{
  filter: saturate(1.08) brightness(1.06);
}

.mini-reward-wheel::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.16), rgba(255,255,255,0) 30%),
    repeating-conic-gradient(from var(--wheel-start), rgba(0,0,0,0.34) 0deg 1.6deg, rgba(255,255,255,0) 1.6deg 45deg);
  mix-blend-mode: soft-light;
  pointer-events: none;
  opacity: 0.82;
}

.mini-reward-wheel::after{
  content: "";
  position: absolute;
  inset: 50%;
  width: 132px;
  height: 132px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.30), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(10, 16, 27, 0.98), rgba(1, 6, 13, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 12px 24px rgba(0,0,0,0.42);
}

.mini-reward-wheel span{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 116px;
  text-align: center;
  color: #f8fbff;
  font-size: 11px;
  font-weight: 900;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.85),
    0 0 8px rgba(0,0,0,0.28);
  letter-spacing: 0.04em;
  line-height: 1.06;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 6px 12px rgba(0,0,0,0.16);
  backdrop-filter: blur(2px);
}

.mini-wheel-segment{ position: absolute; }
.mini-wheel-segment-1{ --seg-angle: -90deg; transform: translate(-50%, -50%) rotate(var(--seg-angle)) translateY(calc(var(--wheel-radius) * -1)) rotate(calc(var(--seg-angle) * -1)); }
.mini-wheel-segment-2{ --seg-angle: -45deg; transform: translate(-50%, -50%) rotate(var(--seg-angle)) translateY(calc(var(--wheel-radius) * -1)) rotate(calc(var(--seg-angle) * -1)); }
.mini-wheel-segment-3{ --seg-angle: 0deg; transform: translate(-50%, -50%) rotate(var(--seg-angle)) translateY(calc(var(--wheel-radius) * -1)) rotate(calc(var(--seg-angle) * -1)); }
.mini-wheel-segment-4{ --seg-angle: 45deg; transform: translate(-50%, -50%) rotate(var(--seg-angle)) translateY(calc(var(--wheel-radius) * -1)) rotate(calc(var(--seg-angle) * -1)); }
.mini-wheel-segment-5{ --seg-angle: 90deg; transform: translate(-50%, -50%) rotate(var(--seg-angle)) translateY(calc(var(--wheel-radius) * -1)) rotate(calc(var(--seg-angle) * -1)); }
.mini-wheel-segment-6{ --seg-angle: 135deg; transform: translate(-50%, -50%) rotate(var(--seg-angle)) translateY(calc(var(--wheel-radius) * -1)) rotate(calc(var(--seg-angle) * -1)); }
.mini-wheel-segment-7{ --seg-angle: 180deg; transform: translate(-50%, -50%) rotate(var(--seg-angle)) translateY(calc(var(--wheel-radius) * -1)) rotate(calc(var(--seg-angle) * -1)); }
.mini-wheel-segment-8{ --seg-angle: 225deg; transform: translate(-50%, -50%) rotate(var(--seg-angle)) translateY(calc(var(--wheel-radius) * -1)) rotate(calc(var(--seg-angle) * -1)); }

.mini-reward-wheel-panel{
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow: auto;
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(73, 168, 255, 0.18), rgba(73, 168, 255, 0) 34%),
    linear-gradient(180deg, rgba(6, 19, 35, 0.98), rgba(3, 12, 24, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 18px 40px rgba(0,0,0,0.24);
}

.mini-reward-wheel-stat-card,
.mini-reward-wheel-timer-card,
.mini-reward-wheel-rewards-card{
  border-radius: 20px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background:
    radial-gradient(circle at 18% 0%, rgba(73, 168, 255, 0.12), rgba(73, 168, 255, 0) 38%),
    linear-gradient(180deg, rgba(11, 34, 62, 0.92), rgba(6, 18, 34, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.mini-reward-wheel-stat-card{
  text-align: center;
  padding: 18px 14px 14px;
}

.mini-reward-wheel-stat-value{
  font-size: 44px;
  line-height: 1;
  font-weight: 900;
  color: #f8fbff;
}

.mini-reward-wheel-stat-label{
  margin-top: 4px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(173, 237, 255, 0.92);
}

.mini-reward-wheel-timer-title,
.mini-reward-wheel-rewards-title{
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(173, 237, 255, 0.92);
  margin-bottom: 10px;
}

.mini-reward-wheel-timer-value{
  min-height: 0;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
  color: #f8c04f;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5);
}

.mini-reward-wheel-reward-list{
  display: grid;
  gap: 8px;
}

.mini-reward-wheel-reward-row{
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  color: rgba(228, 245, 255, 0.92);
}

.mini-reward-wheel-reward-row strong{
  color: #f8fbff;
  font-size: 13px;
  font-weight: 900;
}

.mini-reward-wheel-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255,255,255,0.18);
}

.mini-reward-wheel-dot.is-common{ background: #22c55e; }
.mini-reward-wheel-dot.is-rare{ background: #60a5fa; }
.mini-reward-wheel-dot.is-epic{ background: #a855f7; }
.mini-reward-wheel-dot.is-legendary{ background: #f59e0b; }

.mini-reward-spin{
  min-height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(74, 222, 128, 0.36);
  background:
    radial-gradient(120% 120% at 20% -8%, rgba(255,255,255,0.16), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, rgba(91, 185, 74, 0.98), rgba(28, 128, 42, 0.98));
  color: #f4fbff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.36),
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -10px 18px rgba(4, 80, 18, 0.24);
  position: relative;
}

.mini-reward-spin::after{
  content: "1";
  position: absolute;
  right: -8px;
  top: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  line-height: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.32);
}

.mini-reward-spin:disabled{
  opacity: 0.62;
  cursor: not-allowed;
  filter: grayscale(0.1);
}

.mini-reward-result{
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background: rgba(4, 16, 30, 0.62);
  color: rgba(228, 245, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.mini-reward-result.is-rich{
  display: grid;
  gap: 10px;
}

.mini-reward-result-title{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(173, 237, 255, 0.92);
}

.mini-reward-result-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-reward-result-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background: rgba(255,255,255,0.05);
  color: #f4fbff;
  font-size: 12px;
  font-weight: 800;
}

.mini-reward-result-chip .inventory-icon,
.mini-reward-result-chip img{
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
}

@keyframes rewardWheelFloat{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-4px); }
}

@media (max-width: 920px){
  .mini-reward-body,
  .mini-reward-modal-gift .mini-reward-body,
  .mini-reward-wheel-body{
    grid-template-columns: 1fr;
  }

  .mini-reward-hero{
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .mini-reward-streak-track{
    justify-content: center;
  }

  .mini-reward-wheel-stage{
    min-height: 420px;
  }

  .mini-reward-wheel{
    width: min(420px, 84vw);
  }
}

@media (max-width: 640px){
  .mini-reward-modal-gift{
    padding: 16px;
  }

  .mini-reward-head{
    align-items: center;
    gap: 10px;
  }

  .mini-reward-head > div:first-child{
    gap: 10px;
  }

  .mini-reward-head-icon{
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 14px;
  }

  .mini-reward-head-icon-giftbox{
    width: 18px;
    height: 18px;
  }

  .mini-reward-head-icon-giftbox::before{
    left: 7px;
    top: -3px;
    width: 4px;
    height: 24px;
  }

  .mini-reward-head-icon-giftbox::after{
    left: -3px;
    top: 7px;
    width: 24px;
    height: 4px;
  }

  .mini-reward-head h2{
    font-size: clamp(20px, 7vw, 30px);
  }

  .mini-reward-wheel-panel{
    padding: 12px;
  }

  .mini-reward-wheel-stage{
    min-height: 360px;
  }

  .mini-reward-wheel{
    width: min(320px, 86vw);
    border-width: 12px;
  }

  .mini-reward-wheel-stat-value{
    font-size: 38px;
  }

  .mini-reward-wheel-timer-value{
    font-size: 22px;
  }

  .mini-reward-streak-track span{
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .mini-reward-modal-gift .mini-reward-card-accent .mini-reward-bonus-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#megaphone-modal .mega-card{
  position: relative !important;
  width: min(720px, calc(100vw - 24px)) !important;
  padding: 22px !important;
  border-radius: 26px !important;
  border: 1px solid rgba(115, 219, 255, 0.24) !important;
  background:
    radial-gradient(120% 120% at 18% -10%, rgba(73, 168, 255, 0.16), rgba(73, 168, 255, 0) 46%),
    linear-gradient(180deg, rgba(8, 25, 48, 0.98), rgba(6, 18, 34, 0.99)) !important;
  box-shadow:
    0 28px 70px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
  overflow: hidden !important;
}

#megaphone-modal .mega-card::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.09), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(34, 199, 255, 0.10), transparent 24%);
  pointer-events: none;
}

#megaphone-modal .mega-header,
#megaphone-modal .mega-body{
  position: relative;
  z-index: 1;
}

#megaphone-modal .mega-header{
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 16px !important;
}

#megaphone-modal .mega-h{
  font-size: 28px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: #fff !important;
  letter-spacing: 0.02em !important;
}

#megaphone-modal .mega-sub{
  margin-top: 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: rgba(215, 236, 250, 0.72) !important;
}

#megaphone-modal .mega-remaining{
  flex: 0 0 auto !important;
  min-width: 64px !important;
  padding: 10px 14px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(115, 219, 255, 0.24) !important;
  background: rgba(3, 18, 36, 0.8) !important;
  color: #b8f4ff !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  text-align: center !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

#megaphone-modal .mega-body{
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

#megaphone-modal .mega-text{
  width: 100% !important;
  min-height: 156px !important;
  resize: vertical !important;
  padding: 16px 18px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(115, 219, 255, 0.26) !important;
  background:
    linear-gradient(180deg, rgba(5, 20, 38, 0.96), rgba(4, 14, 28, 0.98)) !important;
  color: #f4fbff !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
  outline: none !important;
}

#megaphone-modal .mega-text::placeholder{
  color: rgba(190, 226, 245, 0.55) !important;
}

#megaphone-modal .mega-text:focus{
  border-color: rgba(34, 199, 255, 0.64) !important;
  box-shadow:
    0 0 0 3px rgba(34, 199, 255, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

#megaphone-modal .mega-actions{
  display: flex !important;
  gap: 12px !important;
  justify-content: flex-end !important;
}

#megaphone-modal .mega-btn{
  min-width: 128px !important;
  padding: 12px 18px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(115, 219, 255, 0.24) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

#megaphone-modal .mega-btn-cancel{
  background: linear-gradient(180deg, rgba(8, 29, 55, 0.96), rgba(11, 44, 84, 0.96)) !important;
  color: #dbf7ff !important;
}

#megaphone-modal .mega-btn-send{
  background: linear-gradient(180deg, rgba(73, 168, 255, 0.98), rgba(17, 110, 214, 0.98)) !important;
  color: #fff !important;
}

#megaphone-modal .mega-btn:hover{
  transform: translateY(-1px) !important;
  filter: brightness(1.05) !important;
}

#megaphone-modal .mega-btn:active{
  transform: translateY(1px) scale(0.99) !important;
}

@media (max-width: 640px){
  #megaphone-modal{
    padding: 12px !important;
  }

  #megaphone-modal .mega-card{
    width: calc(100vw - 16px) !important;
    padding: 16px !important;
    border-radius: 20px !important;
  }

  #megaphone-modal .mega-header{
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  #megaphone-modal .mega-text{
    min-height: 140px !important;
  }

  #megaphone-modal .mega-actions{
    flex-direction: column !important;
  }

  #megaphone-modal .mega-btn{
    width: 100% !important;
  }
}

#player-info-content{
  gap: 16px !important;
}

#player-info-content.my-profile .pi-hero,
#player-info-content.other-profile .pi-hero{
  display: grid !important;
  grid-template-columns: minmax(270px, 0.92fr) minmax(0, 1.08fr) !important;
  gap: 18px !important;
  align-items: start !important;
}

#player-info-content .pi-identity{
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  min-width: 0 !important;
}

#player-info-content .pi-avatar-wrap{
  width: 132px !important;
  height: 132px !important;
  flex: 0 0 auto !important;
  border-radius: 22px !important;
  border: 1px solid rgba(115, 219, 255, 0.28) !important;
  background:
    radial-gradient(circle at 35% 18%, rgba(255,255,255,0.16), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(8, 33, 63, 0.95), rgba(5, 20, 38, 0.98)) !important;
  box-shadow:
    0 14px 28px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#player-info-content .pi-avatar-stage{
  width: 124px !important;
  height: 124px !important;
  overflow: visible !important;
  background: transparent !important;
}

#player-info-content .pi-hero-meta{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

#player-info-content .pi-name-row{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

#player-info-content .pi-name{
  font-size: 28px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -0.02em !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35) !important;
}

#player-info-content .pi-sub{
  font-size: 14px !important;
  color: rgba(217, 244, 255, 0.84) !important;
  font-weight: 800 !important;
}

#player-info-content .pi-age-wrap{
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  background: rgba(3, 15, 28, 0.34) !important;
  border: 1px solid rgba(115, 219, 255, 0.12) !important;
}

#player-info-content #xp-text{
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  color: rgba(233, 247, 255, 0.9) !important;
}

#player-info-content #xp-fill{
  border-radius: inherit !important;
}

#player-info-content .pi-equipped{
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#player-info-content .pi-equipped-grid{
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)) !important;
  gap: 10px !important;
}

#player-info-content .pi-equipped-item{
  position: relative !important;
  display: block !important;
  width: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  aspect-ratio: 1 / 1 !important;
  padding: 4px !important;
  border-radius: 14px !important;
  border: 1px solid rgb(9 84 158) !important;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,0.10), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(6, 25, 48, 0.96), rgba(4, 16, 30, 0.96)) !important;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
  overflow: hidden !important;
}

#player-info-content .pi-equipped-item[data-item-key]{
  cursor: pointer !important;
}

#player-info-content .pi-equipped-item.is-active{
  border-color: rgba(34, 199, 255, 0.96) !important;
  box-shadow:
    0 0 0 2px rgba(34, 199, 255, 0.28) inset,
    0 0 16px rgba(34, 199, 255, 0.20) !important;
}

#player-info-content .pi-equipped-item.is-tooltip-active{
  border-color: rgba(255, 215, 120, 0.98) !important;
  box-shadow:
    0 0 0 2px rgba(255, 215, 120, 0.26) inset,
    0 0 18px rgba(255, 198, 90, 0.18) !important;
  transform: translateY(-1px) !important;
}

#player-info-content .pi-equipped-remove{
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
  z-index: 4 !important;
  width: 18px !important;
  height: 18px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, rgba(255, 104, 104, 0.98), rgba(191, 24, 24, 0.98)) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  padding: 0 !important;
  cursor: pointer !important;
  box-shadow: 0 6px 12px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.22) !important;
}

#player-info-content .pi-equipped-remove:hover{
  transform: translateY(-1px) scale(1.03) !important;
}

#player-info-content .pi-equipped-icon-shell{
  position: absolute !important;
  inset: 11px !important;
  width: auto !important;
  height: auto !important;
  display: grid !important;
  place-items: center !important;
}

#player-info-content .pi-equipped-icon,
#player-info-content .pi-equipped-icon-empty{
  width: 100% !important;
  height: 100% !important;
}

#player-info-content .pi-equipped-icon-empty-state{
  opacity: 0.58 !important;
  filter: grayscale(1) brightness(1.08) contrast(0.92) !important;
  transform: scale(0.92) !important;
}

#player-info-content .pi-equipped-item:not(.is-active) .pi-equipped-icon-empty-state{
  mix-blend-mode: normal !important;
}

#player-info-content .pi-equipped-slot{
  position: absolute !important;
  left: 4px !important;
  right: 4px !important;
  top: 4px !important;
  z-index: 2 !important;
  font-size: 8px !important;
  letter-spacing: 0.06em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  color: rgba(173, 237, 255, 0.92) !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.75) !important;
  pointer-events: none !important;
}

#player-info-content .pi-equipped-value{
  display: none !important;
}

#player-info-modal .pi-equipment-info-card{
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  --pi-equipment-card-border-color: rgba(115, 219, 255, 0.22);
  --pi-equipment-card-glow: rgba(73, 168, 255, 0.12);
  --pi-equipment-card-bg:
    linear-gradient(180deg, rgba(8, 25, 48, 0.96), rgba(6, 18, 34, 0.98));
  border: 1px solid color-mix(in srgb, var(--pi-equipment-card-border-color) 70%, #ffffff 30%) !important;
  background:
    radial-gradient(140% 120% at 18% 0%, color-mix(in srgb, var(--pi-equipment-card-border-color) 18%, transparent), transparent 42%),
    var(--pi-equipment-card-bg) !important;
  box-shadow:
    0 18px 36px rgba(0,0,0,0.34),
    0 0 0 1px color-mix(in srgb, var(--pi-equipment-card-border-color) 28%, transparent) inset,
    0 0 18px var(--pi-equipment-card-glow) !important;
}

#player-info-modal .pi-equipment-tooltip{
  width: 100% !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

#player-info-modal .pi-equipment-tooltip-inner{
  position: relative !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 12px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--pi-equipment-card-border-color, rgba(52, 152, 255, 0.32)) 26%, rgba(255, 255, 255, 0.10)), transparent 28%),
    var(--pi-equipment-card-bg, linear-gradient(180deg, rgb(19 73 132 / 98%), rgb(0 49 105 / 98%))) !important;
  border: 1px solid color-mix(in srgb, var(--pi-equipment-card-border-color, rgba(52, 152, 255, 0.32)) 72%, #ffffff 28%) !important;
  box-shadow:
    0 22px 52px color-mix(in srgb, var(--pi-equipment-card-glow, rgba(65, 115, 255, 0.12)) 82%, transparent),
    0 0 0 1px color-mix(in srgb, var(--pi-equipment-card-border-color, rgba(28, 80, 160, 0.18)) 38%, transparent) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.38) !important;
  color: #ffffff !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#player-info-modal .pi-equipment-tooltip-inner::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: inherit !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 22%),
    radial-gradient(circle at 50% 0%, rgba(96, 140, 255, 0.22), transparent 42%) !important;
  pointer-events: none !important;
}

#player-info-modal .pi-equipment-tooltip-head,
#player-info-modal .pi-equipment-tooltip-stats,
#player-info-modal .pi-equipment-tooltip-desc,
#player-info-modal .pi-equipment-tooltip-foot{
  position: relative !important;
  z-index: 1 !important;
}

#player-info-modal .pi-equipment-tooltip-empty{
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 96px !important;
}

#player-info-modal .pi-equipment-tooltip-empty-title{
  font-size: 18px !important;
  font-weight: 1000 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35) !important;
}

#player-info-modal .pi-equipment-tooltip-empty-sub{
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
}

#player-info-modal .pi-equipment-tooltip-head{
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
}

#player-info-modal .pi-equipment-tooltip-icon{
  width: 64px !important;
  height: 64px !important;
  border-radius: 16px !important;
  display: block !important;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, color-mix(in srgb, var(--pi-equipment-card-border-color, rgba(52, 152, 255, 0.32)) 26%, rgba(249, 249, 249, 0.50)), color-mix(in srgb, var(--pi-equipment-card-border-color, rgba(52, 152, 255, 0.32)) 66%, rgba(104, 139, 221, 0.59))) !important;
  border: 1px solid color-mix(in srgb, var(--pi-equipment-card-border-color, rgba(20, 54, 108, 0.18)) 74%, #ffffff 26%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.38),
    0 0 0 1px color-mix(in srgb, var(--pi-equipment-card-border-color, rgba(20, 54, 108, 0.18)) 26%, transparent) !important;
  overflow: hidden !important;
}

#player-info-modal .pi-equipment-tooltip-icon img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  image-rendering: pixelated !important;
  display: block !important;
}

#player-info-modal .pi-equipment-tooltip-meta{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

#player-info-modal .pi-equipment-tooltip-name{
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 1000 !important;
  line-height: 1.05 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35) !important;
}

#player-info-modal .pi-equipment-tooltip-sub{
  color: #3bd7d1 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
}

#player-info-modal .pi-equipment-tooltip-rarity{
  align-self: start !important;
  justify-self: end !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pi-equipment-border-color, var(--pi-equipment-rarity-color, #B04DFF)) 88%, #ffffff 12%), var(--pi-equipment-border-color, var(--pi-equipment-rarity-color, #B04DFF))) !important;
  border: 1px solid color-mix(in srgb, var(--pi-equipment-border-color, var(--pi-equipment-rarity-color, #B04DFF)) 72%, #ffffff 28%) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.03em !important;
  box-shadow:
    0 8px 16px color-mix(in srgb, var(--pi-equipment-border-color, var(--pi-equipment-rarity-color, #B04DFF)) 28%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.24) !important;
}

#player-info-modal .pi-equipment-tooltip-line{
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #2a334a !important;
}

#player-info-modal .pi-equipment-tooltip-bar{
  width: 100% !important;
  height: 12px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: rgba(26, 51, 90, 0.18) !important;
  border: 1px solid rgba(57, 83, 128, 0.20) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35) !important;
}

#player-info-modal .pi-equipment-tooltip-bar span{
  display: block !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #a94fff, #6734f0) !important;
}

/* Quests */
#quests-overlay{
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.5vw, 34px);
  background:
    radial-gradient(circle at 20% 15%, rgba(34, 199, 255, 0.18), transparent 28%),
    radial-gradient(circle at 85% 0%, rgba(73, 168, 255, 0.18), transparent 24%),
    rgba(1, 8, 16, 0.78) !important;
}

#quests-modal{
  width: min(1180px, 94vw) !important;
  max-height: min(84vh, 860px) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  padding: 18px !important;
  border-radius: 28px !important;
  border:1px solid rgb(31 53 163) !important;
  background:
    radial-gradient(circle at 16% 8%, rgba(73, 168, 255, 0.22), transparent 32%),
    radial-gradient(circle at 88% 12%, rgba(34, 199, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(9, 24, 44, 0.98), rgba(5, 16, 30, 0.98)) !important;
  color: #eaf7ff !important;
  box-shadow:
    0 32px 90px rgba(0,0,0,0.58),
    0 0 0 1px rgba(73, 168, 255, 0.12) inset,
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
  position: relative !important;
  overflow: hidden !important;
}

#quests-modal::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background:
    linear-gradient(180deg, rgb(35 0 0 / 12%), rgb(7 2 26) 24%), radial-gradient(circle at 50% 0%, rgb(8 21 51), transparent 42%) !important;
  opacity: 0.9 !important;
}

.quests-head,
.quests-body{
  position: relative !important;
  z-index: 1 !important;
}

.quests-head{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.quests-title{
  margin: 0 !important;
  font-size: clamp(18px, 2vw, 26px) !important;
  line-height: 1 !important;
  letter-spacing: 0.02em !important;
  font-weight: 1000 !important;
  color: #f2fbff !important;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.3),
    0 0 18px rgba(73, 168, 255, 0.24) !important;
}

.quests-close{
  width: 38px !important;
  height: 38px !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 1000 !important;
  cursor: pointer !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.24) !important;
}

.quests-close:hover{
  transform: translateY(-1px) !important;
}

.quests-body{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 2.18fr) !important;
  gap: 16px !important;
  overflow: hidden !important;
}

#quests-story-books{
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  align-content: start !important;
  padding: 14px !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(73, 168, 255, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(8, 28, 50, 0.94), rgba(7, 22, 40, 0.98)) !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  box-shadow:
    0 18px 42px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.05) !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(115, 219, 255, 0.78) rgba(2, 14, 28, 0.72) !important;
  scrollbar-gutter: stable !important;
}

.quest-left-shell{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.quest-left-tabs{
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.quest-left-tab{
  appearance: none !important;
  border: 1px solid rgba(115, 219, 255, 0.16) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(20, 50, 84, 0.92), rgba(11, 31, 54, 0.98)) !important;
  color: rgba(231, 247, 255, 0.86) !important;
  padding: 9px 12px !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  box-shadow:
    0 8px 20px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

.quest-left-tab.is-active{
  color: #f7fdff !important;
  border-color: rgba(115, 219, 255, 0.34) !important;
  background: linear-gradient(180deg, rgba(29, 92, 160, 0.98), rgba(17, 63, 113, 0.98)) !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.24),
    0 0 22px rgba(45, 225, 255, 0.12) !important;
}

.quest-left-summary{
  display: grid !important;
  gap: 10px !important;
}

.quests-level-card{
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px 14px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,0.10), transparent 28%),
    linear-gradient(180deg, rgba(18, 48, 86, 0.98), rgba(10, 28, 51, 0.98)) !important;
  border: 1px solid rgba(115, 219, 255, 0.18) !important;
  box-shadow:
    0 14px 26px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.07) !important;
  position: relative !important;
  overflow: hidden !important;
}

.quests-level-card::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), transparent 28%) !important;
  opacity: 0.7 !important;
}

.quests-level-card-main{
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  min-width: 0 !important;
}

.quest-stats-card{
  padding: 14px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(115, 219, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(11, 32, 58, 0.96), rgba(8, 22, 40, 0.98)) !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

.quest-stats-title{
  font-size: 12px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: rgb(0 152 255) !important;
  margin-bottom: 10px !important;
}

.quest-stats-row{
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  color: rgba(235, 247, 255, 0.88) !important;
}

.quest-stats-bar{
  margin-top: 10px !important;
  height: 10px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: rgba(0,0,0,0.46) !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.7) !important;
}

.quest-stats-bar span{
  display: block !important;
  height: 100% !important;
  background: linear-gradient(90deg, #31d7ff, #0ea5ff 55%, #7c3aed 100%) !important;
}

.quest-floor-book{
  position: relative !important;
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  min-height: 78px !important;
  padding: 10px !important;
  border-radius: 18px !important;
  background:
   radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.10), transparent 30%), linear-gradient(180deg, rgb(0 53 117 / 96%), rgb(0 19 43 / 96%)) !important;
  box-shadow:
    0 10px 24px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
  overflow: hidden !important;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, filter 160ms ease !important;
}

.quest-floor-book::after{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(90deg, rgba(255,255,255,0.05), transparent 36%) !important;
  pointer-events: none !important;
}

.quest-floor-book:hover,
.quest-floor-book.quest-floor-book-active{
  transform: translateY(-2px) !important;
  border-color: rgba(115, 219, 255, 0.42) !important;
  box-shadow:
    0 16px 30px rgba(0,0,0,0.28),
    0 0 0 1px rgba(115, 219, 255, 0.08) inset,
    0 0 28px rgba(34, 199, 255, 0.12) !important;
}

.quest-floor-book.quest-floor-book-locked{
  opacity: 0.56 !important;
  filter: grayscale(0.2) saturate(0.88) !important;
}

.quest-floor-book-spine{
  position: relative !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  background: linear-gradient(180deg, rgba(73, 168, 255, 0.24), rgba(34, 199, 255, 0.08)) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10) !important;
}

.quest-floor-book-spine-icon,
.quest-floor-book-floor2-badge,
.quest-floor-book-floor3-badge,
.quest-floor-book-floor4-badge,
.quest-floor-book-floor5-badge{
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
  display: inline-block !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.40), rgba(255,255,255,0.16)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28) !important;
}

.quest-floor-book-body{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.quest-floor-book-title{
  font-size: 15px !important;
  font-weight: 1000 !important;
  color: #f4fbff !important;
  line-height: 1.1 !important;
}

.quest-floor-book-subtitle{
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em !important;
  color: rgba(215, 238, 255, 0.76) !important;
  text-transform: uppercase !important;
}

.quests-list-wrap{
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at top left, rgba(73, 168, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(12, 28, 50, 0.72), rgba(8, 20, 36, 0.86)) !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  overflow: hidden !important;
}

.quests-board{
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  overflow: hidden !important;
}

.quests-board-top{
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.52fr) !important;
  gap: 14px !important;
}

.quests-reward-card{
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.06), transparent 28%),
    linear-gradient(180deg, rgba(9, 29, 51, 0.96), rgba(5, 17, 32, 0.98)) !important;
  border: 1px solid rgba(92, 148, 202, 0.14) !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

.quests-level-badge{
  width: 58px !important;
  height: 58px !important;
  border-radius: 18px !important;
  display: grid !important;
  place-items: center !important;
  background-color: rgba(9, 18, 33, 0.9) !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 550px 400px !important;
  background-position: 0px -250px !important;
  border: 1px solid rgba(115, 219, 255, 0.22) !important;
  box-shadow: 0 10px 20px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.12) !important;
  image-rendering: pixelated !important;
  overflow: hidden !important;
}

.quests-level-badge-num{
  font-size: 22px !important;
  font-weight: 1000 !important;
  color: #f7fdff !important;
}

.quests-level-copy{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  flex: 1 1 auto !important;
}

.quests-level-info{
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
}

.quests-level-title{
  font-size: 16px !important;
  font-weight: 1000 !important;
  color: #f4fbff !important;
}

.quests-level-subtitle{
  font-size: 12px !important;
  font-weight: 900 !important;
  color: rgb(255 255 255 / 78%) !important;
}

.quests-level-xp{
  font-size: 13px !important;
  font-weight: 1000 !important;
  color: rgba(235, 247, 255, 0.92) !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}

.quests-level-progress{
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  height: 10px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  border: 1px solid rgba(115, 219, 255, 0.18) !important;
  background:
    linear-gradient(180deg, rgba(4, 16, 30, 0.92), rgba(7, 24, 44, 0.96)) !important;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.72),
    0 0 0 1px rgba(0,0,0,0.18) !important;
}

.quests-level-progress-fill{
  display: block !important;
  height: 100% !important;
  min-width: 6px !important;
  background: linear-gradient(90deg, #39d9ff, #1aa0ff 48%, #8b5cf6 100%) !important;
  box-shadow:
    0 0 10px rgba(45, 225, 255, 0.32),
    0 0 18px rgba(139, 92, 246, 0.18) !important;
}

.quests-reward-card{
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: center !important;
}

.quests-reward-chest,
.quests-reward-key{
  display: block !important;
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  image-rendering: pixelated !important;
  box-shadow: 0 12px 24px rgba(0,0,0,0.22) !important;
}

.quests-reward-chest{
  border-radius: 14px !important;
  background-image: none !important;
  position: relative !important;
}

.quests-reward-key{
  border-radius: 12px !important;
  background-image: url("/photos/keys_tilemap.png") !important;
  justify-self: end !important;
  align-self: center !important;
}

.quests-reward-chest::before{
  content: none !important;
}

.quests-reward-copy{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.quests-reward-kicker{
  font-size: 11px !important;
  font-weight: 900 !important;
  color: rgba(215, 238, 255, 0.74) !important;
}

.quests-reward-title{
  font-size: 16px !important;
  font-weight: 1000 !important;
  color: #f4fbff !important;
}

.quests-reward-subtitle{
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #bb71ff !important;
}

.quests-tabs{
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 0px !important;
  margin-bottom: -1px !important;
  padding: 0 18px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 2 !important;
}

.quests-tab{
  appearance: none !important;
  border: 1px solid rgba(92, 148, 202, 0.18) !important;
  border-radius: 16px 16px 0 0 !important;
  background: linear-gradient(180deg, rgba(9, 28, 50, 0.96), rgba(6, 19, 35, 0.98)) !important;
  color: rgba(233, 244, 255, 0.82) !important;
  min-height: 50px !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  box-shadow:
    0 10px 22px rgba(0,0,0,0.16),
    inset 0 1px 0 rgba(255,255,255,0.04) !important;
  margin: 0 !important;
  position: relative !important;
  overflow: hidden !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
}

.quests-tab.is-active{
  background: linear-gradient(180deg, rgba(33, 95, 160, 0.98), rgba(19, 67, 123, 0.98)) !important;
  color: #f7fdff !important;
  border-color: rgba(115, 219, 255, 0.24) !important;
  z-index: 3 !important;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.10) !important;
}

.quests-main-grid{
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

.quests-list-column{
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

.quests-list-panel{
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 1 1 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 14px !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at top left, rgba(76, 146, 208, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(8, 24, 44, 0.90), rgba(5, 16, 29, 0.97)) !important;
  border: 1px solid rgba(92, 148, 202, 0.14) !important;
  overflow: hidden !important;
}

.quests-list-panel-head{
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 12px !important;
}

.quests-list-panel-scroller{
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 1 1 0 !important;
  height: 0 !important;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  padding: 0 0 4px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(115, 219, 255, 0.78) rgba(2, 14, 28, 0.72) !important;
  scrollbar-gutter: stable !important;
}

.quests-list{
  list-style: none !important;
  margin: 0 !important;
  padding: 14px !important;
  overflow-y: auto !important;
  gap: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

.quest-summary-card,
.quest-card{
  list-style: none !important;
  border-radius: 20px !important;
  border: 1px solid rgba(92, 148, 202, 0.16) !important;
  background:
radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.06), transparent 26%), linear-gradient(180deg, rgb(5 72 144 / 96%), rgb(4 51 106 / 96%)) !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
  color: #ffffff !important;
}

.quest-summary-card{
  padding: 14px 14px 12px !important;
}

.quest-summary-head{
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.quest-summary-level{
  font-size: 13px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.02em !important;
}

.quest-summary-xp{
  font-size: 12px !important;
  font-weight: 900 !important;
  color: rgba(231, 247, 255, 0.9) !important;
}

.quest-left-list{
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  overflow: auto !important;
  padding-right: 2px !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(115, 219, 255, 0.78) rgba(2, 14, 28, 0.72) !important;
  scrollbar-gutter: stable !important;
}

.quest-card{
  padding: 12px !important;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, filter 160ms ease !important;
  text-align: left !important;
}

.quest-card:hover{
  transform: translateY(-2px) !important;
  border-color: rgba(115, 219, 255, 0.34) !important;
  box-shadow:
    0 16px 34px rgba(0,0,0,0.28),
    0 0 0 1px rgba(115, 219, 255, 0.07) inset,
    0 0 24px rgba(34, 199, 255, 0.10) !important;
}

.quest-card.is-selected{
  border-color: rgba(108, 221, 255, 0.52) !important;
  background:
   radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.10), transparent 28%), linear-gradient(180deg, rgb(19 73 132 / 98%), rgb(0 49 105 / 98%)) !important;
  box-shadow:
    0 18px 36px rgba(0,0,0,0.30),
    0 0 0 1px rgba(115, 219, 255, 0.12) inset,
    0 0 22px rgba(45, 225, 255, 0.12) !important;
}

.quest-card.is-completed{
  opacity: 0.62 !important;
  filter: saturate(0.82) brightness(0.92) !important;
}

.quest-card--achievement.is-completed{
  opacity: 0.88 !important;
  filter: saturate(0.94) brightness(0.98) !important;
}

.quest-card-inner{
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
}

.quest-missionmap-icon{
  width: 64px !important;
  height: 64px !important;
  flex: 0 0 64px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,0.24) !important;
  background-color: rgba(0,0,0,0.22) !important;
  overflow: hidden !important;
  position: relative !important;
  box-shadow:
    0 8px 18px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.10) !important;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
}

.quest-missionmap-icon::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: inherit !important;
  pointer-events: none !important;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.16), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0) 28%) !important;
  z-index: 1 !important;
}

.quest-missionmap-image{
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  image-rendering: pixelated !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.quest-card-copy{
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.quest-card-toprow{
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 10px !important;
}

.quest-card-title{
  font-size: 15px !important;
  font-weight: 1000 !important;
  line-height: 1.15 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.42) !important;
}

.quest-card-desc{
  margin-top: 4px !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  color: rgba(230, 243, 255, 0.84) !important;
}

.quest-card-foot{
  margin-top: 9px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
}

.quest-card-progress{
  position: relative !important;
  height: 10px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: rgba(0,0,0,0.40) !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.7) !important;
}

.quest-card-progress span{
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  background: linear-gradient(90deg, #31d7ff 0%, #1988ff 54%, #7b3ff0 100%) !important;
  box-shadow: 0 0 16px rgba(45, 225, 255, 0.20) !important;
}

.quest-card-meta{
  font-size: 11px !important;
  font-weight: 1000 !important;
  color: rgba(235, 247, 255, 0.78) !important;
  white-space: nowrap !important;
}

.quest-card--achievement{
  overflow: hidden !important;
}

.quest-card--achievement .quest-card-inner{
  align-items: flex-start !important;
}

.achievement-step-pill-row{
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 10px !important;
}

.achievement-step-pill{
  position: relative !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(115, 219, 255, 0.20) !important;
  background: rgba(4, 16, 31, 0.72) !important;
  overflow: hidden !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.achievement-step-pill-fill{
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--achievement-accent, rgba(255, 214, 102, 0.94)) 92%, #ffffff 8%), color-mix(in srgb, var(--achievement-accent, rgba(255, 214, 102, 0.94)) 82%, rgba(0,0,0,0.16) 18%)) !important;
  opacity: 0.22 !important;
}

.achievement-step-pill-num{
  position: relative !important;
  z-index: 1 !important;
  font-size: 11px !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  color: rgba(235, 247, 255, 0.92) !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.55) !important;
}

.achievement-step-pill.is-complete{
  border-color: color-mix(in srgb, var(--achievement-accent, rgba(255, 214, 102, 0.96)) 76%, #ffffff 24%) !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--achievement-accent, rgba(255, 214, 102, 0.96)) 42%, rgba(255,255,255,0.16) 58%), color-mix(in srgb, var(--achievement-accent, rgba(255, 214, 102, 0.96)) 82%, rgba(0,0,0,0.22) 18%)) !important;
  box-shadow:
    0 0 0 1px rgba(255, 231, 171, 0.24) inset,
    0 0 16px color-mix(in srgb, var(--achievement-accent, rgba(255, 214, 102, 0.96)) 34%, transparent) !important;
}

.achievement-step-pill.is-complete .achievement-step-pill-fill{
  opacity: 0.85 !important;
}

.achievement-step-pill.is-active{
  border-color: color-mix(in srgb, var(--achievement-accent, rgba(115, 219, 255, 0.96)) 78%, #ffffff 22%) !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--achievement-accent, rgba(115, 219, 255, 0.96)) 42%, rgba(255,255,255,0.16) 58%), color-mix(in srgb, var(--achievement-accent, rgba(115, 219, 255, 0.96)) 78%, rgba(0,0,0,0.22) 22%)) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.10) inset,
    0 0 18px color-mix(in srgb, var(--achievement-accent, rgba(115, 219, 255, 0.96)) 36%, transparent) !important;
}

.achievement-step-pill.is-active .achievement-step-pill-fill{
  opacity: 0.58 !important;
}

.achievement-step-pill.is-locked{
  opacity: 0.38 !important;
  filter: grayscale(0.2) saturate(0.72) !important;
}

.achievement-track-status{
  margin-top: 8px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: rgba(216, 235, 250, 0.70) !important;
}

.achievement-track-progress-icons{
  margin: 0 !important;
  display: flex !important;
  gap: 4px !important;
  justify-content: flex-end !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  min-height: 18px !important;
  flex: 0 0 auto !important;
}

.achievement-track-desc-row{
  margin-top: 2px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.achievement-track-desc-row .quest-card-desc{
  margin-top: 0 !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.achievement-track-progress-icons--inline{
  justify-self: end !important;
}

.achievement-track-progress-icon{
  width: 18px !important;
  height: 18px !important;
  display: grid !important;
  place-items: center !important;
  line-height: 1 !important;
  position: relative !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
  overflow: hidden !important;
  opacity: 0.7 !important;
}

.achievement-track-progress-icon::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  margin: auto !important;
  width: 18px !important;
  height: 18px !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 239px 175px !important;
  background-position: -44px -110px !important;
  image-rendering: pixelated !important;
  filter: grayscale(1) brightness(0.18) !important;
  opacity: 0.9 !important;
}

.achievement-track-progress-icon.is-complete{
  opacity: 1 !important;
}

.achievement-track-progress-icon.is-complete::before{
  filter: none !important;
  opacity: 1 !important;
}

.achievement-track-progress-icon.is-locked{
  opacity: 0.55 !important;
}

.achievement-track-trophy-row{
  margin-top: 9px !important;
  display: flex !important;
  gap: 4px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

.achievement-track-trophy{
  width: 18px !important;
  height: 18px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 13px !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  background: rgba(6, 18, 34, 0.58) !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
  filter: grayscale(1) brightness(0.22) !important;
  opacity: 0.62 !important;
}

.achievement-track-trophy.is-complete{
  background: linear-gradient(180deg, rgba(255, 214, 102, 0.96), rgba(191, 122, 21, 0.96)) !important;
  border-color: rgba(255, 214, 102, 0.32) !important;
  filter: none !important;
  opacity: 1 !important;
  box-shadow:
    0 0 0 1px rgba(255, 236, 173, 0.12) inset,
    0 0 14px rgba(255, 208, 88, 0.18) !important;
}

.achievement-track-trophy.is-locked{
  background: rgba(4, 14, 26, 0.80) !important;
  border-color: rgba(255,255,255,0.06) !important;
}

.quests-detail-hero-badge--achievement{
  border-color: rgba(115, 219, 255, 0.22) !important;
  color: rgba(235, 247, 255, 0.92) !important;
}

.achievement-track-hero{
  width: 78px !important;
  height: 78px !important;
  border-radius: 20px !important;
  display: grid !important;
  place-items: center !important;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.22), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(82, 183, 255, 0.38), rgba(19, 73, 132, 0.92)) !important;
  border: 1px solid rgba(115, 219, 255, 0.28) !important;
  box-shadow:
    0 16px 28px rgba(0,0,0,0.28),
    0 0 0 1px rgba(255,255,255,0.06) inset !important;
}

.achievement-track-hero span{
  font-size: 28px !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55) !important;
}

.achievement-track-hero--coins{
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.22), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(255, 214, 102, 0.50), rgba(184, 110, 18, 0.94)) !important;
  border-color: rgba(255, 214, 102, 0.34) !important;
}

.achievement-track-hero--blocks{
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.22), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(82, 183, 255, 0.46), rgba(19, 73, 132, 0.94)) !important;
  border-color: rgba(115, 219, 255, 0.34) !important;
}

.quests-detail--achievements .quests-detail-npc{
  min-height: 220px !important;
}

.quests-main-grid--achievements .quests-detail{
  gap: 14px !important;
}

.quests-main-grid--achievements .quests-detail-panel{
  min-height: 0 !important;
}

.achievement-track-step-rail{
  display: grid !important;
  gap: 8px !important;
}

.achievement-track-step{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(115, 219, 255, 0.12) !important;
  background: rgba(3, 15, 28, 0.24) !important;
}

.achievement-track-step-icon{
  width: 26px !important;
  height: 26px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 26px !important;
  font-size: 11px !important;
  font-weight: 1000 !important;
  color: #ffffff !important;
  background: linear-gradient(180deg, rgba(82, 183, 255, 0.72), rgba(19, 73, 132, 0.92)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

.achievement-track-step-copy{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.achievement-track-step-title{
  font-size: 13px !important;
  font-weight: 900 !important;
  color: rgba(244, 251, 255, 0.96) !important;
}

.achievement-track-step-sub{
  font-size: 11px !important;
  font-weight: 800 !important;
  color: rgba(216, 235, 250, 0.72) !important;
}

.achievement-track-step.is-complete{
  border-color: color-mix(in srgb, var(--achievement-accent, rgba(255, 214, 102, 0.96)) 30%, rgba(255,255,255,0.10)) !important;
  background: color-mix(in srgb, var(--achievement-accent, rgba(255, 214, 102, 0.96)) 12%, rgba(3, 15, 28, 0.24)) !important;
}

.achievement-track-step.is-complete .achievement-track-step-icon{
  background: linear-gradient(180deg, color-mix(in srgb, var(--achievement-accent, rgba(255, 214, 102, 0.96)) 90%, #ffffff 10%), color-mix(in srgb, var(--achievement-accent, rgba(255, 214, 102, 0.96)) 72%, rgba(0,0,0,0.20) 28%)) !important;
}

.achievement-track-step.is-active{
  border-color: color-mix(in srgb, var(--achievement-accent, rgba(115, 219, 255, 0.96)) 30%, rgba(255,255,255,0.10)) !important;
  background: color-mix(in srgb, var(--achievement-accent, rgba(115, 219, 255, 0.96)) 12%, rgba(3, 15, 28, 0.24)) !important;
  box-shadow: 0 0 0 1px rgba(115, 219, 255, 0.08) inset, 0 0 18px color-mix(in srgb, var(--achievement-accent, rgba(115, 219, 255, 0.96)) 22%, transparent) !important;
}

.achievement-track-step.is-active .achievement-track-step-icon{
  background: linear-gradient(180deg, color-mix(in srgb, var(--achievement-accent, rgba(115, 219, 255, 0.96)) 90%, #ffffff 10%), color-mix(in srgb, var(--achievement-accent, rgba(115, 219, 255, 0.96)) 72%, rgba(0,0,0,0.20) 28%)) !important;
}

.achievement-track-step.is-locked{
  opacity: 0.36 !important;
  filter: grayscale(0.18) !important;
}

.achievement-objective-bullet{
  background: linear-gradient(180deg, rgba(255, 214, 102, 0.96), rgba(184, 110, 18, 0.96)) !important;
}

.quests-detail{
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(115, 219, 255, 0.78) rgba(2, 14, 28, 0.72) !important;
  scrollbar-gutter: stable !important;
}

#quests-story-books::-webkit-scrollbar,
.quest-left-list::-webkit-scrollbar,
.quests-list-panel-scroller::-webkit-scrollbar,
.quests-detail::-webkit-scrollbar{
  width: 11px;
}

#quests-story-books::-webkit-scrollbar-track,
.quest-left-list::-webkit-scrollbar-track,
.quests-list-panel-scroller::-webkit-scrollbar-track,
.quests-detail::-webkit-scrollbar-track{
  background: rgba(2, 14, 28, 0.72);
  border-radius: 999px;
}

#quests-story-books::-webkit-scrollbar-thumb,
.quest-left-list::-webkit-scrollbar-thumb,
.quests-list-panel-scroller::-webkit-scrollbar-thumb,
.quests-detail::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(115, 219, 255, 0.88), rgba(59, 130, 246, 0.9));
  border-radius: 999px;
  border: 2px solid rgba(2, 14, 28, 0.72);
}

#quests-story-books::-webkit-scrollbar-thumb:hover,
.quest-left-list::-webkit-scrollbar-thumb:hover,
.quests-list-panel-scroller::-webkit-scrollbar-thumb:hover,
.quests-detail::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, rgba(143, 232, 255, 0.96), rgba(99, 102, 241, 0.96));
}

#quests-story-books::-webkit-scrollbar-corner,
.quest-left-list::-webkit-scrollbar-corner,
.quests-list-panel-scroller::-webkit-scrollbar-corner,
.quests-detail::-webkit-scrollbar-corner{
  background: rgba(2, 14, 28, 0.72);
}

.quests-empty-state{
  border-radius: 20px !important;
  padding: 16px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(115, 219, 255, 0.12) !important;
}

.quests-detail-hero{
  position: relative !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 3px !important;
  min-height: 0 !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  border: 1px solid rgba(115, 219, 255, 0.18) !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(115, 219, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(11, 32, 58, 0.98), rgba(7, 20, 38, 0.99)) !important;
  box-shadow:
    0 18px 36px rgba(0,0,0,0.26),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

.quests-detail-hero.is-empty{
  min-height: 0 !important;
}

.quests-detail-hero-copy{
  min-width: 0 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding-right: 8px !important;
}

.quests-detail-title{
  font-size: clamp(22px, 1.4vw, 34px) !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
  color: #f6fcff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.3), 0 0 24px rgba(73, 168, 255, 0.18) !important;
}

.quests-detail-hero-badge{
  position: relative !important;
  z-index: 2 !important;
  width: 64px !important;
  height: 64px !important;
  flex: 0 0 64px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,0.24) !important;
  background-color: rgba(0,0,0,0.22) !important;
  overflow: hidden !important;
  display: block !important;
  box-shadow:
    0 8px 18px rgba(0,0,0,0.24),
  inset 0 1px 0 rgba(255,255,255,0.10) !important;
}

.quests-detail-hero-badge.achievement-track-hero{
  width: 78px !important;
  height: 78px !important;
  flex: 0 0 78px !important;
  border-radius: 20px !important;
  display: grid !important;
  place-items: center !important;
}

.quests-detail-hero-badge.is-atlas{
  background-color: rgba(0,0,0,0.22) !important;
}

.quests-detail-objectives{
  border-radius: 18px !important;
  border: 1px solid rgba(115, 219, 255, 0.10) !important;
  background: rgba(5, 15, 28, 0.42) !important;
  padding: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.quests-detail-objective-row{
  display: grid !important;
  grid-template-columns: 12px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
}

.quests-detail-objective-bullet{
  width: 8px !important;
  height: 8px !important;
  transform: rotate(45deg) !important;
  border-radius: 2px !important;
  background: linear-gradient(180deg, #4fc8ff, #1b8cff) !important;
  box-shadow: 0 0 12px rgba(73, 168, 255, 0.3) !important;
}

body.npc-interact-modal-open #game-container canvas{
  pointer-events: none !important;
}

#npc-interact-overlay{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 2147483646;
  background:
    radial-gradient(circle at 20% 12%, rgba(125, 211, 252, 0.14), transparent 30%),
    radial-gradient(circle at 80% 2%, rgba(255, 255, 255, 0.08), transparent 26%),
    rgba(2, 8, 16, 0.78);
}

#npc-interact-overlay .npc-interact-card{
  width: min(96vw, 1040px);
  border-radius: 24px;
  border: 1px solid rgb(31 53 163) !important;
  background:
   radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  color: #edf9ff;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

#npc-interact-overlay .npc-interact-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}

#npc-interact-overlay .npc-interact-head-copy{
  min-width: 0;
}

#npc-interact-overlay .npc-interact-title{
  margin-top: 6px;
  font-size: 28px;
  line-height: 1;
  font-weight: 1000;
  color: #f7fdff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.28), 0 0 24px rgba(56, 189, 248, 0.16);
}

#npc-interact-overlay .npc-interact-subtitle{
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(227, 244, 255, 0.72);
}

#npc-interact-overlay .npc-interact-close{
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
  color: #f7fdff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

#npc-interact-overlay .npc-interact-body{
  padding: 18px;
  display: grid;
  gap: 16px;
}

#npc-interact-overlay .npc-interact-layout{
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.38fr);
  gap: 16px;
  padding: 0 18px 18px;
}

#npc-interact-overlay .npc-interact-sidebar{
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  background:
    radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(10, 28, 47, 0.98), rgba(6, 16, 26, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 24px rgba(0,0,0,0.18);
}

#npc-interact-overlay .npc-interact-portrait{
  height: 144px;
  border-radius: 18px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  display: grid;
  place-items: stretch;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.22), transparent 40%),
    linear-gradient(180deg, rgba(15, 44, 73, 0.96), rgba(8, 21, 32, 0.98));
}

#npc-interact-overlay .npc-interact-portrait-frame{
  width: 100%;
  height: 100%;
}

#npc-interact-overlay .npc-interact-portrait-art{
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  background-position: center center;
}

#npc-interact-overlay .npc-interact-portrait-frame:empty{
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.22), transparent 40%),
    linear-gradient(180deg, rgba(15, 44, 73, 0.96), rgba(8, 21, 32, 0.98));
}

#npc-interact-overlay .npc-interact-sidebar-copy{
  display: grid;
  gap: 4px;
}

#npc-interact-overlay .npc-interact-sidebar-name{
  font-size: 26px;
  font-weight: 1000;
  line-height: 1;
  color: #f7fdff;
}

#npc-interact-overlay .npc-interact-sidebar-meta{
  display: none;
}

#npc-interact-overlay .npc-interact-inventory-subtitle{
  font-size: 12px;
  font-weight: 800;
  color: rgba(223, 242, 255, 0.76);
}

#npc-interact-overlay .npc-interact-inventory-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, 72px);
  grid-auto-rows: 72px;
  gap: 8px;
  max-width: 100%;
  max-height: clamp(280px, 46vh, 520px);
  min-height: 0;
  padding: 8px;
  align-content: start;
  justify-content: start;
  justify-items: start;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 219, 255, 0.88) rgba(4, 16, 31, 0.72);
  scrollbar-gutter: stable;
}

#npc-interact-overlay .pi-inventory-chip{
  justify-content: flex-start;
  position: relative;
  width: 72px;
  min-height: 72px;
  aspect-ratio: 1 / 1;
  padding: 4px;
  overflow: hidden;
}

#npc-interact-overlay .pi-inventory-icon-wrap{
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
}

#npc-interact-overlay .pi-inventory-qty{
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 2;
}

#npc-interact-overlay .npc-interact-dialog{
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(125, 211, 252, 0.10);
  min-height: 120px;
}

#npc-interact-overlay .npc-interact-dialog p{
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(239, 250, 255, 0.92);
}

#npc-interact-overlay .npc-interact-actions{
  display: grid;
  gap: 10px;
}

#npc-interact-overlay .npc-interact-sidebar .npc-interact-actions{
  margin-top: auto;
}

#npc-interact-overlay .npc-interact-action,
#npc-interact-overlay .npc-interact-goodbye{
  width: 100%;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(12, 31, 51, 0.96), rgba(7, 18, 30, 0.98));
  color: #f2fbff;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

#npc-interact-overlay .npc-interact-action:hover,
#npc-interact-overlay .npc-interact-goodbye:hover,
#npc-interact-overlay .npc-interact-close:hover{
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.38);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12), 0 10px 24px rgba(0,0,0,0.20);
}

#npc-interact-overlay .npc-interact-action.is-active{
  border-color: rgba(125, 211, 252, 0.48);
  background: linear-gradient(180deg, rgba(21, 58, 92, 0.98), rgba(10, 28, 45, 0.98));
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.16), 0 12px 26px rgba(0,0,0,0.22);
}

#npc-interact-overlay .npc-interact-goodbye{
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
}

#npc-interact-overlay .npc-interact-empty{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(125, 211, 252, 0.20);
  color: rgba(224, 242, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

#npc-interact-overlay .npc-interact-main{
  min-width: 0;
  border-radius: 20px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 189, 248, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(8, 22, 38, 0.98), rgba(5, 12, 20, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 24px rgba(0,0,0,0.18);
}

#npc-interact-overlay .npc-interact-pane{
  display: none;
  padding: 18px;
  min-height: 100%;
}

#npc-interact-overlay .npc-interact-pane.is-active{
  display: grid;
  gap: 14px;
}

#npc-interact-overlay .npc-interact-pane-title{
  font-size: 20px;
  font-weight: 1000;
  color: #f7fdff;
}

#npc-interact-overlay .npc-interact-pane-copy{
  color: rgba(239, 250, 255, 0.88);
  line-height: 1.45;
  font-size: 14px;
}

#npc-interact-overlay .npc-interact-inline-btn,
#npc-interact-overlay .npc-sale-buy{
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 46, 76, 0.98), rgba(9, 23, 38, 0.98));
  color: #f2fbff;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

#npc-interact-overlay .npc-sale-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

#npc-interact-overlay .npc-sale-card{
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(12, 32, 53, 0.98), rgba(7, 18, 30, 0.98));
}

#npc-interact-overlay .npc-sale-icon{
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background: rgba(255,255,255,0.04);
}

#npc-interact-overlay .npc-sale-icon > *{
  image-rendering: pixelated;
}

#npc-interact-overlay .npc-sale-body{
  display: grid;
  gap: 4px;
}

#npc-interact-overlay .npc-sale-name{
  font-size: 16px;
  font-weight: 1000;
  color: #f7fdff;
}

#npc-interact-overlay .npc-sale-meta{
  font-size: 12px;
  font-weight: 900;
  color: rgba(200, 232, 255, 0.76);
}

#npc-interact-overlay .npc-sale-desc{
  font-size: 12px;
  line-height: 1.45;
  color: rgba(224, 242, 255, 0.72);
}

@media (max-width: 640px){
  #npc-interact-overlay{
    padding: 12px;
  }

  #npc-interact-overlay .npc-interact-card{
    width: min(94vw, 560px);
    border-radius: 20px;
  }

  #npc-interact-overlay .npc-interact-title{
    font-size: 22px;
  }

  #npc-interact-overlay .npc-interact-layout{
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  #npc-interact-overlay .npc-interact-sidebar{
    order: 2;
  }

  #npc-interact-overlay .npc-interact-main{
    order: 1;
  }
}

.quests-detail-objective-text{
  min-width: 0 !important;
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 900 !important;
  color: #f4fbff !important;
}

.quests-detail-objective-count{
  font-size: 18px !important;
  font-weight: 1000 !important;
  color: rgba(240, 247, 255, 0.92) !important;
  white-space: nowrap !important;
}

.quests-detail-progress,
.quests-detail-panel{
  border-radius: 20px !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,0.06), transparent 28%),
    linear-gradient(180deg, rgba(11, 32, 58, 0.96), rgba(8, 24, 44, 0.98)) !important;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

.quests-detail-progress{
  padding: 14px !important;
}

.quests-detail-section-title{
  font-size: 11px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.12em !important;
  color: rgb(0 152 255) !important;
  text-transform: uppercase !important;
  margin-bottom: 10px !important;
}

.quests-detail-progress-row{
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.quests-detail-progress-bar{
  position: relative !important;
  flex: 1 1 auto !important;
  height: 12px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: rgba(0,0,0,0.50) !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.72) !important;
}

.quests-detail-progress-bar span{
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  background: linear-gradient(90deg, #31d7ff, #0ea5ff 55%, #7c3aed 100%) !important;
  box-shadow: 0 0 18px rgba(45, 225, 255, 0.30) !important;
}

.quests-detail-progress-text{
  flex: 0 0 auto !important;
  min-width: 54px !important;
  text-align: right !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  color: rgba(236, 248, 255, 0.88) !important;
}

.quests-detail-grid{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.quests-detail-panel{
  padding: 14px !important;
}

.quests-detail-rewards-card,
.quests-detail-location-card,
.quests-detail-npc{
  min-height: 126px !important;
}

.quests-detail-location-panel{
  position: relative !important;
  overflow: hidden !important;
}

.quests-detail-location-panel::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background-image: var(--quest-location-bg-image) !important;
  background-repeat: no-repeat !important;
  background-position: var(--quest-location-bg-position, center center) !important;
  background-size: var(--quest-location-bg-size, cover) !important;
  opacity: 0.18 !important;
  filter: saturate(1.04) contrast(1.02) brightness(0.88) !important;
  pointer-events: none !important;
}

.quests-detail-location-panel::after{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(180deg, rgba(11, 32, 58, 0.28), rgba(8, 24, 44, 0.90)) !important;
  pointer-events: none !important;
}

.quests-detail-location-panel > *{
  position: relative !important;
  z-index: 1 !important;
}

.quests-detail-location-row{
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.quests-detail-location-icon{
  width: 60px !important;
  height: 60px !important;
  flex: 0 0 60px !important;
  border-radius: 9px !important;
  display: block !important;
  background-color: rgba(9, 18, 33, 0.92) !important;
  background-repeat: no-repeat !important;
  image-rendering: pixelated !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 4px 10px rgba(0,0,0,0.15) !important;
}

.quests-detail-location-copy{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.quests-detail-reward-lines{
  display: grid !important;
  gap: 8px !important;
}

.quests-detail-reward-line{
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  font-size: 14px !important;
  color: #f1fbff !important;
}

.quests-detail-coin,
.quests-detail-xp{
  width: 18px !important;
  height: 18px !important;
  border-radius: 5px !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22) !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: 550px 400px !important;
  image-rendering: pixelated !important;
}

.quests-detail-coin{
  background-image: url("/photos/icons_tilemap.png") !important;
  background-position: -150px 0px !important;
}

.quests-detail-xp{
  background-image: url("/photos/icons_tilemap.png") !important;
  background-position: -22px -44px !important;
}

.quests-detail-meta-value{
  font-size: 18px !important;
  font-weight: 1000 !important;
  color: #f4fbff !important;
  line-height: 1.15 !important;
}

.quests-detail-meta-sub{
  margin-top: 4px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: rgba(215, 238, 255, 0.78) !important;
}

.quests-detail-npc{
  padding: 0 !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 180px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.14), transparent 40%),
    linear-gradient(180deg, rgba(15, 44, 73, 0.96), rgba(8, 21, 32, 0.98)) !important;
}

.quests-detail-npc-image{
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  background-image: url('/photos/npcs_tilemap.png') !important;
  background-repeat: no-repeat !important;
  background-position: 0 0 !important;
  background-size: 500% 500% !important;
  image-rendering: pixelated !important;
}

#quests-modal{
  background:
radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
}

#quests-modal .quests-title{
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

#quests-modal .quests-title::before{
  content: "" !important;
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 239px 175px !important;
  background-position: -44px -110px !important;
  image-rendering: pixelated !important;
  box-shadow:
    0 6px 14px rgba(0,0,0,0.18) !important;
  position: relative !important;
}

#quests-modal .quests-title::after{
  content: none !important;
}

#quests-modal .quests-title{
  position: relative !important;
}

.quests-tab{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.quests-tab-icon{
  position: relative !important;
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  display: inline-block !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 242px 176px !important;
  image-rendering: pixelated !important;
}

.quests-tab-icon-scroll{
  background-position: -22px -110px !important;
}

.quests-tab-icon-scroll::before{
  content: none !important;
}

.quests-tab-icon-trophy{
  background-position: -44px -110px !important;
}

.quests-tab-icon-trophy::before{
  content: none !important;
}

.quests-tab-icon-calendar{
  background-position: -66px -110px !important;
}

.quests-tab-icon-calendar::before{
  content: none !important;
}

.quests-tab-icon-journal{
  border-radius: 4px !important;
  background:
    linear-gradient(180deg, #f4e5c6, #c78f48) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

.quests-tab-icon-journal::before{
  content: "" !important;
  position: absolute !important;
  left: 3px !important;
  top: 2px !important;
  bottom: 2px !important;
  width: 4px !important;
  border-radius: 3px !important;
  background: rgba(255,255,255,0.36) !important;
}

.quest-floor-book-spine-icon{
  position: relative !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 9px !important;
  display: inline-block !important;
}

.quest-floor-book-spine-icon.is-floor-1.is-unlocked{
  background-color: rgba(9, 18, 33, 0.92) !important;
  background-image: url("/photos/missionmap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 1200px 600px !important;
  background-position: 0px -60px !important;
  image-rendering: pixelated !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 4px 10px rgba(0,0,0,0.15) !important;
}

.quest-floor-book-spine-icon.is-floor-1.is-unlocked::before{
  content: none !important;
}

.quest-floor-book-spine-icon.is-floor-1.is-unlocked::after{
  content: none !important;
}

.quest-floor-book-spine-icon.is-locked{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)),
    linear-gradient(180deg, #6f7b8c, #3b4456) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 4px 10px rgba(0,0,0,0.18) !important;
}

.quest-floor-book-spine-icon.is-locked::before{
  content: "" !important;
  position: absolute !important;
  left: 13px !important;
  top: 17px !important;
  width: 32px !important;
  height: 30px !important;
  border-radius: 4px !important;
  background: linear-gradient(180deg, #d4dae5, #9aa5b8) !important;
}

.quest-floor-book-spine-icon.is-locked::after{
  content: "" !important;
  position: absolute !important;
  left: 16px !important;
  top: 9px !important;
  width: 22px !important;
  height: 10px !important;
  border: 2px solid rgba(255,255,255,0.68) !important;
  border-bottom: none !important;
  border-radius: 8px 8px 0 0 !important;
}

.quests-level-badge{
  position: relative !important;
  background-color: rgba(9, 18, 33, 0.9) !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 550px 400px !important;
  background-position: 5px -247px !important;
  clip-path: none !important;
}

.quests-level-badge::before{
  content: "" !important;
  position: absolute !important;
  inset: 4px !important;
  clip-path: none !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 0 0 1px rgba(255,255,255,0.10) !important;
  pointer-events: none !important;
}

.quests-level-badge-num{
  position: relative !important;
  z-index: 1 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55) !important;
}

.quests-reward-chest{
  background-image: none !important;
  border-radius: 14px !important;
}

.quests-reward-key{
  background-image: url("/photos/keys_tilemap.png") !important;
}

.quests-tab.is-active{
  box-shadow:
    0 12px 28px rgba(0,0,0,0.28),
    0 0 0 1px rgba(115, 219, 255, 0.12) inset,
    0 0 24px rgba(45, 225, 255, 0.12) !important;
}

.quest-card-corner-badge{
  position: absolute !important;
  top: 0 !important;
  right: 16px !important;
  width: 26px !important;
  height: 32px !important;
  z-index: 3 !important;
  background: linear-gradient(180deg, #4ea8ff, #1a5fcc) !important;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%) !important;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

.quest-card-corner-badge::before{
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 8px !important;
  width: 8px !important;
  height: 8px !important;
  transform: translateX(-50%) rotate(45deg) !important;
  border-radius: 2px !important;
  background: #fff !important;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.2) !important;
}

.quests-detail-coin,
.quests-detail-xp{
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  display: inline-block !important;
  border-radius: 8px !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.quests-detail-coin{
  background:
    url("/photos/coin.png") center / contain no-repeat,
    linear-gradient(180deg, #ffd94d, #c8800e) !important;
  border-radius: 50% !important;
}

.quests-detail-xp{
  position: relative !important;
  background-color: rgba(9, 18, 33, 0.92) !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 242px 176px !important;
  background-position: -45px -22px !important;
  image-rendering: pixelated !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 50% !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

.quests-detail-xp::before{
  content: none !important;
}

.quests-title{
  letter-spacing: 0.01em !important;
}

.quests-list-panel,
.quests-detail,
.quests-detail-panel,
.quests-detail-progress,
.quest-card,
.quest-floor-book,
.quests-level-card,
.quests-reward-card{
  backdrop-filter: blur(3px) saturate(1.02) !important;
  -webkit-backdrop-filter: blur(3px) saturate(1.02) !important;
}

@media (max-width: 920px){
  .quests-body{
    grid-template-columns: 1fr !important;
  }

  #quests-story-books{
    min-height: auto !important;
  }

  .quests-detail-grid{
    grid-template-columns: 1fr !important;
  }

  .quests-list-panel-scroller{
    max-height: none !important;
  }

  .quests-board-top,
  .quests-main-grid{
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 680px){
  #quests-modal{
    width: min(96vw, 720px) !important;
    max-height: 88vh !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  .quests-head{
    align-items: flex-start !important;
  }

  .quests-title{
    font-size: 18px !important;
  }

  .quests-close{
    width: 34px !important;
    height: 34px !important;
  }

  .quest-card-inner{
    gap: 10px !important;
  }

  .quest-missionmap-icon{
    width: 56px !important;
    height: 56px !important;
    flex-basis: 56px !important;
  }

  .quest-card-foot{
    grid-template-columns: 1fr !important;
  }

  .quests-detail-hero{
    min-height: 156px !important;
  }

  .quests-detail-hero-copy{
    left: 14px !important;
    right: 68px !important;
    bottom: 14px !important;
  }

  .quests-list-panel{
    padding-inline: 10px !important;
  }

  .quests-detail{
    padding-inline: 10px !important;
  }

  .quests-tabs{
    gap: 6px !important;
    padding: 0 4px !important;
  }
}

/* Skills */
#skills-overlay{
  align-items: flex-end !important;
  justify-content: flex-end !important;
  padding: 18px 18px max(18px, env(safe-area-inset-bottom)) 18px !important;
  background:
    radial-gradient(circle at 18% 10%, rgba(73, 168, 255, 0.12), transparent 30%),
    radial-gradient(circle at 86% 0%, rgba(139, 92, 246, 0.10), transparent 24%),
    rgba(1, 8, 16, 0.12) !important;
}

#skills-modal{
  width: min(860px, 62vw) !important;
  max-height: min(64vh, 680px) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 16px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(92, 148, 202, 0.24) !important;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 72%), rgb(3 1 28 / 72%) 24%), radial-gradient(circle at 50% 0%, rgb(9 18 40 / 39%), transparent 42%) !important;
  color: #eaf7ff !important;
  box-shadow:
    0 32px 90px rgba(0,0,0,0.60),
    0 0 0 1px rgba(73, 168, 255, 0.10) inset,
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
  position: relative !important;
  overflow: hidden !important;
}

#skills-modal::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0) 20%),
    radial-gradient(circle at 50% 0%, rgba(54, 106, 191, 0.26), transparent 42%) !important;
  opacity: 0.9 !important;
}

.skills-head,
.skills-body,
.skills-footer{
  position: relative !important;
  z-index: 1 !important;
}

.skills-head{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.skills-head-brand{
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}

.skills-emblem{
  width: 50px !important;
  height: 50px !important;
  border-radius: 18px !important;
  display: block !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow:
    0 12px 26px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.12) !important;
  font-size: 0 !important;
  color: transparent !important;
}

.skills-emblem--tilemap{
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 550px 400px !important;
  background-position: -450px 0px !important;
  image-rendering: pixelated !important;
}

.skills-head-copy{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.skills-title{
  margin: 0 !important;
  font-size: clamp(22px, 2.4vw, 30px) !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
  letter-spacing: 0.04em !important;
  color: #f4fbff !important;
}

.skills-head-meta{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.skills-points-card{
  padding: 11px 14px !important;
  border-radius: 16px !important;
  background:
    linear-gradient(180deg, rgba(18, 48, 86, 0.98), rgba(10, 28, 51, 0.98)) !important;
  border: 1px solid rgba(115, 219, 255, 0.18) !important;
  box-shadow:
    0 10px 22px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.05) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.skills-points-card span{
  color: #5bd6ff !important;
  font-weight: 1000 !important;
}

.skills-close{
  width: 40px !important;
  height: 40px !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 1000 !important;
  cursor: pointer !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.24) !important;
}

.skills-close:hover{
  transform: translateY(-1px) !important;
}

.skills-body{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(200px, 0.72fr) minmax(0, 1.56fr) minmax(220px, 0.68fr) !important;
  gap: 10px !important;
  overflow: hidden !important;
}

.skills-panel{
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at top left, rgba(76, 146, 208, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(8, 24, 44, 0.90), rgba(5, 16, 29, 0.97)) !important;
  border: 1px solid rgba(92, 148, 202, 0.14) !important;
  box-shadow:
    0 18px 42px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.04) !important;
  overflow: hidden !important;
}

.skills-categories{
  display: flex !important;
  flex-direction: column !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(115, 219, 255, 0.78) rgba(2, 14, 28, 0.72) !important;
  scrollbar-gutter: stable !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(115, 219, 255, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(8, 29, 54, 0.96), rgba(5, 18, 33, 0.98)) !important;
  border-radius: 24px !important;
  border: 1px solid rgba(92, 148, 202, 0.14) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 18px 36px rgba(0,0,0,0.20) !important;
}

.skills-categories-head{
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding-bottom: 6px !important;
}

.skills-category-list{
  display: flex !important;
  flex-direction: column !important;
}

.skills-category{
  appearance: none !important;
  border: 1px solid rgba(92, 148, 202, 0.20) !important;
  border-radius: 19px !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.10), transparent 30%),
    linear-gradient(180deg, rgba(15, 69, 131, 0.98), rgba(8, 41, 83, 0.98)) !important;
  color: #f3fbff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  text-align: left !important;
  box-shadow:
    0 10px 22px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.07) !important;
}

.skills-category.is-active{
  border-color: rgba(126, 216, 255, 0.55) !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(180deg, rgba(42, 105, 174, 0.98), rgba(18, 74, 135, 0.98)) !important;
  box-shadow:
    0 14px 32px rgba(0,0,0,0.26),
    0 0 18px rgba(45, 225, 255, 0.14) !important;
}

.skills-category-main{
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
}

.skills-category-icon{
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 21px !important;
  flex: 0 0 auto !important;
  box-shadow:
    0 10px 18px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.12) !important;
}

.skills-category-copy{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
}

.skills-category-name{
  font-size: 14px !important;
  font-weight: 1000 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.skills-main{
  display: flex !important;
  flex-direction: column !important;
  gap: 9px !important;
  padding: 11px !important;
  overflow: hidden !important;
}

.skills-main-head{
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding-bottom: 2px !important;
}

.skills-grid{
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  overflow: auto !important;
  padding-right: 2px !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(115, 219, 255, 0.78) rgba(2, 14, 28, 0.72) !important;
  scrollbar-gutter: stable !important;
}

.skills-card{
  appearance: none !important;
  border: 1px solid rgba(92, 148, 202, 0.16) !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(5, 72, 144, 0.96), rgba(4, 51, 106, 0.96)) !important;
  color: #ffffff !important;
  padding: 10px !important;
  cursor: pointer !important;
  text-align: left !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  min-height: 128px !important;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, filter 160ms ease !important;
}

.skills-card:hover{
  transform: translateY(-2px) !important;
  border-color: rgba(115, 219, 255, 0.30) !important;
  box-shadow:
    0 16px 34px rgba(0,0,0,0.28),
    0 0 0 1px rgba(115, 219, 255, 0.06) inset,
    0 0 24px rgba(34, 199, 255, 0.10) !important;
}

.skills-card.is-selected{
  border-color: rgba(108, 221, 255, 0.48) !important;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(19, 73, 132, 0.98), rgba(0, 49, 105, 0.98)) !important;
  box-shadow:
    0 18px 36px rgba(0,0,0,0.30),
    0 0 0 1px rgba(115, 219, 255, 0.12) inset,
    0 0 22px rgba(45, 225, 255, 0.12) !important;
}

.skills-card-top{
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: -2px !important;
}

.skills-card-icon{
  width: 62px !important;
  height: 62px !important;
  border-radius: 18px !important;
  display: block !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: transparent !important;
  border: 1px solid rgba(115, 219, 255, 0.12) !important;
  box-shadow: none !important;
}

.skills-card-level{
  padding: 0 2px !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  white-space: nowrap !important;
  align-self: flex-start !important;
  margin-top: -4px !important;
  color: rgba(136, 239, 255, 0.95) !important;
}

.skills-card-name{
  font-size: 14px !important;
  font-weight: 1000 !important;
  line-height: 1.1 !important;
  margin-top: 1px !important;
}

.skills-card-type{
  font-size: 11px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #8ad7ff !important;
}

.skills-card-bar{
  flex: 1 1 auto !important;
  height: 8px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: rgba(0,0,0,0.42) !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.55) !important;
}

.skills-card-bar span{
  display: block !important;
  height: 100% !important;
  background: linear-gradient(90deg, #6bf7ff, #1ba7ff 56%, #8b5cf6 100%) !important;
}

.skills-detail{
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 11px !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(115, 219, 255, 0.78) rgba(2, 14, 28, 0.72) !important;
  scrollbar-gutter: stable !important;
}

.skills-detail-hero{
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.08), transparent 28%),
    linear-gradient(180deg, rgba(9, 29, 51, 0.96), rgba(5, 17, 32, 0.98)) !important;
  border: 1px solid rgba(92, 148, 202, 0.16) !important;
}

.skills-detail-hero-copy{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}


.skills-detail-title{
  font-size: 22px !important;
  font-weight: 1000 !important;
  line-height: 1.05 !important;
  color: #f4fbff !important;
}

.skills-detail-level{
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #7ce6ff !important;
}

.skills-detail-icon{
  width: 62px !important;
  height: 62px !important;
  border-radius: 16px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 38px !important;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 42%),
    linear-gradient(180deg, rgba(112, 210, 255, 0.98), rgba(41, 114, 232, 0.98)) !important;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.10) !important;
  flex: 0 0 auto !important;
}

.skills-detail-copy{
  padding: 2px 2px 0 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: rgba(233, 244, 255, 0.84) !important;
  font-weight: 700 !important;
}

.skills-detail-stats{
  display: grid !important;
  gap: 6px !important;
  padding: 10px !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, rgba(8, 24, 44, 0.96), rgba(5, 16, 29, 0.97)) !important;
  border: 1px solid rgba(92, 148, 202, 0.14) !important;
}

.skills-detail-stat{
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  color: rgba(223, 242, 255, 0.82) !important;
}

.skills-detail-stat strong{
  color: #f5fbff !important;
}

.skills-upgrade-btn{
  appearance: none !important;
  border: none !important;
  border-radius: 16px !important;
  min-height: 38px !important;
  background: linear-gradient(180deg, rgba(33, 95, 160, 0.98), rgba(19, 67, 123, 0.98)) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 1000 !important;
  cursor: pointer !important;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.skills-upgrade-btn:disabled{
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  filter: saturate(0.7) !important;
}

.skills-footer{
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.skills-footer-head{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.skills-footer-label{
  font-size: 11px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: rgba(179, 230, 255, 0.74) !important;
}

.skills-footer-count{
  font-size: 12px !important;
  font-weight: 900 !important;
  color: rgba(223, 242, 255, 0.82) !important;
}

.skills-active-bar{
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

.skills-active-slot{
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative !important;
  min-height: 60px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(92, 148, 202, 0.16) !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(5, 72, 144, 0.96), rgba(4, 51, 106, 0.96)) !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 8px 6px 6px !important;
  color: #fff !important;
}

.skills-active-slot:not(.is-empty){
  cursor: grab !important;
}

.skills-active-slot.is-empty{
  opacity: 0.54 !important;
  cursor: copy !important;
}

.skills-active-slot-index{
  position: absolute !important;
  top: 8px !important;
  left: 9px !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  color: rgba(233, 244, 255, 0.96) !important;
  min-width: 20px !important;
  height: 18px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.30) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.22) !important;
}

.skills-active-slot-icon{
  width: 52px !important;
  height: 52px !important;
  border-radius: 16px !important;
  display: block !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: transparent !important;
  border: 1px solid rgba(115, 219, 255, 0.12) !important;
  box-shadow: none !important;
  flex: 0 0 52px !important;
}

.skills-active-slot-label{
  font-size: 11px !important;
  font-weight: 900 !important;
  text-align: center !important;
  line-height: 1.05 !important;
}

.skills-active-slot-level{
  font-size: 11px !important;
  font-weight: 1000 !important;
  color: #8af0ff !important;
}

.skills-active-slot-placeholder{
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgba(233, 244, 255, 0.72) !important;
}

.skills-active-slot.is-selected{
  border-color: rgba(115, 219, 255, 0.34) !important;
  box-shadow:
    0 14px 30px rgba(0,0,0,0.28),
    0 0 20px rgba(45, 225, 255, 0.10) !important;
}

@media (max-width: 920px){
  .skills-body{
    grid-template-columns: 1fr !important;
  }

  .skills-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .skills-active-bar{
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px){
  #skills-modal{
    width: min(96vw, 680px) !important;
    max-height: 80vh !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  .skills-head{
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .skills-head-meta{
    width: 100% !important;
    justify-content: space-between !important;
  }

  .skills-grid{
    grid-template-columns: 1fr !important;
  }

  .skills-active-bar{
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .skills-title{
    font-size: 20px !important;
  }

  .skills-emblem{
    width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    font-size: 24px !important;
  }
}

#player-info-modal .pi-equipment-tooltip-stats{
  margin-top: 8px !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)) !important;
  gap: 8px !important;
}

#player-info-modal .pi-equipment-stat{
  min-width: 0 !important;
  padding: 9px 10px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.34) !important;
  border: 1px solid rgba(90, 112, 160, 0.22) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

#player-info-modal .pi-equipment-stat-label{
  font-size: 10px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  color: rgba(24, 36, 61, 0.78) !important;
  text-transform: uppercase !important;
}

#player-info-modal .pi-equipment-stat-value{
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
  color: #17243f !important;
}

#player-info-modal .pi-equipment-tooltip-desc{
  margin-top: 11px !important;
  padding-top: 11px !important;
  border-top: 1px solid rgba(47, 72, 115, 0.16) !important;
  color: rgba(29, 40, 68, 0.84) !important;
  font-size: 13px !important;
  font-style: italic !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

#player-info-modal .pi-equipment-tooltip-foot{
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 8px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(47, 72, 115, 0.14) !important;
  color: #ffffff;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#chat-container{
  position: fixed !important;
  top: max(12px, env(safe-area-inset-top)) !important;
  left: calc(max(43px, env(safe-area-inset-left)) + clamp(240px, 19vw, 280px) + 74px) !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 3215 !important;
  width: clamp(360px, 32vw, 470px) !important;
  min-height: 250px !important;
  max-height: 310px !important;
  padding: 6px !important;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#chat-container.chat-compact{
  width: clamp(300px, 24vw, 380px) !important;
    min-height: 140px !important;
    max-height: 160px !important;
  padding: 1px !important;
  gap: 8px !important;
  background:
   radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.cc-chat-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cc-chat-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.cc-chat-tabs{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.cc-chat-tab{
  border: 1px solid rgba(115, 219, 255, 0.26);
  border-radius: 999px;
  padding: 7px 12px;
  background: linear-gradient(180deg, rgba(27, 88, 163, 0.98), rgba(13, 55, 112, 0.98));
  color: rgba(244, 251, 255, 0.88);
  font-size: 12px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 4px 10px rgba(0,0,0,0.18) !important;
}

.cc-chat-tab.is-active{
  border-color: rgba(34, 199, 255, 0.92);
  background: linear-gradient(180deg, rgba(77, 214, 255, 0.98), rgba(17, 112, 214, 0.98));
  color: #fff;
}

#chat-box{
  flex: 1 1 auto;
  min-height: 120px;
  padding: 10px 12px !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(6, 26, 53, 0.96), rgba(8, 34, 71, 0.96)) !important;
  border: 1px solid rgba(115, 219, 255, 0.18);
  overflow: auto;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 219, 255, 0.78) rgba(2, 14, 28, 0.72);
  scrollbar-gutter: stable;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif !important;
  color: #f4fbff !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.72) !important;
}

#chat-box::-webkit-scrollbar,
#trade-chat-box::-webkit-scrollbar{
  width: 10px;
  height: 10px;
}

#chat-box::-webkit-scrollbar-track,
#trade-chat-box::-webkit-scrollbar-track{
  background:
    linear-gradient(180deg, rgba(4, 16, 31, 0.92), rgba(8, 28, 54, 0.92));
  border-radius: 999px;
  border: 1px solid rgba(115, 219, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
}

#chat-box::-webkit-scrollbar-thumb,
#trade-chat-box::-webkit-scrollbar-thumb{
  border-radius: 999px;
  border: 2px solid rgba(5, 17, 33, 0.92);
  background:
    linear-gradient(180deg, rgba(115, 219, 255, 0.98), rgba(44, 138, 255, 0.90));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 0 0 1px rgba(115, 219, 255, 0.18);
}

#chat-box::-webkit-scrollbar-thumb:hover,
#trade-chat-box::-webkit-scrollbar-thumb:hover{
  background:
    linear-gradient(180deg, rgba(160, 234, 255, 0.98), rgba(64, 160, 255, 0.96));
}

#chat-box::-webkit-scrollbar-thumb:active,
#trade-chat-box::-webkit-scrollbar-thumb:active{
  background:
    linear-gradient(180deg, rgba(88, 203, 245, 0.98), rgba(24, 122, 227, 0.98));
}

#chat-box::-webkit-scrollbar-corner,
#trade-chat-box::-webkit-scrollbar-corner{
  background: transparent;
}

#chat-container.chat-compact #chat-box{
  min-height: 52px !important;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  gap: 3px !important;
}

#chat-box > div{
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: inherit !important;
  text-shadow: inherit !important;
  white-space: normal;
}

#chat-box > div *,
#chat-box > div > span,
#chat-box > div > a,
#chat-box > div > strong,
#chat-box > div > em{
  font-family: "Segoe UI", Tahoma, Arial, sans-serif !important;
  font-size: inherit !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.72) !important;
}

#chat-box .chat-system-alpha{
  align-items: center !important;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif !important;
  font-size: 11px !important;
  line-height: 1 !important;
  letter-spacing: 0.02em !important;
  color: #f4fbff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.72) !important;
}

#chat-box .chat-system-alpha-em{
  color: #22c7ff !important;
}

#chat-container.chat-compact #chat-box > div{
  font-size: 11px !important;
  line-height: 1 !important;
}

#chat-input-bar{
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  margin-top: 0;
}

#chat-container.chat-compact #chat-input-bar{
  gap: 6px !important;
}

#chat-toggle-button{
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  flex: 0 0 auto !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
}

#chat-container.chat-compact #chat-input,
#chat-container.chat-compact #clear-chat-button{
  height: 36px !important;
}

#chat-input,
#player-info-content input[type="text"],
#player-info-content input[type="number"],
#trade-chat-input{
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background: linear-gradient(180deg, rgba(7, 35, 71, 0.96), rgba(10, 27, 52, 0.96));
  color: #edf7ff;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

#chat-input{
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

#clear-chat-button,
#chat-toggle-button{
  flex: 0 0 auto !important;
}

#chat-container.chat-compact #chat-input{
  font-size: 12px !important;
  padding: 0 10px !important;
}

#chat-input::placeholder{
  color: rgba(214, 235, 250, 0.58);
}

#player-info-content{
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.pi-inventory-section{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pi-inventory-title{
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(217, 244, 255, 0.86);
}

.pi-inventory-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background: rgba(5, 18, 34, 0.34);
}

.pi-inventory-chip{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 92px;
  min-height: 112px;
  padding: 8px 6px;
  border-radius: 16px;
  border: 2px solid rgb(9 84 158) !important;
  background:
radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 34%), linear-gradient(180deg, rgb(255 255 255 / 8%), rgb(0 120 255 / 72%));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255,255,255,0.08);
  color: #f4fbff;
  cursor: pointer;
}

.pi-inventory-chip[data-rarity="common"]{
  border-color: rgba(138, 143, 152, 0.84) !important;
}

.pi-inventory-chip[data-rarity="uncommon"]{
  border-color: rgba(46, 204, 113, 0.94) !important;
}

.pi-inventory-chip[data-rarity="rare"]{
  border-color: rgba(52, 152, 255, 0.96) !important;
}

.pi-inventory-chip[data-rarity="epic"]{
  border-color: rgba(176, 77, 255, 0.96) !important;
}

.pi-inventory-chip[data-rarity="legendary"]{
  border-color: rgba(255, 176, 0, 0.98) !important;
}

.pi-inventory-chip[data-rarity="mythic"],
.pi-inventory-chip[data-rarity="unique"],
.pi-inventory-chip[data-rarity="uniqe"]{
  border-color: rgba(255, 48, 48, 1) !important;
}

.pi-inventory-chip.is-active{
  border-color: var(--inv-rarity-color, rgba(34, 199, 255, 0.96)) !important;
  box-shadow:
    0 0 0 2px rgba(34, 199, 255, 0.38) inset,
    0 0 18px rgba(34, 199, 255, 0.32),
    0 8px 18px rgba(0, 0, 0, 0.32);
}

.pi-inventory-chip.is-hand{
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,0.18), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(18, 58, 103, 0.98), rgba(7, 28, 55, 0.98));
}

.pi-inventory-icon-wrap{
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pi-inventory-icon{
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  object-position: center center !important;
  image-rendering: pixelated;
  display: block !important;
  transform: scale(1.12);
  transform-origin: center center;
}

.pi-inventory-name{
  width: 100%;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.pi-inventory-qty{
  font-size: 11px;
  font-weight: 900;
  color: rgba(244, 251, 255, 0.82);
}

.pi-inventory-empty{
  padding: 12px 10px;
  color: rgba(244, 251, 255, 0.7);
  font-weight: 700;
}

#inventory,
#inventory-toolbar{
  display: none !important;
}

#clear-chat-button{
  min-width: 74px !important;
  height: 40px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
}

#hud-actions{
  position: fixed !important;
  top: max(12px, env(safe-area-inset-top)) !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  width: max-content !important;
  min-width: max-content !important;
  padding: 0 !important;
  z-index: 3222 !important;
  pointer-events: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#hud-actions .hud-actions-group{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
}

#hud-actions .hud-actions-group-wallet{
  gap: 10px !important;
}

#hud-actions .hud-actions-group-wallet{
  order: -1 !important;
}

#hud-actions .hud-actions-group-main{
  order: 1 !important;
}

#hud-actions .hud-actions-group-main > *,
#hud-actions .hud-actions-group-wallet > *{
  flex: 0 0 auto !important;
  height: 76px !important;
  min-height: 76px !important;
}

#hud-actions .hud-actions-group-main > *{
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
}

#hud-actions > *{
  flex: 0 0 auto !important;
}

#coin-display{
  width: 124px !important;
  min-width: 124px !important;
  max-width: 124px !important;
  height: 76px !important;
  min-height: 76px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  pointer-events: auto !important;
  cursor: default !important;
  overflow: hidden !important;
}

#quests-button-hud,
#friends-button,
#inventory-button-hud,
#shop-button-hud{
  width: 84px !important;
  min-width: 84px !important;
  max-width: 84px !important;
  height: 84px !important;
  min-height: 84px !important;
  padding: 10px 10px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-direction: column !important;
  gap: 4px !important;
  text-align: center !important;
}

#backToLobbyButton,
#quests-button-hud,
#friends-button,
#inventory-button-hud,
#coin-display,
#shop-button-hud{
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.12), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(18, 18, 22, 0.719), rgba(2, 2, 6, 0.685)) !important;
  border: 1px solid rgba(115, 219, 255, 0.44) !important;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -10px 18px rgba(0, 0, 0, 0.28) !important;
}

#coin-display .coin-icon{
  display: none !important;
}

#backToLobbyButton{
  width: 84px !important;
  min-width: 84px !important;
  height: 84px !important;
  min-height: 84px !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 10px 10px 12px !important;
  flex-direction: column !important;
  gap: 4px !important;
  order: 2 !important;
}

#friends-button .friends-label{
  display: block !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #f4fbff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.55);
}

#friends-button .hud-tilemap-icon{
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: scale(1) !important;
  margin: 0 auto 2px !important;
  display: block !important;
}

#friends-button .friends-count{
  display: block !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  color: rgba(244, 251, 255, 0.72) !important;
}

#coin-display .coin-label{
  display: block !important;
  font-size: 9px !important;
  line-height: 1 !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

#coin-display #coin-count{
  display: block !important;
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #ffffff !important;
}

#coin-display .coin-copy{
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 0 !important;
}

#backToLobbyButton::after,
#quests-button-hud::after,
#inventory-button-hud::after,
#shop-button-hud::after{
  content: attr(data-label);
  display: block;
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  color: #f4fbff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.55);
}

#backToLobbyButton .hud-tilemap-icon,
#quests-button-hud .hud-tilemap-icon,
#inventory-button-hud .hud-tilemap-icon,
#shop-button-hud .hud-tilemap-icon{
  top: 34% !important;
}

#inventory-button-hud .hud-tilemap-icon{
  top: 28% !important;
  z-index: 2 !important;
}

#inventory-button-hud{
  z-index: 3 !important;
}

#shop-button-hud{
  z-index: 2 !important;
}

#shop-button-hud{
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
}


#hud-actions .hud-actions-group-wallet > *:first-child{
  margin-right: 0 !important;
}

#mini-map-stack{
  position: fixed !important;
  top: calc(max(2px, env(safe-area-inset-top)) + 94px) !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  z-index: 3218 !important;
  width: clamp(200px, 18vw, 240px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
  pointer-events: auto !important;
}

#mini-map-panel{
  position: static !important;
  width: 100% !important;
  padding: 12px !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(150, 220, 255, 0.16) !important;
  background:
    radial-gradient(circle at 18% 8%, rgba(88, 188, 255, 0.18), rgba(88, 188, 255, 0) 34%),
    linear-gradient(180deg, rgba(8, 24, 43, 0.94), rgba(5, 17, 32, 0.97)) !important;
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

#fps-badge{
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(115, 219, 255, 0.16);
  background: rgba(4, 16, 30, 0.78);
  color: #a7f3d0;
  font: 12px/1.2 monospace;
  white-space: pre;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.mini-map-head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mini-map-view{
  position: relative;
  height: 132px;
  border: 1px solid rgba(115, 219, 255, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 24% 24%, rgba(34, 199, 255, 0.18), rgba(34, 199, 255, 0) 38%),
    radial-gradient(circle at 76% 18%, rgba(145, 236, 135, 0.12), rgba(145, 236, 135, 0) 28%),
    linear-gradient(180deg, rgba(4, 16, 31, 0.92), rgba(7, 26, 46, 0.98));
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.28);
}

.mini-map-grid{
  position: absolute;
  inset: 0px;
  display: grid;
  gap: 0;
  pointer-events: none;
}

.mini-map-cell{
  display: block;
  position: relative;
  border-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.14);
  background-clip: padding-box;
  image-rendering: pixelated;
  overflow: hidden;
}

.mini-map-cell.is-mini-plant{
  border-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 0 0 1px rgba(255,255,255,0.03);
  filter: saturate(1.08) brightness(1.02);
  clip-path: polygon(50% 0%, 66% 6%, 82% 18%, 100% 36%, 88% 50%, 100% 64%, 82% 82%, 66% 94%, 50% 100%, 34% 94%, 18% 82%, 0% 64%, 12% 50%, 0% 36%, 18% 18%, 34% 6%);
}

.mini-map-cell.is-mini-tree{
  border-radius: 0;
  filter: saturate(1.1) brightness(1.03);
  clip-path: none;
}

.mini-map-cell.is-mini-trunk{
  clip-path: none;
  background-blend-mode: normal;
}

.mini-map-cell.is-mini-trunk-crown{
  clip-path: none;
  background-blend-mode: normal;
}

.mini-map-cell.is-mini-trunk-crown::before{
  content: "";
  position: absolute;
  inset: 28% 28% 28% 28%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(102, 61, 30, 0.96), rgba(58, 31, 15, 0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  pointer-events: none;
}

.mini-map-cell.is-mini-block123{
  border-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 0 0 1px rgba(255,255,255,0.03);
  clip-path: none;
}

.mini-map-cell.is-mini-block123::before{
  content: "";
  position: absolute;
  inset: 12% 12% 12% 12%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.08)),
    linear-gradient(135deg, transparent 0 36%, rgba(255,255,255,0.16) 36% 44%, transparent 44% 100%),
    linear-gradient(225deg, transparent 0 36%, rgba(255,255,255,0.16) 36% 44%, transparent 44% 100%);
  pointer-events: none;
}

.mini-map-cell.is-mini-water{
  border-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.12),
    0 0 0 1px rgba(255,255,255,0.04);
}

.mini-map-cell.is-mini-soil{
  border-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 0 0 1px rgba(0,0,0,0.04);
}

.mini-map-cell.is-mini-soil-top{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 0 0 1px rgba(255,255,255,0.03);
}

.mini-map-cell.is-mini-stone{
  border-radius: 6%;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 0 1px rgba(255,255,255,0.04);
}

.mini-map-marker{
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border: 1px solid rgba(34, 199, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(34, 199, 255, 0.18), 0 0 8px rgba(34, 199, 255, 0.4);
  pointer-events: none;
}

.mini-map-meta{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: rgba(228, 245, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.mini-map-meta span{
  display: inline-flex;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.monster-kill-feed{
  position: static !important;
  width: 100% !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 18px rgba(0,0,0,0.18);
  pointer-events: auto !important;
}

.monster-kill-feed-item{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background:
    radial-gradient(circle at 14% 14%, rgba(66, 172, 255, 0.14), rgba(66, 172, 255, 0) 34%),
    linear-gradient(180deg, rgba(4, 16, 30, 0.92), rgba(8, 26, 44, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 20px rgba(0,0,0,0.24);
  overflow: hidden;

  transform: translateY(-6px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease;
}

.monster-kill-feed-item::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
  opacity: 0.18;
  pointer-events: none;
}

.monster-kill-feed-item.is-visible{
  opacity: 1;
  transform: translateY(0) scale(1);
}

.monster-kill-feed-item.is-leaving{
  opacity: 0;
  transform: translateY(-4px) scale(0.985);
}

.monster-kill-feed-item.is-block-death{
  border-color: rgba(115, 219, 255, 0.28);
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 199, 122, 0.14), rgba(255, 199, 122, 0) 34%),
    linear-gradient(180deg, rgba(20, 14, 4, 0.92), rgba(45, 24, 8, 0.98));
}

.monster-kill-feed-killer{
  min-width: 0;
  max-width: 44%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f4fbff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(0,0,0,0.55);
}

.monster-kill-feed-icon{
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  background-image: url("/photos/icons_tilemap.png");
  background-repeat: no-repeat;
  background-size: 550px 400px;
  background-position: -354px -308px;
  image-rendering: pixelated;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 6px 12px rgba(0,0,0,0.18);
}

.monster-kill-feed-icon.pi-tab-icon{
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: 4px;
  background-image: url("/photos/icons_tilemap.png");
  background-repeat: no-repeat;
  background-size: 242px 176px;
  image-rendering: pixelated;
}

.monster-kill-feed-icon.pi-tab-icon-blocks{
  background-position: 0px -44px;
}

.monster-kill-feed-monster{
  margin-left: auto;
  min-width: 0;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffc97a;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.monster-kill-feed-reward{
  margin-left: 6px;
  flex: 0 0 auto;
  color: rgba(228, 245, 255, 0.7);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

#inventory{
  position: fixed !important;
  left: max(12px, env(safe-area-inset-left)) !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
  z-index: 3195 !important;
  padding: 12px !important;
  pointer-events: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  overflow: hidden !important;
  max-height: min(28vh, 220px) !important;
}

#inventory-header{
  display: none !important;
}

#inventory-grid{
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(86px, 86px)) !important;
  gap: 10px !important;
  align-content: start;
  width: 100% !important;
  justify-content: start !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding-bottom: 2px !important;
}

#inventory-grid .inventory-item{
  display: flex !important;
  position: relative;
  width: 86px !important;
  height: 86px !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: hidden;
  border-radius: 18px !important;
  border: 1px solid rgba(118, 215, 255, 0.22);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(73, 168, 255, 0.14), rgba(73, 168, 255, 0) 42%),
    linear-gradient(180deg, rgba(16, 35, 63, 0.98), rgba(8, 18, 36, 0.98)) !important;
}

#inventory-grid .inventory-item[data-rarity="common"]{
  border-color: rgba(138, 143, 152, 0.84) !important;
  box-shadow:
    0 0 0 1px rgba(138, 143, 152, 0.10) inset,
    0 10px 18px rgba(0,0,0,0.18),
    0 0 12px rgba(138, 143, 152, 0.10) !important;
}

#inventory-grid .inventory-item[data-rarity="uncommon"]{
  border-color: rgba(46, 204, 113, 0.94) !important;
  box-shadow:
    0 0 0 1px rgba(46, 204, 113, 0.14) inset,
    0 10px 18px rgba(0,0,0,0.20),
    0 0 14px rgba(46, 204, 113, 0.20) !important;
}

#inventory-grid .inventory-item[data-rarity="rare"]{
  border-color: rgba(52, 152, 255, 0.96) !important;
  box-shadow:
    0 0 0 1px rgba(52, 152, 255, 0.16) inset,
    0 10px 18px rgba(0,0,0,0.22),
    0 0 16px rgba(52, 152, 255, 0.24) !important;
}

#inventory-grid .inventory-item[data-rarity="epic"]{
  border-color: rgba(176, 77, 255, 0.96) !important;
  box-shadow:
    0 0 0 1px rgba(176, 77, 255, 0.18) inset,
    0 10px 18px rgba(0,0,0,0.22),
    0 0 18px rgba(176, 77, 255, 0.26) !important;
}

#inventory-grid .inventory-item[data-rarity="legendary"]{
  border-color: rgba(255, 176, 0, 0.98) !important;
  box-shadow:
    0 0 0 1px rgba(255, 176, 0, 0.22) inset,
    0 10px 18px rgba(0,0,0,0.22),
    0 0 20px rgba(255, 176, 0, 0.30) !important;
}

#inventory-grid .inventory-item[data-rarity="mythic"],
#inventory-grid .inventory-item[data-rarity="unique"],
#inventory-grid .inventory-item[data-rarity="uniqe"]{
  border-color: rgba(255, 48, 48, 1) !important;
  box-shadow:
    0 0 0 1px rgba(255, 48, 48, 0.22) inset,
    0 0 18px rgba(255, 48, 48, 0.34),
    0 0 28px rgba(255, 48, 48, 0.18) !important;
}

#inventory-grid .inventory-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}

#inventory-grid .inventory-item .item-quantity{
  right: 6px !important;
  bottom: 6px !important;
  left: auto !important;
  top: auto !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  background: rgba(6, 23, 44, 0.84) !important;
  border: 1px solid rgba(115, 219, 255, 0.24) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

#inventory-grid .inventory-item .item-label{
  border-radius: 999px !important;
  background: rgba(6, 23, 44, 0.92) !important;
  border-color: rgba(115, 219, 255, 0.24) !important;
}

#inventory-grid .inventory-item.selected-item{
  border-color: var(--inv-rarity-color, rgba(34, 199, 255, 0.96)) !important;
  box-shadow:
    0 0 0 2px rgba(34, 199, 255, 0.58) inset,
    0 0 20px rgba(34, 199, 255, 0.42),
    0 12px 24px rgba(0,0,0,0.38) !important;
}

#inventory-toolbar{
  position: fixed !important;
  left: max(12px, env(safe-area-inset-left)) !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 12px) !important;
  z-index: 3196 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  border-radius: 20px !important;
  width: auto !important;
  max-width: none !important;
  max-height: min(34vh, 280px) !important;
  overflow: auto !important;
  pointer-events: auto !important;
  box-sizing: border-box;
}

#craft-modal{
  padding: 12px !important;
}

#craft-modal #craft-panel{
  width: min(94vw, 1100px) !important;
  max-height: calc(100dvh - 24px) !important;
  overflow: auto !important;
}

#craft-modal .craft-shell{
  width: 100% !important;
}

#craft-modal .craft-layout,
#craft-modal .craft-main-grid{
  min-height: 0 !important;
}

#inventory-toolbar.inventory-toolbar-collapsed{
  opacity: 0.95;
}

.inv-actions{
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 0 1 auto !important;
  max-width: min(100%, 560px) !important;
}

.inv-actions > *{
  flex: 0 0 auto;
}

#gameplay-quick-panel{
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  min-width: 0;
  flex: 1 1 320px !important;
  max-width: 640px !important;
  max-height: 100% !important;
}

#gameplay-quick-panel{
  position: fixed !important;
  left: 50% !important;
  bottom: calc(max(1px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 1px) !important;
  transform: translateX(-50%) !important;
  width: min(92vw, 980px) !important;
  max-width: 980px !important;
  flex: none !important;
  z-index: 3302 !important;
  pointer-events: auto !important;
}

#gameplay-quick-panel{
  border-radius: 22px !important;
  border: 1px solid rgba(126, 223, 255, 0.20) !important;
  background:
    radial-gradient(140% 120% at 20% -8%, rgba(73, 168, 255, 0.12), rgba(73, 168, 255, 0) 44%),
    linear-gradient(180deg, rgba(8, 25, 48, 0.90), rgba(6, 18, 34, 0.96)) !important;
  box-shadow:
    0 24px 56px rgba(0,0,0,0.46),
    0 0 28px rgba(66, 172, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(10px) saturate(1.06) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.06) !important;
  overflow: hidden !important;
}

#gameplay-quick-panel::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 28%),
    radial-gradient(circle at 18% 0%, rgba(73, 168, 255, 0.16), rgba(73, 168, 255, 0) 36%);
  opacity: 0.72;
}

#gameplay-quick-panel > *{
  position: relative;
  z-index: 1;
}

#gameplay-quick-panel .gameplay-section{
  width: 100% !important;
}

#mobile-controls #gameplay-history{
  width: 100% !important;
}

@media (max-width: 700px){
  #gameplay-quick-panel{
    width: min(92vw, 620px) !important;
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 140px) !important;
  }

  #gameplay-history{
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }
}

.gameplay-section{
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  align-items: stretch !important;
}

.gameplay-xp-block{
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
}

.gameplay-xp-text{
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #d9f4ff !important;
  text-align: center !important;
  line-height: 1 !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.8) !important;
  pointer-events: none !important;
}

.gameplay-xp-track{
  position: relative !important;
  width: 100% !important;
  height: 10px !important;
  border-radius: 999px !important;
  background: rgba(2, 15, 30, 0.8) !important;
  border: 1px solid rgba(115, 219, 255, 0.24) !important;
  overflow: hidden !important;
}

.gameplay-xp-fill{
  position: relative !important;
  z-index: 1 !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #22c7ff 0%, #49a8ff 55%, #18e06f 100%) !important;
  box-shadow: 0 0 18px rgba(34, 199, 255, 0.45) !important;
}

.gameplay-history-label{
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  color: rgba(217, 244, 255, 0.78) !important;
  text-align: center !important;
}

#gameplay-history{
  min-width: 0 !important;
  display: block !important;
}

.pi-hotbar-wrap{
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  --pi-hotbar-slot-size: clamp(52px, 5.2vw, 64px);
  --pi-hotbar-slot-gap: clamp(4px, 0.9vw, 8px);
}

.pi-hotbar-section{
  display: flex;
  flex-direction: column;
  gap: 0px;
  flex: 0 0 auto;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.pi-hotbar-section-favorites{
  width: calc((5 * var(--pi-hotbar-slot-size)) + (4 * var(--pi-hotbar-slot-gap)));
}

.pi-hotbar-section-smart{
  width: calc((3 * var(--pi-hotbar-slot-size)) + (2 * var(--pi-hotbar-slot-gap)));
}

.pi-hotbar-section-smart{
  padding-top: 0;
  border-top: 0;
  border-left: 1px solid rgba(115, 219, 255, 0.12);
}

.pi-hotbar-section-skills{
  width: calc((5 * var(--pi-hotbar-slot-size)) + (4 * var(--pi-hotbar-slot-gap)));
  padding-top: 0;
  border-top: 0;
  border-left: 1px solid rgba(145, 255, 186, 0.12);
}

.pi-hotbar-section-title{
  font-size: 10px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(217, 244, 255, 0.78);
  padding-left: 2px;
}

.pi-hotbar-grid{
  display: grid;
  gap: var(--pi-hotbar-slot-gap);
  width: 100%;
  justify-content: start;
  align-content: start;
  box-sizing: border-box;
}

.pi-hotbar-grid-favorites{
  grid-template-columns: repeat(5, var(--pi-hotbar-slot-size));
}

.pi-hotbar-grid-smart{
  grid-template-columns: repeat(3, var(--pi-hotbar-slot-size));
}

.pi-hotbar-grid-skills{
  grid-template-columns: repeat(5, var(--pi-hotbar-slot-size));
}

.pi-hotbar-slot{
  position: relative;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(115, 219, 255, 0.22);
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.14), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(11, 42, 77, 0.96), rgba(4, 20, 38, 0.96));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.08);
  padding: 3px 3px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  color: #f4fbff;
  padding: 0;
}

.pi-hotbar-slot.is-skill{
  border-color: rgba(145, 255, 186, 0.26);
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.14), rgba(255,255,255,0) 34%),
    radial-gradient(circle at 70% 18%, rgba(145, 255, 186, 0.16), rgba(145, 255, 186, 0) 36%),
    linear-gradient(180deg, rgba(8, 43, 44, 0.98), rgba(5, 23, 31, 0.98));
}

.pi-hotbar-slot.is-skill.is-empty{
  border-style: dashed;
}

.gameplay-hotbar-slot.is-active{
  border-color: rgba(34, 199, 255, 0.96);
  box-shadow:
    0 0 0 2px rgba(34, 199, 255, 0.38) inset,
    0 0 18px rgba(34, 199, 255, 0.34),
    0 8px 18px rgba(0, 0, 0, 0.36);
}

.gameplay-hotbar-slot.is-locked{
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.18), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(18, 58, 103, 0.98), rgba(7, 28, 55, 0.98));
}

.gameplay-hotbar-slot-num{
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 11px;
  font-weight: 900;
  color: rgba(244, 251, 255, 0.84);
}

.gameplay-chip-icon-wrap{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gameplay-chip-icon{
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  object-position: center center !important;
  image-rendering: pixelated !important;
  display: block !important;
  transform: scale(1.06);
  transform-origin: center center;
}

.gameplay-hotbar-slot-kind{
  display: none !important;
  margin-top: 0;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.08em;
  font-weight: 900;
  color: rgba(244, 251, 255, 0.9);
  background: rgba(8, 23, 43, 0.72);
  border: 1px solid rgba(115, 219, 255, 0.16);
}

.gameplay-hotbar-slot-icon-wrap{
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gameplay-hotbar-slot-icon{
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  object-position: center center !important;
  image-rendering: pixelated !important;
  display: block !important;
  transform: scale(1.08);
  transform-origin: center center;
}

.gameplay-hotbar-slot-empty{
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px dashed rgba(173, 237, 255, 0.22);
  opacity: 0.55;
}

.gameplay-hotbar-slot-qty{
  min-height: 14px;
  font-size: 11px;
  font-weight: 900;
  color: rgba(244, 251, 255, 0.9);
}

#player-info-content .pi-hotbar-card{
  margin-top: auto !important;
  flex: 0 0 auto !important;
}

.pi-hotbar-editor{
  display: block !important;
  margin-top: 12px !important;
}

.pi-hotbar-slot{
  position: relative;
  min-width: 0;
  width: var(--pi-hotbar-slot-size);
  height: var(--pi-hotbar-slot-size);
  border-radius: 18px;
  border: 1px solid rgb(31 53 163) !important;
  background:
   radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  color: #f4fbff;
  overflow: hidden;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, filter 120ms ease;
}

.pi-hotbar-slot:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.pi-hotbar-slot.is-smart{
  border-color: rgba(115, 219, 255, 0.16);
}

.pi-hotbar-slot[data-rarity="common"]{
  border-color: rgba(138, 143, 152, 0.84);
  box-shadow:
    0 0 0 1px rgba(138, 143, 152, 0.10) inset,
    0 10px 18px rgba(0,0,0,0.18),
    0 0 12px rgba(138, 143, 152, 0.10);
}

.pi-hotbar-slot[data-rarity="uncommon"]{
  border-color: rgba(46, 204, 113, 0.94);
  box-shadow:
    0 0 0 1px rgba(46, 204, 113, 0.14) inset,
    0 10px 18px rgba(0,0,0,0.20),
    0 0 14px rgba(46, 204, 113, 0.20);
}

.pi-hotbar-slot[data-rarity="rare"]{
  border-color: rgba(52, 152, 255, 0.96);
  box-shadow:
    0 0 0 1px rgba(52, 152, 255, 0.16) inset,
    0 10px 18px rgba(0,0,0,0.22),
    0 0 16px rgba(52, 152, 255, 0.24);
}

.pi-hotbar-slot[data-rarity="epic"]{
  border-color: rgba(176, 77, 255, 0.96);
  box-shadow:
    0 0 0 1px rgba(176, 77, 255, 0.18) inset,
    0 10px 18px rgba(0,0,0,0.22),
    0 0 18px rgba(176, 77, 255, 0.26);
}

.pi-hotbar-slot[data-rarity="legendary"]{
  border-color: rgba(255, 176, 0, 0.98);
  box-shadow:
    0 0 0 1px rgba(255, 176, 0, 0.22) inset,
    0 10px 18px rgba(0,0,0,0.22),
    0 0 20px rgba(255, 176, 0, 0.30);
}

.pi-hotbar-slot[data-rarity="mythic"],
.pi-hotbar-slot[data-rarity="unique"],
.pi-hotbar-slot[data-rarity="uniqe"]{
  border-color: rgba(255, 48, 48, 1);
  box-shadow:
    0 0 0 1px rgba(255, 48, 48, 0.22) inset,
    0 0 18px rgba(255, 48, 48, 0.34),
    0 0 28px rgba(255, 48, 48, 0.18);
}

.pi-hotbar-slot.is-active{
  border-color: var(--inv-rarity-color, rgba(34, 199, 255, 0.96)) !important;
  box-shadow:
    0 0 0 2px rgba(34, 199, 255, 0.38) inset,
    0 0 18px rgba(34, 199, 255, 0.32),
    0 8px 18px rgba(0, 0, 0, 0.32);
}

.pi-hotbar-slot.is-empty{
  opacity: 0.9;
}

.pi-hotbar-slot.is-empty .pi-hotbar-slot-empty{
  opacity: 0.7;
}

.pi-hotbar-slot.is-editing{
  border-color: rgba(24, 224, 111, 0.9);
  box-shadow:
    0 0 0 2px rgba(24, 224, 111, 0.22) inset,
    0 0 16px rgba(24, 224, 111, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.36);
}

.pi-hotbar-slot.is-locked{
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,0.12), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, rgba(18, 58, 103, 0.98), rgba(7, 28, 55, 0.98));
}

.pi-hotbar-slot-num{
  position: absolute;
  top: 5px;
  left: 6px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(244, 251, 255, 0.84);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  z-index: 2;
}

.pi-hotbar-slot-icon-wrap{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pi-hotbar-slot-icon{
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  object-position: center center !important;
  image-rendering: pixelated !important;
  display: block !important;
  transform: scale(1.0);
  transform-origin: center center;
}

.pi-hotbar-slot-empty{
  width: 100%;
  height: 100%;
  border-radius: 14px;
  border: 1px dashed rgba(173, 237, 255, 0.22);
  opacity: 0.45;
  background: rgba(255,255,255,0.02);
}

.pi-hotbar-slot-label{
  display: none;
}

.pi-hotbar-slot-qty{
  position: absolute;
  right: 0px;
  bottom: 0px;
  left: auto;
  min-height: 0;
  padding: 0px 5px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(244, 251, 255, 0.96);
  z-index: 2;
}

@media (max-width: 860px){
  .pi-hotbar-wrap{
    flex-direction: column;
    --pi-hotbar-slot-size: clamp(52px, 12vw, 78px);
    --pi-hotbar-slot-gap: clamp(4px, 1vw, 8px);
  }
  .pi-hotbar-section{
    width: 100%;
    overflow: visible;
  }
  .pi-hotbar-section-favorites,
  .pi-hotbar-section-smart,
  .pi-hotbar-section-skills{
    width: 100%;
  }
  .pi-hotbar-section-smart{
    padding-left: 0;
    border-left: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(115, 219, 255, 0.12);
  }
  .pi-hotbar-section-skills{
    padding-left: 0;
    border-left: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(145, 255, 186, 0.12);
  }
  .pi-hotbar-slot{
    border-radius: 16px;
  }
}

@media (max-width: 560px){
  .pi-hotbar-wrap{
    --pi-hotbar-slot-size: clamp(48px, 14vw, 68px);
    --pi-hotbar-slot-gap: 4px;
  }
  .pi-hotbar-section{
    width: 100%;
  }
  .pi-hotbar-slot{
    border-radius: 16px;
  }
}

@media (max-width: 560px) and (orientation: portrait){
  #mobile-controls{
    z-index: 3301 !important;
  }

  #touch-left,
  #touch-right,
  #touch-zoom{
    gap: 8px !important;
  }

  #touch-left button,
  #touch-right button{
    width: 82px !important;
    height: 82px !important;
    border-radius: 20px !important;
  }

  #touch-zoom{
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 92px) !important;
  }

  #touch-zoom button{
    width: 58px !important;
    height: 58px !important;
  }

  #gameplay-quick-panel{
    width: min(88vw, 520px) !important;
    max-width: 520px !important;
  }
}

@media (max-width: 430px) and (orientation: portrait){
  #touch-left,
  #touch-right,
  #touch-zoom{
    gap: 6px !important;
  }

  #touch-left button,
  #touch-right button{
    width: 72px !important;
    height: 72px !important;
    border-radius: 18px !important;
  }

  #touch-zoom{
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 84px) !important;
  }

  #touch-zoom button{
    width: 52px !important;
    height: 52px !important;
  }

  #gameplay-quick-panel{
    width: min(90vw, 440px) !important;
    max-width: 440px !important;
  }
}


.gameplay-chip,
.gameplay-chip-empty{
  position: relative;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  border: 1px solid rgba(115, 219, 255, 0.22);
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.14), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(11, 42, 77, 0.96), rgba(4, 20, 38, 0.96));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.gameplay-chip{
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gameplay-chip-active{
  border-color: rgba(34, 199, 255, 0.92);
  box-shadow:
    0 0 0 2px rgba(34, 199, 255, 0.38) inset,
    0 0 18px rgba(34, 199, 255, 0.45),
    0 8px 18px rgba(0, 0, 0, 0.36);
}

.gameplay-chip-hand{
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.18), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(18, 58, 103, 0.98), rgba(7, 28, 55, 0.98));
}

.gameplay-chip-qty{
  position: absolute;
  right: 4px;
  bottom: 3px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(6, 23, 44, 0.84);
  border: 1px solid rgba(115, 219, 255, 0.22);
  font-size: 11px;
  font-weight: 900;
  color: #f4fbff;
  line-height: 1;
}

.gameplay-chip-empty{
  opacity: 0.34;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(244, 251, 255, 0.55);
  font-weight: 900;
}

#shop-modal{
  position: fixed !important;
  inset: 0 !important;
  z-index: 13040 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px;
  background:
    radial-gradient(circle at 8% 12%, rgba(24, 211, 255, 0.20), transparent 26%),
    radial-gradient(circle at 92% 88%, rgba(109, 73, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(2, 9, 18, 0.78), rgba(1, 4, 10, 0.88));
  pointer-events: auto !important;
}

body.shop-modal-open #shop-modal{
  display: flex !important;
}

#shop-modal .shop-shell{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(96vw, 1420px);
  max-width: 1420px;
  max-height: calc(100vh - 36px);
  overflow: hidden;
  padding: 18px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 12% 0%, rgba(66, 198, 255, 0.16), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(109, 73, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.98), rgba(4, 12, 24, 0.98));
  border: 1px solid rgba(115, 219, 255, 0.18);
  box-shadow:
    0 36px 90px rgba(0,0,0,0.58),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

#shop-modal .shop-shell::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.05), transparent 20%),
    radial-gradient(circle at 15% 0%, rgba(73,168,255,0.10), transparent 30%);
  opacity: .9;
}

#shop-modal .shop-shell-header,
#shop-modal .shop-hero,
#shop-modal .shop-player-strip,
#shop-modal .shop-layout{
  position: relative;
  z-index: 1;
}

#shop-modal .shop-shell-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

#shop-modal .shop-shell-brand{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#shop-modal .shop-shell-kicker{
  color: rgba(174, 233, 255, 0.78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#shop-modal .shop-shell-brand > div:last-child{
  color: #f5fbff;
  font-size: clamp(24px, 2.4vw, 38px);
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 8px 22px rgba(0,0,0,0.34);
}

#shop-close{
  width: 46px;
  height: 46px;
  border-radius: 16px !important;
  flex: 0 0 auto;
  font-size: 28px;
  line-height: 1;
  font-weight: 1000;
  color: #fff !important;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.20), transparent 35%),
    linear-gradient(180deg, rgba(255, 104, 104, 0.98), rgba(160, 34, 34, 0.98)) !important;
  border: 1px solid rgba(255, 180, 180, 0.35) !important;
  box-shadow:
    0 14px 30px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

#shop-modal .shop-hero{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: stretch;
  padding: 18px 18px 16px;
  border-radius: 28px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background:
    radial-gradient(circle at 12% 0%, rgba(66, 198, 255, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(8, 24, 44, 0.88), rgba(5, 15, 29, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 12px 30px rgba(0,0,0,0.18);
}

#shop-modal .shop-hero-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#shop-modal .shop-hero-title-row{
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}

#shop-modal .shop-hero-kicker{
  color: rgba(177, 232, 255, 0.85);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#shop-modal .shop-hero-title{
  margin: 0;
  color: #f6fcff;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 1000;
  letter-spacing: 0.02em;
}

#shop-modal .shop-grid-count{
  color: rgba(214, 235, 250, 0.82);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(115, 219, 255, 0.16);
  background: rgba(6, 21, 40, 0.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

#shop-modal .shop-hero-subtitle{
  margin: 0;
  max-width: 70ch;
  color: rgba(214, 235, 250, 0.80);
  font-size: 13px;
  line-height: 1.45;
}

#shop-modal .shop-hero-stats{
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 10px;
  align-items: stretch;
}

#shop-modal .shop-stat{
  min-width: 92px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background:
    radial-gradient(circle at 30% 0%, rgba(73,168,255,0.12), transparent 30%),
    linear-gradient(180deg, rgba(11, 28, 50, 0.96), rgba(6, 18, 35, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#shop-modal .shop-stat-label{
  display: block;
  color: rgb(0 152 255) !important;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#shop-modal .shop-stat-value{
  display: block;
  margin-top: 5px;
  color: #f5fbff;
  font-size: 18px;
  font-weight: 1000;
}

#shop-modal .shop-player-strip{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 18px;
  padding: 12px 14px 12px 22px;
  border-radius: 22px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background:
    radial-gradient(circle at 14% 0%, rgba(73, 168, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(7, 21, 39, 0.92), rgba(5, 15, 29, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 24px rgba(0,0,0,0.18);
}

#shop-modal .shop-player-strip .shop-hero{
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
  padding: 14px 16px;
  border-radius: 20px;
  align-items: center;
}

#shop-modal .shop-player-strip .shop-hero-copy{
  gap: 6px;
}

#shop-modal .shop-player-strip .shop-hero-title{
  font-size: clamp(20px, 1.8vw, 28px);
}

#shop-modal .shop-player-strip .shop-hero-subtitle{
  max-width: 58ch;
  font-size: 12px;
}

#shop-modal .shop-player-strip .shop-hero-stats{
  grid-template-columns: repeat(3, minmax(84px, 1fr));
}

#shop-modal .shop-player-strip #shop-close{
  margin-left: auto;
}

#shop-modal .shop-player-avatar{
  width: 66px;
  height: 66px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background:
    radial-gradient(circle at 30% 0%, rgba(255,255,255,0.15), transparent 45%),
    linear-gradient(180deg, rgba(22, 58, 93, 0.92), rgba(9, 24, 41, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 0 0 1px rgba(166, 236, 255, 0.06),
    0 0 16px rgba(73, 168, 255, 0.16);
}

#shop-modal .shop-player-avatar-stage{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: visible;
  image-rendering: pixelated;
}

#shop-modal .shop-player-avatar-stage *{
  image-rendering: pixelated;
}

#shop-modal .shop-player-wallet{
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}

#shop-modal .shop-player-wallet-label{
  color: rgba(177, 232, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#shop-modal .shop-player-wallet-value{
  color: #f6fcff;
  font-size: 18px;
  font-weight: 1000;
}

#shop-modal .shop-layout{
  display: grid;
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

#shop-modal .shop-sidebar{
  min-width: 0;
  overflow: hidden;
}

#shop-modal .shop-sidebar-card{
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 26px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background:
    radial-gradient(circle at 20% 0%, rgba(73,168,255,0.10), transparent 30%),
    linear-gradient(180deg, rgba(9, 23, 42, 0.96), rgba(5, 14, 26, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 28px rgba(0,0,0,0.20);
}

#shop-modal .shop-sidebar-label{
  color: rgba(177, 232, 255, 0.78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#shop-tabs{
  display: flex !important;
  flex-direction: column;
  gap: 10px;
}

.shop-tab{
  width: 100%;
  border: 1px solid rgba(173, 237, 255, 0.18);
  border-radius: 18px !important;
  padding: 12px 14px;
  font-weight: 900;
  color: rgba(245, 251, 255, 0.94);
  text-align: left;
  background:
    linear-gradient(180deg, rgba(15, 33, 57, 0.98), rgba(9, 20, 37, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 16px rgba(0,0,0,0.20);
}

.shop-tab.active{
  border-color: rgba(166, 236, 255, 0.54);
  color: #f8ffff;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(180deg, rgba(34, 199, 255, 0.98), rgba(17, 110, 214, 0.98));
}

#shop-modal .shop-main{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

#shop-modal .shop-grid-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 20px 0 2px;
}

#shop-modal .shop-grid-kicker{
  color: rgba(177, 232, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#shop-modal .shop-grid-title{
  margin-top: 4px;
  color: #f6fcff;
  font-size: 22px;
  font-weight: 1000;
}

#shop-modal .shop-grid-count{
  color: rgba(214, 235, 250, 0.78);
  font-size: 12px;
  font-weight: 800;
  margin-right: 18px;
  transform: translateX(-12px);
  white-space: nowrap;
}

#shop-grid{
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  grid-auto-rows: 300px !important;
  gap: 20px !important;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  min-height: 0;
  box-sizing: border-box;
  padding: 20px 20px 24px 20px;
  padding-inline-end: 20px;
  scrollbar-gutter: stable both-edges;
  scroll-padding-bottom: 24px;
  scroll-padding-inline-end: 20px;
  scrollbar-width: thin;
}

#shop-modal.bm-full #shop-grid{
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  grid-auto-rows: auto !important;
  grid-auto-flow: initial !important;
  min-height: 0;
  padding: 18px 18px 20px 18px;
}

#shop-modal.bm-full #shop-grid > .bm-wrap{
  flex: 1 1 auto;
  min-height: calc(100% - 4px);
}

#shop-grid .shop-item{
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  overflow: hidden !important;
  position: relative !important;
  border-radius: 26px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.14), transparent 28%),
    linear-gradient(180deg, rgba(12, 22, 40, 0.94), rgba(5, 12, 24, 0.98)) !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  box-shadow:
    0 18px 36px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
  isolation: isolate !important;
}

#shop-grid .shop-item:last-child{
  margin-bottom: 2px !important;
}

#shop-grid .shop-item::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 30%),
    radial-gradient(circle at 50% 0%, rgba(73,168,255,0.14), transparent 45%);
  z-index: 1;
}

#shop-grid .shop-card-top{
  position: relative !important;
  z-index: 3 !important;
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: auto !important;
  align-items: flex-start !important;
}

#shop-grid .shop-card-badge{
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 251, 255, 0.94);
  background: rgba(10, 24, 42, 0.76);
  border: 1px solid rgba(115, 219, 255, 0.16);
  backdrop-filter: blur(8px);
}

#shop-grid .shop-card-badge-price{
  color: #d9fbff;
  background: rgba(18, 46, 77, 0.82);
}

#shop-grid .veil{
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0) 34%),
    radial-gradient(circle at 50% 0%, rgba(73,168,255,0.12), transparent 42%);
  z-index: 1 !important;
}

#shop-grid .thumb{
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  pointer-events: none !important;
  opacity: 0.94 !important;
  filter: saturate(1.08) contrast(1.04) !important;
}

#shop-grid .name{
  position: relative !important;
  z-index: 2 !important;
  margin-top: 10px !important;
  font-weight: 1000 !important;
  font-size: 17px !important;
  color: #f7fdff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.68) !important;
}

#shop-grid .shop-card-subtitle{
  position: relative !important;
  z-index: 2 !important;
  margin-top: 4px !important;
  color: rgba(214, 235, 250, 0.78) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

#shop-grid .price{
  position: relative !important;
  z-index: 2 !important;
  margin-top: 10px !important;
  margin-bottom: 0 !important;
  font-weight: 900 !important;
  color: #f4fbff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.55) !important;
}

#shop-grid .shop-price-value{
  font-size: 18px;
  font-weight: 1000;
}

#shop-grid .shop-card-footer{
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-top: 12px !important;
}

#shop-grid .shop-card-hint{
  color: rgba(177, 232, 255, 0.76);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#shop-grid .shop-buy{
  border-radius: 14px !important;
  position: relative !important;
  z-index: 4 !important;
  min-width: 104px !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 14px !important;
  font-weight: 1000 !important;
  color: #fff !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  pointer-events: auto !important;
  background: linear-gradient(180deg, rgba(34, 199, 255, 0.98), rgba(17, 110, 214, 0.98)) !important;
  border: 1px solid rgba(115, 219, 255, 0.34) !important;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.14) !important;
}

#shop-grid .shop-buy:hover{
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.06) saturate(1.04);
}

#shop-grid .shop-buy:active{
  transform: translateY(0) scale(0.99);
}

#shop-grid .shop-item .price .coin-inline{
  width: 14px !important;
  height: 14px !important;
  object-fit: contain !important;
}

#shop-modal #shop-grid,
#shop-modal #bm-list{
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 219, 255, 0.92) rgba(4, 16, 31, 0.78);
}

#shop-modal #shop-grid::-webkit-scrollbar,
#shop-modal #bm-list::-webkit-scrollbar{
  width: 14px;
  height: 14px;
}

#shop-modal #shop-grid::-webkit-scrollbar-track,
#shop-modal #bm-list::-webkit-scrollbar-track{
  background:
    linear-gradient(180deg, rgba(4, 16, 31, 0.98), rgba(8, 28, 54, 0.96));
  border-radius: 999px;
  border: 1px solid rgba(115, 219, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.38);
}

#shop-modal #shop-grid::-webkit-scrollbar-thumb,
#shop-modal #bm-list::-webkit-scrollbar-thumb{
  border-radius: 999px;
  border: 3px solid rgba(4, 16, 31, 0.98);
  background:
    linear-gradient(180deg, rgba(166, 236, 255, 0.98), rgba(58, 162, 255, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    0 0 0 1px rgba(115, 219, 255, 0.12);
}

#shop-modal #shop-grid::-webkit-scrollbar-thumb:hover,
#shop-modal #bm-list::-webkit-scrollbar-thumb:hover{
  background:
    linear-gradient(180deg, rgba(200, 246, 255, 0.98), rgba(81, 179, 255, 0.98));
}

#shop-modal #shop-grid::-webkit-scrollbar-thumb:active,
#shop-modal #bm-list::-webkit-scrollbar-thumb:active{
  background:
    linear-gradient(180deg, rgba(115, 219, 255, 0.98), rgba(28, 131, 235, 0.98));
}

#shop-modal #shop-grid::-webkit-scrollbar-corner,
#shop-modal #bm-list::-webkit-scrollbar-corner{
  background: transparent;
}

#shop-modal .bm-wrap{
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
  padding: 4px 4px 2px;
}

#shop-modal .bm-side{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background:
    radial-gradient(circle at 20% 0%, rgba(73,168,255,0.10), transparent 30%),
    linear-gradient(180deg, rgba(9, 23, 42, 0.96), rgba(5, 14, 26, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 28px rgba(0,0,0,0.20);
}

#shop-modal .bm-content{
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 10px 0;
}

#shop-modal .bm-preview{
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 22px;
  border: 1px solid rgba(115, 219, 255, 0.14);
  background:
    radial-gradient(circle at 15% 0%, rgba(73,168,255,0.12), transparent 30%),
    linear-gradient(180deg, rgba(9, 23, 42, 0.96), rgba(5, 14, 26, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 26px rgba(0,0,0,0.20);
}

#shop-modal .bm-preview-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#shop-modal .bm-preview-kicker{
  color: rgba(177, 232, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#shop-modal .bm-preview-title{
  color: #f6fcff;
  font-size: 18px;
  font-weight: 1000;
  line-height: 1.05;
}

#shop-modal .bm-preview-sub{
  color: rgba(214, 235, 250, 0.78);
  font-size: 12px;
  line-height: 1.35;
}

#shop-modal .bm-avatar-shell{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 172px;
  height: 172px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 0%, rgba(255,255,255,0.12), transparent 42%),
    linear-gradient(180deg, rgba(14, 32, 56, 0.94), rgba(6, 18, 34, 0.98));
  border: 1px solid rgba(115, 219, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 22px rgba(0,0,0,0.24);
}

#shop-modal .bm-avatar-stage{
  position: relative;
  width: 154px;
  height: 154px;
  overflow: hidden;
  image-rendering: pixelated;
  transform: translateZ(0);
}

#shop-modal .bm-tab{
  width: 100%;
  border: 1px solid rgba(173, 237, 255, 0.18);
  border-radius: 18px;
  padding: 12px 14px;
  text-align: left;
  font-weight: 900;
  color: rgba(245, 251, 255, 0.94);
  background:
    linear-gradient(180deg, rgba(15, 33, 57, 0.98), rgba(9, 20, 37, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 16px rgba(0,0,0,0.20);
}

#shop-modal .bm-tab.bm-tab-active{
  border-color: rgba(166, 236, 255, 0.54);
  color: #f8ffff;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(180deg, rgba(34, 199, 255, 0.98), rgba(17, 110, 214, 0.98));
}

#shop-modal #bm-econ{
  border-radius: 18px !important;
  padding: 12px 14px !important;
  margin-bottom: 0 !important;
  border: 1px solid rgba(115, 219, 255, 0.16) !important;
  background:
    radial-gradient(circle at 15% 0%, rgba(73,168,255,0.14), transparent 30%),
    linear-gradient(180deg, rgba(11, 28, 50, 0.98), rgba(6, 18, 35, 0.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 24px rgba(0,0,0,0.18) !important;
}

#shop-modal #bm-econ > div{
  font-size: 12px;
  line-height: 1.35;
}

#shop-modal #bm-search-bar{
  padding: 14px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  background:
    radial-gradient(circle at 15% 0%, rgba(73,168,255,0.10), transparent 30%),
    linear-gradient(180deg, rgba(9, 23, 42, 0.96), rgba(5, 14, 26, 0.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 28px rgba(0,0,0,0.20) !important;
}

#shop-modal #bm-search-input{
  border-radius: 12px !important;
  border: 1px solid rgba(115, 219, 255, 0.22) !important;
  background: linear-gradient(180deg, rgba(15, 33, 57, 0.98), rgba(9, 20, 37, 0.98)) !important;
  color: #f6fcff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

#shop-modal #bm-search-btn,
#shop-modal .bm-buy{
  border-radius: 14px !important;
  border: 1px solid rgba(115, 219, 255, 0.28) !important;
  background: linear-gradient(180deg, rgba(34, 199, 255, 0.98), rgba(17, 110, 214, 0.98)) !important;
  color: #fff !important;
  font-weight: 1000 !important;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.26),
    inset 0 1px 0 rgba(255,255,255,0.14) !important;
}

#shop-modal .bm-filter-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#shop-modal .bm-filter-btn{
  border-radius: 999px !important;
  border: 1px solid rgba(115, 219, 255, 0.18) !important;
  background: linear-gradient(180deg, rgba(15, 33, 57, 0.98), rgba(9, 20, 37, 0.98)) !important;
  color: rgba(245, 251, 255, 0.92) !important;
  font-weight: 900 !important;
}

#shop-modal .bm-filter-btn.bm-filter-active{
  border-color: rgba(166, 236, 255, 0.54) !important;
  color: #f8ffff !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(180deg, rgba(34, 199, 255, 0.98), rgba(17, 110, 214, 0.98)) !important;
}

#shop-modal #bm-list{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 20px 20px 20px;
  box-sizing: border-box;
  scrollbar-gutter: stable both-edges;
  scroll-padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#shop-modal .bm-card{
  width: 100%;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  overflow: hidden;
  padding: 14px 16px;
  min-height: 92px;
  border-radius: 20px;
  border: 1px solid var(--bm-rarity-color, rgba(115, 219, 255, 0.14));
  background:
    radial-gradient(circle at 18% 0%, rgba(73,168,255,0.10), transparent 28%),
    linear-gradient(180deg, rgba(10, 24, 42, 0.94), rgba(5, 14, 26, 0.98));
  box-shadow:
    0 12px 26px rgba(0,0,0,0.22),
    0 0 0 1px color-mix(in srgb, var(--bm-rarity-color, rgba(115, 219, 255, 0.14)) 42%, transparent),
    0 0 20px var(--bm-rarity-glow, rgba(73,168,255,0.12)),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

#shop-modal .bm-card.bm-search-focus{
  border-color: var(--bm-rarity-color, rgba(166, 236, 255, 0.38));
  box-shadow:
    0 16px 32px rgba(0,0,0,0.28),
    0 0 0 1px var(--bm-rarity-color, rgba(115, 219, 255, 0.10)) inset,
    0 0 28px var(--bm-rarity-glow, rgba(73,168,255,0.16)),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

#shop-modal .bm-card::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 28%),
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--bm-rarity-color, rgba(73,168,255,0.12)) 28%, transparent), transparent 38%);
  opacity: 0.9;
}

#shop-modal .bm-card[data-rarity="common"]{
  --bm-rarity-color: #8a8f98;
  --bm-rarity-glow: rgba(138, 143, 152, 0.22);
}

#shop-modal .bm-card[data-rarity="uncommon"]{
  --bm-rarity-color: #2ecc71;
  --bm-rarity-glow: rgba(46, 204, 113, 0.24);
}

#shop-modal .bm-card[data-rarity="rare"]{
  --bm-rarity-color: #3498ff;
  --bm-rarity-glow: rgba(52, 152, 255, 0.24);
}

#shop-modal .bm-card[data-rarity="epic"]{
  --bm-rarity-color: #b04dff;
  --bm-rarity-glow: rgba(176, 77, 255, 0.26);
}

#shop-modal .bm-card[data-rarity="legendary"]{
  --bm-rarity-color: #ffb000;
  --bm-rarity-glow: rgba(255, 176, 0, 0.26);
}

#shop-modal .bm-card[data-rarity="mythic"],
#shop-modal .bm-card[data-rarity="unique"],
#shop-modal .bm-card[data-rarity="uniqe"]{
  --bm-rarity-color: #ff3030;
  --bm-rarity-glow: rgba(255, 48, 48, 0.30);
}

#shop-modal .bm-left,
#shop-modal .bm-right{
  min-width: 0;
}

#shop-modal .bm-left{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

#shop-modal .bm-right{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 132px;
  padding-left: 10px;
  margin-left: auto;
  border-left: 1px solid rgba(115, 219, 255, 0.10);
}

#shop-modal .bm-info{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#shop-modal .bm-name{
  color: #f6fcff;
  font-weight: 1000;
  line-height: 1.1;
}

#shop-modal .bm-seller{
  color: rgba(214, 235, 250, 0.76);
  line-height: 1.15;
}

#shop-modal .bm-price{
  color: #f4fbff;
  font-weight: 1000;
  align-self: flex-end;
  text-align: right;
}

#shop-modal .bm-icon-holder{
  flex: 0 0 auto;
  width: 52px !important;
  height: 52px !important;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 0%, rgba(255,255,255,0.12), transparent 45%),
    linear-gradient(180deg, rgba(14, 32, 56, 0.94), rgba(6, 18, 34, 0.98));
  border: 1px solid rgba(115, 219, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#shop-modal .bm-card .bm-input{
  width: 88px;
  min-width: 88px;
}

#shop-modal .bm-card .bm-buy,
#shop-modal .bm-card .bm-sell,
#shop-modal .bm-card .bm-wear{
  min-width: 92px;
}

#shop-modal .bm-list{
  scrollbar-gutter: stable both-edges;
}

#shop-button{
  display: none !important;
}

@media (max-width: 1100px){
  #shop-modal .shop-layout{
    grid-template-columns: 1fr;
  }

  #shop-modal .shop-sidebar-card{
    padding-bottom: 12px;
  }

  #shop-tabs{
    flex-direction: row;
    flex-wrap: wrap;
  }

  .shop-tab{
    width: auto;
    flex: 1 1 170px;
  }

  #shop-modal .bm-wrap{
    grid-template-columns: 1fr;
  }

  #shop-modal .bm-preview{
    grid-template-columns: 156px minmax(0, 1fr);
  }

  #shop-modal .bm-side{
    flex-direction: row;
    flex-wrap: wrap;
  }

  #shop-modal .bm-tab{
    width: auto;
    flex: 1 1 140px;
    text-align: center;
  }
}

@media (max-width: 760px){
  #shop-modal{
    padding: 10px;
  }

  #shop-modal .shop-shell{
    max-height: calc(100vh - 20px);
    padding: 12px;
    border-radius: 24px;
  }

  #shop-modal .shop-shell-header,
  #shop-modal .shop-hero,
  #shop-modal .shop-player-strip,
  #shop-modal .shop-grid-head{
    gap: 10px;
  }

  #shop-modal .shop-hero{
    grid-template-columns: 1fr;
  }

  #shop-modal .shop-player-strip .shop-hero{
    width: 100%;
    margin-left: 0;
  }

  #shop-modal .shop-hero-stats{
    grid-template-columns: 1fr 1fr 1fr;
  }

  #shop-grid{
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    grid-auto-rows: 280px !important;
  }

  #shop-modal #bm-search-bar{
    padding: 12px !important;
  }

  #shop-modal #bm-search-bar > div:first-child{
    flex-direction: column;
    align-items: stretch;
  }

  #shop-modal #bm-search-input,
  #shop-modal #bm-search-btn{
    width: 100%;
  }

  #shop-modal .bm-preview{
    grid-template-columns: 1fr;
  }

  #shop-modal .bm-avatar-shell{
    width: 100%;
    height: 180px;
  }

  #shop-modal .bm-avatar-stage{
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 520px){
  #shop-modal .shop-shell-brand > div:last-child{
    font-size: 22px;
  }

  #shop-modal .shop-hero-stats{
    grid-template-columns: 1fr;
  }

  #shop-modal .shop-player-strip{
    align-items: flex-start;
    flex-direction: column;
  }

  #shop-grid{
    grid-template-columns: 1fr !important;
    grid-auto-rows: 272px !important;
  }

  #shop-grid .shop-card-footer{
    flex-direction: column;
    align-items: stretch;
  }

  #shop-grid .shop-buy{
    width: 100% !important;
  }
}

#shop-purchase-confirm,
#shop-notice-modal{
  position: fixed !important;
  inset: 0 !important;
  z-index: 13060 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  background: rgba(1, 8, 18, 0.72) !important;
  backdrop-filter: blur(8px) saturate(1.06) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.06) !important;
  pointer-events: auto !important;
}

#shop-purchase-confirm.active,
#shop-notice-modal.active{
  display: flex !important;
}

#shop-purchase-confirm .shop-purchase-card,
#shop-notice-modal .shop-notice-card{
  position: relative;
  width: min(92vw, 540px);
  border-radius: 28px;
  border: 1px solid rgba(115, 219, 255, 0.24);
  background:
    radial-gradient(circle at 20% 0%, rgba(73, 168, 255, 0.18), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(255, 193, 7, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(8, 23, 43, 0.98), rgba(4, 14, 28, 0.98));
  box-shadow:
    0 26px 64px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.08);
  color: #f4fbff;
  padding: 20px;
  overflow: hidden;
}

#shop-purchase-confirm .shop-purchase-card::before,
#shop-notice-modal .shop-notice-card::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 0%, rgba(34,199,255,0.12), transparent 22%),
    linear-gradient(135deg, rgba(255,255,255,0.05), transparent 18%);
}

#shop-purchase-confirm .shop-purchase-head,
#shop-notice-modal .shop-notice-title{
  position: relative;
  z-index: 1;
}

#shop-notice-modal .shop-notice-head{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

#shop-notice-modal .shop-notice-head-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#shop-purchase-confirm .shop-purchase-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#shop-purchase-confirm .shop-purchase-title,
#shop-notice-modal .shop-notice-title{
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#shop-purchase-confirm .shop-purchase-close{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(115, 219, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 91, 91, 0.98), rgba(173, 33, 33, 0.98));
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

#shop-purchase-confirm .shop-purchase-subtitle,
#shop-notice-modal .shop-notice-message{
  position: relative;
  z-index: 1;
  color: rgba(214, 235, 250, 0.82);
  font-size: 13px;
  line-height: 1.45;
}

#shop-purchase-confirm .shop-purchase-item-row,
#shop-notice-modal .shop-notice-item-row{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 14px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(9, 28, 49, 0.78), rgba(4, 15, 28, 0.72)),
    rgba(3, 15, 28, 0.36);
  border: 1px solid rgba(115, 219, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#shop-purchase-confirm .shop-purchase-item-row img,
#shop-notice-modal .shop-notice-item-row img,
#shop-notice-modal .shop-notice-reward-icon-wrap img{
  width: 54px !important;
  height: 54px !important;
  object-fit: contain !important;
  image-rendering: pixelated !important;
}

#shop-notice-modal .shop-notice-item-icon-wrap{
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(34, 199, 255, 0.14), rgba(73, 168, 255, 0.08));
  border: 1px solid rgba(115, 219, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
}

#shop-notice-modal .shop-notice-item-icon-wrap > *{
  width: 100% !important;
  height: 100% !important;
}

#shop-notice-modal .shop-notice-item-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#shop-notice-modal .shop-notice-item-kicker{
  color: rgba(177, 232, 255, 0.84);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#shop-purchase-confirm .shop-purchase-item-name,
#shop-notice-modal .shop-notice-item-name{
  font-size: 16px;
  font-weight: 1000;
  color: #f5fbff;
  line-height: 1.15;
}

#shop-purchase-confirm .shop-purchase-item-price{
  margin-top: 4px;
  color: rgba(177, 232, 255, 0.95);
  font-weight: 900;
}

#shop-purchase-confirm .shop-purchase-actions,
#shop-notice-modal .shop-notice-actions{
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

#shop-purchase-confirm .shop-purchase-btn,
#shop-notice-modal .shop-notice-btn{
  flex: 1 1 0;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(115, 219, 255, 0.22);
  font-weight: 900;
  color: #fff;
  cursor: pointer;
}

#shop-purchase-confirm .shop-purchase-btn-back,
#shop-notice-modal .shop-notice-btn-secondary{
  background: linear-gradient(180deg, rgba(42, 60, 89, 0.98), rgba(18, 33, 54, 0.98));
}

#shop-purchase-confirm .shop-purchase-btn-main,
#shop-notice-modal .shop-notice-btn-primary{
  background: linear-gradient(180deg, rgba(34, 199, 255, 0.98), rgba(14, 120, 214, 0.98));
}

#shop-notice-modal .shop-notice-rewards-shell{
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(3, 15, 28, 0.28);
  border: 1px solid rgba(115, 219, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#shop-notice-modal .shop-notice-rewards-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

#shop-notice-modal .shop-notice-rewards-label{
  color: #eaf7ff;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#shop-notice-modal .shop-notice-rewards-count{
  color: rgba(177, 232, 255, 0.92);
  font-size: 12px;
  font-weight: 900;
}

#shop-notice-modal .shop-notice-rewards{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
}

#shop-notice-modal .shop-notice-rewards-empty{
  color: rgba(214, 235, 250, 0.72);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

#shop-notice-modal .shop-notice-reward-item{
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas:
    "icon name"
    "icon qty";
  gap: 2px 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(34,199,255,0.10), transparent 30%),
    linear-gradient(180deg, rgba(8, 24, 42, 0.92), rgba(5, 16, 30, 0.92));
  border: 1px solid rgba(115, 219, 255, 0.14);
  box-shadow:
    0 8px 18px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

#shop-notice-modal .shop-notice-reward-icon-wrap{
  grid-area: icon;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(73, 168, 255, 0.15), rgba(8, 23, 43, 0.65));
  border: 1px solid rgba(115, 219, 255, 0.12);
}

#shop-notice-modal .shop-notice-reward-icon-wrap > *{
  width: 100% !important;
  height: 100% !important;
}

#shop-notice-modal .shop-notice-reward-name{
  grid-area: name;
  min-width: 0;
  color: #f5fbff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

#shop-notice-modal .shop-notice-reward-qty{
  grid-area: qty;
  color: rgba(177, 232, 255, 0.92);
  font-size: 12px;
  font-weight: 900;
}

#shop-notice-modal .shop-notice-icon{
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255, 193, 7, 0.98), rgba(220, 138, 6, 0.98));
  color: #fff;
  font-size: 24px;
  font-weight: 1000;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}

#menu-overlay{
  position: fixed !important;
  inset: 0 !important;
  display: none;
  z-index: 3302 !important;
  background: rgba(0, 0, 0, 0.64);
  pointer-events: auto !important;
}

#exit-menu{
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 3303 !important;
  pointer-events: auto !important;
  width: min(92vw, 420px) !important;
  max-width: 420px !important;
  padding: 18px !important;
  border-radius: 28px !important;
  border: 1px solid rgba(115, 219, 255, 0.22) !important;
  background:
radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.54),
    inset 0 1px 0 rgba(255,255,255,0.07) !important;
  overflow: hidden !important;
  color: #eaf7ff !important;
}

#exit-menu::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
  linear-gradient(180deg, rgb(35 0 0 / 12%), rgb(7 2 26) 24%), radial-gradient(circle at 50% 0%, rgb(8 21 51), transparent 42%) !important;
  pointer-events: none;
}

#exit-menu > *{
  position: relative;
  z-index: 1;
}

#exit-menu .exit-menu-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}


#exit-menu .exit-menu-world{
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(115, 219, 255, 0.16);
  background: rgba(8, 23, 43, 0.92);
  color: #d8f0ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

#exit-menu .pi-quick-actions{
  margin-top: 0 !important;
}

#exit-menu .mmo-btn,
#exit-menu .exit-btn-ghost{
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 72px !important;
  border-radius: 14px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  padding: 10px 10px 9px !important;
  color: #f6fcff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.65) !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.10) !important;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease, border-color 140ms ease !important;
}

#exit-menu .mmo-btn::before,
#exit-menu .exit-btn-ghost::before{
  content: "";
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(120deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 35%, rgba(255,255,255,0.08) 52%, rgba(255,255,255,0) 70%) !important;
  transform: translateX(-120%) !important;
  transition: transform 280ms ease !important;
  pointer-events: none !important;
}

#exit-menu .mmo-btn:hover::before,
#exit-menu .exit-btn-ghost:hover::before{
  transform: translateX(120%) !important;
}

#exit-menu .mmo-btn:hover,
#exit-menu .exit-btn-ghost:hover{
  transform: translateY(-1px) !important;
  box-shadow:
    0 14px 26px rgba(0,0,0,0.26),
    0 0 18px rgba(61, 198, 255, 0.14),
    inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

#exit-menu .mmo-btn:active,
#exit-menu .exit-btn-ghost:active{
  transform: translateY(1px) scale(0.99) !important;
}

#exit-menu .pi-menu-btn-icon{
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  font-size: 0 !important;
  line-height: 1 !important;
  flex: 0 0 auto !important;
}

#exit-menu .pi-menu-btn-exit .pi-menu-btn-icon,
#exit-menu .pi-menu-btn-respawn .pi-menu-btn-icon,
#exit-menu .pi-menu-btn-store .pi-menu-btn-icon,
#exit-menu .pi-menu-btn-settings .pi-menu-btn-icon{
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 264px 192px !important;
  image-rendering: pixelated !important;
}

#exit-menu .pi-menu-btn-exit .pi-menu-btn-icon{
  background-position: -216px -24px !important;
}

#exit-menu .pi-menu-btn-respawn .pi-menu-btn-icon{
  background-position: -192px -24px !important;
}

#exit-menu .pi-menu-btn-store .pi-menu-btn-icon{
  background-position: -168px -24px !important;
}

#exit-menu .pi-menu-btn-settings .pi-menu-btn-icon{
  background-position: -144px -24px !important;
}

#exit-menu .pi-menu-btn-label{
  position: relative !important;
  z-index: 1 !important;
  line-height: 1.05 !important;
  text-align: center !important;
}

#exit-menu .pi-menu-btn-exit{
  background: linear-gradient(180deg, rgba(82, 183, 255, 0.98), rgba(28, 112, 221, 0.98)) !important;
  border-color: rgba(147, 221, 255, 0.34) !important;
}

#exit-menu .pi-menu-btn-respawn{
  background: linear-gradient(180deg, rgba(82, 183, 255, 0.98), rgba(28, 112, 221, 0.98)) !important;
  border-color: rgba(147, 221, 255, 0.34) !important;
}

#exit-menu .pi-menu-btn-store{
  background: linear-gradient(180deg, rgba(82, 183, 255, 0.98), rgba(28, 112, 221, 0.98)) !important;
  border-color: rgba(147, 221, 255, 0.34) !important;
}

#exit-menu .pi-menu-btn-settings{
  background: linear-gradient(180deg, rgba(82, 183, 255, 0.98), rgba(28, 112, 221, 0.98)) !important;
  border-color: rgba(147, 221, 255, 0.34) !important;
}

#exit-menu .pi-menu-btn-cancel{
  grid-column: 1 / -1;
  background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
  border-color: rgba(115, 219, 255, 0.12) !important;
}

#exit-menu .exit-btn-ghost{
  min-height: 52px !important;
  font-size: 13px !important;
}

@media (max-width: 720px){
  #exit-menu{
    width: calc(100vw - 16px) !important;
    padding: 14px !important;
  }
  #exit-menu .exit-menu-actions{
    grid-template-columns: 1fr;
  }
  #exit-menu .exit-btn-ghost{
    grid-column: auto;
  }
}

#mobile-controls{
  position: fixed !important;
  inset: 0 !important;
  z-index: 3300 !important;
  pointer-events: none !important;
}

#touch-left,
#touch-right,
#touch-zoom{
  position: fixed !important;
  display: flex !important;
  gap: 12px !important;
  pointer-events: auto !important;
}

#touch-left{
  left: max(12px, env(safe-area-inset-left)) !important;
  bottom: calc(max(1px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 1px) !important;
}

#touch-right{
  right: max(12px, env(safe-area-inset-right)) !important;
  bottom: calc(max(1px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 1px) !important;
}

#touch-zoom{
  right: max(12px, env(safe-area-inset-right)) !important;
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 108px) !important;
}

#touch-left button,
#touch-right button,
#touch-zoom button{
  border-radius: 999px !important;
  width: var(--game-btn-size, 84px) !important;
  height: var(--game-btn-size, 84px) !important;
  border: 1px solid rgba(115, 219, 255, 0.62) !important;
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,0.22), rgba(255,255,255,0) 30%),
    rgba(10, 34, 62, 0.34) !important;
  box-shadow:
    0 0 0 1px rgba(34, 199, 255, 0.16) inset,
    0 0 24px rgba(34, 199, 255, 0.22),
    0 14px 26px rgba(0,0,0,0.34) !important;
}

#touch-left{
  align-items: center !important;
}

#touch-left button,
#touch-right button{
  width: calc(var(--game-btn-size, 84px) * 1.64) !important;
  height: calc(var(--game-btn-size, 84px) * 1.64) !important;
}

#touch-right button{
  width: calc(var(--game-btn-size, 84px) * 1.64) !important;
  height: calc(var(--game-btn-size, 84px) * 1.64) !important;
}

@media (max-width: 900px){
  #chat-container{
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 210px) !important;
    width: auto !important;
    max-width: none !important;
    min-height: 220px !important;
    max-height: 300px !important;
  }

  #hud-actions{
    right: calc(max(10px, env(safe-area-inset-right)) + 52px + 10px) !important;
  }

  #mini-map-panel{
    width: 100% !important;
  }

  #inventory-grid{
    grid-template-columns: repeat(auto-fill, minmax(78px, 78px)) !important;
  }

  #inventory-grid .inventory-item{
    width: 78px !important;
    height: 78px !important;
  }

  #inventory-toolbar{
    left: 10px !important;
    right: 10px !important;
    padding: 10px !important;
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 10px) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    max-height: min(28vh, 240px) !important;
  }

  .inv-actions{
    max-width: none !important;
  }

  .gameplay-recent-list{
    min-height: 48px !important;
  }

  #touch-left{
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 10px) !important;
  }

  #touch-right{
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + var(--mobile-inventory-offset, 0px) + 10px) !important;
  }

  #touch-left button{
    width: calc(var(--game-btn-size, 84px) * 1.04) !important;
    height: calc(var(--game-btn-size, 84px) * 1.04) !important;
  }

  #touch-right button{
    width: calc(var(--game-btn-size, 84px) * 1.04) !important;
    height: calc(var(--game-btn-size, 84px) * 1.04) !important;
  }

  #mini-profile-stack .mini-profile-bottom-row{
    flex-direction: column !important;
  }

  #mini-profile-stack .mini-profile-actions{
    gap: 7px !important;
  }

  #mini-profile-stack .mini-profile-action{
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    min-height: 70px !important;
    padding: 7px 7px 8px !important;
  }

  #mini-profile-stack .mini-profile-action-icon{
    width: 40px !important;
    height: 40px !important;
  }

  #mini-profile-stack .monster-profile-card{
    width: min(100%, 308px) !important;
    min-width: 0 !important;
  }

}

@media (max-width: 900px){
  #hud-actions{
    top: auto !important;
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 10px) !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    min-width: 0 !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  #hud-actions .hud-actions-group{
    gap: 7px !important;
  }

  #hud-actions .hud-actions-group-main > *,
  #hud-actions .hud-actions-group-wallet > *{
    height: 54px !important;
    min-height: 54px !important;
  }

  #hud-actions .hud-actions-group-main > *{
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
  }

  #coin-display{
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 54px !important;
    min-height: 54px !important;
  }

  #quests-button-hud,
  #friends-button,
  #inventory-button-hud,
  #shop-button-hud{
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    height: 60px !important;
  }

  #mini-map-panel{
    width: 100% !important;
  }

  #mini-profile-stack{
    left: 10px !important;
    top: calc(max(10px, env(safe-area-inset-top)) + 10px) !important;
    max-width: min(48vw, 320px) !important;
  }

  #chat-container{
    left: 10px !important;
    right: 10px !important;
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 160px) !important;
    max-height: 28vh !important;
  }

  #touch-left button,
  #touch-right button{
    width: 108px !important;
    height: 108px !important;
  }

  #touch-zoom button{
    width: 76px !important;
    height: 76px !important;
  }

  #gameplay-quick-panel{
    width: min(90vw, 620px) !important;
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 148px) !important;
  }
}

@media (orientation: portrait) and (max-width: 900px){
  #game-container{
    touch-action: none !important;
  }

  #inventory-toolbar{
    left: 8px !important;
    right: 8px !important;
  }

  #touch-left{
    left: 8px !important;
  }

  #touch-right,
  #touch-zoom{
    right: 8px !important;
  }
}

/* Auth screen */
#auth{
  width: 100%;
  height: 100dvh;
  box-sizing: border-box;
  position: fixed !important;
  inset: 0 !important;
  z-index: 5200 !important;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 42px);
  overflow: hidden !important;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(900px 600px at 18% 12%, rgba(73, 168, 255, 0.42), rgba(73, 168, 255, 0) 60%),
    radial-gradient(700px 500px at 82% 20%, rgba(34, 199, 255, 0.26), rgba(34, 199, 255, 0) 65%),
    linear-gradient(160deg, #04111f 0%, #08233c 45%, #04111f 100%) !important;
}

#auth::before,
#auth::after{
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.6;
}

#auth::before{
  width: 320px;
  height: 320px;
  background: rgba(73, 168, 255, 0.12);
  top: 12%;
  left: 8%;
}

#auth::after{
  width: 360px;
  height: 360px;
  background: rgba(24, 224, 111, 0.06);
  bottom: 4%;
  right: 6%;
}

.auth-scene{
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  filter: saturate(0.92) brightness(0.82);
}

.auth-scene-sky{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 12, 22, 0.78) 0%, rgba(4, 12, 22, 0.52) 24%, rgba(4, 12, 22, 0.24) 58%, rgba(4, 12, 22, 0.64) 100%),
    url("/photos/bg_snow.png");
  background-size: cover, cover;
  background-position: center center, center center;
  background-repeat: no-repeat, no-repeat;
  filter: brightness(0.62) saturate(1.04) contrast(0.95);
  transform: scale(1.03);
  animation: authSkyDrift 26s ease-in-out infinite alternate;
}

.auth-scene-sky::after{
  content: "";
  position: absolute;
  inset: -4% -8%;
  background: url("/photos/bgclouds.png") center center / cover no-repeat;
  opacity: 0.16;
  filter: saturate(0.96) brightness(0.98);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: authBgCloudsDrift 74s ease-in-out infinite alternate;
}

.auth-scene-cloud{
  position: absolute;
  width: 170%;
  height: 28%;
  left: -35%;
  border-radius: 999px;
  opacity: 0.22;
  filter: blur(18px);
  background:
    radial-gradient(circle at 14% 50%, rgba(255,255,255,0.32) 0 12%, rgba(255,255,255,0) 40%),
    radial-gradient(circle at 28% 48%, rgba(255,255,255,0.20) 0 10%, rgba(255,255,255,0) 38%),
    radial-gradient(circle at 48% 52%, rgba(255,255,255,0.26) 0 15%, rgba(255,255,255,0) 42%),
    radial-gradient(circle at 68% 46%, rgba(255,255,255,0.20) 0 11%, rgba(255,255,255,0) 38%),
    radial-gradient(circle at 84% 52%, rgba(255,255,255,0.28) 0 13%, rgba(255,255,255,0) 40%);
  mix-blend-mode: screen;
}

.auth-scene-cloud-a{
  top: 12%;
  animation: authCloudDriftA 82s linear infinite;
}

.auth-scene-cloud-b{
  top: 28%;
  opacity: 0.18;
  transform: scale(0.82);
  animation: authCloudDriftB 108s linear infinite;
}

.auth-scene-tree,
.auth-scene-near{
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  image-rendering: auto;
}

.auth-scene-tree{
  pointer-events: none;
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.34));
}

.auth-scene-tree-far{
  inset: 0;
  background-image: url("/photos/treebg1.png");
  opacity: 0.78;
  transform: scale(1.04) translate3d(0, 1.5%, 0);
  background-size: cover;
  animation: authTreeDriftA 70s linear infinite alternate;
}

.auth-scene-tree-near{
  inset: 0;
  background-image: url("/photos/treebg.png");
  opacity: 0.96;
  transform: scale(1.02) translate3d(0, 0.5%, 0);
  background-size: cover;
  animation: authTreeDriftB 58s linear infinite alternate;
}

.auth-scene-near{
  inset: auto 0 0 0;
  height: 26%;
  background:
    linear-gradient(180deg, rgba(3, 10, 18, 0) 0%, rgba(3, 10, 18, 0.20) 20%, rgba(3, 10, 18, 0.62) 100%);
  opacity: 1;
  filter: blur(4px);
  animation: authMistDriftC 38s linear infinite alternate;
}

.auth-scene-ground{
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 18%;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 16, 29, 0) 0%, rgba(4, 16, 29, 0.5) 35%, rgba(3, 11, 19, 0.95) 100%),
    linear-gradient(180deg, rgba(3, 10, 18, 0), rgba(3, 10, 18, 0.72));
  box-shadow: inset 0 24px 38px rgba(0, 0, 0, 0.25);
}

.auth-scene-monster{
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.auth-monster{
  position: absolute;
  width: 62px;
  height: 62px;
  top: 2.6%;
  background-image: url("/photos/monster4-auth.png");
  background-repeat: no-repeat;
  background-size: 496px 62px;
  background-position: 0px 0px;
  opacity: 0.84;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.26)) saturate(1.04) brightness(1.05);
  transform: translate3d(0, 0, 0);
  transform-origin: center center;
  will-change: transform, background-position;
}

.auth-monster-1{
  right: 5%;
  animation:
    authMonsterFlyFrames 1100ms steps(7) infinite,
    authMonsterFly 20s linear infinite;
}

.auth-scene-slimes{
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.auth-slime{
  position: absolute;
  width: 50px;
  height: 50px;
  bottom: 18px;
  background-image: url("/photos/monster3-auth.png");
  background-repeat: no-repeat;
  background-size: 800px 50px;
  background-position: 0px 0px;
  opacity: 0.62;
  filter: blur(0.1px) saturate(1.05) brightness(1.04);
  transform: translate3d(0, 0, 0) scale(1.72);
  transform-origin: center bottom;
}

.auth-slime-1{
  left: 4%;
  bottom: 46px;
  animation:
    authSlimeWalk 920ms steps(15) infinite,
    authSlimePath1 34s linear infinite;
}

.auth-slime-2{
  left: 76%;
  bottom: 38px;
  transform: translate3d(0, 0, 0) scale(1.38) scaleX(-1);
  opacity: 0.38;
  animation:
    authSlimeWalk 760ms steps(15) infinite,
    authSlimePath2 40s linear infinite;
  animation-delay: -4.5s, 0s;
}

.auth-slime-3{
  left: 22%;
  bottom: 52px;
  transform: translate3d(0, 0, 0) scale(1.18);
  opacity: 0.3;
  animation:
    authSlimeWalk 680ms steps(15) infinite,
    authSlimePath3 46s linear infinite;
  animation-delay: -2s, -10s;
}

.auth-shell{
  position: relative;
  z-index: 1;
  width: min(1220px, 100%);
  max-height: calc(100vh - clamp(28px, 6vw, 84px));
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(340px, 430px);
  gap: 22px;
  align-items: stretch;
}

#auth .auth-shell,
#auth .auth-panel,
#auth .auth-card,
#auth .auth-feature-card,
#auth .auth-item-body,
#auth .auth-connect-row,
#auth .auth-connect-btn,
#auth .auth-rail,
#auth .auth-rail-card,
#auth .auth-hero-wrap{
  min-width: 0;
}

@media (max-width: 980px){
  #auth{
    align-items: flex-start;
    justify-content: flex-start;
    padding: 12px;
  }

  .auth-shell{
    width: min(760px, 100%);
    max-height: none;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .auth-hero,
  .auth-card{
    border-radius: 24px;
  }

  .auth-hero{
    padding: 18px;
    gap: 14px;
    justify-content: flex-start;
  }

  .auth-hero h1{
    font-size: clamp(34px, 8vw, 58px);
  }

  .auth-hero-logo{
    width: min(240px, 68%);
  }

  .auth-card{
    padding: 18px;
  }
}

.auth-hero,
.auth-card{
  border: 1px solid rgba(115, 219, 255, 0.26);
  border-radius: 28px;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px) saturate(1.06);
  -webkit-backdrop-filter: blur(14px) saturate(1.06);
}

.auth-hero{
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
   radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  min-height: 0;
  justify-content: center;
  gap: 18px;
}

.auth-hero::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 38%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08), rgba(255,255,255,0) 24%);
  pointer-events: none;
}

.auth-hero-logo{
  position: relative;
  width: min(280px, 72%);
  height: auto;
  margin-bottom: 10px;
  filter:
    drop-shadow(0 0 12px rgba(73, 168, 255, 0.38))
    drop-shadow(0 0 24px rgba(34, 199, 255, 0.18))
    drop-shadow(0 14px 24px rgba(0,0,0,0.42));
  animation: authLogoGlow 4.8s ease-in-out infinite;
}

.auth-hero-copy{
  position: relative;
  max-width: 520px;
}

.auth-kicker{
  margin: 0 0 10px;
  color: rgba(173, 237, 255, 0.92);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 800;
}

.auth-hero h1{
  margin: 0;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 0.95;
  color: #f7fdff;
  text-shadow: 0 10px 28px rgba(0,0,0,0.38);
}

.auth-updates{
  position: relative;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 22px;
  border: 1px solid rgba(115, 219, 255, 0.16);
  background:
    radial-gradient(circle at 18% 0%, rgba(73, 168, 255, 0.12), rgba(73, 168, 255, 0) 42%),
    linear-gradient(180deg, rgba(6, 21, 42, 0.88), rgba(4, 14, 28, 0.96));
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.auth-updates-head{
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(173, 237, 255, 0.82);
  font-weight: 900;
}

.auth-updates-list{
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.auth-updates-list li{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(244, 251, 255, 0.92);
  font-weight: 700;
}

.auth-update-ico{
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  color: #f7fdff;
  background: linear-gradient(180deg, rgba(73, 168, 255, 0.98), rgba(17, 110, 214, 0.98));
  box-shadow:
    0 0 0 1px rgba(115, 219, 255, 0.16),
    0 0 12px rgba(34, 199, 255, 0.16);
}

.auth-update-ico-floor::before{ content: "F"; }
.auth-update-ico-monster::before{ content: "M"; }
.auth-update-ico-ammo::before{ content: "A"; }
.auth-update-ico-inventory::before{ content: "I"; }

.auth-update-ico-floor{
  filter: saturate(1.08);
}

.auth-update-ico-monster{
  background: linear-gradient(180deg, rgba(24, 224, 111, 0.98), rgba(15, 143, 72, 0.98));
}

.auth-update-ico-ammo{
  background: linear-gradient(180deg, rgba(255, 193, 79, 0.98), rgba(204, 118, 14, 0.98));
}

.auth-update-ico-inventory{
  background: linear-gradient(180deg, rgba(183, 245, 209, 0.98), rgba(92, 180, 123, 0.98));
}

.auth-points{
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.auth-points span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(115, 219, 255, 0.24);
  background: rgba(6, 20, 39, 0.66);
  color: rgba(244, 251, 255, 0.9);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.auth-card{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(18px, 2.5vw, 26px);
  background:
   radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  overflow: hidden;
  align-self: center;
  min-height: 0;
  justify-content: center;
}

.auth-card{
  box-shadow:
    0 24px 54px rgba(0,0,0,0.42),
    0 0 22px rgba(66, 172, 255, 0.09),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(16px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.08) !important;
}

.auth-card::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
 linear-gradient(180deg, rgb(35 0 0 / 12%), rgb(7 2 26) 24%), radial-gradient(circle at 50% 0%, rgb(8 21 51), transparent 42%) !important;
  opacity: 0.38;
  pointer-events: none;
  transform: translateX(-18%);
}

.auth-hero > *,
.auth-card > *{
  position: relative;
  z-index: 1;
}

.auth-brand{
  display: grid;
  gap: 6px;
}

.auth-sub{
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(173, 237, 255, 0.88);
  font-weight: 800;
}

.auth-title{
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.05;
  font-weight: 900;
  color: #f7fdff;
}

.auth-form{
  display: grid;
  gap: 10px;
}

.auth-label{
  font-size: 13px;
  font-weight: 800;
  color: rgba(233, 247, 255, 0.88);
}

.auth-field{
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(115, 219, 255, 0.20);
  background: rgba(6, 21, 42, 0.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 0 rgba(34,199,255,0);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.auth-field input{
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--cc-text);
  font: inherit;
}

.auth-field input::placeholder{
  color: rgba(233, 247, 255, 0.48);
}

.auth-field:focus-within{
  border-color: rgba(34, 199, 255, 0.72);
  background: rgba(6, 22, 44, 0.92);
  box-shadow:
    0 0 0 3px rgba(34, 199, 255, 0.10),
    0 0 24px rgba(34, 199, 255, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.05);
  transform: translateY(-1px);
}

.auth-ico{
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(73, 168, 255, 0.96), rgba(17, 110, 214, 0.96));
  background-repeat: no-repeat;
  background-position: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(0,0,0,0.26);
}

.auth-ico-user{
  background-image: url("/photos/icons_tilemap.png");
  background-size: 242px 176px;
  background-position: 0px -22px;
}

.auth-ico-user::before{ content: ""; }
.auth-ico-email::before{ content: "@"; }
.auth-ico-pass{
  background-image: url("/photos/icons_tilemap.png");
  background-size: 242px 176px;
  background-position: -22px -22px;
}

.auth-ico-pass::before{ content: ""; }

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

.auth-btn{
  position: relative;
  appearance: none;
  border: 0;
  min-height: 48px;
  border-radius: 16px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  overflow: hidden;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.auth-btn::before{
  content: "";
  position: absolute;
  inset: -30% -40%;
  background: linear-gradient(110deg, rgba(255,255,255,0) 35%, rgba(255,255,255,0.24) 50%, rgba(255,255,255,0) 65%);
  transform: translateX(-120%) rotate(8deg);
  opacity: 0;
  pointer-events: none;
}

.auth-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(34, 199, 255, 0.18);
}

.auth-btn:hover::before{
  opacity: 1;
  animation: authButtonShine 900ms ease forwards;
}

.auth-btn:active{
  transform: translateY(1px) scale(0.985);
}

.auth-btn-primary{
  color: #fff;
  background: linear-gradient(180deg, rgba(73, 168, 255, 0.98), rgba(17, 110, 214, 0.98));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255,255,255,0.18);
}

.auth-btn-secondary{
  color: #dff8ff;
  background: linear-gradient(180deg, rgba(8, 29, 55, 0.96), rgba(11, 44, 84, 0.96));
  border: 1px solid rgba(115, 219, 255, 0.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.auth-msg{
  min-height: 22px;
  color: #b7f5d1;
  font-weight: 700;
  font-size: 13px;
}

.auth-foot{
  display: flex;
  justify-content: flex-end;
}

.auth-link{
  color: rgb(0 199 255 / 92%);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.auth-link:hover{
  text-decoration: underline;
}

.auth-card.auth-mode-pulse{
  animation: authPulse 180ms ease;
}

@keyframes authPulse{
  0% { transform: scale(1); }
  45% { transform: scale(1.012); }
  100% { transform: scale(1); }
}

@keyframes authCloudDriftA{
  from { transform: translate3d(-2%, 0, 0); }
  to { transform: translate3d(2%, 0, 0); }
}

@keyframes authCloudDriftB{
  from { transform: translate3d(2%, 0, 0) scale(0.82); }
  to { transform: translate3d(-3%, 0, 0) scale(0.82); }
}

@keyframes authSkyDrift{
  from { transform: scale(1.03) translate3d(-0.8%, -0.4%, 0); }
  to { transform: scale(1.03) translate3d(0.8%, 0.4%, 0); }
}

@keyframes authBgCloudsDrift{
  from { transform: scale(1.04) translate3d(-1.6%, 0.2%, 0); }
  to { transform: scale(1.04) translate3d(1.6%, -0.2%, 0); }
}

@keyframes authMistDriftA{
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to { transform: translate3d(2%, 0, 0) scale(1); }
}

@keyframes authMistDriftB{
  from { transform: translate3d(1.6%, 0, 0) scale(1); }
  to { transform: translate3d(-1.6%, 0, 0) scale(1); }
}

@keyframes authMistDriftC{
  from { transform: translate3d(-1.2%, 0, 0) scale(1); }
  to { transform: translate3d(1.2%, 0, 0) scale(1); }
}

@keyframes authTreeDriftA{
  from { transform: scale(1.04) translate3d(0, 1.5%, 0); }
  to { transform: scale(1.045) translate3d(-0.4%, 1.2%, 0); }
}

@keyframes authTreeDriftB{
  from { transform: scale(1.02) translate3d(0, 0.5%, 0); }
  to { transform: scale(1.025) translate3d(0.5%, 0.2%, 0); }
}

@keyframes authSlimeWalk{
  from { background-position: 0px 0px; }
  to { background-position: -750px 0px; }
}

@keyframes authSlimePath1{
  from { transform: translate3d(0, 0, 0) scale(1.72); }
  to { transform: translate3d(115vw, 0, 0) scale(1.72); }
}

@keyframes authSlimePath2{
  from { transform: translate3d(0, 0, 0) scale(1.38) scaleX(-1); }
  to { transform: translate3d(-130vw, 0, 0) scale(1.38) scaleX(-1); }
}

@keyframes authSlimePath3{
  from { transform: translate3d(0, 0, 0) scale(1.18); }
  to { transform: translate3d(125vw, 0, 0) scale(1.18); }
}

@keyframes authMonsterFlap{
  from { background-position: 0px 0px; }
  to { background-position: -434px 0px; }
}

@keyframes authMonsterFly{
  0% { transform: translate3d(0, 0, 0) scaleX(-1); }
  45% { transform: translate3d(-72vw, 1vh, 0) scaleX(-1); }
  50% { transform: translate3d(-72vw, 1vh, 0) scaleX(1); }
  95% { transform: translate3d(0, 0, 0) scaleX(1); }
  100% { transform: translate3d(0, 0, 0) scaleX(-1); }
}

@keyframes authMonsterFlyFrames{
  from { background-position: 0px 0px; }
  to { background-position: -434px 0px; }
}

@keyframes authButtonShine{
  from { transform: translateX(-120%) rotate(8deg); }
  to { transform: translateX(120%) rotate(8deg); }
}

@keyframes authLogoGlow{
  0%, 100%{
    filter:
      drop-shadow(0 0 10px rgba(73, 168, 255, 0.30))
      drop-shadow(0 0 18px rgba(34, 199, 255, 0.16))
      drop-shadow(0 14px 24px rgba(0,0,0,0.42));
  }
  50%{
    filter:
      drop-shadow(0 0 16px rgba(73, 168, 255, 0.48))
      drop-shadow(0 0 28px rgba(34, 199, 255, 0.24))
      drop-shadow(0 14px 24px rgba(0,0,0,0.42));
  }
}

@media (max-width: 980px){
  .auth-shell{
    grid-template-columns: 1fr;
    max-height: none;
  }

  .auth-hero{
    min-height: 0;
    justify-content: flex-start;
  }

}

@media (max-width: 640px){
  #auth{
    padding: 12px;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  .auth-shell{
    width: 100%;
    gap: 12px;
  }

  .auth-hero{
    padding: 18px;
  }

  .auth-card{
    padding: 16px;
  }

  .auth-actions{
    grid-template-columns: 1fr;
  }

  .auth-hero-logo{
    width: min(220px, 76%);
  }

  .auth-updates{
    padding: 12px 13px;
  }

  .auth-points{
    gap: 8px;
  }
}

/* Hide the bottom inventory / toolbar completely. Inventory now lives in the profile UI. */
#inventory,
#inventory-grid,
#inventory-toolbar{
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Player profile redesign: closer to the full HUD layout in the reference. */
#player-info-modal .player-info-card{
  width: min(1320px, calc(100vw - 24px)) !important;
  max-width: 1320px !important;
  max-height: calc(100vh - 24px) !important;
  margin-top: 0 !important;
  padding: 18px !important;
  overflow: auto !important;
  border-radius: 28px !important;
  border: 1px solid rgb(31 53 163) !important;
  background:
   radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.54),
    inset 0 1px 0 rgba(255,255,255,0.07) !important;
  color: #eaf7ff !important;
  position: relative !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 219, 255, 0.88) rgba(4, 16, 31, 0.72);
  scrollbar-gutter: stable;
}

#player-info-modal .player-info-card::before{
  content: "" !important;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(35 0 0 / 12%), rgb(7 2 26) 24%),
    radial-gradient(circle at 50% 0%, rgb(8 21 51), transparent 42%) !important;
  pointer-events: none;
  z-index: 0;
}

#player-info-modal .player-info-card > *{
  position: relative;
  z-index: 1;
}

#player-info-modal .player-info-card::-webkit-scrollbar,
#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar,
#player-info-content .pi-inventory-grid::-webkit-scrollbar{
  width: 11px;
  height: 11px;
}

#player-info-modal .player-info-card::-webkit-scrollbar-track,
#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar-track,
#player-info-content .pi-inventory-grid::-webkit-scrollbar-track{
  background:
    linear-gradient(180deg, rgba(4, 16, 31, 0.94), rgba(8, 28, 54, 0.94));
  border-radius: 999px;
  border: 1px solid rgba(115, 219, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.36);
}

#player-info-modal .player-info-card::-webkit-scrollbar-thumb,
#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar-thumb,
#player-info-content .pi-inventory-grid::-webkit-scrollbar-thumb{
  border-radius: 999px;
  border: 2px solid rgba(4, 16, 31, 0.94);
  background:
    linear-gradient(180deg, rgba(115, 219, 255, 0.98), rgba(39, 136, 255, 0.90));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.26),
    0 0 0 1px rgba(115, 219, 255, 0.16);
}

#player-info-modal .player-info-card::-webkit-scrollbar-thumb:hover,
#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar-thumb:hover,
#player-info-content .pi-inventory-grid::-webkit-scrollbar-thumb:hover{
  background:
    linear-gradient(180deg, rgba(166, 236, 255, 0.98), rgba(56, 163, 255, 0.96));
}

#player-info-modal .player-info-card::-webkit-scrollbar-thumb:active,
#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar-thumb:active,
#player-info-content .pi-inventory-grid::-webkit-scrollbar-thumb:active{
  background:
    linear-gradient(180deg, rgba(91, 208, 247, 0.98), rgba(22, 121, 230, 0.98));
}

#player-info-modal .player-info-card::-webkit-scrollbar-corner,
#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar-corner,
#player-info-content .pi-inventory-grid::-webkit-scrollbar-corner{
  background: transparent;
}

#player-info-modal .pinfobutton{
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(115, 219, 255, 0.18) !important;
  background: linear-gradient(180deg, rgba(255, 106, 106, 0.98), rgba(195, 34, 34, 0.98)) !important;
  color: #f4fbff !important;
  font-size: 24px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  z-index: 5 !important;
}

#player-info-modal .pinfobutton:hover{
  filter: brightness(1.06) !important;
}

#player-info-content{
  display: block !important;
  gap: 0 !important;
  width: 100% !important;
}

#player-info-content .pi-shell{
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100% !important;
}

#player-info-content .pi-board{
  display: grid !important;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1.45fr) minmax(300px, 0.98fr) !important;
  gap: 14px !important;
  align-items: stretch !important;
  width: 100% !important;
}

#player-info-content .pi-column{
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  min-width: 0 !important;
  align-self: stretch !important;
}

#player-info-content .pi-card{
  border-radius: 20px !important;
  border: 1px solid rgba(115, 219, 255, 0.22) !important;
  background:
    radial-gradient(140% 120% at 20% -8%, rgba(73, 168, 255, 0.12), rgba(73, 168, 255, 0) 44%),
    linear-gradient(180deg, rgba(8, 25, 48, 0.96), rgba(6, 18, 34, 0.98)) !important;
  box-shadow:
    0 18px 36px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
  min-width: 0 !important;
}

#player-info-content .pi-section-title{
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgba(244, 251, 255, 0.95) !important;
}

#player-info-content .pi-section-sub{
  margin-top: 4px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: rgba(214, 235, 250, 0.72) !important;
}

#player-info-content .pi-profile-card,
#player-info-content .pi-equipment-card,
#player-info-content .pi-inventory-card{
  min-height: 100% !important;
}

#player-info-content .pi-right .pi-card{
  min-height: 0 !important;
}

#player-info-content .pi-right .pi-equipment-card,
#player-info-content .pi-right .pi-worlds-card,
#player-info-content .pi-right .pi-equipment-info-card{
  flex: 0 0 auto !important;
}

#player-info-content .pi-column.pi-center{
  min-height: 100% !important;
}

#player-info-content .pi-column.pi-left{
  min-height: 100% !important;
}

#player-info-content .pi-column.pi-right{
  align-self: start !important;
  min-height: 0 !important;
}

#player-info-content .pi-inventory-card{
  min-height: 0 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
}

#player-info-content .pi-equipment-card{
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

#player-info-content .pi-profile-mini-card{
  display: flex !important;
  flex-direction: column !important;
  box-shadow:
    0 14px 26px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

#player-info-content .pi-profile-mini-card .pi-name{
  font-size: 24px !important;
  line-height: 1 !important;
}

#player-info-content .pi-profile-mini-card .pi-level-badge{
  width: fit-content !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border-radius: 14px !important;
}

#player-info-content .pi-profile-mini-card .pi-level-badge-icon{
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  image-rendering: pixelated !important;
}

#player-info-content .pi-profile-mini-card .pi-level-badge-text{
  position: relative !important;
  z-index: 1 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgba(228, 247, 255, 0.84) !important;
}

#player-info-content .pi-profile-mini-card .pi-level-badge-num{
  font-size: 18px !important;
  line-height: 1 !important;
}

#player-info-content .pi-profile-mini-card .pi-sub{
  display: none !important;
}

#player-info-content .pi-profile-mini-card .pi-age-wrap{
  width: fit-content !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
}

#player-info-content .pi-profile-meta{
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-width: 0 !important;
}

#player-info-content .pi-name{
  font-size: 28px !important;
  line-height: 1 !important;
}

#player-info-content .pi-stat-block{
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  margin-top: 0 !important;
}

#player-info-content .pi-stat-block-hp .pi-bar{
  border-color: rgba(52, 211, 153, 0.16) !important;
}

#player-info-content .pi-stat-block-mana .pi-bar{
  border-color: rgba(64, 163, 255, 0.18) !important;
}

#player-info-content .pi-stat-block-xp .pi-bar{
  border-color: rgba(255, 176, 0, 0.16) !important;
}

#player-info-content .pi-bar{
  position: relative !important;
  width: 100% !important;
  height: 28px !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(115, 219, 255, 0.12) !important;
  overflow: hidden !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 8px 16px rgba(0,0,0,0.12) !important;
}

#player-info-content .pi-bar-fill{
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  height: 100% !important;
  border-radius: inherit !important;
}

#player-info-content .pi-bar-content{
  position: relative !important;
  z-index: 1 !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  color: rgba(247, 253, 255, 0.96) !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.55) !important;
}

#player-info-content .pi-bar-label{
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}

#player-info-content .pi-bar-label span{
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#player-info-content .pi-bar-icon{
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px !important;
  image-rendering: pixelated !important;
}

#player-info-content .pi-bar-icon-hp{
  margin-top: -1px !important;
}

#player-info-content .pi-bar strong{
  font-size: 12px !important;
  color: rgba(247, 253, 255, 0.96) !important;
}

#player-info-content .pi-bar-fill-hp{
  background: linear-gradient(90deg, #34d399, #1bc46f) !important;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.18) !important;
}

#player-info-content .pi-bar-fill-mana{
  background: linear-gradient(90deg, #40a3ff, #22c7ff) !important;
  box-shadow: 0 0 14px rgba(64, 163, 255, 0.18) !important;
}

#player-info-content .pi-bar-fill-xp{
  background: linear-gradient(90deg, #ffb000, #ff7a18) !important;
  box-shadow: 0 0 14px rgba(255, 176, 0, 0.18) !important;
}

#player-info-content .pi-age-wrap{
  width: fit-content !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  background: rgb(3 15 28 / 0%) !important;
}



#player-info-content .pi-boost-panel{
  margin-bottom: 8px !important;
  padding-bottom: 2px !important;
  border-bottom: 1px solid rgba(115, 219, 255, 0.12) !important;
}

#player-info-content .pi-boost-list{
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  margin-top: 0 !important;
}

#player-info-content .pi-boost-item{
  position: relative !important;
  overflow: hidden !important;
  padding: 5px 2px !important;
  border-bottom: 1px solid rgba(115, 219, 255, 0.10) !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
}

#player-info-content .pi-boost-item:last-child{
  border-bottom: 0 !important;
}

#player-info-content .pi-boost-item .pi-stat-item-label{
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 1 1 auto !important;
  color: rgba(230, 241, 250, 0.96) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
}

#player-info-content .pi-boost-item .pi-stat-item-value{
  position: relative !important;
  z-index: 1 !important;
  flex: 0 0 auto !important;
  min-width: 72px !important;
  text-align: right !important;
  color: #f6fcff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.68) !important;
}

#player-info-content .pi-boost-empty{
  padding: 5px 2px !important;
  color: rgba(244, 251, 255, 0.72) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

#player-info-content .pi-worlds-card{
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-height: 0 !important;
}

#player-info-content .pi-worlds-action-wrap{
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

#player-info-content .pi-worlds-upgrade-btn{
  width: 100% !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(127, 231, 255, 0.34) !important;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(48, 165, 255, 0.98), rgba(14, 91, 185, 0.98)) !important;
  color: #f6fcff !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.55) !important;
  box-shadow:
    0 12px 22px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.14) !important;
}

#player-info-content .pi-worlds-upgrade-btn:hover{
  filter: brightness(1.06) !important;
  transform: translateY(-1px) !important;
  box-shadow:
    0 15px 28px rgba(0,0,0,0.28),
    0 0 16px rgba(61, 198, 255, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

#player-info-content .pi-worlds-upgrade-btn:active{
  transform: translateY(1px) scale(0.99) !important;
}

#player-info-content .pi-worlds-upgrade-icon{
  font-size: 13px !important;
  line-height: 1 !important;
}

#player-info-content .pi-worlds-head{
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

#player-info-content .pi-worlds-count{
  flex: 0 0 auto !important;
  color: rgba(214, 235, 250, 0.72) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  text-align: right !important;
}

#player-info-content .pi-worlds-position{
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  background: rgba(3, 15, 28, 0.28) !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  color: rgba(214, 235, 250, 0.82) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

#player-info-content .pi-worlds-position strong{
  color: rgba(244, 251, 255, 0.96) !important;
  font-weight: 900 !important;
}

#player-info-content .pi-worlds-list{
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  max-height: 84px !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(115, 219, 255, 0.88) rgba(4, 16, 31, 0.72) !important;
}

#player-info-content .pi-world-pill{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  min-height: 42px !important;
  padding: 9px 12px !important;
  border-radius: 12px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(115, 219, 255, 0.10) !important;
  background: transparent !important;
  color: rgba(244, 251, 255, 0.92) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  text-align: left !important;
  gap: 10px !important;
}

#player-info-content .pi-world-pill:hover{
  background: rgba(7, 24, 44, 0.68) !important;
  border-bottom-color: rgba(115, 219, 255, 0.24) !important;
}

#player-info-content .pi-worlds-list::-webkit-scrollbar{
  width: 10px !important;
}

#player-info-content .pi-worlds-list::-webkit-scrollbar-track{
  background: rgba(4, 16, 31, 0.72) !important;
  border-radius: 999px !important;
}

#player-info-content .pi-worlds-list::-webkit-scrollbar-thumb{
  border-radius: 999px !important;
  border: 2px solid rgba(4, 16, 31, 0.72) !important;
  background: linear-gradient(180deg, rgba(115, 219, 255, 0.98), rgba(39, 136, 255, 0.90)) !important;
}

#player-info-content .pi-world-pill + .pi-world-pill{
  margin-top: 2px !important;
}

#player-info-content .pi-world-pill-index{
  flex: 0 0 auto !important;
  min-width: 28px !important;
  color: rgba(131, 224, 255, 0.72) !important;
  font-size: 11px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.08em !important;
}

#player-info-content .pi-world-pill-name{
  flex: 1 1 auto !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
}

#player-info-content .pi-world-pill-action{
  flex: 0 0 auto !important;
  color: rgba(244, 251, 255, 0.66) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

#player-info-content .pi-worlds-empty{
  padding: 10px 12px !important;
  border-radius: 14px !important;
  border: 1px dashed rgba(115, 219, 255, 0.18) !important;
  background: rgba(3, 15, 28, 0.28) !important;
  color: rgba(217, 244, 255, 0.76) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

#player-info-content .pi-stats-card{
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

#player-info-content .pi-stats-grid{
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

.world-floor-banner{
  position: fixed;
  top: max(78px, env(safe-area-inset-top) + 12px) !important;
  left: 52%;
  transform: translate(-50%, -14px) scale(0.98);
  z-index: 12080;
  min-width: min(520px, calc(100vw - 24px));
  max-width: min(680px, calc(100vw - 24px));
  padding: 14px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(115, 219, 255, 0.22);
  background:
    radial-gradient(circle at 20% 0%, rgba(73, 168, 255, 0.24), rgba(73, 168, 255, 0) 42%),
    radial-gradient(circle at 100% 0%, rgba(126, 87, 255, 0.18), rgba(126, 87, 255, 0) 36%),
    linear-gradient(180deg, rgba(7, 21, 39, 0.96), rgba(4, 16, 30, 0.96));
  box-shadow:
    0 24px 50px rgba(0,0,0,0.46),
    inset 0 1px 0 rgba(255,255,255,0.06);
  color: #f4fbff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  overflow: hidden;
}

.world-floor-banner.is-visible{
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.world-floor-banner-body{
  position: relative;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.world-floor-banner-preview{
  position: relative;
width: 120px;
    height: 120px;
    min-height: 120px;
  border-radius: 20px;
  border: 1px solid rgba(115, 219, 255, 0.20);
  background-color: rgba(8, 18, 33, 0.88);
  background-image: url("/photos/missionmap.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 2400px 1200px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 12px 24px rgba(0,0,0,0.22);
  overflow: hidden;
}

.world-floor-banner-preview::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 12, 24, 0.08), rgba(3, 12, 24, 0.54)),
    radial-gradient(circle at 50% 20%, rgba(255,255,255,0.10), transparent 38%);
  pointer-events: none;
}

.world-floor-banner-preview.is-empty{
  background-image:
    radial-gradient(circle at 50% 50%, rgba(73, 168, 255, 0.22), rgba(73, 168, 255, 0.02) 58%),
    linear-gradient(180deg, rgba(10, 28, 49, 0.94), rgba(6, 18, 33, 0.96));
}

.world-floor-banner-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.world-floor-banner-title{
  margin-top: 0;
  font-size: 24px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0,0,0,0.45);
}

.world-floor-banner-subtitle{
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(228, 245, 255, 0.78);
}

@media (max-width: 680px){
  .world-floor-banner{
    top: max(22px, env(safe-area-inset-top) + 10px) !important;
    min-width: min(520px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
    padding: 12px 12px 14px;
  }

  .world-floor-banner-body{
    grid-template-columns: 1fr;
  }

  .world-floor-banner-preview{
    width: 100%;
    min-height: 96px;
    height: auto;
  }

  .world-floor-banner-title{
    font-size: 20px;
  }
}

#player-info-content .pi-stat-item{
  position: relative !important;
  overflow: hidden !important;
  padding: 5px 2px !important;
  border-bottom: 1px solid rgba(115, 219, 255, 0.10) !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
}

#player-info-content .pi-stat-item::before{
  display: none !important;
}

#player-info-content .pi-stat-item.is-full{
  padding-top: 4px !important;
  padding-bottom: 8px !important;
}

#player-info-content .pi-stat-item.is-emphasis{
  padding-top: 8px !important;
  padding-bottom: 10px !important;
  border-bottom-color: rgba(115, 219, 255, 0.18) !important;
  background: linear-gradient(90deg, rgba(10, 34, 60, 0.28), rgba(8, 25, 46, 0)) !important;
}

#player-info-content .pi-stat-item-label{
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 1 1 auto !important;
  color: rgba(230, 241, 250, 0.96) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
}

#player-info-content .pi-stat-item.is-emphasis .pi-stat-item-label{
  color: rgba(241, 249, 255, 0.99) !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

#player-info-content .pi-stat-item-value{
  position: relative !important;
  z-index: 1 !important;
  flex: 0 0 auto !important;
  min-width: 52px !important;
  text-align: right !important;
  color: #f6fcff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.68) !important;
}

#player-info-content .pi-stat-item.is-emphasis .pi-stat-item-value{
  min-width: 78px !important;
  font-size: 16px !important;
  color: #ffffff !important;
}

#player-info-content .pi-stat-item.is-full .pi-stat-item-value{
  min-width: 72px !important;
  font-size: 16px !important;
}

#player-info-content .pi-stat-item-bar{
  position: relative !important;
  z-index: 1 !important;
  height: 8px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  background: rgba(4, 16, 30, 0.56) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

#player-info-content .pi-stat-item-bar span{
  display: block !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.98), rgba(64, 163, 255, 0.96)) !important;
  box-shadow: 0 0 12px rgba(64, 163, 255, 0.18) !important;
}

#player-info-content .pi-stat-divider{
  height: 1px !important;
  margin: 6px 0 !important;
  background: linear-gradient(90deg, rgba(34, 199, 255, 0), rgba(34, 199, 255, 0.42), rgba(34, 199, 255, 0)) !important;
  box-shadow: 0 0 12px rgba(34, 199, 255, 0.08) !important;
}

#player-info-content .pi-inventory-tabs{
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  margin: 14px 0 14px !important;
  padding-bottom: 2px !important;
}

#player-info-content .pi-tab{
  position: relative !important;
  cursor: pointer !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  min-height: 40px !important;
  padding: 0 11px 0 10px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(115, 219, 255, 0.22) !important;
  background: linear-gradient(180deg, rgba(18, 55, 100, 0.98), rgba(10, 31, 58, 0.98)) !important;
  color: rgba(244, 251, 255, 0.9) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

#player-info-content .pi-tab.is-active{
  border-color: rgba(34, 199, 255, 0.9) !important;
  background: linear-gradient(180deg, rgba(48, 146, 244, 0.98), rgba(20, 90, 180, 0.98)) !important;
  box-shadow:
    0 0 0 2px rgba(34, 199, 255, 0.20) inset,
    0 10px 18px rgba(0,0,0,0.18),
    0 0 14px rgba(34, 199, 255, 0.16) !important;
}

#player-info-content .pi-tab:hover{
  transform: translateY(-1px) !important;
  border-color: rgba(128, 225, 255, 0.42) !important;
  box-shadow:
    0 10px 18px rgba(0,0,0,0.16),
    0 0 14px rgba(34, 199, 255, 0.12) !important;
}

#player-info-content .pi-tab:active{
  transform: translateY(1px) scale(0.99) !important;
}

#player-info-content .pi-tab-icon{
  flex: 0 0 22px !important;
  width: 22px !important;
  height: 22px !important;
  display: inline-block !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 242px 176px !important;
  image-rendering: pixelated !important;
  pointer-events: none !important;
}

#player-info-content .pi-tab-icon-all{
  background-position: -88px -44px !important;
}

#player-info-content .pi-tab-icon-blocks{
  background-position: 0px -44px !important;
}

#player-info-content .pi-tab-icon-items{
  background-position: -22px -44px !important;
}

#player-info-content .pi-tab-icon-cores{
  background-position: -44px -155px !important
}

#player-info-content .pi-tab-icon-clothes{
  background-position: -44px -44px !important;
}

#player-info-content .pi-tab-icon-pets{
  background-position: -66px -44px !important;
}

#player-info-content .pi-inventory-grid--profile{
  display: grid !important;
  grid-template-columns: repeat(auto-fill, 72px) !important;
  grid-auto-rows: 72px !important;
  gap: 8px !important;
  max-width: 100% !important;
  max-height: clamp(280px, 46vh, 520px) !important;
  min-height: 0 !important;
  padding: 8px !important;
  align-content: start !important;
  justify-content: start !important;
  justify-items: start !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 219, 255, 0.88) rgba(4, 16, 31, 0.72);
  scrollbar-gutter: stable;
}

#player-info-content .pi-inventory-chip{
  justify-content: flex-start !important;
  position: relative !important;
  width: 72px !important;
  min-height: 72px !important;
  aspect-ratio: 1 / 1 !important;
  padding: 4px !important;
  overflow: hidden !important;
}

#player-info-content .pi-inventory-chip.is-held{
  border-color: var(--inv-rarity-color, rgba(115, 219, 255, 0.98)) !important;
  box-shadow:
    0 0 0 2px rgba(115, 219, 255, 0.52) inset,
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 18px rgba(115, 219, 255, 0.48),
    0 0 34px rgba(61, 214, 255, 0.24),
    0 12px 24px rgba(0, 0, 0, 0.40) !important;
  transform: translateY(-1px) scale(1.03);
  filter: brightness(1.08) saturate(1.12);
}

#player-info-content .pi-inventory-chip.is-held::after{
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 18%, rgba(255,255,255,0.22), rgba(255,255,255,0) 48%);
  opacity: 0.72;
  pointer-events: none;
}

#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar{
  width: 11px;
  height: 11px;
}

#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar-track{
  background:
    linear-gradient(180deg, rgba(4, 16, 31, 0.94), rgba(8, 28, 54, 0.94));
  border-radius: 999px;
  border: 1px solid rgba(115, 219, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.36);
}

#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar-thumb{
  border-radius: 999px;
  border: 2px solid rgba(4, 16, 31, 0.94);
  background:
    linear-gradient(180deg, rgba(115, 219, 255, 0.98), rgba(39, 136, 255, 0.90));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.26),
    0 0 0 1px rgba(115, 219, 255, 0.16);
}

#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar-thumb:hover{
  background:
    linear-gradient(180deg, rgba(166, 236, 255, 0.98), rgba(56, 163, 255, 0.96));
}

#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar-thumb:active{
  background:
    linear-gradient(180deg, rgba(91, 208, 247, 0.98), rgba(22, 121, 230, 0.98));
}

#player-info-content .pi-inventory-grid--profile::-webkit-scrollbar-corner{
  background: transparent;
}

#player-info-content .pi-inventory-icon-wrap{
  position: absolute !important;
  inset: 1px !important;
  width: auto !important;
  height: auto !important;
  overflow: hidden !important;
}

#player-info-content .pi-inventory-icon{
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: fill !important;
  object-position: center center !important;
  transform: scale(1.24);
  transform-origin: center center;
}

#player-info-content .pi-inventory-name{
  display: none !important;
}

#player-info-content .pi-inventory-qty{
  position: absolute !important;
  right: 5px !important;
  bottom: 4px !important;
  z-index: 2 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #fff !important;
  text-shadow:
    0 1px 0 rgba(0,0,0,.85),
    0 0 6px rgba(0,0,0,.85) !important;
}

#player-info-content .pi-inventory-foot{
  display: flex !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-top: 12px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: rgba(214, 235, 250, 0.8) !important;
  margin-top: auto !important;
}

#player-info-content .pi-equipped-layout{
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 168px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  margin-top: 10px !important;
}

#player-info-content .pi-equipped-column{
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
}

#player-info-content .pi-equipped-avatar-wrap{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#player-info-content .pi-equipped-center-stack{
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
}

#player-info-content .pi-equipped-center-stack .pi-avatar-hero{
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

#player-info-content .pi-equipped-center-stack .pi-profile-mini-card{
  width: min(100%, 206px) !important;
  flex: 0 0 auto !important;
}

#player-info-content .pi-equipped-center-stack .pi-profile-meta{
  width: min(100%, 220px) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  align-self: center !important;
}

#player-info-content .pi-equipped-center-stack .pi-profile-meta .pi-stat-block{
  margin-top: 0 !important;
}

#player-info-content .pi-equipped-avatar-wrap .pi-avatar-wrap{
  width: 124px !important;
  height: 124px !important;
  border-radius: 14px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#player-info-content .pi-equipped-avatar-wrap .pi-avatar-stage{
  width: 124px !important;
  height: 124px !important;
}

#player-info-content .pi-equipped-item{
  width: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 14px !important;
}

#player-info-content .pi-equipped-grid{
  display: none !important;
}

#player-info-content .pi-footer-card{
  margin-top: auto !important;
  flex: 0 0 auto !important;
  background:
    radial-gradient(circle at top left, rgba(51, 201, 255, 0.12), rgba(51, 201, 255, 0) 36%),
    radial-gradient(circle at bottom right, rgba(126, 87, 255, 0.10), rgba(126, 87, 255, 0) 38%),
    linear-gradient(180deg, rgba(7, 27, 54, 0.98), rgba(5, 18, 36, 0.98)) !important;
}

#player-info-content .pi-game-menu-card{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#player-info-content .pi-quick-actions{
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-top: 12px !important;
}

#player-info-content .pi-quick-actions .mmo-btn{
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 72px !important;
  border-radius: 14px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  padding: 10px 10px 9px !important;
  color: #f6fcff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.65) !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.10) !important;
}

#player-info-content #profile-menu-exit{
  background: linear-gradient(180deg, rgba(214, 56, 56, 0.98), rgba(132, 24, 24, 0.98)) !important;
  border-color: rgba(255, 134, 134, 0.42) !important;
}

#player-info-content #profile-menu-exit:hover{
  background: linear-gradient(180deg, rgba(232, 72, 72, 1), rgba(156, 29, 29, 1)) !important;
}

#player-info-content #profile-menu-exit:active{
  background: linear-gradient(180deg, rgba(184, 42, 42, 0.98), rgba(110, 18, 18, 0.98)) !important;
}

#player-info-content .pi-quick-actions .mmo-btn::before{
  content: "";
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(120deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 35%, rgba(255,255,255,0.08) 52%, rgba(255,255,255,0) 70%) !important;
  transform: translateX(-120%) !important;
  transition: transform 280ms ease !important;
  pointer-events: none !important;
}

#player-info-content .pi-quick-actions .mmo-btn:hover::before{
  transform: translateX(120%) !important;
}

#player-info-content .pi-quick-actions .mmo-btn:hover{
  transform: translateY(-1px) !important;
  box-shadow:
    0 14px 26px rgba(0,0,0,0.26),
    0 0 18px rgba(61, 198, 255, 0.14),
    inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

#player-info-content .pi-quick-actions .mmo-btn:active{
  transform: translateY(1px) scale(0.99) !important;
}

#player-info-content .pi-menu-btn-icon{
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  font-size: 0 !important;
  line-height: 1 !important;
  flex: 0 0 auto !important;
}

#player-info-content .pi-game-menu-card .pi-menu-btn-icon{
  width: 24px !important;
  height: 24px !important;
  transform: scale(1.12);
  transform-origin: center center;
}

#player-info-content .pi-menu-btn-exit .pi-menu-btn-icon,
#player-info-content .pi-menu-btn-respawn .pi-menu-btn-icon,
#player-info-content .pi-menu-btn-store .pi-menu-btn-icon,
#player-info-content .pi-menu-btn-settings .pi-menu-btn-icon{
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 264px 192px !important;
  image-rendering: pixelated !important;
}

#player-info-content .pi-menu-btn-exit .pi-menu-btn-icon{
  background-position: -216px -24px !important;
}

#player-info-content .pi-menu-btn-respawn .pi-menu-btn-icon{
  background-position: -192px -24px !important;
}

#player-info-content .pi-menu-btn-store .pi-menu-btn-icon{
  background-position: -168px -24px !important;
}

#player-info-content .pi-menu-btn-craft .pi-menu-btn-icon{
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-position: -72px -168px !important;
  background-size: 264px 192px !important;
  image-rendering: pixelated !important;
}

#player-info-content .pi-menu-btn-settings .pi-menu-btn-icon{
  background-position: -144px -24px !important;
}

#player-info-content .pi-menu-btn-label{
  position: relative !important;
  z-index: 1 !important;
  line-height: 1.05 !important;
  text-align: center !important;
}

#player-info-content .pi-menu-btn-exit{
  background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.10), transparent 28%), linear-gradient(180deg, rgb(19 73 132 / 98%), rgb(0 49 105 / 98%)) !important;
  border-color: rgba(147, 221, 255, 0.34) !important;
}

#player-info-content .pi-menu-btn-respawn{
  background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.10), transparent 28%), linear-gradient(180deg, rgb(19 73 132 / 98%), rgb(0 49 105 / 98%)) !important;
  border-color: rgba(147, 221, 255, 0.34) !important;
}

#player-info-content .pi-menu-btn-store{
  background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.10), transparent 28%), linear-gradient(180deg, rgb(19 73 132 / 98%), rgb(0 49 105 / 98%)) !important;
  border-color: rgba(147, 221, 255, 0.34) !important;
}

#player-info-content .pi-menu-btn-settings{
  background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.10), transparent 28%), linear-gradient(180deg, rgb(19 73 132 / 98%), rgb(0 49 105 / 98%)) !important;
  border-color: rgba(147, 221, 255, 0.34) !important;
}

#player-info-content .pi-menu-btn-craft{
  background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.10), transparent 28%), linear-gradient(180deg, rgb(19 73 132 / 98%), rgb(0 49 105 / 98%)) !important;
  border-color: rgba(147, 221, 255, 0.34) !important;
}

@media (max-width: 1200px){
  #player-info-content .pi-board{
    grid-template-columns: 1fr !important;
  }

  #player-info-content .pi-equipped-layout{
    grid-template-columns: 1fr !important;
  }

  #player-info-content .pi-equipped-avatar-wrap{
    order: -1 !important;
  }

  #player-info-content .pi-inventory-grid--profile{
    grid-template-columns: repeat(auto-fill, 68px) !important;
    grid-auto-rows: 68px !important;
  }

  #player-info-content .pi-inventory-chip{
    width: 68px !important;
    min-height: 68px !important;
  }

  #player-info-content .pi-stat-item-label{
    font-size: 11px !important;
  }

  #player-info-content .pi-stat-item-value{
    min-width: 46px !important;
  }
}

@media (max-width: 720px){
  #player-info-modal .player-info-card{
    width: calc(100vw - 12px) !important;
    padding: 10px !important;
  }

  #player-info-content .pi-quick-actions{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #player-info-modal .pi-equipment-tooltip-head{
    grid-template-columns: 64px minmax(0, 1fr) !important;
  }

  #player-info-modal .pi-equipment-tooltip-rarity{
    grid-column: 1 / -1 !important;
    justify-self: start !important;
  }

  #player-info-modal .pi-equipment-tooltip-stats{
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)) !important;
  }
}

/* Lobby */
body:not(.is-game-world){
  background:
    radial-gradient(1000px 620px at 20% 10%, rgba(32, 126, 255, 0.18), transparent 60%),
    radial-gradient(800px 540px at 85% 0%, rgba(26, 194, 255, 0.12), transparent 55%),
    linear-gradient(180deg, #061321 0%, #081b2d 35%, #04101c 100%) !important;
  overflow: hidden !important;
}

body:not(.is-game-world)::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 15, 28, 0.12), rgba(5, 15, 28, 0.42)),
    radial-gradient(circle at 50% 15%, rgba(255,255,255,0.04), transparent 30%);
  z-index: 0;
}

#lobby{
  position: fixed !important;
  inset: 0 !important;
  z-index: 5 !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  padding: 0 !important;
  overflow: hidden !important;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background:
    radial-gradient(1000px 520px at 18% 12%, rgba(44, 149, 255, 0.22), transparent 58%),
    radial-gradient(800px 420px at 82% 8%, rgba(76, 208, 255, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(2, 12, 22, 0.9), rgba(5, 18, 32, 0.92) 46%, rgba(4, 13, 24, 0.96)) !important;
}

#lobby::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 10, 18, 0.04), rgba(2, 10, 18, 0.2)),
    url("/photos/treebg.png") center bottom / 118% auto no-repeat,
    url("/photos/treebg1.png") center bottom / cover no-repeat,
    url("/photos/bg.png") center center / cover no-repeat;
  filter: saturate(1.08) contrast(1.03);
}

#lobby::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.03), transparent 16%, transparent 84%, rgba(255,255,255,0.03)),
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.06), transparent 26%);
  background-position: center top, center top;
  background-size: auto, auto;
}

#lobby .lobby-card{
  position: relative;
  width: 100% !important;
  min-height: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: clamp(16px, 2vw, 24px) !important;
  box-sizing: border-box !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
  overflow: hidden;
}

#lobby .lobby-card::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 240px at 50% 0%, rgba(31, 168, 255, 0.12), transparent 58%),
    linear-gradient(90deg, rgba(255,255,255,0.03), transparent 18%, transparent 82%, rgba(255,255,255,0.03));
  opacity: 0.9;
}

#lobby .lobby-card > *{
  position: relative;
  z-index: 1;
}

#lobby .lobby-topbar{
  display: flex !important;
      align-items: flex-start;
  justify-content: space-between !important;
  gap: 18px !important;
  margin-bottom: 12px !important;
  padding: 12px 14px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(44, 149, 255, 0.18), transparent 38%), radial-gradient(circle at 88% 0%, rgba(76, 208, 255, 0.12), transparent 36%), linear-gradient(180deg, rgb(4 17 35 / 55%), rgb(4 13 25 / 48%)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 22px rgba(0,0,0,0.16) !important;
}

#lobby .lobby-top-left{
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  width: 100% !important;
}

#lobby .lobby-brand{
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}

#lobby .lobby-brand-logo{
  width: min(330px, 30vw) !important;
  max-width: 330px !important;
  height: auto !important;
  image-rendering: pixelated !important;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.42));
}

#lobby .lobby-brand-copy{
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  min-width: 0 !important;
}

#lobby .lobby-brand-kicker{
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: rgba(188, 231, 255, 0.88) !important;
}

#lobby .lobby-brand-note{
  font-size: 13px !important;
  font-weight: 700 !important;
  color: rgba(220, 240, 255, 0.78) !important;
}

#lobby .lobby-utility-row{
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  white-space: nowrap !important;
}

#lobby .lobby-utility-btn{
  flex: 0 0 auto !important;
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 !important;
  border-radius: 16px !important;
  border: 1px solid rgba(115, 219, 255, 0.22) !important;
  background:
    radial-gradient(circle at 35% 0%, rgba(255,255,255,0.10), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, rgba(19, 47, 78, 0.96), rgba(8, 24, 42, 0.96)) !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  text-align: center !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -10px 18px rgba(0,0,0,0.24),
    0 10px 18px rgba(0,0,0,0.18) !important;
  position: relative !important;
  overflow: visible !important;
}

#lobby .lobby-utility-btn::before{
  content: "" !important;
  width: 50px !important;
  height: 50px !important;
  display: block !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 550px 400px !important;
  image-rendering: pixelated !important;
  pointer-events: none !important;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3)) !important;
}

#lobby #lobby-gift-button::before{
  background-position: -200px -250px !important;
}

#lobby #lobby-news-button::before{
  background-position: -250px -250px !important;
}

#lobby #lobby-settings-button::before{
  background-position: -300px -250px !important;
}

#lobby #logoutButton::before{
  background-position: -350px -250px !important;
}

#lobby .lobby-utility-btn:hover{
  transform: translateY(-1px) !important;
}

#lobby .lobby-utility-danger{
  border-color: rgba(115, 219, 255, 0.22) !important;
  background:
    radial-gradient(circle at 35% 0%, rgba(255,255,255,0.10), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, rgba(19, 47, 78, 0.96), rgba(8, 24, 42, 0.96)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -10px 18px rgba(0,0,0,0.24),
    0 10px 18px rgba(0,0,0,0.18) !important;
}

#lobby #lobby-gift-button::after{
  content: attr(data-badge) !important;
  position: absolute !important;
  top: -7px !important;
  right: -7px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 4px !important;
  border-radius: 999px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(180deg, #ff5a66, #c91f31) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
  box-shadow:
    0 8px 16px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  opacity: 0 !important;
  transform: scale(0.85) !important;
  transform-origin: center center !important;
  pointer-events: none !important;
}

#lobby #lobby-gift-button[data-badge]:not([data-badge=""])::after{
  opacity: 1 !important;
}

#lobby .lobby-stage{
  display: grid !important;
  grid-template-columns: minmax(228px, 276px) minmax(0, 1.62fr) !important;
  gap: 14px !important;
  align-items: start !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

#lobby .lobby-stage-left,
#lobby .lobby-stage-center,
#lobby .lobby-stage-right{
  display: grid !important;
  gap: 12px !important;
  min-height: 0 !important;
}

#lobby .lobby-stage-center{
  min-width: 0 !important;
}

#lobby .lobby-player-strip{
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  justify-content: flex-start !important;
  padding: 18px 20px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(115, 219, 255, 0.16) !important;
  background:
  radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 24px rgba(0,0,0,0.18) !important;
  flex: 0 0 auto !important;
  min-width: 290px !important;
  justify-self: center !important;
  margin: 0 auto !important;
}

#lobby .lobby-player-avatar{
  width: 88px !important;
  height: 88px !important;
  border-radius: 21px !important;
  border: 1px solid rgba(115, 219, 255, 0.18) !important;
  background: linear-gradient(180deg, rgba(26, 96, 184, 0.9), rgba(10, 32, 66, 0.96)) !important;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.3),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 26px rgba(35, 156, 255, 0.2) !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 auto !important;
  overflow: hidden !important;
}

#lobby .lobby-player-avatar-stage{
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  place-items: center !important;
  transform: translateY(1px) scale(1.03) !important;
  transform-origin: center center !important;
}

#lobby .lobby-player-meta{
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

#lobby .lobby-player-name{
  font-size: clamp(20px, 1.8vw, 28px) !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  color: #f7fbff !important;
}

#lobby .lobby-player-level-row{
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

#lobby .lobby-player-level{
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: rgba(200, 232, 255, 0.88) !important;
}

#lobby .lobby-player-xp-text{
  font-size: 12px !important;
  font-weight: 800 !important;
  color: rgba(180, 223, 255, 0.76) !important;
  white-space: nowrap !important;
}

#lobby .lobby-player-xp-bar{
  width: min(180px, 36vw) !important;
  height: 10px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  border: 1px solid rgba(115, 219, 255, 0.16) !important;
  background: rgba(5, 19, 35, 0.92) !important;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.05) !important;
}

#lobby .lobby-player-xp-fill{
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #37d2ff, #3f7cff 58%, #67ff9d) !important;
  box-shadow: 0 0 18px rgba(55, 210, 255, 0.4) !important;
}

#lobby .lobby-player-coins{
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: rgba(220, 240, 255, 0.9) !important;
  line-height: 1 !important;
}

#lobby .lobby-player-coins-icon{
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  display: inline-block !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 242px 176px !important;
  background-position: -66px 0px !important;
  image-rendering: pixelated !important;
  background-color: transparent !important;
  background-origin: border-box !important;
  background-clip: border-box !important;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)) !important;
  transform: translateY(1px) !important;
}

#lobby .lobby-player-coins-value{
  white-space: nowrap !important;
}

#lobby .lobby-hero{
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 6px 4px 0 !important;
}

#lobby .lobby-sub{
  font-size: clamp(18px, 1.6vw, 28px) !important;
  font-weight: 900 !important;
  color: #ecf7ff !important;
  letter-spacing: -0.03em !important;
  text-transform: uppercase !important;
  text-shadow: 0 4px 18px rgba(0,0,0,0.22) !important;
}

#lobby .lobby-global{
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: fit-content !important;
  padding: 9px 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(115, 219, 255, 0.18) !important;
  background: rgba(4, 16, 30, 0.56) !important;
}

#lobby .lobby-pill{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 28px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, rgba(34, 199, 255, 0.96), rgba(17, 110, 214, 0.96)) !important;
  color: #fff !important;
  font-weight: 900 !important;
  font-size: 12px !important;
}

#lobby .lobby-global-text{
  font-size: 13px !important;
  color: rgba(219, 243, 255, 0.76) !important;
  font-weight: 700 !important;
}

#lobby .lobby-join{
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  margin-top: 2px !important;
  padding: 14px 16px 12px !important;
  width: min(100%, 670px) !important;
  justify-self: center !important;
  border-radius: 22px !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  background: rgba(4, 16, 30, 0.54) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

#lobby .lobby-join-title{
  grid-column: 1 / -1 !important;
  font-size: clamp(18px, 1.3vw, 34px) !important;
  font-weight: 900 !important;
  font-family: "Trebuchet MS", "Segoe UI", Tahoma, Arial, sans-serif !important;
  color: #ecf7ff !important;
  letter-spacing: -0.03em !important;
  text-transform: uppercase !important;
  text-shadow: 0 4px 18px rgba(0,0,0,0.22) !important;
  margin-bottom: 2px !important;
  text-align: center !important;
  justify-self: center !important;
  width: 100% !important;
}

#lobby .lobby-join .lobby-hint{
  grid-column: 1 / -1 !important;
}

#lobby .lobby-field input{
  width: 100% !important;
  min-height: 58px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(115, 219, 255, 0.18) !important;
  background: linear-gradient(180deg, rgba(8, 30, 57, 0.96), rgba(4, 16, 30, 0.96)) !important;
  color: #f4fbff !important;
  padding: 0 16px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

#lobby button#joinWorld.lobby-cta{
  min-height: 58px !important;
  min-width: 128px !important;
  padding: 0 18px !important;
  border-radius: 16px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #effff0 !important;
  border: 1px solid rgba(66, 214, 114, 0.75) !important;
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,0.22), transparent 28%),
    linear-gradient(180deg, #2fd65f 0%, #1aa843 52%, #117730 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 10px 20px rgba(0, 0, 0, 0.2),
    0 0 18px rgba(42, 210, 96, 0.22) !important;
}

#lobby button#joinWorld.lobby-cta:hover{
  filter: brightness(1.05) saturate(1.05);
  transform: translateY(-1px) !important;
}

#lobby button#joinWorld.lobby-cta:active{
  transform: translateY(0) !important;
  filter: brightness(0.98);
}

#lobby .lobby-hint{
  margin: 8px 0 0 !important;
  min-height: 22px !important;
  color: rgba(184, 232, 255, 0.82) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  grid-column: 1 / -1 !important;
}

#lobby #lobbytext{
  color: #ffd1d1 !important;
  min-height: 20px !important;
  display: none !important;
}

#lobby .lobby-online-count{
  color: rgba(196, 232, 255, 0.92) !important;
}

#lobby .lobby-quick{
  margin-top: 14px !important;
}

#lobby .hub-button{
  width: 100% !important;
  min-height: 86px !important;
  border-radius: 22px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 2px !important;
  padding: 14px 18px !important;
}

#lobby .hub-title{
  font-size: 20px !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
}

#lobby .hub-count{
  font-size: 13px !important;
  font-weight: 700 !important;
  color: rgba(219, 243, 255, 0.82) !important;
}

#lobby .lobby-actions-note{
  font-size: 13px !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
  color: rgba(191, 226, 255, 0.76) !important;
}

#lobby .lobby-grid{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 2px !important;
  min-height: 0 !important;
  align-items: stretch !important;
}

#lobby .lobby-panel{
  min-height: 0 !important;
  border-radius: 22px !important;
  border: 1px solid rgba(115, 219, 255, 0.16) !important;
  background:
  radial-gradient(circle at 14% 0%, rgb(5 6 42 / 15%), #00000005 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29 / 29%), #16030352 26%), linear-gradient(180deg, rgb(4 14 29 / 28%), rgb(1 7 16 / 33%)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 24px rgba(0,0,0,0.16) !important;
  padding: 4px !important;
  overflow: hidden !important;
}

#lobby .lobby-worlds-panel{
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  height: clamp(280px, 43vh, 430px) !important;
      align-items: center;
}

#lobby .lobby-panel-title{
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: rgba(233, 247, 255, 0.92) !important;
  margin: 2px 0 10px !important;
}

#lobby .world-list{
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  gap: 8px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable !important;
  padding-right: 10px !important;
  width: 100%;
}

#lobby .world-list li{
  border-radius: 12px !important;
  border: 1px solid rgba(115, 219, 255, 0.10) !important;
  background:
    linear-gradient(180deg, rgba(9, 29, 52, 0.96), rgba(4, 16, 30, 0.96)) !important;
  padding: 0 !important;
  min-height: 60px !important;
  overflow: hidden !important;
}

#lobby .world-list button,
#lobby .world-list .join-world-btn{
  width: 100% !important;
  min-height: 50px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background:
    linear-gradient(180deg, rgba(18, 44, 74, 0.70), rgba(7, 22, 39, 0.72)) !important;
  font-weight: 900 !important;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 80px !important;

  color: #eff6ff !important;
  text-align: left !important;
}

#lobby .world-thumb{
    width: 60px !important;
    height: 60px !important;
    border-radius: 8px !important;
    flex: 0 0 auto !important;
    /* border: 1px solid rgba(115, 219, 255, 0.22) !important; */
    background-color: rgba(9, 29, 52, 0.92) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    image-rendering: pixelated !important;
}

#lobby .world-name{
  width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  min-width: 0 !important;
  padding: 3px 2px !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#lobby .world-count{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-width: 30px !important;
  height: 100% !important;
  padding: 0 8px !important;
  border-radius: 10px !important;
  background:
    linear-gradient(180deg, rgba(11, 30, 52, 0.86), rgba(4, 17, 32, 0.94)) !important;
  color: rgba(232, 246, 255, 0.92) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  flex: 0 0 auto !important;
}

#lobby .world-count::before{
  content: "" !important;
  font-size: 10px !important;
  line-height: 1 !important;
  opacity: 0.78 !important;
}

#lobby .world-list::-webkit-scrollbar{
  width: 10px;
}

#lobby .world-list::-webkit-scrollbar-track{
  background: rgba(3, 12, 22, 0.5);
  border-radius: 999px;
}

#lobby .world-list::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(119, 224, 255, 0.85), rgba(37, 108, 198, 0.85));
  border-radius: 999px;
  border: 2px solid rgba(3, 12, 22, 0.55);
}

#lobby .world-list::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, rgba(145, 236, 255, 0.9), rgba(49, 128, 223, 0.9));
}

#lobby .world-empty{
  min-height: 46px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(214, 236, 255, 0.64) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

#lobby .world-list button:hover{
  background: rgba(19, 48, 80, 0.72) !important;
}

#lobby .lobby-news-list{
  display: grid !important;
  gap: 12px !important;
}

#lobby .lobby-news-panel{
  background:
   radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient(
180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
}

#lobby .lobby-news-item{
  display: grid !important;
  grid-template-columns: 50px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 12px 12px 12px 10px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  background:
    linear-gradient(180deg, rgba(10, 31, 58, 0.95), rgba(4, 16, 30, 0.92)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 14px rgba(0,0,0,0.12) !important;
}

#lobby .lobby-news-badge{
  width: 50px !important;
  height: 50px !important;
  margin-top: 0 !important;
  border-radius: 6px !important;
  border: 0 !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-size: 550px 400px !important;
  image-rendering: pixelated !important;
  box-shadow: none !important;
  justify-self: center !important;
}

#lobby .lobby-news-badge--gold{
  background-position: -400px -250px !important;
}

#lobby .lobby-news-badge--violet{
  background-position: -450px -250px !important;
}

#lobby .lobby-news-badge--blue{
  background-position: -500px -250px !important;
}

#lobby .lobby-news-copy{
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  min-width: 0 !important;
}

#lobby .lobby-news-title{
  font-size: 14px !important;
  font-weight: 900 !important;
  color: #ff7700 !important;
  line-height: 1.08 !important;
}

#lobby .lobby-news-text{
  font-size: 12px !important;
  line-height: 1.42 !important;
  color: rgba(214, 236, 255, 0.76) !important;
}

#lobby .lobby-actions-stack{
  display: grid !important;
  gap: 10px !important;
}

#lobby .lobby-event-card{
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 24px !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  background:
  radial-gradient(circle at 18% 10%, rgba(66, 172, 255, 0.10), rgba(66, 172, 255, 0) 30%), radial-gradient(circle at 92% 18%, rgba(255, 192, 76, 0.18), rgba(255, 192, 76, 0) 36%), linear-gradient(180deg, rgb(255 237 0 / 96%), rgb(255 224 0 / 98%)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 12px 22px rgba(0,0,0,0.20) !important;
}

#lobby .lobby-event-image{
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 220px !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: inherit !important;
}

#lobby .lobby-actions-panel{
  background:
 radial-gradient(circle at 14% 0%, rgb(5 6 42), #000000 30%), radial-gradient(circle at 88% 10%, rgb(2 6 29), #160303 26%), linear-gradient( 180deg, rgba(4, 14, 29, 0.98), rgba(1, 7, 16, 0.98)) !important;
}

#lobby .lobby-action-button{
  width: 100% !important;
  min-height: 56px !important;
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(115, 219, 255, 0.14) !important;
  background: linear-gradient(180deg, rgba(12, 33, 58, 0.98), rgba(6, 20, 37, 0.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 14px rgba(0,0,0,0.16) !important;
  color: #f6fbff !important;
  text-align: left !important;
}

#lobby .lobby-action-button:hover{
  transform: translateY(-1px) !important;
  filter: brightness(1.03);
}

#lobby .lobby-action-button:active{
  transform: translateY(0) !important;
}

#lobby .lobby-action-icon{
  width: 50px !important;
  height: 50px !important;
  flex: 0 0 auto !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 8px !important;
  border: 0 !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-size: 550px 400px !important;
  image-rendering: pixelated !important;
  box-shadow: none !important;
}

#lobby .lobby-action-icon-world{
  background-position: -250px -100px !important;
}

#lobby .lobby-action-icon-create{
  background-position: -300px -100px !important;
}

#lobby .lobby-action-icon-shop{
  background-position: -500px -50px !important;
}

#lobby .lobby-action-copy{
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  min-width: 0 !important;
}

#lobby .lobby-action-title{
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: 0.01em !important;
  color: #f8fdff !important;
}

#lobby .lobby-action-sub{
  font-size: 10px !important;
  font-weight: 700 !important;
  color: rgba(219, 243, 255, 0.72) !important;
}

#lobby .lobby-action-button--green{
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.16), transparent 28%),
    linear-gradient(180deg, #34b758 0%, #238642 55%, #135f2b 100%) !important;
  border-color: rgba(107, 235, 137, 0.56) !important;
}

#lobby .lobby-action-button--blue{
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.12), transparent 28%),
    linear-gradient(180deg, #2a89d8 0%, #1c67b8 55%, #114d8c 100%) !important;
  border-color: rgba(113, 196, 255, 0.52) !important;
}

#lobby .lobby-action-button--purple{
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.10), transparent 28%),
    linear-gradient(180deg, #6848b9 0%, #54389f 55%, #3c2978 100%) !important;
  border-color: rgba(173, 140, 255, 0.50) !important;
}

@media (max-width: 1100px){
  #lobby .lobby-card{
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
  }

  #lobby .lobby-topbar{
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  #lobby .lobby-top-left{
    width: 100% !important;
    grid-template-columns: 1fr !important;
    justify-items: start !important;
  }

  #lobby .lobby-brand{
    width: 100% !important;
  }

  #lobby .lobby-utility-row{
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
  }

  #lobby .lobby-stage{
    grid-template-columns: 1fr !important;
  }

  #lobby .lobby-grid{
    grid-template-columns: 1fr !important;
  }

  #lobby .lobby-join{
    grid-template-columns: 1fr !important;
  }

  #lobby .lobby-cta{
    width: 100% !important;
    min-width: 0 !important;
  }

  #lobby .lobby-brand-logo{
    width: min(260px, 60vw) !important;
  }

  #lobby .lobby-player-strip{
    justify-self: start !important;
    margin: 0 !important;
    flex-wrap: wrap !important;
  }

  #lobby .lobby-player-xp-bar{
    width: min(180px, 100%) !important;
  }

  #lobby .lobby-panel{
    min-height: 0 !important;
  }

  #lobby .world-list{
    padding-right: 4px !important;
  }

  #lobby{
    overflow: auto !important;
  }

  #lobby .lobby-worlds-panel{
    height: clamp(220px, 34vh, 340px) !important;
  }
}

@media (max-width: 700px){
  #lobby .lobby-card{
    height: auto !important;
    min-height: 100% !important;
    padding: 12px !important;
    overflow: visible !important;
  }

  #lobby .lobby-topbar{
    gap: 12px !important;
    margin-bottom: 10px !important;
  }

  #lobby .lobby-top-left{
    gap: 12px !important;
  }

  #lobby .lobby-brand-logo{
    width: min(220px, 72vw) !important;
    max-width: 220px !important;
  }

  #lobby .lobby-player-strip{
    min-width: 0 !important;
    width: 100% !important;
    padding: 14px !important;
    gap: 12px !important;
  }

  #lobby .lobby-player-avatar{
    width: 72px !important;
    height: 72px !important;
    border-radius: 18px !important;
  }

  #lobby .lobby-player-name{
    font-size: clamp(18px, 5vw, 24px) !important;
  }

  #lobby .lobby-player-level-row{
    flex-wrap: wrap !important;
  }

  #lobby .lobby-utility-row{
    flex-wrap: wrap !important;
  }

  #lobby .lobby-utility-btn{
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 14px !important;
  }

  #lobby .lobby-utility-btn::before{
    width: 38px !important;
    height: 38px !important;
    background-size: 420px 300px !important;
  }

  #lobby .lobby-action-button{
    min-height: 52px !important;
  }

  #lobby .lobby-action-icon{
    width: 42px !important;
    height: 42px !important;
    background-size: 420px 300px !important;
  }

  #lobby .lobby-event-image{
    min-height: 124px !important;
  }

  #lobby .lobby-worlds-panel{
    height: auto !important;
    max-height: 280px !important;
  }
}

@media (max-width: 860px){
  #craft-modal #craft-panel{
    width: min(96vw, 1100px) !important;
    max-height: calc(100dvh - 20px) !important;
  }

  #craft-modal .craft-layout{
    gap: 8px !important;
  }

  #craft-modal .craft-main-grid{
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  #craft-modal .craft-detail-wrap{
    width: 100% !important;
    max-width: none !important;
  }

  #craft-modal .craft-list-wrap{
    min-width: 0 !important;
  }
}

#lobby .world-count{
  gap: 5px !important;
}

#lobby .world-count::before{
  content: "" !important;
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px !important;
  display: inline-block !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 550px 400px !important;
  background-position: -100px 0 !important;
  image-rendering: pixelated !important;
  opacity: 0.95 !important;
}

#lobby .world-count{
  gap: 5px !important;
}

#lobby .world-count::before{
  content: "" !important;
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px !important;
  display: inline-block !important;
  background-image: url("/photos/icons_tilemap.png") !important;
  background-repeat: no-repeat !important;
  background-size: 132px 96px !important;
  background-position: -24px 0px !important;
  image-rendering: pixelated !important;
  opacity: 0.9 !important;
}

/* Auth refresh: launcher-style login screen. */
#auth{
  background:
    radial-gradient(900px 620px at 18% 12%, rgba(66, 172, 255, 0.34), rgba(66, 172, 255, 0) 60%),
    radial-gradient(780px 560px at 82% 18%, rgba(255, 214, 90, 0.16), rgba(255, 214, 90, 0) 58%),
    radial-gradient(620px 420px at 50% 76%, rgba(17, 137, 255, 0.16), rgba(17, 137, 255, 0) 54%),
    linear-gradient(180deg, rgba(2, 8, 18, 0.58), rgba(2, 8, 18, 0.84)),
    url("/photos/bg.png") center center / cover no-repeat !important;
}

#auth::before{
  width: 430px;
  height: 430px;
  top: 4%;
  left: 6%;
  background: radial-gradient(circle, rgba(66, 172, 255, 0.22), rgba(66, 172, 255, 0) 68%);
  filter: blur(24px);
}

#auth::after{
  width: 520px;
  height: 520px;
  bottom: -6%;
  right: -4%;
  background: radial-gradient(circle, rgba(255, 214, 90, 0.12), rgba(255, 214, 90, 0) 68%);
  filter: blur(30px);
}

#auth .auth-scene{
  filter: saturate(1.05) brightness(1) contrast(1.02);
}

#auth,
#auth button,
#auth input,
#auth textarea,
#auth select,
#auth .auth-brand-title,
#auth .auth-brand-subtitle,
#auth .auth-hero-headline,
#auth .auth-feature-title,
#auth .auth-feature-copy,
#auth .auth-label,
#auth .auth-btn,
#auth .auth-foot-copy,
#auth .auth-top-btn,
#auth .auth-event-badge,
#auth .auth-event-count,
#auth .auth-event-btn,
#auth .auth-connect-label,
#auth .auth-stat-label,
#auth .auth-stat-value{
  font-family: "Segoe UI", Tahoma, Arial, sans-serif !important;
}

#auth .auth-scene-sky{
  background:
    linear-gradient(180deg, rgb(0 124 255 / 55%) 0%, rgb(255 255 255 / 92%) 38%, rgb(183 231 255 / 92%) 100%), url(/photos/bg.png);
  background-size: cover, cover;
  background-position: center center, center center;
  filter: brightness(1.06) saturate(1.04) contrast(1);
}

#auth .auth-scene-tree-far{
  background-image: url("/photos/treebg1.png");
  opacity: 0.72;
}

#auth .auth-scene-tree-near{
  background-image: url("/photos/treebg.png");
  opacity: 0.94;
}

#auth .auth-scene-near{
  height: 28%;
  background:
    linear-gradient(180deg, rgba(3, 10, 18, 0) 0%, rgba(29, 86, 42, 0.12) 18%, rgba(13, 42, 22, 0.30) 100%);
}

#auth .auth-scene-ground{
  height: 22%;
  background:
    linear-gradient(180deg, rgba(4, 16, 29, 0) 0%, rgba(22, 92, 36, 0.20) 26%, rgba(12, 48, 18, 0.50) 100%);
  box-shadow: inset 0 18px 26px rgba(0, 0, 0, 0.14);
}

#auth .auth-shell{
  width: min(1480px, calc(100vw - clamp(20px, 3vw, 40px)));
  max-height: calc(100dvh - clamp(20px, 3vw, 40px));
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 0.82fr) minmax(0, 0.74fr);
  gap: clamp(12px, 1.5vw, 18px);
  align-items: start;
}

#auth .auth-hero-wrap{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#auth .auth-hero-wrap{
  position: relative;
}

#auth .auth-hero-wrap::before{
  content: "";
  position: absolute;
  inset: -12px -10px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 22%, rgba(66, 172, 255, 0.18), rgba(66, 172, 255, 0) 60%),
    radial-gradient(circle at 50% 74%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 72%);
  filter: blur(18px);
  opacity: 0.72;
  pointer-events: none;
  z-index: 0;
}

#auth .auth-hero-wrap > *{
  position: relative;
  z-index: 1;
}

#auth .auth-panel,
#auth .auth-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(126, 223, 255, 0.26);
  border-radius: clamp(20px, 2vw, 28px);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.12), rgba(255,255,255,0) 30%),
    linear-gradient(180deg, rgba(6, 21, 40, 0.88), rgba(3, 13, 26, 0.96));
  box-shadow:
    0 32px 72px rgba(0,0,0,0.50),
    0 0 28px rgba(66, 172, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(66, 172, 255, 0.04) inset;
  backdrop-filter: blur(18px) saturate(1.10);
  -webkit-backdrop-filter: blur(18px) saturate(1.10);
}

#auth .auth-panel,
#auth .auth-card{
  box-shadow:
    0 36px 88px rgba(0,0,0,0.54),
    0 0 34px rgba(66, 172, 255, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(66, 172, 255, 0.04) inset !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
}

#auth .auth-hero{
  justify-content: flex-start;
  gap: clamp(10px, 1.4vw, 14px);
  padding: clamp(16px, 2.1vw, 26px);
  background:
    radial-gradient(circle at 15% 0%, rgba(66, 172, 255, 0.18), rgba(66, 172, 255, 0) 34%),
    radial-gradient(circle at 80% 18%, rgba(255, 214, 90, 0.10), rgba(255, 214, 90, 0) 32%),
    linear-gradient(180deg, rgba(4, 14, 29, 0.94), rgba(3, 11, 22, 0.96));
}

#auth .auth-hero::after,
#auth .auth-card::after,
#auth .auth-rail-card::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.10), rgba(255,255,255,0) 20%),
    linear-gradient(300deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 25%);
  opacity: 0.45;
}

#auth .auth-hero-topline{
  display: none;
}

#auth .auth-live-pill,
#auth .auth-item-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(18, 42, 74, 0.96), rgba(9, 23, 45, 0.96));
  color: rgba(228, 247, 255, 0.92);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#auth .auth-live-pill{
  background: linear-gradient(180deg, rgba(31, 215, 137, 0.96), rgba(10, 138, 84, 0.96));
  color: #effff7;
  box-shadow: 0 12px 24px rgba(0,0,0,0.20);
}

#auth .auth-hero-logo{
  width: min(320px, 78%);
  margin: 0;
  transform: translateX(-2%);
  filter:
    drop-shadow(0 0 16px rgba(66, 172, 255, 0.44))
    drop-shadow(0 0 28px rgba(255, 214, 90, 0.18))
    drop-shadow(0 16px 24px rgba(0,0,0,0.42));
}

#auth .auth-hero-logo-outside{
  width: clamp(220px, 34vw, 470px);
  max-width: 470px;
  align-self: center;
  transform: none;
  filter:
    drop-shadow(0 0 18px rgba(66, 172, 255, 0.48))
    drop-shadow(0 0 26px rgba(255, 214, 90, 0.20))
    drop-shadow(0 14px 22px rgba(0,0,0,0.42));
}

@media (min-width: 1021px){
  #auth .auth-hero-wrap{
    position: relative;
  }

  #auth .auth-hero-logo-outside{
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -100%);
    margin: 0;
    z-index: 2;
  }
}

#auth .auth-hero-copy{
  max-width: none;
  text-align: center;
  margin-top: 4px;
}

#auth .auth-hero-headline{
  font-size: clamp(14px, 1.9vw, 20px);
  line-height: 1.02;
  font-weight: 1000;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f7fdff;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.42),
    0 0 18px rgba(66, 172, 255, 0.16);
}

#auth .auth-feature-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(6px, 1vw, 10px);
}

#auth .auth-feature-card{
  display: flex;
  gap: clamp(8px, 1.1vw, 12px);
  align-items: center;
  padding: clamp(10px, 1.3vw, 14px);
  border-radius: clamp(16px, 1.8vw, 20px);
  border: 1px solid rgba(126, 223, 255, 0.16);
  background:
    radial-gradient(circle at 15% 0%, rgba(66, 172, 255, 0.12), rgba(66, 172, 255, 0) 32%),
    rgba(6, 22, 40, 0.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#auth .auth-feature-icon{
  width: clamp(34px, 3.8vw, 52px);
  height: clamp(34px, 3.8vw, 52px);
  flex: 0 0 clamp(34px, 3.8vw, 52px);
  border-radius: clamp(12px, 1.4vw, 18px);
  position: relative;
  background-image: url("/photos/icons_tilemap.png");
  background-repeat: no-repeat;
  background-size: 550px 500px;
  image-rendering: pixelated;
  box-shadow:
    0 10px 18px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

#auth .auth-feature-icon::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
}

#auth .auth-feature-icon-combat{
  background-position: -349px -130px;
}

#auth .auth-feature-icon-combat::before{
  display: none;
}

#auth .auth-feature-icon-social{
  background-position: -399px -130px;
}

#auth .auth-feature-icon-social::before{
  display: none;
}

#auth .auth-feature-icon-event{
  background-position: -449px -130px;
}

#auth .auth-feature-icon-event::before{
  display: none;
}

#auth .auth-feature-title{
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #f6fdff;
}

#auth .auth-feature-copy{
  margin-top: 3px;
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.45;
  color: rgba(228, 247, 255, 0.82);
}

#auth .auth-feature-grid .auth-feature-card:nth-child(1){
  margin-top: 4px;
}

#auth .auth-connect{
  margin-top: 0;
  display: grid;
  gap: clamp(6px, 1vw, 10px);
}

#auth .auth-connect-title{
  text-align: center;
  color: rgba(173, 237, 255, 0.92);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#auth .auth-connect-row{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, 0.8vw, 8px);
}

#auth .auth-connect-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: clamp(34px, 4vw, 40px);
  border-radius: clamp(10px, 1vw, 12px);
  border: 1px solid rgba(126, 223, 255, 0.16);
  background: linear-gradient(180deg, rgba(18, 42, 74, 0.96), rgba(9, 23, 45, 0.96));
  color: #f6fdff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 10px 20px rgba(0,0,0,0.18);
}

#auth .auth-connect-ico{
  width: 50px;
  height: 50px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 1000;
  color: transparent;
  background-color: transparent;
  background-image: url("/photos/icons_tilemap.png");
  background-repeat: no-repeat;
  background-size: 550px 400px;
  image-rendering: pixelated;
  flex: 0 0 50px;
  background-position: 0 -168px;
}

#auth .auth-connect-discord .auth-connect-ico{
  background-position: 0 -168px;
}

#auth .auth-connect-youtube .auth-connect-ico{
  background-position: -48px -168px;
}

#auth .auth-connect-instagram .auth-connect-ico{
  position: relative;
  background-image: url("/photos/icons_tilemap.png");
  background-position: -50px -300px, 0 0, 0 0;
  background-size: 550px 400px, 100% 100%, 100% 100%;
  border-radius: 14px;
}

#auth .auth-connect-website .auth-connect-ico{
  background-position: -72px -168px;
}

#auth .auth-card{
  padding: clamp(16px, 2.2vw, 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.4vw, 14px);
  width: 100%;
  max-width: clamp(290px, 26vw, 350px);

  background:
    radial-gradient(140% 120% at 20% -8%, rgba(73, 168, 255, 0.12), rgba(73, 168, 255, 0) 44%),
    linear-gradient(180deg, rgba(8, 25, 48, 0.96), rgba(6, 18, 34, 0.98));
  border-radius: 20px;
  border-color: rgba(115, 219, 255, 0.22);
  box-shadow:
    0 24px 54px rgba(0,0,0,0.42),
    0 0 22px rgba(66, 172, 255, 0.09),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(16px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.08) !important;
}

#auth .auth-form{
  gap: clamp(8px, 1vw, 11px);
  margin-top: 4px;
}

#auth .auth-label{
  font-size: clamp(10px, 0.95vw, 12px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 84%);
}

#auth .auth-field{
  min-height: clamp(42px, 4.4vw, 52px);
  border-radius: clamp(12px, 1.4vw, 16px);
  border-color: rgba(126, 223, 255, 0.18);
  background: rgba(6, 21, 40, 0.76);
}

#auth .auth-field input{
  font-size: clamp(13px, 1.1vw, 15px);
}

#auth .auth-forgot-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: -4px;
  margin-bottom: 2px;
}

#auth .auth-remember-row{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(229, 245, 255, 0.92);
  cursor: pointer;
  user-select: none;
}

#auth .auth-remember-row input{
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #41d9ff;
}

#auth .auth-actions{
  gap: 12px;
  margin-top: 6px;
}

#auth .auth-card[data-auth-mode="login"] .auth-actions{
  grid-template-columns: 1fr;
}

#auth .auth-card[data-auth-mode="login"] #register{
  display: none;
}

#auth .auth-btn{
  min-height: clamp(42px, 4.4vw, 52px);
  border-radius: clamp(14px, 1.6vw, 18px);
  font-size: clamp(13px, 1.1vw, 15px);
}

#auth .auth-btn-secondary{
  border: 1px solid rgba(126, 223, 255, 0.22);
}

#auth .auth-msg{
  min-height: clamp(18px, 2vw, 24px);
}

#auth .auth-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2px;
}

#auth .auth-foot-copy{
  color: rgb(255 255 255 / 84%);
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.45;
}

#auth .auth-link-secondary{
  color: rgb(0 199 255 / 92%);
}

#auth .auth-rail{
  display: grid;
  gap: clamp(10px, 1.2vw, 14px);
  align-content: start;
  position: relative;
}

#auth .auth-rail-card{
  padding: clamp(12px, 1.3vw, 16px);
    border: 1px solid rgba(126, 223, 255, 0.26);
  border-radius: clamp(20px, 2vw, 28px);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.12), rgba(255,255,255,0) 30%),
    linear-gradient(180deg, rgba(6, 21, 40, 0.88), rgba(3, 13, 26, 0.96));
  box-shadow:
    0 32px 72px rgba(0,0,0,0.50),
    0 0 26px rgba(66, 172, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(66, 172, 255, 0.04) inset;
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.10);
}

#auth .auth-rail-card{
  box-shadow:
    0 32px 72px rgba(0,0,0,0.50),
    0 0 26px rgba(66, 172, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(66, 172, 255, 0.04) inset !important;
  backdrop-filter: blur(16px) saturate(1.10) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.10) !important;
}

#auth .auth-hero-wrap::before{
  content: none !important;
}

#auth .auth-panel,
#auth .auth-card,
#auth .auth-rail-card{
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#auth .auth-connect-card{
  background:
    linear-gradient(180deg, rgba(6, 21, 40, 0.96), rgba(3, 13, 26, 0.98)) !important;
  border: 1px solid rgba(126, 223, 255, 0.18) !important;
  box-shadow:
    0 20px 42px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

#auth .auth-connect-card::after{
  opacity: 0.18 !important;
}

.auth-rail-card auth-connect-card{
  padding: clamp(12px, 1.3vw, 16px);
    border: 0px solid rgba(126, 223, 255, 0.26);
  border-radius: clamp(20px, 2vw, 28px);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.12), rgba(255,255,255,0) 30%),
    linear-gradient(180deg, rgba(6, 21, 40, 0.88), rgba(3, 13, 26, 0.96));
  box-shadow:
    0 28px 54px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(66, 172, 255, 0.04) inset;
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.10);
}

#auth .auth-scene-sky::after{
  opacity: 0.28;
  filter: blur(1.5px) saturate(0.96) brightness(0.98);
  animation: authBgCloudsDrift 58s ease-in-out infinite alternate;
}


#auth .auth-connect-card{
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#auth .auth-connect-card::after{
  background: transparent;
  opacity: 0;
}

#auth .auth-event-card{
  padding: 0;
  background:
  radial-gradient(circle at 18% 10%, rgba(66, 172, 255, 0.10), rgba(66, 172, 255, 0) 30%), radial-gradient(circle at 92% 18%, rgba(255, 192, 76, 0.18), rgba(255, 192, 76, 0) 36%), linear-gradient(180deg, rgb(255 237 0 / 96%), rgb(255 224 0 / 98%));
}

#auth .auth-event-image{
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(120px, 19vh, 220px);
  object-fit: cover;
  object-position: center center;
  border-radius: inherit;
}

#auth .auth-event-card::after{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(2, 8, 18, 0.08), rgba(2, 8, 18, 0.18));
  opacity: 1;
}

@media (max-width: 1240px){
  #auth .auth-shell{
    grid-template-columns: minmax(280px, 0.94fr) minmax(360px, 1.06fr);
  }

  #auth .auth-rail{
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1020px){
  #auth{
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    overflow: hidden !important;
  }

  #auth .auth-shell{
    width: min(100%, 980px);
    max-height: calc(100dvh - 20px);
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 10px;
    align-items: start;
  }

  #auth .auth-hero-wrap{
    width: 100%;
    gap: 4px;
  }

  #auth .auth-rail{
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
  }

  #auth .auth-hero{
    padding: 12px 13px;
    gap: 7px;
  }

  #auth .auth-hero-logo-outside{
    width: min(260px, 50vw);
    margin: 0 0 -6px 0;
  }

  #auth .auth-card{
    padding: 12px 13px;
    gap: 8px;
  }

  #auth .auth-event-image{
    min-height: 126px;
    height: 126px;
  }
}

@media (min-width: 681px) and (max-width: 1020px){
  #auth{
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    overflow: hidden !important;
  }

  #auth .auth-shell{
    width: min(100%, 980px);
    max-height: calc(100dvh - 20px);
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 10px;
    align-items: start;
  }

  #auth .auth-hero-wrap{
    grid-column: 1;
    grid-row: 1;
    gap: 4px;
  }

  #auth .auth-card{
    grid-column: 1;
    grid-row: 2;
    padding: 12px 13px;
    gap: 8px;
    max-width: none;
  }

  #auth .auth-rail{
    grid-column: 2;
    grid-row: 1 / span 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-content: start;
  }

  #auth .auth-rail-card{
    min-width: 0;
    min-height: 126px;
    height: 126px;
  }

  #auth .auth-event-card{
    grid-column: 1 / -1;
    padding: 0;
  }

  #auth .auth-connect-card{
    grid-column: 1 / -1;
  }

  #auth .auth-hero{
    padding: 12px 13px;
    gap: 7px;
  }

  #auth .auth-hero-logo-outside{
    width: min(260px, 50vw);
    margin: 0 0 -6px 0;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  #auth .auth-feature-card{
    min-width: 0;
    padding: 7px 7px;
    gap: 7px;
    border-radius: 14px;
  }

  #auth .auth-feature-icon{
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 10px;
  }

  #auth .auth-feature-title{
    font-size: 10px;
    line-height: 1.05;
  }

  #auth .auth-feature-copy{
    font-size: 8px;
    line-height: 1.15;
  }

  #auth .auth-connect-title{
    font-size: 10px;
  }

  #auth .auth-connect-row{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  #auth .auth-connect-btn{
    min-height: 30px;
    padding: 0 6px;
    font-size: 9px;
    gap: 3px;
  }

  #auth .auth-connect-btn .auth-connect-ico{
    width: 18px;
    height: 18px;
    font-size: 8px;
  }

  #auth .auth-event-image{
    min-height: 126px;
    height: 126px;
  }
}

@media (max-width: 1020px) and (min-width: 681px) and (orientation: portrait){
  #auth{
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 10px !important;
    overflow: hidden !important;
  }

  #auth .auth-shell{
    width: min(100%, 920px) !important;
    max-height: calc(100dvh - 16px) !important;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr) !important;
    gap: 8px !important;
    align-items: start !important;
  }

  #auth .auth-hero-wrap{
    gap: 3px !important;
  }

  #auth .auth-hero{
    padding: 10px 11px !important;
    gap: 6px !important;
  }

  #auth .auth-hero-logo-outside{
    width: min(230px, 44vw) !important;
    margin: 0 0 -4px 0 !important;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  #auth .auth-feature-card{
    min-width: 0 !important;
    padding: 6px 7px !important;
    gap: 6px !important;
  }

  #auth .auth-feature-icon{
    width: 26px !important;
    height: 26px !important;
    flex-basis: 26px !important;
  }

  #auth .auth-feature-title{
    font-size: 9px !important;
    line-height: 1.02 !important;
  }

  #auth .auth-feature-copy{
    display: none !important;
  }

  #auth .auth-rail{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #auth .auth-rail-card{
    min-width: 0 !important;
    min-height: 116px !important;
    height: 116px !important;
  }

  #auth .auth-event-card,
  #auth .auth-connect-card{
    grid-column: auto !important;
  }

  #auth .auth-connect-row{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  #auth .auth-connect-btn{
    min-height: 30px !important;
    padding: 0 6px !important;
    font-size: 9px !important;
  }

  #auth .auth-item-text{
    display: none !important;
  }
}

@media (min-width: 670px) and (max-width: 700px) and (min-height: 930px) and (max-height: 960px) and (orientation: portrait){
  #auth .auth-rail{
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #auth .auth-rail-card{
    min-height: 0;
    height: auto;
  }

  #auth .auth-event-card,
  #auth .auth-connect-card{
    grid-column: auto;
  }

  #auth .auth-event-image{
    min-height: 112px;
    height: auto;
  }
}

@media (min-width: 660px) and (max-width: 720px) and (min-height: 820px) and (max-height: 980px) and (orientation: portrait){
  #auth{
    align-items: flex-start;
    justify-content: center;
    padding: 8px;
    overflow: hidden !important;
  }

  #auth .auth-shell{
    width: min(100%, 666px);
    max-height: calc(100dvh - 16px);
    grid-template-columns: 1fr;
    gap: 8px;
    align-content: start;
  }

  #auth .auth-hero-wrap{
    gap: 3px;
  }

  #auth .auth-hero{
    padding: 10px 11px;
    gap: 6px;
  }

  #auth .auth-hero-logo-outside{
    width: min(228px, 72vw);
    margin: 0 0 -4px 0;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  #auth .auth-feature-card{
    padding: 7px 6px;
    gap: 6px;
    border-radius: 13px;
  }

  #auth .auth-feature-icon{
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 9px;
  }

  #auth .auth-feature-title{
    font-size: 9px;
    line-height: 1.05;
  }

  #auth .auth-feature-copy{
    display: none;
  }

  #auth .auth-card{
    padding: 10px 11px;
    gap: 7px;
    max-width: none;
  }

  #auth .auth-form{
    gap: 6px;
  }

  #auth .auth-field{
    min-height: 38px;
    border-radius: 12px;
  }

  #auth .auth-btn{
    min-height: 38px;
    border-radius: 12px;
  }

  #auth .auth-rail{
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #auth .auth-rail-card{
    min-width: 0;
    height: auto;
    min-height: 0;
  }

  #auth .auth-event-card,
  #auth .auth-connect-card{
    grid-column: auto;
  }

  #auth .auth-event-image{
    min-height: 108px;
    height: auto;
  }

  #auth .auth-item-title{
    font-size: 11px;
  }

  #auth .auth-item-body{
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 5px;
    margin-top: 5px;
  }

  #auth .auth-item-icon{
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  #auth .auth-item-text{
    font-size: 9px;
    line-height: 1.15;
  }

  #auth .auth-connect-card{
    padding: 8px;
  }

  #auth .auth-connect-title{
    font-size: 9px;
  }

  #auth .auth-connect-row{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  #auth .auth-connect-btn{
    min-height: 28px;
    padding: 0 5px;
    font-size: 8px;
  }
}

@media (max-width: 680px){
  #auth{
    padding: 10px;
    overflow: hidden !important;
  }

  #auth .auth-shell{
    width: 100%;
    max-height: none;
    gap: 10px;
  }

  #auth .auth-hero-wrap{
    gap: 4px;
  }

  #auth .auth-hero-logo-outside{
    width: min(260px, 94%);
    margin: 0 0 -6px 0;
  }

  #auth .auth-hero{
    padding: 14px;
    gap: 10px;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #auth .auth-feature-card{
    padding: 11px;
    gap: 10px;
    border-radius: 16px;
  }

  #auth .auth-feature-icon{
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 14px;
  }

  #auth .auth-feature-title{
    font-size: 13px;
  }

  #auth .auth-feature-copy{
    display: none;
  }

  #auth .auth-card{
    padding: 14px;
    gap: 10px;
    max-width: none;
  }

  #auth .auth-form{
    gap: 9px;
  }

  #auth .auth-label{
    font-size: 11px;
  }

  #auth .auth-field{
    min-height: 46px;
    border-radius: 14px;
  }

  #auth .auth-field input{
    font-size: 14px;
  }

  #auth .auth-forgot-row{
    margin-top: -6px;
    margin-bottom: 0;
  }

  #auth .auth-actions{
    gap: 10px;
    margin-top: 4px;
  }

  #auth .auth-btn{
    min-height: 46px;
    border-radius: 14px;
    font-size: 14px;
  }

  #auth .auth-msg{
    min-height: 18px;
  }

  #auth .auth-foot{
    gap: 8px;
    margin-top: 0;
  }

  #auth .auth-foot-copy{
    font-size: 12px;
    line-height: 1.35;
  }

  #auth .auth-rail{
    gap: 10px;
  }

  #auth .auth-rail-card{
    padding: 12px;
  }

  #auth .auth-event-image{
    min-height: 120px;
  }

  #auth .auth-item-title{
    font-size: 20px;
    margin-top: 4px;
  }

  #auth .auth-item-body{
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
  }

  #auth .auth-item-icon{
    width: 68px;
    height: 68px;
    border-radius: 16px;
    transform: none;
  }

  #auth .auth-connect-title{
    font-size: 11px;
  }

  #auth .auth-connect-row{
    gap: 6px;
  }

  #auth .auth-connect-btn{
    min-height: 36px;
    padding: 0 10px;
    font-size: 11px;
  }

  #auth .auth-foot{
    justify-content: flex-start;
  }

  #auth .auth-connect-card{
    display: block;
  }
}

@media (max-width: 460px){
  #auth{
    padding: 8px;
    overflow: hidden !important;
    align-items: flex-start;
    justify-content: flex-start;
  }

  #auth .auth-shell{
    width: min(100%, 360px);
    max-height: calc(100dvh - 16px);
    gap: 8px;
    margin-inline: auto;
  }

  #auth .auth-hero-wrap{
    gap: 2px;
  }

  #auth .auth-hero-logo-outside{
    width: min(210px, 94%);
    margin: 0 0 -4px 0;
  }

  #auth .auth-hero{
    padding: 10px 11px;
    gap: 6px;
  }

  #auth .auth-hero-headline{
    font-size: 13px;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  #auth .auth-feature-card{
    padding: 7px 8px;
    gap: 7px;
    border-radius: 14px;
  }

  #auth .auth-feature-icon{
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 12px;
  }

  #auth .auth-feature-title{
    font-size: 12px;
  }

  #auth .auth-feature-copy{
    display: none;
  }

  #auth .auth-card{
    padding: 10px 11px;
    gap: 7px;
  }

  #auth .auth-form{
    gap: 6px;
  }

  #auth .auth-label{
    font-size: 10px;
  }

  #auth .auth-field{
    min-height: 38px;
    border-radius: 12px;
  }

  #auth .auth-field input{
    font-size: 13px;
  }

  #auth .auth-forgot-row{
    margin-top: -6px;
    margin-bottom: 0;
  }

  #auth .auth-actions{
    gap: 8px;
    margin-top: 2px;
  }

  #auth .auth-btn{
    min-height: 40px;
    border-radius: 12px;
    font-size: 13px;
  }

  #auth .auth-msg{
    display: block;
    min-height: 16px;
    font-size: 11px;
  }

  #auth .auth-foot{
    margin-top: -2px;
  }

  #auth .auth-foot-copy{
    font-size: 11px;
    line-height: 1.25;
  }

  #auth .auth-rail{
    gap: 8px;
  }

  #auth .auth-rail-card{
    padding: 10px;
  }

  #auth .auth-event-image{
    min-height: 92px;
  }

  #auth .auth-item-title{
    font-size: 16px;
    margin-top: 2px;
  }

  #auth .auth-item-body{
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
  }

  #auth .auth-item-icon{
    width: 48px;
    height: 48px;
    border-radius: 12px;
    transform: none;
  }

  #auth .auth-item-text{
    font-size: 10px;
    line-height: 1.25;
  }

  #auth .auth-item-dots{
    margin-top: 2px;
  }

  #auth .auth-connect-title{
    font-size: 10px;
  }

  #auth .auth-connect-row{
    gap: 5px;
  }

  #auth .auth-connect-btn{
    min-height: 32px;
    padding: 0 8px;
    font-size: 10px;
  }

  #auth .auth-connect-ico{
    width: 20px;
    height: 20px;
    font-size: 9px;
  }
}

@media (max-width: 460px) and (max-height: 915px){
  #auth{
    padding: 6px;
  }

  #auth .auth-shell{
    width: min(100%, 352px);
    max-height: calc(100dvh - 12px);
    gap: 6px;
  }

  #auth .auth-hero-logo-outside{
    width: min(196px, 94%);
    margin: 0 0 -5px 0;
  }

  #auth .auth-hero{
    padding: 9px 10px;
    gap: 5px;
  }

  #auth .auth-hero-headline{
    font-size: 12px;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  #auth .auth-feature-card{
    padding: 6px 7px;
    gap: 6px;
    border-radius: 12px;
  }

  #auth .auth-feature-icon{
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 10px;
  }

  #auth .auth-feature-title{
    font-size: 11px;
  }

  #auth .auth-card{
    padding: 9px 10px;
    gap: 6px;
  }

  #auth .auth-form{
    gap: 5px;
  }

  #auth .auth-label{
    font-size: 9px;
  }

  #auth .auth-field{
    min-height: 36px;
    border-radius: 11px;
  }

  #auth .auth-field input{
    font-size: 12px;
  }

  #auth .auth-actions{
    gap: 6px;
    margin-top: 1px;
  }

  #auth .auth-btn{
    min-height: 36px;
    border-radius: 11px;
    font-size: 12px;
  }

  #auth .auth-foot-copy{
    font-size: 10px;
  }

  #auth .auth-rail{
    gap: 6px;
  }

  #auth .auth-rail-card{
    padding: 8px;
  }

  #auth .auth-event-image{
    min-height: 82px;
  }

  #auth .auth-item-title{
    font-size: 15px;
  }

  #auth .auth-item-body{
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 7px;
  }

  #auth .auth-item-icon{
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }

  #auth .auth-item-text{
    font-size: 9px;
  }

  #auth .auth-connect-title{
    font-size: 9px;
  }

  #auth .auth-connect-row{
    gap: 4px;
  }

  #auth .auth-connect-btn{
    min-height: 30px;
    padding: 0 7px;
    font-size: 9px;
  }

  #auth .auth-connect-ico{
    width: 15px;
    height: 15px;
    font-size: 8px;
  }
}

@media (max-height: 760px) and (orientation: landscape){
  #auth{
    padding: 6px;
    overflow: hidden !important;
    align-items: flex-start;
    justify-content: flex-start;
  }

  #auth .auth-shell{
    width: min(100%, 1380px);
    max-height: calc(100dvh - 12px);
    grid-template-columns: minmax(240px, 0.92fr) minmax(300px, 1.02fr) minmax(220px, 0.74fr);
    gap: 10px;
  }

  #auth .auth-hero-wrap{
    gap: 3px;
  }

  #auth .auth-hero-logo-outside{
    width: min(230px, 92%);
    margin: 0 0 -6px 0;
  }

  #auth .auth-hero{
    padding: 10px 12px;
    gap: 6px;
  }

  #auth .auth-hero-headline{
    font-size: 12px;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  #auth .auth-feature-card{
    min-width: 0;
    padding: 7px 8px;
    gap: 6px;
  }

  #auth .auth-feature-icon{
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 9px;
  }

  #auth .auth-feature-title{
    font-size: 9px;
    line-height: 1.05;
  }

  #auth .auth-feature-copy{
    display: none;
  }

  #auth .auth-card{
    padding: 10px 11px;
    gap: 6px;
  }

  #auth .auth-form{
    gap: 5px;
  }

  #auth .auth-field{
    min-height: 36px;
  }

  #auth .auth-btn{
    min-height: 36px;
  }

  #auth .auth-msg{
    display: block;
  }

  #auth .auth-rail{
    gap: 8px;
  }

  #auth .auth-rail-card{
    padding: 8px;
  }

  #auth .auth-event-image{
    min-height: 80px;
  }

  #auth .auth-item-body{
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
  }

  #auth .auth-item-icon{
    width: 46px;
    height: 46px;
    border-radius: 11px;
  }

  #auth .auth-item-copy{
    gap: 4px;
  }

  #auth .auth-item-text{
    font-size: 10px;
    line-height: 1.2;
  }

  #auth .auth-connect-card{
    display: block;
  }
}

/* Responsive overrides for phones and tablets. Keep these last so they win. */
@media (max-width: 1100px){
  #lobby{
    overflow: hidden !important;
  }

  #lobby .lobby-card{
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: clamp(10px, 1.8vw, 16px) !important;
  }

  #lobby .lobby-topbar{
    flex: 0 0 auto !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
    align-items: flex-start !important;
  }

  #lobby .lobby-stage{
    flex: 1 1 auto !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr) !important;
    gap: 10px !important;
  }

  #lobby .lobby-stage-right{
    display: block !important;
  }

  #lobby .lobby-grid{
    gap: 10px !important;
  }

  #lobby .lobby-join{
    width: 100% !important;
    max-width: 660px !important;
    padding: 12px 14px 11px !important;
    gap: 10px !important;
  }

  #lobby .lobby-worlds-panel{
    height: min(30vh, 300px) !important;
  }
}

@media (max-width: 980px){
  #auth{
    padding: 10px !important;
    overflow: hidden !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  #auth .auth-shell{
    width: min(100%, 760px) !important;
    max-height: calc(100dvh - 20px) !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #auth .auth-rail{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #auth .auth-hero-wrap{
    gap: 4px !important;
  }

  #auth .auth-hero-logo-outside{
    width: min(240px, 62vw) !important;
    margin-bottom: -2px !important;
  }

  #auth .auth-hero{
    padding: 12px !important;
    gap: 8px !important;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #auth .auth-feature-card{
    padding: 10px !important;
  }

  #auth .auth-feature-copy{
    display: none !important;
  }

  #auth .auth-card{
    padding: 12px !important;
    gap: 8px !important;
  }

  #auth .auth-form{
    gap: 7px !important;
  }

  #auth .auth-field{
    min-height: 42px !important;
  }

  #auth .auth-btn{
    min-height: 42px !important;
  }

  #lobby{
    overflow: hidden !important;
  }

  #lobby .lobby-card{
    padding: 12px !important;
  }

  #lobby .lobby-topbar{
    align-items: stretch !important;
    flex-direction: column !important;
  }

  #lobby .lobby-top-left{
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #lobby .lobby-brand{
    justify-content: center !important;
  }

  #lobby .lobby-brand-logo{
    width: min(250px, 70vw) !important;
  }

  #lobby .lobby-player-strip{
    width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
    margin: 0 !important;
  }

  #lobby .lobby-utility-row{
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  #lobby .lobby-stage{
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #lobby .lobby-stage-right{
    display: none !important;
  }

  #lobby .lobby-news-panel{
    display: none !important;
  }

  #lobby .lobby-actions-panel,
  #lobby .lobby-worlds-panel{
    min-height: 0 !important;
  }

  #lobby .lobby-grid{
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-top: 0 !important;
  }

  #lobby .lobby-worlds-panel:not(:first-child){
    display: flex !important;
  }

  #lobby .lobby-worlds-panel{
    width: 100% !important;
    height: min(26vh, 240px) !important;
  }

  #lobby .lobby-join{
    max-width: none !important;
  }
}

@media (max-width: 700px), (max-height: 760px) and (orientation: landscape){
  #auth{
    padding: 8px !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  #auth .auth-shell{
    width: min(100%, 540px) !important;
    max-height: calc(100dvh - 16px) !important;
    height: calc(100dvh - 16px) !important;
    gap: 8px !important;
  }

  #auth .auth-hero{
    padding: 10px !important;
    gap: 6px !important;
  }

  #auth .auth-hero-logo-outside{
    width: min(210px, 70vw) !important;
  }

  #auth .auth-hero-headline{
    font-size: 13px !important;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #auth .auth-feature-card{
    padding: 8px !important;
  }

  #auth .auth-card{
    padding: 10px !important;
    gap: 6px !important;
  }

  #auth .auth-form{
    gap: 5px !important;
  }

  #auth .auth-label{
    font-size: 10px !important;
  }

  #auth .auth-field{
    min-height: 38px !important;
    border-radius: 12px !important;
  }

  #auth .auth-field input{
    font-size: 13px !important;
  }

  #auth .auth-actions{
    gap: 6px !important;
  }

  #auth .auth-btn{
    min-height: 38px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
  }

  #auth .auth-foot-copy{
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  #lobby .lobby-card{
    padding: 10px !important;
  }

  #lobby .lobby-topbar{
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  #lobby .lobby-brand-logo{
    width: min(210px, 76vw) !important;
  }

  #lobby .lobby-player-strip{
    padding: 12px !important;
    gap: 10px !important;
  }

  #lobby .lobby-player-avatar{
    width: 60px !important;
    height: 60px !important;
    border-radius: 16px !important;
  }

  #lobby .lobby-player-name{
    font-size: clamp(16px, 4.8vw, 22px) !important;
  }

  #lobby .lobby-player-level-row{
    gap: 6px !important;
  }

  #lobby .lobby-utility-btn{
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
  }

  #lobby .lobby-utility-btn::before{
    width: 34px !important;
    height: 34px !important;
    background-size: 380px 276px !important;
  }

  #lobby .lobby-stage{
    gap: 8px !important;
  }

  #lobby .lobby-stage-right,
  #lobby .lobby-news-panel{
    display: none !important;
  }

  #lobby .lobby-actions-stack{
    gap: 8px !important;
  }

  #lobby .lobby-action-button{
    min-height: 48px !important;
    padding: 8px 10px !important;
  }

  #lobby .lobby-action-icon{
    width: 36px !important;
    height: 36px !important;
    background-size: 380px 276px !important;
  }

  #lobby .lobby-action-title{
    font-size: 14px !important;
  }

  #lobby .lobby-action-sub{
    font-size: 9px !important;
  }

  #lobby .lobby-join{
    padding: 10px 12px 9px !important;
    gap: 8px !important;
  }

  #lobby .lobby-join-title{
    font-size: clamp(15px, 4.4vw, 20px) !important;
  }

  #lobby .lobby-field input,
  #lobby button#joinWorld.lobby-cta{
    min-height: 48px !important;
    border-radius: 14px !important;
  }

  #lobby .lobby-grid{
    gap: 6px !important;
  }

  #lobby .lobby-worlds-panel{
    height: min(22vh, 180px) !important;
  }

  #lobby .world-list{
    gap: 6px !important;
  }

  #lobby .world-list li{
    min-height: 42px !important;
  }

  #lobby .world-list button,
  #lobby .world-list .join-world-btn{
    min-height: 42px !important;
  }
}

@media (max-width: 1100px) and (max-height: 900px){
  #auth{
    padding: 8px !important;
  }

  #auth .auth-shell{
    width: min(100%, 720px) !important;
    max-height: calc(100dvh - 16px) !important;
    gap: 8px !important;
  }

  #auth .auth-hero{
    padding: 10px !important;
    gap: 6px !important;
  }

  #auth .auth-hero-logo-outside{
    width: min(220px, 58vw) !important;
  }

  #auth .auth-hero-headline{
    font-size: 13px !important;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #auth .auth-feature-card{
    padding: 8px !important;
  }

  #auth .auth-card{
    padding: 10px !important;
    gap: 6px !important;
  }

  #auth .auth-form{
    gap: 5px !important;
  }

  #auth .auth-field{
    min-height: 36px !important;
  }

  #auth .auth-btn{
    min-height: 36px !important;
  }

  #auth .auth-foot-copy{
    font-size: 10px !important;
  }

  #lobby{
    overflow: hidden !important;
  }

  #lobby .lobby-card{
    padding: 10px !important;
  }

  #lobby .lobby-topbar{
    gap: 8px !important;
    margin-bottom: 6px !important;
  }

  #lobby .lobby-brand-logo{
    width: min(210px, 64vw) !important;
  }

  #lobby .lobby-player-strip{
    padding: 12px !important;
  }

  #lobby .lobby-player-avatar{
    width: 64px !important;
    height: 64px !important;
  }

  #lobby .lobby-utility-row{
    gap: 6px !important;
  }

  #lobby .lobby-utility-btn{
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  #lobby .lobby-stage{
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #lobby .lobby-stage-right,
  #lobby .lobby-news-panel{
    display: none !important;
  }

  #lobby .lobby-actions-stack{
    gap: 6px !important;
  }

  #lobby .lobby-action-button{
    min-height: 46px !important;
    padding: 8px 10px !important;
  }

  #lobby .lobby-action-icon{
    width: 34px !important;
    height: 34px !important;
  }

  #lobby .lobby-join{
    padding: 10px 12px 9px !important;
    gap: 8px !important;
  }

  #lobby .lobby-join-title{
    font-size: clamp(14px, 3.8vw, 18px) !important;
  }

  #lobby .lobby-grid{
    gap: 6px !important;
  }

  #lobby .lobby-worlds-panel{
    height: min(20vh, 170px) !important;
  }

  #lobby .lobby-worlds-panel:not(:first-child){
    display: none !important;
  }

  #lobby .world-list li{
    min-height: 38px !important;
  }

  #lobby .world-list button,
  #lobby .world-list .join-world-btn{
    min-height: 38px !important;
  }
}

@media (max-width: 700px), (max-height: 760px) and (orientation: portrait){
  #auth{
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }

  #auth .auth-shell{
    width: min(100%, 380px) !important;
    max-height: calc(100dvh - 24px) !important;
    height: calc(100dvh - 24px) !important;
    margin-inline: auto !important;
  }

  #auth .auth-hero-wrap{
    gap: 2px !important;
  }

  #auth .auth-hero-logo-outside{
    width: min(220px, 72vw) !important;
    margin-bottom: -2px !important;
  }

  #auth .auth-hero{
    padding: 10px 11px !important;
    gap: 6px !important;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  #auth .auth-feature-card{
    padding: 7px 8px !important;
  }

  #auth .auth-card{
    padding: 10px 11px !important;
    gap: 7px !important;
  }

  #auth .auth-form{
    gap: 6px !important;
  }

  #auth .auth-foot{
    margin-top: -2px !important;
  }
}

@media (max-width: 1020px){
  #auth{
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 10px !important;
  }

  #auth .auth-shell{
    width: min(calc(100% - 6px), 920px) !important;
    max-height: calc(100dvh - 20px) !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 0 8px 0 2px !important;
    margin-inline: auto !important;
    align-content: start !important;
    box-sizing: border-box !important;
  }

  #auth .auth-panel,
  #auth .auth-hero-wrap,
  #auth .auth-card,
  #auth .auth-rail-card{
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }

  #auth .auth-rail{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  #auth .auth-event-card,
  #auth .auth-connect-card{
    grid-column: 1 / -1 !important;
  }

  #auth .auth-connect-card{
    display: block !important;
  }
}

@media (max-width: 680px){
  #auth{
    padding: 8px !important;
  }

  #auth .auth-shell{
    width: min(calc(100% - 4px), 420px) !important;
    max-height: calc(100dvh - 16px) !important;
    gap: 10px !important;
    padding-inline: 2px 8px !important;
  }

  #auth .auth-hero-logo-outside{
    width: min(240px, 78vw) !important;
    margin: 0 0 -2px 0 !important;
  }

  #auth .auth-hero{
    padding: 12px !important;
    gap: 8px !important;
  }

  #auth .auth-hero-headline{
    font-size: 13px !important;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #auth .auth-feature-card{
    padding: 9px !important;
    gap: 8px !important;
  }

  #auth .auth-feature-copy{
    display: none !important;
  }

  #auth .auth-card{
    padding: 12px !important;
    gap: 8px !important;
  }

  #auth .auth-form{
    gap: 7px !important;
  }

  #auth .auth-field{
    min-height: 42px !important;
  }

  #auth .auth-btn{
    min-height: 42px !important;
  }

  #auth .auth-rail{
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #auth .auth-event-card,
  #auth .auth-connect-card{
    grid-column: auto !important;
  }

  #auth .auth-rail-card{
    padding: 10px !important;
  }

  #auth .auth-event-image{
    min-height: 100px !important;
  }

  #auth .auth-item-body{
    grid-template-columns: 56px minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  #auth .auth-item-icon{
    width: 56px !important;
    height: 56px !important;
    transform: none !important;
  }

  #auth .auth-connect-card{
    display: block !important;
  }
}

@media (max-width: 980px){
  #lobby{
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    align-items: flex-start !important;
    padding: 0 !important;
  }

  #lobby .lobby-card{
    min-height: 100dvh !important;
    height: 100dvh !important;
    overflow: hidden !important;
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #lobby .lobby-topbar{
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  #lobby .lobby-top-left{
    grid-template-columns: minmax(210px, auto) minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
  }

  #lobby .lobby-brand{
    justify-content: flex-start !important;
  }

  #lobby .lobby-brand-logo{
    width: min(210px, 26vw) !important;
    max-width: 240px !important;
  }

  #lobby .lobby-player-strip{
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    justify-self: stretch !important;
  }

  #lobby .lobby-utility-row{
    width: auto !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
  }

  #lobby .lobby-stage{
    flex: 1 1 auto !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #lobby .lobby-stage-left,
  #lobby .lobby-stage-center,
  #lobby .lobby-stage-right{
    gap: 10px !important;
    min-height: 0 !important;
  }

  #lobby .lobby-stage-right{
    display: block !important;
  }

  #lobby .lobby-news-panel{
    display: block !important;
  }

  #lobby .lobby-stage-left{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: start !important;
  }

  #lobby .lobby-join{
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 1fr !important;
  }

  #lobby button#joinWorld.lobby-cta{
    width: 100% !important;
    min-width: 0 !important;
  }

  #lobby .lobby-grid{
    min-height: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  #lobby .lobby-worlds-panel{
    display: flex !important;
    height: clamp(180px, 28vh, 240px) !important;
    max-height: none !important;
  }

  #lobby .lobby-worlds-panel:not(:first-child){
    display: flex !important;
  }

  #lobby .lobby-event-image{
    min-height: 150px !important;
  }

  #lobby .lobby-news-panel{
    min-width: 0 !important;
  }

  #lobby .lobby-actions-panel{
    min-width: 0 !important;
  }

  #lobby .lobby-news-list{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #lobby .lobby-news-item{
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 8px 8px 8px 7px !important;
  }

  #lobby .lobby-news-badge{
    width: 30px !important;
    height: 30px !important;
    background-size: 380px 276px !important;
  }

  #lobby .lobby-news-text{
    display: none !important;
  }

  #lobby .lobby-actions-stack{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #lobby .lobby-action-button{
    min-height: 60px !important;
    padding: 8px 8px !important;
    gap: 6px !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #lobby .lobby-action-icon{
    width: 30px !important;
    height: 30px !important;
  }

  #lobby .lobby-action-sub{
    display: none !important;
  }

  #lobby .lobby-action-copy{
    align-items: center !important;
  }

  #lobby .lobby-panel-title{
    font-size: 11px !important;
    margin-bottom: 8px !important;
  }
}

@media (max-width: 700px){
  #lobby .lobby-card{
    padding: 10px !important;
  }

  #lobby .lobby-topbar{
    gap: 6px !important;
    margin-bottom: 6px !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  #lobby .lobby-top-left{
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  #lobby .lobby-brand{
    width: auto !important;
    flex: 0 0 auto !important;
  }

  #lobby .lobby-brand-logo{
    width: min(132px, 36vw) !important;
    max-width: 132px !important;
  }

  #lobby .lobby-player-strip{
    width: min(100%, 190px) !important;
    min-width: 0 !important;
    flex: 0 1 190px !important;
    padding: 6px !important;
    gap: 6px !important;
    border-radius: 12px !important;
    align-self: center !important;
  }

  #lobby .lobby-player-avatar{
    width: 42px !important;
    height: 42px !important;
    border-radius: 11px !important;
  }

  #lobby .lobby-player-name{
    font-size: clamp(12px, 4vw, 15px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  #lobby .lobby-player-level-row{
    flex-wrap: nowrap !important;
    gap: 3px !important;
    white-space: nowrap !important;
  }

  #lobby .lobby-player-xp-bar{
    width: min(82px, 100%) !important;
  }

  #lobby .lobby-player-coins{
    font-size: 10px !important;
  }

  #lobby .lobby-utility-row{
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    align-self: flex-start !important;
    flex: 0 0 auto !important;
  }

  #lobby .lobby-utility-btn{
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 9px !important;
  }

  #lobby .lobby-utility-btn::before{
    width: 22px !important;
    height: 22px !important;
    background-size: 330px 240px !important;
  }

  #lobby .lobby-panel{
    padding: 10px !important;
    border-radius: 18px !important;
  }

  #lobby .lobby-panel-title{
    margin: 0 0 8px !important;
    font-size: 12px !important;
  }

  #lobby .lobby-news-list{
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px !important;
  }

  #lobby .lobby-news-item{
    flex: 0 0 min(78vw, 220px) !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 9px !important;
    border-radius: 14px !important;
  }

  #lobby .lobby-news-badge{
    width: 42px !important;
    height: 42px !important;
    background-size: 460px 334px !important;
  }

  #lobby .lobby-news-title{
    font-size: 13px !important;
  }

  #lobby .lobby-news-text{
    font-size: 11px !important;
    line-height: 1.28 !important;
  }

  #lobby .lobby-stage{
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #lobby .lobby-news-panel{
    display: block !important;
  }

  #lobby .lobby-actions-panel{
    min-height: 0 !important;
  }

  #lobby .lobby-join{
    padding: 10px !important;
    gap: 8px !important;
    border-radius: 18px !important;
  }

  #lobby .lobby-join-title{
    font-size: 15px !important;
    line-height: 1.15 !important;
  }

  #lobby .lobby-field input,
  #lobby button#joinWorld.lobby-cta{
    min-height: 46px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
  }

  #lobby .lobby-hint{
    margin-top: 4px !important;
    min-height: 16px !important;
    font-size: 11px !important;
  }

  #lobby .lobby-grid{
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #lobby .lobby-worlds-panel:not(:first-child){
    display: flex !important;
  }

  #lobby .lobby-worlds-panel{
    width: 100% !important;
    height: 160px !important;
  }

  #lobby .world-list{
    gap: 6px !important;
    padding-right: 6px !important;
  }

  #lobby .world-list li{
    min-height: 42px !important;
  }

  #lobby .world-list button,
  #lobby .world-list .join-world-btn{
    min-height: 44px !important;
    grid-template-columns: 32px minmax(0, 1fr) auto !important;
    gap: 6px !important;
    padding: 5px 7px 5px 5px !important;
  }

  #lobby .world-thumb{
    width: 32px !important;
    height: 32px !important;
  }

  #lobby .world-name{
    font-size: 11px !important;
  }

  #lobby .world-count{
    min-width: 26px !important;
    height: 22px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
  }

  #lobby .lobby-actions-stack{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #lobby .lobby-action-button--green{
    grid-column: 1 / -1 !important;
  }

  #lobby .lobby-action-button{
    min-height: 44px !important;
    padding: 8px 8px !important;
    gap: 6px !important;
    border-radius: 11px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #lobby .lobby-action-icon{
    width: 30px !important;
    height: 30px !important;
    background-size: 330px 240px !important;
  }

  #lobby .lobby-action-title{
    font-size: 11px !important;
  }

  #lobby .lobby-action-sub{
    font-size: 8px !important;
    line-height: 1.05 !important;
  }

  #lobby .lobby-event-image{
    min-height: 118px !important;
  }
}

@media (max-width: 700px) and (orientation: portrait){
  #auth .auth-feature-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  #auth .auth-feature-card{
    min-width: 0 !important;
    padding: 7px 6px !important;
    gap: 6px !important;
    align-items: center !important;
  }

  #auth .auth-feature-icon{
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    border-radius: 9px !important;
  }

  #auth .auth-feature-title{
    font-size: 10px !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
  }

  #auth .auth-feature-copy{
    display: none !important;
  }

  #lobby{
    overflow: hidden !important;
  }

  #lobby .lobby-card{
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: 8px !important;
    overflow: hidden !important;
  }

  #lobby .lobby-topbar{
    margin-bottom: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
  }

  #lobby .lobby-top-left{
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
  }

  #lobby .lobby-brand-logo{
    width: min(126px, 34vw) !important;
  }

  #lobby .lobby-player-strip{
    width: min(100%, 176px) !important;
    flex: 0 1 176px !important;
    padding: 5px !important;
    gap: 5px !important;
    border-radius: 11px !important;
    align-self: center !important;
  }

  #lobby .lobby-player-avatar{
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    overflow: visible !important;
  }

  #lobby .lobby-player-avatar-stage{
    transform: none !important;
  }

  #lobby .lobby-player-name{
    font-size: clamp(11px, 3.8vw, 14px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  #lobby .lobby-player-level-row{
    gap: 2px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }

  #lobby .lobby-player-xp-bar{
    width: min(72px, 100%) !important;
    height: 6px !important;
  }

  #lobby .lobby-player-coins{
    font-size: 10px !important;
  }

  #lobby .lobby-utility-row{
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 4px !important;
    flex: 0 0 auto !important;
  }

  #lobby .lobby-utility-btn{
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    border-radius: 9px !important;
  }

  #lobby .lobby-utility-btn::before{
    width: 20px !important;
    height: 20px !important;
    background-size: 320px 232px !important;
  }

  #lobby .lobby-stage{
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  #lobby .lobby-news-panel{
    display: block !important;
  }

  #lobby .lobby-stage-left{
    gap: 6px !important;
  }

  #lobby .lobby-news-list{
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px !important;
  }

  #lobby .lobby-news-item{
    flex: 0 0 min(80vw, 210px) !important;
  }

  #lobby .lobby-news-title{
    font-size: clamp(10px, 3vw, 11px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
  }

  #lobby .lobby-news-text{
    display: none !important;
  }

  #lobby .lobby-actions-stack{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #lobby .lobby-action-button--green{
    grid-column: 1 / -1 !important;
  }

  #lobby .lobby-action-button{
    min-height: 40px !important;
    padding: 6px 7px !important;
    gap: 5px !important;
    border-radius: 10px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #lobby .lobby-action-icon{
    width: 28px !important;
    height: 28px !important;
    background-size: 320px 232px !important;
  }

  #lobby .lobby-action-title{
    font-size: 10px !important;
  }

  #lobby .lobby-action-sub{
    display: none !important;
  }

  #lobby .lobby-join{
    padding: 8px !important;
    gap: 6px !important;
    border-radius: 14px !important;
  }

  #lobby .lobby-join-title{
    font-size: clamp(13px, 3.8vw, 15px) !important;
    line-height: 1.1 !important;
  }

  #lobby .lobby-field input,
  #lobby button#joinWorld.lobby-cta{
    min-height: 40px !important;
    border-radius: 11px !important;
    font-size: 13px !important;
  }

  #lobby .lobby-hint{
    margin-top: 2px !important;
    min-height: 14px !important;
    font-size: 10px !important;
  }

  #lobby .lobby-grid{
    gap: 6px !important;
  }

  #lobby .lobby-worlds-panel{
    width: 100% !important;
    height: min(21vh, 150px) !important;
  }

  #lobby .world-list{
    gap: 5px !important;
    padding-right: 4px !important;
  }

  #lobby .world-list li{
    min-height: 38px !important;
  }

  #lobby .world-list button,
  #lobby .world-list .join-world-btn{
    min-height: 38px !important;
    grid-template-columns: 30px minmax(0, 1fr) auto !important;
    gap: 6px !important;
    padding: 5px 6px 5px 5px !important;
  }

  #lobby .world-thumb{
    width: 30px !important;
    height: 30px !important;
  }

  #lobby .world-name{
    font-size: 10px !important;
  }

  #lobby .world-count{
    min-width: 24px !important;
    height: 20px !important;
    padding: 0 6px !important;
    font-size: 9px !important;
  }

}

@media (max-width: 430px) and (orientation: portrait){
  #lobby .lobby-card{
    padding: 6px !important;
    gap: 5px !important;
  }

  #lobby .lobby-topbar{
    gap: 6px !important;
    flex-direction: row !important;
    align-items: flex-start !important;
  }

  #lobby .lobby-brand-logo{
    width: min(168px, 64vw) !important;
  }

  #lobby .lobby-player-strip{
    width: min(100%, 320px) !important;
    flex: 0 1 320px !important;
    padding: 9px !important;
    gap: 8px !important;
    border-radius: 14px !important;
    align-self: center !important;
  }

  #lobby .lobby-player-avatar{
    width: 52px !important;
    height: 52px !important;
    border-radius: 13px !important;
  }

  #lobby .lobby-player-name{
    font-size: clamp(15px, 4.6vw, 18px) !important;
  }

  #lobby .lobby-player-level-row{
    gap: 3px !important;
  }

  #lobby .lobby-player-xp-bar{
    width: min(104px, 100%) !important;
    height: 7px !important;
  }

  #lobby .lobby-player-coins{
    font-size: 11px !important;
    gap: 5px !important;
  }

  #lobby .lobby-utility-row{
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 5px !important;
    flex: 0 0 auto !important;
  }

  #lobby .lobby-utility-btn{
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 10px !important;
  }

  #lobby .lobby-utility-btn::before{
    width: 30px !important;
    height: 30px !important;
    background-size: 330px 240px !important;
  }

  #lobby .lobby-stage{
    gap: 6px !important;
  }

  #lobby .lobby-actions-stack{
    gap: 6px !important;
  }

  #lobby .lobby-action-button{
    min-height: 42px !important;
    padding: 7px 9px !important;
    border-radius: 10px !important;
  }

  #lobby .lobby-action-icon{
    width: 32px !important;
    height: 32px !important;
    background-size: 330px 240px !important;
  }

  #lobby .lobby-action-title{
    font-size: 12px !important;
  }

  #lobby .lobby-action-sub{
    font-size: 8px !important;
  }

  #lobby .lobby-join{
    padding: 8px !important;
    gap: 6px !important;
    border-radius: 14px !important;
  }

  #lobby .lobby-join-title{
    font-size: clamp(13px, 4vw, 15px) !important;
  }

  #lobby .lobby-field input,
  #lobby button#joinWorld.lobby-cta{
    min-height: 40px !important;
    border-radius: 11px !important;
    font-size: 12px !important;
  }

  #lobby .lobby-hint{
    min-height: 12px !important;
    font-size: 9px !important;
  }

  #lobby .lobby-grid{
    gap: 5px !important;
  }

  #lobby .lobby-worlds-panel{
    height: min(22vh, 150px) !important;
  }

  #lobby .lobby-panel{
    padding: 8px !important;
    border-radius: 14px !important;
  }

  #lobby .lobby-panel-title{
    margin-bottom: 6px !important;
    font-size: 11px !important;
  }

  #lobby .world-list{
    gap: 5px !important;
  }

  #lobby .world-list li{
    min-height: 36px !important;
  }

  #lobby .world-list button,
  #lobby .world-list .join-world-btn{
    min-height: 36px !important;
    grid-template-columns: 28px minmax(0, 1fr) auto !important;
    gap: 5px !important;
    padding: 4px 6px 4px 4px !important;
  }

  #lobby .world-thumb{
    width: 28px !important;
    height: 28px !important;
  }

  #lobby .world-name{
    font-size: 10px !important;
  }

#lobby .world-count{
  min-width: 22px !important;
  height: 18px !important;
  padding: 0 5px !important;
  font-size: 8px !important;
  }
}

@media (max-width: 700px) and (orientation: portrait){
  #lobby{
    overflow: hidden !important;
  }

  #lobby .lobby-card{
    height: 100dvh !important;
    min-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    overflow: hidden !important;
    padding: 8px !important;
  }

  #lobby .lobby-topbar{
    flex: 0 0 auto !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    margin-bottom: 8px !important;
    padding: 8px 10px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(115, 219, 255, 0.14) !important;
    background:
      radial-gradient(circle at 12% 0%, rgba(44, 149, 255, 0.18), transparent 42%),
      radial-gradient(circle at 88% 0%, rgba(76, 208, 255, 0.12), transparent 40%),
      linear-gradient(180deg, rgba(4, 17, 35, 0.88), rgba(4, 13, 25, 0.78)) !important;
    backdrop-filter: blur(10px) saturate(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.05);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.05),
      0 10px 22px rgba(0,0,0,0.16) !important;
  }

  #lobby .lobby-stage{
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    scroll-snap-type: none !important;
    padding-bottom: 0 !important;
    -webkit-overflow-scrolling: touch;
  }

  #lobby .lobby-stage-left,
  #lobby .lobby-stage-center{
    flex: 0 0 auto !important;
    min-height: 0 !important;
    scroll-snap-align: none !important;
    align-content: start !important;
  }

  #lobby .lobby-stage-left{
    display: grid !important;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) !important;
    gap: 6px !important;
  }

  #lobby .lobby-stage-right{
    display: none !important;
  }

  #lobby .lobby-stage-left{
    gap: 6px !important;
  }

  #lobby .lobby-stage-center{
    gap: 6px !important;
  }

  #lobby .lobby-panel{
    backdrop-filter: blur(8px) saturate(1.04);
    -webkit-backdrop-filter: blur(8px) saturate(1.04);
    padding: 8px !important;
    border-radius: 16px !important;
  }

  #lobby .lobby-join{
    margin-top: 0 !important;
  }

  #lobby .lobby-grid{
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  #lobby .lobby-worlds-panel{
    width: 100% !important;
    height: min(18vh, 156px) !important;
    max-height: none !important;
  }

  #lobby .lobby-worlds-panel:not(:first-child){
    display: flex !important;
  }

  #lobby .lobby-news-panel{
    order: 1 !important;
  }

  #lobby .lobby-actions-panel{
    order: 2 !important;
  }

  #lobby .lobby-join{
    order: 1 !important;
  }

  #lobby .lobby-grid{
    order: 2 !important;
  }

  #lobby .lobby-news-panel{
    min-width: 0 !important;
  }

  #lobby .lobby-actions-panel{
    min-width: 0 !important;
    min-height: 0 !important;
  }

  #lobby .lobby-news-list{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
  }

  #lobby .lobby-news-item{
    flex: 0 0 auto !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 6px 7px !important;
    border-radius: 12px !important;
  }

  #lobby .lobby-news-title{
    font-size: clamp(9px, 2.8vw, 10px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
  }

  #lobby .lobby-news-text{
    display: none !important;
  }

  #lobby .lobby-actions-stack{
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }

  #lobby .lobby-action-button--green{
    grid-column: auto !important;
  }

  #lobby .lobby-action-button{
    min-height: 32px !important;
    padding: 5px 7px !important;
    gap: 4px !important;
    border-radius: 9px !important;
  }

  #lobby .lobby-action-icon{
    width: 24px !important;
    height: 24px !important;
    background-size: 320px 232px !important;
  }

  #lobby .lobby-action-title{
    font-size: 9px !important;
  }

  #lobby .lobby-action-sub{
    display: none !important;
  }

  #lobby .lobby-news-panel .lobby-panel-title,
  #lobby .lobby-actions-panel .lobby-panel-title{
    margin-bottom: 6px !important;
    font-size: 11px !important;
  }

  #lobby .lobby-online-count{
    display: none !important;
  }

  #lobby .lobby-hint{
    min-height: 12px !important;
    margin-top: 2px !important;
  }
}

@media (min-width: 981px) and (max-width: 1100px){
  #lobby{
    overflow: hidden !important;
  }

  #lobby .lobby-card{
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: clamp(10px, 1.4vw, 16px) !important;
  }

  #lobby .lobby-topbar{
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 10px !important;
  }

  #lobby .lobby-top-left{
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
  }

  #lobby .lobby-brand-logo{
    width: min(240px, 24vw) !important;
    max-width: 240px !important;
  }

  #lobby .lobby-player-strip{
    padding: 14px 16px !important;
    gap: 12px !important;
  }

  #lobby .lobby-player-avatar{
    width: 84px !important;
    height: 84px !important;
  }

  #lobby .lobby-player-name{
    font-size: clamp(16px, 2vw, 20px) !important;
  }

  #lobby .lobby-utility-row{
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
  }

  #lobby .lobby-stage{
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.18fr) minmax(0, 0.86fr) !important;
    gap: 10px !important;
    align-items: start !important;
  }

  #lobby .lobby-stage-left{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  #lobby .lobby-stage-center{
    justify-items: stretch !important;
  }

  #lobby .lobby-grid{
    gap: 10px !important;
  }

  #lobby .lobby-panel{
    padding: 10px !important;
  }

  #lobby .lobby-news-item{
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 10px 10px 10px 8px !important;
  }

  #lobby .lobby-news-badge{
    width: 40px !important;
    height: 40px !important;
    background-size: 440px 320px !important;
  }

  #lobby .lobby-news-title{
    font-size: 13px !important;
  }

  #lobby .lobby-news-text{
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  #lobby .lobby-actions-stack{
    gap: 8px !important;
  }

  #lobby .lobby-action-button{
    min-height: 44px !important;
    padding: 8px 10px !important;
    gap: 8px !important;
  }

  #lobby .lobby-action-icon{
    width: 34px !important;
    height: 34px !important;
    background-size: 380px 276px !important;
  }

  #lobby .lobby-action-title{
    font-size: 11px !important;
  }

  #lobby .lobby-action-sub{
    font-size: 10px !important;
  }

  #lobby .lobby-join{
    max-width: none !important;
    padding: 10px 12px !important;
    gap: 8px !important;
  }

  #lobby .lobby-join-title{
    font-size: clamp(13px, 1.9vw, 18px) !important;
  }

  #lobby .lobby-worlds-panel{
    height: min(26vh, 260px) !important;
  }

  #lobby .lobby-event-image{
    min-height: 220px !important;
  }
}

@media (max-width: 700px){
  #auth .auth-rail{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #auth .auth-rail-card{
    min-width: 0 !important;
    padding: 8px !important;
    border-radius: 14px !important;
  }

  #auth .auth-event-card,
  #auth .auth-connect-card{
    grid-column: auto !important;
  }

  #auth .auth-hero-logo-outside{
    width: min(240px, 78vw) !important;
  }

  #auth .auth-item-head{
    gap: 6px !important;
  }

  #auth .auth-item-title{
    font-size: 12px !important;
    line-height: 1.05 !important;
  }

  #auth .auth-item-badge--tilemap{
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    background-size: 380px 276px !important;
    background-position: -138px -206px !important;
  }

  #auth .auth-item-body{
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 6px !important;
    margin-top: 6px !important;
  }

  #auth .auth-item-icon{
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
  }

  #auth .auth-item-text{
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  #auth .auth-item-dots{
    margin-top: 6px !important;
    gap: 4px !important;
  }

  #auth .auth-connect-title{
    font-size: 10px !important;
    letter-spacing: 0.1em !important;
  }

  #auth .auth-connect-row{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  #auth .auth-connect-btn{
    min-height: 36px !important;
    padding: 0 8px !important;
    font-size: 9px !important;
    letter-spacing: 0.02em !important;
    gap: 4px !important;
  }

  #auth .auth-connect-btn .auth-connect-ico{
    width: 16px !important;
    height: 16px !important;
    font-size: 9px !important;
  }
}

@media (min-width: 660px) and (max-width: 720px) and (min-height: 820px) and (max-height: 980px) and (orientation: portrait){
  html:not(.is-game-world),
  body:not(.is-game-world){
    overflow: hidden !important;
    height: 100% !important;
  }

  #auth{
    align-items: center !important;
    justify-content: center !important;
    padding: 6px !important;
    overflow: hidden !important;
  }

  #auth .auth-shell{
    width: min(100%, 624px) !important;
    max-height: calc(100dvh - 12px) !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    align-content: start !important;
  }

  #auth .auth-hero-wrap{
    gap: 2px !important;
  }

  #auth .auth-hero{
    padding: 7px 9px !important;
    gap: 4px !important;
  }

  #auth .auth-hero-logo-outside{
    width: min(198px, 66vw) !important;
    margin: 0 0 -3px 0 !important;
  }

  #auth .auth-hero-headline{
    font-size: 11px !important;
  }

  #auth .auth-blurb-compact{
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  #auth .auth-feature-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  #auth .auth-feature-card{
    min-width: 0 !important;
    padding: 5px !important;
    gap: 5px !important;
    border-radius: 12px !important;
  }

  #auth .auth-feature-icon{
    width: 24px !important;
    height: 24px !important;
    flex-basis: 24px !important;
    border-radius: 8px !important;
  }

  #auth .auth-feature-title{
    font-size: 9px !important;
    line-height: 1.02 !important;
  }

  #auth .auth-feature-copy{
    display: none !important;
  }

  #auth .auth-card{
    padding: 7px 9px !important;
    gap: 5px !important;
    max-width: none !important;
  }

  #auth .auth-form{
    gap: 5px !important;
    margin-top: 0 !important;
  }

  #auth .auth-label{
    font-size: 9px !important;
  }

  #auth .auth-field{
    min-height: 32px !important;
    border-radius: 10px !important;
  }

  #auth .auth-field input{
    font-size: 12px !important;
  }

  #auth .auth-forgot-row{
    margin-top: -4px !important;
    margin-bottom: 0 !important;
  }

  #auth .auth-btn{
    min-height: 32px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
  }

  #auth .auth-msg{
    min-height: 14px !important;
    font-size: 10px !important;
  }

  #auth .auth-foot{
    gap: 4px !important;
    margin-top: -2px !important;
  }

  #auth .auth-foot-copy{
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  #auth .auth-rail{
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  #auth .auth-rail-card{
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 7px !important;
  }

  #auth .auth-event-card{
    padding: 0 !important;
  }

  #auth .auth-event-image{
    min-height: 82px !important;
    height: 82px !important;
  }

  #auth .auth-item-head{
    gap: 6px !important;
  }

  #auth .auth-item-title{
    font-size: 10px !important;
    margin-top: 0 !important;
  }

  #auth .auth-item-badge--tilemap{
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    background-size: 300px 218px !important;
    background-position: -108px -162px !important;
  }

  #auth .auth-item-body{
    grid-template-columns: 32px minmax(0, 1fr) !important;
    gap: 4px !important;
    margin-top: 4px !important;
  }

  #auth .auth-item-icon{
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
  }

  #auth .auth-item-text{
    font-size: 8px !important;
    line-height: 1.08 !important;
  }

  #auth .auth-item-dots{
    margin-top: 4px !important;
    gap: 4px !important;
  }

  #auth .auth-connect-card{
    padding: 6px !important;
  }

  #auth .auth-connect-title{
    font-size: 9px !important;
  }

  #auth .auth-connect-row{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  #auth .auth-connect-btn{
    min-height: 28px !important;
    padding: 0 4px !important;
    font-size: 8px !important;
    letter-spacing: 0.02em !important;
  }

  #auth .auth-connect-btn .auth-connect-ico{
    width: 18px !important;
    height: 18px !important;
    font-size: 8px !important;
  }
}

/* Final viewport sync overrides */
#auth,
#lobby,
#game-container,
#hud,
#blast-overlay,
#worldchanger-overlay,
#namechanger-overlay,
#quests-overlay,
#skills-overlay,
#menu-overlay,
#blast-success,
#blast-modal,
#worldchanger-modal,
#namechanger-modal,
#megaphone-modal,
#grant-modal,
#craft-modal,
#door-modal,
#lock-modal,
#world-key-modal,
#world-key-info-modal,
#region-lock-modal,
#news-modal,
#friends-modal,
#trade-modal,
#trade-qty-overlay,
#trade-final-overlay,
#drop-modal,
#info-modal,
#player-info-modal,
#gift-overlay,
#wheel-overlay{
  width: var(--app-vw, 100vw) !important;
  height: var(--app-vh, 100dvh) !important;
  max-height: var(--app-vh, 100dvh) !important;
}

#auth .auth-shell,
#lobby .lobby-card{
  max-height: calc(var(--app-height, 100dvh) - 24px) !important;
}

#lobby .lobby-card{
  height: var(--app-vh, 100dvh) !important;
  min-height: var(--app-vh, 100dvh) !important;
}

#settings-modal .settings-card,
#news-modal .news-card,
#friends-modal .friends-card,
#player-info-modal .player-info-card,
#shop-modal .shop-shell,
#trade-modal .trade-modal-box,
#drop-modal .legacy-inventory-modal,
#info-modal #info-content,
#grant-modal .grant-box,
#craft-modal .craft-layout,
.mini-reward-modal,
.blast-modal .blast-box,
.door-modal-box,
.lock-modal,
.world-key-modal .modal-content{
  height: auto !important;
  max-height: calc(var(--app-height, 100dvh) - 24px) !important;
}
