/*
 * Braden's Values — visual system and responsive layout
 * UI-only layer: no application behavior is changed here.
 */

:root {
  --top: 70px;
  --side: 232px;
  --page-width: 1400px;
  --page-gutter: clamp(18px, 2.2vw, 34px);
  --bg: #07080c;
  --panel: #0e1017;
  --panel2: #131620;
  --panel3: #191c28;
  --surface: #0f1119;
  --surface-raised: #151823;
  --surface-soft: #0a0c12;
  --text: #f5f5f8;
  --muted: #a3a5b1;
  --faint: #6f7280;
  --line: rgba(255, 255, 255, 0.095);
  --line-strong: rgba(255, 255, 255, 0.15);
  --mint: #8f80ff;
  --mint2: #7465ee;
  --purple: #b9b0ff;
  --gold: #f4c56d;
  --red: #ff747f;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  scrollbar-color: #303342 #090a0f;
}

html {
  scroll-padding-top: calc(var(--top) + 20px);
  background: var(--bg);
}

body,
body[data-layout="classic"] {
  min-height: 100svh;
  overflow-x: clip;
  background:
    radial-gradient(900px 560px at 88% -180px, rgba(116, 101, 238, 0.13), transparent 70%),
    radial-gradient(700px 480px at 5% 15%, rgba(67, 88, 165, 0.07), transparent 72%),
    var(--bg) !important;
  color: var(--text);
  font-size: 14px;
  font-weight: 510;
  line-height: 1.5;
}

body::before,
body::after {
  display: none !important;
}

button,
input,
select,
textarea {
  letter-spacing: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

/* App shell */
.topbar {
  height: var(--top) !important;
  min-height: var(--top) !important;
  gap: 14px !important;
  padding: 0 18px !important;
  background: rgba(7, 8, 12, 0.88) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: none !important;
  backdrop-filter: blur(22px) saturate(130%);
}

.brand {
  min-width: 210px !important;
  max-width: 210px;
  gap: 10px;
}

.brand-mark {
  width: 66px !important;
  height: 42px !important;
  flex: 0 0 66px !important;
  padding: 2px !important;
  border: 1px solid rgba(143, 128, 255, 0.24) !important;
  border-radius: 10px !important;
  background: #05060a !important;
  box-shadow: 0 10px 28px rgba(73, 58, 190, 0.13) !important;
}

.brand-mark img {
  object-fit: contain !important;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  font-size: 13px !important;
  letter-spacing: -0.01em;
}

.brand-copy span {
  margin-top: 4px;
  color: #777a89;
  font-size: 8px !important;
  letter-spacing: 0.08em !important;
}

.global-search {
  max-width: 650px;
}

.global-search input {
  height: 42px;
  padding-left: 40px;
  border: 1px solid var(--line) !important;
  border-radius: 11px !important;
  background: rgba(17, 19, 28, 0.96) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025) !important;
}

.global-search input::placeholder {
  color: #747685;
}

.global-search .search-icon {
  top: 11px;
  color: #8c8e9c;
}

.global-search kbd {
  top: 9px;
  border-radius: 6px;
  background: #1a1c27;
}

.guest-identity,
.icon-btn {
  height: 40px;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  background: rgba(17, 19, 28, 0.96) !important;
  box-shadow: none !important;
}

.guest-identity {
  max-width: 178px;
}

.icon-btn {
  width: 40px;
}

.guest-identity:hover,
.icon-btn:hover {
  border-color: rgba(143, 128, 255, 0.28) !important;
  background: #181b27 !important;
}

.sidebar {
  top: var(--top) !important;
  width: var(--side);
  padding: 15px 12px 18px;
  background: rgba(8, 9, 14, 0.96) !important;
  border-right: 1px solid var(--line) !important;
}

