﻿* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] { display: none !important; }

:root {
  --design-w: 1536px;
  --design-h: 933px;
  --stage-scale: 1;
  --stage-scaled-w: 1536px;
  --stage-scaled-h: 933px;
  --stage-left: 0px;
  --stage-top: 0px;
  --stage-transform: scale(1);
  --game-frame-left: 0px;
  --game-frame-top: 0px;
  --game-frame-right: 0px;
  --game-frame-bottom: 0px;
  --game-frame-chrome: 0px;
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-width: calc(100vw - var(--safe-left) - var(--safe-right));
  --safe-height: calc(100vh - var(--safe-top) - var(--safe-bottom));
  --bg: #07090b;
  --surface: rgba(12, 15, 18, 0.46);
  --surface-strong: rgba(18, 22, 27, 0.58);
  --surface-soft: rgba(22, 28, 34, 0.34);
  --line: rgba(198, 148, 78, 0.28);
  --line-cool: rgba(73, 189, 197, 0.24);
  --gold: #d9a760;
  --gold-deep: #7d5124;
  --teal: #49bdc5;
  --red: #e05757;
  --text: #f5f1e9;
  --muted: #a9b0ad;
  --muted-2: #707b7b;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  background:
    #07090b
    url("ui icons/03_background_center.png")
    center / cover
    no-repeat;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(34, 153, 173, 0.07), transparent 38%),
    linear-gradient(120deg, rgba(7, 9, 11, 0.62), rgba(11, 15, 18, 0.48));
  pointer-events: none;
}

body.ingame-viewport {
  background:
    radial-gradient(circle at 50% 44%, rgba(31, 101, 116, 0.12), transparent 34%),
    #030505
    url("ui icons/03_background_center.png")
    center / cover
    no-repeat;
}

body.ingame-viewport::before {
  background:
    radial-gradient(circle at 50% 46%, rgba(62, 165, 180, 0.10), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(3, 5, 5, 0.26) 18%, rgba(3, 5, 5, 0.22) 82%, rgba(0, 0, 0, 0.72)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.58), transparent 20%, transparent 78%, rgba(0, 0, 0, 0.62));
}

.stage {
  position: fixed;
  z-index: 1;
  left: var(--stage-left);
  top: var(--stage-top);
  width: var(--design-w);
  height: var(--design-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
  transform: var(--stage-transform);
  transform-origin: top left;
}

.game-viewport-frame {
  position: fixed;
  z-index: 9000;
  left: var(--game-frame-left);
  top: var(--game-frame-top);
  right: var(--game-frame-right);
  bottom: var(--game-frame-bottom);
  pointer-events: none;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.game-viewport-frame::before,
.game-viewport-frame::after {
  display: none;
}

.game-frame-close {
  display: none;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(235, 181, 102, 0.58);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 220, 150, 0.22), transparent 52%),
    linear-gradient(180deg, rgba(84, 43, 27, 0.95), rgba(18, 11, 8, 0.96));
  color: #f7e7c7;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 170, 0.18),
    0 5px 18px rgba(0, 0, 0, 0.45);
}

body.ingame-viewport .game-frame-close {
  display: grid;
}

.game-frame-close:hover,
.game-frame-close:focus-visible {
  border-color: rgba(73, 189, 197, 0.72);
  color: #fff;
  outline: none;
}

body.game-viewport-closed .stage,
body.game-viewport-closed .game-viewport-frame,
body.game-viewport-closed .pwa-install-popup {
  opacity: 0;
  pointer-events: none;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(34, 153, 173, 0.08), transparent 38%),
    radial-gradient(circle at 82% 16%, rgba(198, 148, 78, 0.09), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.32), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.topbar {
  position: relative;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 248px 1fr 330px;
  width: 100%;
  height: 82px;
  min-height: 82px;
  margin: 0;
  background:
    radial-gradient(circle at 18% 0, rgba(217, 167, 96, 0.08), transparent 25%),
    linear-gradient(90deg, rgba(5, 10, 13, 0), rgba(5, 10, 13, 0.96) 7%, rgba(7, 9, 10, 0.96) 93%, rgba(7, 9, 10, 0));
  border-bottom: 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 167, 96, 0.35) 18%, rgba(217, 167, 96, 0.22) 82%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  overflow: hidden;
  justify-content: center;
  padding: 0 26px 0 32px;
}

.brand img {
  display: block;
  width: 148px;
  max-width: calc(100% - 28px);
  height: 68px;
  object-fit: contain;
  object-position: center;
  border-radius: 2px;
}

.tabs {
  display: flex;
  min-width: 0;
  flex-shrink: 0;
  height: 70px;
  border-bottom: 1px solid rgba(217, 167, 96, 0.22);
  background:
    radial-gradient(circle at 50% 100%, rgba(235, 181, 102, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(7, 9, 11, 0.6), rgba(5, 7, 9, 0.5));
}

.tab {
  position: relative;
  min-width: 133px;
  padding: 0 18px;
  border: 0;
  border-left: 1px solid rgba(198, 148, 78, 0.08);
  background: transparent;
  color: #c5c0b7;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.tab:first-child {
  border-left: 0;
}

.tab.active {
  color: #fff;
  background:
    radial-gradient(circle at 50% 100%, rgba(235, 181, 102, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(26, 21, 15, 0.3), rgba(151, 98, 42, 0.34));
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(73, 189, 197, 0.9), rgba(235, 181, 102, 0.95));
  box-shadow: 0 -8px 22px rgba(217, 167, 96, 0.35);
}

.tab.active::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 7px solid #ebb566;
}

.wallet {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 24px;
}

.icon-button,
.avatar {
  display: grid;
  place-items: center;
}

.icon-button {
  width: 40px;
  height: 35px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.notification-button {
  position: relative;
  background: url("ui icons/no_notification_icon.png") center / contain no-repeat;
}

.notification-button.is-read span {
  display: none;
}

.notification-button span {
  position: absolute;
  top: -3px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e33d3d;
  box-shadow: 0 0 0 1px rgba(255, 214, 186, 0.45), 0 2px 5px rgba(0, 0, 0, 0.36);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  transform: none;
}

.user-panel {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 9px;
  width: 186px;
  height: 56px;
  padding: 3px 12px 3px 3px;
  border: 1px solid rgba(198, 148, 78, 0.2);
  border-radius: 28px 6px 6px 28px;
  background: linear-gradient(90deg, rgba(13, 16, 17, 0.86), rgba(6, 8, 9, 0.72));
}

.avatar {
  width: 50px;
  height: 50px;
  position: relative;
  background: url("ui icons/30_avatar_icon.png") center / contain no-repeat;
}

.avatar::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -4px;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(196, 255, 214, 0.72);
  border-radius: 50%;
  background: linear-gradient(180deg, #45e682, #15944c);
  box-shadow:
    0 0 0 1px rgba(7, 26, 15, 0.46),
    0 0 8px rgba(56, 224, 116, 0.48),
    0 2px 4px rgba(0, 0, 0, 0.26);
}

.avatar::before {
  content: "";
  position: absolute;
  top: 0;
  right: 1px;
  z-index: 1;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.38));
}

.wallet-name b {
  display: block;
  font-size: 15px;
}

.wallet-name small {
  color: #54d58a;
  font-size: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 311px;
  gap: 22px;
  width: 100%;
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0 16px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.left,
.right {
  min-width: 0;
}

.left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 14px 0 38px;
}

.left-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
}

.global-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 7px 20px;
  font-size: 11px;
  border-top: 1px solid rgba(198, 148, 78, 0.14);
  background: linear-gradient(180deg, rgba(7,9,11,0), rgba(7,9,11,0.65));
  gap: 12px;
}

.global-footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.global-footer-center {
  flex: 1;
  text-align: center;
  color: rgba(220, 218, 211, 0.55);
  font-size: 11px;
}

.global-footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 0 0 38px;
}

.right.wallet-popover-open {
  overflow: visible;
}

.right-topbar {
  position: relative;
  z-index: 1200;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 70px;
  padding-right: 4px;
  border-bottom: 1px solid rgba(198, 148, 78, 0.14);
  margin-bottom: 4px;
  overflow: visible;
}

.right-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 8px 4px;
  flex-shrink: 0;
  margin-top: auto;
  font-size: 12px;
  border-top: 1px solid rgba(198, 148, 78, 0.14);
}

