:root {
  --box-bg: #020307;
  --table-header-bg: #020307;
  --table-row-odd: #07060c;
  --table-row-even: #020307;
  --border-color: #131313;
  --neg-red: #ec6565;
}

/* =========================================================
   ACCOUNT MODAL (iframe)
========================================================= */
#accountModal {
  align-items: flex-start;
  overflow: auto;
  padding: 10px;
}
#accountModal .account-modal-content {
  width: min(900px, calc(100vw - 40px));
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px;
  margin: 20px auto;
  max-width: none;
  box-sizing: border-box;
  background-color: #301c0d;
}

#accountModal .account-modal-content h3 {
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-family: "Google Sans Flex", sans-serif;
}

#accountModalIframe {
  display: block;
  width: 100%;
  height: calc(100vh - 120px);
  height: calc(100dvh - 120px);
  border: none;
  min-height: 520px;
  background: transparent;
  color-scheme: dark;
  overflow: auto;
}
@media only screen and (max-width: 768px) {
  #accountModal .account-modal-content {
    width: 100vw;
    margin: 0;
    border-radius: 0;
  }

  #accountModalIframe {
    height: calc(100vh - 96px);
    height: calc(100dvh - 96px);
    min-height: 420px;
  }
}

.center {
  text-align: center!important;
}

#btnCreateBuyRule, #btnCreateSellRule {
  background: #111827;
  color: #e5e7eb;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
}

.header .colwrap .col.right {
  position: relative;
  white-space: nowrap;
}

.header-nav-menu {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin-left: 14px;
  z-index: 3000;
  margin-top: 18px;
}

.header-nav-toggle {
  width: 56px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  transition: background 170ms ease, border-color 170ms ease, border-radius 170ms ease;
}

.header-nav-toggle .line {
  position: absolute;
  left: 50%;
  width: 28px;
  height: 2px;
  margin-left: -14px;
  background: #e5e7eb;
  border-radius: 10px;
  transition: transform 220ms ease, opacity 220ms ease;
}

.header-nav-toggle .line-1 { top: 13px; }
.header-nav-toggle .line-2 { top: 20px; }
.header-nav-toggle .line-3 { top: 27px; }

.header-nav-menu.is-open .header-nav-toggle .line-1 {
  transform: translateY(7px) rotate(45deg);
}

.header-nav-menu.is-open .header-nav-toggle .line-2 {
  opacity: 0;
  transform: scaleX(0);
}

.header-nav-menu.is-open .header-nav-toggle .line-3 {
  transform: translateY(-7px) rotate(-45deg);
}

.header-nav-menu.is-open .header-nav-toggle {
  background: #f5f5f7;
  border-color: #d1d5db;
  border-bottom-color: transparent;
  border-radius: 12px 12px 0 0;
  z-index: 2;
}

.header-nav-menu.is-open .header-nav-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: #f5f5f7;
}

.header-nav-menu.is-open .header-nav-toggle .line {
  background: #111827;
}

.header-nav-panel {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  width: 220px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #f5f5f7;
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.48);
  max-height: calc(100vh - 160px);
  overflow-x: hidden;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 170ms ease, transform 170ms ease;
  pointer-events: none;
  border-top-right-radius: 0px;
  margin-top: -3px;
}

.header-nav-menu.is-open .header-nav-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.header-nav-link {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #6a6a6a;
  text-decoration: none;
  padding: 12px 14px;
  border-bottom: 1px solid #9ca3af;
  font-size: 12px;
  font-family: "Google Sans Flex", sans-serif;
  font-variation-settings: "wght" 480;
  text-transform: uppercase;
}

.header-nav-link:last-child {
  border-bottom: 0;
}

.header-nav-link .feather {
  width: 40px;
  height: 40px;
  stroke: #6a6a6a;
  stroke-width: 1.3;
}

.header-nav-link:hover .feather {
  width: 40px;
  height: 40px;
  stroke: #0284c7;
  stroke-width: 1.8;
}

.header-nav-link:hover {
  background: #e5e7eb;
  color: #0284c7;
}

@media (max-width: 768px) {
  .header-nav-menu {
    margin-left: 8px;
  }

  .header-nav-panel {
    width: 205px;
    right: 0px;
  }

}

body.profile-dashboard {
  background: #130f09;
  color: #f0dfc0;
  max-width: none;
}

body.profile-dashboard .dashboard-main-wrap {
  position: relative;
  min-height: 100vh;
  padding-bottom: 0;
}

body.profile-dashboard .content {
  position: relative;
}

.profile-shell {
  position: relative;
  min-height: calc(100vh - 108px);
  padding: 28px 16px 54px;
  overflow: hidden;
}

.profile-bg-gradient {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(196, 104, 16, 0.27) 0%, transparent 55%),
              radial-gradient(ellipse at 75% 70%, rgba(138, 78, 32, 0.27) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.profile-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.profile-drop {
  position: absolute;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(160, 140, 112, 0.2));
  animation: profile-fall linear infinite;
}

@keyframes profile-fall {
  0% {
    transform: translateY(-40px);
    opacity: 0;
  }

  30% {
    opacity: 0.4;
  }

  100% {
    transform: translateY(110vh);
    opacity: 0;
  }
}