.nav-label {
  margin: 15px 10px 6px;
  color: #646674;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.nav-btn,
.nav-more summary {
  min-height: 39px;
  margin: 1px 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px !important;
  color: #a1a3af;
  font-size: 12px;
  font-weight: 680;
}

.nav-btn span:first-child {
  width: 20px;
  color: #777987;
  font-size: 14px;
}

.nav-btn:hover,
.nav-more summary:hover {
  transform: none !important;
  background: #12141d;
  color: #fff;
}

.nav-btn.active,
body[data-layout="classic"] .nav-btn.active {
  border-color: rgba(143, 128, 255, 0.18) !important;
  background: rgba(143, 128, 255, 0.13) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.nav-btn.active span:first-child {
  color: var(--purple);
}

.nav-more-body {
  padding-top: 3px;
}

.side-settings-btn {
  margin-top: 8px;
}

.side-card {
  display: none;
}

.app {
  margin-left: var(--side) !important;
  min-width: 0;
  padding: calc(var(--top) + 20px) var(--page-gutter) 100px !important;
}

.page {
  width: 100%;
  max-width: var(--page-width);
  min-width: 0;
}

.page.active {
  animation: pageIn 0.2s ease both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

/* Shared controls */
.card,
.tool-card,
.trade-main,
.trade-side,
.verdict-card,
.engine-toolbar,
.engine-panel,
.feedback-status-card,
.route-stage-card {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

.btn,
body[data-layout="classic"] .btn {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  background: #171a24 !important;
  color: #f4f4f7;
  font-size: 12px;
  font-weight: 760 !important;
  box-shadow: none !important;
}

.btn:hover,
body[data-layout="classic"] .btn:hover {
  transform: translateY(-1px) !important;
  border-color: var(--line-strong) !important;
  background: #1d202c !important;
}

.btn.primary,
body[data-layout="classic"] .btn.primary {
  border-color: #9a8cff !important;
  background: #9a8cff !important;
  color: #100e1b !important;
  box-shadow: 0 10px 28px rgba(122, 105, 238, 0.2) !important;
}

.btn.primary:hover,
body[data-layout="classic"] .btn.primary:hover {
  background: #aa9fff !important;
}

.btn.small-btn {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px !important;
}

.btn.danger {
  border-color: rgba(255, 116, 127, 0.22) !important;
  background: rgba(255, 116, 127, 0.08) !important;
  color: #ff9ca4;
}

.field,
.big-input,
select,
input,
textarea {
  border-radius: 9px !important;
}

.field,
.big-input,
body[data-layout="classic"] .field,
body[data-layout="classic"] .big-input {
  border-color: var(--line) !important;
  background: #0c0e15 !important;
}

.badge,
.market-tier,
.route-badge,
.release-pill {
  border-radius: 7px !important;
  letter-spacing: 0.01em;
  text-transform: none;
}

.section-head {
  align-items: flex-end;
  margin: 2px 0 15px;
}

.section-head h2 {
  margin-top: 4px;
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.section-head p {
  max-width: 720px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.48;
}

.eyebrow,
.panel-kicker,
.feature-kicker {
  color: var(--purple) !important;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.eyebrow::before {
  display: none;
}

.panel-head {
  align-items: flex-end;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin-top: 3px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.text-button {
  color: var(--purple) !important;
  font-size: 11px;
}

/* Home hero */
.clean-home-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 16px;
  min-height: 370px;
  padding: clamp(24px, 2.4vw, 36px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(112deg, rgba(19, 21, 30, 0.99), rgba(10, 12, 18, 0.99) 62%),
    #10121a !important;
  box-shadow: var(--shadow);
}

.clean-home-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  display: block;
  background: radial-gradient(460px 330px at 79% 46%, rgba(143, 128, 255, 0.13), transparent 70%);
  pointer-events: none;
}

.clean-home-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 720px;
  padding: 0;
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(143, 128, 255, 0.19);
  background: rgba(143, 128, 255, 0.07);
  color: #cfcbec;
  font-size: 10px;
}

.release-pill span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ee0a6;
  box-shadow: 0 0 0 4px rgba(126, 224, 166, 0.09);
}

.clean-home-copy h1 {
  max-width: 720px;
  margin: 18px 0 13px;
  font-size: clamp(42px, 3.75vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.056em;
}

.clean-home-copy h1 em {
  color: #a89cff;
}

.clean-home-copy > p {
  max-width: 610px;
  margin: 0;
  color: #b1b3bd;
  font-size: 15px;
  line-height: 1.6;
}

.premium-hero-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 23px;
}

.clean-home-main-action {
  gap: 30px;
}

.home-showcase {
  position: relative;
  min-width: 0;
  min-height: 300px;
  align-self: stretch;
}

.home-showcase-grid {
  position: absolute;
  inset: 3% 0 0 2%;
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 55% 70%, rgba(143, 128, 255, 0.13), transparent 56%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 62%);
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.94), transparent 92%);
  transform: none;
}

.home-market-live {
  position: absolute;
  z-index: 4;
  top: 6px;
  right: 8px;
  display: none;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 13, 20, 0.8);
  color: #c8cad3;
  font-size: 9px;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.home-market-live span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6fe09a;
  box-shadow: 0 0 0 4px rgba(111, 224, 154, 0.09);
}