.panel,
.table-surface {
  background:
    radial-gradient(circle at 50% 0, rgba(217, 167, 96, 0.04), transparent 36%),
    linear-gradient(180deg, rgba(12, 14, 14, 0.44), rgba(5, 7, 8, 0.4)),
    var(--surface);
  border: 1px solid rgba(198, 148, 78, 0.24);
  border-radius: 5px;
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.28), 0 18px 42px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  min-height: 0;
}

.left-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 12px;
}

.left-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.left-scroll::-webkit-scrollbar-track {
  background: rgba(217,167,96,0.08);
  border-radius: 4px;
}

.left-scroll::-webkit-scrollbar-thumb {
  background: rgba(217,167,96,0.48);
  border-radius: 4px;
}

.left-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(217,167,96,0.70);
}

.left-scroll-indicator {
  position: absolute;
  right: 0;
  width: 12px;
  z-index: 12;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.left-scroll-indicator.is-visible {
  opacity: 1;
}

.left-scroll-indicator::before {
  content: "";
  position: absolute;
  top: 0;
  right: 2px;
  bottom: 0;
  width: 7px;
  border-radius: 5px;
  background: rgba(217, 167, 96, 0.10);
  box-shadow:
    inset 0 0 0 1px rgba(217, 167, 96, 0.18),
    0 0 10px rgba(0, 0, 0, 0.35);
}

.left-scroll-indicator__thumb {
  position: absolute;
  top: 0;
  right: 2px;
  width: 7px;
  min-height: 36px;
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(238, 194, 116, 0.92), rgba(143, 95, 45, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 170, 0.26),
    0 0 10px rgba(217, 167, 96, 0.24);
  transform: translateY(0);
  will-change: transform, height;
}

.categories-panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 60% 24%, rgba(217, 167, 96, 0.06), transparent 40%),
    linear-gradient(180deg, rgba(13, 16, 16, 0.44), rgba(6, 8, 8, 0.38));
}

.category-list {
  padding: 0 0 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(217,167,96,0.25) transparent;
}

.category-list::-webkit-scrollbar {
  width: 4px;
}

.category-list::-webkit-scrollbar-thumb {
  background: rgba(217,167,96,0.28);
  border-radius: 4px;
}

.filters-panel {
  flex-shrink: 0;
  background:
    radial-gradient(circle at 50% 0, rgba(217, 167, 96, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(13, 16, 16, 0.44), rgba(6, 8, 8, 0.38));
}

.panel + .panel {
  margin-top: 0;
}

.panel-heading {
  padding: 18px 24px 12px;
}

.panel-heading.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel h2,
.table-surface h2 {
  color: #efc274;
  font-size: 18px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.category-list {
  padding: 4px 8px 10px;
}

.cat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0 14px 0 18px;
  border: 0;
  border-radius: 7px;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 17px;
  margin: 2px 0;
}

.cat-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cat small {
  color: #b8ab94;
  font-size: 14px;
}

.cat-arrow {
  font-size: 9px;
  color: var(--teal);
  opacity: 0.8;
}

.cat:hover,
.cat.active {
  background:
    linear-gradient(90deg, rgba(73, 189, 197, 0.13), rgba(217, 167, 96, 0.18), rgba(217, 167, 96, 0.04));
  border-left-color: var(--teal);
  box-shadow: inset 0 0 22px rgba(217, 167, 96, 0.12);
}

label {
  display: block;
  margin: 12px 16px 6px;
  color: #c8c4ba;
  font-size: 15px;
}

select,
input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  font-size: 15px;
  border: 1px solid rgba(198, 148, 78, 0.3);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(23, 24, 22, 0.48), rgba(9, 10, 10, 0.5));
  color: #f0ece4;
  outline: none;
  color-scheme: dark;
}

select:focus,
input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(73, 189, 197, 0.18);
}

select option,
select optgroup {
  background: #0b0f10;
  color: #f0ece4;
}

select option:checked {
  background: #322513;
  color: #fff;
}

.sell select,
.sell input {
  height: 30px;
  font-size: 13px;
}

.sell label {
  margin-top: 4px;
  margin-bottom: 2px;
  font-size: 13px;
}

.filters-panel > select,
.filters-panel > input,
.filters-panel > div {
  width: calc(100% - 32px);
  margin: 0 16px;
}

.filters-panel > div select,
.filters-panel > div input {
  width: 100%;
}

.range {
  display: grid;
  grid-template-columns: 1fr 10px 1fr;
  align-items: center;
  gap: 8px;
  margin: 0 16px;
}

.range span {
  color: var(--muted-2);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.ui-image-button {
  display: inline-grid;
  place-items: center;
  border: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: transparent;
  text-shadow: none;
  overflow: hidden;
}

.apply-filters {
  width: calc(100% - 32px);
  height: 52px;
  margin: 16px 16px 18px;
  background-image: url("ui icons/22_button_apply_filters.png");
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding-bottom: 38px;
}

.center-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 0;
  border-top: 1px solid rgba(198, 148, 78, 0.14);
}

.page {
  display: none;
}

.page.active {
  display: block;
  flex: 1;
  min-height: 0;
}

#page-browse.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  min-height: 40px;
  margin: 18px 0 20px;
  padding: 8px 14px;
  background:
    linear-gradient(180deg, rgba(7, 9, 11, 0.28), rgba(5, 7, 9, 0.22));
  border: 1px solid rgba(198, 148, 78, 0.06);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.toolbar .search {
  flex: 1 1 0;
  min-width: 80px;
  position: relative;
}

.toolbar .search input {
  padding-left: 15px;
  padding-right: 38px;
  width: 100%;
  box-sizing: border-box;
}

.toolbar .search::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: url("ui icons/search_icon.png") center / contain no-repeat;
  opacity: 0.6;
  pointer-events: none;
}

.toolbar select {
  flex: 0 0 auto;
  width: auto;
  min-width: 90px;
}

.toolbar-label {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 2px;
}

.toolbar-range {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-range input {
  width: 70px;
}

.toolbar input,
.toolbar select {
  height: 40px;
  border-color: rgba(198, 148, 78, 0.28);
  background: linear-gradient(180deg, rgba(20, 20, 18, 0.5), rgba(8, 9, 9, 0.5));
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.24);
}

.view-toggle {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 4px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.grid-view {
  background-image: url("ui icons/24_button_grid_view.png");
}

.list-view {
  background-image: url("ui icons/25_button_list_view.png");
}

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

.market-summary > div {
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--line-cool);
  border-radius: 8px;
  background: rgba(9, 14, 16, 0.5);
}

.market-summary span {
  display: block;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.market-summary small {
  color: var(--muted);
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 0;
  align-content: stretch;
  gap: 16px 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(92px, 1fr) 18px 17px 17px 42px;
  min-height: 0;
  height: 100%;
  padding: 14px 13px;
  border: 2px solid rgba(198, 148, 50, 0.45);
  border-image: url("ui icons/15_item_card_frame_style.png") 4 stretch;
  border-radius: 5px;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(210, 170, 50, 0.08) 0%, transparent 58%),
    radial-gradient(ellipse at 50% 110%, rgba(120, 60, 5,  0.06) 0%, transparent 52%),
    linear-gradient(175deg, rgba(22, 16, 6, 0.48) 0%, rgba(7, 5, 2, 0.54) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(210, 165, 50, 0.52),
    inset 0 1px 0   rgba(255, 230, 90, 0.32),
    inset 0 -1px 0  rgba(160, 90, 12, 0.36),
    0 0 0 1px rgba(140, 95, 20, 0.42),
    0 4px 28px rgba(0, 0, 0, 0.80),
    0 2px 8px  rgba(0, 0, 0, 0.90),
    0 0 18px rgba(160, 110, 20, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255, 218, 90, 0.09) 0%,
    transparent 35%
  );
  pointer-events: none;
  z-index: -1;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255, 200, 50, 0.14) 0%,
    transparent 42%,
    rgba(160, 70, 8, 0.08) 100%
  );
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.card:hover::after,
.card:focus-visible::after {
  opacity: 1;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-5px) scale(1.018);
  box-shadow:
    inset 0 0 0 1px rgba(220, 175, 50, 0.55),
    inset 0 1px 0   rgba(255, 230, 100, 0.28),
    inset 0 -1px 0  rgba(150, 85, 10, 0.22),
    0 0 32px rgba(190, 138, 22, 0.28),
    0 0 70px rgba(190, 138, 22, 0.08),
    0 10px 36px rgba(0, 0, 0, 0.75);
  outline: none;
  animation: card-glow-pulse 1s ease-in-out infinite;
}