.profile-content-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.profile-avatar-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 1rem;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
}

.profile-avatar {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: #2a1c0e;
  border: 2px solid #7a5535;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-avatar-hint {
  font-size: 10px;
  color: #6d5843;
  text-align: center;
}

.profile-file-input {
  display: none;
}

.profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-username {
  font-size: 23px;
  font-weight: 500;
  color: #f0dfc0;
  margin-bottom: 3px;
}

.profile-uid {
  font-size: 11px;
  color: #7c644c;
  margin-bottom: 0.35rem;
}

.profile-display-name {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4a882;
  margin-bottom: 0.85rem;
}

.profile-bio {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #9a8468;
  text-align: center;
  line-height: 1.8;
  margin-bottom: 1rem;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.profile-section {
  width: 100%;
}

.profile-section-title {
  font-size: 10px;
  color: #7c644c;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0.65rem;
}

.profile-badge-shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1.2rem;
  width: 100%;
}

.profile-shelf-badge {
  position: relative;
  width: 34px;
  height: 34px;
  background: #1c1409;
  border: 1px solid #3a2a18;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.profile-badge-placeholder {
  font-size: 18px;
}

.profile-shelf-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e1810;
  border: 1px solid #4a3020;
  border-radius: 8px;
  padding: 6px 10px;
  white-space: nowrap;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 20;
}

.profile-shelf-badge:hover .profile-shelf-tip,
.profile-shelf-badge:focus-within .profile-shelf-tip {
  opacity: 1;
}

.profile-tip-name {
  color: #e0c898;
  font-weight: 500;
  display: block;
}

.profile-tip-desc {
  color: #8b7358;
  display: block;
  margin-top: 2px;
}

.profile-statue-section {
  margin-bottom: 0.2rem;
}

.profile-statue-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.profile-statue-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(28, 20, 9, 0.8);
  border: 1px solid #4a3020;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: #b08848;
  cursor: default;
  user-select: none;
}

.profile-statue-icon {
  font-size: 18px;
  line-height: 1;
}

.profile-badge-name {
  font-size: 12px;
  color: #c4a060;
  font-weight: 500;
}

.profile-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e1810;
  border: 1px solid #4a3020;
  border-radius: 10px;
  padding: 10px 14px;
  width: 210px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 10;
}

.profile-statue-wrap:hover .profile-tooltip {
  opacity: 1;
}

.profile-tooltip-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.profile-tooltip-statue {
  font-size: 26px;
}

.profile-tooltip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-tooltip-name {
  font-size: 13px;
  font-weight: 500;
  color: #e0c898;
}

.profile-tooltip-sub {
  font-size: 11px;
  color: #8b7358;
}

.profile-tooltip-bar-wrap {
  width: 100%;
  height: 5px;
  background: #2a1e10;
  border-radius: 3px;
  margin-bottom: 5px;
  overflow: hidden;
}

.profile-tooltip-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(to right, #c46810, #e8a040);
}

.profile-tooltip-progress {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #7c644c;
}

.profile-stage-control {
  width: 100%;
  background: #1a1208;
  border: 1px solid #2e2218;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 1.2rem;
  box-sizing: border-box;
}

.profile-stage-control-label {
  font-size: 10px;
  color: #7c644c;
  margin-bottom: 6px;
}

.profile-stage-control input {
  width: 100%;
  accent-color: #c46810;
}

.profile-stage-control-value {
  font-size: 10px;
  color: #b08848;
  margin-top: 4px;
  text-align: right;
}

.profile-views {
  font-size: 11px;
  color: #7c644c;
  margin-bottom: 1.4rem;
}

.profile-sticker-area {
  width: 100%;
  margin-bottom: 1.6rem;
  border: 1px dashed #4a3020;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  background: rgba(26, 18, 8, 0.45);
  box-sizing: border-box;
}

.profile-sticker-area-label {
  font-size: 11px;
  color: #c4a882;
}

.profile-sticker-area-sub {
  font-size: 10px;
  color: #7c644c;
  margin-top: 3px;
}

.profile-separator {
  width: 140px;
  height: 1px;
  background: #241a0e;
  margin-bottom: 1.5rem;
}

.profile-icon-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.profile-icon-link {
  position: relative;
  width: 48px;
  height: 48px;
  background: #1a1208;
  border: 1px solid #2e2218;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

.profile-icon-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e1810;
  border: 1px solid #3a2a18;
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
  font-size: 11px;
  color: #c4a882;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 20;
}

.profile-icon-link:hover .profile-icon-tip,
.profile-icon-link:focus-visible .profile-icon-tip {
  opacity: 1;
}

.profile-footer {
  margin-top: 2rem;
  font-size: 11px;
  color: #7c644c;
  letter-spacing: 0.5px;
}

.profile-color-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, #c46810, #8a3e20, #5a2810);
  opacity: 0.6;
  z-index: 100;
}

@media (max-width: 768px) {
  .profile-shell {
    min-height: calc(100vh - 96px);
    padding-top: 20px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .profile-tooltip {
    width: min(210px, calc(100vw - 40px));
  }
}