.home-dino {
  position: absolute;
  z-index: 2;
  margin: 0;
}

.home-dino img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 32px 36px rgba(0, 0, 0, 0.48));
}

.home-dino-primary {
  inset: 12px 8px 28px 8px;
}

.home-dino-primary::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 6%;
  bottom: 7%;
  width: 70%;
  height: 18%;
  border-radius: 50%;
  background: rgba(124, 104, 255, 0.22);
  filter: blur(28px);
}

.home-dino-secondary {
  z-index: 3;
  left: 0;
  bottom: 8px;
  width: 42%;
  height: 40%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 17px;
  background: rgba(10, 12, 18, 0.74);
  backdrop-filter: blur(14px);
}

.home-dino figcaption {
  position: absolute;
  right: 0;
  bottom: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 10px;
  min-width: 150px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 10, 16, 0.84);
  backdrop-filter: blur(14px);
}

.home-dino figcaption span {
  align-self: end;
  color: #d3d4dc;
  font-size: 9px;
  font-weight: 760;
}

.home-dino figcaption strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: #fff;
  font-size: 22px;
}

.home-dino figcaption small {
  color: #8f92a0;
  font-size: 8px;
}

.home-dino-secondary figcaption {
  display: none;
}

.home-market-note {
  position: absolute;
  z-index: 4;
  right: 8px;
  bottom: 4px;
  display: none;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border-left: 2px solid #9a8cff;
  background: rgba(9, 10, 16, 0.72);
  backdrop-filter: blur(12px);
}

.home-market-note b {
  font-size: 19px;
}

.home-market-note span {
  color: #92949f;
  font-size: 8px;
}

/* Home navigation and summaries */
.home-action-dock {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px !important;
  background: #0d0f16 !important;
}

.clean-start-head {
  padding: 0 5px;
}

.clean-start-head h2 {
  margin: 3px 0 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.clean-start-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.clean-start-actions > button,
.clean-tool-list > button {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #12141d;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.clean-start-actions > button:hover,
.clean-tool-list > button:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 128, 255, 0.28);
  background: #181b26;
}

.clean-start-actions > button > span,
.clean-tool-list > button > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(143, 128, 255, 0.12);
  border-radius: 9px;
  background: rgba(143, 128, 255, 0.1);
  color: var(--purple);
  font-size: 14px;
}

.clean-tool-list > button {
  border-color: transparent;
  background: #10121a;
}

.clean-tool-list > button > span {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
}

.clean-start-actions b,
.clean-tool-list b {
  display: block;
  font-size: 11px;
}