@keyframes card-glow-pulse {
  0%   { box-shadow: inset 0 0 0 1px rgba(220,175,50,0.55), inset 0 1px 0 rgba(255,230,100,0.28), inset 0 -1px 0 rgba(150,85,10,0.22), 0 0 22px rgba(190,138,22,0.22), 0 0 50px rgba(190,138,22,0.06), 0 10px 36px rgba(0,0,0,0.75); }
  50%  { box-shadow: inset 0 0 0 1px rgba(220,175,50,0.80), inset 0 1px 0 rgba(255,230,100,0.40), inset 0 -1px 0 rgba(150,85,10,0.30), 0 0 52px rgba(210,158,32,0.52), 0 0 90px rgba(210,158,32,0.18), 0 10px 36px rgba(0,0,0,0.75); }
  100% { box-shadow: inset 0 0 0 1px rgba(220,175,50,0.55), inset 0 1px 0 rgba(255,230,100,0.28), inset 0 -1px 0 rgba(150,85,10,0.22), 0 0 22px rgba(190,138,22,0.22), 0 0 50px rgba(190,138,22,0.06), 0 10px 36px rgba(0,0,0,0.75); }
}

.favorite {
  position: absolute;
  top: 10px;
  right: 4px;
  z-index: 2;
  width: 34px;
  height: 28px;
  border: 0;
  background: url("ui icons/18_favorite_heart.png") center / contain no-repeat;
  color: transparent;
  opacity: 0.72;
  cursor: pointer;
}

.favorite:hover {
  animation: heart-pulse 0.6s ease infinite;
  opacity: 1;
}

@keyframes heart-pulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.35); }
  60%  { transform: scale(1.1); }
  80%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.favorite.active {
  opacity: 1;
  filter:
    drop-shadow(0 0 6px rgba(255, 80, 100, 0.95))
    drop-shadow(0 0 14px rgba(255, 60, 80, 0.7))
    brightness(1.3)
    saturate(2);
  transform: scale(1.1);
}

.item-art,
.modal-art {
  display: grid;
  place-items: center;
}

.item-art {
  min-height: 0;
}

.item-icon {
  width: 100%;
  height: 100%;
  max-width: 132px;
  max-height: 136px;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 1)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.85)) brightness(1.08) contrast(1.05) saturate(1.12);
  color: transparent;
  font-size: 0;
}

.item-meta {
  min-width: 0;
  align-self: start;
  padding-right: 28px;
}

.item-name-row,
.modal-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.item-name-row h3 {
  min-width: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.quality {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(73, 189, 197, 0.5);
  border-radius: 6px;
  background: rgba(9, 26, 29, 0.86);
  color: #7ef5ee;
  font-size: 13px;
  font-weight: 900;
}

.quality.compact {
  min-width: 30px;
  height: 22px;
  margin-left: 6px;
  font-size: 12px;
  vertical-align: middle;
}

.quality.large {
  min-width: 45px;
  height: 34px;
  font-size: 16px;
}

.item-level-badge {
  text-align: center;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-bonus-line,
.item-upgrade-line {
  min-width: 0;
  text-align: center;
  font-size: 14px;
  line-height: 17px;
  font-weight: 600;
  color: rgba(180, 140, 40, 0.85);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-upgrade-line {
  color: rgba(204, 160, 54, 0.88);
}

.price-row {
  display: flex;
  gap: 7px;
  align-items: center;
  border-top: 1px solid rgba(198, 148, 78, 0.16);
  padding-top: 8px;
  min-width: 0;
}

.coin {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: url("ui icons/17_popu_coin_small.png") center / contain no-repeat;
  color: transparent;
}

.coin.small {
  width: 30px;
  height: 30px;
  font-size: 17px;
}

.price-row strong {
  display: block;
  color: #fff;
  font-size: 19px;
  white-space: nowrap;
}

.price-quality {
  min-width: 31px;
  height: 24px;
  padding: 0 7px;
}

.price-amount {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.usd-price {
  display: block;
  font-size: 14px;
  color: #9be0a0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: 6px auto 0;
  padding: 2px 10px;
  flex-wrap: wrap;
  background: transparent;
}

.pagination button,
.pagination span {
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(10, 12, 13, 0.92);
  color: var(--text);
}

.pagination button.active {
  border: 1px solid rgba(217, 167, 96, 0.7);
  background: linear-gradient(180deg, rgba(137, 95, 45, 0.9), rgba(65, 42, 18, 0.92));
  color: #fff;
}

.right .panel {
  margin-bottom: 0;
}

.right .activity {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.right .activity #activity {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(217,167,96,0.2) transparent;
}

.balance {
  min-height: 0;
  flex-shrink: 0;
  padding: 12px 20px 14px;
  background:
    radial-gradient(circle at 55% 6%, rgba(217, 167, 96, 0.07), transparent 42%),
    linear-gradient(180deg, rgba(13, 16, 16, 0.44), rgba(6, 8, 8, 0.38));
}

.balance p {
  color: var(--muted);
  font-size: 13px;
}

.balance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 8px;
}

.balance-amounts {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.balance-row strong {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  white-space: nowrap;
}

.balance-usd {
  font-size: 12px;
  color: #9be0a0;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 6px;
}

.deposit-btn {
  height: 36px;
  background-image: url("ui icons/19_button_deposit.png");
}

.withdraw-btn {
  height: 36px;
  background-image: url("ui icons/20_button_withdraw.png");
}

.gold,
.dark {
  height: 40px;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
}

.gold {
  border: 1px solid #bd873f;
  background: linear-gradient(180deg, #c89047, #61401d);
  box-shadow: inset 0 1px rgba(255, 226, 164, 0.36);
}

.dark {
  border: 1px solid rgba(73, 189, 197, 0.26);
  background: linear-gradient(180deg, #182028, #0c0e10);
}

.full {
  width: 100%;
}

.sell {
  min-height: 0;
  flex-shrink: 0;
  padding-bottom: 10px;
  background:
    radial-gradient(circle at 50% 16%, rgba(217, 167, 96, 0.06), transparent 46%),
    linear-gradient(180deg, rgba(13, 16, 16, 0.44), rgba(6, 8, 8, 0.38));
}

.sell > select,
.sell > input,
.sell > button {
  width: calc(100% - 32px);
  margin-left: 16px;
  margin-right: 16px;
}

.sell > button {
  margin-top: 8px;
  margin-bottom: 4px;
}

.create-listing-btn {
  height: 34px;
  background-image: url("ui icons/21_button_create_listing.png");
}

.inventory-entry {
  flex-shrink: 0;
  padding-bottom: 14px;
  background:
    radial-gradient(circle at 50% 16%, rgba(217, 167, 96, 0.06), transparent 46%),
    linear-gradient(180deg, rgba(13, 16, 16, 0.44), rgba(6, 8, 8, 0.38));
}

.inventory-entry .panel-heading {
  padding: 14px 24px 10px;
}

.inventory-account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-account-name {
  min-width: 0;
  max-width: 145px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.inventory-account-name.is-connected {
  color: #fff;
}

.inventory-entry .inventory-entry-btn {
  position: relative;
  height: 36px;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 235, 190, 0.18), transparent 54%),
    linear-gradient(180deg, #a9793c 0%, #6c4621 54%, #3f2816 100%);
  border: 1px solid rgba(228, 176, 104, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 233, 184, 0.30),
    inset 0 -1px 0 rgba(34, 18, 8, 0.45),
    0 8px 18px rgba(0, 0, 0, 0.24);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0;
}

.inventory-entry .inventory-entry-btn.is-active {
  background:
    radial-gradient(circle at 50% 0, rgba(255, 246, 208, 0.32), transparent 56%),
    linear-gradient(180deg, #c79049 0%, #7c5329 54%, #47301b 100%);
  border-color: rgba(255, 213, 140, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 204, 0.46),
    inset 0 0 0 1px rgba(255, 214, 139, 0.22),
    inset 0 -10px 18px rgba(64, 34, 12, 0.34),
    0 0 0 1px rgba(73, 189, 197, 0.18),
    0 0 18px rgba(235, 181, 102, 0.35),
    0 9px 20px rgba(0, 0, 0, 0.30);
  color: #fff;
}

.inventory-entry .inventory-entry-btn.is-active::after {
  content: none;
}

.inventory-entry .inventory-entry-btn.is-active::before {
  content: none;
}

.inventory-entry .inventory-entry-btn:hover {
  background:
    radial-gradient(circle at 50% 0, rgba(255, 240, 195, 0.26), transparent 54%),
    linear-gradient(180deg, #bd8843 0%, #775027 54%, #49301a 100%);
  border-color: rgba(244, 196, 122, 0.82);
  color: #fff;
}

.account-balance {
  flex-shrink: 0;
  padding: 0 20px 14px;
  background:
    radial-gradient(circle at 50% 8%, rgba(217, 167, 96, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(13, 16, 16, 0.46), rgba(6, 8, 8, 0.38));
}

.account-balance .inventory-account-heading {
  padding: 14px 4px 10px;
}

.account-balance .inventory-entry-btn {
  width: 100%;
  margin: 0;
}

.account-balance-divider {
  height: 1px;
  margin: 14px 0 12px;
  background: linear-gradient(90deg, transparent, rgba(198, 148, 78, 0.28), transparent);
}

.account-balance-wallet {
  padding: 0 0 2px;
}

.account-balance .balance-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.balance-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
}

.balance-mode-select {
  height: 28px;
  min-width: 88px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(198, 148, 78, 0.42);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(23, 19, 12, 0.92), rgba(8, 10, 10, 0.88));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.balance-mode-select:focus {
  outline: none;
  border-color: rgba(244, 196, 122, 0.78);
  box-shadow: 0 0 0 1px rgba(244, 196, 122, 0.18);
}

.account-balance .balance-row {
  margin: 6px 0 8px;
}

.account-balance .button-row {
  margin-bottom: 0;
}

.sell-preview {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  margin: 0 16px 6px;
  min-height: 44px;
  padding: 5px;
  border: 1px dashed rgba(73, 189, 197, 0.28);
  border-radius: 8px;
  background: rgba(8, 13, 15, 0.28);
}

.sell-preview .item-icon {
  max-width: 40px;
  max-height: 40px;
}

.sell-preview b,
.row-item b,
.activity-row b {
  color: #fff;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sell-preview small,
.row-item small,
.activity-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.activity {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 8px;
  background:
    radial-gradient(circle at 50% 0, rgba(217, 167, 96, 0.06), transparent 36%),
    linear-gradient(180deg, rgba(13, 16, 16, 0.44), rgba(6, 8, 8, 0.38));
}

.activity .panel-heading {
  flex-shrink: 0;
  padding: 12px 20px 10px;
}

.activity-tip {
  margin: 3px 0 0;
  color: rgba(220, 218, 211, 0.62);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

#activity {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.activity-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 6px 10px;
  border-top: 1px solid rgba(198, 148, 78, 0.14);
}

.activity-row .item-icon,
.activity-row .activity-ui-icon {
  max-width: 34px;
  max-height: 34px;
}

.activity-ui-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.activity-row b {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-row small {
  margin-top: 2px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-row span {
  color: var(--muted-2);
  font-size: 11px;
}

.table-surface {
  min-height: 560px;
  height: 100%;
  overflow: auto;
  padding: 22px;
}

.table-surface h2 {
  margin-bottom: 16px;
}

.data-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 140px 220px;
  gap: 14px;
  align-items: center;
  min-height: 70px;
  padding: 12px 6px;
  border-bottom: 1px solid rgba(198, 148, 78, 0.14);
}

.row-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.row-item .item-icon {
  max-width: 42px;
  max-height: 42px;
}

.data-row button {
  height: 32px;
  margin-left: 6px;
  padding: 0 10px;
  border: 1px solid rgba(73, 189, 197, 0.28);
  border-radius: 6px;
  background: rgba(17, 23, 26, 0.72);
  color: #fff;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid rgba(73, 189, 197, 0.18);
  border-radius: 8px;
  background: rgba(7, 10, 12, 0.42);
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(3px);
}

.overlay.open {
  display: flex;
}

.app-notification {
  position: fixed;
  top: calc(var(--game-frame-top) + var(--game-frame-chrome) + 18px);
  right: calc(var(--game-frame-right) + 22px);
  z-index: 520;
  width: min(330px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(228, 176, 104, 0.48);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0, rgba(235, 181, 102, 0.14), transparent 45%),
    linear-gradient(180deg, rgba(24, 18, 10, 0.96), rgba(8, 10, 10, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.12),
    0 18px 42px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(198, 148, 78, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.app-notification--warning,
.app-notification--error {
  border-color: rgba(238, 108, 92, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 180, 0.12),
    0 18px 42px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(238, 108, 92, 0.16);
}

.modal-card {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  padding: clamp(12px, 2.2dvh, 22px) clamp(12px, 3dvw, 20px);
  border-radius: 10px;
  border: 1px solid rgba(200, 158, 42, 0.35);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(210, 165, 40, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(120, 55, 5, 0.06) 0%, transparent 50%),
    linear-gradient(175deg, rgba(20, 14, 5, 0.55) 0%, rgba(6, 4, 1, 0.62) 100%);
  box-shadow:
    0 0 0 1px rgba(180, 135, 30, 0.18),
    inset 0 1px 0 rgba(255, 215, 80, 0.10),
    0 32px 90px rgba(0, 0, 0, 0.75),
    0 0 50px rgba(0, 0, 0, 0.5);
}


.modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 210, 70, 0.055) 0%, transparent 32%);
  pointer-events: none;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: clamp(26px, 4dvh, 34px);
  height: clamp(26px, 4dvh, 34px);
  border: 1px solid rgba(200, 155, 40, 0.4);
  border-radius: 6px;
  background: rgba(25, 17, 4, 0.92);
  color: rgba(220, 175, 60, 0.9);
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s;
}

.modal-close:hover {
  background: rgba(200, 140, 20, 0.2);
  border-color: rgba(220, 170, 50, 0.7);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2dvw, 16px);
  margin-bottom: clamp(8px, 1.4dvh, 14px);
}

.modal-art {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-height: 0;
  margin-bottom: 0;
}

.modal-art .item-icon {
  max-width: clamp(52px, 9dvh, 90px);
  max-height: clamp(52px, 9dvh, 90px);
}

.modal-header-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.modal-title {
  justify-content: flex-start;
  margin-bottom: 0;
}

.modal-title h2 {
  color: #fff;
  font-size: clamp(14px, 2.4dvh, 20px);
  text-align: left;
  overflow-wrap: anywhere;
}

.modal-level {
  text-align: left;
  margin-bottom: 0;
}

.modal-wearable-inline {
  color: var(--teal);
  font-size: inherit;
  font-weight: 600;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 1.5dvw, 10px);
  margin-bottom: clamp(8px, 1.2dvh, 12px);
  align-items: start;
}

.modal-col-left,
.modal-col-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.modal-details {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.modal-details div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(73, 189, 197, 0.16);
  border-radius: 6px;
  background: rgba(8, 13, 15, 0.46);
}

.modal-details span {
  color: var(--muted);
}

.modal-buy {
  margin: 0;
  height: clamp(34px, 5dvh, 44px);
  font-size: clamp(12px, 1.8dvh, 15px);
}

.modal-list-price {
  margin: clamp(6px, 1.2dvh, 10px) 0 4px;
}

.modal-list-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-list-price-input {
  flex: 1;
  background: var(--bg2);
  border: 1.5px solid rgba(198,148,50,0.55);
  color: var(--text);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: clamp(12px, 1.6dvh, 14px);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.modal-list-price-input::placeholder {
  color: var(--muted);
  font-size: clamp(10px, 1.4dvh, 12px);
}

.modal-list-price-input:focus {
  border-color: var(--gold, #c69432);
  box-shadow: 0 0 0 2px rgba(198,148,50,0.18);
}

.modal-list-price-usd {
  font-size: clamp(11px, 1.5dvh, 13px);
  color: var(--muted);
  white-space: nowrap;
  min-width: 60px;
}

.modal-list {
  margin: 0;
  height: clamp(34px, 5dvh, 44px);
  font-size: clamp(12px, 1.8dvh, 15px);
}

.modal-list:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.modal-level {
  color: var(--muted);
  font-size: clamp(11px, 1.6dvh, 13px);
}

.modal-base-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 1dvw, 8px);
  margin-bottom: clamp(6px, 1.2dvh, 10px);
  padding: clamp(5px, 0.9dvh, 8px) clamp(8px, 1.5dvw, 12px);
  border: 1px solid rgba(255, 200, 60, 0.18);
  border-radius: 7px;
  background: rgba(20, 15, 4, 0.5);
}

.modal-base-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 60px;
}

.mbs-label {
  color: var(--muted);
  font-size: clamp(9px, 1.3dvh, 11px);
  text-align: center;
  line-height: 1.2;
}

.mbs-value {
  color: #f0c040;
  font-size: clamp(11px, 1.7dvh, 14px);
  font-weight: 700;
  text-align: center;
}

.modal-bonuses {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(2px, 0.5dvh, 4px);
  margin-bottom: 0;
  padding: clamp(6px, 1dvh, 10px) clamp(8px, 2dvw, 10px);
  border: 1px solid rgba(73, 189, 197, 0.12);
  border-radius: 8px;
  background: rgba(8, 13, 15, 0.35);
  height: 100%;
  box-sizing: border-box;
}

.bonus-col-title {
  color: var(--muted);
  font-size: clamp(9px, 1.3dvh, 11px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: clamp(2px, 0.4dvh, 4px);
  width: 100%;
}

.bonus-line {
  display: flex;
  align-items: center;
  gap: clamp(3px, 0.6dvw, 5px);
  color: #4ecdc4;
  font-size: clamp(11px, 1.6dvh, 13px);
  font-weight: 600;
  text-align: left;
  line-height: 1.3;
  width: 100%;
}

.bonus-line.empty-bonus {
  color: var(--muted);
  font-weight: 400;
}

.bonus-slot-num {
  flex: 0 0 auto;
  width: clamp(14px, 2dvh, 18px);
  height: clamp(14px, 2dvh, 18px);
  border-radius: 50%;
  background: rgba(73, 189, 197, 0.15);
  border: 1px solid rgba(73, 189, 197, 0.3);
  font-size: clamp(8px, 1.2dvh, 10px);
  font-weight: 700;
  color: #49bdc5;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.bonus-slot-text {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bonus-slot-val {
  flex: 0 0 auto;
  color: #f0c040;
  font-weight: 700;
}

.bonus-line.neg {
  color: #e05c5c;
}

.bonus-line.neg .bonus-slot-num {
  background: rgba(224, 92, 92, 0.15);
  border-color: rgba(224, 92, 92, 0.3);
  color: #e05c5c;
}


.modal-sockets {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.8dvh, 6px);
  margin-bottom: 0;
  padding: clamp(6px, 1dvh, 10px) clamp(8px, 2dvw, 10px);
  border: 1px solid rgba(200, 160, 40, 0.14);
  border-radius: 8px;
  background: rgba(8, 6, 2, 0.35);
  height: 100%;
  box-sizing: border-box;
}

.socket-slot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: clamp(4px, 0.7dvh, 7px) clamp(6px, 1.5dvw, 9px);
  border-radius: 6px;
  border: 1px dashed rgba(180, 140, 40, 0.4);
  background: rgba(10, 8, 2, 0.45);
}

.socket-slot.empty {
  border-color: rgba(120, 120, 120, 0.3);
}

.socket-slot.empty {
  border-color: rgba(120, 120, 120, 0.3);
}

.socket-gem {
  flex: 0 0 auto;
  width: clamp(20px, 3.5dvh, 28px);
  height: clamp(20px, 3.5dvh, 28px);
  border-radius: 50%;
  border: 2px solid rgba(200, 160, 40, 0.5);
}

.gem-filled {
  background: radial-gradient(circle at 35% 35%, rgba(255, 200, 60, 0.9), rgba(160, 80, 10, 0.8));
  box-shadow: 0 0 8px rgba(220, 150, 20, 0.6), inset 0 1px 0 rgba(255, 240, 120, 0.4);
  border-color: rgba(220, 170, 40, 0.7);
}

.gem-empty {
  background: rgba(30, 25, 10, 0.6);
  border-color: rgba(120, 100, 40, 0.3);
  border-style: dashed;
}

.socket-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.socket-text b {
  font-size: clamp(10px, 1.5dvh, 12px);
  color: #d4a820;
  font-weight: 700;
}

.socket-text span {
  font-size: clamp(9px, 1.3dvh, 11px);
  color: var(--muted);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  height: 50px;
  min-height: 50px;
  margin: 0;
  padding: 0 28px;
  align-items: center;
  border-top: 1px solid rgba(198, 148, 78, 0.12);
  background: linear-gradient(90deg, rgba(7, 8, 8, 0), rgba(7, 8, 8, 0.86) 7%, rgba(7, 8, 8, 0.86) 93%, rgba(7, 8, 8, 0));
  color: var(--muted);
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.footer-left {
  justify-content: flex-start;
}

.footer-right {
  justify-content: flex-end;
}

.footer-center {
  margin: 0;
  color: rgba(220, 218, 211, 0.72);
  white-space: nowrap;
  text-align: center;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(220, 218, 211, 0.72);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: #fff;
  outline: none;
}

.footer-separator {
  width: 1px;
  height: 18px;
  background: rgba(198, 148, 78, 0.18);
}

.footer-icon {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 1px solid rgba(220, 218, 211, 0.5);
  border-radius: 50%;
  opacity: 0.9;
}

.footer-icon::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(220, 218, 211, 0.78);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.footer-icon.info::before {
  content: "i";
}

.footer-icon.support {
  border-radius: 4px;
  transform: rotate(-12deg);
}

.footer-icon.support::before {
  content: "?";
  transform: rotate(12deg);
}

/* Fixed composition: every device scales the same complete market layout. */
.brand {
  min-height: 0;
  padding: 0 16px;
}

.brand img {
  width: 148px;
  max-width: calc(100% - 16px);
  height: 68px;
}

.tabs {
  height: 70px;
  min-height: 0;
  overflow: visible;
}

.tab {
  flex: 0 1 auto;
  min-width: 133px;
  min-height: 0;
  padding: 0 18px;
}

.wallet {
  display: flex;
}

.app-shell {
  grid-template-columns: 300px minmax(0, 1fr) 311px;
  gap: 22px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 16px;
}

.left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 0 38px;
}

.panel + .panel {
  margin-top: 0;
}

.right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 38px;
}

.toolbar {
  flex-wrap: nowrap;
}

.toolbar .search {
  max-width: 240px;
}

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

.grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 0;
  gap: 16px 8px;
  height: 100%;
}

.card {
  min-height: 0;
  grid-template-rows: auto minmax(92px, 1fr) 18px 17px 17px 42px;
}

.data-row {
  grid-template-columns: minmax(220px, 1fr) 150px 140px 220px;
  gap: 14px;
}

.footer-center {
  text-align: center;
  color: rgba(220, 218, 211, 0.72);
  font-size: 13px;
  margin: 0;
}

/* â”€â”€ Edit Price popup â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.edit-price-card {
  position: relative;
  width: 340px;
  background:
    linear-gradient(160deg, rgba(28, 22, 12, 0.30) 0%, rgba(14, 11, 6, 0.36) 100%);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(217, 167, 96, 0.38);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(217,167,96,0.10),
    0 24px 64px rgba(0,0,0,0.62),
    inset 0 1px 0 rgba(255,220,140,0.08);
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.edit-price-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edit-price-header span {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #efc274;
  text-transform: uppercase;
}

.edit-price-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(217,167,96,0.06);
  border: 1px solid rgba(217,167,96,0.16);
  border-radius: 8px;
}

.edit-price-item .item-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.edit-price-item b {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.edit-price-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.edit-price-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(217,167,96,0.28);
  border-radius: 8px;
  padding: 0 12px;
  transition: border-color 0.18s;
}

.edit-price-input-wrap:focus-within {
  border-color: rgba(217,167,96,0.60);
  box-shadow: 0 0 0 2px rgba(217,167,96,0.10);
  outline: none;
}

.edit-price-coin {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
}

.edit-price-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none !important;
  box-shadow: none !important;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 0;
}

.edit-price-input::-webkit-inner-spin-button,
.edit-price-input::-webkit-outer-spin-button {
  opacity: 0.4;
}

.edit-price-actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.edit-price-cancel {
  flex: 1;
  padding: 9px 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.18s;
}

.edit-price-cancel:hover {
  background: rgba(255,255,255,0.10);
  color: var(--text);
}

.edit-price-confirm {
  flex: 1.6;
  padding: 9px 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(217,167,96,0.85), rgba(125,81,36,0.90));
  border: 1px solid rgba(217,167,96,0.45);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(217,167,96,0.22);
  transition: background 0.18s, box-shadow 0.18s;
}

.edit-price-confirm:hover {
  background: linear-gradient(135deg, rgba(230,180,110,0.95), rgba(140,92,42,0.95));
  box-shadow: 0 4px 18px rgba(217,167,96,0.38);
}

/* â”€â”€ Item hover tooltip â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.item-tooltip {
  position: fixed;
  z-index: 9999;
  width: 260px;
  padding: 14px 16px;
  background:
    linear-gradient(160deg, rgba(22, 17, 8, 0.88) 0%, rgba(10, 8, 3, 0.92) 100%);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(217, 167, 96, 0.36);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(217,167,96,0.08),
    0 16px 48px rgba(0,0,0,0.68);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  color: var(--text);
  transform-origin: top left;
  transform: scale(calc(1 / var(--stage-scale, 1)));
}

.item-tooltip[hidden] { display: none; }

.pwa-install-popup {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 10000;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(520px, calc(100vw - 28px));
  min-height: 78px;
  padding: 14px 16px;
  padding-right: 48px;
  border: 1px solid rgba(217, 167, 96, 0.45);
  border-radius: 10px;
  background:
    radial-gradient(circle at 14% 0, rgba(217, 167, 96, 0.18), transparent 34%),
    linear-gradient(160deg, rgba(18, 14, 8, 0.96), rgba(4, 8, 9, 0.98));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.66),
    inset 0 1px 0 rgba(255, 221, 148, 0.14);
  color: var(--text);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.pwa-install-popup[hidden] {
  display: none;
}

.pwa-install-popup.show {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.pwa-install-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(217, 167, 96, 0.22);
}

.pwa-install-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pwa-install-copy b {
  color: #fff;
  font-size: 15px;
  line-height: 1.15;
}

.pwa-install-action {
  height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(217, 167, 96, 0.46);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(181, 122, 54, 0.92), rgba(95, 61, 26, 0.94));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 235, 172, 0.18);
}

.pwa-install-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(217, 167, 96, 0.35);
  border-radius: 6px;
  background: rgba(4, 6, 7, 0.66);
  color: rgba(245, 241, 233, 0.86);
  font-size: 13px;
  font-weight: 900;
}

.item-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.item-tooltip-header .item-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.7)) brightness(1.08) contrast(1.05);
}

.item-tooltip-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.item-tooltip-level {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.item-tooltip-section {
  border-top: 1px solid rgba(217,167,96,0.14);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-tooltip-bonus {
  color: rgba(235,210,150,0.88);
  font-size: 11px;
}

.item-tooltip-bonus.neg {
  color: #e08080;
}

.item-tooltip-bonus b {
  color: #f0d890;
}

.item-tooltip-sockets .item-tooltip-socket {
  font-size: 11px;
}

.item-tooltip-socket.filled { color: #8ec5f5; }
.item-tooltip-socket.empty  { color: var(--muted-2); }

.item-tooltip-price {
  display: flex;
  align-items: center;
  gap: 5px;
  border-top: 1px solid rgba(217,167,96,0.14);
  padding-top: 8px;
  font-weight: 700;
  color: var(--gold);
  font-size: 13px;
}

.item-tooltip-price span {
  color: #9be0a0;
  font-size: 11px;
  font-weight: 400;
  margin-left: 2px;
}

/* â”€â”€ Hierarchical categories â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.cat-group {
  display: flex;
  flex-direction: column;
}

.cat-sub-list {
  display: flex;
  flex-direction: column;
  margin-left: 12px;
  border-left: 2px solid rgba(217,167,96,0.20);
  padding-left: 2px;
}

.cat-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 12px 11px 18px;
  font-size: 15px;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}

.cat-sub:hover {
  background: rgba(217,167,96,0.08);
  color: var(--text);
}

.cat-sub.active {
  color: var(--gold);
  background: rgba(217,167,96,0.12);
  font-weight: 600;
}

.cat-sub small {
  font-size: 13px;
  color: var(--muted-2);
  font-weight: 400;
}

/* â”€â”€ Dynamic sidebar panels â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

body.mobile-touch-ui .left-scroll {
  gap: 10px;
  padding-right: 16px;
}

body.mobile-touch-ui .categories-panel .panel-heading,
body.mobile-touch-ui .filters-panel .panel-heading {
  padding: 22px 24px 14px;
}

body.mobile-touch-ui .category-list {
  padding: 6px 9px 14px;
}

body.mobile-touch-ui .cat {
  min-height: 66px;
  padding: 0 17px 0 19px;
  margin: 4px 0;
  border-radius: 9px;
  font-size: 19px;
  touch-action: manipulation;
}

body.mobile-touch-ui .cat small {
  font-size: 15px;
}

body.mobile-touch-ui .cat-arrow {
  font-size: 12px;
}

body.mobile-touch-ui .cat-sub-list {
  margin-left: 14px;
  padding-left: 4px;
}

body.mobile-touch-ui .cat-sub {
  min-height: 56px;
  padding: 0 15px 0 20px;
  margin: 2px 0;
  border-radius: 8px;
  font-size: 17px;
  touch-action: manipulation;
}

body.mobile-touch-ui .cat-sub small {
  font-size: 14px;
}

body.mobile-touch-ui .filters-panel label {
  margin: 16px 18px 8px;
  font-size: 16px;
}

body.mobile-touch-ui .filters-panel > select,
body.mobile-touch-ui .filters-panel > input,
body.mobile-touch-ui .filters-panel > div {
  width: calc(100% - 36px);
  margin: 0 18px;
}

body.mobile-touch-ui .filters-panel select,
body.mobile-touch-ui .filters-panel input {
  min-height: 60px;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 17px;
  touch-action: manipulation;
}

body.mobile-touch-ui .filters-panel .range {
  grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

body.mobile-touch-ui .filters-panel .text-button {
  min-height: 44px;
  padding: 0 8px;
  font-size: 15px;
  touch-action: manipulation;
}

body.mobile-touch-ui .apply-filters {
  width: calc(100% - 36px);
  height: 66px;
  margin: 18px 18px 22px;
  touch-action: manipulation;
}

.sidebar-alt-panel {
  flex: 1;
  overflow: hidden;
  padding: 16px 18px;
}

.sidebar-stat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  margin-bottom: 14px;
}

.sidebar-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: rgba(217,167,96,0.05);
  border-radius: 7px;
  border: 1px solid rgba(217,167,96,0.10);
}

.sidebar-stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.sidebar-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

.sidebar-stat-green {
  color: #9be0a0;
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.sidebar-tag {
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(217,167,96,0.10);
  border: 1px solid rgba(217,167,96,0.22);
  color: var(--muted);
  font-size: 11px;
}

.sidebar-tags--filter .sidebar-tag--btn {
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-tags--filter .sidebar-tag--btn:hover {
  background: rgba(217,167,96,0.18);
  color: var(--text);
}

.sidebar-tags--filter .sidebar-tag--btn.active {
  background: rgba(217,167,96,0.22);
  border-color: rgba(217,167,96,0.55);
  color: var(--gold);
  font-weight: 700;
}

.sidebar-filter-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sidebar-action-btn {
  width: 100%;
  padding: 9px 0;
  border-radius: 8px;
  background: rgba(224,87,87,0.10);
  border: 1px solid rgba(224,87,87,0.28);
  color: #e08888;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s;
  margin-top: 4px;
}

.sidebar-action-btn:hover {
  background: rgba(224,87,87,0.20);
}

/* â”€â”€ Market Snapshot â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.sidebar-snapshot {
  margin-top: 14px;
  padding: 14px 14px 10px;
  background: rgba(217,167,96,0.05);
  border: 1px solid rgba(217,167,96,0.14);
  border-radius: 10px;
}

.sidebar-snapshot-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(217,167,96,0.65);
  margin-bottom: 10px;
}

.sidebar-snapshot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(217,167,96,0.08);
  font-size: 11px;
}

.sidebar-snapshot-row:last-child {
  border-bottom: none;
}

.sidebar-snapshot-row span {
  color: var(--muted);
}

.sidebar-snapshot-row b {
  color: var(--gold);
  font-size: 12px;
}

/* â”€â”€ Market Tip â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.sidebar-tip {
  margin-top: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(30,22,8,0.60), rgba(18,14,5,0.55));
  border: 1px solid rgba(217,167,96,0.18);
  border-left: 3px solid rgba(217,167,96,0.55);
  border-radius: 10px;
}

.sidebar-tip-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(217,167,96,0.70);
  margin-bottom: 8px;
}

.sidebar-tip-text {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  transition: opacity 0.3s ease;
}

.sidebar-tip-text.tip-fade-out {
  opacity: 0;
}

.sidebar-tip-text.tip-fade-in {
  animation: tip-in 0.4s ease forwards;
}

@keyframes tip-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* â”€â”€ Clickable item rows â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.row-item--clickable,
.activity-row--clickable {
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.16s;
}

.row-item--clickable:hover {
  background: rgba(217, 167, 96, 0.09);
}

.activity-row--clickable {
  border-radius: 8px;
  transition: background 0.16s;
}

.activity-row--clickable:hover {
  background: rgba(217, 167, 96, 0.08);
}

/* â”€â”€ Purchases back button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.purchases-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px 16px;
  background: rgba(217, 167, 96, 0.10);
  border: 1px solid rgba(217, 167, 96, 0.30);
  border-radius: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.purchases-back-btn:hover {
  background: rgba(217, 167, 96, 0.20);
  border-color: rgba(217, 167, 96, 0.55);
}

@keyframes just-bought-flash {
  0%   { box-shadow: 0 0 0 0 rgba(217,167,96,0); background: rgba(217,167,96,0); }
  15%  { box-shadow: 0 0 0 3px rgba(217,167,96,0.55); background: rgba(217,167,96,0.14); }
  60%  { box-shadow: 0 0 0 3px rgba(217,167,96,0.30); background: rgba(217,167,96,0.08); }
  100% { box-shadow: 0 0 0 0 rgba(217,167,96,0); background: rgba(217,167,96,0); }
}

.data-row.just-bought {
  border-radius: 8px;
  animation: just-bought-flash 3.2s ease forwards;
}

/* â”€â”€ xPortal Wallet Connect â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.connect-wrap {
  position: relative;
}

.btn-xportal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(200, 158, 42, 0.5);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(30, 22, 6, 0.9), rgba(15, 10, 2, 0.95));
  color: #d4a820;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.btn-xportal:hover,
.btn-xportal:not(.is-disabled):hover {
  border-color: rgba(220, 175, 50, 0.85);
  background: linear-gradient(135deg, rgba(50, 36, 8, 0.95), rgba(25, 16, 3, 0.98));
}

.btn-xportal.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* QR Popover */
.qr-popover {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(22px, env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) max(22px, env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px));
  background: rgba(2, 4, 8, 0.78);
  backdrop-filter: blur(10px);
}

.qr-popover[hidden] { display: none !important; }

.qr-modal-card {
  display: grid;
  gap: 14px;
  width: min(360px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid rgba(200, 158, 42, 0.4);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(210, 165, 40, 0.10) 0%, transparent 55%),
    linear-gradient(175deg, rgba(20, 14, 5, 0.97) 0%, rgba(6, 4, 1, 0.99) 100%);
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 210, 70, 0.08);
}

.qr-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qr-popover-title {
  font-size: 16px;
  font-weight: 800;
  color: #d4a820;
}

.qr-close-btn {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(200, 155, 40, 0.4);
  border-radius: 6px;
  background: rgba(25, 17, 4, 0.9);
  color: rgba(220, 175, 60, 0.9);
  font-weight: 700;
  cursor: pointer;
}

.qr-close-btn:hover {
  background: rgba(200, 140, 20, 0.2);
  border-color: rgba(220, 170, 50, 0.7);
}

.qr-wrap {
  display: flex;
  justify-content: center;
}

.connect-qr-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.qr-code {
  display: grid;
  place-items: center;
  width: 256px;
  min-height: 256px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #fff;
}

.qr-code canvas,
.qr-code img { width: 236px; height: 236px; }

.qr-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 236px;
  height: 236px;
  color: #666;
  font-size: 13px;
}

.qr-loader__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: #222;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.qr-refresh-btn {
  padding: 6px 18px;
  border: 1px solid rgba(200, 158, 42, 0.5);
  border-radius: 6px;
  background: rgba(30, 22, 6, 0.9);
  color: #d4a820;
  font-weight: 700;
  cursor: pointer;
}