.clean-start-actions small,
.clean-tool-list small {
  display: block;
  margin-top: 2px;
  color: #858895;
  font-size: 10px;
  line-height: 1.35;
}

.clean-start-actions i {
  color: #777987;
  font-style: normal;
}

.home-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 !important;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0d0f16;
}

.home-stat-strip > div {
  min-width: 0;
  padding: 14px 16px !important;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.home-stat-strip > div:last-child {
  border-right: 0 !important;
}

.home-stat-strip span {
  color: #757886;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.home-stat-strip strong {
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.home-stat-strip small {
  margin-top: 1px;
  color: #656875;
  font-size: 10px;
}

.clean-home-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 12px;
}

.premium-panel,
.clean-home-tools {
  padding: 16px;
}

.clean-popular-panel .quick-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px;
  margin-top: 0;
}

.quick-item {
  position: relative;
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 0;
  min-width: 0;
  min-height: 156px !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: 11px !important;
  background: #0b0d13 !important;
}

.quick-item:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 128, 255, 0.25) !important;
  background: #10131c !important;
}

.quick-thumb {
  width: 100% !important;
  height: 102px !important;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 50% 64%, rgba(143, 128, 255, 0.1), transparent 52%),
    #07080d !important;
  object-fit: contain;
  padding: 8px;
}

.quick-copy {
  width: 100%;
  min-width: 0;
  padding: 9px 10px 10px;
}

.quick-copy strong {
  font-size: 11px;
}

.quick-copy span {
  display: block;
  margin-top: 3px;
  color: #7e818f;
  font-size: 10px;
}

.clean-home-tools {
  align-self: stretch;
}

.clean-tool-list {
  display: grid;
  gap: 7px;
}

.clean-tool-list > button {
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 58px;
}

.clean-home-details {
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
  background: #0d0f16 !important;
}

.clean-home-details summary {
  min-height: 58px;
  padding: 13px 16px;
}

.clean-home-detail-body {
  padding: 0 16px 16px;
}

/* Trade calculator */
.trade-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 338px;
  gap: 13px;
}

.trade-main {
  min-width: 0;
  padding: 14px !important;
}

.trade-head {
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.trade-actions,
.engine-toolbar-actions {
  gap: 6px;
}

.engine-toolbar {
  align-items: center;
  padding: 9px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.inventory-mode-btn {
  min-height: 46px;
  border-radius: 10px !important;
}

.engine-signal-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.engine-signal-strip > div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0c0e15;
}

.trade-columns {
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 9px;
}

.trade-side {
  min-width: 0;
  padding: 10px !important;
  background: #0b0d13 !important;
}

.side-title {
  margin-bottom: 8px;
}

.slot-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.slot {
  min-height: 110px;
  border-radius: 10px !important;
  background: #08090e !important;
}

.slot:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(143, 128, 255, 0.28) !important;
}

.slot img {
  height: 67px;
  object-fit: contain;
  background: #05060a;
}

.slot-copy {
  padding: 6px 7px 7px;
}

.slot-copy strong {
  font-size: 9px;
}

.slot-copy span {
  font-size: 8px;
}

.side-totals {
  gap: 5px;
  margin-top: 7px;
}

.mini-stat {
  padding: 8px;
  border-radius: 8px !important;
  background: #11141c !important;
}

.mini-stat span {
  font-size: 7px;
}

.mini-stat strong {
  font-size: 10px;
}

.swap-col {
  padding-top: 145px;
}

.swap-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px !important;
  background: #171a24 !important;
}

.verdict-card {
  top: calc(var(--top) + 13px);
  align-self: start;
  background: #0e1017 !important;
}

.verdict-top {
  padding: 19px;
  background: transparent !important;
}

.verdict-orb {
  width: 62px;
  height: 62px;
  border-radius: 18px !important;
  font-size: 30px;
  box-shadow: none !important;
}

.verdict-top h2 {
  margin-top: 11px;
  font-size: 25px;
}