.qr-btn-row {
  display: flex;
  gap: 8px;
}

.btn-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  height: 38px;
  border: 1px solid rgba(200, 155, 40, 0.35);
  border-radius: 8px;
  background: rgba(25, 18, 5, 0.8);
  color: rgba(200, 160, 50, 0.8);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.qr-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.qr-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(200, 160, 50, 0.6);
}

/* Connected button */
.btn-connected {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(200, 158, 42, 0.4);
  border-radius: 8px;
  background: rgba(20, 14, 4, 0.85);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.btn-connected:hover {
  border-color: rgba(220, 175, 50, 0.7);
  background: rgba(35, 25, 6, 0.95);
}

.connected-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.connected-info b {
  font-size: 12px;
  color: #e0c060;
  font-family: monospace;
}

.connected-info small {
  font-size: 10px;
  color: #4ecdc4;
  font-weight: 600;
}

.connected-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ecdc4;
  box-shadow: 0 0 6px rgba(78, 205, 196, 0.7);
  flex-shrink: 0;
}

/* Wallet popup */
.wallet-popup {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 24px));
  background:
    radial-gradient(ellipse at 50% 0%, rgba(210, 165, 40, 0.10) 0%, transparent 55%),
    linear-gradient(175deg, rgba(20, 14, 5, 0.97) 0%, rgba(6, 4, 1, 0.99) 100%);
  border: 1px solid rgba(200, 158, 42, 0.38);
  border-radius: 12px;
  padding: 14px;
  z-index: 10000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-popup[hidden] { display: none !important; }

.wallet-popup-addr {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: #e0c060;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px solid rgba(200, 158, 42, 0.2);
  text-align: center;
}

.explorer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(78, 205, 196, 0.3);
  border-radius: 999px;
  background: rgba(78, 205, 196, 0.07);
  color: #4ecdc4;
  text-decoration: none;
}

.explorer-link:hover { background: rgba(78, 205, 196, 0.15); }

.btn-wallet-disconnect {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid rgba(220, 53, 69, 0.3);
  background: rgba(220, 53, 69, 0.1);
  color: #e87a85;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.btn-wallet-disconnect:hover { background: rgba(220, 53, 69, 0.25); }


/* ── PlayFab login panel ─────────────────────────────────────────────────────── */
.pf-login-panel { padding: 0; }

.pf-login-panel input[type="email"],
.pf-login-panel input[type="password"],
.pf-login-panel input[type="text"] {
  width: 100%;
  display: block;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(198,148,78,0.20);
  border-radius: 6px;
  color: var(--text);
  padding: 0 12px;
}

.pf-login-panel input:focus {
  outline: none;
  border-color: rgba(198,148,78,0.50);
}

#pfPlayerPanel { gap: 8px; }

/* ── Login tab button ────────────────────────────────────────────────────────── */
.tab--login {
  margin-left: auto;
  border-left: 1px solid rgba(198,148,78,0.18);
  color: var(--gold);
  font-weight: 600;
  padding: 0 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.tab--login:hover { color: #ffe082; }

/* ── Nav logout button ───────────────────────────────────────────────────────── */
.tab--nav-logout {
  margin-left: auto;
  background: rgba(200,60,60,0.10);
  border-left: 1px solid rgba(200,60,60,0.25);
  border-right: none;
  color: rgba(240,120,120,0.85);
  font-size: 12px;
  font-weight: 600;
  padding: 0 14px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.tab--nav-logout:hover {
  background: rgba(200,60,60,0.22);
  color: rgba(255,140,140,1);
}

/* ── PlayFab login popup fields ─────────────────────────────────────────────── */
.pf-popup-field { margin-bottom: 10px; }

.pf-popup-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  margin-left: 0;
}

.pf-popup-input {
  width: 100%;
  height: 44px;
  background: rgba(0,0,0,0.40);
  border: 1px solid rgba(198,148,78,0.22);
  border-radius: 6px;
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  display: block;
  margin: 0;
}

.pf-popup-input:focus {
  outline: none;
  border-color: rgba(198,148,78,0.55);
  background: rgba(0,0,0,0.55);
}

.pf-popup-error {
  color: #e07070;
  font-size: 12px;
  min-height: 16px;
  margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   INVENTORY OVERLAY
   ══════════════════════════════════════════════════════════════════════════════ */

.inv-overlay {
  position: absolute;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.inv-overlay.inv-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Panel ──────────────────────────────────────────────────────────────────── */
.inv-panel {
  width: 300px;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg, rgba(18, 13, 7, 0.97) 0%, rgba(10, 7, 4, 0.99) 100%);
  border: 2px solid rgba(198, 148, 50, 0.55);
  border-image: url("ui icons/15_item_card_frame_style.png") 4 stretch;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(140, 95, 20, 0.35),
    0 0 60px rgba(0, 0, 0, 0.90),
    0 0 30px rgba(150, 100, 20, 0.15);
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.inv-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px 8px;
  border-bottom: 1px solid rgba(198, 148, 50, 0.28);
  background: rgba(0, 0, 0, 0.40);
  flex-shrink: 0;
}

.inv-header-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(220,180,80,0.5), rgba(100,60,10,0.8));
  border: 1px solid rgba(198,148,50,0.5);
  flex-shrink: 0;
}

.inv-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inv-close {
  background: none;
  border: none;
  color: rgba(220,218,211,0.5);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}
.inv-close:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ── Tabs I II III IV V ─────────────────────────────────────────────────────── */
.inv-tabs {
  display: flex;
  border-bottom: 1px solid rgba(198,148,50,0.20);
  background: rgba(0,0,0,0.30);
  flex-shrink: 0;
}

.inv-tab {
  flex: 1;
  background: none;
  border: none;
  border-right: 1px solid rgba(198,148,50,0.14);
  color: rgba(220,218,211,0.50);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 7px 0;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.inv-tab:last-child { border-right: none; }
.inv-tab:hover { color: rgba(220,218,211,0.85); background: rgba(255,255,255,0.04); }
.inv-tab.active {
  color: var(--gold);
  background: rgba(198,148,50,0.10);
  border-bottom: 2px solid rgba(198,148,50,0.60);
  margin-bottom: -1px;
}

/* ── Grid wrap ──────────────────────────────────────────────────────────────── */
.inv-grid-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(198,148,50,0.35) rgba(0,0,0,0.15);
}
.inv-grid-wrap::-webkit-scrollbar { width: 5px; }
.inv-grid-wrap::-webkit-scrollbar-track { background: rgba(0,0,0,0.15); }
.inv-grid-wrap::-webkit-scrollbar-thumb { background: rgba(198,148,50,0.35); border-radius: 3px; }

/* ── Grid ───────────────────────────────────────────────────────────────────── */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(var(--inv-cols, 5), 1fr);
  gap: 4px;
}

/* ── Slot ───────────────────────────────────────────────────────────────────── */
.inv-slot {
  position: relative;
  aspect-ratio: 1;
  background:
    linear-gradient(135deg, rgba(28,20,10,0.90), rgba(15,10,5,0.95));
  border: 1px solid rgba(100, 72, 25, 0.55);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.08s;
}

.inv-slot:hover {
  border-color: rgba(198,148,50,0.80);
  box-shadow: 0 0 6px rgba(198,148,50,0.30), inset 0 0 4px rgba(198,148,50,0.10);
  transform: scale(1.06);
  z-index: 2;
}

.inv-slot--empty {
  cursor: default;
  background: rgba(10,7,4,0.60);
  border-color: rgba(60,42,15,0.35);
}
.inv-slot--empty:hover {
  transform: none;
  border-color: rgba(60,42,15,0.35);
  box-shadow: none;
}

.inv-slot--selected {
  border-color: var(--gold) !important;
  box-shadow:
    0 0 0 1px rgba(198,148,50,0.55),
    0 0 10px rgba(198,148,50,0.40),
    inset 0 0 6px rgba(198,148,50,0.15) !important;
}

/* ── Slot icon ──────────────────────────────────────────────────────────────── */
.inv-slot-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 3px;
}