.verdict-body {
  padding: 13px;
}

.trade-explain-card,
.fair-adds-card {
  margin-top: 9px;
  padding: 11px;
  border-radius: 10px;
  background: #0a0c12;
}

/* Values and dense collections */
.values-page-head {
  margin-bottom: 14px;
}

.values-toolbar {
  grid-template-columns:
    minmax(250px, 1.5fr)
    repeat(3, minmax(118px, 0.62fr))
    minmax(98px, auto)
    minmax(150px, auto);
  gap: 7px;
  min-width: 0;
  padding: 0;
  margin-bottom: 10px;
  border: 0 !important;
  background: transparent !important;
}

.smart-search-row {
  margin: 0 0 9px;
}

.smart-search-row button {
  border-radius: 7px;
  background: #0d0f16;
}

.value-grid.value-grid-mode {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}

.value-grid-card {
  overflow: hidden;
  border-radius: 11px;
  background: #0e1017;
}

.value-grid-card:hover {
  transform: translateY(-2px);
}

.value-grid-image {
  height: 142px;
  background:
    radial-gradient(circle at 50% 65%, rgba(143, 128, 255, 0.09), transparent 48%),
    #07080d;
}

.value-grid-body {
  min-width: 0;
  padding: 10px;
}

.value-grid-body > div {
  min-width: 0;
}

.value-grid-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.value-grid-body span,
.value-row-name span,
.value-row-number span,
.value-row-demand span {
  font-size: 10px;
}

.value-market-row {
  min-height: 78px !important;
  border-radius: 10px;
  background: #0e1017;
}

.value-market-row:hover {
  background: #141720;
}

.value-row-art,
.profile-image,
.picker-item img,
.inventory-card-image {
  background:
    radial-gradient(circle at 50% 62%, rgba(143, 128, 255, 0.08), transparent 52%),
    #07080d !important;
}

.inventory-grid,
.goal-grid,
.pulse-grid,
.pet-collection,
.casino-arcade-grid {
  gap: 10px;
}

/* Other page surfaces */
.tool-card,
.premium-panel,
.casino-game-card,
.settings-section,
.feedback-form {
  border-radius: 14px !important;
}

.casino-game-tabs {
  gap: 6px;
  margin-bottom: 13px;
}

.casino-game-tab {
  padding: 9px 13px;
  border-radius: 9px;
  box-shadow: none !important;
}

.casino-game-card {
  padding: 18px;
}

.casino-result-stage {
  min-height: 160px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 35%, rgba(143, 128, 255, 0.12), transparent 62%),
    #0a0c12;
}

/* Dialogs and floating UI */
.modal {
  padding: 16px;
  background: rgba(2, 3, 6, 0.74) !important;
}

.modal-box,
.sheet-box {
  border: 1px solid var(--line-strong) !important;
  border-radius: 17px !important;
  background: #0b0d13 !important;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.58) !important;
}

.modal-head {
  padding: 13px 14px;
  background: #0c0e15 !important;
}

.picker-filters {
  padding: 9px 14px;
}

.picker-grid {
  gap: 8px;
  padding: 12px;
}

.picker-item {
  border-radius: 11px;
  background: #0e1017 !important;
}

.guest-welcome-box {
  background: #0c0e15 !important;
}

.live-users {
  bottom: 14px;
  height: 36px;
  border-radius: 10px;
  box-shadow: none;
}

.live-users {
  left: calc(var(--side) + 18px) !important;
}


/* Light mode keeps the same structure */
body[data-theme="light"],
body[data-layout="classic"][data-theme="light"] {
  --bg: #f4f4f7;
  --panel: #fff;
  --panel2: #f5f5f8;
  --panel3: #ececf1;
  --surface: #fff;
  --surface-raised: #f5f5f8;
  --surface-soft: #fafafd;
  --text: #18181d;
  --muted: #656773;
  --faint: #9597a1;
  --line: rgba(20, 20, 28, 0.11);
  --line-strong: rgba(20, 20, 28, 0.17);
  background: #f4f4f7 !important;
}