/* ── Slot badges ────────────────────────────────────────────────────────────── */
.inv-slot-qual {
  position: absolute;
  top: 1px;
  left: 2px;
  font-size: 8px;
  font-weight: 700;
  color: rgba(255, 220, 100, 0.90);
  text-shadow: 0 0 4px rgba(0,0,0,0.9);
  line-height: 1;
  pointer-events: none;
}

.inv-slot-bound {
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: 8px;
  font-weight: 700;
  color: rgba(160, 220, 255, 0.80);
  text-shadow: 0 0 4px rgba(0,0,0,0.9);
  line-height: 1;
  pointer-events: none;
}

.inv-slot-qty {
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-size: 8px;
  font-weight: 700;
  color: rgba(255, 255, 200, 0.90);
  text-shadow: 0 0 3px rgba(0,0,0,1), 0 0 5px rgba(0,0,0,1);
  line-height: 1;
  pointer-events: none;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.inv-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid rgba(198,148,50,0.20);
  background: rgba(0,0,0,0.35);
  min-height: 42px;
  flex-shrink: 0;
}

#invSelectedName {
  flex: 1;
  font-size: 12px;
  color: rgba(220,218,211,0.70);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-qual-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
}

.inv-select-btn {
  background: linear-gradient(135deg, rgba(198,148,50,0.25), rgba(150,100,20,0.30));
  border: 1px solid rgba(198,148,50,0.50);
  border-radius: 4px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.inv-select-btn:hover {
  background: linear-gradient(135deg, rgba(198,148,50,0.40), rgba(150,100,20,0.45));
  border-color: rgba(198,148,50,0.75);
}

/* ── Trigger button in Sell Item panel ──────────────────────────────────────── */
.inv-open-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 32px);
  margin: 2px 16px 8px;
  padding: 8px 14px;
  background: rgba(198,148,50,0.08);
  border: 1px solid rgba(198,148,50,0.30);
  border-radius: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.inv-open-btn:hover {
  background: rgba(198,148,50,0.16);
  border-color: rgba(198,148,50,0.55);
}
.inv-open-icon { font-size: 15px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ACCOUNT PAGE (inline inventory)
   ══════════════════════════════════════════════════════════════════════════════ */

#page-account {
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#page-account.active {
  display: flex;
}