body[data-theme="light"] .topbar {
  background: rgba(250, 250, 252, 0.9) !important;
}

body[data-theme="light"] .sidebar {
  background: rgba(248, 248, 250, 0.97) !important;
}

body[data-theme="light"] .clean-home-hero {
  background: #fff !important;
  box-shadow: 0 24px 70px rgba(40, 37, 65, 0.09);
}

body[data-theme="light"] .home-action-dock,
body[data-theme="light"] .home-stat-strip,
body[data-theme="light"] .clean-home-details {
  background: #fff !important;
}

body[data-theme="light"] .clean-start-actions > button,
body[data-theme="light"] .clean-tool-list > button,
body[data-theme="light"] .quick-item,
body[data-theme="light"] .trade-side,
body[data-theme="light"] .slot {
  background: #f7f7fa !important;
}

/* Responsive */
@media (max-width: 1500px) {
  .value-grid.value-grid-mode {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1240px) {
  .clean-home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    min-height: 355px;
  }

  .clean-home-copy h1 {
    font-size: clamp(40px, 4.5vw, 54px);
  }

  .clean-popular-panel .quick-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .value-grid.value-grid-mode {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1020px) {
  .clean-home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
    min-height: 340px;
    padding: 26px;
  }

  .home-action-dock {
    grid-template-columns: 175px minmax(0, 1fr);
  }

  .clean-home-content {
    grid-template-columns: 1fr;
  }

  .clean-tool-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .clean-tool-list > button {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .clean-tool-list small {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --top: calc(58px + env(safe-area-inset-top, 0px));
  }

  body {
    font-size: 13px;
  }

  .topbar {
    padding: env(safe-area-inset-top, 0px) 10px 0 !important;
  }

  .brand {
    min-width: 52px !important;
    max-width: 52px;
  }

  .brand-mark {
    width: 52px !important;
    height: 36px !important;
    flex-basis: 52px !important;
  }

  .brand-copy,
  .global-search kbd {
    display: none;
  }

  .sidebar {
    display: none;
  }

  .app {
    margin-left: 0 !important;
    padding: calc(var(--top) + 12px) 12px calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .global-search {
    max-width: none;
    margin: 0;
  }

  .global-search input {
    height: 38px;
    padding-right: 10px;
  }

  .guest-identity {
    max-width: 112px;
    height: 38px;
    padding: 0 9px;
  }

  .top-actions {
    gap: 5px;
  }

  .top-actions #exportBtn,
  .top-actions #themeToggleBtn {
    display: none !important;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .mobile-nav {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 5px 8px env(safe-area-inset-bottom, 0px) !important;
    border: 0 !important;
    border-top: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: rgba(9, 10, 15, 0.97) !important;
    box-shadow: none !important;
  }

  .mobile-nav button {
    min-width: 0;
    min-height: 48px;
    padding: 5px 2px;
    border-radius: 9px;
  }

  .mobile-nav button span {
    margin-bottom: 2px;
  }

  body[data-layout] .mobile-nav button.active {
    position: relative;
    background: transparent !important;
    color: #b9b0ff !important;
  }

  body[data-layout] .mobile-nav button.active::after {
    content: "";
    position: absolute;
    right: 22%;
    bottom: 1px;
    left: 22%;
    height: 2px;
    border-radius: 2px;
    background: #9587ff;
  }

  .trade-shell {
    grid-template-columns: 1fr;
  }

  .verdict-card {
    position: static;
  }

  .swap-col {
    padding-top: 0;
  }

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

  .live-users {
    left: 10px !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

}

@media (max-width: 760px) {
  .section-head {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 11px;
  }

  .section-head h2 {
    font-size: 25px;
  }

  .clean-home-hero {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
    padding: 0 18px 20px;
    border-radius: 16px;
  }

  .clean-home-hero::before {
    background: radial-gradient(380px 220px at 70% 12%, rgba(143, 128, 255, 0.18), transparent 72%);
  }

  .home-showcase {
    order: -1;
    min-height: 185px;
    margin: 0 -18px 5px;
    overflow: hidden;
  }

  .home-showcase-grid {
    inset: 0;
    border: 0;
    border-radius: 0;
    transform: none;
    mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
  }

  .home-dino-primary {
    inset: -10px 8% 0 14%;
  }

  .home-dino-secondary {
    left: 7px;
    bottom: 8px;
    width: 31%;
    height: 45%;
    padding: 6px;
    border-radius: 11px;
  }

  .home-dino figcaption {
    right: 8px;
    bottom: 8px;
    min-width: 134px;
    padding: 8px 9px;
  }

  .home-dino figcaption strong {
    font-size: 18px;
  }

  .home-market-live {
    top: 10px;
    right: 10px;
  }

  .home-market-note {
    display: none;
  }

  .clean-home-copy h1 {
    margin: 15px 0 10px;
    font-size: clamp(35px, 10vw, 48px);
    line-height: 0.98;
  }

  .clean-home-copy > p {
    font-size: 13px;
    line-height: 1.48;
  }

  .premium-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 17px;
  }

  .premium-hero-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .home-action-dock {
    display: block;
    padding: 10px;
  }

  .home-action-dock .clean-start-head {
    display: none;
  }

  .clean-start-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .clean-start-actions > button {
    display: flex;
    min-width: 0;
    min-height: 62px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 7px 5px;
    text-align: center;
  }

  .clean-start-actions > button > span {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .clean-start-actions small,
  .clean-start-actions i {
    display: none;
  }

  .clean-start-actions b {
    font-size: 9px;
    line-height: 1.2;
  }

  .home-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-stat-strip > div {
    padding: 11px 12px !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .home-stat-strip > div:nth-child(2) {
    border-right: 0 !important;
  }

  .home-stat-strip > div:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
  }

  .home-stat-strip strong {
    font-size: 17px;
  }

  .clean-popular-panel .quick-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .clean-tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clean-tool-list > button {
    min-height: 76px;
  }

  .trade-main {
    padding: 10px !important;
  }

  #page-trade > .section-head {
    margin-bottom: 8px;
  }

  #page-trade > .section-head p {
    display: none;
  }

  .trade-head {
    display: block;
    margin-bottom: 4px;
    padding-bottom: 7px;
  }

  .trade-head > div:first-child {
    display: none;
  }

  .trade-actions,
  .engine-toolbar-actions {
    width: 100%;
    gap: 6px;
  }

  .trade-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
    overflow: visible;
  }

  .trade-actions .btn {
    width: 100% !important;
    min-height: 32px;
    min-width: 0 !important;
    padding-right: 4px !important;
    padding-left: 4px !important;
    font-size: 10px;
    white-space: nowrap;
  }

  .engine-toolbar-actions {
    display: block !important;
    width: 100%;
  }

  .engine-toolbar-actions .btn {
    display: none;
  }

  .engine-toolbar-actions .engine-action {
    display: block;
    width: 100% !important;
    min-height: 38px;
    padding: 0 9px !important;
    font-size: 10px !important;
  }

  .engine-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 0.8fr);
    gap: 6px;
    align-items: center;
    padding: 6px 0 !important;
  }

  .inventory-mode-btn {
    min-height: 38px;
    padding: 5px 7px !important;
  }

  .inventory-mode-btn small {
    display: none;
  }

  .engine-signal-strip {
    display: none;
  }

  .trade-columns {
    gap: 8px !important;
  }

  .trade-side {
    padding: 8px !important;
  }

  .slot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px;
  }

  .slot,
  .slot.empty {
    min-height: 110px !important;
  }

  .slot img {
    height: 67px !important;
  }

  .side-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .swap-btn {
    height: 36px !important;
    transform: none !important;
  }

  .value-grid.value-grid-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .value-grid-image {
    height: 112px;
  }

  .value-grid-body {
    gap: 5px;
    padding: 8px;
  }

  .value-grid-body > b {
    white-space: nowrap;
    font-size: 15px;
  }

  .values-head-actions {
    width: 100%;
  }

  .values-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .values-toolbar > * {
    width: 100%;
    min-width: 0;
  }

  .values-search-wrap,
  .collector-toggle {
    grid-column: 1 / -1;
  }

  .values-toolbar .field,
  .values-toolbar .btn,
  .collector-toggle {
    min-height: 40px;
    font-size: 12px !important;
  }

  .collector-toggle {
    justify-content: center;
    border-style: dashed;
    background: transparent;
  }

  .smart-search-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 1px 2px 4px;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 0 94%, transparent);
  }

  .smart-search-row::-webkit-scrollbar {
    display: none;
  }

  .smart-search-row > * {
    flex: 0 0 auto;
  }

  .smart-search-row small {
    display: none;
  }

  .smart-search-row > span {
    display: none;
  }

  .smart-search-row button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 10px;
  }

  .value-grid-body strong {
    font-size: 12px;
  }

  .value-grid-body span,
  .value-row-name span,
  .value-row-number span,
  .value-row-demand span {
    font-size: 10.5px !important;
  }

  .casino-game-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .live-users {
    display: none !important;
  }


  .modal {
    align-items: flex-end;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .modal-box {
    width: 100% !important;
    max-height: calc(100svh - 16px - env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 16px !important;
  }

  #pickerModal .picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: 8px;
  }

  #pickerModal .picker-item {
    display: block;
    min-height: 0;
  }

  #pickerModal .picker-item img {
    width: 100%;
    height: 104px;
    min-height: 0;
  }

  .mobile-more-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 10px;
  }

  .mobile-more-grid small {
    display: none;
  }
}

@media (max-width: 540px) {
  .app {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .brand {
    min-width: 44px !important;
    max-width: 44px;
  }

  .brand-mark {
    width: 44px !important;
    height: 32px !important;
    flex-basis: 44px !important;
  }

  .global-search input {
    height: 36px;
    padding-left: 34px;
    font-size: 11px;
  }

  .global-search .search-icon {
    left: 12px;
    top: 8px;
  }

  .guest-identity {
    max-width: 70px;
    height: 36px;
    padding: 0 8px;
  }

  .guest-name,
  .guest-presence-dot {
    display: none;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .clean-home-hero {
    padding-right: 16px;
    padding-left: 16px;
  }

  .home-showcase {
    margin-right: -16px;
    margin-left: -16px;
  }

  .release-pill {
    padding: 6px 8px;
    font-size: 9px;
  }

  .quick-item {
    min-height: 145px !important;
  }

  .quick-thumb {
    height: 94px !important;
  }

  .premium-panel,
  .clean-home-tools {
    padding: 12px;
  }

  .panel-head h2 {
    font-size: 18px;
  }

  .mobile-more-grid button {
    min-height: 62px;
    padding: 9px;
  }
}

@media (max-width: 380px) {
  .top-actions {
    display: none;
  }

  .guest-identity {
    max-width: 64px;
  }

  .clean-home-copy h1 {
    font-size: 33px;
  }

  .home-dino-primary {
    right: 3%;
  }

  .slot,
  .slot.empty {
    min-height: 103px !important;
  }

  .slot img {
    height: 61px !important;
  }

  .mobile-more-grid {
    grid-template-columns: 1fr;
  }
}

@media (hover: hover) and (pointer: fine) {
  .quick-item,
  .clean-start-actions > button,
  .clean-tool-list > button,
  .value-grid-card,
  .value-market-row,
  .picker-item {
    transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