.acct-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px 12px 4px;
  gap: 0;
  overflow: hidden;
}

/* ── Header bar ─────────────────────────────────────────────────────────────── */
.acct-hdr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.40);
  border: 1px solid rgba(198,148,50,0.25);
  border-radius: 6px;
  flex-shrink: 0;
}

.acct-avatar {
  width: 40px;
  height: 40px;
  font-size: 20px;
  flex-shrink: 0;
}

.acct-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.acct-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.03em;
}

.acct-bal {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: rgba(220,218,211,0.80);
}

.acct-bal-coin {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.acct-bal-val {
  font-weight: 600;
  color: #fff;
}

.acct-bal-usd {
  color: var(--muted);
  font-size: 12px;
}

.acct-logout-btn {
  background: rgba(200,60,60,0.12);
  border: 1px solid rgba(200,60,60,0.35);
  border-radius: 5px;
  color: rgba(240,120,120,0.90);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.acct-logout-btn:hover {
  background: rgba(200,60,60,0.22);
  border-color: rgba(200,60,60,0.60);
}

/* ── Inventory section ──────────────────────────────────────────────────────── */
.acct-inv-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(198,148,50,0.20);
  border-radius: 6px;
}

#acctInvMount {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tabs inside account page — label + tab buttons in one row */
.acct-inv-tabs {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.acct-inv-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 10px 0 10px;
  border-right: 1px solid rgba(198,148,50,0.25);
  margin-right: 6px;
  white-space: nowrap;
  line-height: 1;
}

/* Grid wrap inside account page — no scroll, fills available space */
.acct-inv-grid-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 4px 8px 2px;
}

#acctInvMount {
  min-height: 0;
}

.acct-inv-wrap {
  min-height: 0;
}

/* Footer inside account page */
.acct-inv-footer {
  border-top: 1px solid rgba(198,148,50,0.18);
  flex-shrink: 0;
  padding: 6px 10px;
}
